Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ScenarioFrameworkSlotAI.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/ScenarioFramework/Slot", description: "")]
3 {
4 }
5 
7 {
8  [Attribute(desc: "Waypoint Groups if applicable", category: "Waypoints")]
9  ref SCR_ScenarioFrameworkWaypointSet m_WaypointSet;
10 
11  [Attribute(desc: "(OBSOLETE - use Waypoint Set instead) Waypoint Groups if applicable", category: "Waypoints")]
12  ref array<ref SCR_WaypointSet> m_aWaypointGroupNames;
13 
14  [Attribute(desc: "Spawn AI on the first WP Slot", defvalue: "1", category: "Waypoints")]
15  bool m_bSpawnAIOnWPPos;
16 
17  [Attribute(desc: "Default waypoint if any WP group is defined", "{93291E72AC23930F}Prefabs/AI/Waypoints/AIWaypoint_Defend.et", category: "Waypoints")]
18  ResourceName m_sWPToSpawn;
19 
20  [Attribute(defvalue: "0", desc: "Balancing group sizes based on number of players", category: "Balance")]
22 
23  [Attribute(defvalue: "1", desc: "Least amount of AIs in the group after balancing occurs. Will not exceed maximum number of units defined in the group prefab.", category: "Balance")]
25 
26  [Attribute(defvalue: SCR_EAIGroupFormation.Wedge.ToString(), UIWidgets.ComboBox, "AI group formation", "", ParamEnumArray.FromEnum(SCR_EAIGroupFormation), category: "Common")]
28 
29  //[Attribute(defvalue: ECharacterStance.STAND.ToString(), UIWidgets.ComboBox, "AI character stance", "", ParamEnumArray.FromEnum(ECharacterStance), category: "Common")]
30  //ECharacterStance m_eAICharacterStance;
31 
32  //[Attribute(defvalue: EMovementType.WALK.ToString(), UIWidgets.ComboBox, "AI group formation", "", ParamEnumArray.FromEnum(EMovementType), category: "Common")]
33  //EMovementType m_eAIMovementType;
34 
35  [Attribute(defvalue: EAISkill.REGULAR.ToString(), UIWidgets.ComboBox, "AI skill in combat", "", ParamEnumArray.FromEnum(EAISkill), category: "Common")]
36  EAISkill m_eAISkill;
37 
38  [Attribute(defvalue: EAICombatType.NORMAL.ToString(), UIWidgets.ComboBox, "AI combat type", "", ParamEnumArray.FromEnum(EAICombatType), category: "Common")]
39  EAICombatType m_eAICombatType;
40 
41  [Attribute(defvalue: "1", uiwidget: UIWidgets.EditBox, desc: "Sets perception ability. Affects speed at which perception detects targets. Bigger value means proportionally faster detection.", params: "0 100 0.001", category: "Common")]
43 
44  [Attribute(defvalue: "{000CD338713F2B5A}Prefabs/AI/Groups/Group_Base.et", category: "Common")]
45  ResourceName m_sGroupPrefab;
46 
47  ref array<AIWaypoint> m_aWaypoints = {};
49  ref array<ResourceName> m_aAIPrefabsForRemoval = {};
50 
51  ref array<SCR_ScenarioFrameworkSlotWaypoint> m_aSlotWaypoints = {};
53 
54  // Temporary solution as we don't know if invoker or a different method will initialize waypoints
56 
57  //------------------------------------------------------------------------------------------------
59  void SetAIPrefabsForRemoval(array<ResourceName> arrayForRemoval)
60  {
61  m_aAIPrefabsForRemoval = arrayForRemoval;
62  }
63 
64  //------------------------------------------------------------------------------------------------
66  array<ResourceName> GetAIPrefabsForRemoval()
67  {
69  }
70 
71  //------------------------------------------------------------------------------------------------
73  override void RestoreToDefault(bool includeChildren = false, bool reinitAfterRestoration = false)
74  {
75  m_aWaypoints.Clear();
76  m_AIGroup = null;
77  m_aAIPrefabsForRemoval.Clear();
78  m_aSlotWaypoints.Clear();
81 
82  super.RestoreToDefault(includeChildren, reinitAfterRestoration);
83  }
84 
85  //------------------------------------------------------------------------------------------------
88  {
90  if (!m_Entity && !SCR_StringHelper.IsEmptyOrWhiteSpace(m_sObjectToSpawn))
91  {
93  return;
94  }
95 
97  return;
98 
99  m_bInitiated = false;
101  if (m_Entity)
102  m_vPosition = m_Entity.GetOrigin();
103 
104  if (m_AIGroup)
105  m_AIGroup.GetOnAgentRemoved().Remove(DecreaseAIGroupMemberCount);
106 
107  m_AIGroup = null;
108 
109  foreach (IEntity entity : m_aSpawnedEntities)
110  {
111  if (!entity)
112  continue;
113 
114  m_vPosition = entity.GetOrigin();
115  SCR_EntityHelper.DeleteEntityAndChildren(entity);
116  }
117 
118  m_aSpawnedEntities.Clear();
119  m_aWaypoints.Clear();
120  }
121 
122  //------------------------------------------------------------------------------------------------
123  override void Init(SCR_ScenarioFrameworkArea area = null, SCR_ScenarioFrameworkEActivationType activation = SCR_ScenarioFrameworkEActivationType.SAME_AS_PARENT)
124  {
125  if (m_bIsTerminated)
126  {
127  if (m_ParentLayer)
128  m_ParentLayer.CheckAllChildrenSpawned(this);
129 
130  return;
131  }
132 
134  m_bWaypointsInitialized = false;
135 
136  if (!m_bDynamicallyDespawned && activation != m_eActivationType)
137  {
138  if (m_ParentLayer)
139  m_ParentLayer.CheckAllChildrenSpawned(this);
140 
141  return;
142  }
143 
145  {
146  //If just one condition is false, we don't continue and interrupt the init
147  if (!activationCondition.Init(GetOwner()))
148  {
149  if (m_ParentLayer)
150  m_ParentLayer.CheckAllChildrenSpawned(this);
151 
152  return;
153  }
154  }
155 
156  SCR_AIGroup.IgnoreSpawning(true);
157  if (m_eActivationType == SCR_ScenarioFrameworkEActivationType.SAME_AS_PARENT && m_WaypointSet && !m_WaypointSet.m_aLayerName.IsEmpty())
158  {
159  InitWaypoints();
160  super.Init(area, activation);
161  }
162  else
163  {
164  super.Init(area, activation);
165  }
166  }
167 
168  //------------------------------------------------------------------------------------------------
171  {
172  m_bInitiated = true;
173 
174  if (m_Entity)
175  ActivateAI();
176  else
178 
180  }
181 
182  //------------------------------------------------------------------------------------------------
185  {
186  foreach (SCR_ScenarioFrameworkPlugin plugin : m_aPlugins)
187  {
188  plugin.Init(this);
189  }
190 
191  foreach (SCR_ScenarioFrameworkActionBase activationAction : m_aActivationActions)
192  {
193  activationAction.Init(GetOwner());
194  }
195 
196  if (m_ParentLayer)
197  m_ParentLayer.CheckAllChildrenSpawned(this);
198 
200  SetWaypointToAI(this);
201  }
202 
203  //------------------------------------------------------------------------------------------------
205  void ActivateAI()
206  {
207  bool groupWasNull;
209  if (!m_AIGroup)
210  groupWasNull = true;
211 
212  if (!m_AIGroup && !CreateAIGroup())
213  {
215  return;
216  }
217 
218  if (!m_aAIPrefabsForRemoval.IsEmpty())
219  {
220  foreach (ResourceName prefabToRemove : m_aAIPrefabsForRemoval)
221  {
222  for (int i = m_AIGroup.m_aUnitPrefabSlots.Count() - 1; i >= 0; i--)
223  {
224  if (m_AIGroup.m_aUnitPrefabSlots[i] != prefabToRemove)
225  continue;
226 
227  m_AIGroup.m_aUnitPrefabSlots.Remove(i);
228  break;
229  }
230  }
231  }
232  else if (m_bBalanceOnPlayersCount)
233  {
234  int iMaxUnitsInGroup = m_AIGroup.m_aUnitPrefabSlots.Count();
235  float iUnitsToSpawn = Math.Map(GetPlayersCount(), 1, GetMaxPlayersForGameMode(), Math.RandomInt(1, 3), iMaxUnitsInGroup);
236 
237  if (iUnitsToSpawn < m_iMinUnitsInGroup)
238  iUnitsToSpawn = m_iMinUnitsInGroup;
239 
240  m_AIGroup.SetMaxUnitsToSpawn(iUnitsToSpawn);
241  }
242 
243  m_AIGroup.GetOnAgentRemoved().Insert(DecreaseAIGroupMemberCount);
244 
245  if (groupWasNull)
246  {
247  m_AIGroup.SetNumberOfMembersToSpawn(1);
248  OnAgentAdded(null);
249  return;
250  }
251 
252  m_AIGroup.SetMemberSpawnDelay(200);
253  m_AIGroup.SpawnUnits();
254  m_AIGroup.GetOnAgentAdded().Insert(OnAgentAdded);
255  }
256 
257  //------------------------------------------------------------------------------------------------
259  void OnAgentAdded(AIAgent child)
260  {
261  if (m_AIGroup.GetNumberOfMembersToSpawn() != m_AIGroup.GetAgentsCount())
262  return;
263 
264  m_AIGroup.GetOnAgentAdded().Remove(OnAgentAdded);
265 
267 
268  if (m_aSlotWaypoints.IsEmpty())
269  SetWaypointToAI(this);
270 
272  }
273 
274  //------------------------------------------------------------------------------------------------
276  protected void InitGroupComponents()
277  {
278  array<AIAgent> agents = {};
279  m_AIGroup.GetAgents(agents);
280 
281  AIFormationComponent formComp = AIFormationComponent.Cast(m_AIGroup.FindComponent(AIFormationComponent));
282  if (formComp && m_vPosition != vector.Zero)
283  {
284  formComp.SetFormation(SCR_Enum.GetEnumName(SCR_EAIGroupFormation, m_eAIGroupFormation));
285 
286  AIFormationDefinition formDef = formComp.GetFormation();
287  if (formDef)
288  {
289  foreach (int i, AIAgent agent : agents)
290  {
291  IEntity agentEntity = agent.GetControlledEntity();
292  if (!agentEntity)
293  continue;
294 
295  agentEntity.SetOrigin(m_vPosition + formDef.GetOffsetPosition(i));
296 
297  SCR_AICombatComponent combatComponent = SCR_AICombatComponent.Cast(agentEntity.FindComponent(SCR_AICombatComponent));
298  if (combatComponent)
299  {
300  combatComponent.SetAISkill(m_eAISkill);
301  combatComponent.SetCombatType(m_eAICombatType);
302  combatComponent.SetPerceptionFactor(m_fPerceptionFactor);
303  }
304  }
305  }
306  }
307  else
308  {
309  foreach (AIAgent agent : agents)
310  {
311  IEntity agentEntity = agent.GetControlledEntity();
312  if (!agentEntity)
313  continue;
314 
315  SCR_AICombatComponent combatComponent = SCR_AICombatComponent.Cast(agentEntity.FindComponent(SCR_AICombatComponent));
316  if (combatComponent)
317  {
318  combatComponent.SetAISkill(m_eAISkill);
319  combatComponent.SetCombatType(m_eAICombatType);
320  combatComponent.SetPerceptionFactor(m_fPerceptionFactor);
321  }
322  }
323  }
324  }
325 
326  //------------------------------------------------------------------------------------------------
328  protected void InitWaypoints()
329  {
330  array<string> WaypointSetLayers = {};
331  WaypointSetLayers = m_WaypointSet.m_aLayerName;
332  array<SCR_ScenarioFrameworkLayerBase> layerBases = {};
333  array<SCR_ScenarioFrameworkLayerBase> layerChildren = {};
336 
337  foreach (string waypointSetLayer : WaypointSetLayers)
338  {
339  IEntity layerEntity = GetGame().GetWorld().FindEntityByName(waypointSetLayer);
340  if (!layerEntity)
341  continue;
342 
343  layerBase = SCR_ScenarioFrameworkLayerBase.Cast(layerEntity.FindComponent(SCR_ScenarioFrameworkLayerBase));
344  if (layerBase && !SCR_ScenarioFrameworkSlotWaypoint.Cast(layerBase))
345  {
346  if (layerBases.Contains(layerBase))
347  continue;
348 
349  layerChildren = layerBase.GetChildrenEntities();
350  foreach (SCR_ScenarioFrameworkLayerBase child : layerChildren)
351  {
352  slotWaypoint = SCR_ScenarioFrameworkSlotWaypoint.Cast(child);
353  if (slotWaypoint && !m_aSlotWaypoints.Contains(slotWaypoint))
354  m_aSlotWaypoints.Insert(slotWaypoint);
355  }
356  }
357  else
358  {
359  slotWaypoint = SCR_ScenarioFrameworkSlotWaypoint.Cast(layerEntity.FindComponent(SCR_ScenarioFrameworkSlotWaypoint));
360  if (slotWaypoint && !m_aSlotWaypoints.Contains(slotWaypoint))
361  m_aSlotWaypoints.Insert(slotWaypoint);
362  }
363  }
364 
365  int waypointCount = m_aSlotWaypoints.Count();
367  {
368  if (waypoint.GetIsInitiated())
370  else
371  waypoint.GetOnAllChildrenSpawned().Insert(CheckWaypointsAfterInit);
372 
373  if (waypointCount == m_iCurrentlySpawnedWaypoints)
375  }
376  }
377 
378  //------------------------------------------------------------------------------------------------
381  {
383  if (slotWaypoint)
384  {
385  SCR_ScenarioFrameworkWaypointCycle cycleWP = SCR_ScenarioFrameworkWaypointCycle.Cast(slotWaypoint.m_Waypoint);
386  if (cycleWP)
387  {
388  if (!cycleWP.m_bInitiated)
389  {
390  cycleWP.GetOnAllWaypointsSpawned().Insert(CheckWaypointsAfterInit);
391  return;
392  }
393  else if (cycleWP.m_OnAllWaypointsSpawned)
394  {
395  cycleWP.GetOnAllWaypointsSpawned().Remove(CheckWaypointsAfterInit);
396  }
397  }
398  }
399 
402  ProcessWaypoints(this);
403 
404  layer.GetOnAllChildrenSpawned().Remove(CheckWaypointsAfterInit);
405  }
406 
407  //------------------------------------------------------------------------------------------------
410  {
411  if (m_bInitiated)
412  SetWaypointToAI(this);
413  else
415  }
416 
417  //------------------------------------------------------------------------------------------------
420  {
423 
424  if (!m_Entity)
425  {
426  Print(string.Format("ScenarioFramework: Trying to add waypoints to non existing entity! Did you select the object to spawn for %1?", GetOwner().GetName()), LogLevel.ERROR);
427  SCR_AIGroup.IgnoreSpawning(false);
428  return;
429  }
430 
431  if (m_aSlotWaypoints.IsEmpty())
432  {
434  }
435  else
436  {
437  AIWaypoint waypoint;
438  foreach (SCR_ScenarioFrameworkSlotWaypoint waypointSlot : m_aSlotWaypoints)
439  {
440  waypoint = AIWaypoint.Cast(waypointSlot.GetSpawnedEntity());
441  if (waypoint)
442  m_aWaypoints.Insert(waypoint);
443  }
444  }
445 
446  if (!m_AIGroup)
448 
449  if (!m_AIGroup)
450  return;
451 
452  m_aWaypoints.RemoveItemOrdered(null);
453 
454  foreach (AIWaypoint waypoint : m_aWaypoints)
455  {
456  m_AIGroup.AddWaypoint(waypoint);
457  }
458 
459  if (m_bSpawnAIOnWPPos && !m_aWaypoints.IsEmpty())
460  m_Entity.SetOrigin(m_aWaypoints[0].GetOrigin());
461  }
462 
463  //------------------------------------------------------------------------------------------------
465  protected AIWaypoint CreateDefaultWaypoint()
466  {
467  if (!m_Entity)
468  return null;
469 
470  EntitySpawnParams spawnParams = new EntitySpawnParams();
471  spawnParams.TransformMode = ETransformMode.WORLD;
472  spawnParams.Transform[3] = m_Entity.GetOrigin();
473 
474  Resource resWP = Resource.Load(m_sWPToSpawn);
475  if (!resWP || !resWP.IsValid())
476  return null;
477 
478  AIWaypoint waypoint = AIWaypoint.Cast(GetGame().SpawnEntityPrefab(resWP, GetGame().GetWorld(), spawnParams));
479  if (!waypoint)
480  return null;
481 
482  m_aWaypoints.Insert(waypoint);
483  return waypoint;
484  }
485 
486  //------------------------------------------------------------------------------------------------
490  void DecreaseAIGroupMemberCount(SCR_AIGroup group, AIAgent agent)
491  {
492  if (group.GetAgentsCount() == 0)
493  {
495  {
497  SetIsTerminated(true);
498  }
499  else
500  {
501  SetIsTerminated(true);
502  }
503  }
504 
505  IEntity agentEntity = agent.GetControlledEntity();
506  if (!agentEntity)
507  {
508  Print("ScenarioFramework: Decreasing AI member count failed due to not getting AI entity!", LogLevel.ERROR);
509  return;
510  }
511 
512  EntityPrefabData prefabData = agentEntity.GetPrefabData();
513  if (!prefabData)
514  {
515  Print("ScenarioFramework: Decreasing AI member count failed due to not getting entity prefab data", LogLevel.ERROR);
516  return;
517  }
518 
519  ResourceName resource = prefabData.GetPrefabName();
520  if (resource)
521  m_aAIPrefabsForRemoval.Insert(resource);
522  }
523 
524  //------------------------------------------------------------------------------------------------
526  protected bool CreateAIGroup()
527  {
528  EntitySpawnParams paramsPatrol = new EntitySpawnParams();
529  paramsPatrol.TransformMode = ETransformMode.WORLD;
530 
531  paramsPatrol.Transform[3] = m_Entity.GetOrigin();
532  Resource groupResource = Resource.Load(m_sGroupPrefab);
533  if (!groupResource.IsValid())
534  return false;
535 
536  m_AIGroup = SCR_AIGroup.Cast(GetGame().SpawnEntityPrefab(groupResource, GetGame().GetWorld(), paramsPatrol));
537  if (!m_AIGroup)
538  return false;
539 
540  FactionAffiliationComponent facComp = FactionAffiliationComponent.Cast(m_Entity.FindComponent(FactionAffiliationComponent));
541  if (!facComp)
542  return false;
543 
544  m_AIGroup.SetFaction(facComp.GetAffiliatedFaction());
545  m_AIGroup.AddAIEntityToGroup(m_Entity);
546 
547  if (m_vPosition != vector.Zero)
548  m_Entity.SetOrigin(m_vPosition);
549 
550  return true;
551  }
552 
553  //------------------------------------------------------------------------------------------------
554  // constructor
558  void SCR_ScenarioFrameworkSlotAI(IEntityComponentSource src, IEntity ent, IEntity parent)
559  {
560  m_iDebugShapeColor = ARGB(100, 0x00, 0x10, 0xFF);
561  }
562 }
563 
564 //------------------------------------------------------------------------------------------------
567 {
568  [Attribute(defvalue: "", desc: "Name of a Layer that contains SlotWaypoints or directly the name of the SlotWaypoint. It will be added into the queue of waypoints for AIs attached to this Slot.")]
569  ref array<string> m_aLayerName;
570 
571  //------------------------------------------------------------------------------------------------
572  void Init (AIGroup group, IEntity entity)
573  {
574 
575  }
576 }
577 
578 //------------------------------------------------------------------------------------------------
581 class SCR_WaypointSet
582 {
583  [Attribute("Name")]
584  string m_sName;
585 
586  [Attribute("Use random order")]
587  bool m_bUseRandomOrder;
588 
589  [Attribute("Cycle the waypoints")]
590  bool m_bCycleWaypoints;
591 }
m_aPlugins
protected ref array< ref SCR_ScenarioFrameworkPlugin > m_aPlugins
Definition: SCR_ScenarioFrameworkLayerBase.c:55
DynamicDespawn
override void DynamicDespawn(SCR_ScenarioFrameworkLayerBase layer)
Definition: SCR_ScenarioFrameworkSlotAI.c:87
SCR_ScenarioFrameworkActivationConditionBase
Definition: SCR_ScenarioFrameworkSlotBase.c:677
m_eActivationType
protected SCR_ScenarioFrameworkEActivationType m_eActivationType
Definition: SCR_ScenarioFrameworkLayerBase.c:43
SCR_EntityHelper
Definition: SCR_EntityHelper.c:1
SCR_Enum
Definition: SCR_Enum.c:1
GetName
string GetName()
Definition: SCR_ScenarioFrameworkLayerBase.c:85
m_bInitiated
protected bool m_bInitiated
Definition: SCR_ScenarioFrameworkLayerBase.c:72
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
SCR_ScenarioFrameworkSlotBaseClass
Definition: SCR_ScenarioFrameworkSlotBase.c:2
DecreaseAIGroupMemberCount
void DecreaseAIGroupMemberCount(SCR_AIGroup group, AIAgent agent)
Definition: SCR_ScenarioFrameworkSlotAI.c:490
Init
override void Init(SCR_ScenarioFrameworkArea area=null, SCR_ScenarioFrameworkEActivationType activation=SCR_ScenarioFrameworkEActivationType.SAME_AS_PARENT)
Definition: SCR_ScenarioFrameworkSlotAI.c:123
m_aAIPrefabsForRemoval
ref array< ResourceName > m_aAIPrefabsForRemoval
Definition: SCR_ScenarioFrameworkSlotAI.c:49
SCR_ScenarioFrameworkWaypointSet
Definition: SCR_ScenarioFrameworkSlotAI.c:566
GetOnAllChildrenSpawned
ScriptInvokerScenarioFrameworkLayer GetOnAllChildrenSpawned()
Definition: SCR_ScenarioFrameworkLayerBase.c:450
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
m_bEnableRepeatedSpawn
protected bool m_bEnableRepeatedSpawn
Definition: SCR_ScenarioFrameworkLayerBase.c:31
m_aWaypoints
ref array< AIWaypoint > m_aWaypoints
Definition: SCR_ScenarioFrameworkSlotAI.c:47
SetWaypointToAI
protected void SetWaypointToAI(SCR_ScenarioFrameworkLayerBase layer)
Definition: SCR_ScenarioFrameworkSlotAI.c:419
m_aActivationActions
protected ref array< ref SCR_ScenarioFrameworkActionBase > m_aActivationActions
Definition: SCR_ScenarioFrameworkLayerBase.c:49
SCR_StringHelper
Definition: SCR_StringHelper.c:1
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
m_Entity
enum EAITargetInfoCategory m_Entity
m_eAICombatType
EAICombatType m_eAICombatType
Definition: SCR_ScenarioFrameworkSlotAI.c:39
m_bExcludeFromDynamicDespawn
protected bool m_bExcludeFromDynamicDespawn
Definition: SCR_ScenarioFrameworkLayerBase.c:52
SetIsTerminated
void SetIsTerminated(bool state)
Definition: SCR_ScenarioFrameworkLayerBase.c:106
m_bWaypointsInitialized
bool m_bWaypointsInitialized
Definition: SCR_ScenarioFrameworkSlotAI.c:55
SCR_ScenarioFrameworkSlotWaypoint
void SCR_ScenarioFrameworkSlotWaypoint(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_ScenarioFrameworkSlotWaypoint.c:142
category
Prefabs AI Waypoints AIWaypoint_Defend category
Definition: SCR_ScenarioFrameworkSlotAI.c:18
GetMaxPlayersForGameMode
int GetMaxPlayersForGameMode(FactionKey factionName="")
Definition: SCR_ScenarioFrameworkLayerBase.c:166
GetOrigin
vector GetOrigin()
Definition: SCR_AIUtilityComponent.c:279
SCR_ScenarioFrameworkWaypointCycle
Definition: SCR_ScenarioFrameworkWaypointCycle.c:3
m_iRepeatedSpawnNumber
protected int m_iRepeatedSpawnNumber
Definition: SCR_ScenarioFrameworkLayerBase.c:34
SCR_EAIGroupFormation
SCR_EAIGroupFormation
Definition: SCR_AIGroup.c:2337
RestoreToDefault
override void RestoreToDefault(bool includeChildren=false, bool reinitAfterRestoration=false)
Definition: SCR_ScenarioFrameworkSlotAI.c:73
SCR_ScenarioFrameworkSlotBase
void SCR_ScenarioFrameworkSlotBase(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_ScenarioFrameworkSlotBase.c:661
InitGroupComponents
protected void InitGroupComponents()
Definition: SCR_ScenarioFrameworkSlotAI.c:276
AfterAllChildrenSpawned
override void AfterAllChildrenSpawned(SCR_ScenarioFrameworkLayerBase layer)
Definition: SCR_ScenarioFrameworkSlotAI.c:170
m_sGroupPrefab
ResourceName m_sGroupPrefab
Definition: SCR_ScenarioFrameworkSlotAI.c:45
m_bDynamicallyDespawned
protected bool m_bDynamicallyDespawned
Definition: SCR_ScenarioFrameworkLayerBase.c:74
SCR_ScenarioFrameworkArea
Definition: SCR_ScenarioFrameworkArea.c:24
BaseContainerProps
class SCR_ScenarioFrameworkWaypointSet BaseContainerProps()] class SCR_WaypointSet
This will remain here for a while until we switch all the waypoints to the SCR_ScenarioFrameworkWaypo...
Definition: SCR_ScenarioFrameworkSlotAI.c:580
m_AIGroup
SCR_AIGroup m_AIGroup
Definition: SCR_ScenarioFrameworkSlotAI.c:48
InitWaypoints
protected void InitWaypoints()
Definition: SCR_ScenarioFrameworkSlotAI.c:328
m_eAIGroupFormation
SCR_EAIGroupFormation m_eAIGroupFormation
Definition: SCR_ScenarioFrameworkSlotAI.c:27
GetPlayersCount
int GetPlayersCount()
Definition: SCR_FiringRangeScoringComponent.c:114
SCR_ScenarioFrameworkSlotAI
void SCR_ScenarioFrameworkSlotAI(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_ScenarioFrameworkSlotAI.c:558
OnAgentAdded
void OnAgentAdded(AIAgent child)
Definition: SCR_ScenarioFrameworkSlotAI.c:259
Attribute
SCR_ScenarioFrameworkSlotAIClass SCR_ScenarioFrameworkSlotBaseClass Attribute(desc:"Waypoint Groups if applicable", category:"Waypoints")
Definition: SCR_ScenarioFrameworkSlotAI.c:8
m_aSlotWaypoints
ref array< SCR_ScenarioFrameworkSlotWaypoint > m_aSlotWaypoints
Definition: SCR_ScenarioFrameworkSlotAI.c:51
m_iDebugShapeColor
protected int m_iDebugShapeColor
Definition: SCR_ScenarioFrameworkLayerBase.c:69
SCR_ScenarioFrameworkPlugin
Definition: SCR_ScenarioFrameworkLayerBase.c:888
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
GetAIPrefabsForRemoval
array< ResourceName > GetAIPrefabsForRemoval()
Definition: SCR_ScenarioFrameworkSlotAI.c:66
m_ParentLayer
protected SCR_ScenarioFrameworkLayerBase m_ParentLayer
Definition: SCR_ScenarioFrameworkLayerBase.c:65
m_bIsTerminated
protected bool m_bIsTerminated
Definition: SCR_ScenarioFrameworkLayerBase.c:75
SCR_ScenarioFrameworkSlotAIClass
Definition: SCR_ScenarioFrameworkSlotAI.c:2
SCR_AIGroup
Definition: SCR_AIGroup.c:68
m_iMinUnitsInGroup
int m_iMinUnitsInGroup
Definition: SCR_ScenarioFrameworkSlotAI.c:24
SCR_ScenarioFrameworkLayerBase
void SCR_ScenarioFrameworkLayerBase(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_ScenarioFrameworkLayerBase.c:875
m_fPerceptionFactor
float m_fPerceptionFactor
Definition: SCR_ScenarioFrameworkSlotAI.c:42
m_eAISkill
EAISkill m_eAISkill
Definition: SCR_ScenarioFrameworkSlotAI.c:36
ProcessWaypoints
protected void ProcessWaypoints(SCR_ScenarioFrameworkLayerBase layer)
Definition: SCR_ScenarioFrameworkSlotAI.c:409
CreateDefaultWaypoint
protected AIWaypoint CreateDefaultWaypoint()
Definition: SCR_ScenarioFrameworkSlotAI.c:465
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
m_vPosition
vector m_vPosition
Definition: SCR_AITalkRequest.c:23
m_aSpawnedEntities
protected ref array< IEntity > m_aSpawnedEntities
Definition: SCR_ScenarioFrameworkLayerBase.c:62
AfterAllAgentsSpawned
void AfterAllAgentsSpawned()
Definition: SCR_ScenarioFrameworkSlotAI.c:184
ActivateAI
void ActivateAI()
Definition: SCR_ScenarioFrameworkSlotAI.c:205
m_bBalanceOnPlayersCount
bool m_bBalanceOnPlayersCount
Definition: SCR_ScenarioFrameworkSlotAI.c:21
CreateAIGroup
protected bool CreateAIGroup()
Definition: SCR_ScenarioFrameworkSlotAI.c:526
m_sName
protected LocalizedString m_sName
Definition: SCR_GroupIdentityComponent.c:19
CheckWaypointsAfterInit
protected void CheckWaypointsAfterInit(SCR_ScenarioFrameworkLayerBase layer)
Definition: SCR_ScenarioFrameworkSlotAI.c:380
m_aActivationConditions
protected ref array< ref SCR_ScenarioFrameworkActivationConditionBase > m_aActivationConditions
Definition: SCR_ScenarioFrameworkLayerBase.c:46
m_iCurrentlySpawnedWaypoints
int m_iCurrentlySpawnedWaypoints
Definition: SCR_ScenarioFrameworkSlotAI.c:52
SetAIPrefabsForRemoval
void SetAIPrefabsForRemoval(array< ResourceName > arrayForRemoval)
Definition: SCR_ScenarioFrameworkSlotAI.c:59