{"name":"BIS_fnc_taskCreate","title":"BIS fnc taskCreate","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_taskCreate","revid":379281,"updated":"2026-10-30T23:45:37Z","groups":["Tasks"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","locality":{"argument":"global","effect":"global"},"description":"Create a task.","syntaxes":[{"syntax":"[owner, taskID, description, destination, state, priority, showNotification, type, visibleIn3D] call BIS_fnc_taskCreate","params":[{"name":"owner","type":"Boolean, Object, Group, Side or Array","description":"Task owner(s)\n\n- Boolean - true to set task of all playable units\n- Object - set task of a specific object\n- Group - set tasks of all objects in the group\n- Side - set tasks of all objects of the given side\n- Array - collection of above types","type_expr":"Boolean | Object | Group | Side | Array","text":"**owner**: Boolean, Object, Group, Side or Array - Task owner(s)\n\n- Boolean - true to set task of all playable units\n- Object - set task of a specific object\n- Group - set tasks of all objects in the group\n- Side - set tasks of all objects of the given side\n- Array - collection of above types"},{"name":"taskID","type":"String or Array","description":"String or Array\n\n- String - Task ID\n- Array - In the format of [task ID, parent task ID]","type_expr":"String | Array","text":"**taskID**: String or Array\n\n- String - Task ID\n- Array - In the format of [task ID, parent task ID]"},{"name":"description","type":"Array or String","description":"Array or String\n\n- Array - Task description in the format [\"description\", \"title\", \"marker\"] - \"marker\" is depreciated, functionally does nothing\n  - Description and Title can also be a format array [ \"Text\", var1, var2, ... ] where Text will be localized and then formatted per client, see Example 4\n- String - CfgTaskDescriptions class name, if empty string is used then CfgTaskDescriptions is searched for a class matching the tasks TaskID","type_expr":"Array | String","text":"**description**: Array or String\n\n- Array - Task description in the format [\"description\", \"title\", \"marker\"] - \"marker\" is depreciated, functionally does nothing\n  - Description and Title can also be a format array [ \"Text\", var1, var2, ... ] where Text will be localized and then formatted per client, see Example 4\n- String - CfgTaskDescriptions class name, if empty string is used then CfgTaskDescriptions is searched for a class matching the tasks TaskID"},{"name":"destination","optional":true,"description":"Task destination\n\n- Object - Use objNull to set no position\n- Array - can be one of:\n  - format Position\n  - [target, precision] (as used by setSimpleTaskTarget)\n    - target: Object\n    - precision: Boolean - false to use *owner*'s knowledge of *target*, true to force display even if *target* is unknown to *owner*","type_expr":"Object | Array","text":"**destination** (Optional): Task destination\n\n- Object - Use objNull to set no position\n- Array - can be one of:\n  - format Position\n  - [target, precision] (as used by setSimpleTaskTarget)\n    - target: Object\n    - precision: Boolean - false to use *owner*'s knowledge of *target*, true to force display even if *target* is unknown to *owner*"},{"name":"state","type":"String, Boolean or Number","optional":true,"default":"\"CREATED\"","description":"task state. Can be:\n\n- String - can be one of following:\n  - \"CREATED\"\n  - \"ASSIGNED\"\n  - \"AUTOASSIGNED\" (\"ASSIGNED\" when no task is assigned yet, otherwise \"CREATED\")\n  - \"SUCCEEDED\"\n  - \"FAILED\"\n  - \"CANCELED\"\n- Boolean - true to set the task as current\n- Number\n  - 0 or less for false\n  - > 0 as true","type_expr":"String | Boolean | Number","text":"**state**: String, Boolean or Number - (Optional, default \"CREATED\") task state. Can be:\n\n- String - can be one of following:\n  - \"CREATED\"\n  - \"ASSIGNED\"\n  - \"AUTOASSIGNED\" (\"ASSIGNED\" when no task is assigned yet, otherwise \"CREATED\")\n  - \"SUCCEEDED\"\n  - \"FAILED\"\n  - \"CANCELED\"\n- Boolean - true to set the task as current\n- Number\n  - 0 or less for false\n  - > 0 as true"},{"name":"priority","type":"Number","optional":true,"description":"priority. When the current task is completed, the system selects the one with the largest priority >= 0. To avoid auto assignment of that task, give it a priority of -1.","type_expr":"Number","text":"**priority**: Number - (Optional) priority. When the current task is completed, the system selects the one with the largest priority >= 0. To avoid auto assignment of that task, give it a priority of -1."},{"name":"showNotification","type":"Boolean","optional":true,"default":"true","description":"true to show notification, false to disable it","type_expr":"Boolean","text":"**showNotification**: Boolean - (Optional, default true) true to show notification, false to disable it"},{"name":"type","type":"String","optional":true,"default":"\"\"","description":"vanilla or custom task type; if not defined, empty (no) type is used","type_expr":"String","text":"**type**: String - (Optional, default \"\") vanilla or custom task type; if not defined, empty (no) type is used"},{"name":"visibleIn3D","type":"Boolean","optional":true,"default":"false","description":"true to make task always visible in 3D","type_expr":"Boolean","text":"**visibleIn3D**: Boolean - (Optional, default false) true to make task always visible in 3D"}],"returns":{"type":"Boolean","type_expr":"Boolean"}}],"examples":[{"code":["[civilian, \"task1\", [\"Do this and you get a cookie\", \"Earn Cookie\", \"cookiemarker\"], [0,0,0], \"ASSIGNED\", 2, true] call BIS_fnc_taskCreate;"]},{"code":["[west, \"parentTask\", [\"This is the parent task.\", \"Parent task\", \"cookiemarker2\"], objNull, 1, 3, true] call BIS_fnc_taskCreate;\n[west, [\"subTask\", \"parentTask\"], [\"This is the subTask.\", \"subTask\", \"cookiemarker2\"], objNull, 1, 3, true] call BIS_fnc_taskCreate;"]},{"text":"in Description.ext\n\n```cpp\nclass CfgTaskTypes\n{\n    class my_CfgTaskType\n    {\n        displayname = \"Tank\";\n        icon = \"Tank_MCO.paa\";\n        icon3D = \"Tank_MCO.paa\";\n    };\n};\n```\n\nSQF:\n\n```sqf\n[east, [\"taskType_\"], [\"Setting taskType\", \"The simple way\", \"marker2\"], objNull, 1, 3, true, \"my_CfgTaskType\"] call BIS_fnc_taskCreate; // task with a custom icon\n```","code":["[east, [\"taskType_\"], [\"Setting taskType\", \"The simple way\", \"marker2\"], objNull, 1, 3, true, \"my_CfgTaskType\"] call BIS_fnc_taskCreate; // task with a custom icon"]},{"text":"in Stringtable.xml\n\n```xml\n<Key ID=\"STR_CITY_TASK\">\n    <English>Clear %1 of enemies</English>\n    <!-- more languages -->\n</Key>\n```\n\nSQF:\n\n```sqf\n[\n    _side,\n    _taskID,\n    [\n        // format array, string to be localised, parameters for format %1, %2 ...\n        [ \"STR_CITY_TASK\", _cityName ],\n        [ \"STR_CITY_TASK\", _cityName ],\n        \"\"\n    ]\n] call BIS_fnc_taskCreate;\n```","code":["[\n\t_side,\n\t_taskID,\n\t[\n\t\t// format array, string to be localised, parameters for format %1, %2 ...\n\t\t[ \"STR_CITY_TASK\", _cityName ],\n\t\t[ \"STR_CITY_TASK\", _cityName ],\n\t\t\"\"\n\t]\n] call BIS_fnc_taskCreate;"]}],"see_also":["Arma 3: Task Framework"],"notes":[{"user":"Lou Montana","date":"2018-02-02T13:15:00Z","text":"You can define a CfgTaskDescriptions part in description.ext, such as:\n\n```cpp\nclass CfgTaskDescriptions\n{\n    class myTask\n    {\n        title = \"$STR_MyTaskTitle\";\n        description = \"$STR_MyTaskDescription\";\n    };\n};\n```\n\nThis should allow tasks to be localised for every player in MP **if created locally**.\nYou can use \"myTask\" as *description* (3rd) parameter.\n\n> [!IMPORTANT]\n> For a proper localisation everywhere, see Hypoxic125's note below."},{"user":"Hypoxic125","date":"2022-11-13T04:13:19Z","text":"Example of Correct Localization Setup Using CfgTaskDescriptions\n\n```cpp\nclass CfgTaskDescriptions\n{\n    class hyp_infiltrate\n    {\n        title = \"STR_HYP_TASKS_INFILTRATE_TITLE\";\n        description = \"STR_HYP_TASKS_INFILTRATE_DESCRIPTION\";\n        // requires stringtable key - NOT localized string\n        // note the lack of \"$\" before the stringtable key - if \"$\" is included, languages will be incorrect\n    };\n};\n```\n\n```sqf\n// Server Execution\n[east, \"infiltrate\", \"hyp_infiltrate\", objNull, \"ASSIGNED\", -1, true, \"MOVE\", false] call BIS_fnc_taskCreate;\n```"}]}