Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIWaitCombatMoveRequest.c
Go to the documentation of this file.
1 class SCR_AIWaitCombatMoveRequest : AITaskScripted
2 {
3  protected static const string PORT_REQUEST = "Request";
4 
5  protected SCR_AIUtilityComponent m_UtilityComp;
6 
7  protected ref SCR_AICombatMoveRequestBase m_CurrentRequest; // Ref ptr to current request we are processing
8 
9  //--------------------------------------------------------------------------------------------
10  override void OnInit(AIAgent owner)
11  {
12  m_UtilityComp = SCR_AIUtilityComponent.Cast(owner.FindComponent(SCR_AIUtilityComponent));
13  }
14 
15  //------------------------------------------------------------------------
16  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
17  {
18  if (!m_UtilityComp)
19  return ENodeResult.FAIL;
20 
21  SCR_AICombatMoveRequestBase rq = m_UtilityComp.m_CombatMoveState.GetRequest();
22  if (!rq || rq == m_CurrentRequest)
23  return ENodeResult.RUNNING;
24 
25  m_CurrentRequest = rq;
26 
27  // Expose request to port
28  SetVariableOut(PORT_REQUEST, m_CurrentRequest);
29 
30  return ENodeResult.SUCCESS;
31  }
32 
33 
34 
35  //------------------------------------------------------------------------
36  static ref TStringArray s_aVarsOut =
37  {
39  };
40  override TStringArray GetVariablesOut() { return s_aVarsOut; }
41 
42  override bool CanReturnRunning() { return true; }
43 
44  override bool VisibleInPalette() { return true; }
45 }
SCR_AICombatMoveRequestBase
Definition: SCR_AICombatMoveRequest.c:37
s_aVarsOut
SCR_AIPickupInventoryItemsBehavior s_aVarsOut
Definition: SCR_AIGetCombatMoveRequestParameters.c:149
PORT_REQUEST
SCR_AISetCombatMoveRequestState PORT_REQUEST
SCR_AIWaitCombatMoveRequest
Definition: SCR_AIWaitCombatMoveRequest.c:1