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

Public Member Functions

SCR_TaskState GetLayerTaskState ()
 
bool GetLayerTaskResolvedBeforeLoad ()
 
void SetLayerTaskState (SCR_TaskState state)
 
SCR_ScenarioFrameworkTask GetTask ()
 
ResourceName GetTaskPrefab ()
 
string GetOverridenObjectDisplayName ()
 
void SetOverridenObjectDisplayName (string name)
 
string GetTaskTitle ()
 
string GetOriginalTaskDescription ()
 
string GetTaskDescription ()
 
SCR_ESFTaskType GetTaskType ()
 
override void RestoreToDefault (bool includeChildren=false, bool reinitAfterRestoration=false, bool affectRandomization=true)
 Restores default settings, clears children, removes spawned entities, optionally reinitializes after restoration.
 
override void DynamicReinit ()
 Initializes layer with same activation type as parent.
 
override void DynamicDespawn (SCR_ScenarioFrameworkLayerBase layer)
 Dynamically despawns this layer.
 
override void FinishInit ()
 Initializes tasks after all children spawned, logs error if task manager not found.
 
void OnTaskStateChanged (SCR_TaskState previousState, SCR_TaskState newState)
 Triggers actions on task finish if not resolved before load.
 
void SetSlotTask (SCR_ScenarioFrameworkSlotTask slotTask)
 
SCR_ScenarioFrameworkSlotTask GetSlotTask ()
 
void InitTask (SCR_ScenarioFrameworkLayerBase layer)
 Initializes task, sets up support entity, and handles task state changes based on scenario framework layer.
 
override void _WB_AfterWorldUpdate (IEntity owner, float timeSlice)
 Draws debug shape based on m_bShowDebugShapesInWorkbench setting in Workbench after world update.
 
override bool _WB_OnKeyChanged (IEntity owner, BaseContainer src, string key, BaseContainerList ownerContainers, IEntity parent)
 Controls debug shape visibility in Workbench based on user input.
 
void ~SCR_ScenarioFrameworkLayerTask ()
 Removes task from support entity and despawns if in edit mode or task is cancelled.
 
- 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

string m_sTaskTitle
 
string m_sTaskDescription
 
SCR_ESFTaskType m_eTypeOfTask = SCR_ESFTaskType.DEFAULT
 
ResourceName m_sTaskPrefab
 
bool m_bPlaceMarkerOnSubjectSlot
 
string m_sOverrideObjectDisplayName
 
ref array< ref SCR_ScenarioFrameworkActionBasem_aTriggerActionsOnFinish
 
SCR_ScenarioFrameworkSlotTask m_SlotTask
 
SCR_ScenarioFrameworkTask m_Task
 
SCR_ScenarioFrameworkTaskSupportEntity m_SupportEntity
 
SCR_TaskState m_eLayerTaskState
 
bool m_bTaskResolvedBeforeLoad
 
- 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
 

Static Public Attributes

static const ref ScriptInvoker s_OnTaskSetup = new ScriptInvoker()
 
- Static Public Attributes inherited from SCR_ScenarioFrameworkLayerBase
static const int SPAWN_DELAY = 200
 

Protected Member Functions

bool SetTaskPrefab ()
 Sets task prefab for support entity.
 
bool SetSupportEntity ()
 Sets support entity for layer task.
 
bool CreateTask ()
 Creates a task for the support entity, sets its target faction, and moves it to the specified location.
 
void SetupTask ()
 Sets up a task with optional title, description, and spawned entity name from a slot task, or prints an error message.
 
- 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.
 

Protected Attributes

bool m_bShowDebugShapesInWorkbench
 

Constructor & Destructor Documentation

◆ ~SCR_ScenarioFrameworkLayerTask()

void SCR_ScenarioFrameworkLayerTask.~SCR_ScenarioFrameworkLayerTask ( )

Removes task from support entity and despawns if in edit mode or task is cancelled.

Member Function Documentation

◆ _WB_AfterWorldUpdate()

override void SCR_ScenarioFrameworkLayerTask._WB_AfterWorldUpdate ( IEntity  owner,
float  timeSlice 
)

Draws debug shape based on m_bShowDebugShapesInWorkbench setting in Workbench after world update.

Parameters
[in]ownerThe owner represents the entity (object) calling the method.
[in]timeSliceTimeSlice represents the time interval for which the method is called during each frame update.

◆ _WB_OnKeyChanged()

override bool SCR_ScenarioFrameworkLayerTask._WB_OnKeyChanged ( IEntity  owner,
BaseContainer  src,
string  key,
BaseContainerList  ownerContainers,
IEntity  parent 
)

Controls debug shape visibility in Workbench based on user input.

Parameters
[in]ownerThe owner represents the entity (object) in the game world that triggers the key change event, which in turn calls this
[in]srcis the prefab of owner entity
[in]keycorresponds with the workbench attribute.
[in]ownerContainersRepresents a list of containers related to the owner entity in the method.
[in]parentParent represents the parent entity.
Returns
bool

◆ CreateTask()

bool SCR_ScenarioFrameworkLayerTask.CreateTask ( )
protected

Creates a task for the support entity, sets its target faction, and moves it to the specified location.

Returns
true if the task creation is successful, false otherwise.

◆ DynamicDespawn()

override void SCR_ScenarioFrameworkLayerTask.DynamicDespawn ( SCR_ScenarioFrameworkLayerBase  layer)

Dynamically despawns this layer.

Parameters
[in]layerfor which this is called.

Implements SCR_ScenarioFrameworkLayerBase.

Implemented in SCR_ScenarioFrameworkLayerTaskDefend.

◆ DynamicReinit()

override void SCR_ScenarioFrameworkLayerTask.DynamicReinit ( )

Initializes layer with same activation type as parent.

Implements SCR_ScenarioFrameworkLayerBase.

◆ FinishInit()

override void SCR_ScenarioFrameworkLayerTask.FinishInit ( )

Initializes tasks after all children spawned, logs error if task manager not found.

Implements SCR_ScenarioFrameworkLayerBase.

◆ GetLayerTaskResolvedBeforeLoad()

bool SCR_ScenarioFrameworkLayerTask.GetLayerTaskResolvedBeforeLoad ( )
Returns
Indicates if task was resolved before loading.

◆ GetLayerTaskState()

SCR_TaskState SCR_ScenarioFrameworkLayerTask.GetLayerTaskState ( )
Returns
Layer task state in current task layer.

◆ GetOriginalTaskDescription()

string SCR_ScenarioFrameworkLayerTask.GetOriginalTaskDescription ( )
Returns
Original task description string returned by the method.

◆ GetOverridenObjectDisplayName()

string SCR_ScenarioFrameworkLayerTask.GetOverridenObjectDisplayName ( )
Returns
the display name for an overridden object.

◆ GetSlotTask()

SCR_ScenarioFrameworkSlotTask SCR_ScenarioFrameworkLayerTask.GetSlotTask ( )
Returns
related to this layer task.

◆ GetTask()

SCR_ScenarioFrameworkTask SCR_ScenarioFrameworkLayerTask.GetTask ( )
Returns
the current task.

◆ GetTaskDescription()

string SCR_ScenarioFrameworkLayerTask.GetTaskDescription ( )
Returns
the task description, or sets it if an override object display name is provided.

◆ GetTaskPrefab()

ResourceName SCR_ScenarioFrameworkLayerTask.GetTaskPrefab ( )
Returns
The return value represents the prefab for the task in the method.

◆ GetTaskTitle()

string SCR_ScenarioFrameworkLayerTask.GetTaskTitle ( )
Returns
The return value represents the title of the task.

◆ GetTaskType()

SCR_ESFTaskType SCR_ScenarioFrameworkLayerTask.GetTaskType ( )
Returns
Task type enum representing the type of task in the mission.

◆ InitTask()

void SCR_ScenarioFrameworkLayerTask.InitTask ( SCR_ScenarioFrameworkLayerBase  layer)

Initializes task, sets up support entity, and handles task state changes based on scenario framework layer.

Parameters
[in]layerfor which this task is to be initialized

◆ OnTaskStateChanged()

void SCR_ScenarioFrameworkLayerTask.OnTaskStateChanged ( SCR_TaskState  previousState,
SCR_TaskState  newState 
)

Triggers actions on task finish if not resolved before load.

Parameters
[in]previousStaterepresents the current state of the task before it transitions to new state.
[in]newStateTriggers actions on task finish state change.

◆ RestoreToDefault()

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

Implements SCR_ScenarioFrameworkLayerBase.

Implemented in SCR_ScenarioFrameworkLayerTaskDefend, and SCR_ScenarioFrameworkLayerTaskDeliver.

◆ SetLayerTaskState()

void SCR_ScenarioFrameworkLayerTask.SetLayerTaskState ( SCR_TaskState  state)
Parameters
[in]stateSets layer task state

◆ SetOverridenObjectDisplayName()

void SCR_ScenarioFrameworkLayerTask.SetOverridenObjectDisplayName ( string  name)
Parameters
[in]nameSets object display name override.

◆ SetSlotTask()

void SCR_ScenarioFrameworkLayerTask.SetSlotTask ( SCR_ScenarioFrameworkSlotTask  slotTask)
Parameters
[in]slotTaskrelated to this layer task.

◆ SetSupportEntity()

bool SCR_ScenarioFrameworkLayerTask.SetSupportEntity ( )
protected

Sets support entity for layer task.

Returns
true if support entity is found and set, false otherwise.

Implemented in SCR_ScenarioFrameworkLayerTaskClearArea, SCR_ScenarioFrameworkLayerTaskDefend, SCR_ScenarioFrameworkLayerTaskDeliver, SCR_ScenarioFrameworkLayerTaskDestroy, and SCR_ScenarioFrameworkLayerTaskKill.

◆ SetTaskPrefab()

bool SCR_ScenarioFrameworkLayerTask.SetTaskPrefab ( )
protected

Sets task prefab for support entity.

Returns
true if task prefab is set, false otherwise.

◆ SetupTask()

void SCR_ScenarioFrameworkLayerTask.SetupTask ( )
protected

Sets up a task with optional title, description, and spawned entity name from a slot task, or prints an error message.

Implemented in SCR_ScenarioFrameworkLayerTaskDeliver.

Member Data Documentation

◆ m_aTriggerActionsOnFinish

ref array<ref SCR_ScenarioFrameworkActionBase> SCR_ScenarioFrameworkLayerTask.m_aTriggerActionsOnFinish

◆ m_bPlaceMarkerOnSubjectSlot

bool SCR_ScenarioFrameworkLayerTask.m_bPlaceMarkerOnSubjectSlot

◆ m_bShowDebugShapesInWorkbench

bool SCR_ScenarioFrameworkLayerTask.m_bShowDebugShapesInWorkbench
protected

◆ m_bTaskResolvedBeforeLoad

bool SCR_ScenarioFrameworkLayerTask.m_bTaskResolvedBeforeLoad

◆ m_eLayerTaskState

SCR_TaskState SCR_ScenarioFrameworkLayerTask.m_eLayerTaskState

◆ m_eTypeOfTask

SCR_ESFTaskType SCR_ScenarioFrameworkLayerTask.m_eTypeOfTask = SCR_ESFTaskType.DEFAULT

◆ m_SlotTask

SCR_ScenarioFrameworkSlotTask SCR_ScenarioFrameworkLayerTask.m_SlotTask

◆ m_sOverrideObjectDisplayName

string SCR_ScenarioFrameworkLayerTask.m_sOverrideObjectDisplayName

◆ m_sTaskDescription

string SCR_ScenarioFrameworkLayerTask.m_sTaskDescription

◆ m_sTaskPrefab

ResourceName SCR_ScenarioFrameworkLayerTask.m_sTaskPrefab

◆ m_sTaskTitle

string SCR_ScenarioFrameworkLayerTask.m_sTaskTitle

◆ m_SupportEntity

SCR_ScenarioFrameworkTaskSupportEntity SCR_ScenarioFrameworkLayerTask.m_SupportEntity

◆ m_Task

SCR_ScenarioFrameworkTask SCR_ScenarioFrameworkLayerTask.m_Task

◆ s_OnTaskSetup

const ref ScriptInvoker SCR_ScenarioFrameworkLayerTask.s_OnTaskSetup = new ScriptInvoker()
static

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