Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIGetCombatMoveState.c
Go to the documentation of this file.
1 class SCR_AIGetCombatMoveState : AITaskScripted
2 {
3  // Inputs
4  protected static const string PORT_IN_COVER = "InCover";
5  protected static const string PORT_COVER_LOCK = "CoverLock";
6 
7  protected SCR_AICombatMoveState m_State;
8 
9  //--------------------------------------------------------------------------------------------
10  override void OnInit(AIAgent owner)
11  {
12  SCR_AIUtilityComponent utilityComp = SCR_AIUtilityComponent.Cast(owner.FindComponent(SCR_AIUtilityComponent));
13  if (utilityComp)
14  m_State = utilityComp.m_CombatMoveState;
15  }
16 
17  //--------------------------------------------------------------------------------------------
18  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
19  {
20  if (!m_State)
21  return ENodeResult.FAIL;
22 
23  SetVariableOut(PORT_IN_COVER, m_State.m_bInCover);
24  SetVariableOut(PORT_COVER_LOCK, m_State.GetAssignedCover());
25 
26  return ENodeResult.SUCCESS;
27  }
28 
29  //--------------------------------------------------------------------------------------------
30  protected static ref TStringArray s_aVarsOut = {
31  PORT_IN_COVER,
32  PORT_COVER_LOCK
33  };
34  override TStringArray GetVariablesOut() { return s_aVarsOut; }
35 
36  override bool VisibleInPalette() { return true; }
37 }
s_aVarsOut
SCR_AIPickupInventoryItemsBehavior s_aVarsOut
Definition: SCR_AIGetCombatMoveRequestParameters.c:149
SCR_AIGetCombatMoveState
Definition: SCR_AIGetCombatMoveState.c:1
m_State
private EEditableEntityState m_State
Definition: SCR_BaseEntitiesEditorUIEffect.c:3