Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkSlotTaskAI.c File Reference

Go to the source code of this file.

Classes

class  SCR_ScenarioFrameworkSlotTaskAIClass

Functions

SCR_ScenarioFrameworkSlotTaskAIClass SCR_ScenarioFrameworkSlotTaskClass Attribute (desc:"Waypoint Groups if applicable", category:"Waypoints")
void SetAIPrefabsForRemoval (array< ResourceName > arrayForRemoval)
array< ResourceNameGetAIPrefabsForRemoval ()
override void RestoreToDefault (bool includeChildren=false, bool reinitAfterRestoration=false, bool affectRandomization=true, bool deleteSpawnedEntities=true)
override void DynamicDespawn (SCR_ScenarioFrameworkLayerBase layer)
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)
override bool InitOtherThings ()
override void AfterAllChildrenSpawned (SCR_ScenarioFrameworkLayerBase layer)
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 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)
void ProcessWaypoints (SCR_ScenarioFrameworkLayerBase layer)
void SetWaypointToAI (SCR_ScenarioFrameworkLayerBase layer)
AIWaypoint CreateDefaultWaypoint ()
void DecreaseAIGroupMemberCount (SCR_AIGroup group, AIAgent agent)
bool CreateAIGroup ()

Variables

Prefabs AI Waypoints AIWaypoint_Defend et
Prefabs AI Waypoints AIWaypoint_Defend category
bool m_bBalanceOnPlayersCount
int m_iMinUnitsInGroup
bool m_bExcludeFromDynamicDespawnOnVehicleEntered
SCR_EAIGroupFormation m_eAIGroupFormation
EAISkill m_eAISkill
float m_fPerceptionFactor
ResourceName m_sGroupPrefab
ref array< AIWaypoint > m_aWaypoints = {}
SCR_AIGroup m_AIGroup
ref array< ResourceNamem_aAIPrefabsForRemoval = {}
ref array< SCR_ScenarioFrameworkSlotWaypointm_aSlotWaypoints = {}
int m_iCurrentlySpawnedWaypoints
bool m_bWaypointsInitialized
bool m_bGroupWasNull

Function Documentation

◆ AfterAllAgentsSpawned()

void AfterAllAgentsSpawned ( )
protected

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

Definition at line 192 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ AfterAllChildrenSpawned()

override void AfterAllChildrenSpawned ( SCR_ScenarioFrameworkLayerBase layer)
protected

Initializes AI after all children spawned, removes event handler.

Parameters
[in]layerfor which this is called

Definition at line 178 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ Attribute()

SCR_ScenarioFrameworkSlotTaskAIClass SCR_ScenarioFrameworkSlotTaskClass Attribute ( desc:"Waypoint Groups if applicable" ,
category:"Waypoints"  )

Definition at line 1 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ CheckWaypointsAfterInit()

void 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

Definition at line 447 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ CreateAIGroup()

bool 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.

Definition at line 645 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ CreateDefaultWaypoint()

AIWaypoint 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.

Definition at line 583 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ DecreaseAIGroupMemberCount()

void DecreaseAIGroupMemberCount ( SCR_AIGroup group,
AIAgent agent )
protected

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

Definition at line 608 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ DynamicDespawn()

override void DynamicDespawn ( SCR_ScenarioFrameworkLayerBase layer)

Dynamically despawns this layer.

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

Definition at line 83 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ GetAIPrefabsForRemoval()

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

Definition at line 58 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ InitGroupComponents()

void InitGroupComponents ( )
protected

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

Definition at line 292 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ InitOtherThings()

override bool InitOtherThings ( )
protected

Clears cached values and handles Waypoint Sets

Returns
true if all initialization steps succeed, false otherwise.

Definition at line 161 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ InitWaypoints()

void InitWaypoints ( )
protected

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

Definition at line 390 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ OnAgentCompartmentEntered()

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

Definition at line 120 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ OnAgentCompartmentLeft()

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

Definition at line 132 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ ProcessWaypoints()

void 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

Definition at line 477 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ RestoreToDefault()

override void RestoreToDefault ( bool includeChildren = false,
bool reinitAfterRestoration = false,
bool affectRandomization = true,
bool deleteSpawnedEntities = 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.

Definition at line 68 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ SetAIPrefabsForRemoval()

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

Definition at line 51 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ SetWaypointToAI()

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

Definition at line 487 of file SCR_ScenarioFrameworkSlotTaskAI.c.

Variable Documentation

◆ category

Prefabs AI Waypoints AIWaypoint_Defend category

Definition at line 14 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ et

Prefabs AI Waypoints AIWaypoint_Defend et

Definition at line 14 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_aAIPrefabsForRemoval

ref array<ResourceName> m_aAIPrefabsForRemoval = {}

Definition at line 40 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_AIGroup

SCR_AIGroup m_AIGroup

Definition at line 39 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_aSlotWaypoints

ref array<SCR_ScenarioFrameworkSlotWaypoint> m_aSlotWaypoints = {}

Definition at line 42 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_aWaypoints

ref array<AIWaypoint> m_aWaypoints = {}

Definition at line 38 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_bBalanceOnPlayersCount

bool m_bBalanceOnPlayersCount

Definition at line 18 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_bExcludeFromDynamicDespawnOnVehicleEntered

bool m_bExcludeFromDynamicDespawnOnVehicleEntered

Definition at line 24 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_bGroupWasNull

bool m_bGroupWasNull

Definition at line 47 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_bWaypointsInitialized

bool m_bWaypointsInitialized

Definition at line 46 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_eAIGroupFormation

SCR_EAIGroupFormation m_eAIGroupFormation

Definition at line 27 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_eAISkill

EAISkill m_eAISkill

Definition at line 30 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_fPerceptionFactor

float m_fPerceptionFactor

Definition at line 33 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_iCurrentlySpawnedWaypoints

int m_iCurrentlySpawnedWaypoints

Definition at line 43 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_iMinUnitsInGroup

int m_iMinUnitsInGroup

Definition at line 21 of file SCR_ScenarioFrameworkSlotTaskAI.c.

◆ m_sGroupPrefab

ResourceName m_sGroupPrefab

Definition at line 36 of file SCR_ScenarioFrameworkSlotTaskAI.c.