|
Arma Reforger Script API
|
Public Member Functions | |
| SCR_ETaskState | GetLayerTaskState () |
| bool | GetLayerTaskResolvedBeforeLoad () |
| void | SetLayerTaskState (SCR_ETaskState state) |
| SCR_ScenarioFrameworkTask | GetTask () |
| ResourceName | GetTaskPrefab () |
| string | GetOverridenObjectDisplayName () |
| void | SetOverridenObjectDisplayName (string name) |
| string | GetTaskTitle () |
| string | GetOriginalTaskDescription () |
| string | GetTaskDescription () |
| SCR_ESFTaskType | GetTaskType () |
| SCR_ScenarioFrameworkLayerTask | GetTopMostParentTaskLayer () |
| 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. | |
| void | OnTaskStateChanged (SCR_ETaskState previousState, SCR_ETaskState newState) |
| Triggers actions on task finish if not resolved before load. | |
| void | SetSlotTask (SCR_ScenarioFrameworkSlotTask slotTask) |
| SCR_ScenarioFrameworkSlotTask | GetSlotTask () |
| void | ProcessLayerTaskState (SCR_ETaskState state, bool forced=false, bool calledFromSubtask=false) |
| Processes the state of a task and its subtasks, updating the task's state and progress bar if necessary. | |
| void | ProcessSubTasks () |
| This method processes subtasks of a main task, calculates progress bar based on completed subtasks, and updates the layer. | |
| void | InitTask (SCR_ScenarioFrameworkLayerBase layer) |
| Initializes task, sets up support entity, and handles task state changes based on scenario framework layer. | |
| void | SetMarkerUpdateInterval (float newInterval) |
| Set interval for updating marker position. | |
| void | UpdateMarkerPosition () |
| Updates marker position on map, if it changed from previous one. | |
| vector | GetMarkerPosition () |
| SCR_ScenarioFrameworkLayerTask | GetLayerTaskByName (string name) |
| Retrieves layer task by name. | |
| void | SetupSubtask () |
| Sets up a subtask, disables linking data to related tasks, and registers the task as a subtask of a parent task. | |
| 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_ScenarioFrameworkLayerBase > | GetRandomlySpawnedChildren () |
| 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 | GetDynamicDespawnEnabled () |
| void | SetDynamicDespawnEnabled (bool enabled) |
| bool | GetDynamicDespawnExcluded () |
| int | GetDynamicDespawnRange () |
| void | SetDynamicDespawnRange (int range) |
| void | SetDynamicDespawnExcluded (bool excluded) |
| array< IEntity > | GetSpawnedEntities () |
| array< SCR_ScenarioFrameworkLayerBase > | GetChildrenEntities () |
| 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_ScenarioFrameworkLogic > | GetSpawnedLogics () |
| array< ref SCR_ScenarioFrameworkPlugin > | GetSpawnedPlugins () |
| 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 () |
| 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 | 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) |
| array< ref SCR_ScenarioFrameworkActionBase > | GetActivationActions () |
| override int | _WB_GetAfterWorldUpdateSpecs (IEntity owner, IEntitySource src) |
| override void | _WB_AfterWorldUpdate (IEntity owner, float timeSlice) |
| Draws debug shape based on m_bShowDebugShapesInWorkbench setting in Workbench after world update. | |
| override void | _WB_OnCreate (IEntity owner, IEntitySource src) |
| Renames all entities in the owner's children hierarchy. | |
| 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 | 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. | |
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 | CreateTask (vector position) |
| Creates a task for the support entity, sets its target faction, and moves it to the specified location. | |
| string | PrepareName () |
| Prepares task name based on slot task or default task title. | |
| string | PrepareDescription () |
| Prepares task description based on slot task or default task description. | |
| void | InitIcon () |
| Initializes task icon based on provided task or slot task. If task icon set name or path is empty, error. | |
| void | SetupTask () |
| void | OnTopParentLayerTaskInitialized (SCR_ScenarioFrameworkLayerBase layer) |
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. | |
| void | InitActivationActions () |
| void | RestoreActionsToDefault () |
Protected Attributes | |
| float | m_fMarkerUpdateInterval |
| void SCR_ScenarioFrameworkLayerTask.~SCR_ScenarioFrameworkLayerTask | ( | ) |
Removes task from support entity and despawns if in edit mode or task is cancelled.
|
protected |
Creates a task for the support entity, sets its target faction, and moves it to the specified location.
| override void SCR_ScenarioFrameworkLayerTask.DynamicDespawn | ( | SCR_ScenarioFrameworkLayerBase | layer | ) |
Dynamically despawns this layer.
| [in] | layer | for which this is called. |
Implements SCR_ScenarioFrameworkLayerBase.
Implemented in SCR_ScenarioFrameworkLayerTaskDefend.
| override void SCR_ScenarioFrameworkLayerTask.DynamicReinit | ( | ) |
Initializes layer with same activation type as parent.
Implements SCR_ScenarioFrameworkLayerBase.
| override void SCR_ScenarioFrameworkLayerTask.FinishInit | ( | ) |
Initializes tasks after all children spawned.
Implements SCR_ScenarioFrameworkLayerBase.
| SCR_ScenarioFrameworkLayerTask SCR_ScenarioFrameworkLayerTask.GetLayerTaskByName | ( | string | name | ) |
Retrieves layer task by name.
| [in] | name | of target layer task |
| bool SCR_ScenarioFrameworkLayerTask.GetLayerTaskResolvedBeforeLoad | ( | ) |
| SCR_ETaskState SCR_ScenarioFrameworkLayerTask.GetLayerTaskState | ( | ) |
| vector SCR_ScenarioFrameworkLayerTask.GetMarkerPosition | ( | ) |
| string SCR_ScenarioFrameworkLayerTask.GetOriginalTaskDescription | ( | ) |
| string SCR_ScenarioFrameworkLayerTask.GetOverridenObjectDisplayName | ( | ) |
| SCR_ScenarioFrameworkSlotTask SCR_ScenarioFrameworkLayerTask.GetSlotTask | ( | ) |
| SCR_ScenarioFrameworkTask SCR_ScenarioFrameworkLayerTask.GetTask | ( | ) |
| string SCR_ScenarioFrameworkLayerTask.GetTaskDescription | ( | ) |
| ResourceName SCR_ScenarioFrameworkLayerTask.GetTaskPrefab | ( | ) |
| string SCR_ScenarioFrameworkLayerTask.GetTaskTitle | ( | ) |
| SCR_ESFTaskType SCR_ScenarioFrameworkLayerTask.GetTaskType | ( | ) |
| SCR_ScenarioFrameworkLayerTask SCR_ScenarioFrameworkLayerTask.GetTopMostParentTaskLayer | ( | ) |
|
protected |
Initializes task icon based on provided task or slot task. If task icon set name or path is empty, error.
| void SCR_ScenarioFrameworkLayerTask.InitTask | ( | SCR_ScenarioFrameworkLayerBase | layer | ) |
Initializes task, sets up support entity, and handles task state changes based on scenario framework layer.
| [in] | layer | for which this task is to be initialized |
| void SCR_ScenarioFrameworkLayerTask.OnTaskStateChanged | ( | SCR_ETaskState | previousState, |
| SCR_ETaskState | newState ) |
Triggers actions on task finish if not resolved before load.
| [in] | previousState | represents the current state of the task before it transitions to new state. |
| [in] | newState | Triggers actions on task finish state change. |
|
protected |
| [in] | layer | Initializes the task for the top parent layer, adding it as a child task to the parent task. |
|
protected |
Prepares task description based on slot task or default task description.
|
protected |
Prepares task name based on slot task or default task title.
| void SCR_ScenarioFrameworkLayerTask.ProcessLayerTaskState | ( | SCR_ETaskState | state, |
| bool | forced = false, | ||
| bool | calledFromSubtask = false ) |
Processes the state of a task and its subtasks, updating the task's state and progress bar if necessary.
| [in] | state | Processes the state of a task and its subtasks, updating the task's state and progress bar if necessary |
| [in] | forced | parameter represents a boolean value that determines whether to process the task state even if the conditions for task completion are not met |
| [in] | calledFromSubtask | parameter represents whether the method is being called from a subtask or not. If true, it |
| void SCR_ScenarioFrameworkLayerTask.ProcessSubTasks | ( | ) |
This method processes subtasks of a main task, calculates progress bar based on completed subtasks, and updates the layer.
| 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.
| [in] | includeChildren | Restores default settings for this entity and its children if includeChildren is true. |
| [in] | reinitAfterRestoration | Restores entity to default state, optionally reinitializes after restoration. |
| [in] | affectRandomization | determines whether to clear all randomly spawned children entities after restoring default settings. |
Implements SCR_ScenarioFrameworkLayerBase.
Implemented in SCR_ScenarioFrameworkLayerTaskDefend, and SCR_ScenarioFrameworkLayerTaskDeliver.
| void SCR_ScenarioFrameworkLayerTask.SetLayerTaskState | ( | SCR_ETaskState | state | ) |
| [in] | state | Sets layer task state |
| void SCR_ScenarioFrameworkLayerTask.SetMarkerUpdateInterval | ( | float | newInterval | ) |
Set interval for updating marker position.
| [in] | newInterval | for new interval in ms. If set to 0, updates will be disabled |
| void SCR_ScenarioFrameworkLayerTask.SetOverridenObjectDisplayName | ( | string | name | ) |
| [in] | name | Sets object display name override. |
| void SCR_ScenarioFrameworkLayerTask.SetSlotTask | ( | SCR_ScenarioFrameworkSlotTask | slotTask | ) |
| [in] | slotTask | related to this layer task. |
| void SCR_ScenarioFrameworkLayerTask.SetupSubtask | ( | ) |
Sets up a subtask, disables linking data to related tasks, and registers the task as a subtask of a parent task.
|
protected |
Implemented in SCR_ScenarioFrameworkLayerTaskDeliver.
| void SCR_ScenarioFrameworkLayerTask.UpdateMarkerPosition | ( | ) |
Updates marker position on map, if it changed from previous one.
| ref array<ref SCR_ScenarioFrameworkActionBase> SCR_ScenarioFrameworkLayerTask.m_aActionsOnAssigned |
| ref array<ref SCR_ScenarioFrameworkActionBase> SCR_ScenarioFrameworkLayerTask.m_aActionsOnCancelled |
| ref array<ref SCR_ScenarioFrameworkActionBase> SCR_ScenarioFrameworkLayerTask.m_aActionsOnCreated |
| ref array<ref SCR_ScenarioFrameworkActionBase> SCR_ScenarioFrameworkLayerTask.m_aActionsOnFailed |
| ref array<ref SCR_ScenarioFrameworkActionBase> SCR_ScenarioFrameworkLayerTask.m_aActionsOnProgress |
| ref array<ref SCR_ScenarioFrameworkActivationConditionBase> SCR_ScenarioFrameworkLayerTask.m_aFinishConditions |
| ref array<ref SCR_ScenarioFrameworkActionBase> SCR_ScenarioFrameworkLayerTask.m_aTriggerActionsOnFinish |
| bool SCR_ScenarioFrameworkLayerTask.m_bCalculateProgressBarOnCompletedTasks |
| bool SCR_ScenarioFrameworkLayerTask.m_bIsOptional |
| bool SCR_ScenarioFrameworkLayerTask.m_bIsSubtask |
| bool SCR_ScenarioFrameworkLayerTask.m_bPlaceMarkerOnSubjectSlot |
| bool SCR_ScenarioFrameworkLayerTask.m_bProgressBar |
| bool SCR_ScenarioFrameworkLayerTask.m_bTaskCompletedWithoutSubtasks |
| bool SCR_ScenarioFrameworkLayerTask.m_bTaskFunctionsOnItsOwn |
| bool SCR_ScenarioFrameworkLayerTask.m_bTaskResolvedBeforeLoad |
| SCR_EScenarioFrameworkLogicOperators SCR_ScenarioFrameworkLayerTask.m_eFinishConditionLogic |
| SCR_ETaskState SCR_ScenarioFrameworkLayerTask.m_eLayerTaskState = SCR_ETaskState.CREATED |
| ref SCR_ScenarioFrameworkGet SCR_ScenarioFrameworkLayerTask.m_EntityToAttachGetter |
| SCR_ETaskNotificationSettings SCR_ScenarioFrameworkLayerTask.m_eTaskNotificationSettings |
| SCR_ETaskOwnership SCR_ScenarioFrameworkLayerTask.m_eTaskOwnership |
| SCR_ETaskUIVisibility SCR_ScenarioFrameworkLayerTask.m_eTaskUIVisibility |
| SCR_ETaskVisibility SCR_ScenarioFrameworkLayerTask.m_eTaskVisibility |
| SCR_ESFTaskType SCR_ScenarioFrameworkLayerTask.m_eTypeOfTask |
|
protected |
| int SCR_ScenarioFrameworkLayerTask.m_iNumberOfRequieredTasksToFinish |
| SCR_ScenarioFrameworkSlotTask SCR_ScenarioFrameworkLayerTask.m_SlotTask |
| string SCR_ScenarioFrameworkLayerTask.m_sOverrideObjectDisplayName |
| string SCR_ScenarioFrameworkLayerTask.m_sParentLayerTask |
| string SCR_ScenarioFrameworkLayerTask.m_sSubtasksDescription |
| string SCR_ScenarioFrameworkLayerTask.m_sTaskDescription |
| string SCR_ScenarioFrameworkLayerTask.m_sTaskIconName |
| ResourceName SCR_ScenarioFrameworkLayerTask.m_sTaskIconSet |
| ResourceName SCR_ScenarioFrameworkLayerTask.m_sTaskPrefab |
| string SCR_ScenarioFrameworkLayerTask.m_sTaskTitle |
| SCR_ScenarioFrameworkTask SCR_ScenarioFrameworkLayerTask.m_Task |
| SCR_TaskSystem SCR_ScenarioFrameworkLayerTask.m_TaskSystem |
| SCR_ScenarioFrameworkLayerTask SCR_ScenarioFrameworkLayerTask.m_TopParentLayerTask |
|
static |