Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_TaskDeliver Interface Reference
Inheritance diagram for SCR_TaskDeliver:
SCR_ScenarioFrameworkTask SCR_ExtendedTask SCR_Task

Public Member Functions

int GetTaskDeliverState ()
 
void SetDeliveryTrigger ()
 Sets delivery trigger by name if it exists in the world.
 
void SetDeliveryTrigger (SCR_BaseTriggerEntity trigger)
 
void SetTriggerNameToDeliver (string triggerName)
 
string GetTriggerNameToDeliver ()
 
void OnDeliveryTriggerActivated (notnull SCR_ScenarioFrameworkTriggerEntity trigger)
 
void OnObjectPossessed (IEntity item, BaseInventoryStorageComponent pStorageOwner)
 Updates task title and description if possessed item matches asset, sets delivery item found flag if not, and progresses state if.
 
void OnObjectDropped (IEntity item, BaseInventoryStorageComponent pStorageOwner)
 Updates task state and title/description when an item is dropped into inventory.
 
void UpdateTaskTitleAndDescription (int iPossessed=-1)
 Updates task title and description based on object state, triggers delivery, and sets task title and description for the support entity.
 
override void HookTaskAsset (IEntity object)
 Rehooks task asset, sets up damage state change listener, checks engine stop after 5 seconds if vehicle.
 
- Public Member Functions inherited from SCR_ScenarioFrameworkTask
SCR_ETaskNotificationSettings GetTaskNotificationSettings ()
 
void SetLayerTask (SCR_ScenarioFrameworkLayerTask layer)
 
SCR_ScenarioFrameworkLayerTask GetLayerTask ()
 
IEntity GetAsset ()
 
void SetSlotTask (SCR_ScenarioFrameworkSlotTask slotTask)
 
SCR_ScenarioFrameworkSlotTask GetSlotTask ()
 
void SetTaskExecutionBriefing (string text)
 
string GetTaskExecutionBriefing ()
 
override bool RplSave (ScriptBitWriter writer)
 
override bool RplLoad (ScriptBitReader reader)
 
- Public Member Functions inherited from SCR_ExtendedTask
LocalizedString GetCustomSubtaskDescription ()
 Returns custom description string for subtasks.
 
void SetCustomSubtaskDescription (LocalizedString subTaskDescription)
 Sets custom description string for subtasks.
 
bool IsChildTask ()
 Returns true if this task is parented to another.
 
bool HasChildTasks ()
 Returns true if other tasks are parented to this one.
 
int GetChildTaskCount ()
 Returns exact number of tasks parented to this one.
 
bool CanBeAssigned ()
 Returns true if this task is assignable to entities; Will always return false if it is a parent task.
 
int GetNodeDepth ()
 Returns depth within the task hierarchy; Parent task is always 0, while child tasks are 1.
 
SCR_Task GetParentTask ()
 Returns parent task or null if there is none.
 
array< SCR_TaskGetChildTasks ()
 Returns array of tasks parented to this one.
 
bool AddChildTask (SCR_Task task)
 Tries to parent task to this one.
 
bool RemoveChildTask (SCR_Task task)
 Tries to unparent task from this one.
 
float GetTaskProgress ()
 Returns progress of task as float; Value ranges from 0-100.
 
void SetTaskProgress (float percentage, bool changeState=true)
 Sets progress of task in percentage.
 
void AddTaskProgress (float percentage, bool changeState=true)
 Adds progress to task in percentage.
 
void RemoveTaskProgress (float percentage, bool changeState=true)
 Removes progress from task in percentage.
 
bool CanTaskProgressBeShown ()
 Returns true if task progress can be shown.
 
void ShowTaskProgress (bool enable)
 
override bool AddTaskAssignee (SCR_TaskExecutor executor, bool listenToInvokers=true, int requesterID=0)
 Tries to assign this task to the given entity If linking data to other tasks is enabled and this task is parented to another, the parent task will be assigned to the entity as well.
 
override bool RemoveTaskAssignee (SCR_TaskExecutor executor, bool listenToInvokers=true, int requesterID=0)
 Tries to unassign this task from the given entity If linking data to other tasks is enabled and this task is parented to another, the parent task will be unassigned from the entity as well.
 
override bool AddOwnerExecutor (SCR_TaskExecutor executor)
 Adds given executor to task as an owner/viewer depending on task ownership and visibility.
 
override bool RemoveOwnerExecutor (SCR_TaskExecutor executor)
 Removes given executor from task as an owner/viewer depending on task ownership and visibility.
 
override void SetTaskState (SCR_ETaskState state)
 
SCR_ChildTaskInvoker GetOnChildTaskAdded ()
 
SCR_ChildTaskInvoker GetOnChildTaskRemoved ()
 
ScriptInvokerFloat2 GetOnProgressChanged ()
 
override void _WB_AfterWorldUpdate (float timeSlice)
 
override void EOnInit (IEntity owner)
 
- Public Member Functions inherited from SCR_Task
SCR_TaskData GetTaskData ()
 Returns task data instance.
 
SCR_TaskUIInfo GetTaskUIInfo ()
 Returns task UI info.
 
string GetTaskID ()
 Returns task ID.
 
void SetTaskID (string taskID)
 Sets ID of task.
 
int GetAuthorID ()
 Returns task author ID.
 
void SetAuthorID (int authorId)
 Sets author id of task.
 
LocalizedString GetTaskName (out array< LocalizedString > params=null)
 Returns name of task.
 
void SetTaskName (LocalizedString taskName, array< LocalizedString > taskNameParams=null)
 Sets name of task.
 
LocalizedString GetTaskDescription (out array< LocalizedString > params=null)
 Returns description of task.
 
void SetTaskDescription (LocalizedString taskDesc, array< LocalizedString > taskDescParams=null)
 Sets description of task.
 
string GetTaskIconPath ()
 Returns task icon path.
 
void SetTaskIconPath (ResourceName iconPath)
 Sets task icon path.
 
string GetTaskIconSetName ()
 Returns name of task icon set.
 
void SetTaskIconSetName (string iconSetName)
 Sets name of task icon set.
 
int GetTaskAssigneeCount ()
 Returns number of assignees for this task.
 
int GetTaskAssigneePlayerCount (bool recursive=true)
 Returns number of assigned players for this task; If recursive is true, it will check assigned groups as well.
 
array< ref SCR_TaskExecutorGetTaskAssignees ()
 Returns array of assignees for this task.
 
array< int > GetTaskAssigneePlayerIDs ()
 Returns array of player assignees for this task.
 
bool IsTaskAssignedTo (SCR_TaskExecutor executor, out SCR_TaskExecutor match=null)
 Returns true if specified executor is assigned to this task and provides matching executor.
 
SCR_ETaskState GetTaskState ()
 
SCR_ETaskOwnership GetTaskOwnership ()
 
void SetTaskOwnership (SCR_ETaskOwnership ownership)
 
SCR_ETaskVisibility GetTaskVisibility ()
 
void SetTaskVisibility (SCR_ETaskVisibility visibility)
 
SCR_ETaskUIVisibility GetTaskUIVisibility ()
 
void SetTaskUIVisibility (SCR_ETaskUIVisibility visibility)
 
int GetOwnerFactionCount ()
 
array< string > GetOwnerFactionKeys ()
 
void AddOwnerFactionKey (FactionKey factionKey)
 
void RemoveOwnerFactionKey (FactionKey factionKey)
 
int GetOwnerGroupCount ()
 
array< int > GetOwnerGroupIDs ()
 
void AddOwnerGroupID (int groupID)
 
void RemoveOwnerGroupID (int groupID)
 
int GetOwnerExecutorCount ()
 
array< ref SCR_TaskExecutorGetOwnerExecutors ()
 
vector GetTaskPosition ()
 Returns position of task.
 
void SetTaskPosition (vector position)
 Sets position of task.
 
SCR_TaskUIComponent GetUIComponent ()
 
ScriptInvokerVoid GetOnDisplayDataChanged ()
 
void SCR_Task (IEntitySource src, IEntity parent)
 
void ~SCR_Task ()
 

Public Attributes

SCR_EScenarioFrameworkItemGCState m_eGarbageCollectionStatus = SCR_EScenarioFrameworkItemGCState.UNDEFINED
 

Protected Member Functions

void UpdateDroppedTaskMarker ()
 Updates dropped task marker position, checks if it's a deliver task, schedules marker position update if it is.
 
void MoveTaskMarkerPosition ()
 Updates task position, moves marker if asset exists, logs error if asset not assigned.
 
void OnItemCarrierChanged (InventoryStorageSlot oldSlot, InventoryStorageSlot newSlot)
 Handles item carrier changes, removes/adds event handlers, and updates garbage collection status.
 
void HandleNewSlotGC (IEntity entity)
 Handles the cases where GarbageSystem might delete new slot entity.
 
void HandleOldSlotGC (IEntity entity)
 Handles possible revert of case prevention where GarbageSystem might delete root entity.
 
void OnDestroyed (IEntity destroyedEntity)
 Used to remove task item from destroyed entity inventory and drop it to the ground.
 
void OnDisconnected (int iPlayerID)
 
void RegisterPlayer (int iPlayerID, IEntity playerEntity)
 Registers player with inventory and event handlers.
 
void InvokedSetDeliveryTrigger ()
 Sets delivery trigger for an event.
 
- Protected Member Functions inherited from SCR_ScenarioFrameworkTask
void Rpc_SetTaskExecutionBriefing (string text)
 
override void InitializeData ()
 
- Protected Member Functions inherited from SCR_ExtendedTask
void Rpc_SetCustomSubtaskDescription (LocalizedString subTaskDescription)
 
void SetParentTask (SCR_ExtendedTask parentTask)
 
void Rpc_SetParentTask (RplId parentTaskRplID)
 
void Rpc_AddChildTask (RplId taskRplID)
 
void Rpc_RemoveChildTask (RplId taskRplID)
 
void Rpc_SetTaskProgress (float percentage, float previousProgress)
 
void Rpc_AddTaskProgress (float percentage)
 
void Rpc_RemoveTaskProgress (float percentage)
 
void Rpc_ShowTaskProgress (bool enable)
 
override void Rpc_AddOwnerFactionKey (FactionKey factionKey)
 
override void Rpc_RemoveOwnerFactionKey (FactionKey factionKey)
 
override void Rpc_AddOwnerGroupID (int groupID)
 
override void Rpc_RemoveOwnerGroupID (int groupID)
 
override void Rpc_SetTaskOwnership (SCR_ETaskOwnership ownership)
 
override void Rpc_SetTaskVisibility (SCR_ETaskVisibility visibility)
 
void InitializeChildTasks ()
 
- Protected Member Functions inherited from SCR_Task
void Rpc_SetTaskID (string taskID)
 
void Rpc_SetAuthorID (int authorId)
 
void Rpc_SetTaskName (LocalizedString taskName, array< LocalizedString > taskNameParams)
 
void Rpc_SetTaskDescription (LocalizedString taskDesc, array< LocalizedString > taskDescParams)
 
void Rpc_SetTaskIconPath (ResourceName iconPath)
 
void Rpc_SetTaskIconSetName (string iconSetName)
 
void AddTaskAssignee_Proxy (SCR_TaskExecutor executor, int requesterID)
 
void Rpc_AddTaskAssigneePlayer (SCR_TaskExecutorPlayer executor, int requesterID)
 
void Rpc_AddTaskAssigneeEntity (SCR_TaskExecutorEntity executor, int requesterID)
 
void Rpc_AddTaskAssigneeGroup (SCR_TaskExecutorGroup executor, int requesterID)
 
void RemoveTaskAssignee_Proxy (SCR_TaskExecutor executor, int requesterID)
 
void Rpc_RemoveTaskAssigneePlayer (SCR_TaskExecutorPlayer executor, int requesterID)
 
void Rpc_RemoveTaskAssigneeEntity (SCR_TaskExecutorEntity executor, int requesterID)
 
void Rpc_RemoveTaskAssigneeGroup (SCR_TaskExecutorGroup executor, int requesterID)
 
void Rpc_SetTaskState (SCR_ETaskState state)
 
void Rpc_SetTaskUIVisibility (SCR_ETaskUIVisibility visibility)
 
void AddOwnerExecutor_Proxy (SCR_TaskExecutor executor)
 
void Rpc_AddOwnerExecutorPlayer (SCR_TaskExecutorPlayer executor)
 
void Rpc_AddOwnerExecutorEntity (SCR_TaskExecutorEntity executor)
 
void Rpc_AddOwnerExecutorGroup (SCR_TaskExecutorGroup executor)
 
void RemoveOwnerExecutor_Proxy (SCR_TaskExecutor executor)
 
void Rpc_RemoveOwnerExecutorPlayer (SCR_TaskExecutorPlayer executor)
 
void Rpc_RemoveOwnerExecutorEntity (SCR_TaskExecutorEntity executor)
 
void Rpc_RemoveOwnerExecutorGroup (SCR_TaskExecutorGroup executor)
 
void Rpc_SetTaskPosition (vector position)
 
void WriteUIInfo (ScriptBitWriter writer, SCR_TaskUIInfo info)
 
void WriteExecutor (ScriptBitWriter writer, SCR_TaskExecutor executor)
 
void ReadUIInfo (ScriptBitReader reader, out SCR_TaskUIInfo info)
 
void ReadExecutor (ScriptBitReader reader, out SCR_TaskExecutor executor)
 
void RemoveUnauthorizedAssignees ()
 Go through assignee list and remove assignees who are not allowed to be assigned to this task.
 
void OnFactionChanged (FactionAffiliationComponent owner, Faction previousFaction, Faction newFaction)
 If faction changed for an assignee, go through assignee list and remove assignees who are no longer allowed to be assigned to this task.
 
void OnPlayerFactionChanged (int playerId, SCR_PlayerFactionAffiliationComponent playerFactionAffiliationComponent, Faction faction)
 
void OnGroupChanged (int groupID)
 If group changed for an assignee, go through assignee list and remove assignees who are no longer allowed to be assigned to this task.
 
void OnGroupRemoved (SCR_AIGroup group)
 When group is deleted, check if group matches group in task data and reset values.
 
void OnPlayerAddedToGroup (SCR_AIGroup group, int playerID)
 Invoke m_OnDisplayDataChanged to update UI when player joins group.
 
void OnPlayerRemovedFromGroup (SCR_AIGroup group, int playerID)
 Invoke m_OnDisplayDataChanged to update UI when player leaves group.
 
void ConnectToTaskSystem ()
 
void DisconnectFromTaskSystem ()
 

Protected Attributes

string m_sDeliveryTriggerName
 
int m_iObjectState = 0
 
SCR_BaseTriggerEntity m_TriggerDeliver
 
bool m_bDeliveryItemFound
 
bool m_bTaskPositionUpdated
 
- Protected Attributes inherited from SCR_ScenarioFrameworkTask
IEntity m_Asset
 
SCR_ScenarioFrameworkLayerTask m_LayerTask
 
SCR_ScenarioFrameworkSlotTask m_SlotTask
 
- Protected Attributes inherited from SCR_ExtendedTask
bool m_bLinkDataToRelatedTasks
 
bool m_bEnableProgress
 
float m_fProgress
 
LocalizedString m_sCustomSubtaskDescription
 
SCR_ETaskState m_eCachedTaskState
 
ref SCR_ChildTaskInvoker m_OnChildTaskAdded
 
ref SCR_ChildTaskInvoker m_OnChildTaskRemoved
 
ref ScriptInvokerFloat2 m_OnProgressChanged
 
- Protected Attributes inherited from SCR_Task
string m_sTaskID
 
ref SCR_TaskUIInfo m_TaskUIInfo
 
SCR_ETaskState m_eTaskState
 
SCR_ETaskOwnership m_eTaskOwnership
 
SCR_ETaskVisibility m_eTaskVisibility
 
SCR_ETaskUIVisibility m_eTaskUIVisibility
 
ref array< string > m_aOwnerFactionKeys
 
ref array< int > m_aOwnerGroupIDs
 
ref array< ref SCR_TaskExecutorm_aOwnerExecutors
 
ref array< ref SCR_TaskExecutorm_aAssignees
 
ref SCR_TaskData m_TaskData
 
SCR_TaskSystem m_TaskSystem
 
SCR_TaskUIComponent m_UIComponent
 
SCR_EditableEntityComponent m_EditableEntityComponent
 
ref ScriptInvokerVoid m_OnDisplayDataChanged
 
ref DebugTextWorldSpace m_DebugText
 

Additional Inherited Members

- Static Public Member Functions inherited from SCR_Task
static SCR_TaskStateInvoker GetOnTaskStateChanged ()
 
static SCR_TaskOwnershipInvoker GetOnTaskOwnershipChanged ()
 
static SCR_TaskVisibilityInvoker GetOnTaskVisibilityChanged ()
 
static SCR_TaskUIVisibilityInvoker GetOnTaskUIVisibilityChanged ()
 
static SCR_TaskExecutorRequesterInvoker GetOnTaskAssigneeAdded ()
 
static SCR_TaskExecutorRequesterInvoker GetOnTaskAssigneeRemoved ()
 
static SCR_TaskFactionInvoker GetOnOwnerFactionAdded ()
 
static SCR_TaskFactionInvoker GetOnOwnerFactionRemoved ()
 
static SCR_TaskGroupInvoker GetOnOwnerGroupAdded ()
 
static SCR_TaskGroupInvoker GetOnOwnerGroupRemoved ()
 
static SCR_TaskExecutorInvoker GetOnOwnerExecutorAdded ()
 
static SCR_TaskExecutorInvoker GetOnOwnerExecutorRemoved ()
 
- Static Protected Attributes inherited from SCR_ExtendedTask
const float MIN_TASK_PROGRESSION_PERCENTAGE = 0.0
 
const float MAX_TASK_PROGRESSION_PERCENTAGE = 100.0
 
- Static Protected Attributes inherited from SCR_Task
static ref SCR_TaskStateInvoker s_OnTaskStateChanged
 
static ref SCR_TaskOwnershipInvoker s_OnTaskOwnershipChanged
 
static ref SCR_TaskVisibilityInvoker s_OnTaskVisibilityChanged
 
static ref SCR_TaskUIVisibilityInvoker s_OnTaskUIVisibilityChanged
 
static ref SCR_TaskExecutorRequesterInvoker s_OnTaskAssigneeAdded
 
static ref SCR_TaskExecutorRequesterInvoker s_OnTaskAssigneeRemoved
 
static ref SCR_TaskFactionInvoker s_OnOwnerFactionAdded
 
static ref SCR_TaskFactionInvoker s_OnOwnerFactionRemoved
 
static ref SCR_TaskGroupInvoker s_OnOwnerGroupAdded
 
static ref SCR_TaskGroupInvoker s_OnOwnerGroupRemoved
 
static ref SCR_TaskExecutorInvoker s_OnOwnerExecutorAdded
 
static ref SCR_TaskExecutorInvoker s_OnOwnerExecutorRemoved
 

Member Function Documentation

◆ GetTaskDeliverState()

int SCR_TaskDeliver.GetTaskDeliverState ( )
Returns
Represents current state of task delivery object. 0 if item is not possesed and 1 if possesed (someone has it in his possesion)

◆ GetTriggerNameToDeliver()

string SCR_TaskDeliver.GetTriggerNameToDeliver ( )
Returns
the name of trigger for delivery.

◆ HandleNewSlotGC()

void SCR_TaskDeliver.HandleNewSlotGC ( IEntity entity)
protected

Handles the cases where GarbageSystem might delete new slot entity.

◆ HandleOldSlotGC()

void SCR_TaskDeliver.HandleOldSlotGC ( IEntity entity)
protected

Handles possible revert of case prevention where GarbageSystem might delete root entity.

◆ HookTaskAsset()

override void SCR_TaskDeliver.HookTaskAsset ( IEntity object)

Rehooks task asset, sets up damage state change listener, checks engine stop after 5 seconds if vehicle.

Parameters
[in]objectto be linked to this task.

Implements SCR_ScenarioFrameworkTask.

◆ InvokedSetDeliveryTrigger()

void SCR_TaskDeliver.InvokedSetDeliveryTrigger ( )
protected

Sets delivery trigger for an event.

◆ MoveTaskMarkerPosition()

void SCR_TaskDeliver.MoveTaskMarkerPosition ( )
protected

Updates task position, moves marker if asset exists, logs error if asset not assigned.

◆ OnDeliveryTriggerActivated()

void SCR_TaskDeliver.OnDeliveryTriggerActivated ( notnull SCR_ScenarioFrameworkTriggerEntity trigger)
Parameters
[in]triggerTrigger activates when entities enter its area, checks if asset is inside, finishes task if found, else checks ch

◆ OnDestroyed()

void SCR_TaskDeliver.OnDestroyed ( IEntity destroyedEntity)
protected

Used to remove task item from destroyed entity inventory and drop it to the ground.

◆ OnDisconnected()

void SCR_TaskDeliver.OnDisconnected ( int iPlayerID)
protected
Parameters
[in]iPlayerIDiPlayerID represents the unique identifier for the player being disconnected from the server.

◆ OnItemCarrierChanged()

void SCR_TaskDeliver.OnItemCarrierChanged ( InventoryStorageSlot oldSlot,
InventoryStorageSlot newSlot )
protected

Handles item carrier changes, removes/adds event handlers, and updates garbage collection status.

Parameters
[in]oldSlotRepresents the previous inventory storage slot of an item before it was moved or changed.
[in]newSlotNew slot represents the new location where an item is moved in the inventory system.

◆ OnObjectDropped()

void SCR_TaskDeliver.OnObjectDropped ( IEntity item,
BaseInventoryStorageComponent pStorageOwner )

Updates task state and title/description when an item is dropped into inventory.

Parameters
[in]itemItem dropped event, checks if dropped item matches assigned asset, updates task state if match found.
[in]pStorageOwnerRepresents inventory storage component of an entity in the method.

◆ OnObjectPossessed()

void SCR_TaskDeliver.OnObjectPossessed ( IEntity item,
BaseInventoryStorageComponent pStorageOwner )

Updates task title and description if possessed item matches asset, sets delivery item found flag if not, and progresses state if.

Parameters
[in]itemChecks if possessed item matches task asset, updates title and description if so, sets state to PROGRESSED if delivery
[in]pStorageOwnerRepresents inventory storage component for item possession tracking.

◆ RegisterPlayer()

void SCR_TaskDeliver.RegisterPlayer ( int iPlayerID,
IEntity playerEntity )
protected

Registers player with inventory and event handlers.

Parameters
[in]iPlayerIDPlayer ID representing the controlled entity in the game.
[in]playerEntityPlayer entity represents an in-game player controlled by a human player.

◆ SetDeliveryTrigger() [1/2]

void SCR_TaskDeliver.SetDeliveryTrigger ( )

Sets delivery trigger by name if it exists in the world.

◆ SetDeliveryTrigger() [2/2]

void SCR_TaskDeliver.SetDeliveryTrigger ( SCR_BaseTriggerEntity trigger)
Parameters
[in]triggerTrigger entity for delivery activation.

◆ SetTriggerNameToDeliver()

void SCR_TaskDeliver.SetTriggerNameToDeliver ( string triggerName)
Parameters
[in]triggerNameRepresents the name of the trigger for delivering an object in the scenario.

◆ UpdateDroppedTaskMarker()

void SCR_TaskDeliver.UpdateDroppedTaskMarker ( )
protected

Updates dropped task marker position, checks if it's a deliver task, schedules marker position update if it is.

◆ UpdateTaskTitleAndDescription()

void SCR_TaskDeliver.UpdateTaskTitleAndDescription ( int iPossessed = -1)

Updates task title and description based on object state, triggers delivery, and sets task title and description for the support entity.

Parameters
[in]iPossessediPossessed represents the possession state of the task, either 0 (not possessed) or 1 (possessed

Member Data Documentation

◆ m_bDeliveryItemFound

bool SCR_TaskDeliver.m_bDeliveryItemFound
protected

◆ m_bTaskPositionUpdated

bool SCR_TaskDeliver.m_bTaskPositionUpdated
protected

◆ m_eGarbageCollectionStatus

SCR_EScenarioFrameworkItemGCState SCR_TaskDeliver.m_eGarbageCollectionStatus = SCR_EScenarioFrameworkItemGCState.UNDEFINED

◆ m_iObjectState

int SCR_TaskDeliver.m_iObjectState = 0
protected

◆ m_sDeliveryTriggerName

string SCR_TaskDeliver.m_sDeliveryTriggerName
protected

◆ m_TriggerDeliver

SCR_BaseTriggerEntity SCR_TaskDeliver.m_TriggerDeliver
protected

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