Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_HelicopterHoverAction.c
Go to the documentation of this file.
2 {
3  //------------------------------------------------------------------------------------------------
4  override void SetState(bool enable)
5  {
6  HelicopterControllerComponent helicopterControllerComponent = HelicopterControllerComponent.Cast(m_VehicleController);
7 
8  if (!helicopterControllerComponent)
9  return;
10 
11  helicopterControllerComponent.SetAutohoverEnabled(enable);
12 
13  SoundComponent soundComponent = SoundComponent.Cast(GetOwner().FindComponent(SoundComponent));
14  if (!soundComponent)
15  return;
16 
17  if (enable)
18  soundComponent.SoundEvent(SCR_SoundEvent.SOUND_AUTOHOVER_ON);
19  else
20  soundComponent.SoundEvent(SCR_SoundEvent.SOUND_AUTOHOVER_OFF);
21  }
22 
23  //------------------------------------------------------------------------------------------------
24  override bool GetState()
25  {
26  return HelicopterControllerComponent.Cast(m_VehicleController) && HelicopterControllerComponent.Cast(m_VehicleController).GetAutohoverEnabled();
27  }
28 };
SCR_VehicleActionBase
Definition: SCR_VehicleActionBase.c:1
SCR_SoundEvent
Definition: SCR_SoundEvent.c:1
SCR_HelicopterHoverAction
Definition: SCR_HelicopterHoverAction.c:1
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128