Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_VehicleAltitudeAGLCondition.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
5 {
6  protected const string ALTITUDE_AGL_SIGNAL = "altitudeAGL";
7 
8  [Attribute(defvalue: "3", desc: "Minimum altitude AGL\n[m]", params: "0 10000 0.1", precision: 1)]
9  protected float m_fAltitudeAGL;
10 
11  protected SignalsManagerComponent m_Signals;
12  protected int m_iAltitudeAGLID = -1;
13 
14  //------------------------------------------------------------------------------------------------
17  override bool IsAvailable(SCR_AvailableActionsConditionData data)
18  {
19  if (!data)
20  return false;
21 
22  SignalsManagerComponent signals = data.GetCurrentVehicleSignals();
23  if (!signals || m_Signals != signals)
24  {
25  m_Signals = signals;
26  m_iAltitudeAGLID = -1;
27  return false;
28  }
29 
30  if (m_iAltitudeAGLID == -1)
31  m_iAltitudeAGLID = signals.AddOrFindSignal(ALTITUDE_AGL_SIGNAL);
32 
33  float altitudeAGL;
34  if (m_iAltitudeAGLID != -1)
35  altitudeAGL = signals.GetSignalValue(m_iAltitudeAGLID);
36 
37  bool result = altitudeAGL >= m_fAltitudeAGL;
38  return GetReturnResult(result);
39  }
40 }
SCR_AvailableActionsConditionData
Definition: SCR_AvailableActionsConditionData.c:5
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_VehicleAltitudeAGLCondition
Returns true if current vehicle speed matches the condition.
Definition: SCR_VehicleAltitudeAGLCondition.c:4
SCR_AvailableActionCondition
A single available action condition representation.
Definition: SCR_AvailableActionsCondition.c:3
Attribute
typedef Attribute
Post-process effect of scripted camera.
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468