Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_HZInfoHeli.c
Go to the documentation of this file.
2{
3 protected SCR_HelicopterControllerComponent m_HelicoperController;
5
6 protected int m_iSignalIndexSpeed;
7 protected const string SIGNAL_SPEED = "airspeed";
8
9 protected int m_iSignalIndexAlt;
10 protected const string SIGNAL_ALTITUDE = "altitudeAGL";
11
12 //------------------------------------------------------------------------------------------------
15 {
16 EVehicleInfoState state = super.GetState();
17
18 m_bIsBlinking = false;
19
21 return state;
22
23 //4ZGUBA: We can make the indicators for damaged hitzones blink, if heli is flying; or not :-)
24 float speed = m_SignalsManager.GetSignalValue(m_iSignalIndexSpeed);
25 float alt = m_SignalsManager.GetSignalValue(m_iSignalIndexAlt);
26 m_bIsBlinking = state == EVehicleInfoState.ERROR && (alt > 5 || speed > 5);
27
28 return state;
29 }
30
31 //------------------------------------------------------------------------------------------------
33 override void DisplayInit(IEntity owner)
34 {
35 super.DisplayInit(owner);
36
37 m_HelicoperController = SCR_HelicopterControllerComponent.Cast(owner.FindComponent(SCR_HelicopterControllerComponent));
38
40 return;
41
42 m_SignalsManager = m_HelicoperController.GetSignalsManager();
43
45 return;
46
49 }
50};
EVehicleInfoState
UI indicator state, controlling colors and opacity.
proto external Managed FindComponent(typename typeName)
SCR_HelicopterControllerComponent m_HelicoperController
override EVehicleInfoState GetState()
Can be overridden to get state of actual system or linked to an event.
override void DisplayInit(IEntity owner)
Init the UI, runs 1x at the start of the game.
const string SIGNAL_SPEED
SignalsManagerComponent m_SignalsManager
const string SIGNAL_ALTITUDE