registeredTasks: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(46 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.00


|1.00|Game version=
|game2= arma2oa
____________________________________________________________________________________________
|version2= 1.50


| Returns array with all registered task types for the given agent. The values are the names set in <tt>CfgTasks</tt> classes <tt>name</tt> property. The same names are used for [[unregisterTask]] |DESCRIPTION=
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| '''registeredTasks''' teamMember |SYNTAX=
|game4= arma3
|version4= 0.50


|p1= teamMember: [[Team Member]] - [[teamMember]] [[agent]] |PARAMETER1=  
|gr1= Briefing


|p2= |PARAMETER2=  
|gr2= Teams


|p3= |PARAMETER3=
|descr= Returns array with all registered task types for the given agent. The values are the names set in {{hl|CfgTasks}} classes {{hl|name}} property. The same names are used for [[unregisterTask]]


|[[Array]] of [[String]]s - names of tasks |RETURNVALUE=
|s1= [[registeredTasks]] teamMember


|p1= teamMember: [[Team Member]] - [[teamMember]] [[agent]]


|x1= <code>tasklist = [[registeredTasks]] [[teamMember]] _agent;</code>|EXAMPLE1=
|r1= [[Array]] of [[String]]s - names of tasks


|x2= <code>_rabbit = [[createAgent]] ["Rabbit_F", [[position]] [[player]],[], 0, "None"];
|x1= <sqf>tasklist = registeredTasks teamMember _agent;</sqf>
[[hint]] [[str]] [[registeredTasks]] [[teamMember]] _rabbit;</code>
Hint shows <tt>["Animal Main Task"]</tt> in Arma 3.|EXAMPLE2=


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


| [[registerTask]], [[unregisterTask]], [[sendTask]], [[createTask]], [[currentTasks]] |SEEALSO=
|seealso= [[registerTask]] [[unregisterTask]] [[sendTask]] [[createTask]] [[currentTasks]] [[taskCompleted]]
 
|  |MPBEHAVIOUR=
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Briefing|{{uc:{{PAGENAME}}}}]]

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