Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
SCR_ScenarioFrameworkSlotTaskAI Interface Reference
Inheritance diagram for SCR_ScenarioFrameworkSlotTaskAI:
[legend]

Public Member Functions

void SetAIPrefabsForRemoval (array< ResourceName > arrayForRemoval)
 
array< ResourceName > GetAIPrefabsForRemoval ()
 
override void RestoreToDefault (bool includeChildren=false, bool reinitAfterRestoration=false, bool affectRandomization=true)
 Restores default settings, clears waypoints, AI group, prefabs, slots, and initializes randomization.
 
override void DynamicDespawn (SCR_ScenarioFrameworkLayerBase layer)
 Dynamically despawns this layer.
 
override bool InitOtherThings ()
 Clears cached values and handles Waypoint Sets.
 
override void AfterAllChildrenSpawned (SCR_ScenarioFrameworkLayerBase layer)
 Initializes AI after all children spawned, removes event handler.
 
void AfterAllAgentsSpawned ()
 Initializes plugins, actions, and checks for parent layer spawn completion, then sets waypoints for AI if not initialized.
 
void ActivateAI ()
 Activates AI group, removes unwanted prefabs, balances units count, sets on agent remove and add events,.
 
void OnAgentAdded (AIAgent child)
 
void DecreaseAIGroupMemberCount (SCR_AIGroup group, AIAgent agent)
 Decreases AI group member count, handles termination if group empty, adds removed AI entity prefab to removal list.
 
- Public Member Functions inherited from SCR_ScenarioFrameworkSlotTask
void OnTaskStateChanged (SCR_TaskState newState)
 
void SetTaskResolvedBeforeLoad (bool state)
 
LocalizedString GetTaskTitle (int iState=0)
 Returns localized string for task title based on current state.
 
LocalizedString GetTaskExecutionBriefing ()
 
string GetTaskDescription (int iState=0)
 Returns the description of the current task based on its state.
 
SCR_TaskState GetTaskState ()
 
SCR_ScenarioFrameworkLayerTask GetParentTaskLayer ()
 
override void RestoreToDefault (bool includeChildren=false, bool reinitAfterRestoration=false, bool affectRandomization=true)
 Resets all action activations, cancels task, and restores default settings.
 
override void DynamicReinit ()
 Initializes scenario with same activation type as parent.
 
override void DynamicDespawn (SCR_ScenarioFrameworkLayerBase layer)
 Removes self from dynamic despawn list, if not already spawned, initiates despawn, removes inventory change event.
 
override bool InitNotTerminated ()
 Checks if layer is not terminated, spawns children if parent exists, returns false if terminated or children not spawnned.
 
override bool InitEntitySpawnCheck ()
 Spawn check for entity initiation, handles termination if no entity, returns true if entity exists, false otherwise.
 
override void FinishInit ()
 Finishes initialization, sets termination flag, and calls base class FinishInit.
 
void ~SCR_ScenarioFrameworkSlotTask ()
 Removes current task from support entity if in scenario mode, otherwise despawns self.
 
- Public Member Functions inherited from SCR_ScenarioFrameworkSlotBase
void OnObjectDamage (EDamageState state)
 
void OnInventoryParentChanged (InventoryStorageSlot oldSlot, InventoryStorageSlot newSlot)
 Method changes inventory parent slot and sets dynamic despawn exclusion for an entity.
 
void OnCompartmentEntered (IEntity vehicle, BaseCompartmentManagerComponent mgr, IEntity occupant, int managerId, int slotID)
 Excludes vehicle from dynamic despawning when entering a component.
 
string GetOverriddenObjectDisplayName ()
 
void SetOverriddenObjectDisplayName (string name)
 
string GetSpawnedEntityDisplayName ()
 
SCR_ScenarioFrameworkArea GetAreaWB ()
 
string GetSpawnedObjectName ()
 
ResourceName GetObjectToSpawn ()
 
ResourceName GetSelectedObjectToSpawn ()
 First attempts to get get teh Fction Switched Object for the provided faciton key, then falls back to m_sObjectToSpawn.
 
ResourceName GetRandomlySpawnedObject ()
 
void SetRandomlySpawnedObject (ResourceName name)
 
override void RestoreToDefault (bool includeChildren=false, bool reinitAfterRestoration=false, bool affectRandomization=true)
 Restores default settings, clears random object, resets position, calls superclass method.
 
override void DynamicDespawn (SCR_ScenarioFrameworkLayerBase layer)
 //! Dynamically despawns this layer.
 
override bool InitAlreadyHappened ()
 Initializes whether an init has already happened, but for slots it always returns false.
 
bool InitRepeatableSpawn ()
 Checks if object already exists, disables repetition and logs error.
 
bool InitEntitySpawnCheck ()
 Checks if entity is spawned, if not, waits for all children to spawn then checks again.
 
bool InitEntitySpawn ()
 Spawns entity if not existing or queries objects in range, checks initiation success.
 
override bool InitOtherThings ()
 Initializes selected object, repeatable spawn, and entity spawn.
 
override void FinishInit ()
 Finishes initialization, assigns unique ID, sets up damage manager, event handlers, inventory, and garbage system if applicable.
 
override void Init (SCR_ScenarioFrameworkArea area=null, SCR_ScenarioFrameworkEActivationType activation=SCR_ScenarioFrameworkEActivationType.SAME_AS_PARENT)
 Initializes scenario framework slot.
 
override void AfterAllChildrenSpawned (SCR_ScenarioFrameworkLayerBase layer)
 Initializes plugins, actions, and checks if parent layer has all children spawned after all children have spawned in scenario framework.
 
override void SpawnChildren (bool previouslyRandomized=false)
 Slot cannot have children.
 
ResourceName GetRandomAsset (out ResourceName prefab)
 Randomly selects an entity from a catalog based on provided parameters, handles error cases, and returns the prefab of the.
 
IEntity SpawnAsset ()
 Spawns random asset, sets position, ignores terrain orientation, requests navmesh rebuild, adds to spawned entities.
 
override void _WB_AfterWorldUpdate (IEntity owner, float timeSlice)
 Draws debug shape based on m_bShowDebugShapesInWorkbench setting in Workbench after world update.
 
override void _WB_SetTransform (IEntity owner, inout vector mat[4], IEntitySource src)
 Sets preview entity's transform or teleports it if it's a BaseGameEntity.
 
void SpawnEntityPreview (IEntity owner, Resource resource)
 Spawns preview entity for given resource at owner's position.
 
override void _WB_OnInit (IEntity owner, inout vector mat[4], IEntitySource src)
 Initializes preview entity, deletes previous one, loads resource, and spawns entity preview if resource is valid.
 
override bool _WB_OnKeyChanged (IEntity owner, BaseContainer src, string key, BaseContainerList ownerContainers, IEntity parent)
 Manages key changes for debug shapes, object spawning, and entity deletion in Workbench.
 
void SCR_ScenarioFrameworkSlotBase (IEntityComponentSource src, IEntity ent, IEntity parent)
 
void ~SCR_ScenarioFrameworkSlotBase ()
 Deletes preview entity in workbench mode, returns if in edit mode, otherwise despawns scenario slot base.
 
- Public Member Functions inherited from SCR_ScenarioFrameworkLayerBase
string GetName ()
 
void SetEntity (IEntity entity)
 
bool GetIsTerminated ()
 
void SetIsTerminated (bool state)
 
void SetRandomlySpawnedChildren (array< string > randomlySpawnedChildren)
 
void AddRandomlySpawnedChild (SCR_ScenarioFrameworkLayerBase child)
 Adds child to list if not already present, ensuring uniqueness.
 
array< SCR_ScenarioFrameworkLayerBaseGetRandomlySpawnedChildren ()
 
int GetPlayersCount (FactionKey factionName="")
 Counts players in specified faction.
 
int GetMaxPlayersForGameMode (FactionKey factionName="")
 Determines maximum players for a mission based on its mode, returns 4 if mission header is invalid.
 
SCR_ScenarioFrameworkArea GetParentArea ()
 
void GetAllLayers (out notnull array< SCR_ScenarioFrameworkLayerBase > layers)
 Gathers all layers from child entities and their siblings, adding them to the provided array.
 
void GetAllLayers (out notnull array< SCR_ScenarioFrameworkLayerBase > layers, SCR_ScenarioFrameworkEActivationType activationType)
 Gathers all layers from child entities and their siblings, adding them to the provided array, filtered by activation type.
 
void GetAllLayerTasks (out notnull array< SCR_ScenarioFrameworkLayerTask > layerTasks)
 Gathers all layer tasks from child entities and their siblings, adding them to the provided array.
 
void GetAllSlotTasks (out notnull array< SCR_ScenarioFrameworkSlotTask > slotTasks)
 Gets all slot tasks from all layers in the hierarchy of the owner entity, including sibling layers' tasks.
 
SCR_ScenarioFrameworkLayerTask GetLayerTask ()
 
SCR_ScenarioFrameworkSlotTask GetSlotTask (array< SCR_ScenarioFrameworkLayerBase > aLayers)
 Retrieves slot task from layer child entities.
 
void SetParentLayer (SCR_ScenarioFrameworkLayerBase parentLayer)
 
SCR_ScenarioFrameworkLayerBase GetParentLayer ()
 
SCR_EScenarioFrameworkSpawnChildrenType GetSpawnChildrenType ()
 
bool GetEnableRepeatedSpawn ()
 
void SetEnableRepeatedSpawn (bool value)
 
SCR_ScenarioFrameworkEActivationType GetActivationType ()
 
void SetActivationType (SCR_ScenarioFrameworkEActivationType activationType)
 
bool GetIsInitiated ()
 
bool GetDynamicDespawnExcluded ()
 
void SetDynamicDespawnExcluded (bool excluded)
 
array< IEntity > GetSpawnedEntities ()
 
array< SCR_ScenarioFrameworkLayerBaseGetChildrenEntities ()
 
SCR_ScenarioFrameworkLayerBase GetRandomChildren ()
 
void GetChildren (out array< SCR_ScenarioFrameworkLayerBase > children)
 Reverses and inserts children layers into an array.
 
void GetChildren (out array< SCR_ScenarioFrameworkLayerBase > children, SCR_ScenarioFrameworkEActivationType activationType)
 Reverses and inserts children layers into an array, filtered by activation type.
 
void GetLogics (out array< SCR_ScenarioFrameworkLogic > logics)
 Retrieves all child scenario framework logic entities from owner entity and adds them to logics array if not already present.
 
array< SCR_ScenarioFrameworkLogicGetSpawnedLogics ()
 
array< ref SCR_ScenarioFrameworkPluginGetSpawnedPlugins ()
 
int GetRepeatedSpawnNumber ()
 
void SetRepeatedSpawnNumber (int number)
 
ScriptInvokerScenarioFrameworkLayer GetOnAllChildrenSpawned ()
 
void InvokeAllChildrenSpawned ()
 Spawns all children and triggers invoker on completion.
 
void CalculateSupposedSpawnedChildren (bool previouslyRandomized=false)
 Calculates supposed spawned children based on activation type, termination, initiation, and conditions.
 
void CheckAllChildrenSpawned (SCR_ScenarioFrameworkLayerBase layer=null)
 Checks if all children layers have spawned or spawns one randomly if specified.
 
void SpawnChildren (bool previouslyRandomized=false)
 Spawns children based on scenario settings, either all at once or randomly.
 
void SpawnPreviouslyRandomizedChildren ()
 Spawns children with delay based on their index.
 
void SpawnRandomOneChild (bool previouslyRandomized=false)
 Spawns random child object if not previously randomized, else spawns previously randomized children.
 
void SpawnRandomMultipleChildren (bool previouslyRandomized=false)
 Spawns random children based on player count, if previously randomized, uses previous children, otherwise selects from available children.
 
void InitChild (SCR_ScenarioFrameworkLayerBase child)
 Initializes child layer, sets parent layer, and initializes child with parent area and action type.
 
IEntity GetSpawnedEntity ()
 
void RestoreToDefault (bool includeChildren=false, bool reinitAfterRestoration=false, bool affectRandomization=true)
 Restores default settings, clears children, removes spawned entities, optionally reinitializes after restoration.
 
void DynamicDespawn (SCR_ScenarioFrameworkLayerBase layer)
 Dynamically despawns this layer.
 
void DynamicReinit ()
 Reinitializes this layer.
 
bool InitAlreadyHappened ()
 Initialization check if already happened.
 
bool InitParentLayer ()
 Initializes parent layer.
 
bool InitNotTerminated ()
 Checks if layer is not terminated, spawns children if parent exists, returns false if terminated or children not spawnned.
 
bool InitDynDespawnAndActivation (SCR_ScenarioFrameworkEActivationType activation)
 Checks if object is not dynamically despawned, then verifies if activation type matches, spawns all children if.
 
bool InitActivationConditions (bool calledFromInit=false)
 Checks activation conditions for scenario layer, sets condition status based on logic operator, checks parent layer if needed.
 
bool InitArea (SCR_ScenarioFrameworkArea area)
 Initializes area for scenario framework layer.
 
bool InitFactionSettings ()
 Handles inheritance of faction settings from parents.
 
bool InitOtherThings ()
 For situations where some other logic is to be appended in these checks and is to be performed before FinishInit.
 
void FinishInitChildrenInsert ()
 For situations where some other logic is needed to be performed before or after this Insert.
 
void FinishInit ()
 Initializes children, retrieves them, and spawns them.
 
void Init (SCR_ScenarioFrameworkArea area=null, SCR_ScenarioFrameworkEActivationType activation=SCR_ScenarioFrameworkEActivationType.SAME_AS_PARENT)
 Initializes scenario framework layer.
 
void AfterAllChildrenSpawned (SCR_ScenarioFrameworkLayerBase layer)
 Initializes logic, plugins and actions.
 
override void EOnFrame (IEntity owner, float timeSlice)
 Draws debug shapes during runtime if enabled.
 
override void OnPostInit (IEntity owner)
 
void SetDebugShapeSize (float fSize)
 
override void _WB_OnCreate (IEntity owner, IEntitySource src)
 Renames all entities in the owner's children hierarchy.
 
void RenameOwnerEntity (IEntity owner)
 Rename entity owner with default name if not restoring undo/redo.
 
void SCR_ScenarioFrameworkLayerBase (IEntityComponentSource src, IEntity ent, IEntity parent)
 
void ~SCR_ScenarioFrameworkLayerBase ()
 Removes object in edit mode or despawns it if not in edit mode.
 

Public Attributes

ref SCR_ScenarioFrameworkWaypointSet m_WaypointSet
 
bool m_bSpawnAIOnWPPos
 
ResourceName m_sWPToSpawn
 
bool m_bBalanceOnPlayersCount
 
int m_iMinUnitsInGroup
 
bool m_bExcludeFromDynamicDespawnOnVehicleEntered
 
SCR_EAIGroupFormation m_eAIGroupFormation
 
EAISkill m_eAISkill
 
EAICombatType m_eAICombatType
 
float m_fPerceptionFactor
 
ResourceName m_sGroupPrefab
 
ref array< AIWaypoint > m_aWaypoints = {}
 
SCR_AIGroup m_AIGroup
 
ref array< ResourceName > m_aAIPrefabsForRemoval = {}
 
ref array< SCR_ScenarioFrameworkSlotWaypointm_aSlotWaypoints = {}
 
int m_iCurrentlySpawnedWaypoints
 
bool m_bWaypointsInitialized
 
- Public Attributes inherited from SCR_ScenarioFrameworkSlotTask
LocalizedString m_sTaskTitle
 
LocalizedString m_sTaskDescription
 
LocalizedString m_sTaskExecutionBriefing
 
string m_sTaskIntroVoiceline
 
ref array< ref SCR_ScenarioFrameworkActivationConditionBasem_aFinishConditions
 
SCR_EScenarioFrameworkLogicOperators m_eFinishConditionLogic
 
ref array< ref SCR_ScenarioFrameworkActionBasem_aActionsOnFinished
 
ref array< ref SCR_ScenarioFrameworkActionBasem_aActionsOnCreated
 
ref array< ref SCR_ScenarioFrameworkActionBasem_aActionsOnFailed
 
ref array< ref SCR_ScenarioFrameworkActionBasem_aActionsOnProgress
 
ref array< ref SCR_ScenarioFrameworkActionBasem_aActionsOnUpdated
 
SCR_ScenarioFrameworkLayerTask m_TaskLayer
 
bool m_bTaskResolvedBeforeLoad
 
bool m_bTempIsTerminated
 
- Public Attributes inherited from SCR_ScenarioFrameworkSlotBase
ResourceName m_sObjectToSpawn
 
ref array< ref SCR_ScenarioFrameworkFactionSwitchedObjectm_aFactionSwitchedObjects
 
string m_sID
 
bool m_bUseExistingWorldAsset
 
string m_sOverrideObjectDisplayName
 
bool m_bCanBeGarbageCollected
 
bool m_bRandomizePerFaction
 
EEntityCatalogType m_eEntityCatalogType
 
ref array< EEditableEntityLabel > m_aIncludedEditableEntityLabels
 
ref array< EEditableEntityLabel > m_aExcludedEditableEntityLabels
 
bool m_bIncludeOnlySelectedLabels
 
bool m_bIgnoreOrientChildrenToTerrain
 
ref EntitySpawnParams m_SpawnParams = new EntitySpawnParams()
 
vector m_Size
 
ResourceName m_sRandomlySpawnedObject
 
vector m_vPosition
 
bool m_bShowDebugShapesInWorkbench
 
- Public Attributes inherited from SCR_ScenarioFrameworkLayerBase
SCR_EScenarioFrameworkSpawnChildrenType m_SpawnChildren
 
FactionKey m_sFactionKey
 
int m_iRandomPercent
 
bool m_bEnableRepeatedSpawn
 
int m_iRepeatedSpawnNumber
 
float m_fRepeatedSpawnTimer
 
bool m_bShowDebugShapesDuringRuntime
 
SCR_ScenarioFrameworkEActivationType m_eActivationType
 
ref array< ref SCR_ScenarioFrameworkActivationConditionBasem_aActivationConditions
 
SCR_EScenarioFrameworkLogicOperators m_eActivationConditionLogic
 
ref array< ref SCR_ScenarioFrameworkActionBasem_aActivationActions
 
bool m_bExcludeFromDynamicDespawn
 
ref array< ref SCR_ScenarioFrameworkPluginm_aPlugins
 
ref array< SCR_ScenarioFrameworkLayerBasem_aChildren = {}
 
ref array< SCR_ScenarioFrameworkLayerBasem_aRandomlySpawnedChildren = {}
 
ref array< SCR_ScenarioFrameworkLogicm_aLogic = {}
 
ref ScriptInvokerBase< ScriptInvokerScenarioFrameworkLayerMethod > m_OnAllChildrenSpawned
 
ref array< IEntity > m_aSpawnedEntities = {}
 
IEntity m_Entity
 
SCR_ScenarioFrameworkArea m_Area
 
SCR_ScenarioFrameworkLayerBase m_ParentLayer
 
float m_fDebugShapeRadius = 0.25
 
WorldTimestamp m_fRepeatSpawnTimeStart
 
WorldTimestamp m_fRepeatSpawnTimeEnd
 
int m_iDebugShapeColor = ARGB(32, 0xFF, 0x00, 0x12)
 
int m_iCurrentlySpawnedChildren
 
int m_iSupposedSpawnedChildren
 
bool m_bInitiated
 
bool m_bDynamicallyDespawned
 
bool m_bIsTerminated
 
int m_iRepeatedSpawnNumberDefault = m_iRepeatedSpawnNumber
 
SCR_ScenarioFrameworkEActivationType m_eActivationTypeDefault = m_eActivationType
 

Protected Member Functions

void OnAgentCompartmentEntered (AIAgent agent, IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 
void OnAgentCompartmentLeft (AIAgent agent, IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 
void InitGroupComponents ()
 Initializes AI group components, sets formation, and combat parameters for agents in the group.
 
void InitWaypoints ()
 Initializes waypoints by finding them in specified layers, adding them to list, and processing them after initialization.
 
void CheckWaypointsAfterInit (SCR_ScenarioFrameworkLayerBase layer)
 Checks waypoints after init, adds/removes event handler for all waypoints spawned, increments spawned way.
 
void ProcessWaypoints (SCR_ScenarioFrameworkLayerBase layer)
 Initializes waypoints for AI if scenario is initiated, otherwise waits for all children to spawn before setting waypoints.
 
void SetWaypointToAI (SCR_ScenarioFrameworkLayerBase layer)
 
AIWaypoint CreateDefaultWaypoint ()
 Creates default waypoint for AI entity, spawns it in world space, adds it to list.
 
bool CreateAIGroup ()
 Creates an AI group, sets its faction, adds entity to group, and optionally sets entity's position.
 
- Protected Member Functions inherited from SCR_ScenarioFrameworkSlotTask
void StoreTaskSubjectToParentTaskLayer ()
 Binds current task to parent task layer if available, else logs error.
 
- Protected Member Functions inherited from SCR_ScenarioFrameworkSlotBase
void QueryObjectsInRange (float fRange=2.5)
 Queries nearby objects within range for the owner entity.
 
bool GetEntity (notnull IEntity entity)
 Checks if entity matches prefab data, if not, checks if it matches object to spawn, if not, returns true.
 
void InitSelectedObjectToSpawn ()
 If m_bRandomizePerFaction, then catalog system will ignore m_sObjectToSpawn if it has a catalog match. Otherwise it falls back to m_sObjectToSpawn.
 
void InitSelectedObjectToPreview ()
 If m_bRandomizePerFaction, then it will set m_sObjectToSpawn to empty because the the catalog system has not been initialised.
 
- Protected Member Functions inherited from SCR_ScenarioFrameworkLayerBase
void SetFactionKey (FactionKey factionKey)
 
FactionKey GetFactionKey ()
 
FactionKey GetParentFactionKeyRecursive ()
 Climbs the hierarchy tree to find a defined FactionKey.
 
void RepeatedSpawn ()
 Repetitive spawning with timer.
 
void RepeatedSpawnCalled ()
 Repetitive spawning logic with countdown and condition checks.
 
void ActivateLogic ()
 Initializes all logic components.
 
void DrawDebugShape (bool draw)
 Draws debug shape if draw flag is true, creates sphere shape with specified color, flags, position, and radius.
 

Additional Inherited Members

- Static Public Attributes inherited from SCR_ScenarioFrameworkLayerBase
static const int SPAWN_DELAY = 200
 
- Protected Attributes inherited from SCR_ScenarioFrameworkSlotBase
IEntity m_PreviewEntity
 

Member Function Documentation

◆ ActivateAI()

void SCR_ScenarioFrameworkSlotTaskAI.ActivateAI ( )

Activates AI group, removes unwanted prefabs, balances units count, sets on agent remove and add events,.

◆ AfterAllAgentsSpawned()

void SCR_ScenarioFrameworkSlotTaskAI.AfterAllAgentsSpawned ( )

Initializes plugins, actions, and checks for parent layer spawn completion, then sets waypoints for AI if not initialized.

◆ AfterAllChildrenSpawned()

override void SCR_ScenarioFrameworkSlotTaskAI.AfterAllChildrenSpawned ( SCR_ScenarioFrameworkLayerBase  layer)

Initializes AI after all children spawned, removes event handler.

Parameters
[in]layerfor which this is called

Implements SCR_ScenarioFrameworkSlotBase.

◆ CheckWaypointsAfterInit()

void SCR_ScenarioFrameworkSlotTaskAI.CheckWaypointsAfterInit ( SCR_ScenarioFrameworkLayerBase  layer)
protected

Checks waypoints after init, adds/removes event handler for all waypoints spawned, increments spawned way.

Parameters
[in]layerfor which this is called

◆ CreateAIGroup()

bool SCR_ScenarioFrameworkSlotTaskAI.CreateAIGroup ( )
protected

Creates an AI group, sets its faction, adds entity to group, and optionally sets entity's position.

Returns
true if AI group creation is successful, false otherwise.

◆ CreateDefaultWaypoint()

AIWaypoint SCR_ScenarioFrameworkSlotTaskAI.CreateDefaultWaypoint ( )
protected

Creates default waypoint for AI entity, spawns it in world space, adds it to list.

Returns
an AIWaypoint object if successful, otherwise null.

◆ DecreaseAIGroupMemberCount()

void SCR_ScenarioFrameworkSlotTaskAI.DecreaseAIGroupMemberCount ( SCR_AIGroup  group,
AIAgent  agent 
)

Decreases AI group member count, handles termination if group empty, adds removed AI entity prefab to removal list.

Parameters
[in]groupDecreases AI group member count, checks for termination conditions, adds removed AI entity prefab to removal list.
[in]agentAgent represents an AI entity in the game world, controlled by AI group, which is decreased from the group count in this

◆ DynamicDespawn()

override void SCR_ScenarioFrameworkSlotTaskAI.DynamicDespawn ( SCR_ScenarioFrameworkLayerBase  layer)

Dynamically despawns this layer.

Parameters
[in]layerLayer represents the scenario framework layer for dynamic despawning entities in the method.

Implements SCR_ScenarioFrameworkSlotTask.

Implemented in SCR_ScenarioFrameworkSlotDefend.

◆ GetAIPrefabsForRemoval()

array< ResourceName > SCR_ScenarioFrameworkSlotTaskAI.GetAIPrefabsForRemoval ( )
Returns
Array of AI prefab names for removal.

◆ InitGroupComponents()

void SCR_ScenarioFrameworkSlotTaskAI.InitGroupComponents ( )
protected

Initializes AI group components, sets formation, and combat parameters for agents in the group.

◆ InitOtherThings()

override bool SCR_ScenarioFrameworkSlotTaskAI.InitOtherThings ( )

Clears cached values and handles Waypoint Sets.

Returns
true if all initialization steps succeed, false otherwise.

Implements SCR_ScenarioFrameworkSlotBase.

◆ InitWaypoints()

void SCR_ScenarioFrameworkSlotTaskAI.InitWaypoints ( )
protected

Initializes waypoints by finding them in specified layers, adding them to list, and processing them after initialization.

◆ OnAgentAdded()

void SCR_ScenarioFrameworkSlotTaskAI.OnAgentAdded ( AIAgent  child)
Parameters
[in]childChild is an AI Agent added to the group, triggers group component initialization and waypoint setting if necessary.

◆ OnAgentCompartmentEntered()

void SCR_ScenarioFrameworkSlotTaskAI.OnAgentCompartmentEntered ( AIAgent  agent,
IEntity  targetEntity,
BaseCompartmentManagerComponent  manager,
int  mgrID,
int  slotID,
bool  move 
)
protected

◆ OnAgentCompartmentLeft()

void SCR_ScenarioFrameworkSlotTaskAI.OnAgentCompartmentLeft ( AIAgent  agent,
IEntity  targetEntity,
BaseCompartmentManagerComponent  manager,
int  mgrID,
int  slotID,
bool  move 
)
protected

◆ ProcessWaypoints()

void SCR_ScenarioFrameworkSlotTaskAI.ProcessWaypoints ( SCR_ScenarioFrameworkLayerBase  layer)
protected

Initializes waypoints for AI if scenario is initiated, otherwise waits for all children to spawn before setting waypoints.

Parameters
[in]layerfor which this is called

◆ RestoreToDefault()

override void SCR_ScenarioFrameworkSlotTaskAI.RestoreToDefault ( bool  includeChildren = false,
bool  reinitAfterRestoration = false,
bool  affectRandomization = true 
)

Restores default settings, clears waypoints, AI group, prefabs, slots, and initializes randomization.

Parameters
[in]includeChildrenIncludes restoring default settings for child objects as well.
[in]reinitAfterRestorationResets object state after restoration, allowing for fresh initialization.
[in]affectRandomizationAffects whether randomization is reset during default restoration.

Implements SCR_ScenarioFrameworkSlotTask.

◆ SetAIPrefabsForRemoval()

void SCR_ScenarioFrameworkSlotTaskAI.SetAIPrefabsForRemoval ( array< ResourceName >  arrayForRemoval)
Parameters
[in]arrayForRemovalArray of resource names for AI prefab removal.

◆ SetWaypointToAI()

void SCR_ScenarioFrameworkSlotTaskAI.SetWaypointToAI ( SCR_ScenarioFrameworkLayerBase  layer)
protected
Parameters
[in]layerInitializes waypoints for AI group in scenario framework layer.

Member Data Documentation

◆ m_aAIPrefabsForRemoval

ref array<ResourceName> SCR_ScenarioFrameworkSlotTaskAI.m_aAIPrefabsForRemoval = {}

◆ m_AIGroup

SCR_AIGroup SCR_ScenarioFrameworkSlotTaskAI.m_AIGroup

◆ m_aSlotWaypoints

ref array<SCR_ScenarioFrameworkSlotWaypoint> SCR_ScenarioFrameworkSlotTaskAI.m_aSlotWaypoints = {}

◆ m_aWaypoints

ref array<AIWaypoint> SCR_ScenarioFrameworkSlotTaskAI.m_aWaypoints = {}

◆ m_bBalanceOnPlayersCount

bool SCR_ScenarioFrameworkSlotTaskAI.m_bBalanceOnPlayersCount

◆ m_bExcludeFromDynamicDespawnOnVehicleEntered

bool SCR_ScenarioFrameworkSlotTaskAI.m_bExcludeFromDynamicDespawnOnVehicleEntered

◆ m_bSpawnAIOnWPPos

bool SCR_ScenarioFrameworkSlotTaskAI.m_bSpawnAIOnWPPos

◆ m_bWaypointsInitialized

bool SCR_ScenarioFrameworkSlotTaskAI.m_bWaypointsInitialized

◆ m_eAICombatType

EAICombatType SCR_ScenarioFrameworkSlotTaskAI.m_eAICombatType

◆ m_eAIGroupFormation

SCR_EAIGroupFormation SCR_ScenarioFrameworkSlotTaskAI.m_eAIGroupFormation

◆ m_eAISkill

EAISkill SCR_ScenarioFrameworkSlotTaskAI.m_eAISkill

◆ m_fPerceptionFactor

float SCR_ScenarioFrameworkSlotTaskAI.m_fPerceptionFactor

◆ m_iCurrentlySpawnedWaypoints

int SCR_ScenarioFrameworkSlotTaskAI.m_iCurrentlySpawnedWaypoints

◆ m_iMinUnitsInGroup

int SCR_ScenarioFrameworkSlotTaskAI.m_iMinUnitsInGroup

◆ m_sGroupPrefab

ResourceName SCR_ScenarioFrameworkSlotTaskAI.m_sGroupPrefab

◆ m_sWPToSpawn

ResourceName SCR_ScenarioFrameworkSlotTaskAI.m_sWPToSpawn

◆ m_WaypointSet

ref SCR_ScenarioFrameworkWaypointSet SCR_ScenarioFrameworkSlotTaskAI.m_WaypointSet

The documentation for this interface was generated from the following file: