Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIOrder.c
Go to the documentation of this file.
2 {
3  NONE,
12 };
13 
14 class SCR_AIOrderBase : AIOrder // MESSAGE_CLASS()
15 {
16  [Attribute("0", UIWidgets.ComboBox, "Type of event generating the order", "", ParamEnumArray.FromEnum(EOrderType_Character) )]
17  EOrderType_Character m_eUIType;
18 
19  EOrderType_Character m_eOrderType;
20  void GetOrderParameters(SCR_AIProcessOrder node);
21  void SetOrderParameters(SCR_AISendOrder node)
22  {
23  string orderDebugText;
24  if (!node.GetVariableIn(node.ORDER_DEBUG_TEXT, orderDebugText))
25  orderDebugText = node.m_string;
26  SetText(orderDebugText);
27  SetReceiver(node.m_Receiver);
28  }
29 
30  #ifdef AI_DEBUG
31  // The Behavior Tree which has sent this message
32  string m_sSentFromBt;
33  #endif
34 };
35 
36 class SCR_AIOrder_Stance : SCR_AIOrderBase // MESSAGE_CLASS(GenerateSendOrder, SCR_AISendOrder_Stance)
37 {
38  ECharacterStance m_eStance; // VARIABLE(NodePort, Stance, NodePropertyEnum, m_eStance)
39 
40  void SCR_AIOrder_Stance()
41  {
42  m_eOrderType = EOrderType_Character.STANCE;
43  }
44 
45  static SCR_AIOrder_Stance Create(ECharacterStance stance)
46  {
48  m.m_eStance = stance;
49  return m;
50  }
51 
52  override void GetOrderParameters(SCR_AIProcessOrder node)
53  {
54  node.SetVariableOut(node.ORDER_TYPE, EOrderType_Character.STANCE);
55  node.SetVariableOut(node.SCRIPTED_ORDER, true);
56  node.SetVariableOut(node.ORDER_VALUE, m_eStance);
57  if (node.m_bDebugMe)
58  node.m_sDebugString = "Stance "+ typename.EnumToString(ECharacterStance, m_eStance) + " by " + node.m_Order.GetText();
59  }
60 
61  override void SetOrderParameters(SCR_AISendOrder node)
62  {
63  super.SetOrderParameters(node);
64  if(!node.GetVariableIn(node.ORDER_VALUE, m_eStance))
65  m_eStance = node.m_integer;
66  }
67 };
68 
69 class SCR_AIOrder_WeaponRaised : SCR_AIOrderBase // MESSAGE_CLASS(GenerateSendOrder, SCR_AISendOrder_WeaponRaised)
70 {
71  bool m_bWeaponRaised; // VARIABLE(NodePort, WeaponRaised, NodeProperty, m_bWeaponRaised)
72 
74  {
75  m_eOrderType = EOrderType_Character.WEAPON_RAISED;
76  }
77 
78  override void GetOrderParameters(SCR_AIProcessOrder node)
79  {
80  int iWeaponRaised = m_bWeaponRaised;
81  node.SetVariableOut(node.ORDER_TYPE, EOrderType_Character.WEAPON_RAISED);
82  node.SetVariableOut(node.SCRIPTED_ORDER, true);
83  node.SetVariableOut(node.ORDER_VALUE, iWeaponRaised);
84  if (node.m_bDebugMe)
85  node.m_sDebugString = "Weapon raised "+ m_bWeaponRaised.ToString() + " by " + node.m_Order.GetText();
86  }
87 
88  override void SetOrderParameters(SCR_AISendOrder node)
89  {
90  super.SetOrderParameters(node);
91  if(!node.GetVariableIn(node.ORDER_VALUE, m_bWeaponRaised))
92  m_bWeaponRaised = node.m_integer;
93  }
94 };
95 
96 class SCR_AIOrder_MovementType : SCR_AIOrderBase // MESSAGE_CLASS(GenerateSendOrder, SCR_AISendOrder_MovementType)
97 {
98  EMovementType m_eMovementType; // VARIABLE(NodePort, MovementType, NodePropertyEnum, m_eMovementType)
99 
101  {
102  m_eOrderType = EOrderType_Character.MOVEMENT_TYPE;
103  }
104 
105  override void GetOrderParameters(SCR_AIProcessOrder node)
106  {
107  node.SetVariableOut(node.ORDER_TYPE, EOrderType_Character.MOVEMENT_TYPE);
108  node.SetVariableOut(node.SCRIPTED_ORDER, true);
109  node.SetVariableOut(node.ORDER_VALUE, m_eMovementType);
110  if (node.m_bDebugMe)
111  node.m_sDebugString = "MovementType "+ typename.EnumToString(EMovementType, m_eMovementType) + " by " + node.m_Order.GetText();
112  }
113 
114  override void SetOrderParameters(SCR_AISendOrder node)
115  {
116  super.SetOrderParameters(node);
117  if(!node.GetVariableIn(node.ORDER_VALUE, m_eMovementType))
118  m_eMovementType = node.m_integer;
119  }
120 };
121 
122 class SCR_AIOrder_ReturnToDefault : SCR_AIOrderBase // MESSAGE_CLASS(GenerateSendOrder, SCR_AISendOrder_ReturnToDefault)
123 {
125  {
126  m_eOrderType = EOrderType_Character.BACK_TO_DEFAULT;
127  }
128 
129  override void GetOrderParameters(SCR_AIProcessOrder node)
130  {
131  node.SetVariableOut(node.ORDER_TYPE, EOrderType_Character.BACK_TO_DEFAULT);
132  node.SetVariableOut(node.SCRIPTED_ORDER, true);
133  if (node.m_bDebugMe)
134  node.m_sDebugString = "Default set ";
135  }
136 };
137 
138 class SCR_AIOrder_WeaponType : SCR_AIOrderBase // MESSAGE_CLASS(GenerateSendOrder, SCR_AISendOrder_WeaponType)
139 {
140  EWeaponType m_eWeaponType; // VARIABLE(NodePort, WeaponType, NodePropertyEnum, m_eWeaponType)
141 
143  {
144  m_eOrderType = EOrderType_Character.WEAPON_TYPE;
145  }
146 
147  override void GetOrderParameters(SCR_AIProcessOrder node)
148  {
149  node.SetVariableOut(node.ORDER_TYPE, EOrderType_Character.WEAPON_TYPE);
150  node.SetVariableOut(node.SCRIPTED_ORDER, true);
151  node.SetVariableOut(node.ORDER_VALUE, m_eWeaponType);
152  if (node.m_bDebugMe)
153  node.m_sDebugString = "Weapon type "+ typename.EnumToString(EWeaponType, m_eWeaponType) + " by " + node.m_Order.GetText();
154  }
155 
156  override void SetOrderParameters(SCR_AISendOrder node)
157  {
158  super.SetOrderParameters(node);
159  if(!node.GetVariableIn(node.ORDER_VALUE, m_eWeaponType))
160  m_eWeaponType = node.m_integer;
161  }
162 };
163 
164 class SCR_AIOrder_AIState : SCR_AIOrderBase // MESSAGE_CLASS(GenerateSendOrder, SCR_AISendOrder_AIState)
165 {
166  EUnitAIState m_eAIState; // VARIABLE(NodePort, AIState, NodePropertyEnum, m_eAIState)
167 
168  void SCR_AIOrder_AIState()
169  {
170  m_eOrderType = EOrderType_Character.AI_STATE;
171  }
172 
173  override void GetOrderParameters(SCR_AIProcessOrder node)
174  {
175  node.SetVariableOut(node.ORDER_TYPE, EOrderType_Character.AI_STATE);
176  node.SetVariableOut(node.SCRIPTED_ORDER, true);
177  node.SetVariableOut(node.ORDER_VALUE, m_eAIState);
178  if (node.m_bDebugMe)
179  node.m_sDebugString = "AI State "+ typename.EnumToString(EUnitAIState, m_eAIState) + " by " + node.m_Order.GetText();
180  }
181 
182  override void SetOrderParameters(SCR_AISendOrder node)
183  {
184  super.SetOrderParameters(node);
185  if(!node.GetVariableIn(node.ORDER_VALUE, m_eAIState))
186  m_eAIState = node.m_integer;
187  }
188 };
189 
190 class SCR_AIOrder_Unit_State : SCR_AIOrderBase // MESSAGE_CLASS(GenerateSendOrder, SCR_AISendOrder_UnitState)
191 {
192  EUnitState m_eUnitState; // VARIABLE(NodePort, UnitState, NodePropertyEnum, m_eUnitState)
193 
194  void SCR_AIOrder_State()
195  {
196  m_eOrderType = EOrderType_Character.UNIT_STATE;
197  }
198 
199  override void GetOrderParameters(SCR_AIProcessOrder node)
200  {
201  node.SetVariableOut(node.ORDER_TYPE, EOrderType_Character.UNIT_STATE);
202  node.SetVariableOut(node.SCRIPTED_ORDER, true);
203  node.SetVariableOut(node.ORDER_VALUE, m_eUnitState);
204  if (node.m_bDebugMe)
205  node.m_sDebugString = "State change "+ typename.EnumToString(EUnitState, m_eUnitState) + " by " + node.m_Order.GetText();
206  }
207 
208  override void SetOrderParameters(SCR_AISendOrder node)
209  {
210  super.SetOrderParameters(node);
211  if(!node.GetVariableIn(node.ORDER_VALUE, m_eUnitState))
212  m_eUnitState = node.m_integer;
213  }
214 };
215 
216 class SCR_AIOrder_CombatType : SCR_AIOrderBase // MESSAGE_CLASS(GenerateSendOrder, SCR_AISendOrder_CombatType)
217 {
218  EAICombatType m_eCombatType; // VARIABLE(NodePort, CombatType, NodePropertyEnum, m_eCombatType)
219 
221  {
222  m_eOrderType = EOrderType_Character.COMBAT_TYPE;
223  }
224 
225  override void GetOrderParameters(SCR_AIProcessOrder node)
226  {
227  node.SetVariableOut(node.ORDER_TYPE, EOrderType_Character.COMBAT_TYPE);
228  node.SetVariableOut(node.SCRIPTED_ORDER, true);
229  node.SetVariableOut(node.ORDER_VALUE, m_eCombatType);
230  if (node.m_bDebugMe)
231  node.m_sDebugString = "Combat type "+ typename.EnumToString(EAICombatType, m_eCombatType) + " by " + node.m_Order.GetText();
232  }
233 
234  override void SetOrderParameters(SCR_AISendOrder node)
235  {
236  super.SetOrderParameters(node);
237  if(!node.GetVariableIn(node.ORDER_VALUE, m_eCombatType))
238  m_eCombatType = node.m_integer;
239  }
240 };
WEAPON_TYPE
@ WEAPON_TYPE
Definition: SCR_AIOrder.c:8
SCR_AIOrderBase
Definition: SCR_AIOrder.c:14
SCR_AIOrder_Stance
Definition: SCR_AIOrder.c:36
SCR_AIOrder_Unit_State
Definition: SCR_AIOrder.c:190
SCR_AIProcessOrder
Definition: SCR_AIProcessOrder.c:1
SCR_AIOrder_MovementType
Definition: SCR_AIOrder.c:96
SCR_AIOrder_CombatType
Definition: SCR_AIOrder.c:216
EOrderType_Character
EOrderType_Character
Definition: SCR_AIOrder.c:1
EMovementType
EMovementType
Definition: EMovementType.c:12
ECharacterStance
ECharacterStance
Definition: ECharacterStance.c:12
AI_STATE
@ AI_STATE
Definition: SCR_AIOrder.c:9
NONE
@ NONE
Definition: SCR_AIOrder.c:3
SCR_AISendOrder
Definition: SCR_AISendOrder.c:2
SCR_AIOrder_ReturnToDefault
Definition: SCR_AIOrder.c:122
WEAPON_RAISED
@ WEAPON_RAISED
Definition: SCR_AIOrder.c:5
UNIT_STATE
@ UNIT_STATE
Definition: SCR_AIOrder.c:10
MOVEMENT_TYPE
@ MOVEMENT_TYPE
Definition: SCR_AIOrder.c:6
SCR_AIOrder_WeaponType
Definition: SCR_AIOrder.c:138
m_eStance
SCR_AICombatMoveRequest_ChangeStanceInCover m_eStance
Attribute
typedef Attribute
Post-process effect of scripted camera.
m_eUnitState
EUnitState m_eUnitState
Definition: SendOrder.c:221
m_eMovementType
EMovementType m_eMovementType
Definition: SCR_AICombatMoveRequest.c:84
m_eWeaponType
EWeaponType m_eWeaponType
Definition: SendOrder.c:143
STANCE
@ STANCE
Definition: SCR_AIOrder.c:4
SCR_AIOrder_WeaponRaised
Definition: SCR_AIOrder.c:69
BACK_TO_DEFAULT
@ BACK_TO_DEFAULT
Definition: SCR_AIOrder.c:7
EWeaponType
EWeaponType
Definition: EWeaponType.c:12
COMBAT_TYPE
@ COMBAT_TYPE
Definition: SCR_AIOrder.c:11
SCR_AIOrder_AIState
Definition: SCR_AIOrder.c:164