Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SRC_AIDeploySmoke.c
Go to the documentation of this file.
1 class SCR_AIDeploySmokeCover : AITaskScripted
2 {
3  SCR_AIGroupUtilityComponent m_GroupUtilityComponent;
4 
5  //------------------------------------------------------------------------------------------------
6  override bool VisibleInPalette() {return true;}
7 
8  //------------------------------------------------------------------------------------------------
9  override void OnInit(AIAgent owner)
10  {
11  AIGroup group = AIGroup.Cast(owner);
12  if (group)
13  m_GroupUtilityComponent = SCR_AIGroupUtilityComponent.Cast(group.FindComponent(SCR_AIGroupUtilityComponent));
14  }
15 
16  //------------------------------------------------------------------------------------------------
17  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
18  {
19  if (!m_GroupUtilityComponent || !m_GroupUtilityComponent.m_aInfoComponents)
20  return ENodeResult.FAIL;
21 
22  SCR_AIActivityBase currentActivity = SCR_AIActivityBase.Cast(m_GroupUtilityComponent.GetCurrentAction());
23  if (!currentActivity)
24  return ENodeResult.FAIL;
25 
26  // Find smoke cover feature in current activity
28  currentActivity.FindActivityFeature(SCR_AIActivitySmokeCoverFeature));
29 
30  // Exit if smoke cover feature is not supported in current activity
31  if (!smokeCoverFeature)
32  return ENodeResult.FAIL;
33 
34  if (smokeCoverFeature.ExecuteForActivity(currentActivity))
35  return ENodeResult.SUCCESS;
36 
37  return ENodeResult.FAIL;
38  }
39 
40  //------------------------------------------------------------------------------------------------
41  override protected bool CanReturnRunning() { return false; }
42 
43  //------------------------------------------------------------------------------------------------
44  protected static ref TStringArray s_aVarsOut = {};
45  override TStringArray GetVariablesOut() { return s_aVarsOut; }
46 
47  //------------------------------------------------------------------------------------------------
48  protected static ref TStringArray s_aVarsIn = {};
49  override TStringArray GetVariablesIn() { return s_aVarsIn; }
50 
51  //------------------------------------------------------------------------------------------------
52  protected override string GetOnHoverDescription()
53  {
54  return "Getter returns group member available for specific role";
55  }
56 }
SCR_AIActivitySmokeCoverFeature
Definition: SCR_AIActivitySmokeCoverFeature.c:87
s_aVarsOut
SCR_AIPickupInventoryItemsBehavior s_aVarsOut
Definition: SCR_AIGetCombatMoveRequestParameters.c:149
SCR_AIActivityBase
Definition: SCR_AIActivity.c:1
SCR_AIDeploySmokeCover
Definition: SRC_AIDeploySmoke.c:1