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

Go to the source code of this file.

Classes

class  SCR_ScenarioFrameworkLayerBaseClass

Typedefs

typedef func ScriptInvokerScenarioFrameworkLayerMethod
typedef ScriptInvokerBase< ScriptInvokerScenarioFrameworkLayerMethodScriptInvokerScenarioFrameworkLayer

Enumerations

enum  SCR_EScenarioFrameworkSpawnChildrenType

Functions

SCR_ScenarioFrameworkLayerBaseClass ScriptComponentClass ScriptInvokerScenarioFrameworkLayerMethod (SCR_ScenarioFrameworkLayerBase layer)
enum SCR_EScenarioFrameworkSpawnChildrenType Attribute (defvalue:"0", UIWidgets.ComboBox, desc:"Spawn all children, only random one or random multiple ones?", "", ParamEnumArray.FromEnum(SCR_EScenarioFrameworkSpawnChildrenType), category:"Children")] SCR_EScenarioFrameworkSpawnChildrenType m_SpawnChildren
string GetName ()
void SetEntity (IEntity entity)
bool GetIsTerminated ()
void SetIsTerminated (bool state)
void SetRandomlySpawnedChildren (array< string > randomlySpawnedChildren)
void AddRandomlySpawnedChild (SCR_ScenarioFrameworkLayerBase child)
array< SCR_ScenarioFrameworkLayerBaseGetRandomlySpawnedChildren ()
int GetPlayersCount (FactionKey factionName="")
int GetMaxPlayersForGameMode (FactionKey factionName="")
SCR_ScenarioFrameworkArea GetParentArea ()
void GetAllLayers (out notnull array< SCR_ScenarioFrameworkLayerBase > layers)
void GetAllLayers (out notnull array< SCR_ScenarioFrameworkLayerBase > layers, SCR_ScenarioFrameworkEActivationType activationType)
void GetAllLayerTasks (out notnull array< SCR_ScenarioFrameworkLayerTask > layerTasks)
void GetAllSlotTasks (out notnull array< SCR_ScenarioFrameworkSlotTask > slotTasks)
SCR_ScenarioFrameworkLayerTask GetLayerTask ()
SCR_ScenarioFrameworkSlotTask GetSlotTask (array< SCR_ScenarioFrameworkLayerBase > aLayers)
void SetFactionKey (FactionKey factionKey)
FactionKey GetFactionKey ()
void SetParentLayer (SCR_ScenarioFrameworkLayerBase parentLayer)
FactionKey GetParentFactionKeyRecursive ()
SCR_ScenarioFrameworkLayerBase GetParentLayer ()
SCR_EScenarioFrameworkSpawnChildrenType GetSpawnChildrenType ()
bool GetEnableRepeatedSpawn ()
void SetEnableRepeatedSpawn (bool value)
SCR_ScenarioFrameworkEActivationType GetActivationType ()
void SetActivationType (SCR_ScenarioFrameworkEActivationType activationType)
bool GetIsInitiated ()
bool GetDynamicDespawnEnabled ()
void SetDynamicDespawnEnabled (bool enabled)
bool GetDynamicDespawnExcluded ()
int GetDynamicDespawnRange ()
void SetDynamicDespawnRange (int range)
void SetDynamicDespawnExcluded (bool excluded)
array< IEntityGetSpawnedEntities ()
array< SCR_ScenarioFrameworkLayerBaseGetChildrenEntities ()
SCR_ScenarioFrameworkLayerBase GetRandomChildren ()
void GetChildren (out array< SCR_ScenarioFrameworkLayerBase > children)
void GetChildren (out array< SCR_ScenarioFrameworkLayerBase > children, SCR_ScenarioFrameworkEActivationType activationType)
void GetLogics (out array< SCR_ScenarioFrameworkLogic > logics)
array< SCR_ScenarioFrameworkLogic > GetSpawnedLogics ()
array< ref SCR_ScenarioFrameworkPluginGetSpawnedPlugins ()
int GetRepeatedSpawnNumber ()
void SetRepeatedSpawnNumber (int number)
void RepeatedSpawn ()
 Repetitive spawning with timer.
void RepeatedSpawnCalled ()
 Repetitive spawning logic with countdown and condition checks.
ScriptInvokerScenarioFrameworkLayer GetOnAllChildrenSpawned ()
void InvokeAllChildrenSpawned ()
 Spawns all children and triggers invoker on completion.
void CalculateSupposedSpawnedChildren (bool previouslyRandomized=false)
void CheckAllChildrenSpawned (SCR_ScenarioFrameworkLayerBase layer=null)
void SpawnChildren (bool previouslyRandomized=false)
void SpawnPreviouslyRandomizedChildren ()
 Spawns children with delay based on their index.
void SpawnRandomOneChild (bool previouslyRandomized=false)
void SpawnRandomMultipleChildren (bool previouslyRandomized=false)
void InitChild (SCR_ScenarioFrameworkLayerBase child)
IEntity GetSpawnedEntity ()
void ActivateLogic ()
 Initializes all logic components.
void RestoreToDefault (bool includeChildren=false, bool reinitAfterRestoration=false, bool affectRandomization=true, bool deleteSpawnedEntities=true)
void DynamicDespawn (SCR_ScenarioFrameworkLayerBase layer)
void DynamicReinit ()
 Reinitializes this layer.
bool InitAlreadyHappened ()
bool InitParentLayer ()
bool InitNotTerminated ()
bool InitDynDespawnAndActivation (SCR_ScenarioFrameworkEActivationType activation)
bool InitActivationConditions (bool calledFromInit=false)
bool InitArea (SCR_ScenarioFrameworkArea area)
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)
void AfterAllChildrenSpawned (SCR_ScenarioFrameworkLayerBase layer)
override void EOnFrame (IEntity owner, float timeSlice)
override void OnPostInit (IEntity owner)
 Editable Mine.
void SetDebugShapeSize (float fSize)
void DrawDebugShape (bool draw)
void InitActivationActions ()
void RestoreActionsToDefault ()
array< ref SCR_ScenarioFrameworkActionBaseGetActivationActions ()
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.

Variables

 ALL
 RANDOM_ONE
 RANDOM_MULTIPLE
 RANDOM_BASED_ON_PLAYERS_COUNT
FactionKey m_sFactionKey
int m_iRandomPercent
bool m_bEnableRepeatedSpawn
int m_iRepeatedSpawnNumber
float m_fRepeatedSpawnTimer
bool m_bShowDebugShapesDuringRuntime
bool m_bShowDebugShapesInWorkbench
SCR_ScenarioFrameworkEActivationType m_eActivationType
ref array< ref SCR_ScenarioFrameworkActivationConditionBasem_aActivationConditions
SCR_EScenarioFrameworkLogicOperators m_eActivationConditionLogic
ref array< ref SCR_ScenarioFrameworkActionBasem_aActivationActions
bool m_bDynamicDespawn
int m_iDynamicDespawnRange
bool m_bExcludeFromDynamicDespawn
ref array< ref SCR_ScenarioFrameworkPluginm_aPlugins
ref array< SCR_ScenarioFrameworkLayerBasem_aChildren = {}
ref array< SCR_ScenarioFrameworkLayerBasem_aRandomlySpawnedChildren = {}
ref array< SCR_ScenarioFrameworkLogic > m_aLogic = {}
ref ScriptInvokerBase< ScriptInvokerScenarioFrameworkLayerMethodm_OnAllChildrenSpawned
ref array< IEntitym_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, 255, 255, 255)
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

Typedef Documentation

◆ ScriptInvokerScenarioFrameworkLayer

◆ ScriptInvokerScenarioFrameworkLayerMethod

Enumeration Type Documentation

◆ SCR_EScenarioFrameworkSpawnChildrenType

Function Documentation

◆ ActivateLogic()

void ActivateLogic ( )
protected

Initializes all logic components.

Definition at line 961 of file SCR_ScenarioFrameworkLayerBase.c.

◆ AddRandomlySpawnedChild()

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

Definition at line 146 of file SCR_ScenarioFrameworkLayerBase.c.

◆ AfterAllChildrenSpawned()

void AfterAllChildrenSpawned ( SCR_ScenarioFrameworkLayerBase layer)
protected

Initializes logic, plugins and actions.

Parameters
[in]layerfor which this method is called.

Definition at line 1236 of file SCR_ScenarioFrameworkLayerBase.c.

◆ Attribute()

enum SCR_EScenarioFrameworkSpawnChildrenType Attribute ( defvalue:"0" ,
UIWidgets. ComboBox,
desc:"Spawn all children,
only random one or random multiple ones?" ,
"" ,
ParamEnumArray. FromEnumSCR_EScenarioFrameworkSpawnChildrenType,
category:"Children"  )

◆ CalculateSupposedSpawnedChildren()

void CalculateSupposedSpawnedChildren ( bool previouslyRandomized = false)
protected

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

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

Definition at line 713 of file SCR_ScenarioFrameworkLayerBase.c.

◆ CheckAllChildrenSpawned()

void CheckAllChildrenSpawned ( SCR_ScenarioFrameworkLayerBase layer = null)
protected

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

Parameters
[in]layerfor which this check is invoked.

Definition at line 769 of file SCR_ScenarioFrameworkLayerBase.c.

◆ DrawDebugShape()

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

Definition at line 1304 of file SCR_ScenarioFrameworkLayerBase.c.

◆ DynamicDespawn()

void DynamicDespawn ( SCR_ScenarioFrameworkLayerBase layer)
protected

Dynamically despawns this layer.

Parameters
[in]layerfor which this is called.

Definition at line 1023 of file SCR_ScenarioFrameworkLayerBase.c.

◆ DynamicReinit()

void DynamicReinit ( )
protected

Reinitializes this layer.

Definition at line 1057 of file SCR_ScenarioFrameworkLayerBase.c.

◆ EOnFrame()

override void EOnFrame ( IEntity owner,
float timeSlice )
protected

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.

Definition at line 1261 of file SCR_ScenarioFrameworkLayerBase.c.

◆ FinishInit()

void FinishInit ( )
protected

Initializes children, retrieves them, and spawns them.

Definition at line 1193 of file SCR_ScenarioFrameworkLayerBase.c.

◆ FinishInitChildrenInsert()

void FinishInitChildrenInsert ( )
protected

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

Definition at line 1186 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetActivationActions()

array< ref SCR_ScenarioFrameworkActionBase > GetActivationActions ( )
protected

Definition at line 1339 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetActivationType()

SCR_ScenarioFrameworkEActivationType GetActivationType ( )
protected
Returns
Represents the activation type.

Definition at line 462 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetAllLayers() [1/2]

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

Definition at line 228 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetAllLayers() [2/2]

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

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

Definition at line 253 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetAllLayerTasks()

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

Definition at line 278 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetAllSlotTasks()

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.

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

Definition at line 305 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetChildren() [1/2]

void GetChildren ( out array< SCR_ScenarioFrameworkLayerBase > children)
protected

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

Definition at line 559 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetChildren() [2/2]

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

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

Definition at line 591 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetChildrenEntities()

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

Definition at line 532 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetDynamicDespawnEnabled()

bool GetDynamicDespawnEnabled ( )
protected
Returns
Indicates whether dynamic despawn is enabled or not.

Definition at line 483 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetDynamicDespawnExcluded()

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

Definition at line 497 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetDynamicDespawnRange()

int GetDynamicDespawnRange ( )
protected
Returns
Represents dynamic despawn range.

Definition at line 504 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetEnableRepeatedSpawn()

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

Definition at line 448 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetFactionKey()

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

Definition at line 384 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetIsInitiated()

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

Definition at line 476 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetIsTerminated()

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

Definition at line 110 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetLayerTask()

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

Definition at line 331 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetLogics()

void GetLogics ( out array< SCR_ScenarioFrameworkLogic > logics)
protected

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.

Definition at line 623 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetMaxPlayersForGameMode()

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

Definition at line 193 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetName()

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

Definition at line 96 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetOnAllChildrenSpawned()

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

Definition at line 694 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetParentArea()

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

Definition at line 207 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetParentFactionKeyRecursive()

FactionKey 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().

Definition at line 399 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetParentLayer()

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

Definition at line 426 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetPlayersCount()

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

Definition at line 163 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetRandomChildren()

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

Definition at line 539 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetRandomlySpawnedChildren()

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

Definition at line 154 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetRepeatedSpawnNumber()

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

Definition at line 653 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetSlotTask()

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

Definition at line 351 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetSpawnChildrenType()

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

Definition at line 441 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetSpawnedEntities()

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

Definition at line 525 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetSpawnedEntity()

IEntity GetSpawnedEntity ( )
protected
Returns
Spawned entity.

Definition at line 954 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetSpawnedLogics()

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

Definition at line 639 of file SCR_ScenarioFrameworkLayerBase.c.

◆ GetSpawnedPlugins()

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

Definition at line 646 of file SCR_ScenarioFrameworkLayerBase.c.

◆ Init()

Initializes scenario framework layer

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

Definition at line 1204 of file SCR_ScenarioFrameworkLayerBase.c.

◆ InitActivationActions()

void InitActivationActions ( )
protected

Definition at line 1319 of file SCR_ScenarioFrameworkLayerBase.c.

◆ InitActivationConditions()

bool InitActivationConditions ( bool calledFromInit = false)
protected

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.

Definition at line 1116 of file SCR_ScenarioFrameworkLayerBase.c.

◆ InitAlreadyHappened()

bool InitAlreadyHappened ( )
protected

Initialization check if already happened.

Returns
whether initialization has already happened.

Definition at line 1065 of file SCR_ScenarioFrameworkLayerBase.c.

◆ InitArea()

bool InitArea ( SCR_ScenarioFrameworkArea area)
protected

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.

Definition at line 1133 of file SCR_ScenarioFrameworkLayerBase.c.

◆ InitChild()

void InitChild ( SCR_ScenarioFrameworkLayerBase child)
protected

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

Parameters
[in]childthat is to be initialized.

Definition at line 943 of file SCR_ScenarioFrameworkLayerBase.c.

◆ InitDynDespawnAndActivation()

bool InitDynDespawnAndActivation ( SCR_ScenarioFrameworkEActivationType activation)
protected

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.

Definition at line 1100 of file SCR_ScenarioFrameworkLayerBase.c.

◆ InitFactionSettings()

bool InitFactionSettings ( )
protected

Handles inheritance of faction settings from parents.

Definition at line 1155 of file SCR_ScenarioFrameworkLayerBase.c.

◆ InitNotTerminated()

bool InitNotTerminated ( )
protected

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.

Definition at line 1085 of file SCR_ScenarioFrameworkLayerBase.c.

◆ InitOtherThings()

bool InitOtherThings ( )
protected

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

Definition at line 1179 of file SCR_ScenarioFrameworkLayerBase.c.

◆ InitParentLayer()

bool InitParentLayer ( )
protected

Initializes parent layer.

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

Definition at line 1073 of file SCR_ScenarioFrameworkLayerBase.c.

◆ InvokeAllChildrenSpawned()

void InvokeAllChildrenSpawned ( )
protected

Spawns all children and triggers invoker on completion.

Definition at line 704 of file SCR_ScenarioFrameworkLayerBase.c.

◆ RepeatedSpawn()

void RepeatedSpawn ( )
protected

Repetitive spawning with timer.

Definition at line 667 of file SCR_ScenarioFrameworkLayerBase.c.

◆ RepeatedSpawnCalled()

void RepeatedSpawnCalled ( )
protected

Repetitive spawning logic with countdown and condition checks.

Definition at line 679 of file SCR_ScenarioFrameworkLayerBase.c.

◆ RestoreActionsToDefault()

void RestoreActionsToDefault ( )
protected

Definition at line 1330 of file SCR_ScenarioFrameworkLayerBase.c.

◆ RestoreToDefault()

void RestoreToDefault ( bool includeChildren = false,
bool reinitAfterRestoration = false,
bool affectRandomization = true,
bool deleteSpawnedEntities = true )
protected

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.

Definition at line 975 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SCR_ScenarioFrameworkLayerBase()

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

Definition at line 1411 of file SCR_ScenarioFrameworkLayerBase.c.

◆ ScriptInvokerScenarioFrameworkLayerMethod()

◆ SetActivationType()

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

Definition at line 469 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SetDebugShapeSize()

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

Definition at line 1296 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SetDynamicDespawnEnabled()

void SetDynamicDespawnEnabled ( bool enabled)
protected
Parameters
[in]enabledEnables or disables dynamic despawning.

Definition at line 490 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SetDynamicDespawnExcluded()

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

Definition at line 518 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SetDynamicDespawnRange()

void SetDynamicDespawnRange ( int range)
protected
Parameters
[in]rangeRepresents distance in meters for dynamic despawning.

Definition at line 511 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SetEnableRepeatedSpawn()

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

Definition at line 455 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SetEntity()

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

Definition at line 103 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SetFactionKey()

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

Definition at line 377 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SetIsTerminated()

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

Definition at line 117 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SetParentLayer()

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

Definition at line 391 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SetRandomlySpawnedChildren()

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

Definition at line 124 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SetRepeatedSpawnNumber()

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

Definition at line 660 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SpawnChildren()

void SpawnChildren ( bool previouslyRandomized = false)
protected

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

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

Definition at line 816 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SpawnPreviouslyRandomizedChildren()

void SpawnPreviouslyRandomizedChildren ( )
protected

Spawns children with delay based on their index.

Definition at line 872 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SpawnRandomMultipleChildren()

void SpawnRandomMultipleChildren ( bool previouslyRandomized = false)
protected

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.

Definition at line 907 of file SCR_ScenarioFrameworkLayerBase.c.

◆ SpawnRandomOneChild()

void SpawnRandomOneChild ( bool previouslyRandomized = false)
protected

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

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

Definition at line 892 of file SCR_ScenarioFrameworkLayerBase.c.

◆ ~SCR_ScenarioFrameworkLayerBase()

void ~SCR_ScenarioFrameworkLayerBase ( )
protected

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

Definition at line 1427 of file SCR_ScenarioFrameworkLayerBase.c.

Variable Documentation

◆ ALL

@ ALL

Definition at line 0 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_aActivationActions

ref array<ref SCR_ScenarioFrameworkActionBase> m_aActivationActions

Definition at line 55 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_aActivationConditions

ref array<ref SCR_ScenarioFrameworkActivationConditionBase> m_aActivationConditions

Definition at line 49 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_aChildren

ref array<SCR_ScenarioFrameworkLayerBase> m_aChildren = {}

Definition at line 69 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_aLogic

ref array<SCR_ScenarioFrameworkLogic> m_aLogic = {}

Definition at line 71 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_aPlugins

ref array<ref SCR_ScenarioFrameworkPlugin> m_aPlugins

Definition at line 67 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_aRandomlySpawnedChildren

ref array<SCR_ScenarioFrameworkLayerBase> m_aRandomlySpawnedChildren = {}

Definition at line 70 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_Area

◆ m_aSpawnedEntities

ref array<IEntity> m_aSpawnedEntities = {}

Definition at line 74 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_bDynamicallyDespawned

bool m_bDynamicallyDespawned

Definition at line 85 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_bDynamicDespawn

bool m_bDynamicDespawn

Definition at line 58 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_bEnableRepeatedSpawn

bool m_bEnableRepeatedSpawn

Definition at line 31 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_bExcludeFromDynamicDespawn

bool m_bExcludeFromDynamicDespawn

Definition at line 64 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_bInitiated

bool m_bInitiated

Definition at line 84 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_bIsTerminated

bool m_bIsTerminated

Definition at line 86 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_bShowDebugShapesDuringRuntime

bool m_bShowDebugShapesDuringRuntime

Definition at line 40 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_bShowDebugShapesInWorkbench

bool m_bShowDebugShapesInWorkbench

Definition at line 43 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_eActivationConditionLogic

SCR_EScenarioFrameworkLogicOperators m_eActivationConditionLogic

Definition at line 52 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_eActivationType

Definition at line 46 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_eActivationTypeDefault

Definition at line 90 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_Entity

IEntity m_Entity

Definition at line 75 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_fDebugShapeRadius

float m_fDebugShapeRadius = 0.25

Definition at line 78 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_fRepeatedSpawnTimer

float m_fRepeatedSpawnTimer

Definition at line 37 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_fRepeatSpawnTimeEnd

WorldTimestamp m_fRepeatSpawnTimeEnd

Definition at line 80 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_fRepeatSpawnTimeStart

WorldTimestamp m_fRepeatSpawnTimeStart

Definition at line 79 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_iCurrentlySpawnedChildren

int m_iCurrentlySpawnedChildren

Definition at line 82 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_iDebugShapeColor

int m_iDebugShapeColor = ARGB(32, 255, 255, 255)

Definition at line 81 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_iDynamicDespawnRange

int m_iDynamicDespawnRange

Definition at line 61 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_iRandomPercent

int m_iRandomPercent

Definition at line 28 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_iRepeatedSpawnNumber

int m_iRepeatedSpawnNumber

Definition at line 34 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_iRepeatedSpawnNumberDefault

int m_iRepeatedSpawnNumberDefault = m_iRepeatedSpawnNumber

Definition at line 89 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_iSupposedSpawnedChildren

int m_iSupposedSpawnedChildren

Definition at line 83 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_OnAllChildrenSpawned

ref ScriptInvokerBase<ScriptInvokerScenarioFrameworkLayerMethod> m_OnAllChildrenSpawned

Definition at line 73 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_ParentLayer

Definition at line 77 of file SCR_ScenarioFrameworkLayerBase.c.

◆ m_sFactionKey

FactionKey m_sFactionKey

Definition at line 25 of file SCR_ScenarioFrameworkLayerBase.c.

◆ RANDOM_BASED_ON_PLAYERS_COUNT

RANDOM_BASED_ON_PLAYERS_COUNT

Definition at line 3 of file SCR_ScenarioFrameworkLayerBase.c.

◆ RANDOM_MULTIPLE

RANDOM_MULTIPLE

Definition at line 2 of file SCR_ScenarioFrameworkLayerBase.c.

◆ RANDOM_ONE

RANDOM_ONE

Definition at line 1 of file SCR_ScenarioFrameworkLayerBase.c.