Arma 3 Scripting

Function in Tasks

BIS_fnc_taskHandler

Also available as Markdown and JSON, or read the original wiki page.

Description

automatically sets tasks as current

Syntax

syntax inferred from the function header

[param0, param1] call BIS_fnc_taskHandler

Parameters:

Returns: none

Examples

Example 1

[
                    BIS_cooper,
                   [
                       ["objShaftoe",           1],
                       ["objGorka",            3],
                       ["objNikolayev",        5],
                       ["objLagushina",           5],
                       ["objSmugglers",           5],
                       ["objFindBase",            4],
                       ["objSentries",           3],
                       ["objLeader",            3],
                       ["objDestroyBase",        3],
                       ["objEscortLagushina",    1],
                       ["objRescueCrew",       2],
                       ["objSafehouse",        3],
                       ["objMaksim",            6],
                       ["objEvidence",            7]
                   ]
               ] call BIS_fnc_taskHandler

Example 2

TODO:            * generalize so it can be used in WF
                 add support for standard tasks
                 randomize the selection of tasks with the same priority

Function header

The comment at the top of the function's file in the game; this page's description, params, syntax, returns, examples come from it.

/*
version:         1.0
name:            Task handler
description:    automatically sets tasks as current
parameters:        _this select 0: a unit whose tasks will be handled (Array)
                _this select 1: links to tasks created via MP Framwork with
                                priorities (loewr number means higher
                                priority)
return value:    none
 example:         [
                    BIS_cooper,
                   [
                       ["objShaftoe",           1],
                       ["objGorka",            3],
                       ["objNikolayev",        5],
                       ["objLagushina",           5],
                       ["objSmugglers",           5],
                       ["objFindBase",            4],
                       ["objSentries",           3],
                       ["objLeader",            3],
                       ["objDestroyBase",        3],
                       ["objEscortLagushina",    1],
                       ["objRescueCrew",       2],
                       ["objSafehouse",        3],
                       ["objMaksim",            6],
                       ["objEvidence",            7]
                   ]
               ] call BIS_fnc_taskHandler

TODO:            * generalize so it can be used in WF
                 add support for standard tasks
                 randomize the selection of tasks with the same priority
*/