Arma Reforger Script API
|
A base class for tasks. More...
Public Member Functions | |
void | OnDelete () |
bool | NotifyAssignment () |
bool | NotifyUnassign () |
void | DoNotifyAssignment (int assigneeID) |
void | DoNotifyUnassign (int assigneeID) |
SCR_ERadioMsg | GetAssignMessage () |
SCR_ERadioMsg | GetUnassignMessage () |
ResourceName | GetMapUIElementResourceName () |
string | GetMapDescriptorText () |
void | OnMapOpen (MapConfiguration config) |
void | OnHoverItem (MapItem item) |
string | GetFullTaskIconName () |
string | GetTaskMapIconName () |
string | GetTaskListIconNamePrefix () |
string | GetTaskListIconName () |
string | GetTaskListTaskTitle () |
string | GetMajorModifier () |
string | GetTaskListTaskText () |
Widget | GetParentWidget (notnull Widget rootWidget) |
ResourceName | GetIconImageset () |
void | SetHUDIcon () |
void | SetWidgetIcon (ImageWidget image) |
void | ClearWidgetIcon () |
Remove icon assigned to this task. | |
void | UpdateMapTaskIcon () |
void | UpdatePriorityMapTaskIcon () |
bool | AssignTaskToAI (AIAgent agent) |
string | GetIconName () |
ResourceName | GetImageSetName () |
string | GetIconSuffix () |
string | GetTitleIconString () |
void | SetTitleWidgetText (notnull TextWidget textWidget, string taskText) |
string | GetTitleText () |
void | SetDescriptionWidgetText (notnull TextWidget textWidget, string taskText) |
Widget | GenerateTaskDescriptionUI (notnull Widget rootWidget, array< Widget > widgets) |
void | UpdateTaskListAssignee () |
void | OnAssigneeKilled () |
void | CreateMapUIIcon () |
Faction | GetTargetFaction () |
Returns the faction that should complete this task. | |
void | SetTargetFaction (Faction targetFaction) |
Sets the faction that should complete this task. | |
string | GetFinishText () |
Returns a text informing about the task being finished. | |
bool | IsAssigned () |
Returns whether the task is assigned to someone or not. | |
string | GetAllAssigneeNamesString () |
Returns a string with all the assignees on this task in following format: "PlayerA, PlayerB, ..., PlayerN". | |
void | CheckAssigneeTimeout () |
Checks all the assignees for timeout, if their time is up, they get unassigned. | |
void | SetLastAssigneeAddedTimestamp (float timestamp) |
void | SetIndividual (bool individual) |
Set this task as task for an individual. | |
bool | IsIndividual () |
Returns whether this task is for an individual or not. | |
void | SetIsPriority (bool isPrio) |
bool | IsPriority () |
bool | IsAssignable () |
bool | CanBeAssigned (out SCR_ECannotAssignReasons reason, int playerID=-1) |
Returns whether this task can be assigned to the player with the given player ID If playerID == -1, the local player is used as the target. | |
float | GetLastAssigneeAddedTimestamp () |
Returns the timestamp of last add assignee event. | |
float | GetAssigneeTimeLeft () |
Returns time left the assignee of this task has to finish it, after that they get automatically unassigned. | |
void | SetTaskID (int taskID) |
Sets an ID of this task. | |
int | GetTaskID () |
Returns an ID of this task. | |
SCR_TaskState | GetTaskState () |
Returns the state of this task. | |
void | SetTitle (string title) |
string | GetTitle () |
Return the title of this task. | |
void | SetDescription (string description) |
string | GetDescription () |
Return the description of this task. | |
SCR_BaseTaskExecutor | GetAssignee () |
Returns the first assignee of this task. | |
int | GetAssignees (out array< SCR_BaseTaskExecutor > assignees) |
Returns assignees of this task. | |
int | GetAssigneeCount () |
void | Cancel (bool showMsg=true) |
void | Remove () |
Marks the task as removed. | |
void | Create (bool showMsg=true) |
When the task is created. | |
void | Finish (bool showMsg=true) |
Marks the task as finished. | |
void | Fail (bool showMsg=true) |
Fails the task. | |
void | RemoveAllAssignees () |
Removes every assignee from this task. | |
void | RemoveAssignee (SCR_BaseTaskExecutor assignee, SCR_EUnassignReason reason) |
Removes an assignee, specified as a parameter, from this task. | |
void | AddAssignee (SCR_BaseTaskExecutor assignee, float timestamp) |
Adds a new assignee, specified as a parameter, to this task. | |
void | InitOnSpawn (int pid, IEntity ent) |
void | ToggleHUDIcon (bool show, bool fade=true) |
void | UpdateHUDIcon () |
Widget | GetTaskIconkWidget () |
void | SetTaskIconWidget (Widget w) |
void | SetState (SCR_TaskState state) |
Changes the state of this task to the parameter. | |
void | RegisterTaskUpdate (SCR_ETaskEventMask TaskEventMask) |
Registers task event mask for OnTaskUpdate. | |
void | Serialize (ScriptBitWriter writer) |
void | Deserialize (ScriptBitReader reader) |
override void | EOnInit (IEntity owner) |
void | SCR_BaseTask (IEntitySource src, IEntity parent) |
void | ~SCR_BaseTask () |
Static Public Attributes | |
static const string | TASK_AMOUNT_COMPLETED_TEXT = "#AR-Tasks_AmountCompleted" |
static const string | TASK_PROGRESS_TEXT = "#AR-Tasks_StatusProgress-UC" |
static const string | TASK_FINISHED_TEXT = "#AR-Tasks_StatusFinished-UC" |
static const string | TASK_AVAILABLE_TEXT = "#AR-Tasks_StatusNew-UC" |
static const string | TASK_HINT_TEXT = "#AR-Tasks_Hint" |
static const string | TASK_CANCELLED_TEXT = "#AR-Tasks_StatusCancelled-UC" |
static const string | TASK_COMPLETED_TEXT = "#AR-Tasks_StatusCompleted-UC" |
static const string | TASK_FAILED_TEXT = "#AR-Tasks_StatusFailed-UC" |
static const float | DEFAULT_ASSIGNEE_TIME_LIMIT = 1800 |
static const float | DEFAULT_ASSIGNEE_TIMEOUT_TIME = 60 |
static const int | INVALID_TIMESTAMP = -1 |
static const int | INVALID_TASK_ID = -1 |
static int | s_iCurrentTaskID = 0 |
const string | TASK_BG_M = "Icon_M_Task_BG" |
const string | TASK_O_M = "Icon_M_Task_Outline" |
const string | TASK_BG = "Icon_Task_BG" |
const string | TASK_O = "Icon_Task_Outline" |
const string | TASK_H = "Icon_M_Task_Hover" |
const string | Task_S = "TaskIconSymbol" |
Protected Member Functions | |
void | ShowPopUpNotification (string subtitle) |
void | UpdateMapInfo () |
bool | DoneByAssignee () |
void | ShowTaskProgress (bool showMsg=true) |
void | ShowAvailableTask (bool afterAssigneeRemoved=false) |
Shows a message informing about this task being available. | |
bool | IsAssignedToLocalPlayer () |
Returns whether this task is assigned to the local player. | |
void | OnAssigneeRemoved (SCR_BaseTaskExecutor oldAssignee) |
An event called when an assignee has been removed from this task. | |
void | OnAssigneeAdded (SCR_BaseTaskExecutor newAssignee) |
An event called when a new assignee has been added to this task. | |
void | OnStateChanged (SCR_TaskState previousState, SCR_TaskState newState) |
An event called when the state of this task has been changed. | |
Static Protected Attributes | |
static const float | PLATFORM_ICON_SIZE = 2 |
A base class for tasks.
void SCR_BaseTask.SCR_BaseTask | ( | IEntitySource | src, |
IEntity | parent | ||
) |
void SCR_BaseTask.~SCR_BaseTask | ( | ) |
void SCR_BaseTask.AddAssignee | ( | SCR_BaseTaskExecutor | assignee, |
float | timestamp | ||
) |
Adds a new assignee, specified as a parameter, to this task.
bool SCR_BaseTask.AssignTaskToAI | ( | AIAgent | agent | ) |
bool SCR_BaseTask.CanBeAssigned | ( | out SCR_ECannotAssignReasons | reason, |
int | playerID = -1 |
||
) |
Returns whether this task can be assigned to the player with the given player ID If playerID == -1, the local player is used as the target.
Implemented in SCR_RequestedTask.
void SCR_BaseTask.Cancel | ( | bool | showMsg = true | ) |
Implemented in SCR_EditorTask, and SCR_RequestedTask.
void SCR_BaseTask.CheckAssigneeTimeout | ( | ) |
Checks all the assignees for timeout, if their time is up, they get unassigned.
void SCR_BaseTask.ClearWidgetIcon | ( | ) |
Remove icon assigned to this task.
void SCR_BaseTask.Create | ( | bool | showMsg = true | ) |
When the task is created.
Implemented in SCR_EditorTask.
void SCR_BaseTask.CreateMapUIIcon | ( | ) |
void SCR_BaseTask.Deserialize | ( | ScriptBitReader | reader | ) |
Implemented in SCR_ScenarioFrameworkTask, SCR_CampaignTask, SCR_CampaignBaseTask, SCR_EvacuateTask, SCR_RequestedTask, and SCR_TransportTask.
|
protected |
Implemented in SCR_CampaignTask.
void SCR_BaseTask.DoNotifyAssignment | ( | int | assigneeID | ) |
Implemented in SCR_CampaignTask, and SCR_RequestedTask.
void SCR_BaseTask.DoNotifyUnassign | ( | int | assigneeID | ) |
Implemented in SCR_RequestedTask.
override void SCR_BaseTask.EOnInit | ( | IEntity | owner | ) |
Implemented in SCR_ScenarioFrameworkTask, SCR_TriggerTask, SCR_RequestedTask, and SCR_TransportTask.
void SCR_BaseTask.Fail | ( | bool | showMsg = true | ) |
Fails the task.
Implemented in SCR_CampaignDefendTask, SCR_CampaignTask, SCR_EditorTask, and SCR_RequestedTask.
void SCR_BaseTask.Finish | ( | bool | showMsg = true | ) |
Marks the task as finished.
Implemented in SCR_ScenarioFrameworkTask, SCR_CampaignDefendTask, SCR_CampaignTask, SCR_EditorTask, and SCR_RequestedTask.
Widget SCR_BaseTask.GenerateTaskDescriptionUI | ( | notnull Widget | rootWidget, |
array< Widget > | widgets | ||
) |
Implemented in SCR_RequestedTask.
string SCR_BaseTask.GetAllAssigneeNamesString | ( | ) |
Returns a string with all the assignees on this task in following format: "PlayerA, PlayerB, ..., PlayerN".
SCR_BaseTaskExecutor SCR_BaseTask.GetAssignee | ( | ) |
Returns the first assignee of this task.
int SCR_BaseTask.GetAssigneeCount | ( | ) |
int SCR_BaseTask.GetAssignees | ( | out array< SCR_BaseTaskExecutor > | assignees | ) |
Returns assignees of this task.
float SCR_BaseTask.GetAssigneeTimeLeft | ( | ) |
Returns time left the assignee of this task has to finish it, after that they get automatically unassigned.
SCR_ERadioMsg SCR_BaseTask.GetAssignMessage | ( | ) |
string SCR_BaseTask.GetDescription | ( | ) |
Return the description of this task.
Implemented in SCR_CampaignTask.
string SCR_BaseTask.GetFinishText | ( | ) |
Returns a text informing about the task being finished.
Implemented in SCR_CampaignTask.
string SCR_BaseTask.GetFullTaskIconName | ( | ) |
ResourceName SCR_BaseTask.GetIconImageset | ( | ) |
string SCR_BaseTask.GetIconName | ( | ) |
string SCR_BaseTask.GetIconSuffix | ( | ) |
Implemented in SCR_CampaignTask.
ResourceName SCR_BaseTask.GetImageSetName | ( | ) |
float SCR_BaseTask.GetLastAssigneeAddedTimestamp | ( | ) |
Returns the timestamp of last add assignee event.
string SCR_BaseTask.GetMajorModifier | ( | ) |
string SCR_BaseTask.GetMapDescriptorText | ( | ) |
Implemented in SCR_RefuelTask, SCR_CampaignDefendTask, SCR_CampaignTask, and SCR_EvacuateTask.
ResourceName SCR_BaseTask.GetMapUIElementResourceName | ( | ) |
Widget SCR_BaseTask.GetParentWidget | ( | notnull Widget | rootWidget | ) |
Faction SCR_BaseTask.GetTargetFaction | ( | ) |
Returns the faction that should complete this task.
Widget SCR_BaseTask.GetTaskIconkWidget | ( | ) |
int SCR_BaseTask.GetTaskID | ( | ) |
Returns an ID of this task.
string SCR_BaseTask.GetTaskListIconName | ( | ) |
string SCR_BaseTask.GetTaskListIconNamePrefix | ( | ) |
string SCR_BaseTask.GetTaskListTaskText | ( | ) |
Implemented in SCR_ScenarioFrameworkTask, and SCR_RequestedTask.
string SCR_BaseTask.GetTaskListTaskTitle | ( | ) |
string SCR_BaseTask.GetTaskMapIconName | ( | ) |
SCR_TaskState SCR_BaseTask.GetTaskState | ( | ) |
Returns the state of this task.
string SCR_BaseTask.GetTitle | ( | ) |
Return the title of this task.
Implemented in SCR_CampaignTask, and SCR_EditorTask.
string SCR_BaseTask.GetTitleIconString | ( | ) |
string SCR_BaseTask.GetTitleText | ( | ) |
Implemented in SCR_CampaignTask, and SCR_RequestedTask.
SCR_ERadioMsg SCR_BaseTask.GetUnassignMessage | ( | ) |
void SCR_BaseTask.InitOnSpawn | ( | int | pid, |
IEntity | ent | ||
) |
bool SCR_BaseTask.IsAssignable | ( | ) |
bool SCR_BaseTask.IsAssigned | ( | ) |
Returns whether the task is assigned to someone or not.
|
protected |
Returns whether this task is assigned to the local player.
bool SCR_BaseTask.IsIndividual | ( | ) |
Returns whether this task is for an individual or not.
bool SCR_BaseTask.IsPriority | ( | ) |
bool SCR_BaseTask.NotifyAssignment | ( | ) |
bool SCR_BaseTask.NotifyUnassign | ( | ) |
|
protected |
An event called when a new assignee has been added to this task.
void SCR_BaseTask.OnAssigneeKilled | ( | ) |
Implemented in SCR_TransportTask.
|
protected |
An event called when an assignee has been removed from this task.
void SCR_BaseTask.OnDelete | ( | ) |
void SCR_BaseTask.OnHoverItem | ( | MapItem | item | ) |
void SCR_BaseTask.OnMapOpen | ( | MapConfiguration | config | ) |
|
protected |
An event called when the state of this task has been changed.
Implemented in SCR_ScenarioFrameworkTask, and SCR_EditorTask.
void SCR_BaseTask.RegisterTaskUpdate | ( | SCR_ETaskEventMask | TaskEventMask | ) |
Registers task event mask for OnTaskUpdate.
void SCR_BaseTask.Remove | ( | ) |
Marks the task as removed.
void SCR_BaseTask.RemoveAllAssignees | ( | ) |
Removes every assignee from this task.
void SCR_BaseTask.RemoveAssignee | ( | SCR_BaseTaskExecutor | assignee, |
SCR_EUnassignReason | reason | ||
) |
Removes an assignee, specified as a parameter, from this task.
void SCR_BaseTask.Serialize | ( | ScriptBitWriter | writer | ) |
Implemented in SCR_ScenarioFrameworkTask, SCR_CampaignTask, SCR_CampaignBaseTask, SCR_EvacuateTask, SCR_RequestedTask, and SCR_TransportTask.
void SCR_BaseTask.SetDescription | ( | string | description | ) |
void SCR_BaseTask.SetDescriptionWidgetText | ( | notnull TextWidget | textWidget, |
string | taskText | ||
) |
Implemented in SCR_CampaignDefendTask, SCR_CampaignTask, SCR_EditorTask, and SCR_RequestedTask.
void SCR_BaseTask.SetHUDIcon | ( | ) |
void SCR_BaseTask.SetIndividual | ( | bool | individual | ) |
Set this task as task for an individual.
void SCR_BaseTask.SetIsPriority | ( | bool | isPrio | ) |
Implemented in SCR_CampaignTask.
void SCR_BaseTask.SetLastAssigneeAddedTimestamp | ( | float | timestamp | ) |
void SCR_BaseTask.SetState | ( | SCR_TaskState | state | ) |
Changes the state of this task to the parameter.
Don't use this directly, use the following methods instead: SCR_BaseTaskManager.FinishTask/CancelTask/FailTask
void SCR_BaseTask.SetTargetFaction | ( | Faction | targetFaction | ) |
Sets the faction that should complete this task.
Implemented in SCR_TriggerTask.
void SCR_BaseTask.SetTaskIconWidget | ( | Widget | w | ) |
Implemented in SCR_TutorialCourseTask.
void SCR_BaseTask.SetTaskID | ( | int | taskID | ) |
Sets an ID of this task.
void SCR_BaseTask.SetTitle | ( | string | title | ) |
void SCR_BaseTask.SetTitleWidgetText | ( | notnull TextWidget | textWidget, |
string | taskText | ||
) |
Implemented in SCR_CampaignTask, SCR_EditorTask, and SCR_RequestedTask.
void SCR_BaseTask.SetWidgetIcon | ( | ImageWidget | image | ) |
|
protected |
Shows a message informing about this task being available.
Implemented in SCR_CampaignDefendTask, SCR_CampaignTask, and SCR_RequestedTask.
|
protected |
Implemented in SCR_EditorTask.
|
protected |
Implemented in SCR_CampaignDefendTask, and SCR_CampaignTask.
void SCR_BaseTask.ToggleHUDIcon | ( | bool | show, |
bool | fade = true |
||
) |
void SCR_BaseTask.UpdateHUDIcon | ( | ) |
|
protected |
Implemented in SCR_CampaignDefendTask, and SCR_CampaignBaseTask.
void SCR_BaseTask.UpdateMapTaskIcon | ( | ) |
Implemented in SCR_TaskDeliver, and SCR_TutorialCourseTask.
void SCR_BaseTask.UpdatePriorityMapTaskIcon | ( | ) |
Implemented in SCR_TutorialCourseTask.
void SCR_BaseTask.UpdateTaskListAssignee | ( | ) |
|
static |
|
static |
|
static |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |