Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIGetCombatMoveRequestParameters.c
Go to the documentation of this file.
2 {
3  // Inputs
4  protected static const string PORT_REQUEST = "Request";
5 
6  protected static ref TStringArray s_aVarsIn = {
8  };
9  override TStringArray GetVariablesIn()
10  {
11  return s_aVarsIn;
12  }
13 
14  override bool VisibleInPalette() { return true; }
15 
16  override string GetOnHoverDescription() { return "Unpacks data from combat move request"; };
17 }
18 
19 
20 class SCR_AIGetCombatMoveRequestParameters_Move : SCR_AIGetCombatMoveRequestParametersBase
21 {
22  protected static const string PORT_TARGET_POS = "TargetPos";
23  protected static const string PORT_MOVE_POS = "MovePos";
24  protected static const string PORT_TRY_FIND_COVER = "TryFindCover";
25  protected static const string PORT_FAIL_IF_NO_COVER = "FailIfNoCover";
26  protected static const string PORT_STANCE_MOVING = "StanceMoving";
27  protected static const string PORT_STANCE_END = "StanceEnd";
28  protected static const string PORT_MOVEMENT_TYPE = "MovementType";
29  protected static const string PORT_DIRECTION = "CombatMoveDirection";
30  protected static const string PORT_AIM_AT_TARGET = "AimAtTarget";
31 
32  //---------------------------------------------------------------------------
33  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
34  {
36  GetVariableIn(PORT_REQUEST, rqBase);
38  if (!rq)
39  return SCR_AIErrorMessages.NodeErrorCombatMoveRequest(this, owner, rqBase);
40 
41  //SetVariableOut(PORT_TARGET_POS, rq.m_vTargetPos);
42  //SetVariableOut(PORT_MOVE_POS, rq.m_vMovePos);
43  SetVariableOut(PORT_TRY_FIND_COVER, rq.m_bTryFindCover);
44  SetVariableOut(PORT_FAIL_IF_NO_COVER, rq.m_bFailIfNoCover);
45  SetVariableOut(PORT_STANCE_MOVING, rq.m_eStanceMoving);
46  SetVariableOut(PORT_STANCE_END, rq.m_eStanceEnd);
47  SetVariableOut(PORT_MOVEMENT_TYPE, rq.m_eMovementType);
48  SetVariableOut(PORT_DIRECTION, rq.m_eDirection);
49  SetVariableOut(PORT_AIM_AT_TARGET, rq.m_bAimAtTarget);
50 
51  return ENodeResult.SUCCESS;
52  }
53 
54 
55  //---------------------------------------------------------------------------
56  protected static ref TStringArray s_aVarsOut = {
57  PORT_TRY_FIND_COVER,
58  PORT_FAIL_IF_NO_COVER,
59  PORT_STANCE_MOVING,
60  PORT_STANCE_END,
61  PORT_MOVEMENT_TYPE,
62  PORT_DIRECTION,
63  PORT_AIM_AT_TARGET
64  };
65  override TStringArray GetVariablesOut()
66  {
67  return s_aVarsOut;
68  }
69 }
70 
71 /*
72 class SCR_AIGetCombatMoveRequestParameters_Step : SCR_AIGetCombatMoveRequestParametersBase
73 {
74  protected static const string PORT_MOVEMENT_TYPE = "MovementType";
75 
76  //---------------------------------------------------------------------------
77  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
78  {
79  SCR_AICombatMoveRequestBase rqBase;
80  GetVariableIn(PORT_REQUEST, rqBase);
81  SCR_AICombatMoveRequest_Step rq = SCR_AICombatMoveRequest_Step.Cast(rqBase);
82  if (!rq)
83  return SCR_AIErrorMessages.NodeErrorCombatMoveRequest(this, owner, rqBase);
84 
85  SetVariableOut(PORT_MOVEMENT_TYPE, rq.m_eMovementType);
86 
87  return ENodeResult.SUCCESS;
88  }
89 
90 
91  //---------------------------------------------------------------------------
92  protected static ref TStringArray s_aVarsOut = {
93  PORT_MOVEMENT_TYPE
94  };
95  override TStringArray GetVariablesOut()
96  {
97  return s_aVarsOut;
98  }
99 }
100 */
101 
103 {
104  protected static const string PORT_EXPOSED_IN_COVER = "ExposedInCover";
105 
106  //---------------------------------------------------------------------------
107  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
108  {
110  GetVariableIn(PORT_REQUEST, rqBase);
112  if (!rq)
113  return SCR_AIErrorMessages.NodeErrorCombatMoveRequest(this, owner, rqBase);
114 
115  SetVariableOut(PORT_EXPOSED_IN_COVER, rq.m_bExposedInCover);
116 
117  return ENodeResult.SUCCESS;
118  }
119 
120  //---------------------------------------------------------------------------
121  protected static ref TStringArray s_aVarsOut = {
122  PORT_EXPOSED_IN_COVER
123  };
124  override TStringArray GetVariablesOut()
125  {
126  return s_aVarsOut;
127  }
128 }
129 
130 class SCR_AIGetCombatMoveRequestParameters_ChangeStance : SCR_AIGetCombatMoveRequestParametersBase
131 {
132  protected static const string PORT_STANCE = "Stance";
133 
134  //---------------------------------------------------------------------------
135  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
136  {
138  GetVariableIn(PORT_REQUEST, rqBase);
140  if (!rq)
141  return SCR_AIErrorMessages.NodeErrorCombatMoveRequest(this, owner, rqBase);
142 
143  SetVariableOut(PORT_STANCE, rq.m_eStance);
144 
145  return ENodeResult.SUCCESS;
146  }
147 
148  //---------------------------------------------------------------------------
149  protected static ref TStringArray s_aVarsOut = {
151  };
152  override TStringArray GetVariablesOut()
153  {
154  return s_aVarsOut;
155  }
156 }
GetVariablesOut
override TStringArray GetVariablesOut()
Definition: SCR_AIGetCombatMoveRequestParameters.c:65
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_AICombatMoveRequest_ChangeStanceInCover
Definition: SCR_AICombatMoveRequest.c:123
SCR_AIGetCombatMoveRequestParametersBase
Definition: SCR_AIGetCombatMoveRequestParameters.c:1
SCR_AIGetCombatMoveRequestParameters_ChangeStanceInCover
Definition: SCR_AIGetCombatMoveRequestParameters.c:102
PORT_TARGET_POS
SCR_AIGetCombatMoveRequestParametersBase PORT_TARGET_POS
PORT_STANCE
SCR_AIGetCombatMoveRequestParameters_ChangeStanceInCover PORT_STANCE
SCR_AIErrorMessages
Definition: NodeError.c:30
SCR_AICombatMoveRequest_ChangeStance
void SCR_AICombatMoveRequest_ChangeStance()
Definition: SCR_AICombatMoveRequest.c:138
SCR_AICombatMoveRequest_Move
Definition: SCR_AICombatMoveRequest.c:78
EOnTaskSimulate
override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
Definition: SCR_AIGetCombatMoveRequestParameters.c:33