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

Public Member Functions

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

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
 

Static Public Attributes

static const int SPAWN_DELAY = 200
 

Protected Member Functions

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.
 

Constructor & Destructor Documentation

◆ SCR_ScenarioFrameworkLayerBase()

void SCR_ScenarioFrameworkLayerBase.SCR_ScenarioFrameworkLayerBase ( IEntityComponentSource  src,
IEntity  ent,
IEntity  parent 
)
Parameters
[in]src
[in]ent
[in]parent

◆ ~SCR_ScenarioFrameworkLayerBase()

void SCR_ScenarioFrameworkLayerBase.~SCR_ScenarioFrameworkLayerBase ( )

Removes object in edit mode or despawns it if not in edit mode.

Member Function Documentation

◆ _WB_OnCreate()

override void SCR_ScenarioFrameworkLayerBase._WB_OnCreate ( IEntity  owner,
IEntitySource  src 
)

Renames all entities in the owner's children hierarchy.

Parameters
[in]ownerRenames owner entity and its children in hierarchy.
[in]srcSource entity representing the parent object creating this scripted object.

◆ ActivateLogic()

void SCR_ScenarioFrameworkLayerBase.ActivateLogic ( )
protected

Initializes all logic components.

◆ AddRandomlySpawnedChild()

void SCR_ScenarioFrameworkLayerBase.AddRandomlySpawnedChild ( SCR_ScenarioFrameworkLayerBase  child)

Adds child to list if not already present, ensuring uniqueness.

Parameters
[in]childAdds child object to list of randomly spawned children if it's not already in the list.

◆ AfterAllChildrenSpawned()

void SCR_ScenarioFrameworkLayerBase.AfterAllChildrenSpawned ( SCR_ScenarioFrameworkLayerBase  layer)

◆ CalculateSupposedSpawnedChildren()

void SCR_ScenarioFrameworkLayerBase.CalculateSupposedSpawnedChildren ( bool  previouslyRandomized = false)

Calculates supposed spawned children based on activation type, termination, initiation, and conditions.

Parameters
[in]previouslyRandomizedindicates whether children layers were spawned randomly previously.

◆ CheckAllChildrenSpawned()

void SCR_ScenarioFrameworkLayerBase.CheckAllChildrenSpawned ( SCR_ScenarioFrameworkLayerBase  layer = null)

Checks if all children layers have spawned or spawns one randomly if specified.

Parameters
[in]layerfor which this check is invoked.

◆ DrawDebugShape()

void SCR_ScenarioFrameworkLayerBase.DrawDebugShape ( bool  draw)
protected

Draws debug shape if draw flag is true, creates sphere shape with specified color, flags, position, and radius.

Parameters
[in]drawdebug shape if draw is true, otherwise does nothing.

Implemented in SCR_ScenarioFrameworkArea, and SCR_ScenarioFrameworkSlotWaypoint.

◆ DynamicDespawn()

void SCR_ScenarioFrameworkLayerBase.DynamicDespawn ( SCR_ScenarioFrameworkLayerBase  layer)

◆ DynamicReinit()

void SCR_ScenarioFrameworkLayerBase.DynamicReinit ( )

◆ EOnFrame()

override void SCR_ScenarioFrameworkLayerBase.EOnFrame ( IEntity  owner,
float  timeSlice 
)

Draws debug shapes during runtime if enabled.

Parameters
[in]ownerrepresents the owner entity of this layer.
[in]timeSlicerepresents the time interval for which the method is called during each frame.

Implemented in SCR_ScenarioFrameworkLayerTaskDefend.

◆ FinishInit()

void SCR_ScenarioFrameworkLayerBase.FinishInit ( )

◆ FinishInitChildrenInsert()

void SCR_ScenarioFrameworkLayerBase.FinishInitChildrenInsert ( )

For situations where some other logic is needed to be performed before or after this Insert.

Implemented in SCR_ScenarioFrameworkSlotDelivery.

◆ GetActivationType()

SCR_ScenarioFrameworkEActivationType SCR_ScenarioFrameworkLayerBase.GetActivationType ( )
Returns
Represents the activation type.

◆ GetAllLayers() [1/2]

void SCR_ScenarioFrameworkLayerBase.GetAllLayers ( out notnull array< SCR_ScenarioFrameworkLayerBase layers)

Gathers all layers from child entities and their siblings, adding them to the provided array.

Parameters
[out]layersRepresents all layers in this layer hierarchy.

◆ GetAllLayers() [2/2]

void SCR_ScenarioFrameworkLayerBase.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.

Parameters
[out]layersRepresents all layers in this layer hierarchy.
[in]activationTypethat will filter output layers.

◆ GetAllLayerTasks()

void SCR_ScenarioFrameworkLayerBase.GetAllLayerTasks ( out notnull array< SCR_ScenarioFrameworkLayerTask layerTasks)

Gathers all layer tasks from child entities and their siblings, adding them to the provided array.

Parameters
[out]layerTasksRepresents all tasks associated with layers in the scenario hierarchy.

◆ GetAllSlotTasks()

void SCR_ScenarioFrameworkLayerBase.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.

Parameters
[out]slotTasksRepresents all slot tasks from the current entity and its siblings in the hierarchy.

◆ GetChildren() [1/2]

void SCR_ScenarioFrameworkLayerBase.GetChildren ( out array< SCR_ScenarioFrameworkLayerBase children)

Reverses and inserts children layers into an array.

Parameters
[out]childrenReturns an array of child entities with SCR_ScenarioFrameworkLayerBase component, reversed and then inserted into the main

◆ GetChildren() [2/2]

void SCR_ScenarioFrameworkLayerBase.GetChildren ( out array< SCR_ScenarioFrameworkLayerBase children,
SCR_ScenarioFrameworkEActivationType  activationType 
)

Reverses and inserts children layers into an array, filtered by activation type.

Parameters
[out]childrenReturns an array of child entities with SCR_ScenarioFrameworkLayerBase component, reversed and then inserted into the main

◆ GetChildrenEntities()

array< SCR_ScenarioFrameworkLayerBase > SCR_ScenarioFrameworkLayerBase.GetChildrenEntities ( )
Returns
an array of child entities in the scenario framework layer.

◆ GetDynamicDespawnExcluded()

bool SCR_ScenarioFrameworkLayerBase.GetDynamicDespawnExcluded ( )
Returns
Represents whether the layer is excluded from dynamic despawning.

◆ GetEnableRepeatedSpawn()

bool SCR_ScenarioFrameworkLayerBase.GetEnableRepeatedSpawn ( )
Returns
Represents whether repeated spawning is enabled or not.

◆ GetFactionKey()

FactionKey SCR_ScenarioFrameworkLayerBase.GetFactionKey ( )
protected
Returns
Faction key representing the faction this layer has assigned.

◆ GetIsInitiated()

bool SCR_ScenarioFrameworkLayerBase.GetIsInitiated ( )
Returns
Indicates if the layer has been initiated.

◆ GetIsTerminated()

bool SCR_ScenarioFrameworkLayerBase.GetIsTerminated ( )
Returns
whether the layer is terminated or not.

◆ GetLayerTask()

SCR_ScenarioFrameworkLayerTask SCR_ScenarioFrameworkLayerBase.GetLayerTask ( )
Returns
the ScenarioFrameworkLayerTask that this layer is nested into

Implemented in SCR_ScenarioFrameworkArea.

◆ GetLogics()

void SCR_ScenarioFrameworkLayerBase.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.

Parameters
[out]logicsRetrieves all child scenario framework logic entities from owner entity and adds them to logics array if not already present.

◆ GetMaxPlayersForGameMode()

int SCR_ScenarioFrameworkLayerBase.GetMaxPlayersForGameMode ( FactionKey  factionName = "")

Determines maximum players for a mission based on its mode, returns 4 if mission header is invalid.

Parameters
[in]factionNameFaction name is the identifier for the faction in the game mode, used to determine the maximum number of players allowed in
Returns
Maximum players allowed for the current game mode based on the specified faction.

◆ GetName()

string SCR_ScenarioFrameworkLayerBase.GetName ( )
Returns
the name of the owner entity.

◆ GetOnAllChildrenSpawned()

ScriptInvokerScenarioFrameworkLayer SCR_ScenarioFrameworkLayerBase.GetOnAllChildrenSpawned ( )
Returns
a ScriptInvokerBase object representing the invoker triggered when all children have spawned in ScenarioFrameworkLayer.

◆ GetParentArea()

SCR_ScenarioFrameworkArea SCR_ScenarioFrameworkLayerBase.GetParentArea ( )
Returns
parent area of the entity or null if not found.

◆ GetParentFactionKeyRecursive()

FactionKey SCR_ScenarioFrameworkLayerBase.GetParentFactionKeyRecursive ( )
protected

Climbs the hierarchy tree to find a defined FactionKey.

Only reccomended to use in Workbench for object preview. When the Game is running, directly reference m_sFactionKey or GetFactionKey().

◆ GetParentLayer()

SCR_ScenarioFrameworkLayerBase SCR_ScenarioFrameworkLayerBase.GetParentLayer ( )
Returns
parent layer entity or null if no parent layer exists.

◆ GetPlayersCount()

int SCR_ScenarioFrameworkLayerBase.GetPlayersCount ( FactionKey  factionName = "")

Counts players in specified faction.

Parameters
[in]factionNameFactionName is the key identifier for a faction in the game, used to determine player count within that faction.
Returns
count of players in specified faction.

◆ GetRandomChildren()

SCR_ScenarioFrameworkLayerBase SCR_ScenarioFrameworkLayerBase.GetRandomChildren ( )
Returns
Randomly selected child object from the list of children.

◆ GetRandomlySpawnedChildren()

array< SCR_ScenarioFrameworkLayerBase > SCR_ScenarioFrameworkLayerBase.GetRandomlySpawnedChildren ( )
Returns
Randomly spawned children layers

◆ GetRepeatedSpawnNumber()

int SCR_ScenarioFrameworkLayerBase.GetRepeatedSpawnNumber ( )
Returns
Repetition count for spawning an object.

◆ GetSlotTask()

SCR_ScenarioFrameworkSlotTask SCR_ScenarioFrameworkLayerBase.GetSlotTask ( array< SCR_ScenarioFrameworkLayerBase aLayers)

Retrieves slot task from layer child entities.

Parameters
[in]aLayersis an array of ScenarioFrameworkLayerBase objects representing layers in the scenario.
Returns
the first SCR_ScenarioFrameworkSlotTask component found in the given layers or their children.

◆ GetSpawnChildrenType()

SCR_EScenarioFrameworkSpawnChildrenType SCR_ScenarioFrameworkLayerBase.GetSpawnChildrenType ( )
Returns
Spawn children type for scenario spawning.

◆ GetSpawnedEntities()

array< IEntity > SCR_ScenarioFrameworkLayerBase.GetSpawnedEntities ( )
Returns
Array of spawned entities.

◆ GetSpawnedEntity()

IEntity SCR_ScenarioFrameworkLayerBase.GetSpawnedEntity ( )
Returns
Spawned entity.

◆ GetSpawnedLogics()

array< SCR_ScenarioFrameworkLogic > SCR_ScenarioFrameworkLayerBase.GetSpawnedLogics ( )
Returns
Array of spawned logic.

◆ GetSpawnedPlugins()

array< ref SCR_ScenarioFrameworkPlugin > SCR_ScenarioFrameworkLayerBase.GetSpawnedPlugins ( )
Returns
Array of plugins.

◆ Init()

void SCR_ScenarioFrameworkLayerBase.Init ( SCR_ScenarioFrameworkArea  area = null,
SCR_ScenarioFrameworkEActivationType  activation = SCR_ScenarioFrameworkEActivationType::SAME_AS_PARENT 
)

Initializes scenario framework layer.

Parameters
[in]areathat this layer is nested into
[in]activationActivation type for scenario framework activation.

Implemented in SCR_ScenarioFrameworkArea, and SCR_ScenarioFrameworkSlotBase.

◆ InitActivationConditions()

bool SCR_ScenarioFrameworkLayerBase.InitActivationConditions ( bool  calledFromInit = false)

Checks activation conditions for scenario layer, sets condition status based on logic operator, checks parent layer if needed.

Returns
whether all activation conditions for this scenario layer have been initialized successfully.

◆ InitAlreadyHappened()

bool SCR_ScenarioFrameworkLayerBase.InitAlreadyHappened ( )

Initialization check if already happened.

Returns
whether initialization has already happened.

Implemented in SCR_ScenarioFrameworkSlotBase.

◆ InitArea()

bool SCR_ScenarioFrameworkLayerBase.InitArea ( SCR_ScenarioFrameworkArea  area)

Initializes area for scenario framework layer.

Parameters
[in]areasets parent area if provided or gets parent area if not provided
Returns
true if area is successfully initialized, false otherwise.

◆ InitChild()

void SCR_ScenarioFrameworkLayerBase.InitChild ( SCR_ScenarioFrameworkLayerBase  child)

Initializes child layer, sets parent layer, and initializes child with parent area and action type.

Parameters
[in]childthat is to be initialized.

◆ InitDynDespawnAndActivation()

bool SCR_ScenarioFrameworkLayerBase.InitDynDespawnAndActivation ( SCR_ScenarioFrameworkEActivationType  activation)

Checks if object is not dynamically despawned, then verifies if activation type matches, spawns all children if.

Parameters
[in]activationActivation type determines if scenario object should spawn or despawn based on conditions.
Returns
true if the object can be despawned and activated with given type, false otherwise.

◆ InitFactionSettings()

bool SCR_ScenarioFrameworkLayerBase.InitFactionSettings ( )

Handles inheritance of faction settings from parents.

◆ InitNotTerminated()

bool SCR_ScenarioFrameworkLayerBase.InitNotTerminated ( )

Checks if layer is not terminated, spawns children if parent exists, returns false if terminated or children not spawnned.

Returns
true if not terminated, otherwise false.

Implemented in SCR_ScenarioFrameworkSlotTask.

◆ InitOtherThings()

bool SCR_ScenarioFrameworkLayerBase.InitOtherThings ( )

For situations where some other logic is to be appended in these checks and is to be performed before FinishInit.

Implemented in SCR_ScenarioFrameworkQRFSlotAI, SCR_ScenarioFrameworkSlotAI, SCR_ScenarioFrameworkSlotBase, and SCR_ScenarioFrameworkSlotTaskAI.

◆ InitParentLayer()

bool SCR_ScenarioFrameworkLayerBase.InitParentLayer ( )

Initializes parent layer.

Returns
true if parent layer is already initialized, otherwise initializes it and returns true if successful.

Implemented in SCR_ScenarioFrameworkArea.

◆ InvokeAllChildrenSpawned()

void SCR_ScenarioFrameworkLayerBase.InvokeAllChildrenSpawned ( )

Spawns all children and triggers invoker on completion.

◆ OnPostInit()

override void SCR_ScenarioFrameworkLayerBase.OnPostInit ( IEntity  owner)
Parameters
[in]ownerrepresents the entity being processed by the method, which is used for managing debug shapes during runtime based on certain conditions.

Implemented in SCR_ScenarioFrameworkArea, and SCR_ScenarioFrameworkLayerTaskDefend.

◆ RenameOwnerEntity()

void SCR_ScenarioFrameworkLayerBase.RenameOwnerEntity ( IEntity  owner)

Rename entity owner with default name if not restoring undo/redo.

Parameters
[in]ownerRepresents the entity whose name is being changed by the method.

◆ RepeatedSpawn()

void SCR_ScenarioFrameworkLayerBase.RepeatedSpawn ( )
protected

Repetitive spawning with timer.

◆ RepeatedSpawnCalled()

void SCR_ScenarioFrameworkLayerBase.RepeatedSpawnCalled ( )
protected

Repetitive spawning logic with countdown and condition checks.

◆ RestoreToDefault()

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

Restores default settings, clears children, removes spawned entities, optionally reinitializes after restoration.

Parameters
[in]includeChildrenRestores default settings for this entity and its children if includeChildren is true.
[in]reinitAfterRestorationRestores entity to default state, optionally reinitializes after restoration.
[in]affectRandomizationdetermines whether to clear all randomly spawned children entities after restoring default settings.

Implemented in SCR_ScenarioFrameworkArea, SCR_ScenarioFrameworkLayerTask, SCR_ScenarioFrameworkLayerTaskDefend, SCR_ScenarioFrameworkLayerTaskDeliver, SCR_ScenarioFrameworkSlotAI, SCR_ScenarioFrameworkSlotBase, SCR_ScenarioFrameworkSlotMarker, SCR_ScenarioFrameworkSlotTask, SCR_ScenarioFrameworkSlotTaskAI, and SCR_ScenarioFrameworkSlotTrigger.

◆ SetActivationType()

void SCR_ScenarioFrameworkLayerBase.SetActivationType ( SCR_ScenarioFrameworkEActivationType  activationType)
Parameters
[in]activationTypeSets the activation type

◆ SetDebugShapeSize()

void SCR_ScenarioFrameworkLayerBase.SetDebugShapeSize ( float  fSize)
Parameters
[in]fSizeis the radius for debug shape visualization.

◆ SetDynamicDespawnExcluded()

void SCR_ScenarioFrameworkLayerBase.SetDynamicDespawnExcluded ( bool  excluded)
Parameters
[in]excludedExcludes layer from dynamic despawning.

◆ SetEnableRepeatedSpawn()

void SCR_ScenarioFrameworkLayerBase.SetEnableRepeatedSpawn ( bool  value)
Parameters
[in]valueEnables or disables repeated spawning of units for this layer.

◆ SetEntity()

void SCR_ScenarioFrameworkLayerBase.SetEntity ( IEntity  entity)
Parameters
[in]entitySets the entity reference for further manipulation.

◆ SetFactionKey()

void SCR_ScenarioFrameworkLayerBase.SetFactionKey ( FactionKey  factionKey)
protected
Parameters
[in]factionKeySets the faction key for the layer.

◆ SetIsTerminated()

void SCR_ScenarioFrameworkLayerBase.SetIsTerminated ( bool  state)
Parameters
[in]statetermination of this layer.

◆ SetParentLayer()

void SCR_ScenarioFrameworkLayerBase.SetParentLayer ( SCR_ScenarioFrameworkLayerBase  parentLayer)
Parameters
[in]layerbase that will be set as parentLayer.

◆ SetRandomlySpawnedChildren()

void SCR_ScenarioFrameworkLayerBase.SetRandomlySpawnedChildren ( array< string >  randomlySpawnedChildren)
Parameters
[in]randomlySpawnedChildrenA list of child entities to randomly spawn

◆ SetRepeatedSpawnNumber()

void SCR_ScenarioFrameworkLayerBase.SetRepeatedSpawnNumber ( int  number)
Parameters
[in]numberRepresents the number of repeated spawns for an entity in the game.

◆ SpawnChildren()

void SCR_ScenarioFrameworkLayerBase.SpawnChildren ( bool  previouslyRandomized = false)

Spawns children based on scenario settings, either all at once or randomly.

Parameters
[in]previouslyRandomizedbool indicates whether children were spawned randomly before.

Implemented in SCR_ScenarioFrameworkSlotBase.

◆ SpawnPreviouslyRandomizedChildren()

void SCR_ScenarioFrameworkLayerBase.SpawnPreviouslyRandomizedChildren ( )

Spawns children with delay based on their index.

◆ SpawnRandomMultipleChildren()

void SCR_ScenarioFrameworkLayerBase.SpawnRandomMultipleChildren ( bool  previouslyRandomized = false)

Spawns random children based on player count, if previously randomized, uses previous children, otherwise selects from available children.

Parameters
[in]previouslyRandomizedstate is stored, used for spawning them again in the same positions.

◆ SpawnRandomOneChild()

void SCR_ScenarioFrameworkLayerBase.SpawnRandomOneChild ( bool  previouslyRandomized = false)

Spawns random child object if not previously randomized, else spawns previously randomized children.

Parameters
[in]previouslyRandomizedindicates if children were spawned randomly before.

Member Data Documentation

◆ m_aActivationActions

ref array<ref SCR_ScenarioFrameworkActionBase> SCR_ScenarioFrameworkLayerBase.m_aActivationActions

◆ m_aActivationConditions

ref array<ref SCR_ScenarioFrameworkActivationConditionBase> SCR_ScenarioFrameworkLayerBase.m_aActivationConditions

◆ m_aChildren

ref array<SCR_ScenarioFrameworkLayerBase> SCR_ScenarioFrameworkLayerBase.m_aChildren = {}

◆ m_aLogic

ref array<SCR_ScenarioFrameworkLogic> SCR_ScenarioFrameworkLayerBase.m_aLogic = {}

◆ m_aPlugins

ref array<ref SCR_ScenarioFrameworkPlugin> SCR_ScenarioFrameworkLayerBase.m_aPlugins

◆ m_aRandomlySpawnedChildren

ref array<SCR_ScenarioFrameworkLayerBase> SCR_ScenarioFrameworkLayerBase.m_aRandomlySpawnedChildren = {}

◆ m_Area

SCR_ScenarioFrameworkArea SCR_ScenarioFrameworkLayerBase.m_Area

◆ m_aSpawnedEntities

ref array<IEntity> SCR_ScenarioFrameworkLayerBase.m_aSpawnedEntities = {}

◆ m_bDynamicallyDespawned

bool SCR_ScenarioFrameworkLayerBase.m_bDynamicallyDespawned

◆ m_bEnableRepeatedSpawn

bool SCR_ScenarioFrameworkLayerBase.m_bEnableRepeatedSpawn

◆ m_bExcludeFromDynamicDespawn

bool SCR_ScenarioFrameworkLayerBase.m_bExcludeFromDynamicDespawn

◆ m_bInitiated

bool SCR_ScenarioFrameworkLayerBase.m_bInitiated

◆ m_bIsTerminated

bool SCR_ScenarioFrameworkLayerBase.m_bIsTerminated

◆ m_bShowDebugShapesDuringRuntime

bool SCR_ScenarioFrameworkLayerBase.m_bShowDebugShapesDuringRuntime

◆ m_eActivationConditionLogic

SCR_EScenarioFrameworkLogicOperators SCR_ScenarioFrameworkLayerBase.m_eActivationConditionLogic

◆ m_eActivationType

SCR_ScenarioFrameworkEActivationType SCR_ScenarioFrameworkLayerBase.m_eActivationType

◆ m_eActivationTypeDefault

SCR_ScenarioFrameworkEActivationType SCR_ScenarioFrameworkLayerBase.m_eActivationTypeDefault = m_eActivationType

◆ m_Entity

IEntity SCR_ScenarioFrameworkLayerBase.m_Entity

◆ m_fDebugShapeRadius

float SCR_ScenarioFrameworkLayerBase.m_fDebugShapeRadius = 0.25

◆ m_fRepeatedSpawnTimer

float SCR_ScenarioFrameworkLayerBase.m_fRepeatedSpawnTimer

◆ m_fRepeatSpawnTimeEnd

WorldTimestamp SCR_ScenarioFrameworkLayerBase.m_fRepeatSpawnTimeEnd

◆ m_fRepeatSpawnTimeStart

WorldTimestamp SCR_ScenarioFrameworkLayerBase.m_fRepeatSpawnTimeStart

◆ m_iCurrentlySpawnedChildren

int SCR_ScenarioFrameworkLayerBase.m_iCurrentlySpawnedChildren

◆ m_iDebugShapeColor

int SCR_ScenarioFrameworkLayerBase.m_iDebugShapeColor = ARGB(32, 0xFF, 0x00, 0x12)

◆ m_iRandomPercent

int SCR_ScenarioFrameworkLayerBase.m_iRandomPercent

◆ m_iRepeatedSpawnNumber

int SCR_ScenarioFrameworkLayerBase.m_iRepeatedSpawnNumber

◆ m_iRepeatedSpawnNumberDefault

int SCR_ScenarioFrameworkLayerBase.m_iRepeatedSpawnNumberDefault = m_iRepeatedSpawnNumber

◆ m_iSupposedSpawnedChildren

int SCR_ScenarioFrameworkLayerBase.m_iSupposedSpawnedChildren

◆ m_OnAllChildrenSpawned

ref ScriptInvokerBase<ScriptInvokerScenarioFrameworkLayerMethod> SCR_ScenarioFrameworkLayerBase.m_OnAllChildrenSpawned

◆ m_ParentLayer

SCR_ScenarioFrameworkLayerBase SCR_ScenarioFrameworkLayerBase.m_ParentLayer

◆ m_sFactionKey

FactionKey SCR_ScenarioFrameworkLayerBase.m_sFactionKey

◆ m_SpawnChildren

SCR_EScenarioFrameworkSpawnChildrenType SCR_ScenarioFrameworkLayerBase.m_SpawnChildren

◆ SPAWN_DELAY

const int SCR_ScenarioFrameworkLayerBase.SPAWN_DELAY = 200
static

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