Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIUtils.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------------------------------------------------------------------
2// Helper functions regarding ports of nodes
4{
5 // gets a string from value given in port
6 // basically workaround that we can't cast void from GetVariableIn into type of that variable
7 //------------------------------------------------------------------------------------------------
8 static string GetStringFromPort(Node node, string port)
9 {
10 const string UNASSIGNED_VARIABLE = "Unassigned";
11 if ( node.GetVariableType(true, port) == string )
12 {
13 string value;
14 if(!node.GetVariableIn(port, value))
15 value = UNASSIGNED_VARIABLE;
16 return value;
17 }
18 else if ( node.GetVariableType(true, port) == int )
19 {
20 int value;
21 if(!node.GetVariableIn(port, value))
22 return UNASSIGNED_VARIABLE;
23 return value.ToString();
24 }
25 else if ( node.GetVariableType(true, port) == float )
26 {
27 float value;
28 if(!node.GetVariableIn(port, value))
29 return UNASSIGNED_VARIABLE;
30 return value.ToString();
31 }
32 else if ( node.GetVariableType(true, port) == bool )
33 {
34 bool value;
35 if(!node.GetVariableIn(port, value))
36 return UNASSIGNED_VARIABLE;
37 return value.ToString();
38 }
39 else if ( node.GetVariableType(true, port) == vector )
40 {
41 vector value;
42 if(!node.GetVariableIn(port, value))
43 return UNASSIGNED_VARIABLE;
44 return value.ToString();
45 }
46 else if ( node.GetVariableType(true, port).IsInherited(Managed) )
47 {
48 Managed value;
49 if(!node.GetVariableIn(port, value))
50 return UNASSIGNED_VARIABLE;
51 if (value)
52 return value.ToString();
53 else
54 return "NULL";
55 }
56 return "";
57 };
58
59 // merges two TStringsArray into one
60 //------------------------------------------------------------------------------------------------------------------------------------------------------------
61 static TStringArray MergeTwoArrays(TStringArray first, TStringArray second)
62 {
63 ref TStringArray merged = {};
64 merged.Copy(first);
65 foreach (string s: second)
66 merged.Insert(s);
67 return merged;
68 }
69}
70
71// use this for generating random numbers for AI, no need to create another instance
72//------------------------------------------------------------------------------------------------------------------------------------------------------------
74
75//------------------------------------------------------------------------------------------------------------------------------------------------------------
76// AI stance
78{
79 // use this for interpretting relevant character stance based on threat level
80 //------------------------------------------------------------------------------------------------
81 static ECharacterStance GetStanceFromThreat(EAIThreatState threatState)
82 {
83 switch (threatState)
84 {
85 case EAIThreatState.THREATENED: return ECharacterStance.PRONE;
86 case EAIThreatState.ALERTED: return ECharacterStance.CROUCH;
87 case EAIThreatState.VIGILANT: return ECharacterStance.STAND;
88 case EAIThreatState.SAFE: return ECharacterStance.STAND;
89 default: return ECharacterStance.STAND;
90 }
91 return ECharacterStance.STAND;
92 }
93
94 //------------------------------------------------------------------------------------------------
95 [Obsolete("Use SetStance without Info Component")]
96 static void SetStance(SCR_AIInfoComponent infoComp, CharacterControllerComponent charContrComp, ECharacterStance stance)
97 {
98 charContrComp.SetStanceChange(ConvertStanceToStanceChange(stance));
99 }
100
101 static void SetStance(notnull CharacterControllerComponent charContrComp, ECharacterStance stance)
102 {
103 charContrComp.SetStanceChange(ConvertStanceToStanceChange(stance));
104 }
105
106 // use this to convert stance enum to int
107 //------------------------------------------------------------------------------------------------
108 static int ConvertStanceToStanceChange(ECharacterStance stance)
109 {
110 switch (stance)
111 {
112 case ECharacterStance.STAND: return ECharacterStanceChange.STANCECHANGE_TOERECTED;
113 case ECharacterStance.CROUCH: return ECharacterStanceChange.STANCECHANGE_TOCROUCH;
114 case ECharacterStance.PRONE: return ECharacterStanceChange.STANCECHANGE_TOPRONE;
115 }
116 return 0;
117 }
118}
119
120// use this to find all components in all children of an entity
121//------------------------------------------------------------------------------------------------------------------------------------------------------------
122static bool FindComponentsInAllChildren(typename typeName, IEntity parent, bool findFirst, int depth, int maxDepth, notnull inout array<Managed> outComponents)
123{
124 if (depth > maxDepth)
125 return false;
126
127 IEntity child = parent.GetChildren();
128
129 while (child)
130 {
131 if (FindComponentsInAllChildren(typeName, child, findFirst, depth + 1, maxDepth, outComponents) && findFirst)
132 return true;
133
134 child = child.GetSibling();
135 }
136
137 if (parent)
138 {
139 Managed component = parent.FindComponent(typeName);
140 if (component)
141 {
142 outComponents.Insert(component);
143 return true;
144 }
145 }
146
147 return false;
148};
149
150//------------------------------------------------------------------------------------------------------------------------------------------------------------
151// Compartments on vehicles
153{
154 //--------------------------------------------------------------------------------------------
155 static ECompartmentType CompartmentClassToType(typename type)
156 {
157 if (type.IsInherited(CargoCompartmentSlot))
158 return ECompartmentType.CARGO;
159 else if (type.IsInherited(PilotCompartmentSlot))
160 return ECompartmentType.PILOT;
161 else if (type.IsInherited(TurretCompartmentSlot))
162 return ECompartmentType.TURRET;
163 return -1;
164 }
165
166 //--------------------------------------------------------------------------------------------
167 static bool FindAvailableCompartmentInVehicles (array<IEntity> vehicles, ECompartmentType roleInVehicle, out BaseCompartmentSlot compartmentOut, out IEntity vehicleOut)
168 {
169 foreach (IEntity vehicle: vehicles)
170 {
171 if (!vehicle)
172 continue;
173
175 if (!Vehicle.Cast(vehicle) || !compartmentMan)
176 return false;
177 ref array<BaseCompartmentSlot> compartments = {};
178 compartmentMan.GetCompartments(compartments);
179 foreach (BaseCompartmentSlot compartment: compartments)
180 {
181 if (SCR_AICompartmentHandling.CompartmentClassToType(compartment.Type()) == roleInVehicle)
182 {
183 if (!compartment.GetOccupant() && compartment.IsCompartmentAccessible() && !compartment.IsReserved())
184 {
185 compartmentOut = compartment;
186 vehicleOut = vehicle;
187 return true;
188 }
189 }
190 }
191 }
192 return false;
193 }
194
195 //--------------------------------------------------------------------------------------------
196 static bool IsInCompartment(notnull AIAgent agent)
197 {
198 IEntity controlledEntity = agent.GetControlledEntity();
199 if (!controlledEntity)
200 return false;
201
202 ChimeraCharacter character = ChimeraCharacter.Cast(controlledEntity);
203 if (!character)
204 return false;
205
206 return character.IsInVehicle();
207 }
208
209 //--------------------------------------------------------------------------------------------
210 static IEntity GetAgentVehicleAndCompartment(notnull AIAgent agent, out BaseCompartmentSlot outCompartmentSlot)
211 {
212 outCompartmentSlot = null;
213
214 IEntity controlledEntity = agent.GetControlledEntity();
215 if (!controlledEntity)
216 return null;
217
218 CompartmentAccessComponent compartmentAccessComp = CompartmentAccessComponent.Cast(controlledEntity.FindComponent(CompartmentAccessComponent));
219 if (!compartmentAccessComp)
220 return null;
221
222 BaseCompartmentSlot slot = compartmentAccessComp.GetCompartment();
223
224 if (!slot)
225 return null;
226
227 outCompartmentSlot = slot;
228 return outCompartmentSlot.GetVehicle();
229 }
230
231 //--------------------------------------------------------------------------------------------
232 static int GetAvailableCompartmentCount (notnull IEntity vehicle)
233 {
234 int availableCompCount;
236 if (!compartmentMan)
237 return 0;
238 ref array<BaseCompartmentSlot> compartments = {};
239 compartmentMan.GetCompartments(compartments);
240 foreach (BaseCompartmentSlot compartment: compartments)
241 {
242 if (!compartment.GetOccupant() && compartment.IsCompartmentAccessible() && !compartment.IsReserved())
243 {
244 availableCompCount++;
245 }
246 }
247 return availableCompCount;
248 }
249}
250
251//------------------------------------------------------------------------------------------------------------------------------------------------------------
252// Check if vehicle can move or is not on fire
253class SCR_AIVehicleUsability
254{
255 //--------------------------------------------------------------------------------------------
256 static void TurnOnVehicleHazardLights(IEntity vehicle)
257 {
259 if (vehicleLightManager)
260 vehicleLightManager.SetLightsState(ELightType.Hazard, true);
261 }
262
263 //--------------------------------------------------------------------------------------------
264 static bool VehicleCanMove(IEntity vehicle, SCR_DamageManagerComponent damageManager = null)
265 {
266 if (!vehicle)
267 return false;
268
269 if (!damageManager)
270 {
271 damageManager = SCR_DamageManagerComponent.GetDamageManager(vehicle);
272 if (!damageManager)
273 return false;
274 }
275
276 return damageManager.GetMovementDamage() < 1;
277 }
278
279 //--------------------------------------------------------------------------------------------
280 static bool VehicleIsOnFire(IEntity vehicle, SCR_DamageManagerComponent damageManager = null)
281 {
282 if(!vehicle)
283 return false;
284
285 if (!damageManager)
286 {
287 damageManager = SCR_DamageManagerComponent.GetDamageManager(vehicle);
288 if (!damageManager)
289 return false;
290 }
291
292 return damageManager.IsOnFire(damageManager.GetDefaultHitZone());
293 }
294}
295
296//------------------------------------------------------------------------------------------------------------------------------------------------------------
297// Weapon Handling
299{
300 //------------------------------------------------------------------------------------------------
301 static EMuzzleType GetWeaponCurrentMuzzleType(notnull BaseWeaponComponent weapon)
302 {
303 BaseMuzzleComponent currentMuzzle = weapon.GetCurrentMuzzle();
304 if (currentMuzzle)
305 return currentMuzzle.GetMuzzleType();
306
307 return EMuzzleType.MT_BaseMuzzle;
308 }
309
310 //------------------------------------------------------------------------------------------------
311 static EWeaponType GetWeaponType(notnull BaseWeaponComponent weapon, bool overrideWithMuzzle = false)
312 {
313 EWeaponType weaponType = weapon.GetWeaponType();
314
315 if (!overrideWithMuzzle)
316 return weaponType;
317
318 EMuzzleType muzzleType = SCR_AIWeaponHandling.GetWeaponCurrentMuzzleType(weapon);
319
320 // We treat RPG muzzle as rocket launcher
321 if (muzzleType == EMuzzleType.MT_RPGMuzzle)
322 weaponType = EWeaponType.WT_ROCKETLAUNCHER;
323
324 // We treat UGL muzzle as grenade launcher
325 if (muzzleType == EMuzzleType.MT_UGLMuzzle)
326 weaponType = EWeaponType.WT_GRENADELAUNCHER;
327
328 return weaponType;
329 }
330
331 //--------------------------------------------------------------------------------------------
332 static int GetCurrentMuzzleId(BaseWeaponManagerComponent weapMgr)
333 {
334 BaseWeaponComponent weaponComp = weapMgr.GetCurrentWeapon();
335
336 if (!weaponComp)
337 return -1;
338
339 // Find muzzle ID
340 array<BaseMuzzleComponent> muzzles = {};
341 weaponComp.GetMuzzlesList(muzzles);
342 BaseMuzzleComponent currentMuzzle = weaponComp.GetCurrentMuzzle();
343
344 if (!currentMuzzle || muzzles.IsEmpty())
345 return -1;
346
347 int currentMuzzleId = muzzles.Find(currentMuzzle);
348 return currentMuzzleId;
349 }
350
351 //--------------------------------------------------------------------------------------------
352 static BaseMagazineComponent GetCurrentMagazineComponent(BaseWeaponManagerComponent weapMgr)
353 {
354 BaseWeaponComponent weaponComp = weapMgr.GetCurrentWeapon();
355
356 if (!weaponComp)
357 return null;
358
359 BaseMuzzleComponent currentMuzzle = weaponComp.GetCurrentMuzzle();
360 if (!currentMuzzle)
361 return null;
362
363 return currentMuzzle.GetMagazine();
364 }
365
366 //--------------------------------------------------------------------------------------------
368 static bool IsCurrentMuzzleChambered(BaseWeaponManagerComponent weapMgr, bool defValue = false)
369 {
370 BaseWeaponComponent weaponComp = weapMgr.GetCurrentWeapon();
371
372 if (!weaponComp)
373 return false;
374
375 BaseMuzzleComponent currentMuzzle = weaponComp.GetCurrentMuzzle();
376 if (!currentMuzzle)
377 return false;
378
379 if (!currentMuzzle.IsChamberingPossible())
380 return defValue;
381
382 return currentMuzzle.IsCurrentBarrelChambered();
383 }
384
385 //--------------------------------------------------------------------------------------------
387 static BaseWeaponComponent GetCurrentWeaponComponent(BaseWeaponManagerComponent weapMgr)
388 {
389 return weapMgr.GetCurrentWeapon();
390 }
391
392 //--------------------------------------------------------------------------------------------
393 static void StartMuzzleSwitch(CharacterControllerComponent controller, int newMuzzleId)
394 {
395 controller.SetMuzzle(newMuzzleId);
396 }
397
398 //--------------------------------------------------------------------------------------------
399 static void StartMagazineSwitchCharacter(CharacterControllerComponent controller, BaseMagazineComponent newMagazineComp)
400 {
401 controller.ReloadWeaponWith(newMagazineComp.GetOwner());
402 }
403
404 //--------------------------------------------------------------------------------------------
405 static void StartMagazineSwitchTurret(TurretControllerComponent controller, BaseMagazineComponent newMagazineComp)
406 {
407 controller.DoReloadWeaponWith(newMagazineComp.GetOwner());
408 }
409
410 //--------------------------------------------------------------------------------------------
411 static void StartWeaponSwitchCharacter(CharacterControllerComponent controller, BaseWeaponComponent newWeaponComp)
412 {
413 controller.TryEquipRightHandItem(newWeaponComp.GetOwner(), EEquipItemType.EEquipTypeWeapon, false);
414 }
415
416 //--------------------------------------------------------------------------------------------
417 static void StartWeaponSwitchTurret(TurretControllerComponent controller, BaseWeaponComponent newWeaponComp, IEntity turretOperator)
418 {
419 // Find weapon slot which has this weapon
420 IEntity newWeaponEntity = newWeaponComp.GetOwner();
421 BaseWeaponManagerComponent weaponMgr = controller.GetWeaponManager();
422 if (!weaponMgr)
423 return;
424
425 WeaponSlotComponent newWeaponSlot;
426 array<WeaponSlotComponent> slots = {};
427 weaponMgr.GetWeaponsSlots(slots);
428 foreach (WeaponSlotComponent slot : slots)
429 {
430 if (slot.GetWeaponEntity() == newWeaponEntity)
431 newWeaponSlot = slot;
432 }
433
434 if (!newWeaponSlot)
435 {
436 // There is no slot which has this weapon
437 return;
438 }
439
440 controller.SelectWeapon(turretOperator, newWeaponSlot);
441 }
442}
443
444class SCR_AIDamageHandling
445{
446 //---------------------------------------------------------------------------------------------------------
447 static bool IsConscious(IEntity entity)
448 {
449 if (!entity)
450 return false;
451 ChimeraCharacter character = ChimeraCharacter.Cast(entity);
452 if (character)
453 {
454 CharacterControllerComponent contr = character.GetCharacterController();
455 if (!contr)
456 return false;
457 return contr.GetLifeState() == ECharacterLifeState.ALIVE;
458 }
459 DamageManagerComponent damageManager = DamageManagerComponent.Cast(entity.FindComponent(DamageManagerComponent));
460 if (!damageManager)
461 return true;
462 return damageManager.GetState() != EDamageState.DESTROYED;
463 }
464
465 //---------------------------------------------------------------------------------------------------------
466 static bool IsAlive(IEntity entity)
467 {
468 if (!entity)
469 return false;
470
471 DamageManagerComponent damageManager;
472 ChimeraCharacter character = ChimeraCharacter.Cast(entity);
473 if (character)
474 damageManager = character.GetDamageManager();
475 else
476 damageManager = DamageManagerComponent.Cast(entity.FindComponent(DamageManagerComponent));
477
478 if (!damageManager)
479 return true;
480
481 return damageManager.GetState() != EDamageState.DESTROYED;
482 }
483
484 // This method abstracts away the internals of damage system for usage in various AI behaviors.
485 static bool IsCharacterWounded(IEntity entity)
486 {
487 ChimeraCharacter character = ChimeraCharacter.Cast(entity);
488 if (!character)
489 return false;
490
491 SCR_CharacterDamageManagerComponent damageManager = SCR_CharacterDamageManagerComponent.Cast(character.GetDamageManager());
492 if (!damageManager)
493 return false;
494
495 return damageManager.IsBleeding();
496 }
497}
498
500{
502 static SCR_AISmartActionComponent FindSmartAction(notnull IEntity entity, string tag, bool checkAccessibility)
503 {
504 array<Managed> components = {};
505 entity.FindComponents(SCR_AISmartActionComponent, components);
506
507 array<string> tags = {};
508
509 foreach (Managed c : components)
510 {
512
513 if (checkAccessibility && !saComp.IsActionAccessible())
514 continue;
515
516 tags.Clear();
517 saComp.GetTags(tags);
518
519 if (tags.Contains(tag))
520 return saComp;
521 }
522
523 return null;
524 }
525}
526
527class SCR_AIMessageHandling
528{
529 //------------------------------------------------------------------------------------
530 static void SendDismountMessage(notnull AIAgent agent, notnull IEntity vehicleEntity, int soldierId, SCR_AIActivityBase relatedActivity,
531 notnull AICommunicationComponent myComms, string sendFrom = string.Empty)
532 {
533 float dismountDelay = 0.9 * soldierId;
534
536 SCR_AIMessage_GetOut msg = SCR_AIMessage_GetOut.Create(vehicleEntity, bParams, relatedActivity, delay_s: dismountDelay);
537 msg.SetReceiver(agent);
538 #ifdef AI_DEBUG
539 msg.m_sSentFromBt = sendFrom;
540 #endif
541 myComms.RequestBroadcast(msg, agent);
542 }
543
544 //------------------------------------------------------------------------------------
545 static void SendGetInMessage(notnull AIAgent agent, notnull IEntity vehicleEntity, EAICompartmentType roleInVehicle,
546 SCR_AIActivityBase relatedActivity, notnull AICommunicationComponent myComms, string sendFrom = string.Empty)
547 {
548 SCR_AIBoardingParameters bParams = new SCR_AIBoardingParameters();
549 int priorityLevel = SCR_AIActionBase.PRIORITY_LEVEL_NORMAL;
550 if (relatedActivity)
551 priorityLevel = relatedActivity.EvaluatePriorityLevel();
552 SCR_AIMessage_GetIn msg = SCR_AIMessage_GetIn.Create(vehicleEntity, bParams, roleInVehicle, false,
553 priorityLevel: priorityLevel, null, relatedActivity: relatedActivity, compartmentSlot: null);
554
555 msg.SetReceiver(agent);
556 #ifdef AI_DEBUG
557 msg.m_sSentFromBt = sendFrom;
558 #endif
559 myComms.RequestBroadcast(msg, agent);
560 }
561
562 //------------------------------------------------------------------------------------
563 static void SendMoveMessage(notnull AIAgent agent, IEntity moveToEntity, SCR_AIActivityBase relatedActivity,
564 notnull AICommunicationComponent myComms, string sendFrom = string.Empty)
565 {
566 SCR_AIMessage_Move msg = SCR_AIMessage_Move.Create(moveToEntity, vector.Zero, EMovementType.SPRINT, true, relatedActivity);
567 msg.SetReceiver(agent);
568 #ifdef AI_DEBUG
569 msg.m_sSentFromBt = sendFrom;
570 #endif
571 myComms.RequestBroadcast(msg, agent);
572 }
573
574 //------------------------------------------------------------------------------------
575 static void SendCancelMessage(notnull AIAgent agent, SCR_AIActivityBase relatedActivity,
576 notnull AICommunicationComponent myComms, string sendFrom = string.Empty)
577 {
578 SCR_AIMessage_Cancel msg = SCR_AIMessage_Cancel.Create(relatedActivity);
579 msg.SetReceiver(agent);
580 #ifdef AI_DEBUG
581 msg.m_sSentFromBt = sendFrom;
582 #endif
583 myComms.RequestBroadcast(msg, agent);
584 }
585
586 //------------------------------------------------------------------------------------
587 static void SendAnimateMessage(notnull AIAgent agent, notnull IEntity rootEntity, notnull SCR_AIAnimationScript script, SCR_AIActivityBase relatedActivity, ScriptInvokerBase<SCR_AIOnAnimationBehaviorAction> relatedInvoker,
588 notnull AICommunicationComponent myComms, string sendFrom = string.Empty)
589 {
590 SCR_AIMessage_Animate msg = SCR_AIMessage_Animate.Create(rootEntity, script, relatedActivity, relatedInvoker);
591 msg.SetReceiver(agent);
592 #ifdef AI_DEBUG
593 msg.m_sSentFromBt = sendFrom;
594 #endif
595 myComms.RequestBroadcast(msg, agent);
596 }
597}
598
600{
602 static bool IsLowLightEnvironment()
603 {
604 PerceptionManager pm = GetGame().GetPerceptionManager();
605 if (!pm)
606 return false;
607
608 float directLV, ambientLV, totalAmbientLv;
609 pm.GetAmbientLV(directLV, ambientLV, totalAmbientLv);
610
611 return totalAmbientLv < -3.5;
612 }
613}
614
615class SCR_AIFactionHandling
616{
618 static Faction GetEntityPerceivedFaction(notnull IEntity entity)
619 {
620 // Common case first
621 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(entity);
622 if (character && character.m_pPerceivableComponent)
623 {
624 return character.m_pPerceivableComponent.GetPerceivedFaction();
625 }
626
627 Vehicle vehicle = Vehicle.Cast(entity);
628 if (vehicle && vehicle.m_pPerceivableComponent)
629 {
630 return vehicle.m_pPerceivableComponent.GetPerceivedFaction();
631 }
632
633 // Worst case - some other entity, perform component search
634 PerceivableComponent perceivableComponent = PerceivableComponent.Cast(entity.FindComponent(PerceivableComponent));
635 if (perceivableComponent)
636 return perceivableComponent.GetPerceivedFaction();
637
638 return null;
639 }
640
642 static Faction GetEntityFaction(notnull IEntity entity)
643 {
644 // Common case first
645 SCR_ChimeraCharacter character = SCR_ChimeraCharacter.Cast(entity);
646 if (character && character.m_pFactionComponent)
647 {
648 return character.m_pFactionComponent.GetAffiliatedFaction();
649 }
650
651 Vehicle vehicle = Vehicle.Cast(entity);
652 if (vehicle && vehicle.m_pFactionComponent)
653 {
654 return vehicle.m_pFactionComponent.GetAffiliatedFaction();
655 }
656
657 // Worst case - some other entity, perform component search
658 FactionAffiliationComponent factionAffiliation = FactionAffiliationComponent.Cast(entity.FindComponent(FactionAffiliationComponent));
659 if (factionAffiliation)
660 return factionAffiliation.GetAffiliatedFaction();
661
662 return null;
663 }
664}
665
667{
668 static AIAgent GetAIAgent(notnull IEntity ent)
669 {
670 AIControlComponent controlComp = AIControlComponent.Cast(ent.FindComponent(AIControlComponent));
671 if (!controlComp)
672 return null;
673
674 return controlComp.GetControlAIAgent();
675 }
676}
ref array< string > tags
ECompartmentType
ELightType
Definition ELightType.c:8
ArmaReforgerScripted GetGame()
Definition game.c:1398
void SCR_AIActivityBase(SCR_AIGroupUtilityComponent utility, AIWaypoint relatedWaypoint)
class SCR_AICompartmentHandling TurnOnVehicleHazardLights(IEntity vehicle)
class SCR_AIWorldHandling GetEntityPerceivedFaction(notnull IEntity entity)
Returns GetPerceivedFaction from PerceivableComponent - the faction which we should use in all AI scr...
class SCR_AISmartActionHandling SendDismountMessage(notnull AIAgent agent, notnull IEntity vehicleEntity, int soldierId, SCR_AIActivityBase relatedActivity, notnull AICommunicationComponent myComms, string sendFrom=string.Empty)
class SCR_AINodePortsHelpers s_AIRandomGenerator
class SCR_AIStanceHandling FindComponentsInAllChildren(typename typeName, IEntity parent, bool findFirst, int depth, int maxDepth, notnull inout array< Managed > outComponents)
EAICompartmentType
EDamageType type
Get all prefabs that have the spawner the given labels and are valid in the editor mode param catalogType Type to catalog to get prefabs from param editorMode Editor mode to get valid entries from param faction Faction(Optional)
enum EVehicleType IEntity
proto external Managed FindComponent(typename typeName)
proto external IEntity GetChildren()
proto external IEntity GetSibling()
Definition Node.c:13
proto bool GetVariableIn(string name, out void val)
proto external GetVariableType(bool inputPort, string name)
bool IsBleeding()
the official and globally used way of checking if bleeding tests for any PERSISTENT damage effects of...
enum EPhysicsLayerPresets Vehicle
Definition gameLib.c:24
ECharacterStanceChange
ECharacterStance
EEquipItemType
EMovementType
ECharacterLifeState
proto external bool IsInCompartment()
Returns true if we're inside a compartment.
EDamageState
array< string > TStringArray
Definition Types.c:385
EWeaponType
Definition EWeaponType.c:13
EMuzzleType
Definition EMuzzleType.c:13