Task Tutorial – Arma 2
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Text replacement - "{{arma2}}" to "{{GameCategory|arma2|link= y}}") |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
== Basics == | == Basics == | ||
Tasks were introduced in | Tasks were introduced in {{GameCategory|arma2|link= y}} and improved in [[Arma 3: Task Framework|Arma 3]]. They replaced the [[Briefing.html|old objective system]] used in [[:Category:ArmA: Armed Assault|{{arma1}}]] and [[:Category:Operation Flashpoint|{{ofp}}]]. | ||
Line 23: | Line 23: | ||
| "Assigned" | | "Assigned" | ||
| ''grey'' - The task is the current one | | ''grey'' - The task is the current one | ||
| rowspan="6" | [[ | | rowspan="6" | [[File:Taskstates.png|Task States]] | ||
|- | |- | ||
| "Canceled" | | "Canceled" |
Latest revision as of 13:01, 19 March 2024
Basics
Tasks were introduced in Arma 2 and improved in Arma 3. They replaced the old objective system used in Armed Assault and Operation Flashpoint.
As opposed to the previous system:
- Tasks can be created at any time from anywhere (trigger, script, etc). They do not need to be created in an external file.
- Tasks are created "on the fly" as they are required and not "hidden/shown" anymore.
States
Task states are in String format.
Good To Know
Tasks are unit-specific. They are created to a unit and not to a client (computer). For example if you create a task for the player unit then teamSwitch to another unit, this new unit won't have any task. If you switch back to the original unit, it will have this created task.
The value returned by createSimpleTask is a unique handle to the unit's task, returns a handle (variable which refers to the created task). Each task has a unique handle. Even using same line of code on different client will result in a different handle for the "same" task.
How to use a task
Create a task
Set a task's description
Assign a task
Set a task's destination
Set a task's state
Delete a task
How to read a task's information
Get a task's state
Get a task's description
Get a task's destination