Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIMessage.c
Go to the documentation of this file.
2 {
3  NONE,
11  ACTION_FAILED, // Reaction is not implemented
13 };
14 
16 {
17  NONE,
37  SIT_REP,
41 };
42 
43 //----------------- EXPAND MESSAGE TYPES
44 class SCR_AIMessageBase : AIMessage
45 {
46  int m_MessageType; // here is kept enum for message type, which enum it is depends on IsInherited()
47 
48  #ifdef AI_DEBUG
49  // The Behavior Tree which has sent this message
50  string m_sSentFromBt;
51  #endif
52 
53  void SetMessageParameters(SCR_AISendMessageBase node) // this method fills an existing message with content
54  {
55  string debugText;
56  if (!node.GetVariableIn(node.PORT_STRING,debugText))
57  debugText = node.m_string;
58  SetText(debugText);
59  SetReceiver(node.m_Receiver);
60  }
61 
62  string GetDebugText()
63  {
64  return string.Format("\t%1", this);
65  }
66 };
67 
68 //---------------------------------------------------------------------------------------------------
69 class SCR_AIMessageGoal : SCR_AIMessageBase // MESSAGE_CLASS()
70 {
71  [Attribute("0", UIWidgets.ComboBox, "Type of event generating the message", "", ParamEnumArray.FromEnum(EMessageType_Goal) )]
72  EMessageType_Goal m_eUIType;
73 
74  ref SCR_AIActivityBase m_RelatedGroupActivity;
75  float m_fPriorityLevel; // VARIABLE(NodePort, PriorityLevel, NodeProperty, m_fPriorityLevel)
76  bool m_bIsWaypointRelated; // VARIABLE(NodePort, IsWaypointRelated, NodeProperty, m_bIsWaypointRelated)
77  AIWaypoint m_RelatedWaypoint;
78 
79  void SetMessageParameters(SCR_AISendGoalMessage node, SCR_AIActivityBase relatedActivity)
80  {
81  super.SetMessageParameters(node);
82  m_RelatedGroupActivity = relatedActivity;
83  if (!node.GetVariableIn(node.PORT_PRIORITY_LEVEL, m_fPriorityLevel))
84  m_fPriorityLevel = node.m_fPriorityLevel;
85  m_bIsWaypointRelated = node.m_bIsWaypointRelated;
86  }
87 
88  override string GetDebugText()
89  {
90  return super.GetDebugText() + string.Format("\tType: %1\n", typename.EnumToString(EMessageType_Goal, m_eUIType));
91  }
92 };
93 
94 //---------------------------------------------------------------------------------------------------
95 class SCR_AIMessageInfo : SCR_AIMessageBase // MESSAGE_CLASS()
96 {
97  [Attribute("0", UIWidgets.ComboBox, "Type of event generating the message", "", ParamEnumArray.FromEnum(EMessageType_Info) )]
98  EMessageType_Info m_eUIType;
99 
100  override string GetDebugText()
101  {
102  return super.GetDebugText() + string.Format("\tType: %1\n", typename.EnumToString(EMessageType_Info, m_eUIType));
103  }
104 };
105 
106 //----------------- EXPAND MESSAGE SUBTYPES - info type for relaying information
107 
108 class SCR_AIMessage_Target : SCR_AIMessageInfo // MESSAGE_CLASS(GenerateSendInfoMessage, SCR_AISendInfoMessage_Target)
109 {
110  ref SCR_AITargetInfo m_TargetInfo; // VARIABLE(NodePort, TargetInfo)
111 
112  override void SetMessageParameters(SCR_AISendMessageBase node)
113  {
114  super.SetMessageParameters(node);
115 
116  SCR_AISendMessageGeneric genericNode = SCR_AISendMessageGeneric.Cast(node);
117 
118  IEntity targetEntity;
119  vector pos;
120  float time;
121 
122  genericNode.GetVariableIn(genericNode.PORT_ENTITY, targetEntity);
123  if (!genericNode.GetVariableIn(genericNode.PORT_VECTOR, pos))
124  pos = genericNode.m_vector;
125  genericNode.GetVariableIn(genericNode.PORT_FLOAT, time);
126  m_TargetInfo = new SCR_AITargetInfo();
127  m_TargetInfo.Init(targetEntity, worldPos: pos, timestamp: time);
128  }
129 };
130 
131 class SCR_AIMessage_NoAmmo : SCR_AIMessageInfo // MESSAGE_CLASS(GenerateSendInfoMessage, SCR_AISendInfoMessage_NoAmmo)
132 {
133  IEntity m_entityToSupply; // VARIABLE(NodePort, EntityToSupply)
134  typename m_MagazineWell; // VARIABLE(NodePort, MagazineWellType)
135 
136  void SCR_AIMessage_NoAmmo()
137  {
138  m_MessageType = EMessageType_Info.NO_AMMO;
139  }
140 
141  override void SetMessageParameters(SCR_AISendMessageBase node)
142  {
143  super.SetMessageParameters(node);
144 
145  SCR_AISendMessageGeneric genericNode = SCR_AISendMessageGeneric.Cast(node);
146 
147  genericNode.GetVariableIn(genericNode.PORT_ENTITY, m_entityToSupply);
148  genericNode.GetVariableIn(genericNode.PORT_TYPENAME, m_MagazineWell);
149  }
150 
151  static SCR_AIMessage_NoAmmo Create(IEntity entityToResupply, typename magazineWell)
152  {
154 
155  msg.m_entityToSupply = entityToResupply;
156  msg.m_MagazineWell = magazineWell;
157 
158  return msg;
159  }
160 };
161 
162 class SCR_AIMessage_UnderFire : SCR_AIMessageInfo // MESSAGE_CLASS(GenerateSendInfoMessage, SCR_AISendInfoMessage_UnderFire)
163 {
164  vector m_vPosition; // VARIABLE(NodePort, Position)
165 
167  {
168  m_MessageType = EMessageType_Info.UNDER_FIRE;
169  }
170 
171  override void SetMessageParameters(SCR_AISendMessageBase node)
172  {
173  super.SetMessageParameters(node);
174 
175  SCR_AISendMessageGeneric genericNode = SCR_AISendMessageGeneric.Cast(node);
176 
177  if (!genericNode.GetVariableIn(genericNode.PORT_VECTOR, m_vPosition))
178  m_vPosition = genericNode.m_vector;
179  }
180 };
181 
182 class SCR_AIMessage_FoundCorpse : SCR_AIMessageInfo // MESSAGE_CLASS(GenerateSendInfoMessage, SCR_AISendInfoMessage_FoundCorpse)
183 {
184  vector m_vPosition; // VARIABLE(NodePort, Position)
185 
187  {
188  m_MessageType = EMessageType_Info.FOUND_CORPSE;
189  }
190 
191  override void SetMessageParameters(SCR_AISendMessageBase node)
192  {
193  super.SetMessageParameters(node);
194 
195  SCR_AISendMessageGeneric genericNode = SCR_AISendMessageGeneric.Cast(node);
196 
197  if (!genericNode.GetVariableIn(genericNode.PORT_VECTOR, m_vPosition))
198  m_vPosition = genericNode.m_vector;
199  }
200 };
201 
202 class SCR_AIMessage_Wounded : SCR_AIMessage_FoundCorpse // MESSAGE_CLASS(GenerateSendInfoMessage, SCR_AISendInfoMessage_Wounded)
203 {
204  IEntity m_WoundedEntity; // VARIABLE(NodePort, WoundedEntity)
205 
206  void SCR_AIMessage_Wounded()
207  {
208  m_MessageType = EMessageType_Info.WOUNDED;
209  }
210 
211  static SCR_AIMessage_Wounded Create(IEntity woundedEntity)
212  {
214  m.m_WoundedEntity = woundedEntity;
215  return m;
216  }
217 
218  override void SetMessageParameters(SCR_AISendMessageBase node)
219  {
220  super.SetMessageParameters(node);
221 
222  SCR_AISendMessageGeneric genericNode = SCR_AISendMessageGeneric.Cast(node);
223 
224  genericNode.GetVariableIn(genericNode.PORT_ENTITY, m_WoundedEntity);
225  if (!genericNode.GetVariableIn(genericNode.PORT_VECTOR, m_vPosition))
226  m_vPosition = genericNode.m_vector;
227  }
228 };
229 
230 class SCR_AIMessage_SitRep : SCR_AIMessageInfo // MESSAGE_CLASS(GenerateSendInfoMessage, SCR_AISendInfoMessage_SitRep)
231 {
232  int m_MagazinesCount,m_BandagesCount;
233 
234  void SCR_AIMessage_SitRep()
235  {
236  m_MessageType = EMessageType_Info.SIT_REP;
237  }
238 };
239 
241 {
242  // The action which we have failed
243  typename m_ActionTypename;
244 
246  {
247  m_MessageType = EMessageType_Info.ACTION_FAILED;
248  }
249 };
250 
251 class SCR_AIMessage_HealFailed : SCR_AIMessageInfo // MESSAGE_CLASS(GenerateSendInfoMessage, SCR_AISendInfoMessage_HealFailed)
252 {
253  IEntity m_TargetEntity; // VARIABLE(NodePort, TargetEntity)
254 
256  {
257  m_MessageType = EMessageType_Info.HEAL_FAILED;
258  }
259 };
260 
261 //----------------- EXPAND MESSAGE SUBTYPES - goal type for issuing commands
262 
263 class SCR_AIMessage_Cancel : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_Cancel)
264 {
265  void SCR_AIMessage_Cancel()
266  {
267  m_MessageType = EMessageType_Goal.CANCEL;
268  }
269 
270  static SCR_AIMessage_Cancel Create(SCR_AIActivityBase relatedActivity)
271  {
273  msg.m_RelatedGroupActivity = relatedActivity;
274 
275  return msg;
276  }
277 };
278 
279 class SCR_AIMessage_Attack : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_Attack)
280 {
281  ref SCR_AITargetInfo m_TargetInfo; // VARIABLE(NodePort, TargetInfo)
282 
283  void SCR_AIMessage_Attack()
284  {
285  m_MessageType = EMessageType_Goal.ATTACK;
286  }
287 
288  override void SetMessageParameters(SCR_AISendGoalMessage node, SCR_AIActivityBase relatedActivity)
289  {
290  super.SetMessageParameters(node,relatedActivity);
291 
292  IEntity targetEntity;
293  vector pos;
294  float time;
295 
296  node.GetVariableIn(node.PORT_ENTITY, targetEntity);
297  if (!node.GetVariableIn(node.PORT_VECTOR, pos))
298  pos = node.m_vector;
299  node.GetVariableIn(node.PORT_FLOAT, time);
300  m_TargetInfo = new SCR_AITargetInfo();
301  m_TargetInfo.Init(targetEntity, worldPos: pos, timestamp: time);
302  }
303 };
304 
305 class SCR_AIMessage_AttackCluster : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_AttackCluster)
306 {
307  SCR_AITargetClusterState m_TargetClusterState; // VARIABLE(NodePort, TargetClusterState)
308  bool m_bAllowInvestigate; // VARIABLE(NodePort, AllowInvestigate)
309 
311  {
312  m_MessageType = EMessageType_Goal.ATTACK_CLUSTER;
313  }
314 
315  static SCR_AIMessage_AttackCluster Create(SCR_AITargetClusterState s, bool allowInvestigate)
316  {
318  msg.m_TargetClusterState = s;
319  msg.m_bAllowInvestigate = allowInvestigate;
320  return msg;
321  }
322 }
323 
324 class SCR_AIMessage_AttackClusterDone : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_AttackClusterDone)
325 {
327  {
328  m_MessageType = EMessageType_Goal.ATTACK_CLUSTER_DONE;
329  }
330 
331  static SCR_AIMessage_AttackClusterDone Create()
332  {
334  return msg;
335  }
336 }
337 
339 {
341  {
342  m_MessageType = EMessageType_Goal.COVER_CLUSTER;
343  }
344 }
345 
346 class SCR_AIMessage_KeepFormation : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_KeepFormation)
347 {
349  {
350  m_MessageType = EMessageType_Goal.MOVE_IN_FORMATION;
351  }
352 };
353 
354 class SCR_AIMessage_Move : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_Move)
355 {
356  IEntity m_FollowEntity; // VARIABLE(NodePort, FollowEntity)
357  vector m_MovePosition; // VARIABLE(NodePort, MovePosition)
358  EMovementType m_eMovementType; // VARIABLE(NodePropertyEnum, m_eMovementType)
359  bool m_bUseVehicles; // VARIABLE(NodePort, UseVehicles, NodeProperty, m_bUseVehicles)
360 
361  void SCR_AIMessage_Move()
362  {
363  m_MessageType = EMessageType_Goal.MOVE;
364  }
365 
366  override void SetMessageParameters(SCR_AISendGoalMessage node, SCR_AIActivityBase relatedActivity)
367  {
368  super.SetMessageParameters(node, relatedActivity);
369  node.GetVariableIn(node.PORT_ENTITY, m_FollowEntity);
370  if (!node.GetVariableIn(node.PORT_VECTOR, m_MovePosition))
371  m_MovePosition = node.m_vector;
372  if (!node.GetVariableIn(node.PORT_BOOL, m_bUseVehicles))
373  m_bUseVehicles = node.m_bool;
374  if (!node.GetVariableIn(node.PORT_PRIORITY_LEVEL,m_fPriorityLevel))
375  m_fPriorityLevel = SCR_AISendGoalMessage.Cast(node).m_fPriorityLevel;
376  }
377 };
378 
379 class SCR_AIMessage_Follow : SCR_AIMessage_Move // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_Follow)
380 {
381  float m_fDistance; // VARIABLE(NodePort, Distance)
382 
383  void SCR_AIMessage_Follow()
384  {
385  m_MessageType = EMessageType_Goal.FOLLOW;
386  }
387 
388  override void SetMessageParameters(SCR_AISendGoalMessage node, SCR_AIActivityBase relatedActivity)
389  {
390  super.SetMessageParameters(node, relatedActivity);
391  node.GetVariableIn(node.PORT_ENTITY, m_FollowEntity);
392  node.GetVariableIn(node.PORT_FLOAT, m_fDistance);
393  if (!node.GetVariableIn(node.PORT_BOOL, m_bUseVehicles))
394  m_bUseVehicles = node.m_bool;
395  if (!node.GetVariableIn(node.PORT_PRIORITY_LEVEL,m_fPriorityLevel))
396  m_fPriorityLevel = SCR_AISendGoalMessage.Cast(node).m_fPriorityLevel;
397  }
398 };
399 
400 class SCR_AIMessage_Investigate : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_Investigate)
401 {
402  IEntity m_ObjectEntity; // VARIABLE(NodePort, ObjectEntity)
403  vector m_vMovePosition; // VARIABLE(NodePort, MovePosition)
404  float m_fRadius; // VARIABLE(NodePort, Radius, NodeProperty, m_fRadius)
405  bool m_bIsDangerous; // VARIABLE(NodePort, IsDangerous, NodeProperty, m_bIsDangerous)
406  EAIUnitType m_eTargetUnitType = EAIUnitType.UnitType_Infantry; // VARIABLE(NodePropertyEnum, m_eTargetUnitType)
407  float m_fDuration = 10; // VARIABLE(NodePort, Duration, NodeProperty, m_fDuration)
408 
410  {
411  m_MessageType = EMessageType_Goal.INVESTIGATE;
412  }
413 
414  static SCR_AIMessage_Investigate Create(vector pos, float radius, bool dangerous, EAIUnitType unitType = EAIUnitType.UnitType_Infantry, float duration = 10.0)
415  {
417  msg.m_fRadius = radius;
418  msg.m_vMovePosition = pos;
419  msg.m_bIsDangerous = dangerous;
420  msg.m_eTargetUnitType = unitType;
421  msg.m_fDuration = duration;
422  return msg;
423  }
424 
425  override void SetMessageParameters(SCR_AISendGoalMessage node, SCR_AIActivityBase relatedActivity)
426  {
427  super.SetMessageParameters(node, relatedActivity);
428  node.GetVariableIn(node.PORT_ENTITY, m_ObjectEntity);
429  node.GetVariableIn(node.PORT_VECTOR, m_vMovePosition);
430  if (!node.GetVariableIn(node.PORT_FLOAT, m_fRadius))
431  m_fRadius = 10.0;
432  if (!node.GetVariableIn(node.PORT_BOOL, m_bIsDangerous))
433  m_bIsDangerous = false;
434  if (!node.GetVariableIn(node.PORT_PRIORITY_LEVEL,m_fPriorityLevel))
435  m_fPriorityLevel = SCR_AISendGoalMessage.Cast(node).m_fPriorityLevel;
436  }
437 };
438 
439 class SCR_AIMessage_SeekAndDestroy : SCR_AIMessage_Move // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_SeekAndDestroy)
440 {
442  {
443  m_MessageType = EMessageType_Goal.SEEK_DESTROY;
444  }
445 };
446 
447 class SCR_AIMessage_Heal : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_Heal)
448 {
449  IEntity m_EntityToHeal; // VARIABLE(NodePort, EntityToHeal)
450 
451  void SCR_AIMessage_Heal()
452  {
453  m_MessageType = EMessageType_Goal.HEAL;
454  }
455 };
456 
457 class SCR_AIMessage_ProvideAmmo : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_ProvideAmmo)
458 {
459  IEntity m_AmmoConsumer; // VARIABLE(NodePort, AmmoConsumerEntity)
460  typename m_MagazineWell; // VARIABLE(NodePort, MagazineWellType)
461 
463  {
464  m_MessageType = EMessageType_Goal.PROVIDE_AMMO;
465  }
466 
467  override void SetMessageParameters(SCR_AISendGoalMessage node, SCR_AIActivityBase relatedActivity)
468  {
469  super.SetMessageParameters(node, relatedActivity);
470  node.GetVariableIn(SCR_AISendGoalMessage.PORT_ENTITY, m_AmmoConsumer);
471  node.GetVariableIn(SCR_AISendGoalMessage.PORT_TYPENAME, m_MagazineWell);
472  }
473 }
474 
475 class SCR_AIMessage_PickupInventoryItems : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_PickupInventoryItems)
476 {
477  vector m_vPickupPosition; // VARIABLE(NodePort, PickupPosition)
478  typename m_MagazineWellType; // VARIABLE(NodePort, MagazineWellType)
479 
481  {
482  m_MessageType = EMessageType_Goal.PICKUP_INVENTORY_ITEMS;
483  }
484 
485  override void SetMessageParameters(SCR_AISendGoalMessage node, SCR_AIActivityBase relatedActivity)
486  {
487  super.SetMessageParameters(node, relatedActivity);
488  node.GetVariableIn(SCR_AISendGoalMessage.PORT_VECTOR, m_vPickupPosition);
489  node.GetVariableIn(SCR_AISendGoalMessage.PORT_TYPENAME, m_MagazineWellType);
490  }
491 }
492 
493 class SCR_AIMessage_Defend : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_Defend)
494 {
495  vector m_vDefendLocation; // VARIABLE(NodePort, DefendLocation)
496  float m_fDefendAngularRange; // VARIABLE(NodePort, DefendAngularRange, NodeProperty, m_fDefendAngularRange)
497 
498  void SCR_AIMessage_Defend()
499  {
500  m_MessageType = EMessageType_Goal.DEFEND;
501  }
502 
503  override void SetMessageParameters(SCR_AISendGoalMessage node, SCR_AIActivityBase relatedActivity)
504  {
505  super.SetMessageParameters(node, relatedActivity);
506  node.GetVariableIn(node.PORT_ENTITY, m_RelatedWaypoint);
507  }
508 };
509 
510 class SCR_AIMessage_Retreat : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_Retreat)
511 {
512  void SCR_AIMessage_Retreat()
513  {
514  m_MessageType = EMessageType_Goal.RETREAT;
515  }
516 };
517 
518 class SCR_AIMessage_HealWait : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_HealWait)
519 {
520  IEntity m_HealProvider; // VARIABLE(NodePort, HealProviderEntity)
521 
523  {
524  m_MessageType = EMessageType_Goal.HEAL_WAIT;
525  }
526 
527  override void SetMessageParameters(SCR_AISendGoalMessage node, SCR_AIActivityBase relatedActivity)
528  {
529  super.SetMessageParameters(node, relatedActivity);
530  node.GetVariableIn(node.PORT_ENTITY, m_HealProvider);
531  }
532 };
533 
534 class SCR_AIMessage_PerformAction : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_PerformAction)
535 {
536  SCR_AISmartActionComponent m_SmartActionComponent; // VARIABLE(NodePort, SmartAction)
537  IEntity m_SmartActionEntity; // VARIABLE(NodePort, SmartActionEntity)
538  string m_SmartActionTag; // VARIABLE(NodePort, SmartActionTag, NodeProperty, m_sSmartActionTag)
539 
541  {
542  m_MessageType = EMessageType_Goal.PERFORM_ACTION;
543  }
544 
545  override void SetMessageParameters(SCR_AISendGoalMessage node, SCR_AIActivityBase relatedActivity)
546  {
547  super.SetMessageParameters(node, relatedActivity);
548  node.GetVariableIn(node.PORT_ENTITY, m_SmartActionEntity);
549  node.GetVariableIn(node.PORT_STRING, m_SmartActionTag);
550  }
551 };
552 
553 class SCR_AIMessage_Vehicle : SCR_AIMessageGoal // MESSAGE_CLASS()
554 {
555  IEntity m_Vehicle; // VARIABLE(NodePort, VehicleEntity)
556 };
557 
558 class SCR_AIMessage_GetIn : SCR_AIMessage_Vehicle // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_GetIn)
559 {
560  EAICompartmentType m_eRoleInVehicle; // VARIABLE(NodePort, RoleInVehicle, NodePropertyEnum, m_eRoleInVehicle)
561 
562  void SCR_AIMessage_GetIn()
563  {
564  m_MessageType = EMessageType_Goal.GET_IN_VEHICLE;
565  }
566 
567  override void SetMessageParameters(SCR_AISendGoalMessage node, SCR_AIActivityBase relatedActivity)
568  {
569  super.SetMessageParameters(node, relatedActivity);
570  node.GetVariableIn(node.PORT_ENTITY, m_Vehicle);
571  if (!node.GetVariableIn(node.PORT_INTEGER,m_eRoleInVehicle))
572  m_eRoleInVehicle = node.m_integer;
573  }
574 };
575 
576 class SCR_AIMessage_GetOut : SCR_AIMessage_Vehicle // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_GetOut)
577 {
578  void SCR_AIMessage_GetOut()
579  {
580  m_MessageType = EMessageType_Goal.GET_OUT_VEHICLE;
581  }
582 
583  override void SetMessageParameters(SCR_AISendGoalMessage node, SCR_AIActivityBase relatedActivity)
584  {
585  super.SetMessageParameters(node, relatedActivity);
586  node.GetVariableIn(node.PORT_ENTITY, m_Vehicle);
587  }
588 };
589 
590 class SCR_AIMessage_Flee : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_Flee)
591 {
592  void SCR_AIMessage_Flee()
593  {
594  m_MessageType = EMessageType_Goal.FLEE;
595  }
596 };
597 
598 class SCR_AIMessage_ThrowGrenadeTo : SCR_AIMessageGoal // MESSAGE_CLASS(GenerateSendGoalMessage, SCR_AISendGoalMessage_ThrowGrenadeTo)
599 {
600  vector m_vTargetPosition; // VARIABLE(NodePort, TargetPosition)
601  EWeaponType e_WeaponType; // VARIABLE(NodePort, WeaponType)
602  float m_fDelay; // VARIABLE(NodePort, Delay)
603 
605  {
606  m_MessageType = EMessageType_Goal.THROW_GRENADE_TO;
607  }
608 
609  static SCR_AIMessage_ThrowGrenadeTo Create(vector position, EWeaponType weaponType, float delay)
610  {
612  msg.m_vTargetPosition = position;
613  msg.e_WeaponType = weaponType;
614  msg.m_fDelay = delay;
615  return msg;
616  }
617 };
SCR_AIMessage_SeekAndDestroy
Definition: SCR_AIMessage.c:439
SCR_AIMessage_Cancel
Definition: SCR_AIMessage.c:263
GET_OUT_VEHICLE
@ GET_OUT_VEHICLE
Definition: SCR_AIMessage.c:26
SCR_AIMessage_ActionFailed
Definition: SCR_AIMessage.c:240
SCR_AIMessage_KeepFormation
SCR_AIMessage_Move SCR_AIMessage_KeepFormation
Definition: SCR_AIMessage.c:348
m_eRoleInVehicle
EAICompartmentType m_eRoleInVehicle
Definition: SendGoalMessage.c:989
m_MagazineWellType
m_MagazineWellType
Definition: SCR_AIMessage.c:478
m_fDistance
float m_fDistance
Definition: SCR_AIGroupTargetCluster.c:38
SCR_AIMessage_Follow
Definition: SCR_AIMessage.c:379
SCR_AIMessage_Flee
Definition: SCR_AIMessage.c:590
SCR_AIMessage_CoverCluster
Definition: SCR_AIMessage.c:338
SCR_AIMessage_UnderFire
Definition: SCR_AIMessage.c:162
SCR_AIMessage_HealWait
Definition: SCR_AIMessage.c:518
FLEE
@ FLEE
Definition: SCR_AIMessage.c:24
m_vPickupPosition
SCR_AIMessage_ProvideAmmo m_vPickupPosition
EMovementType
EMovementType
Definition: EMovementType.c:12
SCR_AIMessage_Retreat
Definition: SCR_AIMessage.c:510
MOVE_IN_FORMATION
@ MOVE_IN_FORMATION
Definition: SCR_AIMessage.c:22
MOVE
@ MOVE
Definition: SCR_AIMessage.c:27
HEAL_FAILED
@ HEAL_FAILED
Definition: SCR_AIMessage.c:12
m_bIsWaypointRelated
bool m_bIsWaypointRelated
Definition: SendGoalMessage.c:6
SCR_AIMessage_Move
Definition: SCR_AIMessage.c:354
EMessageType_Info
EMessageType_Info
Definition: SCR_AIMessage.c:1
m_bIsDangerous
bool m_bIsDangerous
Definition: SendGoalMessage.c:431
DEFEND
@ DEFEND
Definition: SCR_AIMessage.c:33
SCR_AISmartActionComponent
Definition: SCR_AISmartActionComponent.c:9
SCR_AISendMessageBase
Base class for nodes sending message.
Definition: SCR_AISendMessage.c:2
m_fPriorityLevel
float m_fPriorityLevel
Definition: SendGoalMessage.c:3
REQ_AMMO
@ REQ_AMMO
Definition: SCR_AIMessage.c:9
FOUND_CORPSE
@ FOUND_CORPSE
Definition: SCR_AIMessage.c:6
SEEK_DESTROY
@ SEEK_DESTROY
Definition: SCR_AIMessage.c:23
SCR_AIMessage_Defend
Definition: SCR_AIMessage.c:493
ATTACK_CLUSTER_DONE
@ ATTACK_CLUSTER_DONE
Definition: SCR_AIMessage.c:20
SCR_AIMessage_Target
Definition: SCR_AIMessage.c:108
SCR_AIMessage_AttackCluster
Definition: SCR_AIMessage.c:305
REQ_RETREAT
@ REQ_RETREAT
Definition: SCR_AIMessage.c:8
UNDER_FIRE
@ UNDER_FIRE
Definition: SCR_AIMessage.c:7
SCR_AIMessageGoal
Definition: SCR_AIMessage.c:69
SCR_AIActivityBase
Definition: SCR_AIActivity.c:1
ACTION_FAILED
@ ACTION_FAILED
Definition: SCR_AIMessage.c:11
SCR_AIMessage_PerformAction
Definition: SCR_AIMessage.c:534
SIT_REP
@ SIT_REP
Definition: SCR_AIMessage.c:10
HEAL
@ HEAL
Definition: SCR_AIMessage.c:30
SCR_AIMessage_PickupInventoryItems
void SCR_AIMessage_PickupInventoryItems()
Definition: SCR_AIMessage.c:480
SCR_AIMessage_Heal
Definition: SCR_AIMessage.c:447
SCR_AIMessage_Attack
Definition: SCR_AIMessage.c:279
SCR_AIMessage_Wounded
Definition: SCR_AIMessage.c:202
RETREAT
@ RETREAT
Definition: SCR_AIMessage.c:34
Attribute
typedef Attribute
Post-process effect of scripted camera.
ATTACK
@ ATTACK
Definition: SCR_AIMessage.c:18
SCR_AISendMessageGeneric
Class for generic nodes with extra input ports which send messages.
Definition: SCR_AISendMessage.c:73
SCR_AIMessage_Vehicle
Definition: SCR_AIMessage.c:553
FOLLOW
@ FOLLOW
Definition: SCR_AIMessage.c:28
THROW_GRENADE_TO
@ THROW_GRENADE_TO
Definition: SCR_AIMessage.c:38
m_Vehicle
enum EAICompartmentType m_Vehicle
PERFORM_ACTION
@ PERFORM_ACTION
Definition: SCR_AIMessage.c:35
SCR_AIMessage_GetIn
Definition: SCR_AIMessage.c:558
SetMessageParameters
override void SetMessageParameters(SCR_AISendGoalMessage node, SCR_AIActivityBase relatedActivity)
Definition: SCR_AIMessage.c:485
NO_AMMO
@ NO_AMMO
Definition: SCR_AIMessage.c:4
CANCEL
@ CANCEL
Definition: SCR_AIMessage.c:36
m_fRadius
float m_fRadius
Definition: SCR_AITargetClusterState.c:30
WOUNDED
@ WOUNDED
Definition: SCR_AIMessage.c:5
SCR_AIMessage_ProvideAmmo
Definition: SCR_AIMessage.c:457
EAIUnitType
EAIUnitType
Definition: EAIUnitType.c:12
SCR_AIMessage_Investigate
Definition: SCR_AIMessage.c:400
ATTACK_CLUSTER
@ ATTACK_CLUSTER
Definition: SCR_AIMessage.c:19
UNGROUP
@ UNGROUP
Definition: SCR_AIMessage.c:29
GET_IN_VEHICLE
@ GET_IN_VEHICLE
Definition: SCR_AIMessage.c:25
EAICompartmentType
EAICompartmentType
Definition: SCR_AIVehicleBehavior.c:1
PROVIDE_AMMO
@ PROVIDE_AMMO
Definition: SCR_AIMessage.c:39
SCR_AIMessage_FoundCorpse
Definition: SCR_AIMessage.c:182
EMessageType_Goal
EMessageType_Goal
Definition: SCR_AIMessage.c:15
SCR_AIMessage_GetOut
Definition: SCR_AIMessage.c:576
HEAL_WAIT
@ HEAL_WAIT
Definition: SCR_AIMessage.c:31
NONE
@ NONE
Definition: SCR_AIMessage.c:3
SCR_AIMessageInfo
Definition: SCR_AIMessage.c:95
EWeaponType
EWeaponType
Definition: EWeaponType.c:12
m_bUseVehicles
bool m_bUseVehicles
Definition: SendGoalMessage.c:284
PICKUP_INVENTORY_ITEMS
@ PICKUP_INVENTORY_ITEMS
Definition: SCR_AIMessage.c:40
SCR_AIMessage_HealFailed
Definition: SCR_AIMessage.c:251
m_vPosition
vector m_vPosition
Definition: SCR_AITalkRequest.c:23
COVER_CLUSTER
@ COVER_CLUSTER
Definition: SCR_AIMessage.c:21
SCR_AIMessage_SitRep
Definition: SCR_AIMessage.c:230
SCR_AIMessage_NoAmmo
Definition: SCR_AIMessage.c:131
SCR_AITargetClusterState
void SCR_AITargetClusterState(SCR_AIGroupTargetCluster cluster)
Definition: SCR_AITargetClusterState.c:38
position
vector position
Definition: SCR_DestructibleTreeV2.c:30
SCR_AIMessage_AttackClusterDone
SCR_AIMessage_AttackCluster SCR_AIMessageGoal SCR_AIMessage_AttackClusterDone()
Definition: SCR_AIMessage.c:326
SCR_AISendGoalMessage
Definition: SCR_AISendGoalMessage.c:2
SCR_AIMessage_ThrowGrenadeTo
Definition: SCR_AIMessage.c:598
SCR_AIMessageBase
Definition: SCR_AIMessage.c:44
INVESTIGATE
@ INVESTIGATE
Definition: SCR_AIMessage.c:32