registeredTasks: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "$1$2</code>")
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(8 intermediate revisions by the same user not shown)
Line 25: Line 25:
|r1= [[Array]] of [[String]]s - names of tasks
|r1= [[Array]] of [[String]]s - names of tasks


|x1= <code>tasklist = registeredTasks teamMember _agent;</code>
|x1= <sqf>tasklist = registeredTasks teamMember _agent;</sqf>


|x2= <code>_rabbit = [[createAgent]] ["Rabbit_F", [[position]] [[player]],[], 0, "None"];
|x2= <sqf>
hint [[str]] [[registeredTasks]] [[teamMember]] _rabbit; // shows ["Animal Main Task"]</tt> in {{arma3}}</code>
_rabbit = createAgent ["Rabbit_F", position player,[], 0, "None"];
hint str registeredTasks teamMember _rabbit; // shows ["Animal Main Task"] in Arma 3
</sqf>


|seealso= [[registerTask]] [[unregisterTask]] [[sendTask]] [[createTask]] [[currentTasks]] [[taskCompleted]]
|seealso= [[registerTask]] [[unregisterTask]] [[sendTask]] [[createTask]] [[currentTasks]] [[taskCompleted]]
}}
}}

Latest revision as of 19:43, 3 September 2024

Hover & click on the images for description

Description

Description:
Returns array with all registered task types for the given agent. The values are the names set in CfgTasks classes name property. The same names are used for unregisterTask
Groups:
BriefingTeams

Syntax

Syntax:
registeredTasks teamMember
Parameters:
teamMember: Team Member - teamMember agent
Return Value:
Array of Strings - names of tasks

Examples

Example 1:
tasklist = registeredTasks teamMember _agent;
Example 2:
_rabbit = createAgent ["Rabbit_F", position player,[], 0, "None"]; hint str registeredTasks teamMember _rabbit; // shows ["Animal Main Task"] in Arma 3

Additional Information

See also:
registerTask unregisterTask sendTask createTask currentTasks taskCompleted

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note