|
Arma Reforger Script API
|
Public Member Functions | |
| void | GetAssigneesForTask (notnull SCR_Task task, out array< ref SCR_TaskExecutor > assignees) |
| Outputs array of assignee entities for task. | |
| bool | IsTaskVisibleInTaskList (notnull SCR_Task task) |
| Returns true if task is visible in task list. | |
| bool | IsTaskVisibleOnMap (notnull SCR_Task task) |
| Returns true if task is visible on map. | |
| bool | IsTaskVisibleFor (notnull SCR_Task task, notnull SCR_TaskExecutor executor) |
| Returns true if task is visible to executor. | |
| bool | CanTaskBeAssignedTo (notnull SCR_Task task, notnull SCR_TaskExecutor executor) |
| Returns true if task is assignable to executor; Uses task ownership for comparison. | |
| bool | IsGroupLeader (notnull array< int > groupIDs, int playerID) |
| Returns true if specified player is leader of any group in the array. | |
| int | FindGroupByLeader (notnull array< int > groupIDs, int leaderID) |
| Finds and returns group which specified player is the leader of. | |
| int | GetTasks (out notnull array< SCR_Task > outTasks) |
| SCR_Task | GetTaskAssignedTo (notnull SCR_TaskExecutor executor) |
| Returns task assigned to provided executor; Returns null if executor is not assigned to any task. | |
| void | GetTasksByState (out notnull array< SCR_Task > outTasks, SCR_ETaskState state, FactionKey filterFaction=FactionKey.Empty, int filterGroup=-1) |
| Outputs array of tasks that match the state; Tasks can be filtered further through faction and group. | |
| int | GetTasksByStateFiltered (out notnull array< SCR_Task > outTasks, SCR_ETaskState state, FactionKey filterFaction=FactionKey.Empty, int filterGroup=-1, TypeName filterClass=TypeName.Empty, bool allowInherited=false) |
| Outputs array of tasks that match the state; Tasks can be filtered further through faction, group and class. | |
| int | GetTasksVisibleFor (out notnull array< SCR_Task > outTasks, notnull SCR_TaskExecutor executor) |
| void | RegisterTask (notnull SCR_Task task) |
| Registers task into task system. | |
| void | UnregisterTask (notnull SCR_Task task) |
| Unregisters task from task system. | |
| void | AssignTask (notnull SCR_Task task, notnull SCR_TaskExecutor executor, bool force=false, int requesterID=0) |
| Tries to assign task to executor; If force is true, executor will be automatically unassigned from other tasks and assigned to this one. | |
| void | UnassignTask (notnull SCR_Task task, notnull SCR_TaskExecutor executor, int requesterID=0) |
| Tries to unassign task from executor. | |
| bool | CanProgressBeShownForTask (notnull SCR_Task task) |
| Returns true if progress for task can be shown. | |
| void | ShowProgressForTask (notnull SCR_Task task, bool enable) |
| Toggles progress bar for task. | |
| float | GetTaskProgress (notnull SCR_Task task) |
| Returns progress of task as float; Value ranges from 0-100. | |
| void | SetTaskProgress (notnull SCR_Task task, float percentage) |
| Sets progress of task as float; Value ranges from 0-100. | |
| void | AddTaskProgress (notnull SCR_Task task, float percentage) |
| Tries to add progress to task. | |
| void | RemoveTaskProgress (notnull SCR_Task task, float percentage) |
| Tries to remove progress from task. | |
| SCR_ETaskState | GetTaskState (notnull SCR_Task task) |
| Returns state of task. | |
| void | SetTaskState (notnull SCR_Task task, SCR_ETaskState state) |
| Changes the state of task to the new state. | |
| SCR_ETaskOwnership | GetTaskOwnership (notnull SCR_Task task) |
| Returns ownership of task. | |
| void | SetTaskOwnership (notnull SCR_Task task, SCR_ETaskOwnership ownership) |
| Tries to change ownership of task to new ownership. | |
| SCR_ETaskVisibility | GetTaskVisibility (notnull SCR_Task task) |
| Returns visibility of task. | |
| void | SetTaskVisibility (notnull SCR_Task task, SCR_ETaskVisibility visibility) |
| Tries to change visibility of task to new visibility. | |
| SCR_ETaskUIVisibility | GetTaskUIVisibility (notnull SCR_Task task) |
| Returns visibility of task in UI. | |
| void | SetTaskUIVisibility (notnull SCR_Task task, SCR_ETaskUIVisibility visibility) |
| Tries to change visibility of task to new visibility in UI. | |
| array< string > | GetTaskFactions (notnull SCR_Task task) |
| Returns factions of task. | |
| void | AddTaskFaction (notnull SCR_Task task, FactionKey factionKey) |
| Tries to add faction to task. | |
| void | RemoveTaskFaction (notnull SCR_Task task, FactionKey factionKey) |
| Tries to remove faction from task. | |
| array< int > | GetTaskGroups (notnull SCR_Task task) |
| Returns group IDs of task. | |
| void | AddTaskGroup (notnull SCR_Task task, int groupID) |
| Adds group ID to task. | |
| void | RemoveTaskGroup (notnull SCR_Task task, int groupID) |
| Removes group ID from task. | |
| array< ref SCR_TaskExecutor > | GetTaskExecutors (notnull SCR_Task task) |
| Returns owner executors of task. | |
| void | AddTaskExecutor (notnull SCR_Task task, notnull SCR_TaskExecutor executor) |
| Adds given executor to task as an owner/viewer depending on task ownership and visibility. | |
| void | RemoveTaskExecutor (notnull SCR_Task task, notnull SCR_TaskExecutor executor) |
| Removes given executor from task as an owner/viewer depending on task ownership and visibility. | |
| vector | GetTaskLocation (notnull SCR_Task task) |
| Returns location of task as vector. | |
| void | MoveTask (notnull SCR_Task task, vector destination) |
| Sets the location of task to a new location. | |
| void | GetParentTasksFor (notnull SCR_Task task, out SCR_Task parentTask) |
| Outputs parent task of provided child. | |
| void | GetChildTasksFor (notnull SCR_Task task, out array< SCR_Task > childTasks) |
| Outputs array of tasks parented to task. | |
| void | AddChildTaskTo (notnull SCR_Task task, notnull SCR_Task childTask) |
| Tries to parent childTask to task; Tasks already parented to another cannot have their own child tasks as maximum allowed depth is 1. | |
| void | RemoveChildTaskFrom (notnull SCR_Task task, notnull SCR_Task childTask) |
| Tries to unparent childTask from task. | |
| SCR_Task | CreateTask (ResourceName taskResourceName, string taskID, string name, string desc, vector position=vector.Zero, int playerId=-1) |
| Creates a new task and registers it into SCR_TaskSystem. | |
| void | DeleteTask (notnull SCR_Task task) |
| Deletes task from SCR_TaskSystem. | |
| void | Diag_CreateTask () |
| void | Diag_TaskList () |
| void | Diag_Task (notnull SCR_Task task, int index, int subIndex=-1) |
| void | Diag_ShowTaskListFor () |
| void | Diag_TaskWindow (notnull SCR_Task task, notnull SCR_TaskData data) |
| void | Diag_EditStringContextMenu (notnull SCR_Task task, string name, int settingIndex) |
| void | Diag_EditEnumContextMenu (notnull SCR_Task task, TypeName enumType, int settingIndex) |
| void | Diag_EditExecutorContextMenu (notnull SCR_Task task, string name, int settingIndex) |
| void | Diag_EditFactionContextMenu (notnull SCR_Task task, int settingIndex) |
| void | Diag_EditGroupContextMenu (notnull SCR_Task task, int settingIndex) |
| void | Diag_MoveTaskContextMenu (notnull SCR_Task task, int settingIndex) |
| void | Diag_EditChildTasksContextMenu (notnull SCR_ExtendedTask extendedTask, int settingIndex) |
| void | Diag_EditProgressContextMenu (notnull SCR_ExtendedTask extendedTask, int settingIndex) |
Public Member Functions inherited from GameSystem | |
| bool | ShouldBePaused () |
| Is this system should be paused while the simulation is paused? | |
| bool | ShouldBeEnabledInEditMode () |
| Is this system should be enabled inside the editor. | |
Static Public Member Functions | |
| static override void | InitInfo (WorldSystemInfo outInfo) |
| static SCR_TaskSystem | GetInstance () |
| Returns instance of SCR_TaskSystem. | |
| static SCR_TaskInvoker | GetOnTaskAdded () |
| Returns OnTaskAdded invoker. | |
| static SCR_TaskInvoker | GetOnTaskRemoved () |
| Returns OnTaskRemoved invoker. | |
| static SCR_Task | GetTaskFromTaskID (string taskID, bool notify=true) |
| Finds task by taskID and returns it; Set notify to false to suppress warning message in case task could not be found. | |
| static SCR_TaskExecutor | TaskExecutorFromPlayerID (int playerID) |
| Creates task executor from player ID and returns it. | |
| static SCR_TaskExecutor | TaskExecutorFromEntity (IEntity ent) |
| Creates task executor from entity and returns it. | |
| static SCR_TaskExecutor | TaskExecutorFromGroup (int groupID) |
| Creates task executor from player group and returns it. | |
Protected Member Functions | |
| override void | OnUpdatePoint (WorldUpdatePointArgs args) |
Protected Attributes | |
| RplComponent | m_Rpl |
Static Protected Attributes | |
| static ref SCR_TaskInvoker | s_OnTaskAdded |
| static ref SCR_TaskInvoker | s_OnTaskRemoved |
| static ref array< SCR_Task > | s_aTasks = {} |
| const ResourceName | BASE_TASK_RESOURCE = "{1D0F815858EE24AD}Prefabs/Tasks/BaseTask.et" |
| const ResourceName | EXTENDED_TASK_RESOURCE = "{CF6A2A13DF7B1018}Prefabs/Tasks/ExtendedTask.et" |
Tries to parent childTask to task; Tasks already parented to another cannot have their own child tasks as maximum allowed depth is 1.
| [in] | task | |
| [in] | childTask |
| void SCR_TaskSystem.AddTaskExecutor | ( | notnull SCR_Task | task, |
| notnull SCR_TaskExecutor | executor ) |
Adds given executor to task as an owner/viewer depending on task ownership and visibility.
| [in] | task | |
| [in] | executor |
| void SCR_TaskSystem.AddTaskFaction | ( | notnull SCR_Task | task, |
| FactionKey | factionKey ) |
Tries to add faction to task.
| [in] | task | |
| [in] | factionKey |
| void SCR_TaskSystem.AddTaskGroup | ( | notnull SCR_Task | task, |
| int | groupID ) |
Adds group ID to task.
| [in] | task | |
| [in] | groupID |
| void SCR_TaskSystem.AddTaskProgress | ( | notnull SCR_Task | task, |
| float | percentage ) |
Tries to add progress to task.
| [in] | task | |
| [in] | percentage |
| void SCR_TaskSystem.AssignTask | ( | notnull SCR_Task | task, |
| notnull SCR_TaskExecutor | executor, | ||
| bool | force = false, | ||
| int | requesterID = 0 ) |
Tries to assign task to executor; If force is true, executor will be automatically unassigned from other tasks and assigned to this one.
| [in] | task | |
| [in] | executor | |
| [in] | force | |
| [in] | requesterID |
| bool SCR_TaskSystem.CanProgressBeShownForTask | ( | notnull SCR_Task | task | ) |
Returns true if progress for task can be shown.
| [in] | task |
| bool SCR_TaskSystem.CanTaskBeAssignedTo | ( | notnull SCR_Task | task, |
| notnull SCR_TaskExecutor | executor ) |
Returns true if task is assignable to executor; Uses task ownership for comparison.
| [in] | task | |
| [in] | executor |
| SCR_Task SCR_TaskSystem.CreateTask | ( | ResourceName | taskResourceName, |
| string | taskID, | ||
| string | name, | ||
| string | desc, | ||
| vector | position = vector::Zero, | ||
| int | playerId = -1 ) |
Creates a new task and registers it into SCR_TaskSystem.
| [in] | taskResource | |
| [in] | taskID | |
| [in] | name | |
| [in] | desc | |
| [in] | position |
| void SCR_TaskSystem.DeleteTask | ( | notnull SCR_Task | task | ) |
Deletes task from SCR_TaskSystem.
| [in] | task |
| void SCR_TaskSystem.Diag_CreateTask | ( | ) |
| void SCR_TaskSystem.Diag_EditChildTasksContextMenu | ( | notnull SCR_ExtendedTask | extendedTask, |
| int | settingIndex ) |
| void SCR_TaskSystem.Diag_EditEnumContextMenu | ( | notnull SCR_Task | task, |
| TypeName | enumType, | ||
| int | settingIndex ) |
| void SCR_TaskSystem.Diag_EditExecutorContextMenu | ( | notnull SCR_Task | task, |
| string | name, | ||
| int | settingIndex ) |
| void SCR_TaskSystem.Diag_EditFactionContextMenu | ( | notnull SCR_Task | task, |
| int | settingIndex ) |
| void SCR_TaskSystem.Diag_EditGroupContextMenu | ( | notnull SCR_Task | task, |
| int | settingIndex ) |
| void SCR_TaskSystem.Diag_EditProgressContextMenu | ( | notnull SCR_ExtendedTask | extendedTask, |
| int | settingIndex ) |
| void SCR_TaskSystem.Diag_EditStringContextMenu | ( | notnull SCR_Task | task, |
| string | name, | ||
| int | settingIndex ) |
| void SCR_TaskSystem.Diag_MoveTaskContextMenu | ( | notnull SCR_Task | task, |
| int | settingIndex ) |
| void SCR_TaskSystem.Diag_ShowTaskListFor | ( | ) |
| void SCR_TaskSystem.Diag_Task | ( | notnull SCR_Task | task, |
| int | index, | ||
| int | subIndex = -1 ) |
| void SCR_TaskSystem.Diag_TaskList | ( | ) |
| void SCR_TaskSystem.Diag_TaskWindow | ( | notnull SCR_Task | task, |
| notnull SCR_TaskData | data ) |
| int SCR_TaskSystem.FindGroupByLeader | ( | notnull array< int > | groupIDs, |
| int | leaderID ) |
Finds and returns group which specified player is the leader of.
| [in] | groupIDs | |
| [in] | leaderID |
| void SCR_TaskSystem.GetAssigneesForTask | ( | notnull SCR_Task | task, |
| out array< ref SCR_TaskExecutor > | assignees ) |
Outputs array of assignee entities for task.
| [in] | task | |
| [out] | assignees |
Outputs array of tasks parented to task.
| [in] | task | |
| [out] | childTasks |
|
static |
Returns instance of SCR_TaskSystem.
|
static |
Returns OnTaskAdded invoker.
|
static |
Returns OnTaskRemoved invoker.
Outputs parent task of provided child.
| [in] | task | |
| [out] | parentTask |
| SCR_Task SCR_TaskSystem.GetTaskAssignedTo | ( | notnull SCR_TaskExecutor | executor | ) |
Returns task assigned to provided executor; Returns null if executor is not assigned to any task.
| [in] | executor |
| array< ref SCR_TaskExecutor > SCR_TaskSystem.GetTaskExecutors | ( | notnull SCR_Task | task | ) |
Returns owner executors of task.
| [in] | task |
| array< string > SCR_TaskSystem.GetTaskFactions | ( | notnull SCR_Task | task | ) |
Returns factions of task.
| [in] | task |
|
static |
Finds task by taskID and returns it; Set notify to false to suppress warning message in case task could not be found.
| [in] | taskID | |
| [in] | notify |
| array< int > SCR_TaskSystem.GetTaskGroups | ( | notnull SCR_Task | task | ) |
Returns group IDs of task.
| [in] | task |
| vector SCR_TaskSystem.GetTaskLocation | ( | notnull SCR_Task | task | ) |
Returns location of task as vector.
| [in] | task |
| SCR_ETaskOwnership SCR_TaskSystem.GetTaskOwnership | ( | notnull SCR_Task | task | ) |
Returns ownership of task.
| [in] | task |
| float SCR_TaskSystem.GetTaskProgress | ( | notnull SCR_Task | task | ) |
Returns progress of task as float; Value ranges from 0-100.
| [in] | task |
| int SCR_TaskSystem.GetTasks | ( | out notnull array< SCR_Task > | outTasks | ) |
| [out] | outTasks |
| void SCR_TaskSystem.GetTasksByState | ( | out notnull array< SCR_Task > | outTasks, |
| SCR_ETaskState | state, | ||
| FactionKey | filterFaction = FactionKey::Empty, | ||
| int | filterGroup = -1 ) |
Outputs array of tasks that match the state; Tasks can be filtered further through faction and group.
| [out] | outTasks | |
| [in] | state | |
| [in] | filterFaction | |
| [in] | filterGroup |
| int SCR_TaskSystem.GetTasksByStateFiltered | ( | out notnull array< SCR_Task > | outTasks, |
| SCR_ETaskState | state, | ||
| FactionKey | filterFaction = FactionKey::Empty, | ||
| int | filterGroup = -1, | ||
| TypeName | filterClass = TypeName::Empty, | ||
| bool | allowInherited = false ) |
Outputs array of tasks that match the state; Tasks can be filtered further through faction, group and class.
| [out] | outTasks | |
| [in] | state | |
| [in] | filterFaction | |
| [in] | filterGroup | |
| [in] | filterClass | |
| [in] | allowInherited |
| SCR_ETaskState SCR_TaskSystem.GetTaskState | ( | notnull SCR_Task | task | ) |
Returns state of task.
| [in] | task |
| int SCR_TaskSystem.GetTasksVisibleFor | ( | out notnull array< SCR_Task > | outTasks, |
| notnull SCR_TaskExecutor | executor ) |
| [out] | outTasks | |
| [in] | executor |
| SCR_ETaskUIVisibility SCR_TaskSystem.GetTaskUIVisibility | ( | notnull SCR_Task | task | ) |
Returns visibility of task in UI.
| [in] | task |
| SCR_ETaskVisibility SCR_TaskSystem.GetTaskVisibility | ( | notnull SCR_Task | task | ) |
Returns visibility of task.
| [in] | task |
|
static |
| bool SCR_TaskSystem.IsGroupLeader | ( | notnull array< int > | groupIDs, |
| int | playerID ) |
Returns true if specified player is leader of any group in the array.
| [in] | groupIDs | |
| [in] | playerID |
| bool SCR_TaskSystem.IsTaskVisibleFor | ( | notnull SCR_Task | task, |
| notnull SCR_TaskExecutor | executor ) |
Returns true if task is visible to executor.
| [in] | task | |
| [in] | executor |
| bool SCR_TaskSystem.IsTaskVisibleInTaskList | ( | notnull SCR_Task | task | ) |
Returns true if task is visible in task list.
| [in] | task |
| bool SCR_TaskSystem.IsTaskVisibleOnMap | ( | notnull SCR_Task | task | ) |
Returns true if task is visible on map.
| [in] | task |
| void SCR_TaskSystem.MoveTask | ( | notnull SCR_Task | task, |
| vector | destination ) |
Sets the location of task to a new location.
| [in] | task | |
| [in] | destination |
|
protected |
| void SCR_TaskSystem.RegisterTask | ( | notnull SCR_Task | task | ) |
Registers task into task system.
| [in] | task |
Tries to unparent childTask from task.
| [in] | task | |
| [in] | childTask |
| void SCR_TaskSystem.RemoveTaskExecutor | ( | notnull SCR_Task | task, |
| notnull SCR_TaskExecutor | executor ) |
Removes given executor from task as an owner/viewer depending on task ownership and visibility.
| [in] | task | |
| [in] | executor |
| void SCR_TaskSystem.RemoveTaskFaction | ( | notnull SCR_Task | task, |
| FactionKey | factionKey ) |
Tries to remove faction from task.
| [in] | task | |
| [in] | factionKey |
| void SCR_TaskSystem.RemoveTaskGroup | ( | notnull SCR_Task | task, |
| int | groupID ) |
Removes group ID from task.
| [in] | task | |
| [in] | groupID |
| void SCR_TaskSystem.RemoveTaskProgress | ( | notnull SCR_Task | task, |
| float | percentage ) |
Tries to remove progress from task.
| [in] | task | |
| [in] | percentage |
| void SCR_TaskSystem.SetTaskOwnership | ( | notnull SCR_Task | task, |
| SCR_ETaskOwnership | ownership ) |
Tries to change ownership of task to new ownership.
| [in] | task | |
| [in] | ownership |
| void SCR_TaskSystem.SetTaskProgress | ( | notnull SCR_Task | task, |
| float | percentage ) |
Sets progress of task as float; Value ranges from 0-100.
| [in] | task | |
| [in] | percentage |
| void SCR_TaskSystem.SetTaskState | ( | notnull SCR_Task | task, |
| SCR_ETaskState | state ) |
Changes the state of task to the new state.
| [in] | task | |
| [in] | state |
| void SCR_TaskSystem.SetTaskUIVisibility | ( | notnull SCR_Task | task, |
| SCR_ETaskUIVisibility | visibility ) |
Tries to change visibility of task to new visibility in UI.
| [in] | task | |
| [in] | visibility |
| void SCR_TaskSystem.SetTaskVisibility | ( | notnull SCR_Task | task, |
| SCR_ETaskVisibility | visibility ) |
Tries to change visibility of task to new visibility.
| [in] | task | |
| [in] | visibility |
| void SCR_TaskSystem.ShowProgressForTask | ( | notnull SCR_Task | task, |
| bool | enable ) |
Toggles progress bar for task.
| [in] | task | |
| [in] | enable |
|
static |
Creates task executor from entity and returns it.
| [in] | ent |
|
static |
Creates task executor from player group and returns it.
| [in] | groupID |
|
static |
Creates task executor from player ID and returns it.
| [in] | playerID |
| void SCR_TaskSystem.UnassignTask | ( | notnull SCR_Task | task, |
| notnull SCR_TaskExecutor | executor, | ||
| int | requesterID = 0 ) |
Tries to unassign task from executor.
| [in] | task | |
| [in] | executor | |
| [in] | requesterID |
| void SCR_TaskSystem.UnregisterTask | ( | notnull SCR_Task | task | ) |
Unregisters task from task system.
| [in] | task |
|
staticprotected |
|
staticprotected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |