currentTasks: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|Game name=" to "|Game name= |gr1= Briefing |GROUP1= ")
m (Text replacement - "\|x([0-9])= <sqf>([^\/: ]+)([^;])<\/sqf>" to "|x$1= <sqf>$2$3;</sqf>")
 
(33 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


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


|gr1= Briefing |GROUP1=
|game2= arma2oa
|version2= 1.50


|game3= tkoh
|version3= 1.00


|game4= arma3
|version4= 0.50


|1.00|Game version=
|gr1= Briefing
____________________________________________________________________________________________


| Returns array with all [[taskCompleted | uncompleted]] tasks for the given agent. [[getVariable]] could be used on [[Task]] to get the following special local variables from the task:
|gr2= Teams


* <tt>"_this"</tt> [[Team Member]] - the [[teamMember]] [[agent]] the task is assigned to
|descr= Returns array with all [[taskCompleted | uncompleted]] tasks for the given agent.
* <tt>"_taskType"</tt> [[String]] - the name of the task (see [[registeredTasks]])
[[getVariable]] could be used on [[Task]] to get the following special local variables from the task:
* <tt>"_thisCreated"</tt> [[Number]] - 1 or 0
* {{hl|"_this"}} [[Team Member]] - the [[teamMember]] [[agent]] the task is assigned to
* <tt>"_thisRunning"</tt> [[Number]] - 1 or 0
* {{hl|"_taskType"}} [[String]] - the name of the task (see [[registeredTasks]])
* <tt>"_totalCreated"</tt> [[Number]] - total number of tasks
* {{hl|"_thisCreated"}} [[Number]] - 1 or 0
* <tt>"_totalRunning"</tt> [[Number]] - total number of running tasks
* {{hl|"_thisRunning"}} [[Number]] - 1 or 0
* <tt>"_task"</tt>[[Task]] - often null|DESCRIPTION=
* {{hl|"_totalCreated"}} [[Number]] - total number of tasks
____________________________________________________________________________________________
* {{hl|"_totalRunning"}} [[Number]] - total number of running tasks
* {{hl|"_task"}}[[Task]] - often null


| '''currentTasks''' teamMember |SYNTAX=
|s1= [[currentTasks]] teamMember


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


| [[Array]] - array of [[Task]]s |RETURNVALUE=
|r1= [[Array]] - array of [[Task]]s


|x1= <sqf>currentTasks teamMember _agent;</sqf>


|x1= <code>[[currentTasks]] [[teamMember]] _agent</code>|EXAMPLE1=
|seealso= [[taskCompleted]] [[registerTask]] [[registeredTasks]] [[unregisterTask]] [[sendTask]] [[createTask]]
 
____________________________________________________________________________________________
 
| [[taskCompleted]], [[registerTask]], [[registeredTasks]], [[unregisterTask]], [[sendTask]], [[createTask]] |SEEALSO=
 
|  |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:Scripting Commands Arma 2|{{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 22:42, 28 June 2022

Hover & click on the images for description

Description

Description:
Returns array with all uncompleted tasks for the given agent. getVariable could be used on Task to get the following special local variables from the task:
Groups:
BriefingTeams

Syntax

Syntax:
currentTasks teamMember
Parameters:
teamMember: Team Member - teamMember agent
Return Value:
Array - array of Tasks

Examples

Example 1:
currentTasks teamMember _agent;

Additional Information

See also:
taskCompleted registerTask registeredTasks unregisterTask sendTask createTask

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