{"updated":"2026-11-04T00:04:10Z","source":"https://community.bistudio.com/wiki/Category:Arma_3:_Scripting_Commands","count":2657,"items":[{"name":"! a","operator":"!","title":"! a","type":"command","url":"https://community.bistudio.com/wiki/!_a","revid":369088,"updated":"2024-09-02T20:37:47Z","groups":["Variables","Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the negation of a Boolean expression. This means `true` becomes `false` and vice versa.","syntaxes":[{"syntax":"! a","params":[{"name":"a","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"a"}}],"examples":[{"text":"The code\n\n```sqf\nprivate _isAlive = alive player;\nif (!_isAlive) then\n{\n    hint \"The player is dead!\";\n};\n```\n\nis the same as\n\n```sqf\nprivate _isAlive = alive player;\nif (not _isAlive) then\n{\n    hint \"The player is dead!\";\n};\n```","code":["private _isAlive = alive player;\nif (!_isAlive) then\n{\n\thint \"The player is dead!\";\n};","private _isAlive = alive player;\nif (not _isAlive) then\n{\n\thint \"The player is dead!\";\n};"]}],"aliases":["not"],"see_also":["not","Operators"]},{"name":"+","operator":"+","title":"+","type":"command","url":"https://community.bistudio.com/wiki/%2B","revid":377977,"updated":"2026-01-19T18:47:06Z","groups":["Math","Arrays","HashMap","Strings"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Add two Numbers, concatenate two Arrays or two Strings, or create a copy of an Array or HashMap.\n\n> [!WARNING]\n> Array copy methods `ARRAY + []` and `+ ARRAY` have different behaviours:\n>\n> - `ARRAY + []` creates copy of the 1st dimension, but preserves references in other dimensions ([shallow copy](https://en.wikipedia.org/wiki/Object_copying#Shallow_copy)).\n> - `+ ARRAY` clones every element, so if the array is multi-dimensional, the created copy contains no references ([deep copy](https://en.wikipedia.org/wiki/Object_copying#Deep_copy)).\n>\n> See Example 6.","syntaxes":[{"syntax":"numberA + numberB","params":[{"name":"numberA","type":"Number","type_expr":"Number"},{"name":"numberB","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"the sum of numberA and numberB","text":"Number - the sum of *numberA* and *numberB*"},"form":"binary","left":{"text":"numberA"},"right":{"text":"numberB"}},{"syntax":"+ number","params":[{"name":"number","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"the value of the parameter number","text":"Number - the value of the parameter *number*"},"form":"unary","right":{"text":"number"}},{"syntax":"arrayA + arrayB","params":[{"name":"arrayA","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"arrayB","type":"Array of Anything","type_expr":"Array<Anything>"}],"returns":{"type":"Array of Anything","type_expr":"Array<Anything>","description":"a new array filled with arrayA and arrayB elements, in that order","text":"Array of Anything - a new array filled with *arrayA* and *arrayB* elements, in that order"},"form":"binary","left":{"text":"arrayA"},"right":{"text":"arrayB"}},{"syntax":"stringA + stringB","params":[{"name":"stringA","type":"String","type_expr":"String"},{"name":"stringB","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"a string concatenating stringA and stringB","text":"String - a string concatenating *stringA* and *stringB*"},"form":"binary","left":{"text":"stringA"},"right":{"text":"stringB"}},{"syntax":"+ array","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"}],"returns":{"type":"Array of Anything","type_expr":"Array<Anything>","description":"a new instance of the provided array filled with same elements (deep copy)","text":"Array of Anything - a new instance of the provided array filled with same elements ([deep copy](https://en.wikipedia.org/wiki/Object_copying#Deep_copy))"},"form":"unary","right":{"text":"array"}},{"syntax":"+ hashMap","since":"arma3 2.04","params":[{"name":"hashMap","type":"HashMap","type_expr":"HashMap"}],"returns":{"type":"HashMap","type_expr":"HashMap","description":"a new instance of the provided HashMap filled with the same key-value pairs (deep copy)","text":"HashMap - a new instance of the provided HashMap filled with the same key-value pairs ([deep copy](https://en.wikipedia.org/wiki/Object_copying#Deep_copy))"},"form":"unary","right":{"text":"hashMap"}}],"examples":[{"text":"```sqf\n 5 +  3    // returns  8\n-5 + -3    // returns -8\n```","code":[" 5 +  3\t// returns  8\n-5 + -3\t// returns -8"]},{"text":"```sqf\n+  2    // returns  2\n+ -7    // returns -7\n```","code":["+  2\t// returns  2\n+ -7\t// returns -7"]},{"code":["_arrayA = [1,2,3];\n_arrayB = [3,4,5];\n_arrayAB = _arrayA + _arrayB; // _arrayAB = [1,2,3,3,4,5]\n// _arrayA and _arrayB remain unchanged"]},{"code":["_result = \"Hello\" + \" \" + \"there\"; // \"Hello there\""]},{"code":["_arrayA = [1,2,3];\n_arrayB = + _arrayA;\n_arrayB set [0, 99]; // _arrayA = [1,2,3], _arrayB = [99,2,3]"]},{"text":"Shallow copy with `ARRAY + []`:\n\n```sqf\nprivate _subArray = [1, 2, 3];\nprivate _array1 = [_subArray, 1, 2, 3];\nprivate _array2 = _array1 + [];\n_array2 select 0 set [0, \"oops\"];\nhint str _subArray; // [\"oops\", 2, 3]\n```\n\nDeep copy with `+ ARRAY`:\n\n```sqf\nprivate _subArray = [1, 2, 3];\nprivate _array1 = [_subArray, 1, 2, 3];\nprivate _array2 = + _array1;\n_array2 select 0 set [0, \"oops\"];\nhint str _subArray; // [1, 2, 3]\n```","code":["private _subArray = [1, 2, 3];\nprivate _array1 = [_subArray, 1, 2, 3];\nprivate _array2 = _array1 + [];\n_array2 select 0 set [0, \"oops\"];\nhint str _subArray; // [\"oops\", 2, 3]","private _subArray = [1, 2, 3];\nprivate _array1 = [_subArray, 1, 2, 3];\nprivate _array2 = + _array1;\n_array2 select 0 set [0, \"oops\"];\nhint str _subArray; // [1, 2, 3]"]}],"see_also":["Operators","pushBack","append","merge"]},{"name":"-","operator":"-","title":"-","type":"command","url":"https://community.bistudio.com/wiki/-","revid":379201,"updated":"2026-10-30T20:29:40Z","groups":["Math","Arrays"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Subtracts numbers or arrays from each another, negates a number. For arrays also see deleteAt and deleteRange.\n\n> [!NOTE]\n> **Arma 3:** In Arma 3 it is possible to subtract nested arrays.","syntaxes":[{"syntax":"numberA - numberB","params":[{"name":"numberA","type":"Number","type_expr":"Number"},{"name":"numberB","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"numberA"},"right":{"text":"numberB"}},{"syntax":"- numberA","params":[{"name":"numberA","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"the negative of numberA","text":"Number - the negative of *numberA*"},"form":"unary","right":{"text":"numberA"}},{"syntax":"arrayA - arrayB","params":[{"name":"arrayA","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"arrayB","type":"Array of Anything","type_expr":"Array<Anything>"}],"returns":{"type":"Array of Anything","type_expr":"Array<Anything>"},"form":"binary","left":{"text":"arrayA"},"right":{"text":"arrayB"}}],"examples":[{"code":["_result = 10 - 7; // result is 3"]},{"code":["_numA = 4;\n_numB = -_numA; // result is -4\n_numB = -_numB; // result is  4"]},{"code":["_result = [1, 2, 2, player, \"String\"] - [2, player, player, \"String\"]; // _result is [1]"]},{"code":["_result = [0, [0], [[0]]] - [0]; // [[0], [[0]]]"]},{"text":"```sqf\n_result = [0, [0], [[0]]] - [[0]];        // [0, [[0]]]    - Since Arma 3\n_result = [0, [0], [[0]]] - [[[0]]];    // [0, [0]]        - Since Arma 3\n```","code":["_result = [0, [0], [[0]]] - [[0]];\t\t// [0, [[0]]]\t- Since Arma 3\n_result = [0, [0], [[0]]] - [[[0]]];\t// [0, [0]]\t\t- Since Arma 3"]}],"see_also":["Array","Operators","deleteAt","deleteRange"]},{"name":"a != b","operator":"!=","title":"a != b","type":"command","url":"https://community.bistudio.com/wiki/a_!%3D_b","revid":376993,"updated":"2026-01-01T08:00:36Z","groups":["Variables","Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns whether one value is **not** equal to another. String comparison is case-**in**sensitive (e.g `\"STRINGtext\" != \"stringTEXT\" // returns false - strings are equivalent`).\n\n> [!IMPORTANT]\n> *a* and *b* types **must** match: comparing e.g String with Number is invalid.","syntaxes":[{"syntax":"a != b","params":[{"name":"a","description":"| Introduced in | Possible Type |\n|---|---|\n| Operation Flashpoint v1.00 | Number |\n| Operation Flashpoint v1.00 | Side |\n| Operation Flashpoint v1.00 | String |\n| Operation Flashpoint v1.00 | Object |\n| Operation Flashpoint v1.00 | Group |\n| Armed Assault v1.00 | Structured Text |\n| Armed Assault v1.00 | Config |\n| Armed Assault v1.00 | Display |\n| Armed Assault v1.00 | Control |\n| Armed Assault v1.08 | Location |\n| Arma 3 v2.00 | Diary Record |\n| Arma 3 v2.00 | Namespace |\n| Arma 3 v2.00 | Boolean |","type_expr":"Number | Side | String | Object | Group | Structured Text | Config | Display | Control | Location | Diary Record | Namespace | Boolean","text":"a:\n\n| Introduced in | Possible Type |\n|---|---|\n| Operation Flashpoint v1.00 | Number |\n| Operation Flashpoint v1.00 | Side |\n| Operation Flashpoint v1.00 | String |\n| Operation Flashpoint v1.00 | Object |\n| Operation Flashpoint v1.00 | Group |\n| Armed Assault v1.00 | Structured Text |\n| Armed Assault v1.00 | Config |\n| Armed Assault v1.00 | Display |\n| Armed Assault v1.00 | Control |\n| Armed Assault v1.08 | Location |\n| Arma 3 v2.00 | Diary Record |\n| Arma 3 v2.00 | Namespace |\n| Arma 3 v2.00 | Boolean |"},{"name":"b","type":"identical to a's type","text":"b: identical to *a*'s type"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if a is different from b, false otherwise","text":"Boolean - true if *a* is different from *b*, false otherwise"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"text":"```sqf\nif (_counter != 4) then\n{\n    hint \"The counter is not equal to the number 4\";\n};\n```","code":["if (_counter != 4) then\n{\n\thint \"The counter is not equal to the number 4\";\n};"]},{"text":"```sqf\nif (vehicle player != player) then\n{\n    hint \"you are in a vehicle\";\n}\nelse\n{\n    hint \"you are on foot\";\n};\n```","code":["if (vehicle player != player) then\n{\n\thint \"you are in a vehicle\";\n}\nelse\n{\n\thint \"you are on foot\";\n};"]},{"text":"```sqf\nif (fuel truck1 != 1) then\n{\n    hint \"Truck1 has less than a full tank of fuel.\";\n};\n```","code":["if (fuel truck1 != 1) then\n{\n\thint \"Truck1 has less than a full tank of fuel.\";\n};"]},{"code":["if (alive _unit1 != alive _unit2) then { hint \"One of the units is dead while another is alive\" };"]}],"see_also":["==","Operators"]},{"name":"a % b","operator":"%","title":"a % b","type":"command","url":"https://community.bistudio.com/wiki/a_%25_b","revid":318435,"updated":"2022-05-13T07:44:52Z","groups":["Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Remainder of *a* divided by *b*.","syntaxes":[{"syntax":"a % b","params":[{"name":"a","type":"Number","type_expr":"Number"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"code":["4.5 % 3 // result is 1.5"]}],"aliases":["mod"],"see_also":["mod","Operators"],"notes":[{"user":"Hoz","date":"2006-04-16T01:34:00Z","text":"- Remainder is calculated in real domain.\n- a % b is identical to mod\n\nYou can use % to round a decimal number down to the nearest whole number. For example: If you wanted to use the command random to generate a whole number between 0 and 5, you could put this in a script:\n\n```sqf\n_rand = random 6;\n_num = _rand - (_rand % 1);\n```\n\nIn A1, the new commands round, floor or ceil would be the easier way to round."},{"user":"SilentSpike","date":"2015-07-21T14:55:00Z","text":"Be careful when dealing with negative numbers. The way a modulo operation treats negatives differs between languages. In SQF truncated division is used, hence:\n\n```sqf\n-12 % -10 = -2\n-12 %  10 = -2\n 12 % -10 =  2\n 12 %  10 =  2\n```"}]},{"name":"a && b","operator":"&&","title":"a && b","type":"command","url":"https://community.bistudio.com/wiki/a_%26%26_b","revid":369259,"updated":"2024-09-03T18:42:01Z","groups":["Variables","Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns true only if both conditions are true.\nIn case of the alternative syntax, [lazy evaluation](https://en.wikipedia.org/wiki/Lazy_evaluation#Control_structures) is used - if left operand is false, evaluation of the right side is ignored.","syntaxes":[{"syntax":"booleanA && booleanB","params":[{"name":"booleanA","type":"Boolean","description":"test condition or variable","type_expr":"Boolean"},{"name":"booleanB","type":"Boolean","description":"test condition or variable","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"booleanA"},"right":{"text":"booleanB"}},{"syntax":"boolean && code","since":"arma2oa 1.62","params":[{"name":"boolean","type":"Boolean","description":"test condition or variable","type_expr":"Boolean"},{"name":"code","type":"Code","description":"code that once executed returns a Boolean. The code is not evaluated if **boolean** is false.","type_expr":"Code"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"boolean"},"right":{"text":"code"}}],"examples":[{"text":"```sqf\nprivate _allEnemiesKilled = true;\nif (alive player && _allEnemiesKilled) then\n{\n    hint \"you win !\";\n};\n```","code":["private _allEnemiesKilled = true;\nif (alive player && _allEnemiesKilled) then\n{\n\thint \"you win !\";\n};"]},{"text":"```sqf\nif ((count _array > 0) && { (_array select 0) == player }) then // an error would be thrown without lazy evaluation\n{\n    hint \"It works!\";\n};\n```","code":["if ((count _array > 0) && { (_array select 0) == player }) then // an error would be thrown without lazy evaluation\n{\n\thint \"It works!\";\n};"]},{"text":"```sqf\nif ((alive player) && { player setDamage 0.5; true }) then // valid AS LONG AS the code block returns a Boolean\n{\n    hint \"It works!\";\n};\n```","code":["if ((alive player) && { player setDamage 0.5; true }) then // valid AS LONG AS the code block returns a Boolean\n{\n\thint \"It works!\";\n};"]}],"aliases":["a and b"],"see_also":["and","or","Operators"]},{"name":"a * b","operator":"*","title":"a * b","type":"command","url":"https://community.bistudio.com/wiki/a_*_b","revid":322990,"updated":"2022-06-28T21:42:57Z","groups":["Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the value of *a* multiplied by *b*.","syntaxes":[{"syntax":"a * b","params":[{"name":"a","type":"Number","type_expr":"Number"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"code":["_percentage = 0.5 * 100;"]}],"see_also":["Operators"]},{"name":"a / b","operator":"/","title":"a / b","type":"command","url":"https://community.bistudio.com/wiki/a_/_b","revid":379202,"updated":"2026-10-30T20:31:37Z","groups":["Math","Config"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the quotient of two numbers. If the divisor is 0 a *Division by zero* error is shown but the script does not stop and the result of such division is assumed to be 0.\n\nAlternative syntax returns the Config entry with the given name (alias for >>, slightly slower but with higher precedence).","syntaxes":[{"syntax":"a / b","params":[{"name":"a","type":"Number","description":"dividend","type_expr":"Number"},{"name":"b","type":"Number","description":"divisor","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"quotient"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}},{"syntax":"config / name","since":"arma1 1.00","params":[{"name":"config","type":"Config","type_expr":"Config"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Config","type_expr":"Config","description":"config entry"},"form":"binary","left":{"text":"config"},"right":{"text":"name"}}],"examples":[{"code":["_result = 15 / 3; // result is 5"]},{"code":["_cfgVehicles = configFile / \"CfgVehicles\"; // identical to configFile >> \"CfgVehicles\" (but the order of precedence)"]}],"see_also":["Operators","configFile","missionConfigFile","campaignConfigFile","configName","config greater greater name","count"],"notes":[{"user":"ffur2007slx2_5","date":"2014-04-01T00:02:00Z","text":"(Arma 3 1.14) config / name can be composed to config >> name String or Array format via BIS_fnc_configPath. E.g.\n\n```sqf\n[configFile / \"ATMineCrater\" / \"MissileCircleDust\", \"\"] call BIS_fnc_configPath; // return: \"configfile >> \"ATMineCrater\" >> \"MissileCircleDust\"\"\n[configFile / \"ATMineCrater\" / \"MissileCircleDust\", []] call BIS_fnc_configPath; // return: [\"configfile\",\"ATMineCrater\",\"MissileCircleDust\"]\n```"}]},{"name":"a : b","operator":":","title":"a : b","type":"command","url":"https://community.bistudio.com/wiki/a_:_b","revid":329506,"updated":"2022-07-29T13:38:09Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"See switch","syntaxes":[{"syntax":"a : b","params":[{"name":"a","type":"Switch Type","type_expr":"Switch Type"},{"name":"b","type":"Code","type_expr":"Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"text":"```sqs\n? (_var == _test) : hint \"_var is equal to _test!\";\n```","code":["? (_var == _test) : hint \"_var is equal to _test!\";"]},{"text":"```sqf\nswitch (_condition) do\n{\n    case 1: { hint \"1\" };\n    case 2: { hint \"2\" };\n    default { hint \"default\" }; // note: NO colon for the default case\n};\n```","code":["switch (_condition) do\n{\n\tcase 1: { hint \"1\" };\n\tcase 2: { hint \"2\" };\n\tdefault { hint \"default\" }; // note: NO colon for the default case\n};"]}],"see_also":["Control Structures","switch"]},{"name":"a = b","operator":"=","title":"a = b","type":"command","url":"https://community.bistudio.com/wiki/a_%3D_b","revid":348661,"updated":"2023-11-08T13:49:04Z","groups":["Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Assigns the result of expression on the right to the variable on the left. Technically this is not a command and it is not listed in supportInfo; this is more of a compiler instruction.\n\n> [!IMPORTANT]\n> The following structure is invalid: `a = b = c = 4;`.","syntaxes":[{"syntax":"variable = value","params":[{"name":"variable","type":"Anything","description":"see Identifier","type_expr":"Anything"},{"name":"value","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing","description":"> [!IMPORTANT] > The returned value is not equivalent to nil. See Notes below for additional information.","text":"Nothing\n\n> [!IMPORTANT]\n> The returned value is not equivalent to nil. See Notes below for additional information."},"form":"binary","left":{"text":"variable"},"right":{"text":"value"}}],"examples":[{"code":["_value = 5;"]},{"code":["_mygroup = group player;"]},{"code":["_greeting = \"Hello!\";"]},{"code":["private _enemyTank = myTank1;"]}],"see_also":["Operators"],"notes":[{"user":"Kronzky","date":"2006-12-15T05:27:00Z","text":"A conditional assignment can be done via the following syntax:\n\n```sqf\n_msg = if (alive player) then {\"you're alive\"} else {\"you're dead\"}\n```"},{"user":"Alef","date":"2009-06-22T16:27:00Z","text":"It's possible to assign to Numbers. Numbers values are not changed. Useful instead of assigning to *nul* or *nil* when a result is of no use.\n\n```sqf\n[player] execVM \"myScript.sqf\"\n```"},{"user":"Dedmen","date":"2016-11-09T00:29:00Z","text":"This operator actually does not return a Nil. It really returns pure Nothing. Not Nil Nothing.\nThis can cause problems. For example:\n\n```sqf\n_var1 = call {\n    _var2 = \"\";\n};\n```\n\nThe return value of the \"call\" is the return value of the \"=\" operator.\nIf it were a nil then of cause \"_var = nil;\" would work just fine.\nBut in reality this causes a \"Generic Error in expression\" because you can't assign pure Nothing to anything"}]},{"name":"a == b","operator":"==","title":"a == b","type":"command","url":"https://community.bistudio.com/wiki/a_%3D%3D_b","revid":379203,"updated":"2026-10-30T20:32:32Z","groups":["Math","Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Check if *a* is equal to *b*. String comparison is case-**in**sensitive - use isEqualTo if case sensitivity is needed.\n\n> [!IMPORTANT]\n> *a* and *b* types **must** match: comparing e.g String with Number is invalid.","syntaxes":[{"syntax":"a == b","params":[{"name":"a","description":"| Introduced in | Operation Flashpoint v1.00 |  |  |  |  | Armed Assault v1.00 |  |  |  | Armed Assault v1.08 | Arma 3 v2.00 |  |  |\n|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| Possible Type | Number | Side | String | Object | Group | Structured Text | Config | Display | Control | Location | Diary Record | Namespace | Boolean |","type_expr":"Number | Side | String | Object | Group | Structured Text | Config | Display | Control | Location | Diary Record | Namespace | Boolean","text":"a:\n\n| Introduced in | Operation Flashpoint v1.00 |  |  |  |  | Armed Assault v1.00 |  |  |  | Armed Assault v1.08 | Arma 3 v2.00 |  |  |\n|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| Possible Type | Number | Side | String | Object | Group | Structured Text | Config | Display | Control | Location | Diary Record | Namespace | Boolean |"},{"name":"b","type":"identical to a's type","text":"b: identical to *a*'s type"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"text":"```sqf\nif (player == leader group player) then\n{\n    hint \"You are the leader of your group.\";\n}\nelse\n{\n    hint \"Someone else is the boss\";\n};\n```","code":["if (player == leader group player) then\n{\n\thint \"You are the leader of your group.\";\n}\nelse\n{\n\thint \"Someone else is the boss\";\n};"]},{"code":["\"MyRabbit\" == \"MYRABBIT\"; // returns true"]},{"code":["if (alive _unit1 == alive _unit2) then { hint \"Both units are either dead or both alive\" };"]}],"see_also":["a != b","Operators","isEqualTo"],"notes":[{"user":"ffur2007slx2_5","date":"2014-04-15T10:13:00Z","text":"For script comparison we need to detect whether scripts are running in advance, then compose both into string:\n\n```sqf\nif (scriptDone _var0) then [{false},{(str _var0) == (str _var1)}];\n```\n\nIt is recommended to use isEqualTo for all types comparison, which is more functional and as fast as operator.\nFor multiple comparisons:\n\n```sqf\nfnc_areEqual = {\n    private [\"_b\", \"_var1\", \"_var2\"];\n    _b = true;\n    for [{ _i = 1 }, { _i < (count _this) && _b }, { _i=_i + 1 }] do {\n        _var1 = _this select (_i-1);\n        _var2 = _this select _i;\n        if (!(_var1 isEqualTo _var2)) then { _b = false; };\n    };\n    _b\n};\n[\"A\",\"a\",\"a\"] call fnc_areEqual; // false\n```\n\nAnd we can use such workaround instead of using BIS_fnc_arrayCompare or BIS_fnc_areEqual"}]},{"name":"a ^ b","operator":"^","title":"a ^ b","type":"command","url":"https://community.bistudio.com/wiki/a_%5E_b","revid":321222,"updated":"2022-05-13T15:37:49Z","groups":["Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"*a* raised to the power of *b*","syntaxes":[{"syntax":"a ^ b","params":[{"name":"a","type":"Number","type_expr":"Number"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"code":["5 ^ 2 // 5², result is 25"]}],"see_also":["Math Commands","Operators"]},{"name":"a greater b","operator":">","title":"a greater b","type":"command","url":"https://community.bistudio.com/wiki/a_greater_b","revid":318547,"updated":"2022-05-13T09:21:04Z","groups":["Math","Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns true if **a** is greater than **b**, else returns false.","syntaxes":[{"syntax":"a > b","params":[{"name":"a","type":"Number","type_expr":"Number"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"code":["if (fuel truck1 > 0) then { hint \"Truck1 has some fuel left.\"; };"]}],"see_also":["Operators"]},{"name":"a greater= b","operator":">=","title":"a greater= b","type":"command","url":"https://community.bistudio.com/wiki/a_greater%3D_b","revid":318474,"updated":"2022-05-13T08:25:43Z","groups":["Math","Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns if *a* is greater than or equal to *b*.","syntaxes":[{"syntax":"a >= b","params":[{"name":"a","type":"Number","type_expr":"Number"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"code":["if (fuel truck1 >= 0.5) then { hint \"Truck1 has at least half a tank of fuel left.\" };"]}],"see_also":["Operators","a less= b","a greater b","a == b","a != b"]},{"name":"a hash b","operator":"#","title":"a hash b","type":"command","url":"https://community.bistudio.com/wiki/a_hash_b","revid":377195,"updated":"2026-01-01T10:56:03Z","groups":["Variables"],"status":"ok","games":{"arma3":"1.82"},"since":"arma3 1.82","arma3_since":"1.82","description":"Selects an element from an Array, same as select command for arrays, but has higher precedence.\n\n> [!NOTE]\n> **#** has higher precedence than all binary operators, but it has lower precedence than unary operators (see Example 3).","syntaxes":[{"syntax":"array # index","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"array"},"right":{"text":"index"}}],"examples":[{"text":"```sqf\n[1, 2, 3, 4] # 2;            // result is 3\n```","code":["[1, 2, 3, 4] # 2;\t\t\t// result is 3"]},{"text":"```sqf\ngetPosASL player # 2;        // result is Z component of player's position\n```","code":["getPosASL player # 2;\t\t// result is Z component of player's position"]},{"code":["// 'getPosASL' is unary; '#' and '+' are binary; precedence is: 'getPosASL' > '#' > '+'\ngetPosASL player # 2 + 1; // equivalent to (getPosASL player # 2) + 1, not (getPosASL player)#(2+1)"]}],"see_also":["select","selectRandom","selectRandomWeighted","set","resize","reverse","in","find","toArray","toString","forEach","count","deleteAt","deleteRange","append","sort","param","params","splitString","joinString","pushBack","pushBackUnique","apply"],"notes":[{"user":"KC Grimes","date":"2018-04-25T00:51:00Z","text":"Although not alternative syntax, the below notations work as expected:\n\n```sqf\n[\"A\", \"B\", \"C\"] # 1;        // B\n[\"A\", \"B\", \"C\"] #1;            // B\n[\"A\", \"B\", \"C\"]#1;            // B\n[\"A\", \"B\", [\"C\", \"D\"]]#2#0;    // C\n```"},{"user":"7erra","date":"2019-05-03T15:41:00Z","text":"Here is an example of what higher precedence means:\n\n```sqf\n[1, 2, 3, 4] select 2 / 2;        // divides 2 with 2, therefore selects the second element at index 1, result = 2\n[1, 2, 3, 4] select (2 / 2);    // same result with brackets\n[1, 2, 3, 4] # 2 / 2;            // selects third element, then divides by 2 = 1.5\n([1, 2, 3, 4] # 2) / 2;            // same result with brackets\n```\n\nThis operator can not be used in conjunction with the #define preprocessor.\n\n```sqf\n#define SEL_ERR [0,1,2]#0;            // error\n#define SEL_NOERR [0,1,2] select 0;    // works\n```"},{"user":"Fett_li","date":"2021-04-02T16:18:00Z","text":"Beware new-lines when using this operator. I suspect the preprocessor to fail. The following code will not compile without throwing an error:\n\n```sqf\n[0]\n# 0;\n```"}]},{"name":"a less b","operator":"<","title":"a less b","type":"command","url":"https://community.bistudio.com/wiki/a_less_b","revid":321224,"updated":"2022-05-13T15:38:27Z","groups":["Math","Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns if *a* is lesser than *b*.","syntaxes":[{"syntax":"a < b","params":[{"name":"a","type":"Number","type_expr":"Number"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"code":["_test = 1 < 2; // true"]},{"code":["_test = 2 < 1; // false"]}],"see_also":["Operators"]},{"name":"a less= b","operator":"<=","title":"a less= b","type":"command","url":"https://community.bistudio.com/wiki/a_less%3D_b","revid":321223,"updated":"2022-05-13T15:38:11Z","groups":["Math","Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns true if **a** is less than or equal to **b**, else returns false.","syntaxes":[{"syntax":"a <= b","params":[{"name":"a","type":"Number","type_expr":"Number"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"code":["if (fuel truck1 <= 0) then { hint \"Truck1 has no fuel left.\" };"]}],"see_also":["Operators"]},{"name":"a or b","operator":"||","title":"a or b","type":"command","url":"https://community.bistudio.com/wiki/a_or_b","revid":349256,"updated":"2023-11-08T14:51:04Z","groups":["Math","Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns true if one or both conditions are true. In case of the alternative syntax, [lazy evaluation](https://en.wikipedia.org/wiki/Lazy_evaluation#Control_structures) is used. That means that if left operand is true, evaluation of the right side is skipped completely.","syntaxes":[{"syntax":"a || b","params":[{"name":"a","type":"Boolean","description":"test condition or variable","type_expr":"Boolean"},{"name":"b","type":"Boolean","description":"test condition or variable","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}},{"syntax":"a || b","since":"arma2oa 1.62","params":[{"name":"a","type":"Boolean","description":"test condition or variable","type_expr":"Boolean"},{"name":"b","type":"Code","description":"code that returns Boolean. It is not evaluated if *a* returns true","type_expr":"Code"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"code":["if (OBJ1 || _enemycount == 0) then { hint \"you win !\" };"]},{"text":"```sqf\nif (count _array == 0 || { (_array select 0) != player }) then\n{\n    hint \"It works! Without lazy evaluation it would throw an error if array was empty.\";\n};\n```","code":["if (count _array == 0 || { (_array select 0) != player }) then\n{\n\thint \"It works! Without lazy evaluation it would throw an error if array was empty.\";\n};"]}],"aliases":["or"],"see_also":["or","and","Operators"]},{"name":"abs","title":"abs","type":"command","url":"https://community.bistudio.com/wiki/abs","revid":311169,"updated":"2022-05-12T09:59:18Z","groups":["Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns absolute (positive) value of a real number.","syntaxes":[{"syntax":"abs x","params":[{"name":"x","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"x"}}],"examples":[{"code":["_n = abs -3; // Returns 3"]}],"see_also":["+","-"]},{"name":"accTime","title":"accTime","type":"command","url":"https://community.bistudio.com/wiki/accTime","revid":341223,"updated":"2023-05-13T23:19:52Z","groups":["Time"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the current simulation acceleration factor.","syntaxes":[{"syntax":"accTime","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_acc = accTime;"]}],"see_also":["setAccTime","setTimeMultiplier","timeMultiplier","useAudioTimeForMoves"],"notes":[{"user":"Hoz","date":"2006-08-02T03:10:00Z","text":"Use setAccTime to change the time acceleration factor. Not to be confused with skipTime."}]},{"name":"acos","title":"acos","type":"command","url":"https://community.bistudio.com/wiki/acos","revid":378425,"updated":"2026-04-06T21:06:04Z","groups":["Math - Geometry"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"ArcCosine of a number, result in Degrees","syntaxes":[{"syntax":"acos x","params":[{"name":"x","type":"Number in range -1..+1","description":"any other value returns NaN","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"x"}}],"examples":[{"code":["_degrees = acos 0.5; // Returns 60"]}],"see_also":["atan","asin","sin","cos","tan"]},{"name":"action","title":"action","type":"command","url":"https://community.bistudio.com/wiki/action","revid":378568,"updated":"2026-05-08T21:16:17Z","groups":["Interaction"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Make a unit perform an action. See Category:Actions for action names and syntaxes.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 2.18 it is possible to use actionNow to perform some actions immediately without any animation.\n> However, note that some actions do require animations (for example, opening inventory while on foot), otherwise they will get cancelled.\n\n> [!NOTE]\n> - in singleplayer, when user Alt-Tabs the simulation is paused and so the action will also halt until user returns to the game. For example, `player action [\"GetInDriver\", car];` executed while user is Alt-Tabbed will result in the user seeing the action happening when he returns to the game screen. This does not happen in Multiplayer.\n> - the alternative syntax creates a temporary Logic entity in place of *unit*.","syntaxes":[{"syntax":"unit action actionArray","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"actionArray","type":"Array","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"actionArray"}},{"syntax":"action actionArray","since":"arma3 2.10","params":[{"name":"actionArray","type":"Array","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"actionArray"}}],"examples":[{"code":["player action [\"SitDown\", player];"]},{"code":["_soldier action [\"Eject\", vehicle _soldier];"]},{"code":["player action [\"UseWeapon\", player, player, 7]; // plays pick up animation before throwing grenade\naction [\"UseWeapon\", player, player, 7]; // normal grenade throw"]}],"multiplayer":"> [!IMPORTANT]\n> The argument's locality is **usually** local, but some actions can take a global argument (e.g \"Eject\", \"GetOut\", \"GetInXXXX\", \"MoveToXXXX\").\n> See Category:Actions for more details.","see_also":["actionNow","actionIDs","actionParams","addAction","setUserActionText","inGameUISetEventHandler","showHUD","inputAction","removeAction","removeAllActions","weaponsInfo","shownAction"],"notes":[{"user":"Tom_48_97","date":"2009-08-28T09:26:00Z","text":"In Arma 2, you can place a unique unit (for example a boat, far of all combats) and use it for all command lines with action."},{"user":"DreadedEntity","date":"2015-03-27T17:57:00Z","text":"This command has no effect when a dead unit is used as input."},{"user":"DrSova","date":"2017-06-27T02:15:00Z","text":"```sqf\nplayer action [\"SWITCHWEAPON\", player, player, -1]\n```\n\nSwitching weapon to the back."},{"user":"Yuval","date":"2017-07-20T12:22:00Z","text":"Some of the actions (such as \"DropWeapon\") do not always execute, and there should be a set of conditions for them to run.\nThe unit must be able to perform the dropping animation in order for the action to properly execute.\nSo, if for example we spawn a unit at [0,0,0] and make it perform a \"DropWeapon\" action - it won't work if [0,0,0] is water (which it is, if the current map is an island) because the unit will be swimming.\n\nAlso, you cannot stack up actions right after the other. If you run a \"DropWeapon\" action when the current action animation is still going - it will not perform.\nThere are a few more conditions for an action to perform, but relying on a hundred percent success of the action is not a good practice."}]},{"name":"actionIDs","title":"actionIDs","type":"command","url":"https://community.bistudio.com/wiki/actionIDs","revid":379233,"updated":"2026-10-30T23:10:24Z","groups":["Interaction"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","locality":{"argument":"global","effect":"local"},"description":"","syntaxes":[{"syntax":"actionIDs entity","params":[{"name":"entity","type":"Object","description":"entity with added user actions","type_expr":"Object"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"IDs of all user actions added to given entity with addAction command"},"form":"unary","right":{"text":"entity"}}],"examples":[{"code":["_actions = actionIDs player;"]}],"see_also":["actionParams","addAction","setUserActionText","inGameUISetEventHandler","showHUD","inputAction","removeAction","removeAllActions","action"],"notes":[{"user":"KC Grimes","date":"2018-04-22T14:19:00Z","text":"The argument for this command can be global (ie, not local to the executing machine), however the returned array will only contain action IDs for locally executed addAction."}],"categories_extra":["Stubs"]},{"name":"actionKeys","title":"actionKeys","type":"command","url":"https://community.bistudio.com/wiki/actionKeys","revid":330779,"updated":"2022-11-01T16:06:07Z","groups":["Interaction"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Returns Array containing dikCodes of keys, buttons and combos assigned to the given user action. Action names could be found in config class ControllerSchemes or user action names or user profile, for example:\n\n```cpp\nkeyWatch[] = { 24 };\n```\n\nTo retrieve the value, use the property name without 'key':\n\n```sqf\nactionKeys \"Watch\"; // 24\n```\n\nIn addition, some of the actions are also listed in here: inputAction/actions","syntaxes":[{"syntax":"actionKeys userAction","params":[{"name":"userAction","type":"String","type_expr":"String"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"unary","right":{"text":"userAction"}},{"syntax":"actionKeys [userAction]","since":"arma3 2.08","params":[{"name":"userAction","type":"String","type_expr":"String"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"[userAction]"}}],"examples":[{"code":["_arrayOfNumbers = actionKeys \"ReloadMagazine\";"]},{"text":"From Arma 3 v2.08:\n\n```sqf\n_arrayOfStrings = actionKeys [\"ReloadMagazine\"];\n```","code":["_arrayOfStrings = actionKeys [\"ReloadMagazine\"];"]}],"see_also":["actionKeysNames","actionKeysNamesArray","actionKeysImages","actionName","inputAction","addUserActionEventHandler"],"notes":[{"user":"AgentRev","date":"2016-05-11T02:36:00Z","text":"If an action key is configured with a modifier (e.g. \"Right Ctrl + M\" for \"MiniMapToggle\"), the DIK code returned by this command has a weird value, equivalent to the following:\n\nLeft Ctrl + Key = 486539264 + DIK\nLeft Shift + Key = 704643072 + DIK\nLeft Alt + Key = 939524096 + DIK\nRight Ctrl + Key = -1660944384 + DIK\nRight Shift + Key = 905969664 + DIK\nRight Alt + Key = -1207959552 + DIK</sqf>\n\nThis increases the difficulty of accurately comparing key codes to actionKeys in UI event handlers. Those strange numbers are probably due to bit flags being added to the DIK value by the game engine for easier storage in the ArmaProfile.\nIn case of mouse buttons, actionKeys will also return values that are different from those in \"MouseButton\" UI events:\n\nLMB: MouseButton 0 = actionKeys 65536\nRMB: MouseButton 1 = actionKeys 65665 (65536 + 1 + 128)\nMMB: MouseButton 2 = actionKeys 65538 (65536 + 2)\n4MB: MouseButton 3 = actionKeys 65539 (65536 + 3)\n5MB: MouseButton 4 = actionKeys 65540 (65536 + 4)\n\nThe values above are valid for a right-handed mouse configuration, and may or may not differ for a left-handed config.\n\n*Note edited by R3vo (talk) 13:04, 19 March 2021 (CET)*"},{"user":"Commy2","date":"2016-08-06T12:24:00Z","text":"**The values described by AgentRev cannot be compared reliably.** All numbers in SQF are floats and those are only precise up to 7 digits.\n\n```sqf\n486539264 + 19 == 486539264 + 20 // returns true\n```\n\nThe DIK codes for `LCtrl + R` and `LCtrl + T` are indistinguishable.\n\n*Note edited by R3vo (talk) 13:04, 19 March 2021 (CET)*"}]},{"name":"actionKeysEx","title":"actionKeysEx","type":"command","url":"https://community.bistudio.com/wiki/actionKeysEx","revid":377679,"updated":"2026-01-02T09:02:44Z","groups":["Interaction"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Gives a broken down version of actionKeys return. Returns an Array containing the breakdowns of the dikCodes of keys, buttons and combos assigned to the given user action.\nAction names can be found in config class ControllerSchemes or user action names or user profile (see Example 1).\nIn addition, some of the actions are also listed here: inputAction/actions\n\nThe Key Device can be one of several types:\n\n- `\"KEYBOARD\"`\n- `\"MOUSE_BUTTON\"`\n- `\"MOUSE_AXIS\"`\n- `\"JOYSTICK_BUTTON\"`\n- `\"JOYSTICK_AXIS\"`\n- `\"JOYSTICK_POV\"`\n- `\"XINPUT\"` - (Xbox) Controller Input\n- `\"TRACKER\"` - Motion Tracking (TrackIR, Tobii etc)","syntaxes":[{"syntax":"actionKeysEx userAction","params":[{"name":"userAction","type":"String","description":"user action name (see inputAction/actions)","type_expr":"String"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"in format [mainKeyArray, comboKeyArray, isDoubleTap]:\n- mainKeyArray: Array with [dikCode, device, deviceId] - dikCode: Number - device: String - deviceId: Number - only given if the device is a Joystick type - comboKeyArray: Array identical to mainKeyArray - filled only if the action key is a key combination - dikCode: Number - device: String - deviceId: Number - identical to mainKeyArray's deviceId as it is impossible to use two different Joystick devices in a key combination - isDoubleTap: Boolean - is the action key a double-tap. In case of a combination key this applies to the main key.","text":"Array of Arrays in format [mainKeyArray, comboKeyArray, isDoubleTap]:\n\n- mainKeyArray: Array with [dikCode, device, deviceId]\n  - dikCode: Number\n  - device: String\n  - deviceId: Number - only given if the device is a Joystick type\n- comboKeyArray: Array identical to *mainKeyArray* - filled only if the action key is a key combination\n  - dikCode: Number\n  - device: String\n  - deviceId: Number - identical to *mainKeyArray*'s *deviceId* as it is impossible to use two different Joystick devices in a key combination\n- isDoubleTap: Boolean - is the action key a double-tap. In case of a combination key this applies to the main key."},"form":"unary","right":{"text":"userAction"}}],"examples":[{"text":"To retrieve the following key's data, use the property name without 'key':\n\n```cpp\nkeyWatch[] = { 24 };\n```\n\n```sqf\nactionKeysEx \"Watch\"; // [[[24, \"KEYBOARD\"], [], false]]\n```","code":["actionKeysEx \"Watch\"; // [[[24, \"KEYBOARD\"], [], false]]"]},{"code":["private _result = actionKeysEx \"OpticsMode\"; // [[[129,\"MOUSE_BUTTON\"],[29,\"KEYBOARD\"],false],[[181,\"KEYBOARD\"],[],false]]"]}],"see_also":["actionKeys","actionKeysNames","actionKeysNamesArray"]},{"name":"actionKeysImages","title":"actionKeysImages","type":"command","url":"https://community.bistudio.com/wiki/actionKeysImages","revid":369623,"updated":"2024-09-27T22:13:10Z","groups":["Interaction"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Returns a list of button images or names assigned to the given user action.\nA maximum of *maxKeys* keys is listed.\nYou can find the action names in the ControllerSchemes config class or user action names.","syntaxes":[{"syntax":"actionKeysImages userAction","params":[{"name":"userAction","type":"String","type_expr":"String"}],"returns":{"type":"Structured Text","type_expr":"Structured Text"},"form":"unary","right":{"text":"userAction"}},{"syntax":"actionKeysImages [userAction, maxKeys]","params":[{"name":"userAction","type":"String","type_expr":"String"},{"name":"maxKeys","type":"Number","type_expr":"Number"}],"returns":{"type":"Structured Text","type_expr":"Structured Text"},"form":"unary","right":{"text":"[userAction, maxKeys]"}}],"examples":[{"code":["_text = actionKeysImages \"ReloadMagazine\";"]},{"code":["_reload = actionKeysImages [\"ReloadMagazine\", 1] // returns \"R\" (including the quotation marks!)"]}],"see_also":["actionKeys","actionKeysNames","actionKeysNamesArray","actionName","inputAction"]},{"name":"actionKeysNames","title":"actionKeysNames","type":"command","url":"https://community.bistudio.com/wiki/actionKeysNames","revid":364173,"updated":"2024-05-05T10:46:45Z","groups":["Interaction"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Returns a list of button names assigned to the given user action.\nAction names can be found in config class `ControllerSchemes` or user action names.","syntaxes":[{"syntax":"actionKeysNames userAction","params":[{"name":"userAction","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"userAction"}},{"syntax":"actionKeysNames [userAction, maxKeys, inputDevicePriority]","params":[{"name":"userAction","type":"String","type_expr":"String"},{"name":"maxKeys","type":"Number","description":"maximum number of keys to return","type_expr":"Number"},{"name":"inputDevicePriority","type":"String","description":"result sorted by inputDevicePriority with values:\n\n- `\"Mouse\"`\n- `\"Keyboard\"`\n- `\"Stick\"`\n- `\"Gamepad\"`\n- `\"Tracker\"`\n- `\"Combo\"` (mouse and keyboard combinations)\n- `\"Controler\"` [sic] (any controller other than mouse or keyboard)\n\nOther values are considered as:\n\n- `\"Unsorted\"`","type_expr":"String","since":"arma3 1.36"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[userAction, maxKeys, inputDevicePriority]"}}],"examples":[{"code":["_list = actionKeysNames \"ReloadMagazine\"; // \"\"\"R\"\" or \"\"XBox X\"\"\""]}],"see_also":["actionKeys","actionKeysImages","actionKeysNamesArray","actionName","inputAction"],"notes":[{"user":"WGL.Q","date":"2010-01-20T20:14:00Z","text":"The return type is a stacked string. A string inside a string. To compare use first single and inside double quotes:\n\n```sqf\nif (actionKeysNames \"User1\" == '\"W\"') then { /* ... */ };\n```"}]},{"name":"actionKeysNamesArray","title":"actionKeysNamesArray","type":"command","url":"https://community.bistudio.com/wiki/actionKeysNamesArray","revid":376357,"updated":"2025-10-07T21:38:14Z","groups":["Interaction"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Returns a list of button names assigned to the given user action. You can find the action names in config class ControllerSchemes or user action names.","syntaxes":[{"syntax":"actionKeysNamesArray userAction","params":[{"name":"userAction","type":"String","description":"name of the action","type_expr":"String"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"userAction"}},{"syntax":"actionKeysNamesArray [userAction, maxKeys, inputDevicePriority]","params":[{"name":"userAction","type":"String","description":"name of the action","type_expr":"String"},{"name":"maxKeys","type":"Number","description":"maximum number of keys to return","type_expr":"Number"},{"name":"inputDevicePriority","type":"String","optional":true,"description":"result sorted by `inputDevicePriority` with values:\n\n- `\"Mouse\"`\n- `\"Keyboard\"`\n- `\"Stick\"`\n- `\"Gamepad\"`\n- `\"Tracker\"`\n- `\"Combo\"` (mouse and keyboard combinations)\n- `\"Controler\"` [sic] (any controller other than mouse or keyboard)\n\nOther values are considered as:\n\n- `\"Unsorted\"`","type_expr":"String","since":"arma3 1.36","text":"inputDevicePriority: String - (Optional) result sorted by `inputDevicePriority` with values:\n\n- `\"Mouse\"`\n- `\"Keyboard\"`\n- `\"Stick\"`\n- `\"Gamepad\"`\n- `\"Tracker\"`\n- `\"Combo\"` (mouse and keyboard combinations)\n- `\"Controler\"` [sic] (any controller other than mouse or keyboard)\n\nOther values are considered as:\n\n- `\"Unsorted\"`"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"[userAction, maxKeys, inputDevicePriority]"}}],"examples":[{"code":["_actionList = actionKeysNamesArray \"ReloadMagazine\";"]},{"code":["_actionList = actionKeysNamesArray [\"ReloadMagazine\", 1];"]}],"see_also":["actionKeys","actionKeysImages","actionKeysNames","actionName","inputAction"]},{"name":"actionName","title":"actionName","type":"command","url":"https://community.bistudio.com/wiki/actionName","revid":321154,"updated":"2022-05-13T15:05:12Z","groups":["Interaction"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns localized name of action.","syntaxes":[{"syntax":"actionName action","params":[{"name":"action","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"action"}}],"examples":[{"code":["actionName \"ReloadMagazine\"; // returns \"Reload\""]}],"see_also":["inputAction/actions","playAction","playActionNow"]},{"name":"actionNow","title":"actionNow","type":"command","url":"https://community.bistudio.com/wiki/actionNow","revid":378711,"updated":"2026-06-01T07:27:35Z","groups":["Interaction"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"effect":"global"},"description":"Make a unit perform an action immediately (without any animation/pre-processing). See the action command for more information.","syntaxes":[{"syntax":"unit actionNow actionArray","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"actionArray","type":"Array","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"actionArray"}}],"examples":[{"code":["player actionNow [\"TakeBag\", _backpack]; // pick up a backpack without any animation"]},{"code":["player actionNow [\"Gear\", vehicle player]; // open inventory while in vehicle"]}],"see_also":["action","actionIDs","actionParams","addAction","setUserActionText","inGameUISetEventHandler","showHUD","inputAction","removeAction","removeAllActions","weaponsInfo"]},{"name":"actionParams","title":"actionParams","type":"command","url":"https://community.bistudio.com/wiki/actionParams","revid":377675,"updated":"2026-01-02T09:02:37Z","groups":["Interaction"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","description":"Returns Array with params for given user action id (similar to addAction param array).","syntaxes":[{"syntax":"entity actionParams id","params":[{"name":"entity","type":"Object","description":"entity with added user actions","type_expr":"Object"},{"name":"id","type":"Number","description":"id of existing user action (returned by addAction or actionIDs)","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"with [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, textWindowBackground, textWindowForeground, selection, memoryPoint]\n- title: String - action title text - script: String - script file or script expression assigned to the action - arguments: Anything or nil - arguments passed to the action - priority: Number - action priority on the action menu - showWindow: Boolean - whether the action is shown in the center of the screen too - hideOnUse: Boolean - whether the action menu should close after selecting the action - shortcut: String - action bindings to some existing engine action if any - condition: String - expression returning true or nil for action to appear on the action menu - radius: Number - max distance to entity at which action becomes available. -1 means it is engine default (~15m) - unconscious: Boolean - whether the action is available to unconscious person - textWindowBackground: String - same as textWindowBackground in setUserActionText - textWindowForeground: String - same as textWindowForeground in setUserActionText - selection: String - named selection in Geometry LOD to which the action is attached - memoryPoint: String - memory point on the object to which the action is attached If entity is objNull, the following array is returned: ```sqf [\"\", \"\", nil, 1.5, true, true, \"\", \"\", 50, false, \"\", \"\", \"\", \"\"] ``` (returned Nothing until Arma 3 v1.94)","text":"Array with [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, textWindowBackground, textWindowForeground, selection, memoryPoint]\n\n- title: String - action title text\n- script: String - script file or script expression assigned to the action\n- arguments: Anything or nil - arguments passed to the action\n- priority: Number - action priority on the action menu\n- showWindow: Boolean - whether the action is shown in the center of the screen too\n- hideOnUse: Boolean - whether the action menu should close after selecting the action\n- shortcut: String - action bindings to some existing engine action if any\n- condition: String - expression returning true or nil for action to appear on the action menu\n- radius: Number - max distance to entity at which action becomes available. -1 means it is engine default (~15m)\n- unconscious: Boolean - whether the action is available to unconscious person\n- textWindowBackground: String - same as textWindowBackground in setUserActionText\n- textWindowForeground: String - same as textWindowForeground in setUserActionText\n- selection: String - named selection in Geometry LOD to which the action is attached\n- memoryPoint: String - memory point on the object to which the action is attached\n\nIf *entity* is objNull, the following array is returned:\n\n```sqf\n[\"\", \"\", nil, 1.5, true, true, \"\", \"\", 50, false, \"\", \"\", \"\", \"\"]\n```\n\n(returned Nothing until Arma 3 v1.94)"},"form":"binary","left":{"text":"entity"},"right":{"text":"id"}}],"examples":[{"code":["_params = player actionParams 0;"]}],"see_also":["actionIDs","addAction","setUserActionText","inGameUISetEventHandler","showHUD","inputAction","removeAction","removeAllActions","action"]},{"name":"activateAddons","title":"activateAddons","type":"command","url":"https://community.bistudio.com/wiki/activateAddons","revid":370473,"updated":"2024-12-16T18:10:00Z","groups":["Mods and Addons"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Activates the listed addons.","syntaxes":[{"syntax":"activateAddons addonsList","params":[{"name":"addonsList","type":"Array of Strings","type_expr":"Array<String>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"addonsList"}}],"examples":[{"code":["activateAddons [\"BISOFP\"];"]}],"see_also":["unitAddons","activatedAddons"],"notes":[{"user":"WGL.Q","date":"2009-01-21T12:37:00Z","text":"Be aware that addon's string is the `CfgPatches` class of the desired addon to preload."},{"user":"UNN","date":"2009-05-10T11:17:00Z","text":"This command will activate addons that are referenced via scripts but not included in a missions required addons section. If executed from a configs init event with the call command, it will effectively override a missions required addons, preventing them from being activated (Appears to only happen in multi player).\nTo activate the passed addons along with those defined in the mission.sqm, execute the command from a configs init event using spawn or execVM."},{"user":"Sa-Matra","date":"2022-07-03T08:43:05Z","text":"Here is a handy function to call before you do createVehicle or other create* command during missing init scripts, which should activate missing addons without having to worry about re-adding previously added addons.\n\n```sqf\nfnc_prepareClassAddons = {\n    private _class = toLower _this;\n\n    // To avoid double checks\n    if(isNil\"var_addonCheckedClasses\") then {var_addonCheckedClasses = createHashMap;};\n    if(_class in var_addonCheckedClasses) exitWith {};\n\n    // Finding missing addons\n    private _needed = unitAddons _class apply {toLower _x};\n    private _active = activatedAddons;\n    private _missing = _needed - (_needed arrayIntersect _active);\n    if(count _missing > 0) then {\n        // Adding everything again, engine will figure it out itself\n        _active append _missing;\n        activateAddons _active;\n    };\n\n    var_addonCheckedClasses set [_class, _needed];\n};\n```\n\nUsage would be `\"Land_BurntGarbage_01_F\" call fnc_prepareClassAddons`."}]},{"name":"activatedAddons","title":"activatedAddons","type":"command","url":"https://community.bistudio.com/wiki/activatedAddons","revid":379403,"updated":"2026-10-31T00:01:52Z","groups":["Mods and Addons"],"status":"ok","games":{"arma3":"1.14"},"since":"arma3 1.14","arma3_since":"1.14","description":"Returns a list of all activated addons.","syntaxes":[{"syntax":"activatedAddons","params":[],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"nullary"}],"examples":[{"code":["_addons = activatedAddons;"]}],"see_also":["activateAddons"],"notes":[{"user":"Tankbuster","date":"2014-03-28T20:21:00Z","text":"This command can return a large array, often too large to be diag_log'd or hinted. At the time of writing, my game returned an array with 389 elements. The code below will ignore all the BI addons (they start with a3_) and writes the rest (ie, all your custom addons) to the RPT.\n\n```sqf\n{if (! ([\"a3_\", _x] call BIS_fnc_inString)) then {diag_log _x;}  } forEach activatedAddons;\n```"}]},{"name":"activateKey","title":"activateKey","type":"command","url":"https://community.bistudio.com/wiki/activateKey","revid":341303,"updated":"2023-05-20T20:40:03Z","groups":["Mission Information"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Activates the given keyname for the current user profile. The keys are used to unlock missions or campaigns.\nSee `keys`, `keysLimit` and `doneKeys` in the Description.ext#Mission Keys chapter.","syntaxes":[{"syntax":"activateKey keyname","params":[{"name":"keyname","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"keyname"}}],"examples":[{"code":["activateKey \"Mission04Key\";"]}],"see_also":["deActivateKey","isKeyActive"]},{"name":"activeTitleEffectParams","title":"activeTitleEffectParams","type":"command","url":"https://community.bistudio.com/wiki/activeTitleEffectParams","revid":377608,"updated":"2026-01-02T08:51:23Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns type, effect, speed and map visibility of the given active title effect (see allActiveTitleEffects)","syntaxes":[{"syntax":"activeTitleEffectParams layer","params":[{"name":"layer","type":"Number","description":"layer number or -1 (see allActiveTitleEffects)","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"with [type, effect, speed, showInMap] or [], where:\n- type: String - type of effect, can be `\"OBJ\"`, `\"RSC\"` or `\"TXT\"` - effect: String - Title Effect Type (`\"PLAIN\"`, `\"BLACK OUT\"` etc) - speed: Number - effect speed multiplier - showInMap: Boolean - true if effect is available over map","text":"Array with [type, effect, speed, showInMap] or [], where:\n\n- type: String - type of effect, can be `\"OBJ\"`, `\"RSC\"` or `\"TXT\"`\n- effect: String - Title Effect Type (`\"PLAIN\"`, `\"BLACK OUT\"` etc)\n- speed: Number - effect speed multiplier\n- showInMap: Boolean - true if effect is available over map"},"form":"unary","right":{"text":"layer"}}],"examples":[{"code":["21 cutText [\"Hello World!\", \"PLAIN\", 2];\nhint str activeTitleEffectParams 21; // [\"TXT\", \"PLAIN\", 2, true]"]},{"code":["titleText [\"Hello World!\", \"BLACK\"];\nhint str activeTitleEffectParams -1; // [\"TXT\", \"BLACK\", 1, true]"]}],"see_also":["allCutLayers","cutText","cutRsc","cutObj","cutFadeOut","titleText","titleRsc","titleObj","titleFadeOut","allActiveTitleEffects","Title Effect Type"]},{"name":"add3DENConnection","title":"add3DENConnection","type":"command","url":"https://community.bistudio.com/wiki/add3DENConnection","revid":379522,"updated":"2026-10-31T00:50:03Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Connect entities together. Be aware to select the correct type of Eden Entities for the connection type.","syntaxes":[{"syntax":"add3DENConnection [type, from, to]","params":[{"name":"type","type":"String","description":"connection class from `\"Cfg3DEN\" >> \"Connections\"`:\n\n- `Group`\n- `RandomStart`\n- `Sync`\n- `TriggerOwner`\n- `WaypointActivation`","type_expr":"String"},{"name":"from","type":"Array of Eden Entities","description":"entities which are being connected","type_expr":"Array<Eden Entity>"},{"name":"to","type":"Eden Entity","description":"entity to which entities will be connected to","type_expr":"Eden Entity"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[type, from, to]"}}],"examples":[{"code":["add3DENConnection [\"RandomStart\", get3DENSelected \"Object\", \"marker_0\"];// Set random start on marker \"marker_0\" for all selected objects."]},{"code":["// Group all selected units to the first selected group\nprivate _group = get3DENSelected \"Group\" param [0, grpNull];\nprivate _units = get3DENSelected \"Objects\";\n\nadd3DENConnection [\"Group\", _units, _group];"]}],"see_also":["remove3DENConnection","get3DENConnections"]},{"name":"add3DENEventHandler","title":"add3DENEventHandler","type":"command","url":"https://community.bistudio.com/wiki/add3DENEventHandler","revid":364159,"updated":"2024-05-05T10:46:40Z","groups":["Eden Editor","Event Handlers"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Adds an Eden Editor Event Handler.","syntaxes":[{"syntax":"add3DENEventHandler [type, code]","params":[{"name":"type","type":"String","description":"see Eden Editor Event Handler","type_expr":"String"},{"name":"code","type":"Code","description":"Code\n\n- Event Handler parameters are accessible via `_this`\n- The Event Handler type is available as `_thisEvent`\n- The Event Handler index is available as `_thisEventHandler`","type_expr":"Code","text":"code: Code\n\n- Event Handler parameters are accessible via `_this`\n- The Event Handler type is available as `_thisEvent`\n- The Event Handler index is available as `_thisEventHandler`"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"[type, code]"}}],"examples":[{"code":["private _ehID = add3DENEventHandler [\"onUndo\", { systemChat \"Zip...\" }];"]}],"see_also":["remove3DENEventHandler","removeAll3DENEventHandlers"]},{"name":"add3DENLayer","title":"add3DENLayer","type":"command","url":"https://community.bistudio.com/wiki/add3DENLayer","revid":369092,"updated":"2024-09-02T20:37:48Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Adds an editing layer in Eden Editor.","syntaxes":[{"syntax":"parentLayerID add3DENLayer name","params":[{"name":"parentLayerID","type":"Number","description":"ID of the parent layer. No layer will be created when the ID does not point to a layer. Use `-1` to create the layer to root.","type_expr":"Number","text":"parentLayerID : Number - ID of the parent layer. No layer will be created when the ID does not point to a layer. Use `-1` to create the layer to root."},{"name":"name","type":"String","description":"layer display name","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"layer ID"},"form":"binary","left":{"text":"parentLayerID"},"right":{"text":"name"}}],"examples":[{"code":["_myLayer = -1 add3DENLayer \"Enemy Base\";\n_myLayerFort = _myLayer add3DENLayer \"Fortifications\";\n_myLayerPatrol = _myLayer add3DENLayer \"Patrols\";"]}],"see_also":["remove3DENLayer","set3DENLayer","get3DENLayerEntities"],"notes":[{"user":"Leopard20","date":"2023-04-04T17:28:00Z","text":"To get the list of all 3DEN layers, use all3DENEntities."}]},{"name":"addAction","title":"addAction","type":"command","url":"https://community.bistudio.com/wiki/addAction","revid":378569,"updated":"2026-05-08T21:16:48Z","groups":["Interaction"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Adds an entry to the action menu of an object. The action can only be activated when in proximity to the object **and** looking at it. Adding an action to the player makes that action available to the player at all times. For event handling of user interaction see inGameUISetEventHandler.","syntaxes":[{"syntax":"object addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, selection, memoryPoint]","params":[{"name":"object","type":"Object","description":"unit, vehicle or static object. **No agents and simple objects!**","type_expr":"Object","text":"**object**: Object - unit, vehicle or static object. **No agents and simple objects!**"},{"name":"title","type":"String","description":"the action name displayed in the action menu, may contain Structured Text. Because of that **<** and **>** symbols will be interpreted as opening and closing XML tags. To avoid this use `&lt;` for **<** and `&gt;` for **>**. The title text appearance can be changed with setUserActionText","type_expr":"String","text":"**title**: String - the action name displayed in the action menu, may contain Structured Text. Because of that **<** and **>** symbols will be interpreted as opening and closing XML tags. To avoid this use `&lt;` for **<** and `&gt;` for **>**. The title text appearance can be changed with setUserActionText"},{"name":"script","type":"String or Code","description":"either path to the script file, relative to the mission folder or string with code or the actual script code. If the string is a path to script file, the script file **must** have extension .SQS or .SQF. The script, whether it is a file or a code, will run in scheduled environment, i.e. it is ok to use sleep. Parameters array passed to the script upon activation in *_this* variable is:\n\n```sqf\nparams [\"_target\", \"_caller\", \"_actionId\", \"_arguments\"];\n```\n\n- **target**: Object - the object which the action is assigned to\n- **caller**: Object - the unit that activated the action\n- **actionID**: Number - activated action's ID (same as addAction's return value)\n- **arguments**: Anything - arguments given to the script if you are using the extended syntax","type_expr":"String | Code","text":"**script**: String or Code - either path to the script file, relative to the mission folder or string with code or the actual script code. If the string is a path to script file, the script file **must** have extension .SQS or .SQF. The script, whether it is a file or a code, will run in scheduled environment, i.e. it is ok to use sleep. Parameters array passed to the script upon activation in *_this* variable is:\n\n```sqf\nparams [\"_target\", \"_caller\", \"_actionId\", \"_arguments\"];\n```\n\n- **target**: Object - the object which the action is assigned to\n- **caller**: Object - the unit that activated the action\n- **actionID**: Number - activated action's ID (same as addAction's return value)\n- **arguments**: Anything - arguments given to the script if you are using the extended syntax"},{"name":"arguments","type":"Anything","optional":true,"default":"nil","description":"arguments to pass to the script. Accessible with `_this select 3` inside the script. If Array is used as an argument for example, its first element reference would be `_this select 3 select 0`","type_expr":"Anything","text":"**arguments**: Anything - (Optional, default nil) arguments to pass to the script. Accessible with `_this select 3` inside the script. If Array is used as an argument for example, its first element reference would be `_this select 3 select 0`"},{"name":"priority","type":"Number","optional":true,"default":"1.5","description":"priority value of the action. Actions will be arranged in descending order according to this value. Every game action has a preset priority value. Value can be negative or decimal fraction. Actions with same values will be arranged in order which they were made, newest at the bottom. The bigger the number the higher the action will be positioned on the menu. Typical range is 0 to 6","type_expr":"Number","text":"**priority**: Number - (Optional, default 1.5) priority value of the action. Actions will be arranged in descending order according to this value. Every game action has a preset priority value. Value can be negative or decimal fraction. Actions with same values will be arranged in order which they were made, newest at the bottom. The bigger the number the higher the action will be positioned on the menu. Typical range is 0 to 6"},{"name":"showWindow","type":"Boolean","optional":true,"default":"true","description":"if set to true, players see \"Titletext\" at mid-lower screen, as they approach the object. Only the title text for the action with highest priority and *showWindow* set to true will be shown","type_expr":"Boolean","text":"**showWindow**: Boolean - (Optional, default true) if set to true, players see \"Titletext\" at mid-lower screen, as they approach the object. Only the title text for the action with highest priority and *showWindow* set to true will be shown"},{"name":"hideOnUse","type":"Boolean","optional":true,"default":"true","description":"if set to true, it will hide the action menu after selecting it. If set to false, it will leave the action menu open and visible after selecting the action, leaving the same action highlighted, for the purpose of allowing you to re-select that same action quickly, or to select another action","type_expr":"Boolean","text":"**hideOnUse**: Boolean - (Optional, default true) if set to true, it will hide the action menu after selecting it. If set to false, it will leave the action menu open and visible after selecting the action, leaving the same action highlighted, for the purpose of allowing you to re-select that same action quickly, or to select another action"},{"name":"shortcut","type":"String","optional":true,"default":"\"\"","description":"one of the key names defined in bin.pbo (e.g. \"moveForward\"). Adding available shortcut will bind corresponding keyboard key to this action. Shortcut availability can be tested with inputAction command","type_expr":"String","text":"**shortcut**: String - (Optional, default \"\") one of the key names defined in bin.pbo (e.g. \"moveForward\"). Adding available shortcut will bind corresponding keyboard key to this action. Shortcut availability can be tested with inputAction command"},{"name":"condition","type":"String","optional":true,"default":"\"true\"","description":"expression that must return true for the action to be shown. **Special variables** passed to the script code are:\n\n- *_target*: Object - The object to which action is attached or, if the object is a unit inside of vehicle, the vehicle\n- *_this*: Object - Caller person to whom the action is shown (or not shown if *condition* returns false)\n- *_originalTarget*: Object - The original object to which the action is attached, regardless if the object/unit is in a vehicle or not\n- *_actionId*: Number - checked action's ID (same as addAction's return value)\n\n> [!WARNING]\n> If the player is the group leader, has an action added to them, and selects a subordinate, `_this` alternatively switches between the player and this selected unit - RPT logging `Unknown attribute itemsCmd` in the process.\n\n> [!IMPORTANT]\n> - *condition* is evaluated on each frame in unscheduled environment.\n> - *condition* is **not** evaluated if a dialog is open.\n> - If action is added to an object and not to the player, *condition* will only get evaluated if the player is closer than ~50m to the object surface and is looking at the object.\n> - If action is added to player, *condition* is evaluated all the time.","type_expr":"String","text":"**condition**: String - (Optional, default \"true\") expression that must return true for the action to be shown. **Special variables** passed to the script code are:\n\n- *_target*: Object - The object to which action is attached or, if the object is a unit inside of vehicle, the vehicle\n- *_this*: Object - Caller person to whom the action is shown (or not shown if *condition* returns false)\n- *_originalTarget*: Object - The original object to which the action is attached, regardless if the object/unit is in a vehicle or not\n- *_actionId*: Number - checked action's ID (same as addAction's return value)\n\n> [!WARNING]\n> If the player is the group leader, has an action added to them, and selects a subordinate, `_this` alternatively switches between the player and this selected unit - RPT logging `Unknown attribute itemsCmd` in the process.\n\n> [!IMPORTANT]\n> - *condition* is evaluated on each frame in unscheduled environment.\n> - *condition* is **not** evaluated if a dialog is open.\n> - If action is added to an object and not to the player, *condition* will only get evaluated if the player is closer than ~50m to the object surface and is looking at the object.\n> - If action is added to player, *condition* is evaluated all the time."},{"name":"radius","type":"Number","optional":true,"default":"50","description":"maximum 3D distance in meters between the activating unit's eyePos and *object*'s *memoryPoint*, *selection* or position. -1 disables the radius; hardcoded limit is **50**","type_expr":"Number","since":"arma3 1.64","text":"**radius**: Number - (Optional, default 50) maximum 3D distance in meters between the activating unit's eyePos and *object*'s *memoryPoint*, *selection* or position. -1 disables the radius; hardcoded limit is **50**"},{"name":"unconscious","type":"Boolean","optional":true,"default":"false","description":"if true will be shown to incapacitated player. See also setUnconscious and lifeState","type_expr":"Boolean","since":"arma3 1.64","text":"**unconscious**: Boolean - (Optional, default false) if true will be shown to incapacitated player. See also setUnconscious and lifeState"},{"name":"selection","type":"String","optional":true,"default":"\"\"","description":"*object*'s geometry LOD's named selection","type_expr":"String","since":"arma3 1.70","text":"**selection**: String - (Optional, default \"\") *object*'s geometry LOD's named selection"},{"name":"memoryPoint","type":"String","optional":true,"default":"\"\"","description":"*object*'s memory point. If *selection* is supplied, *memoryPoint* is not used","type_expr":"String","since":"arma3 1.82","text":"**memoryPoint**: String - (Optional, default \"\") *object*'s memory point. If *selection* is supplied, *memoryPoint* is not used"}],"returns":{"type":"Number","type_expr":"Number","description":"the added action's ID. Action can be removed with removeAction (see also removeAllActions). IDs are incrementing, the first given action to each unit has the ID 0, the second the ID 1, etc. IDs are also passed to the called script (see the script parameter)","text":"Number - the added action's ID. Action can be removed with removeAction (see also removeAllActions). IDs are incrementing, the first given action to each unit has the ID 0, the second the ID 1, etc. IDs are also passed to the called script (see the *script* parameter)"},"form":"binary","left":{"text":"object"},"right":{"text":"[title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, selection, memoryPoint]"}}],"examples":[{"code":["// short and sweet\nplayer addAction [\"a useless action that does nothing\", {}];\nplayer addAction [\"<t color='#FF0000'>This Useless Action Is RED</t>\", { hint \"RED\" }];\nplayer addAction [\"Hint Hello!\", { hint format [\"Hello %1!\", name player] }];\nplayer addAction [\"String Exec\", \"hint 'this is also compiled'\"];"]},{"text":"```sqf\n_actionID = player addAction [\"Exec the file\", \"scriptFile.sqf\"];\n```\n\n**scriptFile.sqf:**\n\n```sqf\nhint str _this;\n```","code":["_actionID = player addAction [\"Exec the file\", \"scriptFile.sqf\"];","hint str _this;"]},{"text":"```sqf\n// create object on the server and add action to the object on every client\nif (isServer) then\n{\n    private _object = \"some_obj_class\" createVehicle [1234, 1234, 0];\n    [_object, [\"Greetings!\", { hint \"Hello!\"; }]] remoteExec [\"addAction\"]; // Note: does not return action id\n};\n```","code":["// create object on the server and add action to the object on every client\nif (isServer) then\n{\n\tprivate _object = \"some_obj_class\" createVehicle [1234, 1234, 0];\n\t[_object, [\"Greetings!\", { hint \"Hello!\"; }]] remoteExec [\"addAction\"]; // Note: does not return action id\n};"]},{"text":"Default parameters:\n\n```sqf\nthis addAction\n[\n    \"title\",\n    {\n        params [\"_target\", \"_caller\", \"_actionId\", \"_arguments\"];\n    },\n    nil,\n    1.5,\n    true,\n    true,\n    \"\",\n    \"true\",\n    50,\n    false,\n    \"\",\n    \"\"\n];\n```","code":["this addAction\n[\n\t\"title\",\n\t{\n\t\tparams [\"_target\", \"_caller\", \"_actionId\", \"_arguments\"];\n\t},\n\tnil,\n\t1.5,\n\ttrue,\n\ttrue,\n\t\"\",\n\t\"true\",\n\t50,\n\tfalse,\n\t\"\",\n\t\"\"\n];"]},{"text":"Default parameters with comments:\n\n```sqf\nthis addAction\n[\n    \"title\",    // title\n    {\n        params [\"_target\", \"_caller\", \"_actionId\", \"_arguments\"]; // script\n    },\n    nil,        // arguments\n    1.5,        // priority\n    true,        // showWindow\n    true,        // hideOnUse\n    \"\",            // shortcut\n    \"true\",        // condition\n    50,            // radius\n    false,        // unconscious\n    \"\",            // selection\n    \"\"            // memoryPoint\n];\n```","code":["this addAction\n[\n\t\"title\",\t// title\n\t{\n\t\tparams [\"_target\", \"_caller\", \"_actionId\", \"_arguments\"]; // script\n\t},\n\tnil,\t\t// arguments\n\t1.5,\t\t// priority\n\ttrue,\t\t// showWindow\n\ttrue,\t\t// hideOnUse\n\t\"\",\t\t\t// shortcut\n\t\"true\",\t\t// condition\n\t50,\t\t\t// radius\n\tfalse,\t\t// unconscious\n\t\"\",\t\t\t// selection\n\t\"\"\t\t\t// memoryPoint\n];"]}],"multiplayer":"The command will be ignored on dedicated servers, probably because no UI exists.","see_also":["actionIDs","actionParams","setUserActionText","inGameUISetEventHandler","showHUD","inputAction","removeAction","removeAllActions","action","shownAction","BIS_fnc_holdActionAdd"],"notes":[{"user":"Dedmen","date":"2018-05-02T13:44:00Z","text":"If you want to replicate vanilla Actions like \"Treat yourself\" where the scroll menu only shows text and it displays the icon mid-screen you can use\n\n```sqf\nprivate _actionId = player addAction [\"Heal\", {}];\nplayer setUserActionText [_actionId, \"Heal\", \"<img size='2' image='\\a3\\ui_f\\data\\IGUI\\Cfg\\Actions\\heal_ca'/>\"];\n```"},{"user":"PierreMGI","date":"2020-05-12T10:42:00Z","text":"addAction on unit or player stays on corpse after kill. So this action is lost for the new body after respawn. If you want a persistent addAction, you need to add it in the respawn script (onPlayerRespawn.sqf or addMissionEventHandler \"entityRespawned\" or addMPEventHandler \"MPrespawn\"...\nYou can use removeAllActions on corpse."},{"user":"Leopard20","date":"2022-08-28T21:52:00Z","text":"If the server blocks execVM in CfgRemoteExec, you can't use path to script:\n\n```sqf\n_obj addAction [\"Test\", \"path\\script.sqf\"]; // \"path\\script.sqf\" won't execute\n```\n\nYou can, however, do this:\n\n```sqf\n_obj addAction [\"Test\", { _this spawn compile preprocessFileLineNumbers \"path\\script.sqf\" }];\n```\n\nBut it's recommended to use functions if the script is called frequently."}],"categories_extra":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Introduced with Operation Flashpoint version 1.10","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Take On Helicopters: Scripting Commands"]},{"name":"addBackpack","title":"addBackpack","type":"command","url":"https://community.bistudio.com/wiki/addBackpack","revid":364226,"updated":"2024-05-06T09:38:13Z","groups":["Containers"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Adds a backpack for a unit. If a unit already has a backpack, the old backpack will be placed on the ground under the unit. Items defined in the backpack's config will be added as well.\n\n> [!NOTE]\n> Classname list of available backpacks:\n>\n> - Arma 2 OA backpacks\n> - Arma 3 backpacks - objects starting with \"B_\", starts with \"*B_AssaultPack_khk*\"","syntaxes":[{"syntax":"unit addBackpack backpackClassName","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"backpackClassName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"backpackClassName"}}],"examples":[{"code":["this addBackpack \"TK_RPG_Backpack_EP1\";"]},{"code":["_mySoldierDude addBackpack \"US_Patrol_Pack_EP1\";"]},{"code":["_mySoldierDude addBackpack \"B_AssaultPack_mcamo_Ammo\";// Adds backpack prefilled with items defined in its config"]}],"see_also":["addBackpackGlobal","backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack"]},{"name":"addBackpackCargo","title":"addBackpackCargo","type":"command","url":"https://community.bistudio.com/wiki/addBackpackCargo","revid":376385,"updated":"2025-10-09T02:14:45Z","groups":["Containers"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Add backpack(s) to the cargo space of vehicle. Classname list of available backpacks is here.\nFor a list of possible backpacks, see:\n\n- Arma 2 v1.50 Arma 2: Operation Arrowhead: Backpacks\n- Arma 3 v1.00 Arma 3: CfgVehicles Equipment (starting with `B_`)\n\n> [!NOTE]\n> **Arma 3:** In Arma 3, arguments for this command are local Local argument. For the global variant, see addBackpackCargoGlobal.","syntaxes":[{"syntax":"vehicle addBackpackCargo [backpackClassName, count]","params":[{"name":"vehicle","type":"Object","description":"vehicle to add the backpack to","type_expr":"Object"},{"name":"backpackClassName","type":"String","description":"backpack classname","type_expr":"String"},{"name":"count","type":"Number","description":"number of backpacks to add. Arma 3 v2.14 negative count will remove backpacks.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[backpackClassName, count]"}}],"examples":[{"code":["this addBackpackCargo [\"TK_RPG_Backpack_EP1\", 2];"]},{"code":["_apc addBackpackCargo [\"US_Patrol_Pack_EP1\", 4];"]}],"see_also":["backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack"]},{"name":"addBackpackCargoGlobal","title":"addBackpackCargoGlobal","type":"command","url":"https://community.bistudio.com/wiki/addBackpackCargoGlobal","revid":341861,"updated":"2023-07-01T14:05:59Z","groups":["Containers"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Add backpack(s) to the cargo space of vehicle.\n\n> [!NOTE]\n> Classname list of available backpacks:\n>\n> - Arma 2:OA backpacks\n> - Arma 3 backpacks - objects starting with \"B_\", starts near \"B_AssaultPack_khk\"","syntaxes":[{"syntax":"vehicle addBackpackCargoGlobal [packClassName, count]","params":[{"name":"vehicle","type":"Object","description":"object to add the Backpack to","type_expr":"Object"},{"name":"packClassName","type":"String","description":"see the topic Category:Weapons for reference about possible values.","type_expr":"String"},{"name":"count","type":"Number","description":"number of backpacks to add; Arma 3 v2.14 a negative value will remove backpacks.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[packClassName, count]"}}],"examples":[{"code":["this addBackpackCargoGlobal [\"TK_RPG_Backpack_EP1\", 2];"]},{"code":["_apc addBackpackCargoGlobal [\"US_Patrol_Pack_EP1\", 4];"]}],"see_also":["backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack","addMagazineCargo","clearMagazineCargo","clearWeaponCargo","addMagazineCargoGlobal","addWeaponCargo","addWeaponCargoGlobal","addItemCargo","addItemCargoGlobal"]},{"name":"addBackpackGlobal","title":"addBackpackGlobal","type":"command","url":"https://community.bistudio.com/wiki/addBackpackGlobal","revid":369079,"updated":"2024-09-02T20:35:57Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global","effect":"global"},"description":"Adds a backpack to a unit - global variant of addBackpack.\n\n> [!WARNING]\n> The backpack added with this command will be created on the PC local to the unit you are adding it to, even if executed on the server.\n>\n> Because of this, if non-local unit is the target and one tries to immediately access added backpack, the backpack returned will be null.\n>\n> When adding backpack dynamically to a remote unit, wait until the backpack is added (See Example 2).","syntaxes":[{"syntax":"unit addBackpackGlobal backpack","params":[{"name":"unit","type":"Object","description":"soldier","type_expr":"Object"},{"name":"backpack","type":"String","description":"backpack class name","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"backpack"}}],"examples":[{"code":["player addBackpackGlobal \"B_AssaultPack_khk\";"]},{"text":"```sqf\n_unit spawn\n{\n    if (not isNull backpackContainer _this) then\n    {\n        removeBackpackGlobal _this;\n        waitUntil { sleep 0.01; isNull backpackContainer _this };\n    };\n\n    _this addBackpackGlobal \"B_AssaultPack_khk\";\n    waitUntil { sleep 0.01; not isNull backpackContainer _this };\n    backpackContainer _this addMagazineCargoGlobal [\"30Rnd_556x45_Stanag\", 5];\n};\n```","code":["_unit spawn \n{\n\tif (not isNull backpackContainer _this) then\n\t{\n\t\tremoveBackpackGlobal _this;\n\t\twaitUntil { sleep 0.01; isNull backpackContainer _this };\n\t};\n\n\t_this addBackpackGlobal \"B_AssaultPack_khk\";\n\twaitUntil { sleep 0.01; not isNull backpackContainer _this };\n\tbackpackContainer _this addMagazineCargoGlobal [\"30Rnd_556x45_Stanag\", 5];\n};"]}],"see_also":["addBackpack","backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack"]},{"name":"addBinocularItem","title":"addBinocularItem","type":"command","url":"https://community.bistudio.com/wiki/addBinocularItem","revid":309278,"updated":"2022-05-04T15:19:43Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","locality":{"argument":"local","effect":"global"},"description":"Adds weapon item, including magazine, directly to the binocular weapon. This is used for infantry weapons.","syntaxes":[{"syntax":"unit addBinocularItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player addBinocularItem \"Laserbatteries\";"]}],"see_also":["addWeaponItem","removeBinocularItem","removeAllBinocularItems","addPrimaryWeaponItem","addSecondaryWeaponItem","addHandgunItem","weaponsItems","binocularItems","primaryWeaponItems","secondaryWeaponItems","handgunItems"]},{"name":"addCamShake","title":"addCamShake","type":"command","url":"https://community.bistudio.com/wiki/addCamShake","revid":369087,"updated":"2024-09-02T20:37:47Z","groups":["Camera Control"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Creates the camera shaking effect, like when you are near an explosion","syntaxes":[{"syntax":"addCamShake [power, duration, frequency]","params":[{"name":"power","type":"Number","description":"strength of shake (camera movement), practical range is 0 to 20","type_expr":"Number"},{"name":"duration","type":"Number","description":"duration in seconds divided by 2","type_expr":"Number"},{"name":"frequency","type":"Number","description":"frequency of shake, practical range is 0 to 100","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[power, duration, frequency]"}}],"examples":[{"code":["addCamShake [10, 2, 25]; // Shakes the camera for 1 second"]},{"code":["enableCamShake true;\naddCamShake [5, 5, 25];"]}],"see_also":["enableCamShake","setCamShakeDefParams","setCamShakeParams","resetCamShake"]},{"name":"addCuratorAddons","title":"addCuratorAddons","type":"command","url":"https://community.bistudio.com/wiki/addCuratorAddons","revid":378390,"updated":"2026-04-04T07:50:38Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Allow curator use of given addon.","syntaxes":[{"syntax":"curatorObj addCuratorAddons addons","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"},{"name":"addons","type":"Array of Strings","description":"CfgPatches class names","type_expr":"Array<String>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"addons"}}],"examples":[{"code":["curatorObj addCuratorAddons [\"A3_Armor_F_AMV\",\"A3_Armor_F_Panther\"];"]},{"code":["curatorObj addCuratorAddons [\"A3_Modules_F_Curator_Lightning\"];"]},{"text":"Addons can be stacked:\n\n```sqf\ncuratorObj addCuratorAddons [\"A3_Armor_F_AMV\",\"A3_Armor_F_Panther\"];\ncuratorObj addCuratorAddons [\"A3_Modules_F_Curator_Lightning\"];\ndiag_log curatorAddons curatorObj;\n```\n\n```sqf\n[\n    \"A3_Armor_F_AMV\",\n    \"A3_Armor_F_Panther\",\n    \"A3_Modules_F_Curator_Lightning\"\n]\n```","code":["curatorObj addCuratorAddons [\"A3_Armor_F_AMV\",\"A3_Armor_F_Panther\"];\ncuratorObj addCuratorAddons [\"A3_Modules_F_Curator_Lightning\"];\ndiag_log curatorAddons curatorObj;","[\n\t\"A3_Armor_F_AMV\",\n\t\"A3_Armor_F_Panther\",\n\t\"A3_Modules_F_Curator_Lightning\"\n]"]}],"multiplayer":"Can be executed only on server","see_also":["Arma 3: Curator","removeCuratorAddons","removeAllCuratorAddons","curatorAddons"]},{"name":"addCuratorCameraArea","title":"addCuratorCameraArea","type":"command","url":"https://community.bistudio.com/wiki/addCuratorCameraArea","revid":378612,"updated":"2026-05-13T17:01:55Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Adds or changes curator camera area (depends on if ID is already used).","syntaxes":[{"syntax":"curatorObj addCuratorCameraArea [cameraAreaID, position, radius]","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"},{"name":"cameraAreaID","type":"Number","type_expr":"Number"},{"name":"position","type":"Position","type_expr":"Position"},{"name":"radius","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"[cameraAreaID, position, radius]"}}],"examples":[{"code":["myCurator addCuratorCameraArea [3, position mySoldier, 300];"]}],"see_also":["Arma 3: Curator","removeCuratorCameraArea","removeAllCuratorCameraAreas","curatorCameraArea"]},{"name":"addCuratorEditableObjects","title":"addCuratorEditableObjects","type":"command","url":"https://community.bistudio.com/wiki/addCuratorEditableObjects","revid":377067,"updated":"2026-01-01T09:24:50Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Register objects which can be edited by a curator.","syntaxes":[{"syntax":"curatorObj addCuratorEditableObjects [objects, addCrew]","params":[{"name":"curatorObj","type":"Object","description":"curator module","type_expr":"Object"},{"name":"objects","type":"Array of Objects","type_expr":"Array<Object>"},{"name":"addCrew","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"[objects, addCrew]"}}],"examples":[{"code":["MyCuratorModule addCuratorEditableObjects [[MyCar], true];"]}],"see_also":["Arma 3: Curator","allCurators","removeCuratorEditableObjects","curatorEditableObjects"],"notes":[{"user":"R3vo","date":"2020-07-23T10:29:00Z","text":"To continuously make all created objects editable for all Zeus use the following code:\n\n```sqf\nif (isServer) then\n{\n    0 spawn\n    {\n        while { true } do\n        {\n            {\n                _x addCuratorEditableObjects\n                [\n                    entities [[], [\"Logic\"], true /* include vehicle crew */, true /* exclude dead bodies */],\n                    true\n                ];\n            } count allCurators;\n            sleep 60; // change to whatever fits your needs\n        };\n    };\n};\n```"},{"user":"POLPOX","date":"2025-06-12T11:05:49Z","text":"Modernized script of R3vo's concept for efficient solution.\n\n```sqf\nif (isServer) then {\n    addMissionEventHandler [\"EntityCreated\",{\n        {\n            _x addCuratorEditableObjects [\n                [_this], true\n            ];\n        } forEach allCurators;\n    }];\n};\n```"}]},{"name":"addCuratorEditingArea","title":"addCuratorEditingArea","type":"command","url":"https://community.bistudio.com/wiki/addCuratorEditingArea","revid":348372,"updated":"2023-11-08T12:59:56Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Adds or changes curator edit area (depends on if ID is already used).","syntaxes":[{"syntax":"curatorObj addCuratorEditingArea [editAreaID, position, radius]","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"},{"name":"editAreaID","type":"Number","type_expr":"Number"},{"name":"position","type":"Position","type_expr":"Position"},{"name":"radius","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"[editAreaID, position, radius]"}}],"examples":[{"code":["myCurator addCuratorEditingArea [4, position player, 1000];"]}],"see_also":["Arma 3: Curator","removeCuratorEditingArea","removeAllCuratorEditingAreas","curatorEditingArea"]},{"name":"addCuratorPoints","title":"addCuratorPoints","type":"command","url":"https://community.bistudio.com/wiki/addCuratorPoints","revid":376978,"updated":"2026-01-01T06:07:36Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Adds or removes curator points.","syntaxes":[{"syntax":"curatorObj addCuratorPoints points","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"},{"name":"points","type":"Number in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"points"}}],"examples":[{"code":["curatorModule addCuratorPoints 0.5;"]}],"see_also":["Arma 3: Curator","curatorPoints"]},{"name":"addCuratorSelected","title":"addCuratorSelected","type":"command","url":"https://community.bistudio.com/wiki/addCuratorSelected","revid":377569,"updated":"2026-01-02T06:56:16Z","groups":["Curator"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","description":"Add items to the selected curator items.","syntaxes":[{"syntax":"addCuratorSelected items","params":[{"name":"items","type":"Array","description":"items to add; items can be an Object, Group, Waypoint, or String (marker)","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"items"}}],"examples":[{"code":["addCuratorSelected [unit1, group1, [group1, waypointIndex], markerName1];"]},{"code":["addCuratorSelected [vehicle1, unit1, unit2, unit3, unit4, group1];"]}],"see_also":["curatorMouseOver","curatorSelected","setCuratorSelected","curatorEditableObjects","Arma 3: Curator"]},{"name":"addEditorObject","title":"addEditorObject","type":"command","url":"https://community.bistudio.com/wiki/addEditorObject","revid":353335,"updated":"2024-03-15T17:11:50Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Add an object to the editor and assign arguments. Create script is,called with _new equal to true. Returns the ID of the new EditorObject.,Subtype class is optional.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map addEditorObject [type,[name1,value1,...],subtype class]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"[type,[name1,value1,...],subtype class]","type":"Array","type_expr":"Array"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"map"},"right":{"text":"[type,[name1,value1,...],subtype class]"}}],"examples":[{"text":"-"}],"see_also":["Game 2 Editor"]},{"name":"addEventHandler","title":"addEventHandler","type":"command","url":"https://community.bistudio.com/wiki/addEventHandler","revid":363476,"updated":"2024-03-31T14:58:59Z","groups":["Event Handlers"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Adds an Event Handler to the given object.\n\n- As many Event Handlers of any type can be added - existing Event Handlers do not get overwritten\n- Use removeEventHandler to remove an Event Handler\n\nRead Event Handlers for more information and a list of all available Event Handlers.","syntaxes":[{"syntax":"target addEventHandler [type, code]","params":[{"name":"target","type":"Object or Arma 3 v2.10 Group","type_expr":"Object | Group"},{"name":"type","type":"String","description":"see Event Handlers for the full list of available options","type_expr":"String"},{"name":"code","type":"Code or String","description":"code that should be executed when the Event Handler fires; executed in missionNamespace by default. Several Magic Variables are available:\n\n- Event Handler parameters are accessible via `_this`\n- The Event Handler type is available as `_thisEvent`\n- The Event Handler index is available as `_thisEventHandler`","type_expr":"Code | String"}],"returns":{"type":"Number","type_expr":"Number","description":"the index of the added Event Handler. Indices start at 0 for each unit and increment with each added Event Handler."},"form":"binary","left":{"text":"target"},"right":{"text":"[type, code]"}}],"examples":[{"text":"```sqf\nthis addEventHandler [\"Killed\", {\n    params [\"_unit\", \"_killer\"];\n    systemChat format [\"%1 has been killed by %2.\", _unit, _killer];\n}];\n```","code":["this addEventHandler [\"Killed\", {\n\tparams [\"_unit\", \"_killer\"];\n\tsystemChat format [\"%1 has been killed by %2.\", _unit, _killer];\n}];"]},{"text":"```sqs\n_index = player addEventHandler [\"Killed\", { _this exec \"playerKilled.sqs\" }]\n```","code":["_index = player addEventHandler [\"Killed\", { _this exec \"playerKilled.sqs\" }]"]}],"multiplayer":"Some event handlers are persistent (i.e they stay attached to the unit, even after it dies and respawns).","see_also":["removeEventHandler","removeAllEventHandlers","addMPEventHandler","addMissionEventHandler","BIS_fnc_addScriptedEventHandler","getEventHandlerInfo"],"notes":[{"user":"Killzone_Kid","date":"2015-06-07T21:06:00Z","text":"When using overridable EH, such as \"InventoryOpened\" and similar, where returning true allows to override default action, exitWith cannot be used to return value. So:\n\n```sqf\nif (whatever) exitWith {true}; false;\n```\n\nForget about it, will not work. Instead use:\n\n```sqf\nif (whatever) then {true} else {false};\n```\n\n100% satisfaction guaranteed!"}]},{"name":"addForce","title":"addForce","type":"command","url":"https://community.bistudio.com/wiki/addForce","revid":377384,"updated":"2026-01-02T06:43:53Z","groups":["PhysX"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","locality":{"argument":"global","effect":"global"},"description":"Applies given force for one frame (essentially an impulse) to unit or given PhysX object at given position.\n\n> [!NOTE]\n> For more information see [NVIDIA docs](http://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/apireference/files/classPxRigidBody.html).","syntaxes":[{"syntax":"object addForce [force, position, setUnconscious]","params":[{"name":"object","type":"Object","description":"PhysX object or Arma 3 v2.04Local argument unit, in which case the unit must be local and will be set unconscious","type_expr":"Object"},{"name":"force","type":"Vector3D","description":"force vector in **world** space; force is expressed in\n[newton-seconds](https://en.wikipedia.org/wiki/Newton-second) (used by [PxForceMode::eIMPULSE](https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/apireference/files/structPxForceMode.html))","type_expr":"Vector3D"},{"name":"position","type":"PositionRelative","description":"relative to object","type_expr":"PositionRelative"},{"name":"setUnconscious","type":"Boolean","optional":true,"default":"true","description":"only applies to \"CAManBase\" *object*; set to false to keep the person conscious","type_expr":"Boolean","since":"arma3 2.18","text":"setUnconscious: Boolean - (Optional, default true) only applies to \"CAManBase\" *object*; set to false to keep the person conscious"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[force, position, setUnconscious]"}}],"examples":[{"text":"Apply force [0,1000,0] defined in world space (not factoring object actual positioning) to object position [1,0,0]:\n\n```sqf\n_object addForce [[0,1000,0], [1,0,0]];\n```","code":["_object addForce [[0,1000,0], [1,0,0]];"]},{"text":"Apply force [0,1000,0] defined in model space (relative to object) to object position [1,0,0]:\n\n```sqf\n_object addForce [_object vectorModelToWorld [0,1000,0], [1,0,0]];\n```","code":["_object addForce [_object vectorModelToWorld [0,1000,0], [1,0,0]];"]},{"text":"Can be used on units since Arma 3 v2.04:\n\n```sqf\nif (local bob) then\n{\n    0 spawn\n    {\n        bob addForce [bob vectorModelToWorld [0,-200,0], bob selectionPosition \"rightfoot\"];\n        sleep 5;\n        bob setUnconscious false;\n    };\n};\n```","code":["if (local bob) then\n{\n\t0 spawn \n\t{\n\t\tbob addForce [bob vectorModelToWorld [0,-200,0], bob selectionPosition \"rightfoot\"];\n\t\tsleep 5;\n\t\tbob setUnconscious false;\n\t};\n};"]},{"code":["player addForce [player vectorModelToWorld [0, -1, 0], [0, 1, 0], false]; // not unconscious"]}],"see_also":["addTorque","awake","isAwake","vectorModelToWorld","vectorModelToWorldVisual","selectionPosition","disableBrakes","brakesDisabled"]},{"name":"addForceGeneratorRTD","title":"addForceGeneratorRTD","type":"command","url":"https://community.bistudio.com/wiki/addForceGeneratorRTD","revid":351294,"updated":"2023-11-27T03:19:37Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34","tkoh":"1.00"},"since":"arma3 1.34","arma3_since":"1.34","description":"Adds force generator to world.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"addForceGeneratorRTD parameters","params":[{"name":"parameters","type":"Array","type_expr":"Array"}],"returns":{"type":"Number","type_expr":"Number","description":"force index"},"form":"unary","right":{"text":"parameters"}}],"see_also":["forceAtPositionRTD","clearForcesRTD","forceGeneratorRTD"]},{"name":"addGoggles","title":"addGoggles","type":"command","url":"https://community.bistudio.com/wiki/addGoggles","revid":379156,"updated":"2026-10-19T12:55:09Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Create a new item and try to link it into goggles (glasses) slot.\n\n> [!NOTE]\n> This command does **not** add NVGs, which are hmd slot items (see linkItem instead). The glasses could be one of the following modes:\n>\n> ```sqf\n> _mode = getNumber(configFile >> \"CfgGlasses\" >> \"G_Diving\" >> \"mode\"); // 1\n> /*\n> 0 - None\n> 1 - Diving\n> 2 - Goggles\n> 3 - NVG\n> 4 - DivingAndOverwater (since 2.08)\n> */\n> ```","syntaxes":[{"syntax":"unit addGoggles type","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"type","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"type"}}],"examples":[{"code":["player addGoggles \"G_Tactical_Clear\";"]},{"code":["diver addGoggles \"G_Diving\";"]}],"see_also":["goggles","removeGoggles"]},{"name":"addGroupIcon","title":"addGroupIcon","type":"command","url":"https://community.bistudio.com/wiki/addGroupIcon","revid":376587,"updated":"2025-10-29T23:12:14Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Adds icon to a group leader. Returns icon ID, Control icons visibility with setGroupIconsVisible. Since Arma 3 v2.22 the offset can be set separately for 2d and 3d.","syntaxes":[{"syntax":"group addGroupIcon [iconClass, offset]","params":[{"name":"group","type":"Group","description":"group to which add the icon","type_expr":"Group"},{"name":"iconClass","type":"String","description":"class name of an icon from `CfgGroupIcons`","type_expr":"String"},{"name":"offset","type":"Array of Numbers","optional":true,"default":"[0,0]","description":"X and Y offsets of the icon in format [offsetX, offsetY, (offsetX3d), (offsetY3d)]","type_expr":"Array<Number>","text":"offset: Array of Numbers - (Optional, default [0,0]) X and Y offsets of the icon in format [offsetX, offsetY, (offsetX3d), (offsetY3d)]"}],"returns":{"type":"Number","type_expr":"Number","description":"icon ID"},"form":"binary","left":{"text":"group"},"right":{"text":"[iconClass, offset]"}}],"examples":[{"code":["groupName addGroupIcon [\"b_inf\", [offsetX, offsetY]];"]},{"text":"```sqf\n// enable icons in 2D and 3D\nsetGroupIconsVisible [true, true];\nsetGroupIconsSelectable true;\n\n// add the icon for all existing groups\nallGroups apply\n{\n    private _icon = [\"o_inf\", \"b_inf\", \"n_inf\", \"c_unknown\"] select (side _x call BIS_fnc_sideID);\n    private _color = [side _x, false] call BIS_fnc_sideColor;\n    _x addGroupIcon [_icon, [0, 0]];\n    _x setGroupIconParams [_color, groupID _x, linearConversion [1, 15, count units _x, 0.5, 3, false], true];\n};\n\n// add group event handler to all existing groups to handle to icon sizing\nallGroups apply\n{\n    _x addEventHandler [\"UnitLeft\",\n    {\n        params [\"_group\"];\n        getGroupIconParams group player params [\"_color\", \"_text\", \"_scale\", \"_visibility\"];\n        _group setGroupIconParams [_color, _text, linearConversion [1, 15, count units _group, 0.5, 2, true], _visibility];\n    }];\n};\n\n// add the icons whenever a group gets created\naddMissionEventHandler [\"GroupCreated\",\n{\n    params [\"_group\"];\n    _group spawn\n    {\n        params [\"_group\"];\n        private _start = diag_tickTime;\n        waitUntil {sleep 1; units _group isNotEqualTo [] || diag_tickTime - _start > 5};\n        if (units _group isEqualTo []) exitWith {};\n\n        private _icon = [\"o_inf\", \"b_inf\", \"n_inf\", \"c_unknown\"] select (side _group call BIS_fnc_sideID);\n        private _color = [side _group, false] call BIS_fnc_sideColor;\n\n        _group addGroupIcon [_icon, [0, 0]];\n\n        // scale icon depending on group size\n        _group setGroupIconParams [_color, groupID _group, linearConversion [1, 15, count units _group, 0.5, 2, true], true];\n\n        _group addEventHandler [\"UnitLeft\",\n        {\n            params [\"_group\"];\n            getGroupIconParams group player params [\"_color\", \"_text\", \"_scale\", \"_visibility\"];\n            _group setGroupIconParams [_color, _text, linearConversion [1, 15, count units _group, 0.5, 2, true], _visibility];\n        }];\n    };\n}];\n\n// show group info when hovering over an icon (2D/3D)\naddMissionEventHandler [\"GroupIconOverEnter\",\n{\n    params\n    [\n        \"_is3D\", \"_group\", \"_waypointId\",\n        \"_posX\", \"_posY\",\n        \"_shift\", \"_control\", \"_alt\"\n    ];\n    hintSilent parseText format\n    [\n        \"<t align='left' font='EtelkaMonospacePro'><br/><t size='1.2'>General Information:</t><br/>Callsign: %1<br/>Leader: %2<br/>No. of Units: %3<br/>Delete when Empty: %4<br/><br/><t size='1.2'>Group Status:</t><br/>Health: %5<br/>Fleeing: %6<br/>Attack Enabled: %7<br/>Combat Behaviour: %8<br/>Combat Mode: %9<br/>Formation: %10<br/>Speed: %11<br/><br/><t size='1.2'>Waypoints:</t><br/>No. of Waypoints: %12<br/>Current Waypoint: %13<br/>Speed: %14</t>\",\n        format [\"%1 (%2)\",groupID _group, if (vehicle leader _group isNotEqualTo leader _group) then {[configFile >> \"CfgVehicles\" >> typeOf vehicle leader _group] call BIS_fnc_displayName} else {\"-\"}],\n        name leader _group,\n        count units _group,\n        isGroupDeletedWhenEmpty _group,\n        units _group apply {str round ((1 - damage _x)* 100) + \" %\"},\n        fleeing leader _x,\n        attackEnabled _group,\n        combatBehaviour _group,\n        combatMode _group,\n        formation _group,\n        speedMode _group,\n        count waypoints _group,\n        waypointType [_group, currentWaypoint _group],\n        units _group apply {str round speed _x + \" km/h\"}\n    ];\n\n    if !(_group getVariable [\"IconEnlarged\", false]) then\n    {\n        _group setVariable [\"IconEnlarged\", true];\n\n        getGroupIconParams _group params [\"_color\", \"_text\", \"_scale\", \"_visibility\"];\n        _group setGroupIconParams [_color, _text, _scale * 1.25, _visibility];\n    };\n}];\n\n// remove the hint whenever the mouse is leaving the icon area (2D/3D)\naddMissionEventHandler [\"GroupIconOverLeave\",\n{\n    params\n    [\n        \"_is3D\", \"_group\", \"_waypointId\",\n        \"_posX\", \"_posY\",\n        \"_shift\", \"_control\", \"_alt\"\n    ];\n    hintSilent \"\";\n\n    if (_group getVariable [\"IconEnlarged\", false]) then\n    {\n        _group setVariable [\"IconEnlarged\", false];\n\n        getGroupIconParams _group params [\"_color\", \"_text\", \"_scale\", \"_visibility\"];\n        _group setGroupIconParams [_color, _text, linearConversion [1, 15, count units _group, 0.5, 2, true], _visibility];\n    };\n}];\n\n// delete group and its units when clicking on the icon\naddMissionEventHandler [\"GroupIconClick\",\n{\n    params\n    [\n        \"_is3D\", \"_group\", \"_waypointId\",\n        \"_mouseButton\", \"_posX\", \"_posY\",\n        \"_shift\", \"_control\", \"_alt\"\n    ];\n\n    if (!_shift && _control && !_alt) then\n    {\n        units _group apply {deleteVehicle _x};\n        deleteGroup _group;\n    };\n}];\n```","code":["// enable icons in 2D and 3D\nsetGroupIconsVisible [true, true];\nsetGroupIconsSelectable true;\n\n// add the icon for all existing groups\nallGroups apply\n{\n\tprivate _icon = [\"o_inf\", \"b_inf\", \"n_inf\", \"c_unknown\"] select (side _x call BIS_fnc_sideID);\n\tprivate _color = [side _x, false] call BIS_fnc_sideColor;\n\t_x addGroupIcon [_icon, [0, 0]];\n\t_x setGroupIconParams [_color, groupID _x, linearConversion [1, 15, count units _x, 0.5, 3, false], true];\n};\n\n// add group event handler to all existing groups to handle to icon sizing\nallGroups apply\n{\n\t_x addEventHandler [\"UnitLeft\",\n\t{\n\t\tparams [\"_group\"];\n\t\tgetGroupIconParams group player params [\"_color\", \"_text\", \"_scale\", \"_visibility\"];\n\t\t_group setGroupIconParams [_color, _text, linearConversion [1, 15, count units _group, 0.5, 2, true], _visibility];\n\t}];\n};\n\n// add the icons whenever a group gets created\naddMissionEventHandler [\"GroupCreated\",\n{\n\tparams [\"_group\"];\n\t_group spawn\n\t{\n\t\tparams [\"_group\"];\n\t\tprivate _start = diag_tickTime;\n\t\twaitUntil {sleep 1; units _group isNotEqualTo [] || diag_tickTime - _start > 5};\n\t\tif (units _group isEqualTo []) exitWith {};\n\n\t\tprivate _icon = [\"o_inf\", \"b_inf\", \"n_inf\", \"c_unknown\"] select (side _group call BIS_fnc_sideID);\n\t\tprivate _color = [side _group, false] call BIS_fnc_sideColor;\n\n\t\t_group addGroupIcon [_icon, [0, 0]];\n\n\t\t// scale icon depending on group size\n\t\t_group setGroupIconParams [_color, groupID _group, linearConversion [1, 15, count units _group, 0.5, 2, true], true];\n\n\t\t_group addEventHandler [\"UnitLeft\",\n\t\t{\n\t\t\tparams [\"_group\"];\n\t\t\tgetGroupIconParams group player params [\"_color\", \"_text\", \"_scale\", \"_visibility\"];\n\t\t\t_group setGroupIconParams [_color, _text, linearConversion [1, 15, count units _group, 0.5, 2, true], _visibility];\n\t\t}];\n\t};\n}];\n\n// show group info when hovering over an icon (2D/3D)\naddMissionEventHandler [\"GroupIconOverEnter\",\n{\n\tparams\n\t[\n\t\t\"_is3D\", \"_group\", \"_waypointId\",\n\t\t\"_posX\", \"_posY\",\n\t\t\"_shift\", \"_control\", \"_alt\"\n\t];\n\thintSilent parseText format\n\t[\n\t\t\"<t align='left' font='EtelkaMonospacePro'><br/><t size='1.2'>General Information:</t><br/>Callsign: %1<br/>Leader: %2<br/>No. of Units: %3<br/>Delete when Empty: %4<br/><br/><t size='1.2'>Group Status:</t><br/>Health: %5<br/>Fleeing: %6<br/>Attack Enabled: %7<br/>Combat Behaviour: %8<br/>Combat Mode: %9<br/>Formation: %10<br/>Speed: %11<br/><br/><t size='1.2'>Waypoints:</t><br/>No. of Waypoints: %12<br/>Current Waypoint: %13<br/>Speed: %14</t>\",\n\t\tformat [\"%1 (%2)\",groupID _group, if (vehicle leader _group isNotEqualTo leader _group) then {[configFile >> \"CfgVehicles\" >> typeOf vehicle leader _group] call BIS_fnc_displayName} else {\"-\"}],\n\t\tname leader _group,\n\t\tcount units _group,\n\t\tisGroupDeletedWhenEmpty _group,\n\t\tunits _group apply {str round ((1 - damage _x)* 100) + \" %\"},\n\t\tfleeing leader _x,\n\t\tattackEnabled _group,\n\t\tcombatBehaviour _group,\n\t\tcombatMode _group,\n\t\tformation _group,\n\t\tspeedMode _group,\n\t\tcount waypoints _group,\n\t\twaypointType [_group, currentWaypoint _group],\n\t\tunits _group apply {str round speed _x + \" km/h\"}\n\t];\n\n\tif !(_group getVariable [\"IconEnlarged\", false]) then\n\t{\n\t\t_group setVariable [\"IconEnlarged\", true];\n\n\t\tgetGroupIconParams _group params [\"_color\", \"_text\", \"_scale\", \"_visibility\"];\n\t\t_group setGroupIconParams [_color, _text, _scale * 1.25, _visibility];\n\t};\n}];\n\n// remove the hint whenever the mouse is leaving the icon area (2D/3D)\naddMissionEventHandler [\"GroupIconOverLeave\",\n{\n\tparams\n\t[\n\t\t\"_is3D\", \"_group\", \"_waypointId\",\n\t\t\"_posX\", \"_posY\",\n\t\t\"_shift\", \"_control\", \"_alt\"\n\t];\n\thintSilent \"\";\n\n\tif (_group getVariable [\"IconEnlarged\", false]) then\n\t{\n\t\t_group setVariable [\"IconEnlarged\", false];\n\n\t\tgetGroupIconParams _group params [\"_color\", \"_text\", \"_scale\", \"_visibility\"];\n\t\t_group setGroupIconParams [_color, _text, linearConversion [1, 15, count units _group, 0.5, 2, true], _visibility];\n\t};\n}];\n\n// delete group and its units when clicking on the icon\naddMissionEventHandler [\"GroupIconClick\",\n{\n\tparams\n\t[\n\t\t\"_is3D\", \"_group\", \"_waypointId\",\n\t\t\"_mouseButton\", \"_posX\", \"_posY\",\n\t\t\"_shift\", \"_control\", \"_alt\"\n\t];\n\n\tif (!_shift && _control && !_alt) then\n\t{\n\t\tunits _group apply {deleteVehicle _x};\n\t\tdeleteGroup _group;\n\t};\n}];"]}],"problems":"The icons will be hidden again after switching to a different unit via teamSwitch. Execute `setGroupIconsVisible [true, true]; setGroupIconsSelectable true;` to make them visible again.","see_also":["clearGroupIcons","getGroupIcon","getGroupIcons","getGroupIconParams","groupIconSelectable","groupIconsVisible","onGroupIconClick","removeGroupIcon","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible"]},{"name":"addHandgunItem","title":"addHandgunItem","type":"command","url":"https://community.bistudio.com/wiki/addHandgunItem","revid":320941,"updated":"2022-05-13T10:04:43Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Adds weapon item, including magazine, directly to the handgunWeapon. This is used for infantry weapons.","syntaxes":[{"syntax":"unit addHandgunItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player addHandgunItem \"muzzle_snds_L\";"]}],"see_also":["addWeaponItem","removeHandgunItem","removeAllHandgunItems","addPrimaryWeaponItem","addSecondaryWeaponItem","addBinocularItem","weaponsItems","handgunItems","primaryWeaponItems","secondaryWeaponItems","binocularItems"]},{"name":"addHeadgear","title":"addHeadgear","type":"command","url":"https://community.bistudio.com/wiki/addHeadgear","revid":318581,"updated":"2022-05-13T09:21:08Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Creates a headgear item and tries to link it to headgear slot. If slot is occupied with another item, the item in the slot will be replaced.","syntaxes":[{"syntax":"unit addHeadgear item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player addHeadgear \"H_HelmetB\";"]}],"see_also":["headgear","removeHeadgear"]},{"name":"addItem","title":"addItem","type":"command","url":"https://community.bistudio.com/wiki/addItem","revid":369269,"updated":"2024-09-03T18:42:43Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Creates new item and tries to add it into inventory. Inventory must have enough space to accomodate new item or command will fail.The item can also be a weapon or a magazine.","syntaxes":[{"syntax":"unit addItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["// identical to bluforUnit linkItem \"NVGoggles\"\n// addItem then assignItem makes the item go through through inventory storage and fail if storage space was missing\nbluforUnit addItem \"NVGoggles\";\nbluforUnit assignItem \"NVGoggles\";\n\nopforUnit addItem \"NVGoggles_OPFOR\";\nopforUnit assignItem \"NVGoggles_OPFOR\";\n\nindependentUnit addItem \"NVGoggles_INDEP\";\nindependentUnit assignItem \"NVGoggles_INDEP\";"]}],"see_also":["removeItem","assignItem","unassignItem","assignedItems","linkItem","unlinkItem","removeAllAssignedItems","addItemToUniform","addItemToVest","addItemToBackpack"]},{"name":"addItemCargo","title":"addItemCargo","type":"command","url":"https://community.bistudio.com/wiki/addItemCargo","revid":341379,"updated":"2023-05-25T12:43:57Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Creates new items and stores them in given container.\nWorks with items, weapons, magazines, equipment and glasses but not backpacks.\nIn the latter case use addBackpackCargo instead. For the global variant, see addItemCargoGlobal.","syntaxes":[{"syntax":"box addItemCargo [item, count]","params":[{"name":"box","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"},{"name":"count","type":"Number","description":"number of items to add; Arma 3 v2.14 a negative value removes items","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"box"},"right":{"text":"[item, count]"}}],"examples":[{"code":["supplyBox addItemCargo [\"optic_ARCO\", 10];"]}],"see_also":["addItemCargoGlobal","clearItemCargo","addMagazineCargo","addMagazineCargoGlobal","addWeaponCargo","addWeaponCargoGlobal","addBackpackCargo","addBackpackCargoGlobal"],"notes":[{"user":"7erra","date":"2021-11-20T12:27:55Z","text":"Make sure that you are using the classname from CfgWeapons, CfgMagazines or CfgGlasses! Placing an item in Eden Editor places the container of the item, not the item itself.\nTo get the item classname you can open the config of the placed container in the Config Viewer and look for a subclass called \"TransportItems\".\nThe correct classname is stored under `configFile >> \"CfgVehicles\" >> _containerClass >> \"TransportItems\" >> \"some_classname\" >> \"name\"`."}]},{"name":"addItemCargoGlobal","title":"addItemCargoGlobal","type":"command","url":"https://community.bistudio.com/wiki/addItemCargoGlobal","revid":376380,"updated":"2025-10-09T02:13:10Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Global variant of addItemCargo.","syntaxes":[{"syntax":"box addItemCargoGlobal [item, count]","params":[{"name":"box","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"},{"name":"count","type":"Number","description":"number of items to add. Arma 3 v2.14 negative count will remove items.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"box"},"right":{"text":"[item, count]"}}],"examples":[{"code":["supplyBox addItemCargoGlobal [\"optic_Arco\", 10];"]}],"see_also":["addItemCargo","clearItemCargoGlobal","addMagazineCargo","addMagazineCargoGlobal","addWeaponCargo","addWeaponCargoGlobal","addBackpackCargo","addBackpackCargoGlobal"]},{"name":"addItemPool","title":"addItemPool","type":"command","url":"https://community.bistudio.com/wiki/addItemPool","revid":318565,"updated":"2022-05-13T09:21:06Z","groups":["Weapon Pool"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Adds count items of type name into the weapon pool (used in the campaign to transfer items to the next mission)","syntaxes":[{"syntax":"addItemPool [itemName, count]","params":[{"name":"itemName","type":"String","description":"item name","type_expr":"String"},{"name":"count","type":"Number","description":"number of items to add","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[itemName, count]"}}],"examples":[{"code":["addItemPool [\"ItemGPS\", 5];"]}],"see_also":["clearItemPool"]},{"name":"addItemToBackpack","title":"addItemToBackpack","type":"command","url":"https://community.bistudio.com/wiki/addItemToBackpack","revid":318688,"updated":"2022-05-13T09:21:19Z","groups":["Containers"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","locality":{"argument":"global","effect":"global"},"description":"Create new item and store it to soldier's backpack. The item can also be a weapon or a magazine.","syntaxes":[{"syntax":"unit addItemToBackpack item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player addItemToBackpack \"arifle_MXM_Hamr_pointer_F\";"]},{"code":["player addItemToBackpack \"itemGPS\";"]}],"see_also":["addItemToUniform","addItemToVest","backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","removeItemFromBackpack","everyBackpack"]},{"name":"addItemToUniform","title":"addItemToUniform","type":"command","url":"https://community.bistudio.com/wiki/addItemToUniform","revid":318719,"updated":"2022-05-13T09:21:22Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","locality":{"argument":"global","effect":"global"},"description":"Create new item and store it to soldier's uniform. The item can also be a weapon or a magazine.","syntaxes":[{"syntax":"unit addItemToUniform item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player addItemToUniform \"itemGPS\";"]},{"code":["player addItemToUniform \"hgun_Rook40_F\";"]}],"see_also":["removeItemFromUniform","addItemToBackpack","addItemToVest"]},{"name":"addItemToVest","title":"addItemToVest","type":"command","url":"https://community.bistudio.com/wiki/addItemToVest","revid":320961,"updated":"2022-05-13T10:04:50Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","locality":{"argument":"global","effect":"global"},"description":"Create new item and store it to soldier's vest. The item can also be a weapon or a magazine.","syntaxes":[{"syntax":"unit addItemToVest item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player addItemToVest \"itemGPS\";"]},{"code":["player addItemToVest \"hgun_Rook40_F\";"]}],"see_also":["removeItemFromVest","addItemToBackpack","addItemToUniform"]},{"name":"addLiveStats","title":"addLiveStats","type":"command","url":"https://community.bistudio.com/wiki/addLiveStats","revid":318778,"updated":"2022-05-13T09:21:29Z","groups":["System"],"status":"ok","games":{"ofpe":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Adds score to the Xbox Live Statistics score for the given unit (or the commander unit of the given vehicle).","syntaxes":[{"syntax":"unit addLiveStats score","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"score","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"score"}}],"examples":[{"code":["player addLiveStats 10;"]}],"see_also":["setArmoryPoints","unlockAchievement","setStatValue"]},{"name":"addMagazine","title":"addMagazine","type":"command","url":"https://community.bistudio.com/wiki/addMagazine","revid":369393,"updated":"2024-09-03T18:43:18Z","groups":["Unit Inventory"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Adds a magazine to a person. Infantry units can only carry a specific number of magazines, once the magazine slots are filled (or uniform/vest/bagpack are full in Arma 3), any further addMagazine commands are ignored.\nIf class of magazine does not exist, an error message is printed in .rpt:\n\n```sqf\nplayer addMagazine \"dasdsa\"; // .rpt: Given magazine[dasdsa] not found\n```\n\n> [!NOTE]\n> Use addMagazine *before* addWeapon for the weapon to be loaded with the magazine automatically.","syntaxes":[{"syntax":"unitName addMagazine magazineName","note":"Local argument Global effect","params":[{"name":"unitName","type":"Object","description":"person to add the magazines to","type_expr":"Object"},{"name":"magazineName","type":"String","description":"magazine name. See the topic Category:Weapons for reference about possible values.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"magazineName"}},{"syntax":"unitName addMagazine [magazineName, ammoCount]","note":"Arma 2: Operation Arrowhead v1.62 Local argument Global effect\nArma 3 v1.00 Global argument Global effect","since":"arma2oa 1.62","params":[{"name":"unitName","type":"Object","description":"person to add the magazines to","type_expr":"Object"},{"name":"magazineName","type":"String","description":"magazine name. See the topic Category:Weapons for reference about possible values.","type_expr":"String"},{"name":"ammoCount","type":"Number","description":"ammo quantity to be added to magazine. If it goes beyond maximum magazine capacity, the magazine will be given full and not overloaded.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"[magazineName, ammoCount]"}}],"examples":[{"code":["player addMagazine \"30Rnd_556x45_STANAG\";"]},{"text":"```sqf\nplayer addMagazine [\"30Rnd_556x45_STANAG\", 15];            // since Arma 2:OA 1.62\n```","code":["player addMagazine [\"30Rnd_556x45_STANAG\", 15];\t\t\t// since Arma 2:OA 1.62"]},{"text":"```sqf\nnonLocalUnit addMagazine [\"30Rnd_556x45_STANAG\", 15];    // global argument since Arma 3\n```","code":["nonLocalUnit addMagazine [\"30Rnd_556x45_STANAG\", 15];\t// global argument since Arma 3"]},{"text":"```sqf\nplayer addMagazine [\"30Rnd_556x45_STANAG\", 9999];        // will give a 30 rounds magazine anyway\n```","code":["player addMagazine [\"30Rnd_556x45_STANAG\", 9999];\t\t// will give a 30 rounds magazine anyway"]}],"see_also":["addMagazineGlobal","addMagazines","addMagazineCargo","addMagazineCargoGlobal","addMagazinePool","addMagazineTurret","removeMagazine","removeMagazines","addWeapon","loadMagazine"],"notes":[{"user":"Hoz","date":"2006-08-02T06:59:00Z","text":"If the unit has magazines already, you may need to use the commands removeMagazine or removeMagazines to make space for the mags you want to add."},{"user":"PhilippRauch","date":"2010-02-21T20:13:00Z","text":"In turreted vehicles the magazine is added to the first turret with >> primaryGunner = 1; << set in the Vehicles turret config part (and the magazine is ONLY added to the very first turret if more than one is configged with >> primaryGunner = 1; << )."},{"user":"Inkompetent","date":"2010-05-12T20:09:00Z","text":"When wanting to add many magazines to an object's init-line it can be easier to use loops than to just repeat the addMagazine command.\n\nIf you want to add N magazines to an object either of the two below ways are handy, the first for fewer magazines, and the latter when you want to add many since it then is the easiest of the two to read.\n\n```sqf\n{ this addMagazine \"magazineClassName\" } forEach [1,2,3, /*..., */ N];\nfor \"_i\" from 1 to N do { this addMagazine \"magazineClassName\" };\n```"},{"user":"Pisces_72","date":"2017-11-28T13:10:00Z","text":"If adding a magazine to an empty artillery support with this command in Arma 3, use reload. If you do not reload, Artillery calls will not fire rounds, because the AI won't reload automatically (tested with 82mm mortar)"}]},{"name":"addMagazineAmmoCargo","title":"addMagazineAmmoCargo","type":"command","url":"https://community.bistudio.com/wiki/addMagazineAmmoCargo","revid":364935,"updated":"2024-07-01T19:04:37Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global","effect":"global"},"description":"Adds magazines with specified ammo count to the cargo space of a vehicle or a container.","syntaxes":[{"syntax":"cargospace addMagazineAmmoCargo [magazine, quantity, ammocount]","params":[{"name":"cargospace","type":"Object","description":"vehicle or container or weaponholder","type_expr":"Object"},{"name":"magazine","type":"String","description":"magazine class name","type_expr":"String"},{"name":"quantity","type":"Number","description":"number of magazines to add. Arma 3 v2.14 a negative value remove magazines","type_expr":"Number"},{"name":"ammocount","type":"Number","description":"ammo count in each magazine","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"cargospace"},"right":{"text":"[magazine, quantity, ammocount]"}}],"examples":[{"code":["_ammobox addMagazineAmmoCargo [\"30Rnd_65x39_caseless_mag\", 2, 5];"]}],"see_also":["magazinesAmmoCargo","addMagazineCargo","addMagazineGlobal","addMagazine","addMagazines","addMagazinePool","addMagazineTurret","clearMagazineCargo","addWeaponCargo","clearWeaponCargo","addWeaponCargoGlobal","addBackpackCargoGlobal","addItemCargo","addItemCargoGlobal"]},{"name":"addMagazineCargo","title":"addMagazineCargo","type":"command","url":"https://community.bistudio.com/wiki/addMagazineCargo","revid":376381,"updated":"2025-10-09T02:13:28Z","groups":["Containers"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Add magazines to the cargo space of vehicles, which can be taken out by infantry units. Once the magazine cargo space is filled up, any further addMagazineCargo commands are ignored.\n\n> [!NOTE]\n> **Arma 3:** In Arma 3, arguments for this command must be local (Local argument). For the global variant see addMagazineCargoGlobal.","syntaxes":[{"syntax":"vehicleName addMagazineCargo [magazineName, count]","params":[{"name":"vehicleName","type":"Object","description":"vehicle to add the magazines to","type_expr":"Object"},{"name":"magazineName","type":"String","description":"magazine name. See Category:Weapons for reference about possible values.","type_expr":"String"},{"name":"count","type":"Number","description":"number of magazines to add. Arma 3 v2.14 negative count will remove magazines.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"[magazineName, count]"}}],"examples":[{"code":["_truck addMagazineCargo [\"M16\", 5];"]}],"see_also":["addMagazineCargoGlobal","addMagazine","addMagazineGlobal","addMagazines","addMagazinePool","addMagazineTurret","clearMagazineCargo","addWeaponCargo","clearWeaponCargo","getMagazineCargo","addItemCargo","addItemCargoGlobal","addMagazineAmmoCargo"]},{"name":"addMagazineCargoGlobal","title":"addMagazineCargoGlobal","type":"command","url":"https://community.bistudio.com/wiki/addMagazineCargoGlobal","revid":376382,"updated":"2025-10-09T02:13:45Z","groups":["Containers"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Add magazines to the cargo space of vehicles, which can be taken out by infantry units.\n\nMP Synchronized","syntaxes":[{"syntax":"vehicleName addMagazineCargoGlobal [magazineName, count]","params":[{"name":"vehicleName","type":"Object","description":"vehicle to add the magazines to","type_expr":"Object"},{"name":"magazineName","type":"String","description":"magazine name. See Category:Weapons for reference about possible values.","type_expr":"String"},{"name":"count","type":"Number","description":"number of magazines to add. Arma 3 v2.14 negative count will remove magazines.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"[magazineName, count]"}}],"examples":[{"code":["_truck addMagazineCargoGlobal [\"M16\", 5];"]}],"see_also":["addMagazineCargo","addMagazineGlobal","addMagazine","addMagazines","addMagazinePool","addMagazineTurret","clearMagazineCargo","addWeaponCargo","clearWeaponCargo","addWeaponCargoGlobal","addBackpackCargoGlobal","addItemCargo","addItemCargoGlobal","addMagazineAmmoCargo"]},{"name":"addMagazineGlobal","title":"addMagazineGlobal","type":"command","url":"https://community.bistudio.com/wiki/addMagazineGlobal","revid":318776,"updated":"2022-05-13T09:21:28Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.76"},"since":"arma3 0.76","arma3_since":"0.76","locality":{"argument":"global","effect":"global"},"description":"Adds magazine to a unit regardless of locality. This command can also be used to add magazine to a vehicle, like a static gun, for example.","syntaxes":[{"syntax":"unit addMagazineGlobal magazineName","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"magazineName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"magazineName"}}],"examples":[{"code":["player addMagazineGlobal \"30Rnd_65x39_caseless_mag\";"]}],"multiplayer":"Before Arma 3 v2.00 this command was broken in MP and duplicated items per the number of clients.","see_also":["addMagazine","addMagazines","addMagazineCargo","addMagazineCargoGlobal","addMagazinePool","addMagazineTurret","addMagazineAmmoCargo"]},{"name":"addMagazinePool","title":"addMagazinePool","type":"command","url":"https://community.bistudio.com/wiki/addMagazinePool","revid":364168,"updated":"2024-05-05T10:46:43Z","groups":["Weapon Pool"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Adds magazines to the magazine pool, of which the player may choose in the following mission. Available in campaigns only.","syntaxes":[{"syntax":"addMagazinePool [magazineName, count]","params":[{"name":"magazineName","type":"String","description":"magazine class name. See the topic Category:Weapons for reference about possible values.","type_expr":"String"},{"name":"count","type":"Number","description":"number of magazines to add","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[magazineName, count]"}}],"examples":[{"code":["addMagazinePool [\"M16\", 20];"]}],"see_also":["clearMagazinePool","queryMagazinePool"]},{"name":"addMagazines","title":"addMagazines","type":"command","url":"https://community.bistudio.com/wiki/addMagazines","revid":343753,"updated":"2023-07-16T17:29:01Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Adds multiple magazines to the unit. For cargo containers use addMagazineCargoGlobal command.\n\n> [!NOTE]\n> This command is meant to be used on human units. If used on vehicles, this command is Local argument Global effect.","syntaxes":[{"syntax":"unit addMagazines [magazineName, count]","params":[{"name":"unit","type":"Object","description":"a soldier","type_expr":"Object"},{"name":"magazineName","type":"String","type_expr":"String"},{"name":"count","type":"Number","description":"number of magazines","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[magazineName, count]"}}],"examples":[{"code":["player addMagazines [\"30Rnd_65x39_caseless_mag\", 3];"]}],"see_also":["addMagazineGlobal","addMagazine","addMagazineCargo","addMagazineCargoGlobal","addMagazinePool","addMagazineTurret","addMagazineAmmoCargo"]},{"name":"addMagazinesTurret","title":"addMagazinesTurret","type":"command","url":"https://community.bistudio.com/wiki/addMagazinesTurret","revid":377487,"updated":"2026-01-02T06:49:07Z","groups":["Turrets"],"status":"ok","games":{"arma3":"2.20"},"since":"arma3 2.20","arma3_since":"2.20","locality":{"argument":"local","effect":"global"},"description":"Adds given number of a magazine to the given turret. Use turret path `[-1]` for driver's turret.","syntaxes":[{"syntax":"vehicle addMagazinesTurret [magazineName, turretPath, quantity]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"magazineName","type":"String","type_expr":"String"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"},{"name":"quantity","type":"Number","description":"desired number of the magazines","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[magazineName, turretPath, quantity]"}}],"examples":[{"code":["_tank addMagazinesTurret [\"20Rnd_120mmSABOT_M1A2\", [0], 10];"]}],"see_also":["addMagazineTurret","addMagazineGlobal","addMagazine","loadMagazine","addMagazines","addMagazineCargo","addMagazineCargoGlobal","addMagazinePool","magazinesTurret","removeMagazinesTurret","removeMagazineTurret","weaponsTurret","addMagazineAmmoCargo","addWeaponTurret","removeWeaponTurret","turretLocal"]},{"name":"addMagazineTurret","title":"addMagazineTurret","type":"command","url":"https://community.bistudio.com/wiki/addMagazineTurret","revid":377495,"updated":"2026-01-02T06:49:20Z","groups":["Turrets"],"status":"ok","games":{"arma2oa":"1.52","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.52","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Adds a magazine to the turret. Use turret path `[-1]` for driver's turret.\n\n> [!IMPORTANT]\n> Invalid combinations may be created by using this command, for example by adding 20 grenades. In these cases, behaviour is undefined.","syntaxes":[{"syntax":"vehicle addMagazineTurret [magazineName, turretPath, ammoCount]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"magazineName","type":"String","type_expr":"String"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"},{"name":"ammoCount","type":"Number","optional":true,"default":"0","description":"desired ammo count","type_expr":"Number","since":"arma3 1.56","text":"ammoCount: Number - (Optional, default 0) desired ammo count"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[magazineName, turretPath, ammoCount]"}}],"examples":[{"code":["_tank addMagazineTurret [\"SmokeLauncherMag\", [0,0]];"]},{"code":["_tank addMagazineTurret [\"20Rnd_120mmSABOT_M1A2\", [0]];"]},{"code":["_tank addMagazineTurret [\"20Rnd_120mmSABOT_M1A2\", [0], 10]; // add magazine with 10 rounds"]}],"see_also":["addMagazinesTurret","addMagazineGlobal","addMagazine","loadMagazine","addMagazines","addMagazineCargo","addMagazineCargoGlobal","addMagazinePool","magazinesTurret","removeMagazinesTurret","removeMagazineTurret","weaponsTurret","addMagazineAmmoCargo","addWeaponTurret","removeWeaponTurret","turretLocal"]},{"name":"addMenu","title":"addMenu","type":"command","url":"https://community.bistudio.com/wiki/addMenu","revid":363584,"updated":"2024-04-07T14:55:34Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Adds a new menu button. Priority is optional.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map addMenu [text, priority]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"text","type":"String","type_expr":"String"},{"name":"priority","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"map"},"right":{"text":"[text, priority]"}}],"examples":[{"text":"-"}]},{"name":"addMenuItem","title":"addMenuItem","type":"command","url":"https://community.bistudio.com/wiki/addMenuItem","revid":363254,"updated":"2024-03-26T10:51:30Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Creates a new menu item. Menu can be \"file\" or \"view\",index is index,as returned from addMenu command. priority is optional and determines,where in the menu the item will reside (higher priority items first).\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map addMenuItem [menu or index,text,command,priority]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"[menu or index,text,command,priority]","type":"Array","type_expr":"Array"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"map"},"right":{"text":"[menu or index,text,command,priority]"}}],"examples":[{"text":"-"}],"see_also":["Game 2 Editor"]},{"name":"addMissionEventHandler","title":"addMissionEventHandler","type":"command","url":"https://community.bistudio.com/wiki/addMissionEventHandler","revid":377813,"updated":"2026-01-03T04:12:00Z","groups":["Event Handlers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Adds event handler attached to the current mission and returns event handler handle. For the list of available mission event handlers see: Arma 3: Mission Event Handlers","syntaxes":[{"syntax":"addMissionEventHandler [event, expression, arguments]","params":[{"name":"event","type":"String","description":"event name","type_expr":"String"},{"name":"expression","type":"Code or String","description":"expression that will be executed in missionNamespace when event handler fires.\n\n- If the event handler has some data to return upon activation they are stored in the `_this` variable\n- Arma 3 v1.64 the event handler's handle is stored in `_thisEventHandler` variable and is available during event handler code execution\n- Arma 3 v2.04 it is possible to pass additional arguments to the EH code via optional param. The *args* are stored in `_thisArgs` variable\n\n> [!IMPORTANT]\n> Only arguments of simple types get proper serialization. Objects, Groups etc will not serialize and appear as NULLs on game load.\n\n- Arma 3 v2.06 the event's name is available from `_thisEvent` variable","type_expr":"Code | String"},{"name":"arguments","type":"Array of Anything","optional":true,"default":"`[]`","description":"additional arguments to be passed to the EH code. Available during code execution via `_thisArgs` variable.","type_expr":"Array<Anything>","since":"arma3 2.04","text":"arguments: Array of Anything - (Optional, default `[]`) additional arguments to be passed to the EH code. Available during code execution via `_thisArgs` variable."}],"returns":{"type":"Number","type_expr":"Number","description":"the index of the currently added mission event handler is returned"},"form":"unary","right":{"text":"[event, expression, arguments]"}}],"examples":[{"code":["_id = addMissionEventHandler [\"PlayerDisconnected\", { systemChat str _this }];"]},{"code":["_id = addMissionEventHandler [\"EachFrame\", { systemChat str [_thisArgs, time] }, [time]];"]}],"see_also":["removeMissionEventHandler","removeAllMissionEventHandlers","getEventHandlerInfo"]},{"name":"addMPEventHandler","title":"addMPEventHandler","type":"command","url":"https://community.bistudio.com/wiki/addMPEventHandler","revid":369855,"updated":"2024-10-16T13:52:05Z","groups":["Multiplayer","Event Handlers"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Adds a multiplayer event handler (EH) to the given object and returns EH handle. See Event Handlers.\n\n> [!IMPORTANT]\n> A Multiplayer Event Handler is **not** saved in a save file and therefore will not be restored on load - use it accordingly.","syntaxes":[{"syntax":"object addMPEventHandler [type, expression]","params":[{"name":"object","type":"Object","description":"object to monitor","type_expr":"Object"},{"name":"type","type":"String","description":"event handler name","type_expr":"String"},{"name":"expression","type":"String or Code","description":"expression to execute.\nIf EH has some data to return upon event (e.g. the \"MPKilled\" EH will return an array with 2 elements: the killed unit, and the killer), it is passed in `_this` variable.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v.1.64 the EH handle is also stored in `_thisEventHandler` variable and is available during EH code execution.\n\n- Event Handler parameters are accessible via `_this`\n- The Event Handler type is available as `_thisEvent`\n- The Event Handler index is available as `_thisEventHandler`","type_expr":"String | Code"}],"returns":{"type":"Number","type_expr":"Number","description":"event handler index"},"form":"binary","left":{"text":"object"},"right":{"text":"[type, expression]"}}],"examples":[{"code":["_index = player addMPEventHandler [\"MPKilled\", { _this execVM \"playerKilled.sqf\"; }];"]}],"multiplayer":"Multiplayer EHs are added globally to every client and the server will fire on itself and every client upon event.\nThe only exception is the **MPRespawn** EH that one only fires where the respawned unit is local. Make sure to check the EHs' locality in Event Handlers pages.","see_also":["removeMPEventHandler","removeAllMPEventHandlers","getEventHandlerInfo"]},{"name":"addMusicEventHandler","title":"addMusicEventHandler","type":"command","url":"https://community.bistudio.com/wiki/addMusicEventHandler","revid":370195,"updated":"2024-11-06T12:01:24Z","groups":["Event Handlers","Sounds"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Adds playMusic event handler. Returns id of the handler or -1 when failed. Like addMissionEventHandler, the music event handler is attached to the mission.\nSee Arma 3: Event Handlers - Music Event Handlers.","syntaxes":[{"syntax":"addMusicEventHandler [type, function]","params":[{"name":"type","type":"String","description":"\"MusicStart\" or \"MusicStop\"","type_expr":"String"},{"name":"function","type":"String or Code","description":"passed params array is [musicClassname, eventHandlerId] where:\n\n```sqf\nparams [\"_musicClassname\", \"_eventHandlerId\", \"_currentPosition\", \"_totalLength\"];\n```\n\n- musicClassName: String - CfgMusic class name of the music that started\n- eventHandlerId: Number - event handler id (same as returned by addMusicEventHandler usage)\n- Arma 3 v2.18 currentPosition: Number - current playback position in 0..1 range (see getMusicPlayedTime)\n- Arma 3 v2.18 totalLength: Number - track total length in seconds","type_expr":"String | Code"}],"returns":{"type":"Number","type_expr":"Number","description":"event handler id"},"form":"unary","right":{"text":"[type, function]"}}],"examples":[{"code":["private _ehID = addMusicEventHandler [\"MusicStart\", { hint str _this }];"]},{"code":["private _ehID = addMusicEventHandler [\"MusicStop\", { hint str _this }];"]}],"see_also":["removeMusicEventHandler","playMusic","removeAllMusicEventHandlers","getEventHandlerInfo"],"notes":[{"user":"Druid","date":"2013-03-04T13:30:00Z","text":"There are these two types at this time:\n\n- **MusicStart** - It is triggered when the music is started (command playMusic). In variable _this is stored class name from CfgMusic.\n- **MusicStop** - It is triggered when the music is ended (command playMusic). In variable _this is stored class name from CfgMusic."}]},{"name":"addonFiles","title":"addonFiles","type":"command","url":"https://community.bistudio.com/wiki/addonFiles","revid":378237,"updated":"2026-03-20T14:02:49Z","groups":["Mods and Addons"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns a list of files present in the addon.\n\n> [!NOTE]\n> Querying protected `.ebo` addons will return an empty array `[]`.","syntaxes":[{"syntax":"addonFiles [prefix, fileExtension]","params":[{"name":"prefix","type":"String","description":"addon prefix available from allAddonsInfo. Since Arma 3 v2.22 it is possible to also return all files present in a scenario folder from within Eden Editor or Eden preview with the special prefix `$mission`","type_expr":"String"},{"name":"fileExtension","type":"String","optional":true,"description":"file extension to filter results, for example `\".paa\"`","type_expr":"String","text":"fileExtension: String - (Optional) file extension to filter results, for example `\".paa\"`"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"[prefix, fileExtension]"}}],"examples":[{"text":"```sqf\naddonFiles [\"a3\\3den\\\", \".paa\"];\n/*\n    [\n        \"a3\\3den\\data\\attributes\\formation\\ech_left_ca.paa\",\n        \"a3\\3den\\data\\attributes\\formation\\stag_column_ca.paa\",\n        \"a3\\3den\\data\\attributes\\stance\\down_ca.paa\",\n        \"a3\\3den\\data\\cfg3den\\layer\\icondisabled_ca.paa\",\n        \"a3\\3den\\data\\controlsgroups\\diagmousecontrol\\mouse_ca.paa\",\n        ...\n    ]\n*/\n```","code":["addonFiles [\"a3\\3den\\\", \".paa\"];\n/*\n\t[\n\t\t\"a3\\3den\\data\\attributes\\formation\\ech_left_ca.paa\",\n\t\t\"a3\\3den\\data\\attributes\\formation\\stag_column_ca.paa\",\n\t\t\"a3\\3den\\data\\attributes\\stance\\down_ca.paa\",\n\t\t\"a3\\3den\\data\\cfg3den\\layer\\icondisabled_ca.paa\",\n\t\t\"a3\\3den\\data\\controlsgroups\\diagmousecontrol\\mouse_ca.paa\",\n\t\t...\n\t]\n*/"]},{"code":["// Since Arma 3 2.22\naddonFiles [\"$mission\", \".sqf\"];"]}],"see_also":["allAddonsInfo"]},{"name":"addOwnedMine","title":"addOwnedMine","type":"command","url":"https://community.bistudio.com/wiki/addOwnedMine","revid":376880,"updated":"2025-12-15T16:39:34Z","groups":["Mines"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","locality":{"argument":"global","effect":"local"},"description":"Sets ownership of a remotely detonatable mine to a unit. If the unit is a player, an action that allows the player to detonate the mine is added to the action menu.","syntaxes":[{"syntax":"unit addOwnedMine mine","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"mine","type":"Object","description":"the mine object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"mine"}}],"examples":[{"code":["player addOwnedMine _superMine;"]}],"multiplayer":"Multiple players can own the same mine.","see_also":["allMines","createMine","detectedMines","mineActive","getAllOwnedMines","removeOwnedMine","removeAllOwnedMines"]},{"name":"addPlayerScores","title":"addPlayerScores","type":"command","url":"https://community.bistudio.com/wiki/addPlayerScores","revid":376997,"updated":"2026-01-01T08:05:12Z","groups":["Object Manipulation","Multiplayer"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","locality":{"server_exec":true},"description":"MP server only: Adds player score.\n\n|  |  |  |  |  |  |\n|---|---|---|---|---|---|\n| Kill Type | infantry | soft | armor | air | killed |\n| Score Points | 1 | 2 | 3 | 5 | -1 |","syntaxes":[{"syntax":"unit addPlayerScores values","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"values","type":"Array with [killsInfantry, killsSoft, killsArmor, killsAir, score]","description":"Array with [killsInfantry, killsSoft, killsArmor, killsAir, score]\n\n- killsInfantry: Number - number of infantry units killed\n- killsSoft: Number - number of soft vehicles killed\n- killsArmor: Number - number of armored vehicles killed\n- killsAir: Number - number of air vehicles killed\n- score: Number - total score","type_expr":"Array","text":"values: Array with [killsInfantry, killsSoft, killsArmor, killsAir, score]\n\n- killsInfantry: Number - number of infantry units killed\n- killsSoft: Number - number of soft vehicles killed\n- killsArmor: Number - number of armored vehicles killed\n- killsAir: Number - number of air vehicles killed\n- score: Number - total score"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"values"}}],"examples":[{"code":["player addPlayerScores [0, 1, 0, 0, 1];"]}],"see_also":["addScore","addScoreSide","getPlayerScores","score","scoreSide"],"notes":[{"user":"Beno 83au","date":"2017-05-02T01:48:00Z","text":"As this command will add the given number to a player's score, a little bit of thought needs to be given to friendly-fire if it is for something like a deathmatch or a FFA, due to friendly-fire incurring negative points.\nSo to counter this just add 2 points every time a player kills a unit from the same side:\n\n```sqf\nplayer addPlayerScores [2, 0, 0, 0, 0];\n```\n\nThe 2 points will add 1 point to counter the negative friendly-fire point and 1 point to add correctly to the score."}]},{"name":"addPrimaryWeaponItem","title":"addPrimaryWeaponItem","type":"command","url":"https://community.bistudio.com/wiki/addPrimaryWeaponItem","revid":379234,"updated":"2026-10-30T23:10:39Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Adds weapon item, including magazine, directly to the primaryWeapon. This is used for infantry weapons.","syntaxes":[{"syntax":"unit addPrimaryWeaponItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing or Boolean","type_expr":"Nothing | Boolean","description":"false is returned if item can not be added","text":"Nothing or Boolean - **false** is returned if **item** can not be added"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player addPrimaryWeaponItem \"muzzle_snds_H\";"]}],"see_also":["addWeaponItem","removePrimaryWeaponItem","removeAllPrimaryWeaponItems","addSecondaryWeaponItem","addHandgunItem","addBinocularItem","weaponsItems","handgunItems","primaryWeaponItems","secondaryWeaponItems","binocularItems"],"notes":[{"user":"SilentSpike","date":"2014-06-22T23:08:00Z","text":"If the item being added is not supported by the unit's weapon then the command will simply fail silently. The item is also **not** added to the unit's inventory in such a case."}]},{"name":"addPublicVariableEventHandler","title":"addPublicVariableEventHandler","type":"command","url":"https://community.bistudio.com/wiki/addPublicVariableEventHandler","revid":376526,"updated":"2025-10-24T10:02:40Z","groups":["Broken Commands","Event Handlers","Multiplayer","Variables"],"status":"broken","replaced_by":["remoteExec","remoteExecCall"],"games":{"arma1":"1.09","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.09","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"> [!NOTE]\n> This command is deprecated since Arma 3 v1.52 and the introduction of remoteExec and remoteExecCall.\n\nThis event handler will detect if a missionNamespace variable (it is attached to) has been broadcast over network with publicVariable, publicVariableClient or publicVariableServer commands and will execute EH code upon detection.\n\n> [!NOTE]\n> - This EH works **only** in Multiplayer environment\n> - There is **no way** to remove this EH\n> - This EH will not fire on the machine that executed broadcast with publicVariable command, only on the machines that receive the broadcast\n> - The value of broadcast variable can be exactly the same, it is the actual broadcast that triggers EH not the change in variable","syntaxes":[{"syntax":"varName addPublicVariableEventHandler code","params":[{"name":"varName","type":"String","description":"missionNamespace variable name","type_expr":"String"},{"name":"code","type":"Code","description":"by default, the code is executed in missionNamespace. `_this` arguments array is in format [varName, value, target]:\n\n- varName: String - broadcast variable name (same variable name EH is attached to)\n- value: Anything - broadcast variable value\n- target: Object or Group - target the variable got set on with setVariable (see Alternative Syntax)","type_expr":"Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"varName"},"right":{"text":"code"}},{"syntax":"varName addPublicVariableEventHandler [target, code]","since":"arma3 1.46","params":[{"name":"varName","type":"String","description":"name of the variable set on target with setVariable","type_expr":"String"},{"name":"target","type":"Object, Group or Team Member","type_expr":"Object | Group | Team Member"},{"name":"code","type":"Code","type_expr":"Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"varName"},"right":{"text":"[target, code]"}}],"examples":[{"text":"```sqf\n\"publicThis\" addPublicVariableEventHandler {\n    _varName = _this select 0;\n    _value = _this select 1;\n    _target = _this select 2;\n    hint format [\"%1 has been updated to %2 for %3\", _varName, _value, target];\n};\n```","code":["\"publicThis\" addPublicVariableEventHandler {\n\t_varName = _this select 0;\n\t_value = _this select 1;\n\t_target = _this select 2;\n\thint format [\"%1 has been updated to %2 for %3\", _varName, _value, target];\n};"]},{"text":"Client:\n\n```sqf\n\"'^:)123BURP,+=lol\" addPublicVariableEventHandler {hint (\"NUTS are \" + (_this select 1))};\n```\n\nServer:\n\n```sqf\nmissionNamespace setVariable [\"'^:)123BURP,+=lol\", \"craZZZZy\"];\npublicVariable \"'^:)123BURP,+=lol\";\n```","code":["\"'^:)123BURP,+=lol\" addPublicVariableEventHandler {hint (\"NUTS are \" + (_this select 1))};","missionNamespace setVariable [\"'^:)123BURP,+=lol\", \"craZZZZy\"];\npublicVariable \"'^:)123BURP,+=lol\";"]}],"problems":"> [!WARNING]\n> The Alternative Syntax does not work as intended.","see_also":["publicVariable","publicVariableClient","publicVariableServer"],"notes":[{"user":"TeRp","date":"2007-12-22T13:30:00Z","text":"Please note that varName indicates which variable you want to monitor with this eventhandler.\nAs a result, the example eventhandler on this page will only fire when the variable publicThis has been changed,\nbut not if any other variable was changed by any other client via the publicVariable command."},{"user":"MulleDK13","date":"2014-02-27T00:57:00Z","text":"Note on using addPublicVariableEventHandler during initialization: If you need a function to call addPublicVariableEventHandler during initialization, you must use postInit. addPublicVariableEventHandler does not work during preInit."},{"user":"Killzone_Kid","date":"2014-02-27T08:40:00Z","text":"MulleDK13's note above needs some clarification. You don't \"must\" use postInit and you absolutely can use preInit function to initialise addPublicVariableEventHandler if you start scheduled script from it.\n\n```sqf\n// script with preInit = 1; in CfgFunctions\n0 spawn {\n    \"someVar\" addPublicVariableEventHandler {\n        // yourcode\n    };\n};\n```"},{"user":"SilentSpike","date":"2015-11-23T21:36:00Z","text":"While it is true that the event handler will only fire on the machine receiving the broadcast value, please note that this machine can actually be the same machine broadcasting it in the cases of publicVariableClient and publicVariableServer.\n\nExamples:\n\n```sqf\nif (isServer) then\n{\n    \"OnServer\" addPublicVariableEventHandler { hint \"This event handler still fired!\"; };\n    publicVariableServer \"OnServer\";\n};\n```\n\n```sqf\n// This example assumes the client knows their own client ID\n// It does also work on the server (when the server ID is used) irrespective of the command name\n\n\"OnClient\" addPublicVariableEventHandler { hint \"This event handler still fired!\"; };\nclientID publicVariableClient \"OnClient\";\n```"}]},{"name":"addRating","title":"addRating","type":"command","url":"https://community.bistudio.com/wiki/addRating","revid":353042,"updated":"2024-03-12T12:07:04Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Add a number to the rating of a unit - negative values can be used to reduce the rating.\nThis command is usually used to reward for completed mission objectives.The rating is given at the end of the mission and is automatically adjusted when killing enemies or friendlies.\nWhen the rating gets below -2000, the unit's side switches to sideEnemy and the unit is attacked by everyone.\n\n> [!NOTE]\n> See also ArmA: Armed Assault: Rating Values and Arma 3: Event Handlers - HandleRating.","syntaxes":[{"syntax":"unitName addRating rating","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"rating","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"rating"}}],"examples":[{"code":["player addRating 2000;"]},{"text":"Set the rating to a specific value:\n\n```sqf\nprivate _wantedRating = 9001;\nplayer addRating (_wantedRating - rating player);\n```","code":["private _wantedRating = 9001;\nplayer addRating (_wantedRating - rating player);"]}],"see_also":["Side Relations","ArmA: Rating Values","rating","rank","setUnitRank","sideEnemy"]},{"name":"addResources","title":"addResources","type":"command","url":"https://community.bistudio.com/wiki/addResources","revid":351337,"updated":"2023-11-27T10:06:14Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Adds resources to a team member.","syntaxes":[{"syntax":"teamMember addResources [resource1, resource2, ...]","params":[{"name":"teamMember","type":"Team Member","type_expr":"Team Member"},{"name":"resourceN","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"teamMember"},"right":{"text":"[resource1, resource2, ...]"}}],"see_also":["resources","deleteResources"]},{"name":"addScore","title":"addScore","type":"command","url":"https://community.bistudio.com/wiki/addScore","revid":310138,"updated":"2022-05-05T12:27:54Z","groups":["Multiplayer"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global","server_exec":true},"description":"Adds a number to the score of a unit. Negative values will remove from the score.","syntaxes":[{"syntax":"unit addScore score","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"score","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"score"}}],"examples":[{"code":["unit addScore 10;"]},{"code":["unit addScore -1337; // reduce the unit's score by 1337 points"]}],"multiplayer":"Server execution only","see_also":["score","scoreSide","addScoreSide","getPlayerScores","Arma 3: Event Handlers"]},{"name":"addScoreSide","title":"addScoreSide","type":"command","url":"https://community.bistudio.com/wiki/addScoreSide","revid":318736,"updated":"2022-05-13T09:21:24Z","groups":["Sides","Multiplayer"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","locality":{"argument":"global","effect":"global","server_exec":true},"description":"Adds side score. This is shown in the MP score tab as the total score. **MP only**.","syntaxes":[{"syntax":"side addScoreSide value","params":[{"name":"side","type":"Side","type_expr":"Side"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"side"},"right":{"text":"value"}}],"examples":[{"code":["west addScoreSide 10;"]}],"see_also":["score","addScore","scoreSide","getPlayerScores"]},{"name":"addSecondaryWeaponItem","title":"addSecondaryWeaponItem","type":"command","url":"https://community.bistudio.com/wiki/addSecondaryWeaponItem","revid":318671,"updated":"2022-05-13T09:21:17Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Adds weapon item, including magazine, directly to the secondaryWeapon. This is used for infantry weapons.","syntaxes":[{"syntax":"unit addSecondaryWeaponItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player addSecondaryWeaponItem \"muzzle_snds_L\";"]}],"see_also":["addWeaponItem","addPrimaryWeaponItem","addHandgunItem","addBinocularItem","weaponsItems","handgunItems","primaryWeaponItems","secondaryWeaponItems","binocularItems"]},{"name":"addSwitchableUnit","title":"addSwitchableUnit","type":"command","url":"https://community.bistudio.com/wiki/addSwitchableUnit","revid":325232,"updated":"2022-07-04T10:32:04Z","groups":["Team Switch"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Adds a unit to the list of units available for Team Switch. Units marked as playable in editor are automatically switchable.\nThis command adds non-playable unit into array of switchableUnits and makes them available for teamSwitch. **Singleplayer only!**","syntaxes":[{"syntax":"addSwitchableUnit unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["addSwitchableUnit bob;"]}],"see_also":["teamSwitch","removeSwitchableUnit","switchableUnits"]},{"name":"addTeamMember","title":"addTeamMember","type":"command","url":"https://community.bistudio.com/wiki/addTeamMember","revid":310084,"updated":"2022-05-05T12:25:11Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Add given member to given team. Effect is local, unless both member and team are local to PC on which command is executed, then effect is global.\n\nThe same Team Member can be member of several different teams at the same time.","syntaxes":[{"syntax":"team addTeamMember member","params":[{"name":"team","type":"Team Member","type_expr":"Team Member"},{"name":"member","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"team"},"right":{"text":"member"}}],"examples":[{"code":["_team addTeamMember _teamMember;"]}],"see_also":["createTeam","deleteTeam","forEachMemberTeam","removeTeamMember","teamMember","teamName","teams","teamType","forEachMember","forEachMemberAgent"]},{"name":"addToRemainsCollector","title":"addToRemainsCollector","type":"command","url":"https://community.bistudio.com/wiki/addToRemainsCollector","revid":353431,"updated":"2024-03-18T11:57:19Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global","effect":"global"},"description":"Adds an array of vehicles/units to disposal manager for automatic wreck/body removal. The disposal manager follows wreck/body removal values set in description.ext","syntaxes":[{"syntax":"addToRemainsCollector remains","params":[{"name":"remains","type":"Array of Objects","description":"array of vehicles/units","type_expr":"Array<Object>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"remains"}}],"examples":[{"code":["addToRemainsCollector [unit1, unit2, vehicle1];"]}],"see_also":["removeFromRemainsCollector","isInRemainsCollector","diag_remainsCollector"]},{"name":"addTorque","title":"addTorque","type":"command","url":"https://community.bistudio.com/wiki/addTorque","revid":377433,"updated":"2026-01-02T06:46:20Z","groups":["PhysX"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","locality":{"argument":"global","effect":"global"},"description":"Applies torque (rotation momentum) to the center of mass of the given object. Torque force is defined as vector [x, y, z] applied in world space. If you need to define torque in model space, convert the torque vector first by vectorModelToWorld or vectorModelToWorldVisual command. The torque applied as impulse. Diagram below explain which way the object would rotate. For more information see [NVIDIA docs](http://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/apireference/files/classPxRigidBody.html#acb04ffc816d45afff2d04e93d7446e79)\n\n> [!NOTE]\n> A single application of torque would produce one impulse, which may not be enough. In this case consider applying a series of continuous impulses, for example to make a quad bike to roll forward:\n>\n> ```sqf\n> onEachFrame { quad addTorque (quad vectorModelToWorld [100,0,0]) };\n> ```\n\n> [!IMPORTANT]\n> This command doesn't follow convention for torque direction, which obeys right-hand rule. To comply, negate all values in the vector.","syntaxes":[{"syntax":"object addTorque torque","params":[{"name":"object","type":"Object","description":"PhysX object","type_expr":"Object"},{"name":"torque","type":"Vector3D","description":"world vector in format [x,y,z]","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"torque"}}],"examples":[{"text":"Apply torque [1000,0,0] to object not factoring object positioning:\n\n```sqf\n_wheel addTorque [1000,0,0];\n```","code":["_wheel addTorque [1000,0,0];"]},{"text":"Apply torque [1000,0,0] relative to object:\n\n```sqf\n_wheel addTorque (_wheel vectorModelToWorld [1000,0,0]);\n```","code":["_wheel addTorque (_wheel vectorModelToWorld [1000,0,0]);"]}],"see_also":["addForce","awake","isAwake","vectorModelToWorld","vectorModelToWorldVisual","disableBrakes","brakesDisabled"]},{"name":"addUniform","title":"addUniform","type":"command","url":"https://community.bistudio.com/wiki/addUniform","revid":318775,"updated":"2022-05-13T09:21:28Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Create a new uniform and try to link it into uniform slot (given uniform has to be supported by allowedUniforms list of target soldier).\n\n> [!NOTE]\n> To check if a uniform is allowed use isUniformAllowed, and to force an incompatible uniform use forceAddUniform.","syntaxes":[{"syntax":"unit addUniform type","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"type","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"type"}}],"examples":[{"code":["_unit addUniform \"U_B_CombatUniform_mcam\";"]}],"see_also":["forceAddUniform","isUniformAllowed","removeUniform","uniform"]},{"name":"addUserActionEventHandler","title":"addUserActionEventHandler","type":"command","url":"https://community.bistudio.com/wiki/addUserActionEventHandler","revid":378187,"updated":"2026-03-10T13:05:46Z","groups":["Event Handlers"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"effect":"local"},"description":"Adds a user action event handler to the current mission and returns its event handler index.","syntaxes":[{"syntax":"addUserActionEventHandler [keyName, event, expression]","params":[{"name":"keyName","type":"String","description":"action key name - see inputAction/actions","type_expr":"String"},{"name":"event","type":"String","description":"event name - see UserAction Event Handlers. Can be one of:\n\n- `\"Activate\"`\n- `\"Deactivate\"`\n- `\"Analog\"`","type_expr":"String"},{"name":"expression","type":"Code","description":"expression that will be executed in missionNamespace when event handler fires.\n\n- `_thisEventHandler` returns the event handler index\n- `_thisEvent` returns the event type (the *event* parameter, either `\"Activate\"`, `\"Deactivate\"` or `\"Analog\"`)","type_expr":"Code"}],"returns":{"type":"Number","type_expr":"Number","description":"the index of the currently added UserAction event handler is returned"},"form":"unary","right":{"text":"[keyName, event, expression]"}}],"examples":[{"code":["private _ehId = addUserActionEventHandler [\"ReloadMagazine\", \"Activate\", { systemChat \"reloading!\"; }];"]}],"see_also":["removeUserActionEventHandler","removeAllUserActionEventHandlers","Arma 3: Event Handlers"]},{"name":"addVehicle","title":"addVehicle","type":"command","url":"https://community.bistudio.com/wiki/addVehicle","revid":330327,"updated":"2022-08-31T15:18:42Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.05","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.05","arma3_since":"0.50","locality":{"argument":"local"},"description":"Adds a specified vehicle for use by a specified AI led group.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"groupName addVehicle vehicleName","params":[{"name":"groupName","type":"Group","type_expr":"Group"},{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"groupName"},"right":{"text":"vehicleName"}}],"examples":[{"code":["_grp addVehicle _vehicle;"]},{"text":"Using on crewed vehicle:\n\n```sqf\ngroup tank addVehicle tank;\n```","code":["group tank addVehicle tank;"]}],"see_also":["leaveVehicle","unassignVehicle","createVehicleCrew","assignedVehicles","assignedGroup","fullCrew"]},{"name":"addVest","title":"addVest","type":"command","url":"https://community.bistudio.com/wiki/addVest","revid":318741,"updated":"2022-05-13T09:21:24Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Create a new vest and try to link it into vest slot.","syntaxes":[{"syntax":"unit addVest type","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"type","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"type"}}],"examples":[{"code":["player addVest \"V_TacVest_blk_POLICE\";"]}],"see_also":["removeVest","vest"]},{"name":"addWaypoint","title":"addWaypoint","type":"command","url":"https://community.bistudio.com/wiki/addWaypoint","revid":377574,"updated":"2026-01-02T06:56:28Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Adds (or inserts when index is given) a new waypoint to a group.\n\nThe waypoint is placed randomly within a circle with the given center and radius.\n\n> [!NOTE]\n> For older titles and prior to Arma 3 v1.90, use setWaypointPosition if you need exact waypoint placement.","syntaxes":[{"syntax":"groupName addWaypoint [center, radius, index, name]","params":[{"name":"groupName","type":"Group","type_expr":"Group"},{"name":"center","type":"PositionAGL (PositionASL if radius is negative!) or Object","type_expr":"PositionAGL | PositionASL | Object","text":"center: PositionAGL (PositionASL if *radius* is negative!) or Object"},{"name":"radius","type":"Number","description":"random waypoint placement within *radius* from *center*; Arma 3 v1.90 -1 can be used for exact waypoint placement","type_expr":"Number"},{"name":"index","type":"Number","optional":true,"default":"-1","description":"can be used to insert a waypoint in between existing waypoints; if it is invalid, the waypoint will be added at the end","type_expr":"Number","text":"index: Number - (Optional, default -1) can be used to insert a waypoint in between existing waypoints; if it is invalid, the waypoint will be added at the end"},{"name":"name","type":"String","optional":true,"default":"\"\"","description":"waypointName","type_expr":"String","text":"name: String - (Optional, default \"\") waypointName"}],"returns":{"type":"Waypoint","type_expr":"Waypoint"},"form":"binary","left":{"text":"groupName"},"right":{"text":"[center, radius, index, name]"}}],"examples":[{"code":["_wp = _grp addWaypoint [position player, 0];"]},{"text":"```sqf\n_wp = _grp addWaypoint [position player, 0];            // imprecise, placed like setVehiclePosition's \"NONE\" placement\n_wp setWaypointPosition [getPosASL player, -1];            // from Operation Flashpoint: Elite to Arma 3 v1.88\n\nprivate _wp = _grp addWaypoint [getPosASL player, -1];    // Arma 3 v1.90+: precise placement\n```","code":["_wp = _grp addWaypoint [position player, 0];\t\t\t// imprecise, placed like setVehiclePosition's \"NONE\" placement\n_wp setWaypointPosition [getPosASL player, -1];\t\t\t// from Operation Flashpoint: Elite to Arma 3 v1.88\n\nprivate _wp = _grp addWaypoint [getPosASL player, -1];\t// Arma 3 v1.90+: precise placement"]}],"see_also":["waypoints","createGuardedPoint","deleteWaypoint","copyWaypoints","move","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointHousePosition","setWaypointPosition","currentWaypoint","waypointName","waypointSpeed","setWPPos"],"notes":[{"user":"Tijmenjoppe","date":"2009-11-26T18:07:00Z","text":"In game versions prior to Arma 3 v1.22:\nIf you add a waypoint to your group and then want them to start moving to that waypoint, make sure to call setWaypointType \"MOVE\" on your waypoint."},{"user":"Giova","date":"2014-06-21T22:38:00Z","text":"if you want to create a waypoint of type \"MOVE\" and set it as actual waypoint, you can use the move command that does everything for you with only one line of code !\nBe aware that move command intercepts multiple waypoints and it will not line up in waypoints queue.\nIn other word it is a quick solution if you want your group to get only one waypoint, but for several waypoints you'll have to use addwaypoint and all setwaypointXXXXXX commands around.\nsee move command."},{"user":"OdinViking","date":"2014-08-05T01:49:00Z","text":"The waypoint may not be created exactly at the center position even if radius is zero. The position will be moved away if there are e.g. rocks at the center position or if it is placed at the edge of water on a shore."}]},{"name":"addWeapon","title":"addWeapon","type":"command","url":"https://community.bistudio.com/wiki/addWeapon","revid":373145,"updated":"2025-04-04T06:14:28Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Add a weapon to a unit. For a global version of this command see addWeaponGlobal.\n\nInfantry units can only carry a specific number of weapons, once the weapon slots are filled, any further addWeapon commands are ignored.\n\n> [!NOTE]\n> a **magazine** must be added first for the added weapon to be loaded.\n\n> [!WARNING]\n> In Arma 3 this command can also link items to the inventory slots, the functionality is identical to linkItem command, which it global and thus differ in how it should be used.","syntaxes":[{"syntax":"object addWeapon weapon","params":[{"name":"object","type":"Object","description":"unit or vehicle to add the weapon to","type_expr":"Object"},{"name":"weapon","type":"String","description":"weapon class name. See the topic Category:Weapons for reference about possible values.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"weapon"}},{"syntax":"object addWeapon [weapon, autoselect]","since":"arma3 2.20","params":[{"name":"object","type":"Object","description":"unit or vehicle to add the weapon to","type_expr":"Object"},{"name":"weapon","type":"String","description":"weapon class name. See the topic Category:Weapons for reference about possible values.","type_expr":"String"},{"name":"autoselect","type":"String","optional":true,"default":"true","description":"false to abort weapon autoselection if no weapon was selected.","type_expr":"String","text":"autoselect: String - (Optional, default true) false to abort weapon autoselection if no weapon was selected."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[weapon, autoselect]"}}],"examples":[{"code":["player addMagazine \"30Rnd_556x45_Stanag\";\nplayer addWeapon \"BAF_L85A2_RIS_SUSAT\";"]},{"code":["An_2 addMagazine \"100Rnd_762x51_M240\";\nAn_2 addWeapon \"M240_veh\";"]}],"see_also":["addWeaponGlobal","addWeaponTurret","removeWeapon","removeAllWeapons","addMagazine"]},{"name":"addWeaponCargo","title":"addWeaponCargo","type":"command","url":"https://community.bistudio.com/wiki/addWeaponCargo","revid":376383,"updated":"2025-10-09T02:14:03Z","groups":["Containers"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Add weapons to the cargo space of vehicles, which can be taken out by infantry units. Ignores available cargo space.\n\n> [!NOTE]\n> **Arma 3:** In Arma 3, arguments for this command must be local (Local argument). For global variant see addWeaponCargoGlobal.","syntaxes":[{"syntax":"vehicleName addWeaponCargo [weaponName, count]","params":[{"name":"vehicleName","type":"Object","description":"vehicle to which add the weapons","type_expr":"Object"},{"name":"weaponName","type":"String","description":"weapon name. See Category:Weapons for reference about possible values","type_expr":"String"},{"name":"count","type":"Number","description":"number of weapons to add. Arma 3 v2.14 negative count will remove weapons.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"[weaponName, count]"}}],"examples":[{"code":["_truck addWeaponCargo [\"M16\", 5];"]}],"see_also":["addWeaponCargoGlobal","addMagazineCargo","addMagazineCargoGlobal","clearMagazineCargo","clearWeaponCargo","getWeaponCargo","addItemCargo","addItemCargoGlobal","addBackpackCargo","addBackpackCargoGlobal","addWeaponWithAttachmentsCargo"],"notes":[{"user":"Galzohar","date":"2010-07-10T11:02:00Z","text":"When players add/remove gear directly via the gear menu that gear is synchronized across the network. Since this command is local only, using it during a mission can cause all sorts of weird issues. To get proper synchronization use this command in the object's init line or in a script called from its init line with a **call compile preprocessFile** command (and *not* **execVM**)."}]},{"name":"addWeaponCargoGlobal","title":"addWeaponCargoGlobal","type":"command","url":"https://community.bistudio.com/wiki/addWeaponCargoGlobal","revid":376384,"updated":"2025-10-09T02:14:17Z","groups":["Containers"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Add weapons to the cargo space of vehicles, which can be taken out by infantry units.","syntaxes":[{"syntax":"vehicleName addWeaponCargoGlobal [weaponName, count]","params":[{"name":"vehicleName","type":"Object","description":"vehicle to which add the weapons","type_expr":"Object"},{"name":"weaponName","type":"String","description":"weapon name. See the topic Category:Weapons for reference about possible values","type_expr":"String"},{"name":"count","type":"Number","description":"number of weapons to add. Arma 3 v2.14 negative count will remove weapons.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"[weaponName, count]"}}],"examples":[{"code":["_truck addWeaponCargoGlobal [\"M16\", 5];"]}],"see_also":["addMagazineCargo","clearMagazineCargo","clearWeaponCargo","addMagazineCargoGlobal","addBackpackCargo","addBackpackCargoGlobal","addItemCargo","addItemCargoGlobal","addWeaponWithAttachmentsCargoGlobal"]},{"name":"addWeaponGlobal","title":"addWeaponGlobal","type":"command","url":"https://community.bistudio.com/wiki/addWeaponGlobal","revid":373148,"updated":"2025-04-04T06:15:52Z","groups":["Vehicle Inventory","Unit Inventory"],"status":"ok","games":{"arma3":"0.76"},"since":"arma3 0.76","arma3_since":"0.76","locality":{"argument":"global","effect":"global"},"description":"Add a weapon to a unit. Infantry units can only carry weapons in their respective slots (primary, secondary and handgun),\nthe addWeaponGlobal command will replace the weapon currently in a slot with the added weapon if it shares the same slot.\nThis command can link items to respective slots as well, in which case the functionality is identical to linkItem.\n\nTo make sure the added weapon is loaded and ready, add the magazine first.\n\n> [!NOTE]\n> This command was broken when used on dedicated server and fixed on Arma 3 v2.00.","syntaxes":[{"syntax":"object addWeaponGlobal weapon","params":[{"name":"object","type":"Object","description":"unit or vehicle to add the weapon to","type_expr":"Object","text":"object : Object - unit or vehicle to add the weapon to"},{"name":"weapon","type":"String","description":"weapon class name","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"weapon"}},{"syntax":"object addWeaponGlobal [weapon, autoselect]","since":"arma3 2.20","params":[{"name":"object","type":"Object","description":"unit or vehicle to add the weapon to","type_expr":"Object"},{"name":"weapon","type":"String","description":"weapon class name. See the topic Category:Weapons for reference about possible values.","type_expr":"String"},{"name":"autoselect","type":"String","optional":true,"default":"true","description":"false to abort weapon autoselection if no weapon was selected.","type_expr":"String","text":"autoselect: String - (Optional, default true) false to abort weapon autoselection if no weapon was selected."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[weapon, autoselect]"}}],"examples":[{"text":"```sqf\n{\n    _x addMagazineGlobal \"Laserbatteries\";\n    _x addWeaponGlobal \"Laserdesignator\";\n} forEach allUnits;\n```","code":["{\n\t_x addMagazineGlobal \"Laserbatteries\";\n\t_x addWeaponGlobal \"Laserdesignator\";\n} forEach allUnits;"]},{"text":"```sqf\n{\n    if (typeOf _x == \"O_Heli_Attack_02_black_F\") then\n    {\n        _x addMagazineGlobal \"38Rnd_80mm_rockets\";\n        _x addWeaponGlobal \"rockets_Skyfire\";\n    };\n} forEach vehicles;\n```","code":["{\n\tif (typeOf _x == \"O_Heli_Attack_02_black_F\") then\n\t{\n\t\t_x addMagazineGlobal \"38Rnd_80mm_rockets\";\n\t\t_x addWeaponGlobal \"rockets_Skyfire\";\n\t};\n} forEach vehicles;"]}],"see_also":["removeWeaponGlobal","addWeapon","addMagazine","addMagazineGlobal"],"notes":[{"user":"Killzone_Kid","date":"2015-07-07T18:42:00Z","text":"If you do not remove weapon first, using this command from dedicated server will duplicate weapon."}]},{"name":"addWeaponItem","title":"addWeaponItem","type":"command","url":"https://community.bistudio.com/wiki/addWeaponItem","revid":376456,"updated":"2025-10-14T21:27:36Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.38"},"since":"arma3 1.38","arma3_since":"1.38","locality":{"argument":"local","effect":"global"},"description":"Adds a weapon item to the specified weapon. The item can be weapon magazine, in which case the amount of ammo and target muzzle could also be specified. Since Arma 3 2.22 it is possible to add a magazine directly into a 'Throw' muzzle provided it is configured with `keepInInventory = 0;`. To remove such magazine see removeWeaponItem.","syntaxes":[{"syntax":"unit addWeaponItem [weaponName, itemName, instant]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"weaponName","type":"String","description":"name of the weapon to add magazine to","type_expr":"String"},{"name":"itemName","type":"String","description":"class name of the item to add (if magazine, muzzle will be autodetected)","type_expr":"String"},{"name":"instant","type":"Boolean","optional":true,"default":"false","description":"true to skip animation","type_expr":"Boolean","since":"arma3 1.96","text":"instant: Boolean - (Optional, default false) true to skip animation"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[weaponName, itemName, instant]"}},{"syntax":"unit addWeaponItem [weaponName, [itemName, ammoCount, muzzleName], instant]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"weaponName","type":"String","description":"name of the weapon to add magazine to","type_expr":"String"},{"name":"itemName","type":"String","description":"class name of the item to add (if magazine, muzzle will be autodetected unless specified)","type_expr":"String"},{"name":"ammoCount","type":"Number","optional":true,"description":"optional amount of ammo in magazine","type_expr":"Number","text":"ammoCount: Number - (Optional) optional amount of ammo in magazine"},{"name":"muzzleName","type":"String","optional":true,"description":"optional target muzzle to add magazine to","type_expr":"String","text":"muzzleName: String - (Optional) optional target muzzle to add magazine to"},{"name":"instant","type":"Boolean","optional":true,"default":"false","description":"true to skip animation","type_expr":"Boolean","since":"arma3 1.96","text":"instant: Boolean - (Optional, default false) true to skip animation"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[weaponName, [itemName, ammoCount, muzzleName], instant]"}}],"examples":[{"code":["player addWeaponItem [\"arifle_MX_GL_ACO_F\", \"1Rnd_HE_Grenade_shell\"];"]},{"code":["player addWeaponItem [\"arifle_MX_GL_ACO_F\", [\"1Rnd_HE_Grenade_shell\", 1, \"GL_3GL_F\"]];"]},{"code":["player addWeaponItem [\"LaserDesignator\", \"LaserBatteries\"];"]}],"see_also":["removeWeaponItem","addPrimaryWeaponItem","addSecondaryWeaponItem","addHandgunItem","addBinocularItem","weaponsItems","handgunItems","primaryWeaponItems","secondaryWeaponItems","binocularItems","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeHandgunItem","removeBinocularItem"]},{"name":"addWeaponPool","title":"addWeaponPool","type":"command","url":"https://community.bistudio.com/wiki/addWeaponPool","revid":364177,"updated":"2024-05-05T10:46:45Z","groups":["Weapon Pool"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Add weapons to the weapon pool, of which the player may choose in the following mission. Available in campaigns only.","syntaxes":[{"syntax":"addWeaponPool [weaponName, count]","params":[{"name":"weaponName","type":"String","description":"weapon name. See the topic Category:Weapons for reference about possible values.","type_expr":"String"},{"name":"count","type":"Number","description":"number of weapons to add","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[weaponName, count]"}}],"examples":[{"code":["addWeaponPool [\"M16\",5];"]}],"see_also":["addMagazinePool","clearWeaponPool","queryWeaponPool","addMagazineAmmoCargo"]},{"name":"addWeaponTurret","title":"addWeaponTurret","type":"command","url":"https://community.bistudio.com/wiki/addWeaponTurret","revid":377484,"updated":"2026-01-02T06:49:02Z","groups":["Turrets"],"status":"ok","games":{"arma3":"1.32","arma2oa":"1.64"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"local","effect":"global"},"description":"Adds a weapon to the turret. Use turret path [-1] for driver's turret.","syntaxes":[{"syntax":"vehicle addWeaponTurret [weaponName, turretPath]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"weaponName","type":"String","type_expr":"String"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[weaponName, turretPath]"}}],"examples":[{"code":["_tank addWeaponTurret [\"LMG_M200\", [0,0]];"]}],"see_also":["removeWeaponTurret","turretLocal","addMagazineTurret","magazinesTurret","removeMagazinesTurret","removeMagazineTurret","weaponsTurret","currentMagazineDetailTurret","currentMagazineTurret","currentWeaponTurret","selectWeaponTurret"],"notes":[{"user":"7erra","date":"2021-06-03T12:05:00Z","text":"You can find out the turret path by entering the turret and checking with\n\n```sqf\nassignedVehicleRole player;\n```"}]},{"name":"addWeaponWithAttachmentsCargo","title":"addWeaponWithAttachmentsCargo","type":"command","url":"https://community.bistudio.com/wiki/addWeaponWithAttachmentsCargo","revid":377612,"updated":"2026-01-02T08:51:35Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"1.94"},"since":"arma3 1.94","arma3_since":"1.94","locality":{"argument":"global","effect":"local"},"description":"Adds a weapon into the cargo space of a vehicle / box with given attachments / magazines. Ignores available cargo space. If the weapon class has any pre-attached items (LinkedItems), they are removed and new items, supplied via command arguments, are added.","syntaxes":[{"syntax":"container addWeaponWithAttachmentsCargo [weaponConfiguration, weaponsCount]","params":[{"name":"container","type":"Object","description":"container to add the weapon to. Might be a backpack, ammobox or vehicle.","type_expr":"Object"},{"name":"weaponConfiguration","type":"Array with [weapon, muzzle, flashlight, optics, primaryMuzzle, secondaryMuzzle, bipod]","description":"- weapon: String - Weapon class name from CfgWeapons\n- muzzle: String - Muzzle attachment class name. Use \"\" if not needed.\n- flashlight: String - Side rail attachment class name. Use \"\" if not needed.\n- optics: String - Top rail attachment class name. Use \"\" if not needed.\n- primaryMuzzle: Array with [primaryMuzzleMagazine, primaryAmmoCount] - Use [] if not needed\n  - primaryMuzzleMagazine: String - Magazine class name\n  - primaryAmmoCount: Number - Ammo count in magazine (will be clipped to values between 0 and the maximum capacity of the magazine class)\n- secondaryMuzzle: Array with [secondaryMuzzleMagazine, secondaryAmmoCount] - Use [] if not needed\n  - secondaryMuzzleMagazine: String - Magazine class name\n  - secondaryAmmoCount: Number - Ammo count in magazine (will be clipped to values between 0 and the maximum capacity of the magazine class)\n- bipod: String - Underbarrel rail attachment class name. Use \"\" if not needed.\n\nThis array has the same format as the array returned by the weaponsItems command.","type_expr":"Array","text":"weaponConfiguration: Array with [weapon, muzzle, flashlight, optics, primaryMuzzle, secondaryMuzzle, bipod]\n\n- weapon: String - Weapon class name from CfgWeapons\n- muzzle: String - Muzzle attachment class name. Use \"\" if not needed.\n- flashlight: String - Side rail attachment class name. Use \"\" if not needed.\n- optics: String - Top rail attachment class name. Use \"\" if not needed.\n- primaryMuzzle: Array with [primaryMuzzleMagazine, primaryAmmoCount] - Use [] if not needed\n  - primaryMuzzleMagazine: String - Magazine class name\n  - primaryAmmoCount: Number - Ammo count in magazine (will be clipped to values between 0 and the maximum capacity of the magazine class)\n- secondaryMuzzle: Array with [secondaryMuzzleMagazine, secondaryAmmoCount] - Use [] if not needed\n  - secondaryMuzzleMagazine: String - Magazine class name\n  - secondaryAmmoCount: Number - Ammo count in magazine (will be clipped to values between 0 and the maximum capacity of the magazine class)\n- bipod: String - Underbarrel rail attachment class name. Use \"\" if not needed.\n\nThis array has the same format as the array returned by the weaponsItems command."},{"name":"weaponsCount","type":"Number","description":"number of weapons to add","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"container"},"right":{"text":"[weaponConfiguration, weaponsCount]"}}],"examples":[{"code":["cursorObject addWeaponWithAttachmentsCargo [[\"arifle_MX_GL_F\", \"muzzle_snds_H\", \"\", \"optic_aco\", [\"30Rnd_65x39_caseless_mag\", 15], [\"3Rnd_HE_Grenade_shell\", 2], \"\"], 2];"]},{"text":"Add five MX GL rifles, each with flashlight side attachment, a full 30 rounds magazine loaded into the gun and a full 3Rnd HE grenade magazine loaded into the grenade launcher:\n\n```sqf\ncursorObject addWeaponWithAttachmentsCargo [[\"arifle_MX_GL_F\", \"\", \"acc_flashlight\", \"\", [\"30Rnd_65x39_caseless_mag\", 30], [\"3Rnd_HE_Grenade_shell\", 2], \"\"], 5];\n```","code":["cursorObject addWeaponWithAttachmentsCargo [[\"arifle_MX_GL_F\", \"\", \"acc_flashlight\", \"\", [\"30Rnd_65x39_caseless_mag\", 30], [\"3Rnd_HE_Grenade_shell\", 2], \"\"], 5];"]},{"text":"Add one MX rifle without any attachments or magazines event though the class has linked items:\n\n```sqf\ncursorObject addWeaponWithAttachmentsCargo [[\"arifle_MX_Holo_pointer_F\", \"\", \"\", \"\", [], [], \"\"], 1];\n```","code":["cursorObject addWeaponWithAttachmentsCargo [[\"arifle_MX_Holo_pointer_F\", \"\", \"\", \"\", [], [], \"\"], 1];"]},{"text":"Add all weapons on player with attachments:\n\n```sqf\n{ cursorObject addWeaponWithAttachmentsCargo [_x, 1] } forEach weaponsItems player;\n```","code":["{ cursorObject addWeaponWithAttachmentsCargo [_x, 1] } forEach weaponsItems player;"]}],"see_also":["addWeaponWithAttachmentsCargoGlobal","weaponsItems","addWeaponCargo","addWeaponCargoGlobal","clearWeaponCargo","getWeaponCargo"],"notes":[{"user":"Andrew_S90","date":"2020-10-28T21:03:00Z","text":"This command also allows you to add a weapon with attachments directly to the players backpack.\n\n```sqf\n(backpackContainer player) addWeaponWithAttachmentsCargo [[\"arifle_MX_F\",\"muzzle_snds_H\",\"acc_pointer_IR\",\"optic_Hamr\",[\"30Rnd_65x39_caseless_mag\",30],[],\"bipod_03_F_blk\"], 1];\n```"},{"user":"DreadedEntity","date":"2022-04-02T02:52:00Z","text":"This command will let you add millions of weapons across multiple vehicles, but be warned, weird things start happening in-game:\n\n```sqf\n(vehicle player) addWeaponWithAttachmentsCargoGlobal [[\"arifle_MX_F\",\"\",\"\",\"\",[],[],\"\"],1000000];\n```\n\nI don't recommend running the above too many times in the console"}]},{"name":"addWeaponWithAttachmentsCargoGlobal","title":"addWeaponWithAttachmentsCargoGlobal","type":"command","url":"https://community.bistudio.com/wiki/addWeaponWithAttachmentsCargoGlobal","revid":377640,"updated":"2026-01-02T08:52:38Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"1.94"},"since":"arma3 1.94","arma3_since":"1.94","locality":{"argument":"global","effect":"global"},"description":"Adds a weapon into the cargo space of a vehicle / box with given attachments / magazines. Ignores available cargo space. If the weapon class has any pre-attached items (LinkedItems), they are removed and new items, supplied via command arguments, are added.","syntaxes":[{"syntax":"container addWeaponWithAttachmentsCargoGlobal [weaponConfiguration, weaponsCount]","params":[{"name":"container","type":"Object","description":"container to add the weapon to. Might be a backpack, ammobox or vehicle.","type_expr":"Object"},{"name":"weaponConfiguration","type":"Array with [weapon, muzzle, flashlight, optics, primaryMuzzle, secondaryMuzzle, bipod]","description":"- weapon: String - Weapon class name from CfgWeapons\n- muzzle: String - Muzzle attachment class name. Use \"\" if not needed.\n- flashlight: String - Side rail attachment class name. Use \"\" if not needed.\n- optics: String - Top rail attachment class name. Use \"\" if not needed.\n- primaryMuzzle: Array with [primaryMuzzleMagazine, primaryAmmoCount] - Use [] if not needed\n  - primaryMuzzleMagazine: String - Magazine class name\n  - primaryAmmoCount: Number - Ammo count in magazine (will be clipped to values between 0 and the maximum capacity of the magazine class)\n- secondaryMuzzle: Array with [secondaryMuzzleMagazine, secondaryAmmoCount] - Use [] if not needed\n  - secondaryMuzzleMagazine: String - Magazine class name\n  - secondaryAmmoCount: Number - Ammo count in magazine (will be clipped to values between 0 and the maximum capacity of the magazine class)\n- bipod: String - Underbarrel rail attachment class name. Use \"\" if not needed.\n\nThis array has the same format as the array returned by the weaponsItems command.","type_expr":"Array","text":"weaponConfiguration: Array with [weapon, muzzle, flashlight, optics, primaryMuzzle, secondaryMuzzle, bipod]\n\n- weapon: String - Weapon class name from CfgWeapons\n- muzzle: String - Muzzle attachment class name. Use \"\" if not needed.\n- flashlight: String - Side rail attachment class name. Use \"\" if not needed.\n- optics: String - Top rail attachment class name. Use \"\" if not needed.\n- primaryMuzzle: Array with [primaryMuzzleMagazine, primaryAmmoCount] - Use [] if not needed\n  - primaryMuzzleMagazine: String - Magazine class name\n  - primaryAmmoCount: Number - Ammo count in magazine (will be clipped to values between 0 and the maximum capacity of the magazine class)\n- secondaryMuzzle: Array with [secondaryMuzzleMagazine, secondaryAmmoCount] - Use [] if not needed\n  - secondaryMuzzleMagazine: String - Magazine class name\n  - secondaryAmmoCount: Number - Ammo count in magazine (will be clipped to values between 0 and the maximum capacity of the magazine class)\n- bipod: String - Underbarrel rail attachment class name. Use \"\" if not needed.\n\nThis array has the same format as the array returned by the weaponsItems command."},{"name":"weaponsCount","type":"Number","description":"number of weapons to add","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"container"},"right":{"text":"[weaponConfiguration, weaponsCount]"}}],"examples":[{"code":["cursorObject addWeaponWithAttachmentsCargoGlobal [[\"arifle_MX_GL_F\", \"muzzle_snds_H\", \"\", \"optic_aco\", [\"30Rnd_65x39_caseless_mag\", 15], [\"3Rnd_HE_Grenade_shell\", 2], \"\"], 2];"]},{"text":"Add five MX GL rifles, each with flashlight side attachment, a full 30 rounds magazine loaded into the gun and a full 3Rnd HE grenade magazine loaded into the grenade launcher:\n\n```sqf\ncursorObject addWeaponWithAttachmentsCargoGlobal [[\"arifle_MX_GL_F\", \"\", \"acc_flashlight\", \"\", [\"30Rnd_65x39_caseless_mag\", 30], [\"3Rnd_HE_Grenade_shell\", 2], \"\"], 5];\n```","code":["cursorObject addWeaponWithAttachmentsCargoGlobal [[\"arifle_MX_GL_F\", \"\", \"acc_flashlight\", \"\", [\"30Rnd_65x39_caseless_mag\", 30], [\"3Rnd_HE_Grenade_shell\", 2], \"\"], 5];"]},{"text":"Add one MX rifle without any attachments or magazines event though the class has linked items:\n\n```sqf\ncursorObject addWeaponWithAttachmentsCargoGlobal [[\"arifle_MX_Holo_pointer_F\", \"\", \"\", \"\", [], [], \"\"], 1];\n```","code":["cursorObject addWeaponWithAttachmentsCargoGlobal [[\"arifle_MX_Holo_pointer_F\", \"\", \"\", \"\", [], [], \"\"], 1];"]},{"text":"Add all weapons on player with attachments:\n\n```sqf\n{ cursorObject addWeaponWithAttachmentsCargoGlobal [_x, 1] } forEach weaponsItems player;\n```","code":["{ cursorObject addWeaponWithAttachmentsCargoGlobal [_x, 1] } forEach weaponsItems player;"]}],"see_also":["addWeaponWithAttachmentsCargo","weaponsItems","addWeaponCargo","addWeaponCargoGlobal","clearWeaponCargo","getWeaponCargo"],"notes":[{"user":"Andrew_S90","date":"2020-10-28T20:57:00Z","text":"This command also allows you to add a weapon with attachments directly to the players backpack.\n\n```sqf\n(backpackContainer player) addWeaponWithAttachmentsCargoGlobal [[\"arifle_MX_F\",\"muzzle_snds_H\",\"acc_pointer_IR\",\"optic_Hamr\",[\"30Rnd_65x39_caseless_mag\",30],[],\"bipod_03_F_blk\"], 1];\n```"}]},{"name":"admin","title":"admin","type":"command","url":"https://community.bistudio.com/wiki/admin","revid":364587,"updated":"2024-05-17T12:40:33Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"server_exec":true},"description":"This is dedicated server command, which queries the admin state of any client on the network by their client (owner) id.\n\n> [!NOTE]\n> To self-check the admin state of a local client, use BIS_fnc_admin.","syntaxes":[{"syntax":"admin ownerID","params":[{"name":"ownerID","type":"Number","description":"clientOwner id","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"admin state of given client:\n- 0 - client is not an admin - 1 - client is admin that is voted in - 2 - client is admin that is logged in","text":"Number - admin state of given client:\n\n- 0 - client is not an admin\n- 1 - client is admin that is voted in\n- 2 - client is admin that is logged in"},"form":"unary","right":{"text":"ownerID"}}],"examples":[{"code":["private _isLoggedInAdmin = admin 3 == 2;"]},{"code":["private _adminState = admin owner unit1;"]}],"see_also":["serverCommand","serverCommandAvailable","owner","clientOwner","remoteExecutedOwner"]},{"name":"agent","title":"agent","type":"command","url":"https://community.bistudio.com/wiki/agent","revid":318629,"updated":"2022-05-13T09:21:13Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return a person for a given agent.","syntaxes":[{"syntax":"agent teamMember","params":[{"name":"teamMember","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"teamMember"}}],"examples":[{"code":["_obj = agent teamMember _unit;"]}],"see_also":["agents","createAgent","forEachMemberAgent","isAgent"]},{"name":"agents","title":"agents","type":"command","url":"https://community.bistudio.com/wiki/agents","revid":378915,"updated":"2026-08-12T19:46:48Z","groups":["Teams","Object Detection"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return a list of agents in the current mission.","syntaxes":[{"syntax":"agents","params":[],"returns":{"type":"Array of Team Members","type_expr":"Array<Team Member>"},"form":"nullary"}],"examples":[{"code":["{ agent _x moveTo position player } forEach agents;"]},{"code":["agents apply {typeOf agent _x}; // [\"Snake_random_F\",\"Snake_random_F\",\"Snake_random_F\",\"Rabbit_F\"]"]}],"see_also":["teams","agent","createAgent","isAgent","forEachMemberAgent","entities","allCurators","allGroups","allDead","playableUnits","switchableUnits","vehicles","allUnitsUAV","allDeadMen"],"notes":[{"user":"Rocket","date":"2012-04-04T10:48:00Z","text":"Note that agents returns a reference to the agent itself, not the object. For example:\n\n```sqf\n{ alive _x } count agents;\n```\n\nwould return an error\n\n```\nBut you can assign the agent a reference using setVariable, and then reference it, for example:\n```\n\n```sqf\n{ alive (_x getVariable [\"agentObject\", objNull]) } count agents;\n```\n\n```\n would return the number of agents still alive - BUT you would need to define \"agentObject\" after you create the agent, for example:\n```\n\n```sqf\n_agent = createAgent [_type, _position, [], _radius, \"NONE\"];_agent setVariable[\"agentObject\",_agent,true];\n```"},{"user":"Killzone_Kid","date":"2013-08-01T21:55:00Z","text":"Alternatively, to get object from agent reference use agent command."},{"user":"PierreMGI","date":"2020-05-26T14:10:00Z","text":"In debug console, pointing at an agent:\n\n```sqf\ncursorObject;                                            // seems to refer to an agent (ex.: Agent 0xcbce41c0), but it is an object\nteamMember cursorObject;                                // returns the same value Agent 0xcbce41c0, but now it is the agent\ncursorObject in agents;                                    // will return false (even if you can read the value Agent 0xcbce41c0 in the agents array)\nteamMember cursorObject in agents;                        // returns true. TeamMember allows to refer to the agent under the cursorObject\nagent teamMember cursorObject isEqualTo cursorObject;    // true, same object.\n```"}]},{"name":"AGLToASL","title":"AGLToASL","type":"command","url":"https://community.bistudio.com/wiki/AGLToASL","revid":377450,"updated":"2026-01-02T06:47:08Z","groups":["Positions"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","description":"Converts position from PositionAGL to PositionASL.","syntaxes":[{"syntax":"AGLToASL posAGL","params":[{"name":"posAGL","type":"PositionAGL","description":"position to convert","type_expr":"PositionAGL"}],"returns":{"type":"PositionASL","type_expr":"PositionASL"},"form":"unary","right":{"text":"posAGL"}}],"examples":[{"code":["_playerPosASL = AGLToASL (player modelToWorld [0,0,0]);"]},{"code":["_camPosASL = AGLToASL positionCameraToWorld [0,0,0];"]}],"see_also":["ASLToAGL","ASLToATL","ATLToASL","getPos","getPosATL","getPosASL"]},{"name":"aimedAtTarget","title":"aimedAtTarget","type":"command","url":"https://community.bistudio.com/wiki/aimedAtTarget","revid":363498,"updated":"2024-04-01T11:17:25Z","groups":["Object Manipulation","Weapons"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Returns how good a vehicle's weapon is aimed at the target.","syntaxes":[{"syntax":"vehicle aimedAtTarget [target, weapon]","params":[{"name":"vehicle","type":"Object","description":"vehicle only, not unit","type_expr":"Object"},{"name":"target","type":"Object","type_expr":"Object"},{"name":"weapon","type":"String","optional":true,"description":"if not provided, checks all weapons; if provided, checks that weapon only","type_expr":"String","text":"weapon: String - (Optional) if not provided, checks all weapons; if provided, checks that weapon only"}],"returns":{"type":"Number in range 0..1","type_expr":"Number","description":"0 if no weapons or if weapon was provided and not found","text":"Number in range 0..1 - 0 if no weapons or if *weapon* was provided and not found"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[target, weapon]"}}],"examples":[{"code":["_aimingQuality = heli aimedAtTarget [target];"]},{"code":["_aimingQuality = heli aimedAtTarget [target, \"M197\"];"]}],"see_also":["fireAtTarget"],"notes":[{"user":"Killzone_Kid","date":"2013-11-19T15:02:00Z","text":"The command doesn't work with soldier weapons, only vehicle weapons (in Arma 3 at least). The return value is either 1 or 0, very rarely the value falls in between.\n1 doesn't mean you are going to hit the target, while 0 means you're definitely off."}]},{"name":"aimPos","title":"aimPos","type":"command","url":"https://community.bistudio.com/wiki/aimPos","revid":378158,"updated":"2026-02-26T16:15:24Z","groups":["Positions"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the position of the object other units can aim to.","syntaxes":[{"syntax":"aimPos unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionASL","type_expr":"PositionASL"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_aimPos = aimPos player;"]},{"text":"***aimPosVisual*** equivalent:\n\n```sqf\nprivate _aimPosVisual = AGLToASL unitAimPositionVisual player;\n```","code":["private _aimPosVisual = AGLToASL unitAimPositionVisual player;"]}],"see_also":["eyePos","getPosASL","weaponDirection","unitAimPosition","unitAimPositionVisual"],"notes":[{"user":"Waffle SS.","date":"2015-07-07T21:19:00Z","text":"Generally returns the center position of the object (middle of the geometry, not the model's [0,0,0])."},{"user":"Sa-Matra","date":"2023-03-27T12:33:11Z","text":"This command uses \"zamerny\" memory point which is hardcoded name in the engine. If memory point is not present then geometry LOD bounding center is used (according to dedmen)"}]},{"name":"airDensityCurveRTD","title":"airDensityCurveRTD","type":"command","url":"https://community.bistudio.com/wiki/airDensityCurveRTD","revid":377671,"updated":"2026-01-02T09:02:30Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns array with air density data.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"airDensityCurveRTD","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with arrays Returns air density graph\nEach array consists of: - 0: Altitude (-60000 metres to 10^7 metres) - 1: Air density","text":"Array with arrays Returns air density graph\nEach array consists of:\n\n- 0: Altitude (-60000 metres to 10^7 metres)\n- 1: Air density"},"form":"nullary"}],"examples":[{"code":["private _densityArray = airDensityCurveRTD;"]}],"see_also":["Advanced Helicopter Flight Model in Arma3"]},{"name":"airDensityRTD","title":"airDensityRTD","type":"command","url":"https://community.bistudio.com/wiki/airDensityRTD","revid":318555,"updated":"2022-05-13T09:21:05Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns air density in given altitude.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"airDensityRTD altitude","params":[{"name":"altitude","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"altitude"}}],"examples":[{"code":["_density = airDensityRTD 0; // returns 1.22406"]},{"code":["_density = airDensityRTD 1000; // Returns 1.11096"]}],"see_also":["rotorsForcesRTD","rotorsRpmRTD","weightRTD","wingsForcesRTD"]},{"name":"airplaneThrottle","title":"airplaneThrottle","type":"command","url":"https://community.bistudio.com/wiki/airplaneThrottle","revid":310739,"updated":"2022-05-07T20:12:21Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Returns throttle position. Works only on player's vehicle.","syntaxes":[{"syntax":"airplaneThrottle airplane","params":[{"name":"airplane","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"airplane"}}],"examples":[{"code":["private _throttle = airplaneThrottle objectParent player;"]}],"see_also":["setAirplaneThrottle"],"notes":[{"user":"POLPOX","date":"2020-01-04T10:18:00Z","text":"The value that set by setAirplaneThrottle =/= the value that can be get by airplaneThrottle when the plane's config *throttleToThrustLogFactor* isn't 1.\nThere're two planes in Vanilla Arma 3 that the value isn't 1, which are V-44 Blackfish and Y-32 Xi'an.\n\n```sqf\nvehicle player setAirplaneThrottle 0.5;\nairplaneThrottle vehicle player;    // 0.793701 if the value is 3\nairplaneThrottle vehicle player^(getNumber (configFile >> \"CfgVehicles\" >> typeOf vehicle player >> \"throttleToThrustLogFactor\"));    // 0.5\n```"}]},{"name":"airportSide","title":"airportSide","type":"command","url":"https://community.bistudio.com/wiki/airportSide","revid":379237,"updated":"2026-10-30T23:15:30Z","groups":["Sides","Roads and Airports"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Gets the side of an airport, set by setAirportSide. Default side is sideUnknown.\n\n> [!NOTE]\n> See Arma: Airport IDs for a list of airport ids.","syntaxes":[{"syntax":"airportSide id","params":[{"name":"id","type":"Number","type_expr":"Number"}],"returns":{"type":"Side","type_expr":"Side"},"form":"unary","right":{"text":"id"}},{"syntax":"airportSide target","since":"arma3 1.68","params":[{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Side","type_expr":"Side"},"form":"unary","right":{"text":"target"}}],"examples":[{"code":["private _airportSide = airportSide 0;"]}],"problems":"When used on a non-existent airport id:\n\n- negative numbers will always return sideUnknown\n- positive numbers may return east, west, resistance, sideEmpty, sideUnknown, sideAmbientLife, or 'ERROR' (see Notes).","see_also":["Arma: Airport IDs","setAirportSide","land","landAt","assignToAirport","allAirports"],"notes":[{"user":"Lou Montana","date":"2020-03-12T23:01:00Z","text":"Weird behaviour encountered on various (Arma 3) terrains (`n/a` is 'ERROR'):\n\n| Terrain | 0 (airport id) | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |\n|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| VR | sideUnknown | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | east | east | N/A | N/A | east | east | east | east | east | east | N/A | N/A | east | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | east | east | east | east | N/A | N/A | east | N/A | N/A | N/A | N/A | east | east | east | east | N/A | east | east | east | east | N/A | east | east | east | east | N/A | east | east | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | east |\n| Stratis | sideUnknown | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | sideUnknown | east | N/A | east | N/A | N/A | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | east | east | N/A | east | east | east | N/A | N/A | N/A | east | east | east | east | east | east | east | N/A | east | east | east | N/A | N/A |\n| Altis | sideUnknown | sideUnknown | sideUnknown | sideUnknown | sideUnknown | sideUnknown | resistance | N/A | N/A | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | N/A | N/A | east | sideEmpty | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | N/A | N/A | west | N/A | N/A | N/A | N/A | N/A | east | N/A | east | east | east | east | N/A | east | east | N/A | east | east | east | N/A | east | N/A | east | east | east | east | east | east |\n| Livonia | sideUnknown | N/A | east | east | east | east | east | east | east | east | east | east | east | east | east | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | east | east | east | east | N/A | east | N/A | N/A | east | east | N/A | east | east | east | east | east | east | east | east | east | N/A | east | east | east | east | east | east | east | east | east | N/A | resistance | east | east | east | east | east | east | N/A | east | east | east | east | east | east | east | east | east | east | east | east | N/A | east | sideUnknown | east | east | east | east | east | N/A | east | east | east | N/A | east | east | east | east | east | east | east | N/A | N/A | N/A | east | N/A |\n| Malden | sideUnknown | sideUnknown | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | resistance | N/A | N/A | N/A | east | east | east | N/A | east | east | N/A | east | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A | sideAmbientLife | N/A | east | N/A | N/A | east | east | resistance | east | N/A | N/A | east | east | east | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | east | east | east | east | east | east | N/A | N/A |\n| Tanoa | sideUnknown | sideUnknown | sideUnknown | sideUnknown | sideUnknown | N/A | N/A | N/A | N/A | N/A | east | N/A | east | N/A | east | east | N/A | east | east | east | east | east | N/A | east | east | N/A | N/A | east | east | east | N/A | east | east | N/A | east | east | N/A | east | east | N/A | N/A | N/A | east | west | east | N/A | N/A | east | east | east | N/A | east | N/A | N/A | east | east | east | east | east | east | east | east | N/A | east | east | east | east | east | east | east | N/A | east | east | east | N/A | east | N/A | N/A | N/A | N/A | east | N/A | east | east | east | east | N/A | N/A | east | east | N/A | N/A | N/A | N/A | N/A | east | N/A | N/A | N/A | N/A |"}]},{"name":"AISFinishHeal","title":"AISFinishHeal","type":"command","url":"https://community.bistudio.com/wiki/AISFinishHeal","revid":377976,"updated":"2026-01-19T18:45:43Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Alternative Injury Simulation (AIS) end state. Used to tell engine that script side healing is done when using \"HandleHeal\" event handler.","syntaxes":[{"syntax":"AISFinishHeal [unit, healer, healerCanHeal]","params":[{"name":"unit","type":"Object","description":"wounded","type_expr":"Object"},{"name":"healer","type":"Object","description":"medic","type_expr":"Object"},{"name":"healerCanHeal","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[unit, healer, healerCanHeal]"}}],"examples":[{"code":["AISFinishHeal [_wounded, _medic, true];"]}]},{"name":"alive","title":"alive","type":"command","url":"https://community.bistudio.com/wiki/alive","revid":337581,"updated":"2023-02-12T15:50:13Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Check if given vehicle/person/building is alive (i.e. not dead or destroyed).","syntaxes":[{"syntax":"alive object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if alive, false if dead/destroyed"},"form":"unary","right":{"text":"object"}}],"examples":[{"text":"SQS:\n\n```sqs\n? not alive player : exit\n```","code":["? not alive player : exit"]},{"text":"SQF:\n\n```sqf\nif (!alive player) exitWith {};\n```","code":["if (!alive player) exitWith {};"]},{"code":["alive objNull; // returns false"]}],"see_also":["setDamage","damage","waterDamaged"],"notes":[{"user":"Pierre MGI","date":"2015-10-19T23:48:00Z","text":"Alive or not could be the question! in multi-player, missions come with respawn module(s). When a player is dead shot, `alive player` will return false, then almost immediately true if the \"revive\" respawn template is enabled, then could turn to false again if time for assistance is elapsed or if the player activates the respawn menu before; and finally true after player respawns.\nJust be aware that in that case (respawn + revive enabled), the status of the player is toggling: true → false → true → false → true. Then, alive status while player is waiting for being rescued could lead to some script errors as player is supposed to be alive but is in limbo and the dead entity \"player\" gets passed to server."}]},{"name":"all3DENEntities","title":"all3DENEntities","type":"command","url":"https://community.bistudio.com/wiki/all3DENEntities","revid":377599,"updated":"2026-01-02T07:01:24Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns an array of all currently placed Eden Editor entities.\n\n> [!NOTE]\n> This information is only available in Eden Editor. If used during mission, it will return `[[],[],[],[],[],[],[],[-999]]`.","syntaxes":[{"syntax":"all3DENEntities","params":[],"returns":{"type":"Array of Eden Entities","type_expr":"Array of Eden Entities"},"form":"nullary"}],"examples":[{"code":["systemChat str all3DENEntities;"]},{"code":["all3DENEntities params [\"_objects\", \"_groups\", \"_triggers\", \"_systems\", \"_waypoints\", \"_markers\", \"_layers\", \"_comments\"];"]},{"code":["// select all Eden entities\nset3DENSelected all3DENEntities;"]}],"see_also":["get3DENMouseOver","delete3DENEntities","get3DENEntityID","get3DENSelected"]},{"name":"allActiveTitleEffects","title":"allActiveTitleEffects","type":"command","url":"https://community.bistudio.com/wiki/allActiveTitleEffects","revid":377719,"updated":"2026-01-02T09:16:16Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.98"},"since":"arma3 1.98","arma3_since":"1.98","description":"Returns a list of all layers that have currently active title effect. Numbers equal to or greater than 0 represent cut layers, where as -1 represents title layer (see Title Effect Type). Named layers are represented by their respective index.\n\n> [!NOTE]\n> Effects created with titleText, titleRsc and titleObj commands do not have a numbered layer, so they are represented as -1 layer in the result. Effects created with cutText, cutRsc and cutObj are created either on layer 0, if no layer is specified, or on the given layer, if the layer index is specified, so they are represented by the layer index.","syntaxes":[{"syntax":"allActiveTitleEffects","params":[],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"indexes of currently active effect layer"},"form":"nullary"}],"examples":[{"code":["cutText [\"Hello World!\" ,\"PLAIN\", 2];\nhint str allActiveTitleEffects; // [0]"]},{"code":["21 cutText [\"Hello World!\", \"PLAIN\", 2];\nhint str allActiveTitleEffects; // [21]"]},{"code":["cutText [\"Hello World!\", \"PLAIN\", 2];\ntitleText [\"Hello World!\", \"PLAIN\", 2];\nhint str allActiveTitleEffects; // [-1, 0]"]}],"see_also":["allCutLayers","cutText","cutRsc","cutObj","cutFadeOut","titleText","titleRsc","titleObj","titleFadeOut","activeTitleEffectParams","Title Effect Type"]},{"name":"allAddonsInfo","title":"allAddonsInfo","type":"command","url":"https://community.bistudio.com/wiki/allAddonsInfo","revid":377669,"updated":"2026-01-02T09:02:27Z","groups":["Mods and Addons"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns the list of all loaded addons.","syntaxes":[{"syntax":"allAddonsInfo","params":[],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [prefix, version, isPatched, modIndex, hash]\n- prefix: String - addon prefix - version: String - addon revision version - isPatched: Boolean - true if patching is enabled and this addon is being patched - Arma 3 v2.14 modIndex: Number - index of mod in getLoadedModsInfo array. -1 if not found. - Arma 3 v2.14 hash: String - hash of the addon PBO file. \"\" if hashing fails.","text":"Array of Arrays with [prefix, version, isPatched, modIndex, hash]\n\n- prefix: String - addon prefix\n- version: String - addon revision version\n- isPatched: Boolean - true if patching is enabled and this addon is being patched\n- Arma 3 v2.14 modIndex: Number - index of mod in getLoadedModsInfo array. -1 if not found.\n- Arma 3 v2.14 hash: String - hash of the addon PBO file. \"\" if hashing fails."},"form":"nullary"}],"examples":[{"text":"```sqf\nallAddonsInfo\n/*\n    [\n        [\"bin\\\",\"150301\",false,-1,\"66b6d1a87da30e0386fec881504c14a0a6025cb1\"],\n        [\"core\\\",\"129618\",false,-1,\"49e1b8da67de848c8ea058fd8512c222ccb6d919\"],\n        [\"Languagecore_F\\\",\"150376\",false,-1,\"2ee7b09d60f916d7e56934632f55683a14a636b7\"],\n        [\"a3\\anims_f_aow\\\",\"149768\",false,0,\"59df21ad1fc6939c460a555b3af662f725564b37\"],\n        [\"a3\\dubbing_radio_f_enoch\\\",\"150070\",false,1,\"5ca436c61a634fcbd28ca9480a4c8249c5b0e4bd\"],\n        [\"a3\\armor_f_tank\\\",\"150292\",false,2,\"6d0ea8b45ff4cd316b3d6c5575def9dd048e198e\"],\n        [\"a3\\music_f_tacops\\\",\"124064\",false,3,\"435c2b0338fe6bec7685002dca7c47778abf44ee\"],\n        ...\n    ]\n*/\n```","code":["allAddonsInfo\n/*\n\t[\n\t\t[\"bin\\\",\"150301\",false,-1,\"66b6d1a87da30e0386fec881504c14a0a6025cb1\"],\n\t\t[\"core\\\",\"129618\",false,-1,\"49e1b8da67de848c8ea058fd8512c222ccb6d919\"],\n\t\t[\"Languagecore_F\\\",\"150376\",false,-1,\"2ee7b09d60f916d7e56934632f55683a14a636b7\"],\n\t\t[\"a3\\anims_f_aow\\\",\"149768\",false,0,\"59df21ad1fc6939c460a555b3af662f725564b37\"],\n\t\t[\"a3\\dubbing_radio_f_enoch\\\",\"150070\",false,1,\"5ca436c61a634fcbd28ca9480a4c8249c5b0e4bd\"],\n\t\t[\"a3\\armor_f_tank\\\",\"150292\",false,2,\"6d0ea8b45ff4cd316b3d6c5575def9dd048e198e\"],\n\t\t[\"a3\\music_f_tacops\\\",\"124064\",false,3,\"435c2b0338fe6bec7685002dca7c47778abf44ee\"],\n\t\t...\n\t]\n*/"]}],"see_also":["addonFiles"]},{"name":"allAirports","title":"allAirports","type":"command","url":"https://community.bistudio.com/wiki/allAirports","revid":377737,"updated":"2026-01-03T00:52:41Z","groups":["Roads and Airports"],"status":"ok","games":{"arma3":"1.76"},"since":"arma3 1.76","arma3_since":"1.76","description":"Returns all map airports, both static and dynamic.","syntaxes":[{"syntax":"allAirports","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [staticAirports, dynamicAirports]\n- staticAirports: Array of Numbers - static airports IDs - dynamicAirports: Array of Objects - dynamic airports objects (such as \"DynamicAirport_01_F\" found on aircraft carrier)","text":"Array with [staticAirports, dynamicAirports]\n\n- staticAirports: Array of Numbers - static airports IDs\n- dynamicAirports: Array of Objects - dynamic airports objects (such as \"DynamicAirport_01_F\" found on aircraft carrier)"},"form":"nullary"}],"examples":[{"code":["_airplane landAt selectRandom (allAirports select 0);"]}],"see_also":["airportSide","setAirportSide","land","landAt","assignToAirport","Arma: Airport IDs"]},{"name":"allCameras","title":"allCameras","type":"command","url":"https://community.bistudio.com/wiki/allCameras","revid":376999,"updated":"2026-01-01T08:07:12Z","groups":["Camera Control"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Return a list of all existing cameras.","syntaxes":[{"syntax":"allCameras","params":[],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [camera, r2tInfos, isPrimary, effectName, viewMode, TIindex]\n- camera: Object - the camera itself (see camCreate) - r2tInfos: Array of Arrays with [r2tName, r2tEffectName, ppEffectType, TIindex] - r2tName: String - the camera's RTT name (see cameraEffect) - r2tEffectName: String - see cameraEffect for possible values - ppEffectType: String - one of `Normal`, `NightVision`, `Thermal`, `Colors`, `Mirror`, `ChromAber` or `FilmGrain` - TIIndex: Number - see setCamUseTI for possible values - isPrimary: Boolean - whether or not this camera is the current main one - effectName: String - (Optional, only available if isPrimary is true) see cameraEffect for possible values - viewMode: Number - (Optional, only available if isPrimary is true) 0 = normal, 1 = NVG, 2 = TI, 3 = NVG + TI - TIIndex: Number - (Optional, only available if isPrimary is true) see setCamUseTI for possible values","text":"Array of Arrays with [camera, r2tInfos, isPrimary, effectName, viewMode, TIindex]\n\n- camera: Object - the camera itself (see camCreate)\n- r2tInfos: Array of Arrays with [r2tName, r2tEffectName, ppEffectType, TIindex]\n  - r2tName: String - the camera's RTT name (see cameraEffect)\n  - r2tEffectName: String - see cameraEffect for possible values\n  - ppEffectType: String - one of `Normal`, `NightVision`, `Thermal`, `Colors`, `Mirror`, `ChromAber` or `FilmGrain`\n  - TIIndex: Number - see setCamUseTI for possible values\n- isPrimary: Boolean - whether or not this camera is the current main one\n- effectName: String - (Optional, only available if *isPrimary* is true) see cameraEffect for possible values\n- viewMode: Number - (Optional, only available if *isPrimary* is true) 0 = normal, 1 = NVG, 2 = TI, 3 = NVG + TI\n- TIIndex: Number - (Optional, only available if *isPrimary* is true) see setCamUseTI for possible values"},"form":"nullary"}],"examples":[{"text":"```sqf\n{\n    params [\"_camera\", \"_r2tInfos\", \"_isPrimary\", \"_ppEffectName\", \"_viewMode\", \"_TIindex\"];\n    {\n        params[\"_r2tName\", \"_ppEffectName\", \"_ppEffectType\", \"_TIindex\"];\n    } forEach _r2tInfos;\n} forEach allCameras;\n```","code":["{\n\tparams [\"_camera\", \"_r2tInfos\", \"_isPrimary\", \"_ppEffectName\", \"_viewMode\", \"_TIindex\"];\n\t{\n\t\tparams[\"_r2tName\", \"_ppEffectName\", \"_ppEffectType\", \"_TIindex\"];\n\t} forEach _r2tInfos;\n} forEach allCameras;"]},{"text":"```sqf\nprivate _allCamerasInfo = allCameras;\n{\n    params [\"_camera\", \"\", \"_isPrimary\"];\n    if (!_isPrimary) then { camDestroy _camera };\n} forEach _allCamerasInfo;\n```","code":["private _allCamerasInfo = allCameras;\n{\n\tparams [\"_camera\", \"\", \"_isPrimary\"];\n\tif (!_isPrimary) then { camDestroy _camera };\n} forEach _allCamerasInfo;"]}],"see_also":["camCreate","camDestroy"]},{"name":"allControls","title":"allControls","type":"command","url":"https://community.bistudio.com/wiki/allControls","revid":352271,"updated":"2024-02-04T22:03:55Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.38"},"since":"arma3 1.38","arma3_since":"1.38","description":"Returns a list of all controls in the provided display or controls group, including \"sub\"-controls from other CT_CONTROLS_GROUPs.","syntaxes":[{"syntax":"allControls display","params":[{"name":"display","type":"Display","type_expr":"Display"}],"returns":{"type":"Array of Controls","type_expr":"Array<Control>"},"form":"unary","right":{"text":"display"}},{"syntax":"allControls controlsGroup","since":"arma3 2.04","params":[{"name":"controlsGroup","type":"Control","description":"CT_CONTROLS_GROUP","type_expr":"Control"}],"returns":{"type":"Array of Controls","type_expr":"Array<Control>"},"form":"unary","right":{"text":"controlsGroup"}}],"examples":[{"code":["_allCtrls = allControls findDisplay 46;"]},{"code":["_allSubCtrls = allControls _myControlsGroup;"]}],"see_also":["allDisplays","controlsGroupCtrl","ctrlCreate","allVariables","allCurators","allGroups","allDead","allDeadMen"]},{"name":"allCurators","title":"allCurators","type":"command","url":"https://community.bistudio.com/wiki/allCurators","revid":377003,"updated":"2026-01-01T08:15:18Z","groups":["Curator","Object Detection"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns list of all curator logic units, not the units assigned to the logic.","syntaxes":[{"syntax":"allCurators","params":[],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"nullary"}],"examples":[{"code":["_allCuratorLogics = allCurators;"]}],"see_also":["allGroups","allDead","playableUnits","switchableUnits","vehicles","allUnitsUAV","allSites"]},{"name":"allCutLayers","title":"allCutLayers","type":"command","url":"https://community.bistudio.com/wiki/allCutLayers","revid":377004,"updated":"2026-01-01T08:15:37Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns all named layers used by cutRsc, cutText, cutObj or cutFadeOut.\nThe layer normally would be added on the first use of any of the aforementioned commands, however if a layer needs to be reserved it could be done like so:\n\n```sqf\nprivate _layerNum = \"TAG_myLayerName\" cutFadeOut 0;\n```","syntaxes":[{"syntax":"allCutLayers","params":[],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"The index of the layer name in the array corresponds to the layer number the cut effect will be displayed on. If no layers were defined, the return is `[\"\"]`, because layer 0 is reserved for usage in cut commands without layer param or when the provided layer name is empty `\"\"`."},"form":"nullary"}],"examples":[{"code":["private _allLayers = allCutLayers;"]}],"see_also":["cutRsc","cutText","cutObj","cutFadeOut","allActiveTitleEffects","activeTitleEffectParams"]},{"name":"allDead","title":"allDead","type":"command","url":"https://community.bistudio.com/wiki/allDead","revid":377005,"updated":"2026-01-01T08:15:58Z","groups":["Object Detection"],"status":"ok","games":{"arma2oa":"1.57","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.57","arma3_since":"0.50","description":"Return a list of all dead units including agents and destroyed vehicles. Dead units may be in vehicles.","syntaxes":[{"syntax":"allDead","params":[],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"nullary"}],"examples":[{"code":["{ deleteVehicle _x } forEach allDead;"]},{"text":"allAlive:\n\n```sqf\n_all = allUnits + vehicles;\n{\n    _all pushBack agent _x;\n} forEach (agents - [teamMemberNull]);\nallAlive = _all - allDead;\n```","code":["_all = allUnits + vehicles;\n{\n\t_all pushBack agent _x;\n} forEach (agents - [teamMemberNull]);\nallAlive = _all - allDead;"]}],"see_also":["allDeadMen","allUnits","allGroups","playableUnits","switchableUnits","units","vehicles","allCurators"],"notes":[{"user":"Ebay","date":"2017-04-06T15:40:00Z","text":"This also returns bodies hidden with hideBody until they are deleted. Tested in A2OA 1.63.131129"}]},{"name":"allDeadMen","title":"allDeadMen","type":"command","url":"https://community.bistudio.com/wiki/allDeadMen","revid":378914,"updated":"2026-08-12T19:45:30Z","groups":["Object Detection"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Return a list of dead units including agents. Dead unit might be inside vehicle.","syntaxes":[{"syntax":"allDeadMen","params":[],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"nullary"}],"examples":[{"code":["{ deleteVehicle _x } forEach allDeadMen;"]}],"see_also":["allDead","allUnits","allGroups","playableUnits","switchableUnits","units","vehicles","allCurators","getCorpse"],"notes":[{"user":"Pierre MGI","date":"2015-10-15T04:08:00Z","text":"As dead men are civilian side, don't try to count them with `{ side _x isEqualTo east } count allDeadMen;` result will always be 0.\nUse the configfile \"side\" instead:\n\n```sqf\n0 spawn\n{\n    while { true } do\n    {\n        sleep 0.1;\n        _westScore =\n        {\n            getNumber (configFile >> \"CfgVehicles\" >> typeOf _x >> \"side\") == 0\n        } count allDeadMen;\n        hintSilent format [\"East killed: %1\", _westScore];\n    };\n};\n```"}]},{"name":"allDiaryRecords","title":"allDiaryRecords","type":"command","url":"https://community.bistudio.com/wiki/allDiaryRecords","revid":377644,"updated":"2026-01-02T09:01:43Z","groups":["Briefing"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","locality":{"argument":"global","effect":"local"},"description":"Returns array with all Diary Records for the given subject available to the given person. See Diary for the explanation on the available subjects and their structure.","syntaxes":[{"syntax":"person allDiaryRecords subject","params":[{"name":"person","type":"Object","description":"unit","type_expr":"Object"},{"name":"subject","type":"String","description":"subject","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"with [id, title, text, icon, task, taskState, showTitle, date, record]\n- id: Number - record id - title: String - record title - text: String - record text - icon: String - record icon - task: Task - record task - taskState: String - record task state - showTitle: Boolean - true if tile is shown - date: Date - record: Diary Record - record reference","text":"Array with [id, title, text, icon, task, taskState, showTitle, date, record]\n\n- id: Number - record id\n- title: String - record title\n- text: String - record text\n- icon: String - record icon\n- task: Task - record task\n- taskState: String - record task state\n- showTitle: Boolean - true if tile is shown\n- date: Date\n- record: Diary Record - record reference"},"form":"binary","left":{"text":"person"},"right":{"text":"subject"}}],"examples":[{"code":["player allDiaryRecords \"Diary\";"]}],"see_also":["allDiarySubjects","createDiaryRecord","setDiaryRecordText","Diary"]},{"name":"allDiarySubjects","title":"allDiarySubjects","type":"command","url":"https://community.bistudio.com/wiki/allDiarySubjects","revid":377670,"updated":"2026-01-02T09:02:28Z","groups":["Briefing"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","locality":{"argument":"global","effect":"local"},"description":"Returns array with all Diary subjects available to the given person. See Diary for the explanation on the available subjects and their structure.","syntaxes":[{"syntax":"allDiarySubjects person","params":[{"name":"person","type":"Object","description":"unit","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [name, displayName, picture, countRecords, isReadOnly, isSelected]\n- name: String - internal subject reference - displayName: String - visible name - picture: String - subject icon - countRecords: Number - number of records in this subject - isReadOnly: Boolean - whether or not the records could be added - isSelected: Boolean - true if subject is currently selected","text":"Array with [name, displayName, picture, countRecords, isReadOnly, isSelected]\n\n- name: String - internal subject reference\n- displayName: String - visible name\n- picture: String - subject icon\n- countRecords: Number - number of records in this subject\n- isReadOnly: Boolean - whether or not the records could be added\n- isSelected: Boolean - true if subject is currently selected"},"form":"unary","right":{"text":"person"}}],"examples":[{"code":["allDiarySubjects player;"]}],"see_also":["createDiarySubject","removeDiarySubject","diarySubjectExists","selectDiarySubject","setDiarySubjectPicture","allDiaryRecords","Diary"]},{"name":"allDisplays","title":"allDisplays","type":"command","url":"https://community.bistudio.com/wiki/allDisplays","revid":377009,"updated":"2026-01-01T08:17:31Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.38"},"since":"arma3 1.38","arma3_since":"1.38","description":"Returns a list of all opened GUI displays.\n\n> [!NOTE]\n> Other displays could be accessed via uiNamespace variable which is updated every time a display is opened or closed.\n>\n> For example, to access IGUI displays:\n>\n> ```sqf\n> private _iguiDisplays = uiNamespace getVariable [\"IGUI_displays\", []];\n> ```\n>\n> Other display variables:\n>\n> - `\"3DENDisplaysTemp_displays\"`\n> - `\"3DENDisplays_displays\"`\n> - `\"BootcampDisplays_displays\"`\n> - `\"BootcampTitles_displays\"`\n> - `\"CuratorDisplays_displays\"`\n> - `\"CuratorTitles_displays\"`\n> - `\"GUI_displays\"`\n> - `\"IGUI_displays\"`\n> - `\"KartDisplays_displays\"`\n> - `\"Loading_displays\"`","syntaxes":[{"syntax":"allDisplays","params":[],"returns":{"type":"Array of Displays","type_expr":"Array<Display>"},"form":"nullary"}],"examples":[{"code":["private _allDisps = allDisplays;"]}],"see_also":["allControls","findDisplay","controlsGroupCtrl","ctrlCreate","allVariables","allCurators","allGroups","allDead","allDeadMen"]},{"name":"allEnv3DSoundSources","title":"allEnv3DSoundSources","type":"command","url":"https://community.bistudio.com/wiki/allEnv3DSoundSources","revid":309140,"updated":"2022-05-03T11:50:33Z","groups":["Sounds"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","description":"Returns all environmental 3D sound sources (Objects) like trees and houses in camera vicinity.","syntaxes":[{"syntax":"allEnv3DSoundSources","params":[],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"nullary"}],"examples":[{"code":["private _sources = allEnv3DSoundSources;"]}],"see_also":["getAllEnv3DSoundControllers","getAllEnvSoundControllers","getEnv3DSoundController","getEnvSoundController","selectBestPlaces","getSoundController","getSoundControllerResult","getAllSoundControllers","getCustomSoundController","setCustomSoundController","getCustomSoundControllerCount","Arma 3: Sound"]},{"name":"allExtensions","title":"allExtensions","type":"command","url":"https://community.bistudio.com/wiki/allExtensions","revid":378520,"updated":"2026-05-04T01:49:51Z","groups":["System"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns information about all loaded Extensions","syntaxes":[{"syntax":"allExtensions","params":[],"returns":{"type":"Array of HashMaps","type_expr":"Array<HashMap>","description":"one for each extension, containing the following keys\n- name: String - hash: String - sha1 - hasRVExtensionVersion: Boolean - hasRVExtensionRequestUI: Boolean - hasRVExtensionArgs: Boolean - hasRVExtensionContext: Boolean - hasRVExtensionRegisterCallback: Boolean - hasRVExtension: Boolean - hasRVExtensionFeatureFlags: Array of Strings - signatures: Array of Strings - productVersion: String - dllVersion: Boolean - fileVersion: Boolean - dllVersion: Boolean - mod: String","text":"Array of HashMaps - one for each extension, containing the following keys\n\n- name: String\n- hash: String - sha1\n- hasRVExtensionVersion: Boolean\n- hasRVExtensionRequestUI: Boolean\n- hasRVExtensionArgs: Boolean\n- hasRVExtensionContext: Boolean\n- hasRVExtensionRegisterCallback: Boolean\n- hasRVExtension: Boolean\n- hasRVExtensionFeatureFlags: Array of Strings\n- signatures: Array of Strings\n- productVersion: String\n- dllVersion: Boolean\n- fileVersion: Boolean\n- dllVersion: Boolean\n- mod: String"},"form":"nullary"}],"examples":[{"text":"```sqf\n// Get hash for extension emm_api\nprivate _extensionHash = \"\";\n{\n    if ((_x getOrDefault [\"name\", \"\"]) == \"emm_api\") exitWith {\n        _extensionHash = _x getOrDefault [\"hash\", \"\"];\n    };\n} forEach allExtensions;\n_extensionHash // \"4CD820DBDBCAEBE6FF654762DA41AF6C97D013B4\"\n```","code":["// Get hash for extension emm_api\nprivate _extensionHash = \"\"; \n{ \n    if ((_x getOrDefault [\"name\", \"\"]) == \"emm_api\") exitWith { \n        _extensionHash = _x getOrDefault [\"hash\", \"\"]; \n    }; \n} forEach allExtensions;\n_extensionHash // \"4CD820DBDBCAEBE6FF654762DA41AF6C97D013B4\""]}],"see_also":["callExtension"]},{"name":"allGroups","title":"allGroups","type":"command","url":"https://community.bistudio.com/wiki/allGroups","revid":377010,"updated":"2026-01-01T08:18:18Z","groups":["Groups","Object Detection"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return a list of all groups created on the following sides east, west, resistance/independent and civilian only. Does not contain groups of sideLogic.","syntaxes":[{"syntax":"allGroups","params":[],"returns":{"type":"Array of Groups","type_expr":"Array<Group>"},"form":"nullary"}],"examples":[{"code":["{ leader _x sideChat \"Go ! Go ! Go !\" } forEach allGroups;"]},{"text":"All groups with players:\n\n```sqf\nprivate _allGroupsWithPlayers = [];\n{ _allGroupsWithPlayers pushBackUnique group _x } forEach allPlayers;\n```","code":["private _allGroupsWithPlayers = [];\n{ _allGroupsWithPlayers pushBackUnique group _x } forEach allPlayers;"]}],"see_also":["group","groups","units","allCurators","allDead","playableUnits","switchableUnits","vehicles","allUnitsUAV"]},{"name":"allLODs","title":"allLODs","type":"command","url":"https://community.bistudio.com/wiki/allLODs","revid":377653,"updated":"2026-01-02T09:02:00Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Returns the list of object or model LODs.","syntaxes":[{"syntax":"allLODs objectOrModel","params":[{"name":"objectOrModel","type":"Object or String","description":"Object or String\n\n- Object - object\n- String - model path (see getModelInfo)","type_expr":"Object | String","text":"objectOrModel: Object or String\n\n- Object - object\n- String - model path (see getModelInfo)"}],"returns":{"type":"Array","type_expr":"Array","description":"with [LODindex, LODname, LODresolution, countNamedSelections]\n- LODindex: Number - direct index of the LOD for fast access - LODname: String - LOD description name for LOD identification - LODresolution: Number - the actual LOD resolution, could be used to select LOD in selectionNames and selectionPosition - countNamedSelections: Number - number of named selections in this LOD, could be returned with selectionNames command","text":"Array with [LODindex, LODname, LODresolution, countNamedSelections]\n\n- LODindex: Number - direct index of the LOD for fast access\n- LODname: String - LOD description name for LOD identification\n- LODresolution: Number - the actual LOD resolution, could be used to select LOD in selectionNames and selectionPosition\n- countNamedSelections: Number - number of named selections in this LOD, could be returned with selectionNames command"},"form":"unary","right":{"text":"objectOrModel"}}],"examples":[{"text":"```sqf\nallLODs player;\n/*\n    [\n        [0,\"1\",1,91],\n        [1,\"2\",2,91],\n        [2,\"3\",3,84],\n        [3,\"4\",4,43],\n        [4,\"5\",5,34],\n        [5,\"VIEW_PILOT\",1100,89],\n        [6,\"shadow(0)\",10000,80],\n        [7,\"shadow(10)\",10010,33],\n        [8,\"geometry\",1e+013,42],\n        [9,\"memory\",1e+015,55],\n        [10,\"landContact\",2e+015,0],\n        [11,\"hitpoints\",5e+015,33],\n        [12,\"geometryView\",6e+015,19],\n        [13,\"geometryFire\",7e+015,57],\n        [14,\"shadow(1000)\",11000,80],\n        [15,\"shadow(1010)\",11010,33]\n    ]\n*/\n```","code":["allLODs player;\n/*\n\t[\n\t\t[0,\"1\",1,91],\n\t\t[1,\"2\",2,91],\n\t\t[2,\"3\",3,84],\n\t\t[3,\"4\",4,43],\n\t\t[4,\"5\",5,34],\n\t\t[5,\"VIEW_PILOT\",1100,89],\n\t\t[6,\"shadow(0)\",10000,80],\n\t\t[7,\"shadow(10)\",10010,33],\n\t\t[8,\"geometry\",1e+013,42],\n\t\t[9,\"memory\",1e+015,55],\n\t\t[10,\"landContact\",2e+015,0],\n\t\t[11,\"hitpoints\",5e+015,33],\n\t\t[12,\"geometryView\",6e+015,19],\n\t\t[13,\"geometryFire\",7e+015,57],\n\t\t[14,\"shadow(1000)\",11000,80],\n\t\t[15,\"shadow(1010)\",11010,33]\n\t]\n*/"]},{"text":"```sqf\nallLODs getText (configFile >> \"CfgWeapons\" >> \"arifle_MX_F\" >> \"model\");\n/*\n    [\n        [0,\"1\",1,17],\n        [1,\"2\",2,17],\n        [2,\"3\",3,16],\n        [3,\"4\",4,14],\n        [4,\"5\",5,12],\n        [5,\"6\",6,9],\n        [6,\"VIEW_PILOT\",1100,16],\n        [7,\"shadow(0)\",10000,2],\n        [8,\"shadow(10)\",10010,0],\n        [9,\"geometry\",1e+013,0],\n        [10,\"geometrySimple\",2e+013,0],\n        [11,\"memory\",1e+015,13],\n        [12,\"geometryView\",6e+015,2],\n        [13,\"shadow(1000)\",11000,2],\n        [14,\"shadow(1010)\",11010,0]\n    ]\n*/\n```","code":["allLODs getText (configFile >> \"CfgWeapons\" >> \"arifle_MX_F\" >> \"model\");\n/*\n\t[\n\t\t[0,\"1\",1,17],\n\t\t[1,\"2\",2,17],\n\t\t[2,\"3\",3,16],\n\t\t[3,\"4\",4,14],\n\t\t[4,\"5\",5,12],\n\t\t[5,\"6\",6,9],\n\t\t[6,\"VIEW_PILOT\",1100,16],\n\t\t[7,\"shadow(0)\",10000,2],\n\t\t[8,\"shadow(10)\",10010,0],\n\t\t[9,\"geometry\",1e+013,0],\n\t\t[10,\"geometrySimple\",2e+013,0],\n\t\t[11,\"memory\",1e+015,13],\n\t\t[12,\"geometryView\",6e+015,2],\n\t\t[13,\"shadow(1000)\",11000,2],\n\t\t[14,\"shadow(1010)\",11010,0]\n\t]\n*/"]}],"see_also":["createSimpleObject","hideSelection","selectionNames","selectionPosition","namedProperties","animationNames","LOD resolutions"]},{"name":"allMapMarkers","title":"allMapMarkers","type":"command","url":"https://community.bistudio.com/wiki/allMapMarkers","revid":352645,"updated":"2024-02-17T18:05:11Z","groups":["Markers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns all map marker names, including user-placed markers.\n\n> [!NOTE]\n> - Arma 3 v1.58 User-defined markers have the following name format: `_USER_DEFINED #<PlayerID>/<MarkerID>/<ChannelID>`, where:\n>   - <PlayerID> - unique network id of the player in String format, also available as String in the 6th param in \"PlayerConnected\" and \"PlayerDisconnected\" Event Handlers\n>   - <MarkerID> - an incrementing marker counter id\n>   - <ChannelID> - id of the chat channel in which the marker was placed (see currentChannel)\n> - To obtain the custom waypoint's (set with <kbd>⇧ Shift</kbd> + Left Mouse Button) position, see customWaypointPosition.","syntaxes":[{"syntax":"allMapMarkers","params":[],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"nullary"}],"examples":[{"code":["_markers = allMapMarkers; // returns e.g [\"marker1\", \"_USER_DEFINED #2/0\"]"]},{"text":"```sqf\n{\n    private \"_a\";\n    _a = toArray _x;\n    _a resize 15;\n    if (toString _a == \"_USER_DEFINED #\") then\n    // or if (_x select [0, 15] == \"_USER_DEFINED #\") since Arma 3 v1.28\n    {\n        deleteMarker _x;\n    };\n} forEach allMapMarkers;\n```","code":["{\n\tprivate \"_a\";\n\t_a = toArray _x;\n\t_a resize 15;\n\tif (toString _a == \"_USER_DEFINED #\") then\n\t// or if (_x select [0, 15] == \"_USER_DEFINED #\") since Arma 3 v1.28\n\t{\n\t\tdeleteMarker _x;\n\t};\n} forEach allMapMarkers;"]},{"text":"```sqf\nif (_someString in allMapMarkers) then\n{\n    hint (_someString + \" is an existing marker\");\n};\n```","code":["if (_someString in allMapMarkers) then\n{\n\thint (_someString + \" is an existing marker\");\n};"]}],"see_also":["createMarker","deleteMarker","customWaypointPosition"]},{"name":"allMines","title":"allMines","type":"command","url":"https://community.bistudio.com/wiki/allMines","revid":377194,"updated":"2026-01-01T10:55:10Z","groups":["Mines"],"status":"ok","games":{"arma3":"1.24"},"since":"arma3 1.24","arma3_since":"1.24","description":"Returns an array of all mines in the mission","syntaxes":[{"syntax":"allMines","params":[],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"nullary"}],"examples":[{"code":["hint format [\"there are %1 mines total\", count allMines];"]},{"code":["private _isFirstMineDetected = (allMines select 0) mineDetectedBy blufor;"]}],"see_also":["detectedMines","mineDetectedBy","createMine","mineActive","revealMine","allMissionObjects"]},{"name":"allMissionObjects","title":"allMissionObjects","type":"command","url":"https://community.bistudio.com/wiki/allMissionObjects","revid":369567,"updated":"2024-09-24T07:52:15Z","groups":["Object Detection"],"status":"ok","games":{"arma2oa":"1.57","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.57","arma3_since":"0.50","description":"Returns all objects of the given type that are currently present in the mission. In some cases, the entities and allObjects commands are much faster alternatives to this command.\nSome of the special types that can be detected with this command (and with nearestObject):\n\n- `\"\"` - returns everything, e.g. agents, bees, mosquitoes, footprints, armed mines, ...\n- `\"all\"` - more restrictive than `\"\"`: no ambient insects, only agents such as rabbits and snakes, no footprints, tracks, no armed mines\n- `\"#slop\"` - blood drops\n- `\"#mark\"` - unit footprints\n- `\"#track\"` - vehicle tracks\n- `\"#crater\"` - explosion craters on the ground\n- `\"#crateronvehicle\"` - bullet marks on vehicles\n- `\"#explosion\"` - explosions\n- `\"#objectdestructed\"` - building, tree or bush destruction\n- `\"#soundonvehicle\"` - sounds created with say3D for example\n- `\"#dynamicsound\"` - sound sources created using createSoundSource\n- `\"EmptyDetector\"` - all Triggers\n- `\"Logic\"` - all game logics\n\n> [!IMPORTANT]\n> This command is quite performance heavy. Use with caution!","syntaxes":[{"syntax":"allMissionObjects type","params":[{"name":"type","type":"String","type_expr":"String"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"type"}}],"examples":[{"code":["_airObjects = allMissionObjects \"Air\";"]},{"code":["{ deleteVehicle _x; } forEach (allMissionObjects \"\");"]},{"code":["_allMObjects = allMissionObjects \"All\";"]}],"multiplayer":"> [!NOTE]\n> This command is ~5 times faster on a dedicated server than on a client. Reason unknown.","see_also":["allObjects","allDead","allGroups","allUnits","entities","vehicles","allMines","allSimpleObjects"]},{"name":"allObjects","title":"allObjects","type":"command","url":"https://community.bistudio.com/wiki/allObjects","revid":377077,"updated":"2026-01-01T09:39:24Z","groups":["Object Detection"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns array of requested objects as fast as the engine allows it. The objects can be requested by object type and simulation kind.\n\n> [!NOTE]\n> This command does not return terrain placed objects (except for terrain objects with lights, such as lamp posts, etc. which can be found in the slow entities collection). To get all terrain objects, use nearestTerrainObjects instead.","syntaxes":[{"syntax":"objectType allObjects objectCollection","params":[{"name":"objectType","type":"Number","description":"type can be a combination of types according to bit flag operation (see getObjectType):\n\n- -1 - Arma 3 v2.12 All types incl. nulls (nulls exist with 'objectCollection' 7 and 8)\n- 1 - Primary - normal object placed in Terrain Builder, part of landscape\n- 2 - Network - road placed in Terrain Builder, part of landscape\n- 4 - Temporary - temporary object (like vehicle tracks)\n- 8 - TypeVehicle - entity added by game\n- 16 - TypeTempVehicle - temporary entity\n- 32 - LandDecal - land decal\n\nFor example if required objects are both TerrainBuilder-placed (**1**) and dynamically placed (**8**) the combination type will be 8 + 1 = **9**\n\n> [!NOTE]\n> Use **63** (1 + 2 + 4 + 8 + 16 + 32) to return objects of all types (excl. nulls).","type_expr":"Number"},{"name":"objectCollection","type":"Number","description":"supported values:\n\n- 0 - Slow (and very slow) entities: some houses, rubbles, street lamps, churches, etc\n- 1 - Normal entities: vehicles etc\n- 2 - Fast entities: shots and other high precision entities\n- 3 - Cloudlets: smokes, dust, etc\n- 4 - Out vehicles: objects that are not listed anywhere else, holders, etc\n- 5 - Animals: animals, birds, insects, etc\n- 6 - Mines: mines\n- 7 - Arma 3 v2.12 Sensor map: ordered triggers. When trigger is created it is added to this collection in the order of creation. When deleted it becomes null. Use 'objectType' -1 to include nulls\n- 8 - Arma 3 v2.12 Vehicle map: ordered vehicles. When vehicle is created it is added to this collection in the order of creation. When deleted it becomes null. Use 'objectType' -1 to include nulls\n- 9 - Arma 3 v2.18 Vehicles and crew: normal entities as in 1 as well as crew if an entity is a vehcile with crew.\n- 10 - Arma 3 v2.22 Windlets: all objects of the type '#windlet'.\n- 11 - Arma 3 v2.22 Active windlets: all objects of the type '#windlet' which are enabled.","type_expr":"Number"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"binary","left":{"text":"objectType"},"right":{"text":"objectCollection"}},{"syntax":"objectType allObjects objectCollection","since":"arma3 2.12","params":[{"name":"objectType","type":"String","description":"type of the objects (will exact match return of typeOf)","type_expr":"String"},{"name":"objectCollection","type":"Number","description":"see main syntax above","type_expr":"Number"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"binary","left":{"text":"objectType"},"right":{"text":"objectCollection"}}],"examples":[{"code":["private _visitorBuildings = 1 allObjects 0;"]},{"code":["private _userPlacedBuildings = 8 allObjects 0;"]},{"text":"```sqf\nonEachFrame\n{\n    hintSilent str\n    [\n        count (63 allObjects 0),\n        count (63 allObjects 1),\n        count (63 allObjects 2),\n        count (63 allObjects 3),\n        count (63 allObjects 4),\n        count (63 allObjects 5),\n        count (63 allObjects 6)\n    ];\n};\n```","code":["onEachFrame\n{\n\thintSilent str\n\t[\n\t\tcount (63 allObjects 0),\n\t\tcount (63 allObjects 1),\n\t\tcount (63 allObjects 2),\n\t\tcount (63 allObjects 3),\n\t\tcount (63 allObjects 4),\n\t\tcount (63 allObjects 5),\n\t\tcount (63 allObjects 6)\n\t];\n};"]},{"code":["private _allGroundWeaponHolders = \"GroundWeaponHolder\" allObjects 0;\nprivate _allSimulatedWeaponHolders = \"WeaponHolderSimulated\" allObjects 1;"]}],"see_also":["getObjectFOV","cursorObject","cursorTarget","createSimpleObject","allMissionObjects","setObjectViewDistance","getObjectViewDistance","objectParent","object","getObjectType","allPlayers","allGroups","allDead","playableUnits","switchableUnits","units","vehicles","allUnitsUAV","allCurators","playersNumber"],"notes":[{"user":"PierreMGI","date":"2022-11-30T17:32:09Z","text":"This command (`63 allObjects 0`) will return lamps or poles but not houses. Use nearestTerrainObjects instead."}]},{"name":"allow3DMode","title":"allow3DMode","type":"command","url":"https://community.bistudio.com/wiki/allow3DMode","revid":363291,"updated":"2024-03-26T10:51:58Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Allow/dissallow 3D mode.,\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map allow3DMode bool","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"bool"}}],"examples":[{"text":"-"}]},{"name":"allowCrewInImmobile","title":"allowCrewInImmobile","type":"command","url":"https://community.bistudio.com/wiki/allowCrewInImmobile","revid":322540,"updated":"2022-06-15T14:00:23Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2oa":"1.60","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.60","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"If true, units will remain in a vehicle with broken tracks/wheels; they will still eject if the vehicle is drowning, about to explode or upside down for a while.\nThe alternative syntax provides the ability to keep the crew in vehicle when it is upside down.","syntaxes":[{"syntax":"vehicle allowCrewInImmobile allow","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"allow","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"allow"}},{"syntax":"vehicle allowCrewInImmobile [brokenWheels, upsideDown]","since":"arma3 2.10","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"brokenWheels","type":"Boolean","description":"do not auto eject when vehicle has broken wheels","type_expr":"Boolean"},{"name":"upsideDown","type":"Boolean","description":"do not auto eject when vehicle is upside down","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[brokenWheels, upsideDown]"}}],"examples":[{"code":["_vehicle allowCrewInImmobile true;"]}],"see_also":["isAllowedCrewInImmobile","setUnloadInCombat","canMove"],"notes":[{"user":"Killzone_Kid","date":"2015-04-27T19:52:00Z","text":"This will stop AI disembarking when immobile\n\n```sqf\nKK_fnc_allowCrewInImmobile = {\n    _this allowCrewInImmobile true;\n    {\n        _x disableAI \"FSM\";\n        _x setBehaviour \"CARELESS\";\n    } forEach crew _this;\n};\n//example\ncar call KK_fnc_allowCrewInImmobile;\n```"}]},{"name":"allowCuratorLogicIgnoreAreas","title":"allowCuratorLogicIgnoreAreas","type":"command","url":"https://community.bistudio.com/wiki/allowCuratorLogicIgnoreAreas","revid":348345,"updated":"2023-11-08T12:59:49Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Allows curator placing and working with modules outside of edit areas.","syntaxes":[{"syntax":"curatorObj allowCuratorLogicIgnoreAreas allow","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"},{"name":"allow","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"allow"}}],"examples":[{"code":["curatorModule allowCuratorLogicIgnoreAreas true;"]}],"see_also":["Arma 3: Curator","addCuratorEditingArea","removeCuratorEditingArea","removeAllCuratorEditingAreas","curatorEditingArea"]},{"name":"allowDamage","title":"allowDamage","type":"command","url":"https://community.bistudio.com/wiki/allowDamage","revid":378125,"updated":"2026-02-21T14:29:34Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Enables / disables an entity's ability to receive damage.\nThis command does not prevent the entity from taking scripted damage from commands such as setDamage, setHit, setHitIndex or setHitPointDamage.\n\n> [!NOTE]\n> This command only supports entities (`Entity` is a child class of `Object`, i.e. all entities are objects, but not all objects are entities).\n> Consequently, there are objects that are not affected by this command, for example terrain vegetation such as trees.","syntaxes":[{"syntax":"entity allowDamage allow","params":[{"name":"entity","type":"Object","type_expr":"Object"},{"name":"allow","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"entity"},"right":{"text":"allow"}}],"examples":[{"code":["player allowDamage false;"]}],"multiplayer":"> [!IMPORTANT]\n> This command has to be executed where the object is local.\n>\n> Its effect will only last as long as the object does not change locality.\n>\n> If the object changes locality, the command needs to be executed again on the new owner's machine to maintain the effect.","aliases":["allowDammage"],"see_also":["isDamageAllowed","setDamage","setHit","setHitIndex","setHitPointDamage","damage"],"notes":[{"user":"AgentRev01","date":"2013-09-02T18:26:00Z","text":"```sqf\n_object allowDamage false;\n```\n\nhas the same effect as\n\n```sqf\n_object addEventHandler [\"HandleDamage\", { 0 }];\n```\n\n**except for buildings that are native to the map**; for those, the effects of HandleDamage will not sync properly across all clients, even if added to the building on every client and the server."}]},{"name":"allowDammage","title":"allowDammage","type":"command","url":"https://community.bistudio.com/wiki/allowDammage","revid":310281,"updated":"2022-05-05T13:11:25Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Allow or prevent an object being damaged (or injured, or killed). The command does not prevent object from taking scripted damage such as setDamage or setHit.","syntaxes":[{"syntax":"object allowDammage allow","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"allow","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"allow"}}],"examples":[{"code":["player allowDammage false;"]}],"multiplayer":"> [!IMPORTANT]\n> The command has to be executed where the object is local and will be effective as long as the object does not change locality.\n> If the object changes locality, the command needs to be executed again on the new owner's machine to maintain the effect.","problems":"This command did nothing until Arma 2.","aliases":["allowDamage"],"see_also":["setDamage","damage","allowDamage"]},{"name":"allowedService","title":"allowedService","type":"command","url":"https://community.bistudio.com/wiki/allowedService","revid":338348,"updated":"2023-02-28T14:43:47Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","locality":{"argument":"global"},"description":"Returns which types of repair/refuel/rearm service are allowed. The two available types are manual, where the action is displayed to the user, and auto, where the service happens within distance.\nThe engine default is both (manual and auto) for historic reasons.","syntaxes":[{"syntax":"allowedService vehicle","params":[{"name":"vehicle","type":"Object","description":"supply vehicle, i.e. ammo truck","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"0: none, 1: auto, 2: manual, 3: both, -1: unsupported"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["if (allowedService _vehicle == -1) then { hint \"this is not a service vehicle!\" };"]}],"see_also":["allowService","needService"]},{"name":"allowFileOperations","title":"allowFileOperations","type":"command","url":"https://community.bistudio.com/wiki/allowFileOperations","revid":363287,"updated":"2024-03-26T10:51:56Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Allow/dissallow file ops (load/save etc).\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map allowFileOperations bool","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"bool"}}],"examples":[{"text":"-"}]},{"name":"allowFleeing","title":"allowFleeing","type":"command","url":"https://community.bistudio.com/wiki/allowFleeing","revid":310112,"updated":"2022-05-05T12:25:24Z","groups":["Object Manipulation","Groups"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets the cowardice level (the lack of courage or bravery) of a group or unit.\n\nNotes:\n\n- Fleeing only affects AI led groups.\n- Only the group as a whole can flee (or not).\n- The courage of the AI group is based on the group's leader courage subskill.\n- Each group has a max strength (summed \"armor\" of all infantry units - plus armor when inside vehicles).\n- If the group losses by injury/damage or death/destruction are higher than the max strength, multiplied by leader's courage or allowFleeing level , then the group will start fleeing.\n- As result primarily the AI flees to a nearby \"supply point\" (some friendly units - preferably with medic or engineer, or a vehicle with repair/ammo/fuel cargo). Alternatively it will try to find a safe position within a 600m radius from the initial waypoint (danger, distance, amount of cover positions are taken into account).\n- After the fleeing has been finished the group's initial strength is reset.\n- Fleeing units in combatMode red, will be set to yellow when fleeing to avoid engaging enemies while doing so.\n- While fleeing, the group leader will be set to green, to avoid giving engage or fire orders, unless in combatMode blue already. Also speedMode is set to full.\n- When reaching their flee point/destination, they will change to combatMode yellow and speedMode normal.\n- With allowFleeing one can make unit's flee earlier (or essentially never flee). Apply it, overrides the courage subskill influence.","syntaxes":[{"syntax":"unitOrGroup allowFleeing cowardice","params":[{"name":"unitOrGroup","type":"Object or Group","type_expr":"Object | Group"},{"name":"cowardice","type":"Number","description":"1 is maximum cowardice and 0 minimum. A value of 0 will disable fleeing all together","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitOrGroup"},"right":{"text":"cowardice"}}],"examples":[{"code":["_group1 allowFleeing 0;"]}],"see_also":["fleeing"]},{"name":"allowGetIn","title":"allowGetIn","type":"command","url":"https://community.bistudio.com/wiki/allowGetIn","revid":318643,"updated":"2022-05-13T09:21:14Z","groups":["Object Manipulation","Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Set if the units given in the list are allowed to enter vehicles.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"unitArray allowGetIn allow","params":[{"name":"unitArray","type":"Array of Objects","type_expr":"Array<Object>"},{"name":"allow","type":"Boolean","description":"true allows the units to enter, false denies them","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitArray"},"right":{"text":"allow"}}],"examples":[{"code":["[_soldier1, _soldier2] allowGetIn true;"]}],"see_also":["orderGetIn"]},{"name":"allowService","title":"allowService","type":"command","url":"https://community.bistudio.com/wiki/allowService","revid":338347,"updated":"2023-02-28T14:43:36Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","locality":{"argument":"local","effect":"global"},"description":"Sets which type of repair/refuel/rearm service is allowed. The two available types are manual, where the action is displayed to the user, and auto, where the service happens within distance.\nThe engine default is both (manual and auto) for historic reasons.","syntaxes":[{"syntax":"vehicle allowService type","params":[{"name":"vehicle","type":"Object","description":"supply vehicle, i.e. ammo truck","type_expr":"Object"},{"name":"type","type":"Number","description":"0: none, 1: auto, 2: manual, 3: both","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"type"}}],"examples":[{"code":["ammoTruck allowService 0;"]}],"see_also":["allowedService","needService"]},{"name":"allowSprint","title":"allowSprint","type":"command","url":"https://community.bistudio.com/wiki/allowSprint","revid":341801,"updated":"2023-06-24T08:22:32Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","locality":{"argument":"local","effect":"local"},"description":"Force player to run/jog if set to false.","syntaxes":[{"syntax":"unit allowSprint state","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"state","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"state"}}],"examples":[{"code":["player allowSprint false;"]}],"see_also":["Arma 3: Stamina","isSprintAllowed"]},{"name":"allPlayers","title":"allPlayers","type":"command","url":"https://community.bistudio.com/wiki/allPlayers","revid":370218,"updated":"2024-11-10T14:50:49Z","groups":["Multiplayer","Object Detection"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","description":"Returns a list of all units controlled by connected clients. This includes:\n\n- Normal human players (including dead players)\n- Virtual Entities (see *Systems* → *Logic Entities* → *Virtual Entities* in the Eden Editor)\n  - Headless Clients (`HeadlessClient_F`)\n  - Virtual Curators (`VirtualCurator_F`, `*_VirtualCurator_F`)\n  - Virtual Spectators (`VirtualSpectator_F`)\n\nUse BIS_fnc_listPlayers or see Example 1 to only get human players.","syntaxes":[{"syntax":"allPlayers","params":[],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"nullary"}],"examples":[{"text":"Get human players (i.e. all players excluding Headless Clients):\n\n```sqf\nprivate _players = allPlayers - entities \"HeadlessClient_F\";\n```","code":["private _players = allPlayers - entities \"HeadlessClient_F\";"]},{"text":"Get non-virtual players (i.e. all players excluding Virtual Entities):\n\n```sqf\nprivate _players = allPlayers select {!(_x isKindOf \"VirtualMan_F\")};\n```","code":["private _players = allPlayers select {!(_x isKindOf \"VirtualMan_F\")};"]},{"text":"```sqf\n{\n    systemChat format [\n        \"Player %1 is %2\",\n        name _x,\n        [\"dead\", \"alive\"] select alive _x\n    ];\n} forEach allPlayers;\n```","code":["{\n\tsystemChat format [\n\t\t\"Player %1 is %2\", \n\t\tname _x, \n\t\t[\"dead\", \"alive\"] select alive _x\n\t];\n} forEach allPlayers;"]},{"code":["private _bluforPlayers = blufor countSide allPlayers;"]}],"multiplayer":"- The complete array of allPlayers may get delayed on mission start in multiplayer. Use BIS_fnc_listPlayers to obtain it earlier.\n- The order of the returned array may differ from server to clients.","see_also":["allCurators","allGroups","allDead","allUnits","switchableUnits","playableUnits","vehicles","allUnitsUAV","allDeadMen","isPlayer","playersNumber","allUsers","getUserInfo"]},{"name":"allSimpleObjects","title":"allSimpleObjects","type":"command","url":"https://community.bistudio.com/wiki/allSimpleObjects","revid":377075,"updated":"2026-01-01T09:37:55Z","groups":["Object Detection"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"Returns array of all simple objects that belong to the listed class names. If the array of types is empty [], all simple objects are returned including those without class name.\n\n> [!NOTE]\n> - There is no inheritance in simple objects, so only exact class match is allowed.\n> - *className* is not case sensitive.","syntaxes":[{"syntax":"allSimpleObjects classes","params":[{"name":"classes","type":"Array of Strings","description":"classnames array. Use `[]` to return all simple objects","type_expr":"Array<String>"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"all simple objects"},"form":"unary","right":{"text":"classes"}}],"examples":[{"code":["private _boxesAndChairs = allSimpleObjects [\"Box_NATO_Equip_F\", \"Land_CampingChair_V2_F\"];"]},{"code":["private _allSimpleObjects = allSimpleObjects [];"]}],"see_also":["createSimpleObject","isSimpleObject","nearestObjects","nearObjectsReady","nearObjects","nearestObject","createVehicle"]},{"name":"allSites","title":"allSites","type":"command","url":"https://community.bistudio.com/wiki/allSites","revid":378477,"updated":"2026-04-24T11:33:54Z","groups":["Broken Commands","Sides"],"status":"broken","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Return all sites in map.\n\n> [!WARNING]\n> This command is considered deprecated and is no longer supported","syntaxes":[{"syntax":"allSites","params":[],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"nullary"}],"examples":[{"code":["_allSites = allSites;"]}],"see_also":["deleteSite","createSite","allGroups","allDead","playableUnits","switchableUnits","vehicles","allUnitsUAV","allCurators","allDeadMen"],"notes":[{"user":"Killzone_Kid","date":"2022-08-29T21:48:02Z","text":"Well, this command is not broken, it just doesn't have anything to return."}]},{"name":"allTurrets","title":"allTurrets","type":"command","url":"https://community.bistudio.com/wiki/allTurrets","revid":378481,"updated":"2026-04-24T12:20:34Z","groups":["Turrets"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns array of available turret paths from vehicle object.\n\n> [!NOTE]\n> - to look up turrets from config, use BIS_fnc_allTurrets\n> - to get config from turret path, use BIS_fnc_turretConfig","syntaxes":[{"syntax":"allTurrets vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Turret Paths","type_expr":"Array<Turret Path>"},"form":"unary","right":{"text":"vehicle"}},{"syntax":"allTurrets [vehicle, includeFFV]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"includeFFV","type":"Boolean","description":"true to include FFV (Firing From Vehicle) positions, false to exclude them","type_expr":"Boolean"}],"returns":{"type":"Array of Turret Paths","type_expr":"Array<Turret Path>"},"form":"unary","right":{"text":"[vehicle, includeFFV]"}}],"examples":[{"text":"```sqf\n_turretPaths = allTurrets _mySlammerUP;                // [[0],[0,0]]\n_turretPaths = allTurrets [_mySlammerUP, true];        // [[0],[0,0]] <- commander turret is also an FFV turret\n_turretPaths = allTurrets [_mySlammerUP, false];    // [[0]]\n```","code":["_turretPaths = allTurrets _mySlammerUP;\t\t\t\t// [[0],[0,0]]\n_turretPaths = allTurrets [_mySlammerUP, true];\t\t// [[0],[0,0]] <- commander turret is also an FFV turret\n_turretPaths = allTurrets [_mySlammerUP, false];\t// [[0]]"]},{"text":"Return FFV turrets only:\n\n```sqf\n_FFVTurrets = allTurrets [tank, true] - allTurrets [tank, false];\n```","code":["_FFVTurrets = allTurrets [tank, true] - allTurrets [tank, false];"]}],"see_also":["moveInTurret","enablePersonTurret","assignedVehicleRole","fullCrew","turretUnit","turretLocal","turretOwner","BIS_fnc_allTurrets","BIS_fnc_turretConfig"],"notes":[{"user":"AgentRev","date":"2016-04-13T19:13:00Z","text":"The first syntax (vehicle only without boolean) will include commander turrets like in the example, and does not include actual FFV turrets like offroad back seats, as expected.\nAlso, the driver turret [-1] is never included in the results, which can be solved as follows:\n\n```sqf\n_paths = [[-1]] + allTurrets _vehicle;\n```"}]},{"name":"allUnits","title":"allUnits","type":"command","url":"https://community.bistudio.com/wiki/allUnits","revid":377076,"updated":"2026-01-01T09:38:35Z","groups":["Object Detection"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns a list of all units, **except agents, dead units or units waiting for respawn**, outside and inside vehicles that were created on the following sides east, west, independent and civilian.\n\n> [!NOTE]\n> **Arma 3:** To get all units of given side, use `units Side`.","syntaxes":[{"syntax":"allUnits","params":[],"returns":{"type":"Array of objects","type_expr":"Array<Object>"},"form":"nullary"}],"examples":[{"code":["{ _x setDamage 0.5; _x groupChat \"Braaains\"; } forEach allUnits;"]},{"code":["allUnits apply { diag_log _x; };"]}],"see_also":["allGroups","groups","units","vehicles","entities","agents","playableUnits","switchableUnits","allPlayers","allDead","allDeadMen","allUnitsUAV","allCurators","allObjects","allMissionObjects","allSimpleObjects","allMines"],"notes":[{"user":"Pierre MGI","date":"2018-09-06T16:43:00Z","text":"It returns also BIS_SUPP_HQ created by support modules and headquarters Entity from HQ modules."}]},{"name":"allUnitsUAV","title":"allUnitsUAV","type":"command","url":"https://community.bistudio.com/wiki/allUnitsUAV","revid":379235,"updated":"2026-10-30T23:13:06Z","groups":["Remote Control","Object Detection"],"status":"ok","games":{"arma3":"0.76"},"since":"arma3 0.76","arma3_since":"0.76","description":"Return a list of all UAV vehicles.","syntaxes":[{"syntax":"allUnitsUAV","params":[],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"array of UAV vehicles"},"form":"nullary"}],"examples":[{"code":["hint format [\"Number of UAV(s) on the map: %1\", count allUnitsUAV];"]},{"code":["{ _x setDamage 1 } forEach allUnitsUAV;"]}],"see_also":["unitIsUAV","allCurators","allGroups","allDead","playableUnits","switchableUnits","vehicles","allDeadMen","agents","showUAVFeed","shownUAVFeed","getConnectedUAV","UAVControl","connectTerminalToUAV","isUAVConnected"],"notes":[{"user":"AgentRev","date":"2014-10-10T01:23:00Z","text":"This command returns a list of all unmanned **vehicles**, not the UAV AI units inside them, as the name might otherwise suggest."}]},{"name":"allUsers","title":"allUsers","type":"command","url":"https://community.bistudio.com/wiki/allUsers","revid":378526,"updated":"2026-05-04T01:56:35Z","groups":["Multiplayer","Object Detection"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"server_exec":true},"description":"Returns a list of player ids of all the users on an MP server.\n\n> [!NOTE]\n> This also lists Headless Clients.","syntaxes":[{"syntax":"allUsers","params":[],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"user network IDs (see getPlayerID, getUserInfo)"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (isServer) then\n{\n    private _allUserIDs = allUsers;\n    for \"_i\" from 0 to (count _allUserIds - 1) do\n    {\n        diag_log format [\"User #%1 ID: %2\", _i + 1, _allUserIds select _i];\n    };\n};\n```","code":["if (isServer) then\n{\n\tprivate _allUserIDs = allUsers;\n\tfor \"_i\" from 0 to (count _allUserIds - 1) do\n\t{\n\t\tdiag_log format [\"User #%1 ID: %2\", _i + 1, _allUserIds select _i];\n\t};\n};"]}],"see_also":["getUserInfo","getPlayerID","allPlayers","allCurators","allGroups","allDead","allUnits","switchableUnits","playableUnits","vehicles","allUnitsUAV","allDeadMen","isPlayer","playersNumber"]},{"name":"allVariables","title":"allVariables","type":"command","url":"https://community.bistudio.com/wiki/allVariables","revid":338534,"updated":"2023-03-15T15:11:36Z","groups":["Namespaces","Variables"],"status":"ok","games":{"arma3":"1.38"},"since":"arma3 1.38","arma3_since":"1.38","description":"Returns a list of all variables from the desired namespace.","syntaxes":[{"syntax":"allVariables namespace","params":[{"name":"namespace","type":"Namespace, Object, Group, Task, Location, Team Member, Arma 3 v2.02 Control, Arma 3 v2.02 Display","type_expr":"Namespace | Object | Group | Task | Location | Team Member | Control | Display"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"array of variable names. All names are in lower case (see toLower)"},"form":"unary","right":{"text":"namespace"}}],"examples":[{"code":["_allVarsUINamespace = allVariables uiNamespace;"]},{"code":["_allVarsTrigger = allVariables trigger1;"]}],"multiplayer":"> [!IMPORTANT]\n> Using profileNamespace and uiNamespace with this command has been disabled in multiplayer in Arma 3 v1.40 - see [Changelog](https://forums.bohemia.net/forums/topic/140837-development-branch-changelog/?do=findComment&comment=2869646).","see_also":["allControls","allDisplays","allCurators","allGroups","allDead","allDeadMen"],"notes":[{"user":"longbow","date":"2016-10-01T23:54:00Z","text":"One still can use allVariables in Multiplayer against profileNamespace and uiNamespace using config parser. In Description.ext\n\n```sqf\n_EXEC(someVar = allVariables profileNamespace)\n```\n\nin code\n\n```sqf\n_allProfileVars = parsingNamespace getVariable \"someVar\"\n```\n\nbut this list will be valid only at the moment of config parsing."}]},{"name":"ambientTemperature","title":"ambientTemperature","type":"command","url":"https://community.bistudio.com/wiki/ambientTemperature","revid":347561,"updated":"2023-09-28T09:49:53Z","groups":["Environment"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Returns ambient temperature on the current terrain in Celsius in format: [airTemperature, blackSurfaceTemperature, whiteSurfaceTemperature]","syntaxes":[{"syntax":"ambientTemperature","params":[],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"in format [airTemperature, blackSurfaceTemperature, whiteSurfaceTemperature]","text":"Array of Numbers in format [airTemperature, blackSurfaceTemperature, whiteSurfaceTemperature]"},"form":"nullary"}],"examples":[{"code":["private _airTemp = ambientTemperature select 0;"]}],"see_also":["forceWeatherChange"]},{"name":"ammo","title":"ammo","type":"command","url":"https://community.bistudio.com/wiki/ammo","revid":364083,"updated":"2024-05-03T19:33:29Z","groups":["Unit Inventory"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Check how many rounds are left in the currently loaded magazine in the given muzzle.\n\n> [!NOTE]\n> In older titles and before Arma 3 v1.56, the command did not return ammo for units in vehicles.","syntaxes":[{"syntax":"unit ammo muzzle","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"muzzle","type":"String","description":"weapon's muzzle - see the Weapons topic for reference about possible values","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"unit"},"right":{"text":"muzzle"}}],"examples":[{"code":["_count = player ammo \"M16\"; // returns 30 in case of a full magazine"]},{"code":["_count = player ammo \"M203Muzzle\";"]},{"code":["_count = player ammo primaryWeapon player;"]}],"see_also":["setAmmo","someAmmo","magazines"],"notes":[{"user":".kju","date":"2012-02-17T22:38:00Z","text":"The command works (now?) also for units in vehicles. However only for the vehicle's gunners' weapons - aka those returned by \"weapons vehicle\"."},{"user":".kju","date":"2018-08-30T17:42:00Z","text":"Actually the command wants the `currentMuzzle (gunner _vehicle)` as parameter - not the weapon class.\nMost of the time both are the same. However when you have custom modes[] for the weapons, this is likely not true."}]},{"name":"ammoOnPylon","title":"ammoOnPylon","type":"command","url":"https://community.bistudio.com/wiki/ammoOnPylon","revid":347947,"updated":"2023-11-07T05:27:04Z","groups":["Vehicle Loadouts"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Returns ammo count on given pylon (or false on failure).","syntaxes":[{"syntax":"vehicle ammoOnPylon pylon","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"pylon","type":"String or Number","description":"pylon's name or index","type_expr":"String | Number"}],"returns":{"type":"Number or Boolean","type_expr":"Number | Boolean","description":"false on failure"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"pylon"}}],"examples":[{"code":["private _ammoCount = (vehicle player) ammoOnPylon \"pylon1\";"]},{"code":["hint str (vehicle player ammoOnPylon \"pylonCenter\");"]}],"see_also":["Arma 3: Vehicle Loadouts","setAmmoOnPylon","getCompatiblePylonMagazines","getPylonMagazines","animatePylon","animateBay","setPylonsPriority","setPylonLoadout"],"notes":[{"user":"Commy2","date":"2017-08-18T14:21:00Z","text":"The pylon indices start at 1 and not at 0."}]},{"name":"and","title":"and","type":"command","url":"https://community.bistudio.com/wiki/and","revid":349274,"updated":"2023-11-08T14:51:11Z","groups":["Variables","Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns true only if both conditions are true.\nIn case of the alternative syntax, [lazy evaluation](https://en.wikipedia.org/wiki/Lazy_evaluation#Control_structures) is used - if left operand is false, evaluation of the right side is ignored.","syntaxes":[{"syntax":"a and b","params":[{"name":"a","type":"Boolean","description":"test condition or variable","type_expr":"Boolean"},{"name":"b","type":"Boolean","description":"test condition or variable","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}},{"syntax":"a and b","since":"arma2oa 1.62","params":[{"name":"a","type":"Boolean","description":"test condition or variable","type_expr":"Boolean"},{"name":"b","type":"Code","description":"code that returns Boolean. It is **not** evaluated if *a* is false","type_expr":"Code"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"text":"```sqf\nif ((not isNull player) and (alive player) and (_enemycount == 0)) then\n{\n    hint \"you win !\";\n};\n```","code":["if ((not isNull player) and (alive player) and (_enemycount == 0)) then\n{\n\thint \"you win !\";\n};"]},{"text":"```sqf\nif ((count _array > 0) and { (_array select 0) == player }) then    // works as expected\n{\n    hint \"It works!\";\n};\n\nif ((count _array > 0) and (_array select 0) == player) then        // Error: _array select 0 is evaluated\n{\n    hint \"It... works?\";\n};\n```","code":["if ((count _array > 0) and { (_array select 0) == player }) then\t// works as expected\n{\n\thint \"It works!\";\n};\n\nif ((count _array > 0) and (_array select 0) == player) then\t\t// Error: _array select 0 is evaluated\n{\n\thint \"It... works?\";\n};"]}],"aliases":["a && b"],"see_also":["a && b","or","Operators"]},{"name":"angularVelocity","title":"angularVelocity","type":"command","url":"https://community.bistudio.com/wiki/angularVelocity","revid":377246,"updated":"2026-01-02T05:26:22Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"global"},"description":"Gets the angular velocity of the object in world space as a 3D vector. The units are in Rad/s (radians per second) and rotations are clockwise.","syntaxes":[{"syntax":"angularVelocity obj","params":[{"name":"obj","type":"Object","type_expr":"Object"}],"returns":{"type":"Vector3D","type_expr":"Vector3D","description":"angular velocity of the object in world space ([0,0,0] if angular velocity is not supported by the object)"},"form":"unary","right":{"text":"obj"}}],"examples":[{"code":["angularVelocity myHeli; // [0.01, 0.03, 0.95]"]}],"see_also":["velocity","setAngularVelocity","angularVelocityModelSpace"]},{"name":"angularVelocityModelSpace","title":"angularVelocityModelSpace","type":"command","url":"https://community.bistudio.com/wiki/angularVelocityModelSpace","revid":377253,"updated":"2026-01-02T06:32:32Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"global"},"description":"Gets the angular velocity of the object in model space as a 3D vector. The units are in Rad/s (radians per second) and rotations are clockwise.","syntaxes":[{"syntax":"angularVelocityModelSpace obj","params":[{"name":"obj","type":"Object","type_expr":"Object"}],"returns":{"type":"Vector3D","type_expr":"Vector3D","description":"angular velocity of the object in model space ([0,0,0] if angular velocity is not supported by the object)"},"form":"unary","right":{"text":"obj"}}],"examples":[{"code":["hint str angularVelocityModelSpace myHeli; // [0.01, 0.03, 0.95]"]}],"see_also":["velocityModelSpace","setAngularVelocityModelSpace","angularVelocity"]},{"name":"animate","title":"animate","type":"command","url":"https://community.bistudio.com/wiki/animate","revid":379236,"updated":"2026-10-30T23:14:27Z","groups":["Animations"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Activates given object animation. Animation is defined in CfgModels animations class. Class names listed in CfgVehicles AnimationSources bound to \"Proxy\" controller can also be animated with animate command (see Arma 3: createVehicle/vehicles).\n\n> [!NOTE]\n> Since Arma 3 v2.24 parachutes are supported. The phases for a parachute animation are: 0...1 - pulling of the parachute from the bag, 1...2 - opening of the canopy, 2...3 packing of the canopy. The animation name is \"\". You can only skip forward the animation of the parachute. For example:\n>\n> ```sqf\n> _para animate [\"\", 1]; // skips parachute animation forward to the canopy opening\n> ```\n>\n> Giving negative phase would delay the whole parachute opening animation until the phase rolls up to 0. See also animationPhase\n\n> [!NOTE]\n> **Arma 3:**\n>\n> - It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimised for multiplayer\n> - Since Arma 3 v1.58 animation names can be obtained with animationNames\n\n> [!WARNING]\n> Mixing animateSource command with animate command to animate the same part may produce some undefined behaviour.","syntaxes":[{"syntax":"object animate [animationName, phase, speed]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"animationName","type":"String","description":"name of the animation. This is the class-name of the animation defined in the config","type_expr":"String"},{"name":"phase","type":"Number","description":"range 0 (start point of the animation) to 1 (end point of the animation). The speed, in which the animation is processed, is defined in the addon's config.cpp and cannot be changed during running missions","type_expr":"Number"},{"name":"speed","type":"Boolean or Arma 3 v1.66 Number","optional":true,"default":"false","description":"when true animation is instant; Number > 0 is treated as config speed value multiplier","type_expr":"Boolean | Number","text":"speed: Boolean or Arma 3 v1.66 Number - (Optional, default false) when true animation is instant; Number > 0 is treated as config speed value multiplier"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[animationName, phase, speed]"}}],"examples":[{"code":["_building animate [\"maindoor\", 1];"]},{"code":["_building animate [\"Door_1_rot\", 1, true];"]},{"text":"Create Offroad and add flashing police light bar:\n\n```sqf\noffroad = \"C_Offroad_01_F\" createVehicle (player getRelPos [5, 0]);\noffroad animate [\"HidePolice\", 0];\noffroad animate [\"BeaconsStart\", 1];\n```","code":["offroad = \"C_Offroad_01_F\" createVehicle (player getRelPos [5, 0]);\noffroad animate [\"HidePolice\", 0];\noffroad animate [\"BeaconsStart\", 1];"]}],"see_also":["animationPhase","setFaceAnimation","animateSource","animationSourcePhase","animateDoor","doorPhase","animationNames"],"notes":[{"user":"Mikero","date":"2007-08-23T22:50:00Z","text":"Animations can be used on existing game models such as houses that have doors eg. The general syntax is\n\n```sqf\nhouse animate [\"dvere1\", 1]\n```\n\nto 'open' the door and\n\n```sqf\nhouse animate [\"dvere1\", 0]\n```\n\nto 'close' it. Whether used on Oem addons, or official ones, an internal working knowledge (via config.cpp) of the model's animated name(s) is required.\n\n'open' and 'close' are visual perceptions of the state of the model, and are a design decision of the p3d. Open does not, necessarily mean, 1, and close does not mean 0.\n'0' and '1' are better seen as FULLY_OFF and FULLY_ON\nIf a door is initially closed in the model, FULLY_ON, will open it. If it is initialy OPEN visually, in the model, FULLY_ON will close it.\n\n`initphase = 1;` (in config cpp) does not alter open and close meanings, all it does is set the model to the 'on' (rather than 'off') state to begin with. Whether on means open or close visually is a p3d design decision."},{"user":"Tyger","date":"2008-12-06T08:23:00Z","text":"Also, to animate the object called \"Bar Gate\" in ArmA, use the following:\n\n```sqf\nmyGate animate [\"Bargate\",1]\n```\n\nto close it, and\n\n```sqf\nmyGate animate [\"Bargate\", 0]\n```\n\nto open it."},{"user":"RageBone","date":"2016-02-16T21:33:00Z","text":"\"Bargate\" was exchanged with \"Door_1_rot\" at one point:\n\n```sqf\nobject animate [\"Bargate\", 0]; // doesn't work\n```\n\n```sqf\nobject animate [\"Door_1_rot\", 0]; // works\n```"},{"user":"Killzone_Kid","date":"2016-03-14T00:34:00Z","text":"To animate bargate use animateSource:\n\n```sqf\nbargate animateSource [\"Door_1_source\", 1];\n```"},{"user":"SteveStevenson","date":"2017-11-25T20:55:00Z","text":"For pop-up targets, you can keep the target down (until you tell it to pop up) with:\n\n```sqf\ntarget1 animate [\"terc\", 1];\n```\n\nWhen you're ready for the target to pop up, you can use:\n\n```sqf\ntarget1 animate [\"terc\", 0];\n```\n\nWith this setting, the target will return to its usual behavior of going down when hit and automatically popping back up again. To make the target stay down after being hit, add the following line:\n\n```sqf\ntarget1 addEventHandler [\"HitPart\", { target1 animate [\"terc\", 1]; }];\n```"}]},{"name":"animateBay","title":"animateBay","type":"command","url":"https://community.bistudio.com/wiki/animateBay","revid":347988,"updated":"2023-11-08T10:17:14Z","groups":["Animations","Vehicle Loadouts"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"global","effect":"local"},"description":"Forces animation of bay to given state, -1 for reset to engine handling, can cause weapon inoperative, because weapon is released when bay state == 1.\n\n> [!NOTE]\n> While there is no getter to read the animation phase of the given bay, the animationPhase command can be used with the individual bay door name from animationNames as a workaround (See Example 3).","syntaxes":[{"syntax":"vehicle animateBay [bay, animphase, instant]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"bay","type":"Number","description":"bay index (index starts from 1 and different from pylon index)","type_expr":"Number"},{"name":"animphase","type":"Number","description":"animation phase in range 0..1","type_expr":"Number"},{"name":"instant","type":"Boolean","optional":true,"default":"false","description":"animate immediately","type_expr":"Boolean","text":"instant: Boolean - (Optional, default false) animate immediately"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[bay, animphase, instant]"}}],"examples":[{"code":["vehicle player animateBay [1, 0.5];"]},{"code":["vehicle player animateBay [1, 1, true];"]},{"text":"Getter example, here for the UCAV Sentinel:\n\n```sqf\nucav animateBay [1, 1];\n// can be checked with\nucav animationPhase \"weapons_bay_l_1\";\n// or\nucav animationPhase \"weapons_bay_l_2\";\n```","code":["ucav animateBay [1, 1];\n// can be checked with\nucav animationPhase \"weapons_bay_l_1\";\n// or\nucav animationPhase \"weapons_bay_l_2\";"]}],"see_also":["Arma 3: Vehicle Loadouts","getCompatiblePylonMagazines","getPylonMagazines","setAmmoOnPylon","ammoOnPylon","animatePylon","setPylonsPriority","setPylonLoadout"]},{"name":"animateDoor","title":"animateDoor","type":"command","url":"https://community.bistudio.com/wiki/animateDoor","revid":347589,"updated":"2023-09-28T20:03:54Z","groups":["Animations"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Animates a door on a vehicle. Animation is defined in config file in CfgVehicles -> AnimationSources. Wanted animation phase is set with phase param. This command works only on animation sources with \"door\" controller. Door_L in the example below can be animated with animateDoor but not CargoRamp_Open: `heli animateDoor [\"Door_L\", 1];`\n\n> [!IMPORTANT]\n> animateDoor `phase` param will be rounded: anything >0.5 will be rounded to 1 and <=0.5 will be rounded to 0. Therefore it is not possible to open a door half way with this command\n\n```cpp\nclass AnimationSources\n{\n    class CargoRamp_Open\n    {\n        source = \"user\";\n        animPeriod = 5;\n        initPhase = 0;\n    };\n    class Door_L\n    {\n        source = \"door\";\n        animPeriod = 1.6;\n    };\n};\n```\n\nTo animate doors or other sources that have \"user\" controller, use animate command, or even better, animateSource (recommended). Sources with \"hit\" controller can be animated with setHitPointDamage command applied to the name contained in hitpoint property. For availability of animation sources and their controller types see: Arma 3: createVehicle/vehicles","syntaxes":[{"syntax":"object animateDoor [doorname, phase, instant]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"doorname","type":"String","type_expr":"String"},{"name":"phase","type":"Number","type_expr":"Number"},{"name":"instant","type":"Boolean","optional":true,"default":"false","description":"when true and phase is either 0 or 1, door will change phase instantaneously","type_expr":"Boolean","text":"instant: Boolean - (Optional, default false) when true and phase is either 0 or 1, door will change phase instantaneously"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[doorname, phase, instant]"}}],"examples":[{"code":["Taru animateDoor [\"Door_1_source\", 1];"]},{"text":"Open left front door on Ifrit instantly:\n\n```sqf\nIfrit animateDoor [\"Door_LF\", 1, true];\n```","code":["Ifrit animateDoor [\"Door_LF\", 1, true];"]}],"see_also":["doorPhase","setFaceAnimation","animate","animationPhase","animateSource","animationSourcePhase","animationNames"]},{"name":"animatePylon","title":"animatePylon","type":"command","url":"https://community.bistudio.com/wiki/animatePylon","revid":336888,"updated":"2023-01-04T16:43:53Z","groups":["Animations","Vehicle Loadouts"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Force animation of pylon to given state, -1 for reset to engine handling, can cause weapon inoperative, because weapon is released when pylon state == 1.","syntaxes":[{"syntax":"vehicle animatePylon [pylon, animphase, instant]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"pylon","type":"Number or Arma 3 v1.94 String","description":"pylon index (index starts from 1) or pylon name (see getCompatiblePylonMagazines - Example 3)","type_expr":"Number | String"},{"name":"animphase","type":"Number","description":"animation phase in range 0..1","type_expr":"Number"},{"name":"instant","type":"Boolean","optional":true,"description":"animate immediately","type_expr":"Boolean","text":"instant: Boolean - (Optional) animate immediately"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[pylon, animphase, instant]"}}],"examples":[{"code":["vehicle player animatePylon [1, 0.5];"]},{"code":["vehicle player animatePylon [\"pylon1\", 0.5];"]},{"code":["vehicle player animatePylon [\"pylon1\", 1, true];"]}],"see_also":["Arma 3: Vehicle Loadouts","getCompatiblePylonMagazines","getPylonMagazines","setAmmoOnPylon","animateBay","setPylonsPriority","setPylonLoadout"]},{"name":"animateSource","title":"animateSource","type":"command","url":"https://community.bistudio.com/wiki/animateSource","revid":353025,"updated":"2024-03-12T11:30:02Z","groups":["Animations"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","locality":{"argument":"global","effect":"global"},"description":"Process an animation of the object. If animate uses class name from CfgModels *Animations*, animateSource uses name defined by the *source* property. AnimationSources can animate multiple animate Animations. AnimationSource is defined in CfgVehicles' AnimationSources (see Arma 3: createVehicle/vehicles).\n\n> [!NOTE]\n> **Arma 3:** It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimized for MP\n\n> [!WARNING]\n> Mixing animateSource command with animate command to animate the same part may produce some undefined behaviour.","syntaxes":[{"syntax":"object animateSource [source, phase, speed]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"source","type":"String","description":"common source","type_expr":"String"},{"name":"phase","type":"Number","description":"wanted animation phase","type_expr":"Number"},{"name":"speed","type":"Boolean or Number","optional":true,"default":"false","description":"Boolean - when set to true, animation is instant\n- Arma 3 v1.66 Number > 0 is treated as config speed value multiplier. Since Arma 3 v2.10 values <= 0 will instantly reset animation to initPhase.","type_expr":"Boolean | Number","text":"speed: Boolean or Number - (Optional, default false)\n\n- Boolean - when set to true, animation is instant\n- Arma 3 v1.66 Number > 0 is treated as config speed value multiplier. Since Arma 3 v2.10 values <= 0 will instantly reset animation to initPhase."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[source, phase, speed]"}}],"examples":[{"code":["house animateSource [\"Door_1_source\", 1, true];"]},{"text":"Create UGV and manipulate its turret (Not possible to do with animate command. See Arma 3: createVehicle/vehicles for reference)\n\n```sqf\nugv = \"B_UGV_01_F\" createVehicle (player getRelPos [5, 0]);\nugv addAction [\"Show Turret\",\n{\n    ugv animateSource [\"Turret\", 0];\n    ugv animateSource [\"MainTurret\", rad 0, true];\n    ugv animateSource [\"MainGun\", rad 0, true];\n}];\nugv addAction [\"Hide Turret\",    { ugv animateSource [\"Turret\", 1] }];\nugv addAction [\"Turret Left\",    { ugv animateSource [\"MainTurret\",     rad 90] }];\nugv addAction [\"Turret Right\",    { ugv animateSource [\"MainTurret\",    -rad 90] }];\nugv addAction [\"Turret Up\",        { ugv animateSource [\"MainGun\",         rad 30] }];\nugv addAction [\"Turret Down\",    { ugv animateSource [\"MainGun\",        -rad 20] }];\n```","code":["ugv = \"B_UGV_01_F\" createVehicle (player getRelPos [5, 0]);\nugv addAction [\"Show Turret\",\n{\n\tugv animateSource [\"Turret\", 0];\n\tugv animateSource [\"MainTurret\", rad 0, true];\n\tugv animateSource [\"MainGun\", rad 0, true];\n}];\nugv addAction [\"Hide Turret\",\t{ ugv animateSource [\"Turret\", 1] }];\nugv addAction [\"Turret Left\",\t{ ugv animateSource [\"MainTurret\",\t rad 90] }];\nugv addAction [\"Turret Right\",\t{ ugv animateSource [\"MainTurret\",\t-rad 90] }];\nugv addAction [\"Turret Up\",\t\t{ ugv animateSource [\"MainGun\",\t\t rad 30] }];\nugv addAction [\"Turret Down\",\t{ ugv animateSource [\"MainGun\",\t\t-rad 20] }];"]},{"code":["barGate animateSource [\"Door_1_sound_source\", 1]; // Open\nbarGate animateSource [\"Door_1_sound_source\", 0]; // Close"]},{"text":"Open/close Bar Gate automatically:\n\n```sqf\n// Bar Gate init\nif (isServer) then\n{\n    private _gateTrigger = createTrigger [\"EmptyDetector\", getPosWorld this, false];\n    _gateTrigger setVariable [\"BarGateObj\", this];\n    _gateTrigger setTriggerActivation [\"ANYPLAYER\", \"PRESENT\", true];\n    _gateTrigger setTriggerArea [5, 25, getDir this, true];\n    _gateTrigger setTriggerStatements\n    [\n        \"this\",\n        \"thisTrigger getVariable 'BarGateObj' animateSource ['Door_1_sound_source', 1]\",\n        \"thisTrigger getVariable 'BarGateObj' animateSource ['Door_1_sound_source', 0]\"\n    ];\n};\n```","code":["// Bar Gate init\nif (isServer) then\n{\t\n\tprivate _gateTrigger = createTrigger [\"EmptyDetector\", getPosWorld this, false];\n\t_gateTrigger setVariable [\"BarGateObj\", this];\n\t_gateTrigger setTriggerActivation [\"ANYPLAYER\", \"PRESENT\", true];\n\t_gateTrigger setTriggerArea [5, 25, getDir this, true];\n\t_gateTrigger setTriggerStatements \n\t[\n\t\t\"this\",\n\t\t\"thisTrigger getVariable 'BarGateObj' animateSource ['Door_1_sound_source', 1]\",\n\t\t\"thisTrigger getVariable 'BarGateObj' animateSource ['Door_1_sound_source', 0]\"\n\t];\n};"]}],"see_also":["animationSourcePhase","setFaceAnimation","animate","animationPhase","animateDoor","doorPhase","animationNames"]},{"name":"animationNames","title":"animationNames","type":"command","url":"https://community.bistudio.com/wiki/animationNames","revid":352617,"updated":"2024-02-16T20:51:49Z","groups":["Animations"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns Array of Strings where elements are the names of model animations, which should theoretically be available for use with animate command. However in practice this depends on whether animation is also made available for use in scripts via config.","syntaxes":[{"syntax":"animationNames object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"object"}}],"examples":[{"text":"```sqf\n_names = animationNames static_AT;\n```\n\nReturns: [\"MainTurret\", \"MainGun\", \"MainTurret_destructX\", \"MainTurret_destructY\", \"MainTurret_destructZ\", \"MainGun_destructX\", \"MainGun_destructY\", \"MainGun_destructZ\", \"magazine_destruct\", \"ammo_belt_destruct\", \"bolt_destruct\", \"charging_handle_destruct\", \"damagehideVez_destruct\", \"damagehideHlaven_destruct\", \"damagehideRecoil_destruct\", \"Turret_shake\", \"Turret_shake_aside\", \"Magazine_hide\", \"Ammo_belt_hide\", \"muzzleFlash\", \"AddAutonomous_unhide\", \"bullet001_reload_hide\", \"bullet002_reload_hide\", \"bullet003_reload_hide\", \"bullet004_reload_hide\", \"bullet005_reload_hide\", \"bullet006_reload_hide\", \"bullet007_reload_hide\", \"bullet008_reload_hide\"]","code":["_names = animationNames static_AT;"]}],"see_also":["animate","animationPhase","animateDoor","doorPhase","animateSource","animationSourcePhase","namedProperties","allLODs"]},{"name":"animationPhase","title":"animationPhase","type":"command","url":"https://community.bistudio.com/wiki/animationPhase","revid":379102,"updated":"2026-10-03T12:06:54Z","groups":["Animations"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the phase of the given animation on the given object. Animation can be scripted (animate, animateSource, animateDoor) or engine driven. Animation names for an object could be found out with animationNames command. When animation is rotation, like with \"MainTurret\" for example, the output is in radians, to convert to degrees use deg command.\n\n> [!NOTE]\n> Since Arma 3 v2.24 parachutes are supported. The phases for a parachute animation are: 0...1 - pulling of the parachute from the bag, 1...2 - opening of the canopy, 2...3 packing of the canopy. The animation name is \"\".\n>\n> ```sqf\n> _para animationPhase \"\"; // current animation phase\n> ```\n>\n> See also animate","syntaxes":[{"syntax":"object animationPhase animationName","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"animationName","type":"String","description":"name of the animation. This is the class-name of the animation defined in the addon's config.cpp","type_expr":"String"}],"returns":{"type":"Number in range 0..1","type_expr":"Number","description":"where 0 is the start point of the animation and 0 is the end point"},"form":"binary","left":{"text":"object"},"right":{"text":"animationName"}}],"examples":[{"code":["_building animate [\"maindoor\",1];\nsleep 1;\n_p = _building animationPhase \"maindoor\";// Returns 1, if the animation speed is two seconds"]},{"code":["_flagPole animationPhase \"flag\";"]},{"code":["_tank animationPhase \"MainTurret\";"]}],"multiplayer":"In Operation Flashpoint, on dedicated servers, *animationPhase* will always return 0, no matter what the actual phase is.","see_also":["animate","moveTime","setFaceAnimation","animateDoor","doorPhase","animateSource","animationSourcePhase","animationNames"]},{"name":"animationSourcePhase","title":"animationSourcePhase","type":"command","url":"https://community.bistudio.com/wiki/animationSourcePhase","revid":336879,"updated":"2023-01-04T16:43:50Z","groups":["Animations"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns current animation phase of given source. Similar to animationPhase or doorPhase but designed to complement animateSource. This command could be used to obtain relative turret direction and gun elevation on a vehicle (see Example 2).","syntaxes":[{"syntax":"object animationSourcePhase source","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"source","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"object"},"right":{"text":"source"}}],"examples":[{"code":["private _phase = house animationSourcePhase \"Door_1_source\";"]},{"text":"```sqf\nprivate _mainturretDirection =    deg (_marshall animationSourcePhase \"mainturret\"); // relative to Marshall direction\nprivate _maingunElevation =        deg (_marshall animationSourcePhase \"maingun\");\nprivate _obsturretDirection =    deg (_marshall animationSourcePhase \"obsturret\"); // relative to main turret direction\nprivate _obsgunElevation =        deg (_marshall animationSourcePhase \"obsgun\");\n```","code":["private _mainturretDirection =\tdeg (_marshall animationSourcePhase \"mainturret\"); // relative to Marshall direction\nprivate _maingunElevation =\t\tdeg (_marshall animationSourcePhase \"maingun\");\nprivate _obsturretDirection =\tdeg (_marshall animationSourcePhase \"obsturret\"); // relative to main turret direction\nprivate _obsgunElevation =\t\tdeg (_marshall animationSourcePhase \"obsgun\");"]}],"see_also":["animateSource","animationNames","animate","animationPhase","animateDoor","doorPhase"]},{"name":"animationState","title":"animationState","type":"command","url":"https://community.bistudio.com/wiki/animationState","revid":379238,"updated":"2026-10-30T23:15:53Z","groups":["Animations"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the name of a unit's current primary animation. Seems to be forced to lower case in Arma 3.\n\n> [!NOTE]\n> Up until Arma 3 v2.20 this command only worked for a man unit, and other units such as animals couldn't use this command. As of Arma 3 v2.22 animals are supported as well.","syntaxes":[{"syntax":"animationState unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["_state = animationState player;"]}],"multiplayer":"When executed on a client, this command only returns accurate results when the target unit is within sight of the client. When executed on a dedicated server, the returned value is accurate.","see_also":["gestureState","switchMove","playMove","pose","BIS_fnc_ambientAnimGetParams","getUnitMovesInfo"],"notes":[{"user":"POLPOX","date":"2019-08-13T07:44:00Z","text":"In case you need to get the animation name including upper cases:\n\n```sqf\nconfigName (configFile >> getText (configFile >> \"CfgVehicles\" >> typeOf _unit >> \"moves\") >> \"States\" >> (animationState _unit)) // e.g. \"AmovPercMstpSrasWrflDnon\"\n```\n\nOpposite to regular animationState return value:\n\n```sqf\nanimationState _unit // e.g. \"amovpercmstpsraswrfldnon\"\n```"}]},{"name":"apertureParams","title":"apertureParams","type":"command","url":"https://community.bistudio.com/wiki/apertureParams","revid":377662,"updated":"2026-01-02T09:02:15Z","groups":["Camera Control","Lights"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","locality":{"argument":"local"},"description":"Returns current aperture parameters.","syntaxes":[{"syntax":"apertureParams","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [aperture, isForced, estimatedAperture, estimatedLuminance, minCustom, stdCustom, maxCustom, customLuminance, isCustomForced, blinding]\n- aperture: Number - current aperture - isForced: Boolean - whether aperture was forced by setAperture - estimatedAperture: Number - engine-estimated scene aperture - estimatedLuminance: Number - engine-estimated luminance - minCustom: Number - minimal custom aperture, see setApertureNew - stdCustom: Number - standard custom aperture, see setApertureNew - maxCustom: Number - maximal custom aperture, see setApertureNew - customLuminance: Number - custom luminance, see setApertureNew - isCustomForced: Boolean - whether custom values were forced - blinding: Number - blinding intensity of the light","text":"Array with [aperture, isForced, estimatedAperture, estimatedLuminance, minCustom, stdCustom, maxCustom, customLuminance, isCustomForced, blinding]\n\n- aperture: Number - current aperture\n- isForced: Boolean - whether aperture was forced by setAperture\n- estimatedAperture: Number - engine-estimated scene aperture\n- estimatedLuminance: Number - engine-estimated luminance\n- minCustom: Number - minimal custom aperture, see setApertureNew\n- stdCustom: Number - standard custom aperture, see setApertureNew\n- maxCustom: Number - maximal custom aperture, see setApertureNew\n- customLuminance: Number - custom luminance, see setApertureNew\n- isCustomForced: Boolean - whether custom values were forced\n- blinding: Number - blinding intensity of the light"},"form":"nullary"}],"examples":[{"code":["private _apertureParams = apertureParams;"]}],"see_also":["setApertureNew","setAperture"]},{"name":"append","title":"append","type":"command","url":"https://community.bistudio.com/wiki/append","revid":377193,"updated":"2026-01-01T10:54:49Z","groups":["Arrays"],"status":"ok","games":{"arma3":"1.40"},"since":"arma3 1.40","arma3_since":"1.40","description":"Appends array2 to the back of array1 modifying array1. See insert for an \"appendUnique\" equivalent.\n\n> [!NOTE]\n> append does not return array, it modifies the existing array. If you need to return a copy, use \"+\":\n>\n> ```sqf\n> array3 = array1 + array2;\n> ```","syntaxes":[{"syntax":"array1 append array2","params":[{"name":"array1","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"array2","type":"Array of Anything","type_expr":"Array<Anything>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"array1"},"right":{"text":"array2"}}],"examples":[{"code":["_arr = [1,2,3];\n_arr append [4,5,6];\nhint str _arr; // [1,2,3,4,5,6]"]}],"see_also":["set","pushBack","pushBackUnique","insert","+","apply","select","resize","reverse","count","deleteAt","deleteRange"],"notes":[{"user":"Heeeere's Johnny!","date":"2015-03-09T00:41:00Z","text":"```sqf\n_array1 append _array2;\n```\n\nis roughly 1.2× faster (depending on array size) than\n\n```sqf\n_array1 = _array1 + _array2\n```\n\n(Averaged over 10.000 iterations with two identical arrays containing the numbers 0 through 9)\n\nThe larger the arrays to append, the faster append is as it does not create a new array, which happens with array addition."},{"user":"Killzone_Kid","date":"2015-05-21T10:27:00Z","text":"Array \"unshift\" implementation using append, a faster alternative to BIS_fnc_arrayUnShift:\n\n```sqf\nKK_fnc_unshift = {\n    private [\"_arr\", \"_tmp\"];\n    _arr = _this select 0;\n    _tmp = [_this select 1];\n    _tmp append _arr;\n    _arr resize 0;\n    _arr append _tmp;\n    _arr\n};\n\n// Example\narr = [1,2,3];\n[arr, 0] call KK_fnc_unshift; // both arr and return of function are [0,1,2,3]\n```"},{"user":"Killzone_Kid","date":"2015-05-21T15:21:00Z","text":"Array \"insert\" implementation using append, much faster alternative to BIS_fnc_arrayInsert:\n\n```sqf\nKK_fnc_insert = {\n    private [\"_arr\", \"_i\", \"_res\"];\n    _arr = _this select 0;\n    _i = _this select 2;\n    _res = [];\n    _res append (_arr select [0, _i]);\n    _res append (_this select 1);\n    _res append (_arr select [_i, count _arr - _i]);\n    _res;\n};\n\n// Example\narr = [1,2,3,4];\n[arr, [\"a\",\"b\"], 2] call KK_fnc_insert; // [1,2,\"a\",\"b\",3,4]\n```"},{"user":"Killzone_Kid","date":"2015-05-21T15:52:00Z","text":"A faster alternative to BIS_fnc_arrayPushStack using append:\n\n```sqf\nKK_fnc_pushStack = {\n    _this select 0 append (_this select 1);\n    _this select 0\n};\n\n// Example\narr = [1,2,3];\n[arr, [4,5,6]] call KK_fnc_pushStack; // both arr and function return are [1,2,3,4,5,6]\n```"}]},{"name":"apply","title":"apply","type":"command","url":"https://community.bistudio.com/wiki/apply","revid":377840,"updated":"2026-01-03T04:33:29Z","groups":["Arrays","HashMap"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Applies the given code to each element of the given data structure and collects the results in an array.","syntaxes":[{"syntax":"array apply code","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"code","type":"Code","description":"code to be executed on each element of the array. The current element value is stored in the magic variable _x.","type_expr":"Code"}],"returns":{"type":"Array of Anything","type_expr":"Array<Anything>","description":"resulting array"},"form":"binary","left":{"text":"array"},"right":{"text":"code"}},{"syntax":"hashmap apply code","since":"arma3 2.04","params":[{"name":"hashmap","type":"HashMap","type_expr":"HashMap"},{"name":"code","type":"Code","description":"code to be executed on each key-value pair of the hashmap. The current key is stored in the magic variable _x, the corresponding value is stored in _y.","type_expr":"Code"}],"returns":{"type":"Array of Anything","type_expr":"Array<Anything>","description":"resulting array"},"form":"binary","left":{"text":"hashmap"},"right":{"text":"code"}}],"examples":[{"code":["private _arr = [1,2,3,4,5,6,7,8,9,0] apply { [1,0] select (_x % 2 == 0) }; // [1,0,1,0,1,0,1,0,1,0]"]},{"code":["private _arr = [1,2,3,4,5,6,7,8,9,0] apply { _x ^ _x }; // [1,4,27,256,3125,46656,823543,16777216,387420480,1]"]},{"code":["private _arr1 = [];\n_arr1 resize 20;\n_arr2 = _arr1 apply { 0 }; // [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]"]},{"code":["[0,1,2,3,4] apply { str _x }; // [\"0\",\"1\",\"2\",\"3\",\"4\"]"]},{"code":["private _hashmap = createHashMapFromArray [[\"Key 1\", \"Value 1\"], [\"Key 2\", \"Value 2\"]];\nprivate _array = _hashmap apply { _y + \" Test\" }; // [\"Value 2 Test\",\"Value 1 Test\"]"]}],"see_also":["set","resize","pushBack","pushBackUnique","select","reverse","count","find","in","forEach","deleteAt","deleteRange","append","sort","arrayIntersect"],"notes":[{"user":"Fusselwurm","date":"2016-02-18T11:03:00Z","text":"(to anyone else wondering, I took a minute to get it) this is [Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) in JavaScript"},{"user":"Lou Montana","date":"2018-02-11T23:02:00Z","text":"if performance really is an issue, apply seems to be (very) slightly faster than forEach (by more or less one percent, 0.7-1.5% in my tests to be precise)."}]},{"name":"armoryPoints","title":"armoryPoints","type":"command","url":"https://community.bistudio.com/wiki/armoryPoints","revid":310774,"updated":"2022-05-07T20:21:44Z","groups":["System"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns, stored in [USERNAME].ArmaXProfile, value of *armoryPoints* entry. If the entry doesn't exist, it returns 0.","syntaxes":[{"syntax":"armoryPoints","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_points = armoryPoints;"]}],"see_also":["setArmoryPoints"]},{"name":"arrayIntersect","title":"arrayIntersect","type":"command","url":"https://community.bistudio.com/wiki/arrayIntersect","revid":377192,"updated":"2026-01-01T10:54:34Z","groups":["Arrays"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","description":"Intersects two arrays returning an array of unique common elements, avoiding nil values.\nUsing the same array as both parameters will return unique elements of that array.\nIntersects only the first dimension of said arrays.\n\n> [!NOTE]\n> From Arma 3 v 2.14 the order of the intersected elements would follow 'array1' order","syntaxes":[{"syntax":"array1 arrayIntersect array2","params":[{"name":"array1","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"array2","type":"Array of Anything","type_expr":"Array<Anything>"}],"returns":{"type":"Array of Anything","type_expr":"Array<Anything>"},"form":"binary","left":{"text":"array1"},"right":{"text":"array2"}}],"examples":[{"code":["_arr1 = [1,2,3,4,5,2,3,4];\n_arr2 = [4,5,6,1,2,3,5,6];\nhint str (_arr1 arrayIntersect _arr2); // [4,5,1,2,3]"]},{"code":["_arr = [1,2,3,1,2,3,1,2,3,4,5];\nhint str (_arr arrayIntersect _arr); // [1,2,3,4,5]"]},{"text":"Remove nils:\n\n```sqf\nhint str ([1,2,nil,3] arrayIntersect [1,2,nil,3]); // [1,2,3]\n```","code":["hint str ([1,2,nil,3] arrayIntersect [1,2,nil,3]); // [1,2,3]"]},{"text":"Also works with array elements which are equal:\n\n```sqf\nhint str ([[1],[2],[3]] arrayIntersect [[2],[3],[4]]); // [[2],[3]]\n```","code":["hint str ([[1],[2],[3]] arrayIntersect [[2],[3],[4]]); // [[2],[3]]"]},{"text":"This command is case-sensitive:\n\n```sqf\n[\"cAse\"] arrayIntersect [\"cAse\"]; // [\"cAse\"]\n[\"cAse\"] arrayIntersect [\"casE\"]; // []\n```","code":["[\"cAse\"] arrayIntersect [\"cAse\"]; // [\"cAse\"]\n[\"cAse\"] arrayIntersect [\"casE\"]; // []"]}],"see_also":["append","set","pushBack","pushBackUnique","apply","select","resize","reverse","count","find","in","forEach","deleteAt","deleteRange","sort","param","params","toArray","toString","splitString","joinString","BIS_fnc_arrayPushStack","BIS_fnc_arrayPush"],"notes":[{"user":"Hypoxic125","date":"2024-05-26T16:50:02Z","text":"Selectively filter out elements from _arrayA based on _arrayB.\n\n- Designed to remove the first occurrence of each element found in _arrayB from _arrayA.\n- Useful in removing elements where duplicates may exist.\n\n```sqf\nprivate _arrayA = [1, 2, 3, 2, 4, 5, 4];\nprivate _arrayB = [2, 2, 4];\n\n{\n    private _index = _arrayA find _x;\n    if (_index != -1) then\n    {\n        _arrayA deleteAt _index;\n    };\n} forEach _arrayB;\n\n_arrayA; // is now [1, 3, 5, 4]\n```"}]},{"name":"asin","title":"asin","type":"command","url":"https://community.bistudio.com/wiki/asin","revid":376955,"updated":"2026-01-01T05:40:47Z","groups":["Math - Geometry"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Arcsine of a number, result in Degrees.","syntaxes":[{"syntax":"asin x","params":[{"name":"x","type":"Number in range -1..+1","description":"any other value returns NaN","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"x"}}],"examples":[{"code":["_degrees = asin 0.5; // Returns 30"]}],"see_also":["Math Commands"]},{"name":"ASLToAGL","title":"ASLToAGL","type":"command","url":"https://community.bistudio.com/wiki/ASLToAGL","revid":377463,"updated":"2026-01-02T06:47:34Z","groups":["Positions"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","description":"Converts position from PositionASL to PositionAGL","syntaxes":[{"syntax":"ASLToAGL posASL","params":[{"name":"posASL","type":"PositionASL","description":"position to convert","type_expr":"PositionASL"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL"},"form":"unary","right":{"text":"posASL"}}],"examples":[{"code":["_playerPosAGL = ASLToAGL getPosASL player;"]}],"see_also":["AGLToASL","ASLToATL","ATLToASL","getPos","getPosATL","getPosASL","setUnitFreefallHeight"]},{"name":"ASLToATL","title":"ASLToATL","type":"command","url":"https://community.bistudio.com/wiki/ASLToATL","revid":377532,"updated":"2026-01-02T06:53:16Z","groups":["Positions"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Converts a position from PositionASL to PositionATL","syntaxes":[{"syntax":"ASLToATL pos","params":[{"name":"pos","type":"PositionASL","description":"position to convert","type_expr":"PositionASL"}],"returns":{"type":"PositionATL","type_expr":"PositionATL"},"form":"unary","right":{"text":"pos"}}],"examples":[{"code":["ASLToATL getPosASL player isEqualTo getPosATL player;"]}],"see_also":["ATLToASL","AGLToASL","ASLToAGL","getPos","getPosATL","getPosASL","visiblePosition","visiblePositionASL"]},{"name":"assert","title":"assert","type":"command","url":"https://community.bistudio.com/wiki/assert","revid":363603,"updated":"2024-04-08T09:49:06Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Tests a condition and if the condition is false, displays error on screen (if -showscripterrors enabled) and logs error into .rpt file. It does not interrupt the script execution.\n\nIf script was pre-processed with preprocessFileLineNumbers, it will also show/log the error line number and the file name.","syntaxes":[{"syntax":"assert condition","params":[{"name":"condition","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"mirrors condition"},"form":"unary","right":{"text":"condition"}}],"examples":[{"code":["assert (1 > 2);"]},{"text":"Check function params (Faster alternative to BIS_fnc_param)\n\n```sqf\nsome_func = {\n    _0 = _this select 0;\n    _1 = _this select 1;\n    _2 = _this select 2;\n    if (!assert (\n        typeName _0 == \"ARRAY\" &&\n        typeName _1 == \"STRING\" &&\n        typeName _2 == \"SCALAR\"\n    )) exitWith { /* optional error logging */ };\n    hint \"Alright!\";\n};\n[1,2,3] call some_func; // assert error\n[[1],\"2\",3] call some_func; // Alright!\n```","code":["some_func = {\n\t_0 = _this select 0;\n\t_1 = _this select 1;\n\t_2 = _this select 2;\n\tif (!assert (\n\t\ttypeName _0 == \"ARRAY\" && \n\t\ttypeName _1 == \"STRING\" &&\n\t\ttypeName _2 == \"SCALAR\"\n\t)) exitWith { /* optional error logging */ };\n\thint \"Alright!\";\n};\n[1,2,3] call some_func; // assert error\n[[1],\"2\",3] call some_func; // Alright!"]}],"see_also":["try","catch","throw","halt","diag_captureFrame","diag_captureSlowFrame","diag logSlowFrame"],"notes":[{"user":"RoehrenRadio","date":"2010-05-15T00:01:00Z","text":"Returns false, if condition is false, and returns true, if condition is true."}]},{"name":"assignAsCargo","title":"assignAsCargo","type":"command","url":"https://community.bistudio.com/wiki/assignAsCargo","revid":369104,"updated":"2024-09-03T10:25:28Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Assign a unit as cargo of a vehicle. Used together with orderGetIn to order a unit to get in as cargo into a specific vehicle. Before usage of this command a subordinate unit has not got the option to get into the cargo space of the vehicle.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"unitName assignAsCargo vehicleName","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"vehicleName"}}],"examples":[{"code":["_soldier1 assignAsCargo _truck;\n[_soldier1] orderGetIn true;"]}],"see_also":["assignAsDriver","assignAsGunner","assignAsCommander","assignAsTurret","assignAsCargoIndex","moveInCargo","moveInCommander","moveInDriver","moveInGunner","moveInTurret","assignedVehicleRole","assignedVehicle","unassignVehicle","leaveVehicle","fullCrew"]},{"name":"assignAsCargoIndex","title":"assignAsCargoIndex","type":"command","url":"https://community.bistudio.com/wiki/assignAsCargoIndex","revid":379523,"updated":"2026-10-31T00:50:10Z","groups":["Unit Control"],"status":"ok","games":{"tkoh":"1.01","arma3":"0.50"},"since":"tkoh 1.01","arma3_since":"0.50","description":"Assigns the character to a specific cargo / passenger index of the given vehicle.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"character assignAsCargoIndex [vehicle, index]","params":[{"name":"character","type":"Object","description":"character to assign","type_expr":"Object"},{"name":"vehicle","type":"Object","description":"vehicle to assign to","type_expr":"Object"},{"name":"index","type":"Number","description":"cargo / passenger index","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"character"},"right":{"text":"[vehicle, index]"}}],"examples":[{"code":["player assignAsCargoIndex [myHelicopter, 1];"]}],"see_also":["assignAsCargo","assignAsDriver","assignAsCommander","assignAsGunner","assignAsTurret","getCargoIndex","assignedVehicleRole","unassignVehicle","fullCrew"]},{"name":"assignAsCommander","title":"assignAsCommander","type":"command","url":"https://community.bistudio.com/wiki/assignAsCommander","revid":369099,"updated":"2024-09-03T10:25:27Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Assign a unit as commander of a vehicle. Used together with orderGetIn to order subordinate units to get in as commander of a specific vehicle.\nBefore usage of this command a subordinate unit has not got the option to get into the commander place of the vehicle.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"unitName assignAsCommander vehicleName","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"vehicleName"}}],"examples":[{"code":["_soldier1 assignAsCommander _tank;\n[_soldier1] orderGetIn true;"]}],"see_also":["assignAsDriver","assignAsGunner","assignAsCargo","assignAsTurret","assignAsCargoIndex","moveInCargo","moveInCommander","moveInDriver","moveInGunner","moveInTurret","assignedVehicleRole","assignedVehicle","unassignVehicle","leaveVehicle","fullCrew"]},{"name":"assignAsDriver","title":"assignAsDriver","type":"command","url":"https://community.bistudio.com/wiki/assignAsDriver","revid":369098,"updated":"2024-09-03T10:25:27Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Assign a unit as driver of a vehicle. Used together with orderGetIn to order subordinate units to get in as driver of a specific vehicle. Before usage of this command a subordinate unit has not got the option to get into the driver place of the vehicle.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"unitName assignAsDriver vehicleName","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"vehicleName"}}],"examples":[{"code":["_soldier1 assignAsDriver _tank;\n[_soldier1] orderGetIn true;"]}],"see_also":["assignAsCommander","assignAsGunner","assignAsCargo","assignAsTurret","assignAsCargoIndex","moveInCargo","moveInCommander","moveInDriver","moveInGunner","moveInTurret","assignedVehicleRole","assignedVehicle","unassignVehicle","leaveVehicle","fullCrew"]},{"name":"assignAsGunner","title":"assignAsGunner","type":"command","url":"https://community.bistudio.com/wiki/assignAsGunner","revid":369102,"updated":"2024-09-03T10:25:27Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Assign a unit as gunner of a vehicle. Used together with orderGetIn to order subordinate units to get in as gunner of a specific vehicle. Before usage of this command a subordinate unit has not got the option to get into the gunner place of the vehicle.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"unitName assignAsGunner vehicleName","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"vehicleName"}}],"examples":[{"code":["_soldier1 assignAsGunner _tank;\n[_soldier1] orderGetIn true;"]}],"see_also":["assignAsCommander","assignAsDriver","assignAsCargo","assignAsTurret","assignAsCargoIndex","moveInCargo","moveInCommander","moveInDriver","moveInGunner","moveInTurret","assignedVehicleRole","assignedVehicle","unassignVehicle","leaveVehicle","fullCrew"]},{"name":"assignAsTurret","title":"assignAsTurret","type":"command","url":"https://community.bistudio.com/wiki/assignAsTurret","revid":377474,"updated":"2026-01-02T06:48:45Z","groups":["Turrets"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Assigns the soldier to turret.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"unit assignAsTurret [vehicle, turretPath]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[vehicle, turretPath]"}}],"examples":[{"code":["player assignAsTurret [BIS_vehicle, [0,1]];"]}],"see_also":["assignAsCargo","assignAsDriver","assignAsCommander","assignAsGunner","assignAsCargoIndex","assignedVehicleRole","unassignVehicle","turretUnit","moveInTurret","fullCrew"]},{"name":"assignCurator","title":"assignCurator","type":"command","url":"https://community.bistudio.com/wiki/assignCurator","revid":348458,"updated":"2023-11-08T13:00:18Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Assign player as curator. Two players cannot act as one curator.","syntaxes":[{"syntax":"player assignCurator curatorObj","params":[{"name":"player","type":"Object","type_expr":"Object"},{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"player"},"right":{"text":"curatorObj"}}],"examples":[{"code":["player assignCurator myCurator;"]}],"multiplayer":"Can be executed only on server","see_also":["Arma 3: Curator","unassignCurator"]},{"name":"assignedCargo","title":"assignedCargo","type":"command","url":"https://community.bistudio.com/wiki/assignedCargo","revid":323004,"updated":"2022-06-28T21:43:04Z","groups":["Unit Control","Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the list of soldiers assigned to the given vehicle as a cargo.","syntaxes":[{"syntax":"assignedCargo vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_list = assignedCargo _vehicleName;"]}],"see_also":["assignAsCargo","assignAsGunner","assignAsCommander","assignAsDriver","moveInCargo","moveInGunner","moveInCommander","moveInDriver","assignAsTurret","gunner","commander","driver","moveInTurret","assignedGunner","assignedCommander","assignedDriver"]},{"name":"assignedCommander","title":"assignedCommander","type":"command","url":"https://community.bistudio.com/wiki/assignedCommander","revid":318788,"updated":"2022-05-13T09:21:30Z","groups":["Unit Control","Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the soldier assigned to the given vehicle as a commander.","syntaxes":[{"syntax":"assignedCommander vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_commander = assignedCommander vehicleName;"]}],"see_also":["assignAsCommander","assignAsGunner","assignAsTurret","assignAsDriver","moveInCommander","moveInGunner","moveInTurret","moveInDriver","commander","gunner","assignAsCargo","driver","moveInCargo","assignedGunner","assignedCargo","assignedDriver"]},{"name":"assignedDriver","title":"assignedDriver","type":"command","url":"https://community.bistudio.com/wiki/assignedDriver","revid":363250,"updated":"2024-03-26T10:51:23Z","groups":["Unit Control","Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the soldier assigned to the given vehicle as a driver.","syntaxes":[{"syntax":"assignedDriver vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_driver = assignedDriver vehicleName;"]}],"see_also":["assignAsDriver","assignAsGunner","assignAsTurret","assignAsCommander","moveInDriver","moveInGunner","moveInTurret","moveInCommander","driver","gunner","moveInCargo","commander","assignAsCargo","assignedGunner","assignedCargo","assignedCommander"]},{"name":"assignedGroup","title":"assignedGroup","type":"command","url":"https://community.bistudio.com/wiki/assignedGroup","revid":338335,"updated":"2023-02-28T14:34:19Z","groups":["Groups"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Returns Group to which the given vehicle was added last with addVehicle. To update assignedGroup to the current group, run addVehicle to the current group again.","syntaxes":[{"syntax":"assignedGroup vehicle","params":[{"name":"vehicle","type":"Object","description":"transport","type_expr":"Object"}],"returns":{"type":"Group","type_expr":"Group"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_group = assignedGroup vehicle player;"]}],"see_also":["assignedVehicle","assignedVehicles","addVehicle","assignAsDriver","assignAsCargo","assignAsCommander","assignAsGunner","assignAsTurret","assignAsCargoIndex","unassignVehicle","leaveVehicle","fullCrew"]},{"name":"assignedGunner","title":"assignedGunner","type":"command","url":"https://community.bistudio.com/wiki/assignedGunner","revid":363272,"updated":"2024-03-26T10:51:42Z","groups":["Unit Control","Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the soldier assigned to the given vehicle as a gunner.","syntaxes":[{"syntax":"assignedGunner vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_gunner = assignedGunner vehicle player;"]}],"see_also":["assignAsGunner","assignAsTurret","assignAsCommander","assignAsDriver","moveInGunner","moveInTurret","moveInCommander","moveInDriver","gunner","ArmA: Actions","commander","driver","assignAsCargo","moveInCargo","assignedCommander","assignedDriver"]},{"name":"assignedItems","title":"assignedItems","type":"command","url":"https://community.bistudio.com/wiki/assignedItems","revid":378170,"updated":"2026-03-03T07:06:02Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get array with assigned items. The resulting Array order is not guaranteed.\nTo check availability of a particular slot item use getSlotItemName.\nTo return stored items see items and itemsWithMagazines.","syntaxes":[{"syntax":"assignedItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}},{"syntax":"assignedItems [unit, allItems, includeBinocs]","since":"arma3 2.14","params":[{"name":"unit","type":"Object","description":"soldier","type_expr":"Object"},{"name":"allItems","type":"Boolean","description":"true to include all slot items, false exclude goggles and headgear","type_expr":"Boolean"},{"name":"includeBinocs","type":"Boolean","description":"true to include binoculars (which is a weapon), false to exclude it","type_expr":"Boolean"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"[unit, allItems, includeBinocs]"}}],"examples":[{"code":["hint str assignedItems player;"]}],"see_also":["getSlotItemName","assignItem","unassignItem","linkItem","unlinkItem","addItem","removeItem","removeAllAssignedItems","items","itemsWithMagazines","backpacks"],"notes":[{"user":"Druid","date":"2013-06-18T14:26:00Z","text":"Arma 3, version 0.70 - headgear and goggles are not present in returned array now."},{"user":"Killzone_Kid","date":"2013-08-22T17:52:00Z","text":"For head gear use headgear, addHeadgear and removeHeadgear. For goggles use goggles, addGoggles and removeGoggles"}]},{"name":"assignedTarget","title":"assignedTarget","type":"command","url":"https://community.bistudio.com/wiki/assignedTarget","revid":364219,"updated":"2024-05-06T09:38:11Z","groups":["Object Manipulation"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local"},"description":"Returns the target assigned to an unit or the vehicle's effectiveCommander. The target can be assigned by the group/vehicle/formation leader (as player via quick command menu or \"target\" complex command menu).\nTo unassign the target use doWatch objNull or commandWatch objNull or as player and group leader order \"no target\" in the \"target\" complex command menu.\n\n> [!NOTE]\n> - This command does not return the target a unit is actually engaging (\"attack unit\"). For this information, see getAttackTarget.\n> - If a player is inside a vehicle as the effectiveCommander, the vehicle's crew assignedTarget will always be objNull.","syntaxes":[{"syntax":"assignedTarget vehicleName","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"vehicleName"}}],"examples":[{"code":["_target = assignedTarget _T72;"]}],"see_also":["getAttackTarget","commandTarget","doTarget","commandWatch","doWatch","effectiveCommander","setEffectiveCommander"]},{"name":"assignedTeam","title":"assignedTeam","type":"command","url":"https://community.bistudio.com/wiki/assignedTeam","revid":379239,"updated":"2026-10-30T23:16:59Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2oa":"1.60","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.60","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the team the unit belongs to. Possible values:\n\n- `\"MAIN\"` (default and white)\n- `\"RED\"`\n- `\"GREEN\"`\n- `\"BLUE\"`\n- `\"YELLOW\"`\n- Arma 3 v1.94 `\"\"` if given unit is objNull or remoteControlling another unit","syntaxes":[{"syntax":"assignedTeam unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"(or, prior to Arma 3 v1.94, Nothing if given unit is objNull or remoteControlling another unit)","text":"String (or, prior to Arma 3 v1.94, Nothing if given unit is objNull or remoteControlling another unit)"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["_team = assignedTeam player;"]}],"see_also":["assignTeam"],"notes":[{"user":"Commy2","date":"2014-12-13T23:56:00Z","text":"**Prior to Arma 3 v1.94** assignedTeam might return nil instead of any of the STRINGs above if the player is currently remote controlling a unit."}]},{"name":"assignedVehicle","title":"assignedVehicle","type":"command","url":"https://community.bistudio.com/wiki/assignedVehicle","revid":330331,"updated":"2022-08-31T15:20:27Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.05","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.05","arma3_since":"0.50","locality":{"argument":"local"},"description":"Returns the vehicle to which a unit is assigned, usually with *assignAsXXX* command. If no vehicle is assigned objNull is returned.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"assignedVehicle unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_vehicle = assignedVehicle player;"]},{"code":["_units apply { _x leaveVehicle (assignedVehicle _x) };"]}],"see_also":["assignedVehicleRole","addVehicle","assignAsDriver","assignAsCargo","assignAsCommander","assignAsGunner","assignAsTurret","assignAsCargoIndex","unassignVehicle","leaveVehicle","assignedVehicles","assignedGroup","fullCrew"]},{"name":"assignedVehicleRole","title":"assignedVehicleRole","type":"command","url":"https://community.bistudio.com/wiki/assignedVehicleRole","revid":338904,"updated":"2023-04-17T14:28:10Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.05","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.05","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the role a unit is assigned to within its assigned vehicle.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"assignedVehicleRole unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"the array which is returned contains:\n- [] - not assigned to any vehicle - [\"driver\"] - Assigned as driver - [\"cargo\"] or Arma 3 v1.32 [\"cargo\", [turret path]] - assigned as cargo - [\"turret\", turretPath] - assigned to a turret (turretPath format Turret Path)","text":"Array - the array which is returned contains:\n\n- [] - not assigned to any vehicle\n- [\"driver\"] - Assigned as driver\n- [\"cargo\"] or Arma 3 v1.32 [\"cargo\", [turret path]] - assigned as cargo\n- [\"turret\", turretPath] - assigned to a turret (turretPath format Turret Path)"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["_RoleArray = assignedVehicleRole player;"]},{"text":"Get weapons available to player at player occupied turret:\n\n```sqf\n_weaponsTurret = vehicle player weaponsTurret (assignedVehicleRole player select 1);\n```","code":["_weaponsTurret = vehicle player weaponsTurret (assignedVehicleRole player select 1);"]}],"multiplayer":"On a client the command will return empty arrays for every unit that is not local. On the server the command correctly returns the role, regardless of the units locality.","see_also":["addVehicle","assignedVehicle","unassignVehicle","leaveVehicle","assignAsCargo","assignAsCommander","assignAsDriver","assignAsGunner","assignAsTurret","crew","assignedVehicles","assignedGroup","fullCrew"],"notes":[{"user":"Killzone_Kid","date":"2013-08-31T16:18:00Z","text":"When player is in a group of AIs and is not the leader, assignedVehicleRole of the player could be unpredictable and absolutely not related to the position player occupies.\nIn short, forget about this command for the player, it is unreliable and has been broken too many times in the past."}]},{"name":"assignedVehicles","title":"assignedVehicles","type":"command","url":"https://community.bistudio.com/wiki/assignedVehicles","revid":338334,"updated":"2023-02-28T14:33:58Z","groups":["Groups"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Returns all vehicles added to the given Group with addVehicle.","syntaxes":[{"syntax":"assignedVehicles group","params":[{"name":"group","type":"Group","type_expr":"Group"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"group"}}],"examples":[{"code":["_vehicles = assignedVehicles group player;"]}],"see_also":["assignedVehicle","assignedGroup","addVehicle","assignAsDriver","assignAsCargo","assignAsCommander","assignAsGunner","assignAsTurret","assignAsCargoIndex","unassignVehicle","leaveVehicle","fullCrew"]},{"name":"assignItem","title":"assignItem","type":"command","url":"https://community.bistudio.com/wiki/assignItem","revid":369096,"updated":"2024-09-03T10:25:27Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Assigns existing item from inventory (uniform, vest, backpack) to a correct slot. If the slot is occupied by another item, it gets replaced. See also linkItem.","syntaxes":[{"syntax":"unit assignItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["bluforUnit addItem \"NVGoggles\";\nbluforUnit assignItem \"NVGoggles\";\nopforUnit addItem \"NVGoggles_OPFOR\";\nopforUnit assignItem \"NVGoggles_OPFOR\";\nindependentUnit addItem \"NVGoggles_INDEP\";\nindependentUnit assignItem \"NVGoggles_INDEP\";"]}],"see_also":["unassignItem","addItem","removeItem","linkItem","unlinkItem","assignedItems","removeAllAssignedItems"]},{"name":"assignTeam","title":"assignTeam","type":"command","url":"https://community.bistudio.com/wiki/assignTeam","revid":340282,"updated":"2023-04-28T17:04:36Z","groups":["Groups"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"| Team | Value |\n|---|---|\n| White | \"MAIN\" |\n| Red | \"RED\" |\n| Green | \"GREEN\" |\n| Blue | \"BLUE\" |\n| Yellow | \"YELLOW\" |\n\nAssigns the unit (in case of a vehicle, its commander) to the given team. Team is an option in group control (unit management) menu that allows to split player group in teams and then give bulk order to separate teams.\nIn order to operate properly, the command requires specific conditions:\n\n- the command requires player to be fully initialised\n- the unit getting assigned must be either player himself or a unit in player's group\n\nThe colour of the assigned team for a unit is seen on the group management UI as well as squad radar.\n\n> [!IMPORTANT]\n> In older versions of the game (Arma 2?) the effect of this command is **local** Local effect.","syntaxes":[{"syntax":"unit assignTeam team","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"team","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"team"}}],"examples":[{"code":["_soldier2 assignTeam \"RED\";"]},{"text":"In a unit's init script in the editor spawn should be used, otherwise a [race condition](https://en.wikipedia.org/wiki/Race_condition) may be experienced:\n\n```sqf\nthis spawn { _this assignTeam \"RED\" };\n```","code":["this spawn { _this assignTeam \"RED\" };"]}],"see_also":["assignedTeam","dissolveTeam","unassignTeam"]},{"name":"assignToAirport","title":"assignToAirport","type":"command","url":"https://community.bistudio.com/wiki/assignToAirport","revid":352096,"updated":"2024-02-01T23:24:49Z","groups":["Roads and Airports"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Assigns a plane to an airport ID or object.","syntaxes":[{"syntax":"plane assignToAirport id","params":[{"name":"plane","type":"Object","description":"plane","type_expr":"Object"},{"name":"id","type":"Number","description":"airport id","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"plane"},"right":{"text":"id"}},{"syntax":"plane assignToAirport target","since":"arma3 1.68","params":[{"name":"plane","type":"Object","description":"plane","type_expr":"Object"},{"name":"target","type":"Object","description":"airport object. For example an aircraft carrier, see Arma 3: Dynamic Airport Configuration","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"plane"},"right":{"text":"target"}}],"examples":[{"code":["plane1 assignToAirport 0;"]},{"code":["plane1 assignToAirport carrier1;"]}],"problems":"> [!WARNING]\n> This command is not implemented in **Armed Assault**, use landAt instead.","see_also":["airportSide","setAirportSide","land","landAt","allAirports","Arma: Airport IDs"]},{"name":"atan","title":"atan","type":"command","url":"https://community.bistudio.com/wiki/atan","revid":349989,"updated":"2023-11-20T22:11:41Z","groups":["Math - Geometry"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the **arcus tangens**.","syntaxes":[{"syntax":"atan x","params":[{"name":"x","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"result is in degrees"},"form":"unary","right":{"text":"x"}}],"examples":[{"code":["_degrees = atan 1; // 45"]}],"aliases":["atg"],"see_also":["atg","atan2"]},{"name":"atan2","title":"atan2","type":"command","url":"https://community.bistudio.com/wiki/atan2","revid":363173,"updated":"2024-03-25T08:38:17Z","groups":["Math - Geometry"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"ArcTangent of *y/x*. Used to determine the angle of a vector *[y,x]*. Result in Degrees between -180 and 180.\n\n> [!NOTE]\n> This command can handle *x* being 0, unlike when using atan, and will return 90\n\n> [!IMPORTANT]\n> This command has higher precedence than the select command, therefore beware of the case below:\n>\n> ```sqf\n>  _pos select 0  atan2 (_pos select 1) // error\n> (_pos select 0) atan2 (_pos select 1) // OK\n> ```\n>\n> Alternatively, consider using the # operator: `_pos # 0 atan2 _pos # 1`","syntaxes":[{"syntax":"y atan2 x","params":[{"name":"y","type":"Number","type_expr":"Number"},{"name":"x","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"y"},"right":{"text":"x"}}],"examples":[{"code":["_yx = [5,3];\n_degrees = (_yx select 0) atan2 (_yx select 1); // 59.0362"]},{"text":"Get direction from _obj1 to _obj2:\n\n```sqf\n_vd = getPosASL _obj2 vectorDiff getPosASL _obj1;\n_dir = (_vd select 0) atan2 (_vd select 1); // _dir range from -180 to +180\n_dir = (_dir + 360) % 360; // _dir range from 0 to 360\n```","code":["_vd = getPosASL _obj2 vectorDiff getPosASL _obj1;\n_dir = (_vd select 0) atan2 (_vd select 1); // _dir range from -180 to +180\n_dir = (_dir + 360) % 360; // _dir range from 0 to 360"]},{"text":"Get relative direction from _obj1 to _obj2:\n\n```sqf\n_yx = _obj1 worldToModel getPosASL _obj2;\n_dir = (_yx select 0) atan2 (_yx select 1); // _dir range from -180 to +180\n_dir = (_dir + 360) % 360; // _dir range from 0 to 360\n```","code":["_yx = _obj1 worldToModel getPosASL _obj2;\n_dir = (_yx select 0) atan2 (_yx select 1); // _dir range from -180 to +180\n_dir = (_dir + 360) % 360; // _dir range from 0 to 360"]}],"see_also":["atan","tan","sin","cos","asin","acos","rad","pi","vectorCos","BIS_fnc_dirTo","getRelPos","getRelDir"]},{"name":"atg","title":"atg","type":"command","url":"https://community.bistudio.com/wiki/atg","revid":349988,"updated":"2023-11-20T22:11:41Z","groups":["Math - Geometry"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the **arcus tangens**.","syntaxes":[{"syntax":"atg x","params":[{"name":"x","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"result in degrees"},"form":"unary","right":{"text":"x"}}],"examples":[{"code":["_atanThreeFifth = atg 3/5;"]}],"aliases":["atan"],"see_also":["atan"]},{"name":"ATLToASL","title":"ATLToASL","type":"command","url":"https://community.bistudio.com/wiki/ATLToASL","revid":377536,"updated":"2026-01-02T06:53:28Z","groups":["Positions"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Converts a position from PositionATL to PositionASL","syntaxes":[{"syntax":"ATLToASL pos","params":[{"name":"pos","type":"PositionATL","description":"position to convert","type_expr":"PositionATL"}],"returns":{"type":"PositionASL","type_expr":"PositionASL"},"form":"unary","right":{"text":"pos"}}],"examples":[{"code":["ATLToASL (getPosATL player) isEqualTo getPosASL player;"]},{"code":["_camPosASL = ATLToASL positionCameraToWorld [0,0,0];"]}],"see_also":["ASLToATL","AGLToASL","ASLToAGL","getPos","getPosATL","getPosASL"]},{"name":"attachChild","title":"attachChild","type":"command","url":"https://community.bistudio.com/wiki/attachChild","revid":378902,"updated":"2026-08-11T14:56:33Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"local","effect":"global"},"description":"Attaches a child object to a parent, similar to attachTo but instead of a rigid/forced attachment its using a PhysX joint.\n\n> [!NOTE]\n> For more information see [NVIDIA docs](https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/Joints.html).\n\nNote that the joint parameters XYZ orientations, are according to the localFrame of the joint. swingZ/swingY/twist being Yaw/Roll/Pitch, can be changed if the joint itself is rotated, because the joint rotation moves the whole axis.","syntaxes":[{"syntax":"[parent, child] attachChild [jointType, localFrameParent, localFrameChild, miscFlags, jointDescription]","params":[{"name":"parent","type":"Object","description":"the parent object that another object is attached to. Must be a Transport vehicle like Car/Tank (Maybe helicopter/airplane works?).","type_expr":"Object"},{"name":"child","type":"Object","description":"the object being attached onto the parent. Must be a Transport vehicle like Car/Tank (Maybe helicopter/airplane works?).","type_expr":"Object"},{"name":"jointType","type":"String","description":"currently only \"6DOFJoint\" and \"RevoluteJoint\" and \"FixedJoint\"\n\n**6DOFJoint:** Allows to configure all axis (XYZ translation, Pitch/Yaw/Roll rotation) limits and drives.\n\n**RevoluteJoint:** Only allows rotation around the X axis, a Revolute joint can also be implemented with a 6DOFJoint and the appropriate limits (internally it is implemented exactly like that)\n\n**FixedJoint:** Limited in all axis, it essentially works like a PhysX based attachTo.","type_expr":"String"},{"name":"localFrameParent","type":"Array","description":"the Position and orientation, in parent's model-space of where the joint will be placed.\nAn Array of 3 elements [position, upPos, dirPos]\nEach element can either be a Vector (3-element array of Number) or a Memory point name (String).\n\nAn important Caveat when using Vectors is that dir and up are not direction vectors, but positions.\nEssentially, upPos/dirPos would be the model-space coordinates of where the memory point would be.\nFor example:\n\n```sqf\nprivate _jointPos = [0, 0, 0];\nprivate _vectorDir = [0, 1, 0];\nprivate _vectorUp = [0, 0, 1];\n[_jointPos, _jointPos vectorAdd _vectorDir, _jointPos vectorAdd _vectorUp];\n```","type_expr":"Array"},{"name":"localFrameChild","type":"Array","description":"the position and orientation, in child's model-space of where the joint will be placed.","type_expr":"Array"},{"name":"miscFlags","type":"Array","description":"[(collisionEnabled, breakForce)]\n\ncollisionEnabled: Boolean (Optional, Default: false) - When false, disables collision between the two joint-ed objects\n\nbreakForce: Number (Optional, Default: -1)\n\nlimitsAreForces?","type_expr":"Array"},{"name":"jointDescription","type":"Array","description":"this specifies the behavior/limits of the joint.\n[(linearLimit, swingLimit, twistLimit, drives)]\n\nNote that all are optional. Passing an empty array is equivalent to using a \"FixedJoint\" type\n\n**linearLimit**\n\nArray - Linear limit specifies the joints permitted translation along the XYZ axis.\nThere are three types of linear limits, fully locked, per-axis limit and distance limit.\n\n**Fully Locked:**\n\n[]\nEmpty array, will completely lock the XYZ translational axes, only allowing rotational movement (If allowed in the swing/twist limits)\n\n**Per axis:**\n\n[limitX, limitY, limitZ]\n\n**limit*:**\n\nArray - [lowerLimit, upperLimit, springParameters]\n\n**lowerLimit:** Number - The minimum permitted offset on the axis\n\n**upperLimit:**\n\nNumber - The maximum permitted offset on the axis\nupperLimit must be larger than lowerLimit\n\n**springParameters:**\n\nArray - [(restitution, spring, damping)]\nAll spring parameters are optional, but for the linear limits, atleast an empty array must be provided.\n\n**restitiution:**\n\nNumber (Optional, Default: 0) - Must be between 0-1.\nControls the amount of bounce when the joint hits a limit.\nA restitution value of 1.0 causes the joint to bounce back with the velocity which it hit the limit.\nA value of zero causes the joint to stop dead.\n[NVIDIA docs](https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/apireference/files/classPxJointLimitParameters.html#cf208a0f1e54fb8e9219af1e0357d4a9)\n\n**spring:**\n\nNumber (Optional, Default: 0) - Must be 0 or greater.\nif greater than zero, the limit is soft, i.e. a spring pulls the joint back to the limit\n\n**damping:** Number (Optional, Default: 0) - Must be 0 or greater. if spring is greater than zero, this is the damping of the limit spring\n\n**Distance Limit**\n\n[xLocked, yLocked, zLocked, distanceLimit, springParameters]\n\n***Locked:** Boolean - Whether the axis is completely locked and no translation is allowed along it\n\n**distanceLimit:** Number - Distance on meters, as a radius/sphere around the joint.\n\n**swingLimit:**\n\nArray - [(swingX, swingZ, springParameters)]\nAll parameters are optional, the default is both swing axis being locked\nSwing limit comes in two types, cone and pyramid. Which variant is used depends on the datatype inside the swing parameter\nNote that cone cannot be combined with pyramid, either both are cone or both are pyramid.\nIf the swing limit is pi, the rotation around that axis is fully unlocked/free.\n\n**Cone limit:** swingZ: Number (Optional, Default 0/locked) - The rotation around the Z (up) axis, thus the yaw. Rotation in radians, between pi and pi.\n\nswingY: Number (Optional, Default 0/locked) - The rotation around the Y (front/dir) axis, thus the roll. Rotation in radians, between pi and pi.\n\n**Pyramid limit:** swingZ: Array - [(min, max)] - Same rotation in radians as the cone limit, but it can be asymmetrical.\n\nswingY: Array - [(min, max)] - Same rotation in radians as the cone limit, but it can be asymmetrical.\n\n**twistLimit:**\n\nArray - [(twistLower, twistUpper, springParameters)]\nTwist is rotation about the X (right) axis, thus the pitch.\nLeft and right twist limits can be configured independently.\n\n**twist*:**\n\nNumber (Optional, Default: 0) - Rotation limit in radians, between -2pi and 2pi\n0 means twist is locked, and 2*pi means its completely unlocked\n\n**drives:**\n\nArray - [(angularSwingDrive, angularTwistDrive, angularSlerpDrive, linearXDrive, linearYDrive, linearZDrive, limitsAreForces)]\nDrives allow to apply force into the joint on any of the axes.\nEach drive is a spring, one end being on the joint, and the other end being on the target specified by the commands:\nsetJointDrivePosition setJointDriveOrientation setJointDriveLinearVelocity setJointDriveAngularVelocity\nFor rotational drives there are two variants, Swing+Twist or SLERP (Spherical Linear Interpolation)\nSee [NVIDIA docs](https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/Joints.html#drives)\n\n***Drive:**\n\nArray - [type, spring, damping, forceLimit]\n\n**type:** Number - MUST be 0 (#TODO acceleration drive implementation?)\n\n**spring:** Number - Same as springParameters above\n\n**damping:** Number - Same as springParameters above\n\n**forceLimit:** Number - The maximum force this drive c an apply to the joint\n\n**limitsAreForces:** Boolean (Optional, Default: true) - NOT IMPLEMENTED #TODO?","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing","description":"Do NOT depend on this staying nothing, it might change to be something."},"form":"binary","left":{"text":"[parent, child]"},"right":{"text":"[jointType, localFrameParent, localFrameChild, miscFlags, jointDescription]"}}],"examples":[{"text":"Attach a Quad (varname towbar) to a HEMTT (varName vParent) and another HEMTT (varName vChild) to the Quad.\nEssentially using the Quad as a \"towbar\":\n\n```sqf\n_parentPos = [0, -5, 0]; // position on the hemtt\n_childPos = [0, 1, -0.2]; // position on the quad\n\n_jointDescription =\n[\n// Limits\n    // Linear\n    [], // Default is locked\n\n    // Swing\n    // [swing1 yaw, swing2 roll, springParams]\n    [\n        rad 45, // yaw\n        0 // roll\n    ],\n    // Twist pitch\n    // [twistLower, twistUpper, springParams]\n    [rad -20, rad 20], // Default is locked\n\n// Drives\n    [] // Default are none\n];\n\n_params = [\n    \"6DOFJoint\",\n    // From [pos,dir,up]\n    [_parentPos, _parentPos vectorAdd [0, 1, 0], _parentPos vectorAdd [0, 0, 1]],\n    // To [pos,dir,up]\n    [_childPos, _childPos vectorAdd [0, 1, 0], _childPos vectorAdd [0, 0, 1]],\n    // misc [collisions enabled]\n    [false],\n    _jointDescription\n];\n\n[vParent, towBar] attachChild _params;\n\n_parentPos = [0, -1, -0.2]; // Position on the quad\n_childPos = [0, 5, 0]; // Position on the hemtt\n\n_params = [\n    \"6DOFJoint\",\n    // From [pos,dir,up]\n    [_parentPos, _parentPos vectorAdd [0, 1, 0], _parentPos vectorAdd[0, 0, 1]],\n    // To [pos,dir,up]\n    [_childPos, _childPos vectorAdd [0, 1, 0], _childPos vectorAdd [0, 0, 1]],\n    // misc [collisions enabled]\n    [false],\n    _jointDescription\n];\n\n[towBar, vChild] attachChild _params;\n```","code":["_parentPos = [0, -5, 0]; // position on the hemtt\n_childPos = [0, 1, -0.2]; // position on the quad\n\n_jointDescription =\n[\n// Limits\n\t// Linear\n\t[], // Default is locked\n\n\t// Swing\n\t// [swing1 yaw, swing2 roll, springParams]\n\t[\n\t\trad 45, // yaw\n\t\t0 // roll\n\t],\n\t// Twist pitch\n\t// [twistLower, twistUpper, springParams]\n\t[rad -20, rad 20], // Default is locked\n\n// Drives\n\t[] // Default are none\n];\n\n_params = [\n\t\"6DOFJoint\",\n\t// From [pos,dir,up]\n\t[_parentPos, _parentPos vectorAdd [0, 1, 0], _parentPos vectorAdd [0, 0, 1]],\n\t// To [pos,dir,up]\n\t[_childPos, _childPos vectorAdd [0, 1, 0], _childPos vectorAdd [0, 0, 1]],\n\t// misc [collisions enabled]\n\t[false],\n\t_jointDescription\n];\n\n[vParent, towBar] attachChild _params;\n\n_parentPos = [0, -1, -0.2]; // Position on the quad\n_childPos = [0, 5, 0]; // Position on the hemtt\n\n_params = [\n\t\"6DOFJoint\",\n\t// From [pos,dir,up]\n\t[_parentPos, _parentPos vectorAdd [0, 1, 0], _parentPos vectorAdd[0, 0, 1]],\n\t// To [pos,dir,up]\n\t[_childPos, _childPos vectorAdd [0, 1, 0], _childPos vectorAdd [0, 0, 1]],\n\t// misc [collisions enabled]\n\t[false],\n\t_jointDescription\n];\n\n[towBar, vChild] attachChild _params;"]},{"text":"Attach a Quad (varname towbar) to a HEMTT (varName vParent) and another HEMTT (varName vChild) to the Quad.\nBut we rotate the axis so that Swing's are Pitch/Yaw and Twist is roll\n\n```sqf\n_parentPos = [0, -5, 0]; // position on the hemtt\n_childPos = [0, 1, -0.2]; // position on the quad\n\n_jointDescription =\n[\n// Limits\n    // Linear\n    [], // Default is locked\n\n    // Swing\n    // [swing1 pitch, swing2 yaw, springParams]\n    [\n        rad 20, // pitch\n        rad 45 // yaw\n    ],\n    // Twist roll\n    // [twistLower, twistUpper, springParams]\n    [], // Default is locked\n\n// Drives\n    [] // Default are none\n];\n\n_params = [\n    \"6DOFJoint\",\n    // From [pos,dir,up]\n    [_parentPos, _parentPos vectorAdd [0, 0, 1], _parentPos vectorAdd [1, 0, 0]], // Note how the up is pointing right and forward is pointing down, we are rotating the whole joint\n    // To [pos,dir,up]\n    [_childPos, _childPos vectorAdd [0, 0, 1], _childPos vectorAdd [1, 0, 0]],\n    // misc [collisions enabled]\n    [false],\n    _jointDescription\n];\n\n[vParent, towBar] attachChild _params;\n\n_parentPos = [0, -1, -0.2]; // Position on the quad\n_childPos = [0, 5, 0]; // Position on the hemtt\n\n_params = [\n    \"6DOFJoint\",\n    // From [pos,dir,up]\n    [_parentPos, _parentPos vectorAdd [0, 0, 1], _parentPos vectorAdd [1, 0, 0]],\n    // To [pos,dir,up]\n    [_childPos, _childPos vectorAdd [0, 0, 1], _childPos vectorAdd [1, 0, 0]],\n    // misc [collisions enabled]\n    [false],\n    _jointDescription\n];\n\n[towBar, vChild] attachChild _params;\n```","code":["_parentPos = [0, -5, 0]; // position on the hemtt\n_childPos = [0, 1, -0.2]; // position on the quad\n\n_jointDescription =\n[\n// Limits\n\t// Linear\n\t[], // Default is locked\n\n\t// Swing\n\t// [swing1 pitch, swing2 yaw, springParams]\n\t[\n\t\trad 20, // pitch\n\t\trad 45 // yaw\n\t],\n\t// Twist roll\n\t// [twistLower, twistUpper, springParams]\n\t[], // Default is locked\n\n// Drives\n\t[] // Default are none\n];\n\n_params = [\n\t\"6DOFJoint\",\n\t// From [pos,dir,up]\n\t[_parentPos, _parentPos vectorAdd [0, 0, 1], _parentPos vectorAdd [1, 0, 0]], // Note how the up is pointing right and forward is pointing down, we are rotating the whole joint\n\t// To [pos,dir,up]\n\t[_childPos, _childPos vectorAdd [0, 0, 1], _childPos vectorAdd [1, 0, 0]],\n\t// misc [collisions enabled]\n\t[false],\n\t_jointDescription\n];\n\n[vParent, towBar] attachChild _params;\n\n_parentPos = [0, -1, -0.2]; // Position on the quad\n_childPos = [0, 5, 0]; // Position on the hemtt\n\n_params = [\n\t\"6DOFJoint\",\n\t// From [pos,dir,up]\n\t[_parentPos, _parentPos vectorAdd [0, 0, 1], _parentPos vectorAdd [1, 0, 0]],\n\t// To [pos,dir,up]\n\t[_childPos, _childPos vectorAdd [0, 0, 1], _childPos vectorAdd [1, 0, 0]],\n\t// misc [collisions enabled]\n\t[false],\n\t_jointDescription\n];\n\n[towBar, vChild] attachChild _params;"]}],"multiplayer":"> [!IMPORTANT]\n> This command does NOT behave well in Multiplayer.","see_also":["detachChild","setJointDrivePosition","setJointDriveOrientation","setJointDriveLinearVelocity","setJointDriveAngularVelocity","childAttached","parentAttached"],"categories_extra":["WIP"]},{"name":"attachedObject","title":"attachedObject","type":"command","url":"https://community.bistudio.com/wiki/attachedObject","revid":318758,"updated":"2022-05-13T09:21:27Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Returns the object a location is attached to. If the location is unattached, then objNull is returned.","syntaxes":[{"syntax":"attachedObject location","params":[{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"location"}}],"examples":[{"code":["_locAttachedObj = attachedObject myLocation;"]}],"see_also":["attachObject","attachTo","attachedObjects","attachedTo","waypointAttachVehicle","waypointAttachedVehicle","lightAttachObject","triggerAttachVehicle"]},{"name":"attachedObjects","title":"attachedObjects","type":"command","url":"https://community.bistudio.com/wiki/attachedObjects","revid":369106,"updated":"2024-09-03T10:27:01Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.14"},"since":"arma3 1.14","arma3_since":"1.14","description":"Returns a list of objects attached to the given object.","syntaxes":[{"syntax":"attachedObjects obj","params":[{"name":"obj","type":"Object","description":"given object","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"attached to the given object","text":"Array of Objects attached to the given object"},"form":"unary","right":{"text":"obj"}}],"examples":[{"code":["{ detach _x } forEach attachedObjects player;"]},{"text":"```sqf\nif (count attachedObjects player == 0) then\n{\n    hint \"There are no objects attached to player\";\n};\n```","code":["if (count attachedObjects player == 0) then\n{\n\thint \"There are no objects attached to player\";\n};"]}],"see_also":["attachObject","attachTo","attachedTo","waypointAttachVehicle","waypointAttachedVehicle","lightAttachObject","triggerAttachVehicle","attachedObject","detach"]},{"name":"attachedTo","title":"attachedTo","type":"command","url":"https://community.bistudio.com/wiki/attachedTo","revid":369107,"updated":"2024-09-03T10:27:31Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.14"},"since":"arma3 1.14","arma3_since":"1.14","locality":{"argument":"global"},"description":"Returns object the given object is attached to or objNull if the given object is not attached to anything.","syntaxes":[{"syntax":"attachedTo obj","params":[{"name":"obj","type":"Object","description":"given object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"object the given object is attached to"},"form":"unary","right":{"text":"obj"}}],"examples":[{"text":"```sqf\nif (isNull attachedTo _obj1) then\n{\n    hint \"_obj1 is not attached to anything.\";\n};\n```","code":["if (isNull attachedTo _obj1) then\n{\n\thint \"_obj1 is not attached to anything.\";\n};"]}],"see_also":["attachObject","attachTo","attachedObjects","waypointAttachVehicle","waypointAttachedVehicle","lightAttachObject","triggerAttachVehicle","attachedObject","detach"]},{"name":"attachObject","title":"attachObject","type":"command","url":"https://community.bistudio.com/wiki/attachObject","revid":318700,"updated":"2022-05-13T09:21:20Z","groups":["Object Manipulation","Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Attaches a location to the specified object. To detach a location, attach it to objNull.","syntaxes":[{"syntax":"location attachObject object","params":[{"name":"location","type":"Location","type_expr":"Location"},{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"location"},"right":{"text":"object"}}],"examples":[{"code":["myLocation attachObject player;"]}],"see_also":["attachedObject","createLocation"]},{"name":"attachTo","title":"attachTo","type":"command","url":"https://community.bistudio.com/wiki/attachTo","revid":378853,"updated":"2026-07-20T13:40:14Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Attaches an object to another object.\n\n- The offset is applied to the object center unless a memory point is provided, in which case the offset will be applied to the memory point position.\n- If no offset is specified, the current offset between the two objects will be used.\n\n> [!NOTE]\n> - All direction commands, such as setDir, setVectorDirAndUp, etc. for an attached object should be used **relative** to the reference object's direction (i.e. in model space), e.g `_attachedObj setDir 0` will make it face the same direction as the reference object, **90** face to the right, **180** face to the back, etc.\n> - Attached triggers only follow the direction of the object to which they are attached, not pitch or roll.","syntaxes":[{"syntax":"object1 attachTo [object2, offset, memPoint, followBoneRotation]","params":[{"name":"object1","type":"Object","description":"object to attach","type_expr":"Object"},{"name":"object2","type":"Object or Group","description":"object to attach to; if a group is provided, its leader is used","type_expr":"Object | Group"},{"name":"offset","type":"PositionRelative","optional":true,"description":"the position relative to *object2*'s position","type_expr":"PositionRelative","text":"offset: PositionRelative - (Optional) the position relative to *object2*'s position"},{"name":"memPoint","type":"String","optional":true,"description":"see Selection Translations for czech selections names","type_expr":"String","text":"memPoint: String - (Optional) see Selection Translations for czech selections names"},{"name":"followBoneRotation","type":"Boolean","optional":true,"description":"follows the memory point's rotation (if attached to one)","type_expr":"Boolean","since":"arma3 2.02","text":"followBoneRotation: Boolean - (Optional) follows the memory point's rotation (if attached to one)"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object1"},"right":{"text":"[object2, offset, memPoint, followBoneRotation]"}}],"examples":[{"code":["player attachTo [car, [0, 0, 1]];"]},{"code":["player attachTo [tank, [0, -1, 0], \"Usti hlavne\"];"]},{"text":"Automatic offset:\n\n```sqf\nammoCrate attachTo [player];\n```","code":["ammoCrate attachTo [player];"]},{"text":"To set orientation of attached object use setVectorDirAndUp command:\n\n```sqf\n_expl1 = \"DemoCharge_Remote_Ammo\" createVehicle position player;\n_expl1 attachTo [player, [-0.1, 0.1, 0.15], \"Pelvis\"];\n_expl1 setVectorDirAndUp [[0.5, 0.5, 0], [-0.5, 0.5, 0]];\n_expl2 = \"DemoCharge_Remote_Ammo\" createVehicle position player;\n_expl2 attachTo [player, [0, 0.15, 0.15], \"Pelvis\"];\n_expl2 setVectorDirAndUp [[1, 0, 0], [0, 1, 0]];\n_expl3 = \"DemoCharge_Remote_Ammo\" createVehicle position player;\n_expl3 attachTo [player, [0.1, 0.1, 0.15], \"Pelvis\"];\n_expl3 setVectorDirAndUp [[0.5, -0.5, 0], [0.5, 0.5, 0]];\n```","code":["_expl1 = \"DemoCharge_Remote_Ammo\" createVehicle position player;\n_expl1 attachTo [player, [-0.1, 0.1, 0.15], \"Pelvis\"];\n_expl1 setVectorDirAndUp [[0.5, 0.5, 0], [-0.5, 0.5, 0]];\n_expl2 = \"DemoCharge_Remote_Ammo\" createVehicle position player;\n_expl2 attachTo [player, [0, 0.15, 0.15], \"Pelvis\"];\n_expl2 setVectorDirAndUp [[1, 0, 0], [0, 1, 0]];\n_expl3 = \"DemoCharge_Remote_Ammo\" createVehicle position player;\n_expl3 attachTo [player, [0.1, 0.1, 0.15], \"Pelvis\"];\n_expl3 setVectorDirAndUp [[0.5, -0.5, 0], [0.5, 0.5, 0]];"]},{"code":["_drill attachTo [_worker, [0.0595885,-0.00950365,-0.13495], \"RightForeArmRoll\", true];\n_drill setVectorDirAndUp [[0.536966,-0.00438141,-0.843605],[0.345872,0.913231,0.215406]];\n_radio attachTo [_worker, [-0.100003,0.069064,0.153719], \"Spine3\", true];\n_radio setVectorDirAndUp [[-0.144569,-0.48725,0.861354],[0.039712,0.866938,0.497072]];"]}],"multiplayer":"Use `_attachedObj setPosWorld getPosWorld _attachedObj` *after* setDir to synchronise direction properly over the network (see setDir's page for its MP behaviour).","see_also":["attachedTo","attachedObjects","detach","getRelPos","attachObject","attachedObject","waypointAttachVehicle","waypointAttachedVehicle","lightAttachObject","triggerAttachVehicle","setVectorDir","setVectorUp","setVectorDirAndUp","modelToWorld","BIS_fnc_transformVectorDirAndUp","BIS_fnc_attachToRelative"],"notes":[{"user":"TeaCup","date":"2011-09-17T19:20:00Z","text":"Some objects you cannot attach anything to. To be more precise, you can attach objects to them, but the behaviour is unexpected. For instance:\n\n```sqf\nSuitcaseObject attachTo [FoldingTableObject, [0,0,0]];\n```\n\nYou would expect the suitcase to jump to the pivot point of the table, and stick to it.\nInstead, the suitcase will freeze in it is original position. Even if the table is moved, the suitcase will be unaffected: it will not follow the table, it will not even respond to actions it reacted to prior to being attached: pushing, being shot at, etc.. It's just an object frozen in space. In MP it is even weirder, the suitcase would turn invisible.\nDodgy objects when it comes to attaching things to them: most in Objects (small), Objects (signs), all of Objects (helpers) categories, etc."},{"user":"Pixinger","date":"2014-03-28T16:22:00Z","text":"If you attach an explosive charge to an object (e.g. ammobox), the charge will not detonate when you simply set the damage to 1. You must detach it before.\n\n```sqf\nprivate _target = myAmmoBox;\n// create and attach charge\nprivate _charge = \"DemoCharge_Remote_Ammo_Scripted\" createVehicle position player;\n_charge attachTo [_target, [0, 0, 0.2]];\n_charge setVectorDirAndUp [[0.5,0.5,0], [-0.5,0.5,0]];\n// now detonate charge\ndetach _charge; // Important!\n_charge setDamage 1;\n```"},{"user":"ffur2007slx2_5","date":"2014-06-01T23:00:00Z","text":"attachTo overwrites setVectorDirAndUp if attached obj was changed to attach another one.\n\n```sqf\n_obj attachTo [_logic,[0, 0, 0]];\n_obj setVectorDirAndUp [[0, 1, 0], [0, 0, -1]];\n_obj attachTo [_logic, [0, 0, 2]];        // vector no changes\n_obj attachTo [_anotherOne, [0, 0, 0]];    // vector changes to default\n```"},{"user":"ondrejkuzel","date":"2014-09-25T10:00:00Z","text":"Attaching an object does not update the accessibility of a place for the AI. The command **should not** be used for positioning large static objects - the AI will simply walk through such objects."},{"user":"Demellion","date":"2016-09-01T17:54:00Z","text":"Using attachTo with objects that have ragdoll physics (such as ammo boxes, containers, etc.) may cause unexpected behaviour.\nWhen you do so, if the attached object intersect origin object, origin object may gain some **enormous collision properties** even if the collision model for the attached object is not present localy to origin object, until detached.\nVehicles may start flipping with no mass calculation (ie tank might fly), player object might gain infinite Z-vector velocity on any interaction with terrain relief and other objects."},{"user":"R3vo","date":"2019-08-13T12:55:00Z","text":"When attaching a unit which is playing an animation to a static object, the animation becomes laggy. Presumably because the update frequency of the static object is used."},{"user":"Leopard20","date":"2024-05-10T09:22:48Z","text":"To find all selection names of vehicle turrets for attachTo, you can use this script:\n\n```sqf\nparams [\"_veh\"];\nprivate _turretSels = [];\n\nisNil { // make sure the code runs unscheduled\n    private _cfg = configOf _veh;\n    _veh = createSimpleObject [getModelInfo _veh # 1, [0,0,0]]; // create a simple object instead of the actual vehicle\n    deleteVehicle _veh; // mark it for deletion in the next frame\n\n    private _turrets = configProperties [_cfg >> \"Turrets\", \"isClass _x\", true];\n\n    private _getSelections = {_veh selectionNames \"memory\" apply {[_x, _veh selectionPosition [_x, \"memory\"], _veh selectionVectorDirAndUp [_x, \"memory\"]]}};\n    private _allSelections = call _getSelections;\n\n    {\n        private _gun = getText (_x >> \"gun\");\n        _veh animate [_gun, 0.4, true];\n        private _newSels = call _getSelections;\n        _turretSels append (_newSels - _allSelections);\n        _veh animate [_gun, 0, true];\n    } forEach _turrets;\n};\n\n_turretSels = _turretSels apply { _x # 0 };\n_turretSels arrayIntersect _turretSels\n```\n\nJust pass your vehicle to this code, for example, like this:\n\n```sqf\n[myVehicle] call MY_fnc_getTurretSelections; // MY_fnc_getTurretSelections is the above function\n```\n\nIf you simply need the end point of the gun(s), use this code instead:\n\n```sqf\nparams [\"_veh\"];\nconfigProperties [configOf _veh >> \"Turrets\", \"isClass _x\", true] apply { getText (_x >> \"gunBeg\") };\n```"}]},{"name":"attackEnabled","title":"attackEnabled","type":"command","url":"https://community.bistudio.com/wiki/attackEnabled","revid":321158,"updated":"2022-05-13T15:07:49Z","groups":["Groups","Unit Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Return whether a group's leader can issue attack commands to soldiers under his command.","syntaxes":[{"syntax":"attackEnabled name","params":[{"name":"name","type":"Object or Group","type_expr":"Object | Group"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"name"}}],"examples":[{"code":["if (not attackEnabled _soldier) then { _soldier setCombatMode \"Careless\" };"]}],"see_also":["enableAttack"]},{"name":"awake","title":"awake","type":"command","url":"https://community.bistudio.com/wiki/awake","revid":373886,"updated":"2025-06-26T10:58:51Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"argument":"global","effect":"local"},"description":"Wakes up sleeping PhysX object or puts a PhysX object to sleep. In 2.10 this command can be used on corpses of type `Man` and has no effect on alive units. When unit gets killed it goes into ragdoll state for a short while, then the units get frozen and any simulation and collision is removed to save system resources. As a result, corpses do not react to their surrounding any more. Using this command will temporarily re-enable ragdoll state of a corpse to the same state it was when unit died. If this command is used in \"enable/disable\" sequence on a dead body, it gives the corpse a visible nudge (See example 3).\n\n> [!NOTE]\n> This command won't have lasting effect on vehicles as vehicles are actively simulated, but it works rather well on smaller PhysX enabled objects.","syntaxes":[{"syntax":"object awake awake","params":[{"name":"object","type":"Object","description":"PhysX object or dead unit","type_expr":"Object"},{"name":"awake","type":"Boolean","description":"true to awake the object, false - to put it to sleep","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"awake"}}],"examples":[{"code":["_object awake false;"]},{"text":"Since 2.10:\n\n```sqf\n_deadUnit awake true;\n```","code":["_deadUnit awake true;"]},{"text":"Make corpse react to explosion (since 2.10):\n\n```sqf\n_deadUnit addEventHandler [\"Explosion\",\n{\n    params [\"_unit\", \"_damage\"];\n    if (_damage < 0.01) exitWith {};\n    _unit awake true;\n    _unit awake false;\n}];\n```","code":["_deadUnit addEventHandler [\"Explosion\", \n{\n\tparams [\"_unit\", \"_damage\"];\n\tif (_damage < 0.01) exitWith {};\n\t_unit awake true;\n\t_unit awake false;\n}];"]}],"see_also":["isAwake","addTorque","addForce","vectorModelToWorld","vectorModelToWorldVisual","selectionPosition"]},{"name":"backpack","title":"backpack","type":"command","url":"https://community.bistudio.com/wiki/backpack","revid":337483,"updated":"2023-01-31T22:44:52Z","groups":["Containers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns a class of a backpack.","syntaxes":[{"syntax":"backpack unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_classname = backpack player;"]}],"see_also":["backpackContainer","firstBackpack","unitBackpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack","backpacks"]},{"name":"backpackCargo","title":"backpackCargo","type":"command","url":"https://community.bistudio.com/wiki/backpackCargo","revid":378396,"updated":"2026-04-04T07:57:43Z","groups":["Containers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get array with backpacks from ammo box (or any general weapon holder container).","syntaxes":[{"syntax":"backpackCargo box","params":[{"name":"box","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"class names [\"BackpackType1\", \"BackpackType1\", \"BackpackType2\", ...]"},"form":"unary","right":{"text":"box"}}],"examples":[{"code":["hint str backpackCargo vehicle player;"]}],"see_also":["backpackContainer","firstBackpack","unitBackpack","backpack","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack"]},{"name":"backpackContainer","title":"backpackContainer","type":"command","url":"https://community.bistudio.com/wiki/backpackContainer","revid":321069,"updated":"2022-05-13T13:06:42Z","groups":["Containers"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Returns a cargo container of a unit's backpack.","syntaxes":[{"syntax":"backpackContainer unit","params":[{"name":"unit","type":"Object","description":"a soldier","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"cargo container or objNull"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hint str backpackContainer player; // 1a5f7900# 163944: backpack_fast.p3d"]},{"text":"```sqf\nhint str getMagazineCargo backpackContainer player;\n/*\n    returns e.g\n    [\n        [\n            \"APERSBoundingMine_Range_Mag\",\n            \"ClaymoreDirectionalMine_Remote_Mag\",\n            \"SLAMDirectionalMine_Wire_Mag\",\n            \"DemoCharge_Remote_Mag\"\n        ],[\n            3,\n            2,\n            2,\n            1\n        ]\n    ]\n*/\n```","code":["hint str getMagazineCargo backpackContainer player;\n/*\n\treturns e.g\n\t[\n\t\t[\n\t\t\t\"APERSBoundingMine_Range_Mag\",\n\t\t\t\"ClaymoreDirectionalMine_Remote_Mag\",\n\t\t\t\"SLAMDirectionalMine_Wire_Mag\",\n\t\t\t\"DemoCharge_Remote_Mag\"\n\t\t],[\n\t\t\t3,\n\t\t\t2,\n\t\t\t2,\n\t\t\t1\n\t\t]\n\t]\n*/"]},{"code":["(backpackContainer player) addWeaponCargoGlobal [weapons player select 0, 1];"]}],"see_also":["firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack","uniformContainer","vestContainer","everyContainer"],"notes":[{"user":"ffur2007slx2_5","date":"2014-04-29T15:19:00Z","text":"In Arma 3 ver 1.16, we can use either backpackContainer or unitBackpack at present since both of them enjoy same operand type and return value."}]},{"name":"backpackItems","title":"backpackItems","type":"command","url":"https://community.bistudio.com/wiki/backpackItems","revid":377191,"updated":"2026-01-01T10:54:17Z","groups":["Containers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get array with all items (of any kind, even weapons) in backpack of the given unit.","syntaxes":[{"syntax":"backpackItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["backpackItems player; // returns e.g [\"hgun_P07_F\", \"Titan_AT\"]"]}],"see_also":["uniformItems","vestItems","backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack"]},{"name":"backpackMagazines","title":"backpackMagazines","type":"command","url":"https://community.bistudio.com/wiki/backpackMagazines","revid":321381,"updated":"2022-05-14T11:03:57Z","groups":["Containers","Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get array with all magazines from backpack of the given unit.","syntaxes":[{"syntax":"backpackMagazines unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of String","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"```sqf\nbackpackMagazines player;\n// returns e.g\n/*\n[\n    \"Titan AT Missile(1/1)[id/cr:16/0](2x)\"\n]\n*/\n```","code":["backpackMagazines player;\n// returns e.g\n/*\n[\n\t\"Titan AT Missile(1/1)[id/cr:16/0](2x)\"\n]\n*/"]}],"see_also":["uniformMagazines","vestMagazines","soldierMagazines"]},{"name":"backpacks","title":"backpacks","type":"command","url":"https://community.bistudio.com/wiki/backpacks","revid":377190,"updated":"2026-01-01T10:53:56Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","locality":{"argument":"global"},"description":"Returns an array of all backpack names a unit has in its inventory, excluding the one it carries on the back.","syntaxes":[{"syntax":"backpacks unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _allCarriedBackpackTypes = backpacks player + [backpack player];"]}],"see_also":["backpack","itemsWithMagazines","assignedItems","items","magazines","everyBackpack"]},{"name":"backpackSpaceFor","title":"backpackSpaceFor","type":"command","url":"https://community.bistudio.com/wiki/backpackSpaceFor","revid":378506,"updated":"2026-05-03T16:57:31Z","groups":["Containers"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Returns how much space is in backpack for given weapon or magazine","syntaxes":[{"syntax":"backpack backpackSpaceFor weaponName","params":[{"name":"backpack","type":"Object","type_expr":"Object"},{"name":"weaponName","type":"String","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"with [weapons, magazines]\n- weapons: Number - magazines: Number","text":"Array with [weapons, magazines]\n\n- weapons: Number\n- magazines: Number"},"form":"binary","left":{"text":"backpack"},"right":{"text":"weaponName"}}],"examples":[{"code":["(backpackContainer player) backpackSpaceFor \"m16\"; // [weapons, magazines]"]}],"see_also":["backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack"]},{"name":"behaviour","title":"behaviour","type":"command","url":"https://community.bistudio.com/wiki/behaviour","revid":369334,"updated":"2024-09-03T18:43:00Z","groups":["AI Behaviour"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the behaviour of the individual unit, this is why it only accepts Object as the argument. For Arma 3 behaviour explanation see Arma_3_AI_Behavior","syntaxes":[{"syntax":"behaviour unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"one of:\n- \"CARELESS\" - \"SAFE\" - \"AWARE\" - \"COMBAT\" - \"STEALTH\" - \"ERROR\" (Since Arma 3 v1.78 when used on empty vehicles and such)","text":"String - one of:\n\n- \"CARELESS\"\n- \"SAFE\"\n- \"AWARE\"\n- \"COMBAT\"\n- \"STEALTH\"\n- \"ERROR\" (Since Arma 3 v1.78 when used on empty vehicles and such)"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_soldier setBehaviour \"CARELESS\";\n_b = behaviour _soldier; // returns \"CARELESS\""]}],"see_also":["AIBehaviour","setBehaviour","setWaypointBehaviour","combatMode","setCombatMode","skill","setSkill","Arma 3: AI Skill","setCombatBehaviour","combatBehaviour"]},{"name":"benchmark","title":"benchmark","type":"command","url":"https://community.bistudio.com/wiki/benchmark","revid":329496,"updated":"2022-07-29T13:29:47Z","groups":["System"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the value of \"3D Performance\" in OFP Preferences (flashpoint.cfg). This can be used to estimate the computer performance to adapt CPU and GPU demanding settings like view distance dynamically in missions.","syntaxes":[{"syntax":"benchmark","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"text":"```sqs\n? (benchmark > 2000) : setViewDistance 2000\n```","code":["? (benchmark > 2000) : setViewDistance 2000"]}],"see_also":["viewDistance","setDetailMapBlendPars","setTerrainGrid","getObjectViewDistance","setObjectViewDistance"],"notes":[{"user":"Killzone_Kid","date":"2014-03-14T13:57:00Z","text":"The command is obsolete, it was used in Operation Flashpoint to measure PC performance. In Arma 3 it returns 2000."}]},{"name":"bezierInterpolation","title":"bezierInterpolation","type":"command","url":"https://community.bistudio.com/wiki/bezierInterpolation","revid":377844,"updated":"2026-01-03T04:36:03Z","groups":["Math"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Gets interpolated value based on [Bézier curve](https://en.wikipedia.org/wiki/Bézier_curve) with given control points (progress value is 0...1 for a curve that starts at pos0 and finishes at posN)","syntaxes":[{"syntax":"progress bezierInterpolation positions","params":[{"name":"progress","type":"Number","description":"interpolation value","type_expr":"Number"},{"name":"positions","type":"Array of Position3D","type_expr":"Array<Position3D>"}],"returns":{"type":"Position3D","type_expr":"Position3D","description":"based on progress value"},"form":"binary","left":{"text":"progress"},"right":{"text":"positions"}}],"examples":[{"text":"Quick demonstration that spawns some spheres around player object:\n\n```sqf\nfor \"_i\" from 0 to 1 step 0.05 do {\n    createVehicle [\"Sign_Sphere10cm_F\", (_i bezierInterpolation [\n        player modelToWorld [0,0,0],\n        player modelToWorld [0,2,2],\n        player modelToWorld [2,0,2],\n        player modelToWorld [0,0,4]\n    ]), [], 0, \"CAN_COLLIDE\"];\n};\n```","code":["for \"_i\" from 0 to 1 step 0.05 do {\n\tcreateVehicle [\"Sign_Sphere10cm_F\", (_i bezierInterpolation [\n\t\tplayer modelToWorld [0,0,0],\n\t\tplayer modelToWorld [0,2,2],\n\t\tplayer modelToWorld [2,0,2],\n\t\tplayer modelToWorld [0,0,4]\n\t]), [], 0, \"CAN_COLLIDE\"];\n};"]},{"text":"Create a map marker curve from 4 control points with overlap (progress is -0.5...1.5 instead of 0...1):\n\n```sqf\nprivate _controlPoints = [[100,-90], [200,-30], [150,60], [100,90]] apply { player getRelPos _x };\n{\n    private _marker = createMarkerLocal [str _x, _x];\n    _marker setMarkerTypeLocal \"mil_objective\";\n    _marker setMarkerTextLocal (\"P\" + str _forEachIndex);\n}\nforEach _controlPoints;\n\nfor \"_i\" from -0.5 to 1.5 step 0.01 do\n{\n    private _marker = createMarkerLocal [str _i, _i bezierInterpolation _controlPoints];\n    _marker setMarkerTypeLocal \"mil_dot\";\n};\nopenMap true;\n```","code":["private _controlPoints = [[100,-90], [200,-30], [150,60], [100,90]] apply { player getRelPos _x };\n{\n\tprivate _marker = createMarkerLocal [str _x, _x];\n\t_marker setMarkerTypeLocal \"mil_objective\";\n\t_marker setMarkerTextLocal (\"P\" + str _forEachIndex);\n}\nforEach _controlPoints;\n\nfor \"_i\" from -0.5 to 1.5 step 0.01 do\n{\n\tprivate _marker = createMarkerLocal [str _i, _i bezierInterpolation _controlPoints];\n\t_marker setMarkerTypeLocal \"mil_dot\";\n};\nopenMap true;"]}],"see_also":["linearConversion","vectorLinearConversion"]},{"name":"binocular","title":"binocular","type":"command","url":"https://community.bistudio.com/wiki/binocular","revid":318568,"updated":"2022-05-13T09:21:07Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","description":"Returns class name of currently used binocular weapon.","syntaxes":[{"syntax":"binocular unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_binocs = binocular player; //Rangefinder"]}],"see_also":["binocularMagazine","binocularItems","addBinocularItem","removeBinocularItem","removeAllBinocularItems","headgear","goggles","hmd"]},{"name":"binocularItems","title":"binocularItems","type":"command","url":"https://community.bistudio.com/wiki/binocularItems","revid":369611,"updated":"2024-09-26T20:58:03Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","locality":{"argument":"global"},"description":"Returns array with all items assigned to the binocular weapon except magazines. Use binocularMagazine command for the latter. This command is used for infantry weapons only.","syntaxes":[{"syntax":"binocularItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [silencer, pointer, optic, bipod]\n- silencer: String - pointer: String - laserpointer or flashlight - optic: String - bipod: String","text":"Array with [silencer, pointer, optic, bipod]\n\n- silencer: String\n- pointer: String - laserpointer or flashlight\n- optic: String\n- bipod: String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["binocularItems player;"]}],"see_also":["addBinocularItem","removeBinocularItem","removeAllBinocularItems","binocularMagazine","weaponAccessories","weaponAccessoriesCargo","primaryWeaponItems","secondaryWeaponItems","handgunItems","weaponsItems","weaponsItemsCargo"]},{"name":"binocularMagazine","title":"binocularMagazine","type":"command","url":"https://community.bistudio.com/wiki/binocularMagazine","revid":377189,"updated":"2026-01-01T10:53:24Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","locality":{"argument":"global"},"description":"Collects all loaded magazines from all binocular muzzles and returns them in Array, otherwise it returns []. This command is used for infantry weapons only.","syntaxes":[{"syntax":"binocularMagazine unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hint str binocularMagazine player; // [\"Laserbatteries\"]"]}],"see_also":["binocularItems","addBinocularItem","removeBinocularItem","removeAllBinocularItems","primaryWeaponMagazine","secondaryWeaponMagazine","handgunMagazine"]},{"name":"blufor","title":"blufor","type":"command","url":"https://community.bistudio.com/wiki/blufor","revid":329284,"updated":"2022-07-27T09:50:34Z","groups":["Sides"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Pre-defined variable for the blufor side.","syntaxes":[{"syntax":"blufor","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (side player == blufor) then\n{\n    hint \"BLUFOR\";\n};\n```","code":["if (side player == blufor) then\n{\n\thint \"BLUFOR\";\n};"]}],"aliases":["west"],"see_also":["side","civilian","east","independent","opfor","resistance","west"]},{"name":"boundingBox","title":"boundingBox","type":"command","url":"https://community.bistudio.com/wiki/boundingBox","revid":377835,"updated":"2026-01-03T04:32:05Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns a bounding box of given object in model coordinate space, adjusted according to destruction/animation of an object. This command is rather generous on the size estimation, for more precise coordinates use boundingBoxReal.\n\n> [!NOTE]\n> In Arma 3 v1.92 The output of both syntaxes got extended to include bounding sphere diameter. See also sizeOf.","syntaxes":[{"syntax":"boundingBox object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative","description":"an array with the extreme points of the model, as well as bounding box sphere diameter. Format [[xmin, ymin, zmin], [xmax, ymax, zmax], boundingSphereDiameter].","text":"PositionRelative - an array with the extreme points of the model, as well as bounding box sphere diameter.\nFormat [[xmin, ymin, zmin], [xmax, ymax, zmax], boundingSphereDiameter]."},"form":"unary","right":{"text":"object"}},{"syntax":"clippingType boundingBox object","since":"arma3 1.92","params":[{"name":"clippingType","type":"Number","description":"clipping type could be:\n\n- 0 - ClipVisual (could significantly reduce the size of bounding boxes on buildings)\n- 1 - ClipShadow\n- 2 - ClipGeometry\n- 3 - ClipGeneral (Default, the same type that is used in main syntax)","type_expr":"Number"},{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative","description":"an array with the extreme points of the model bounding box, as well as bounding box sphere diameter. Format [[xmin, ymin, zmin], [xmax, ymax, zmax], boundingSphereDiameter].","text":"PositionRelative - an array with the extreme points of the model bounding box, as well as bounding box sphere diameter.\nFormat [[xmin, ymin, zmin], [xmax, ymax, zmax], boundingSphereDiameter]."},"form":"binary","left":{"text":"clippingType"},"right":{"text":"object"}}],"examples":[{"code":["private _box = boundingBox _abrams;"]},{"code":["hint str (0 boundingBox cursorObject);"]}],"see_also":["sizeOf","boundingBoxReal","boundingCenter","BIS_fnc_boundingBoxDimensions"]},{"name":"boundingBoxReal","title":"boundingBoxReal","type":"command","url":"https://community.bistudio.com/wiki/boundingBoxReal","revid":378436,"updated":"2026-04-07T21:33:52Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns a raw bounding box of given object in model coordinates space. This command is similar to boundingBox but gives more precise measurements.\n\nThe alternative syntax allows to specify clipping type to be used, which in some cases could make the result even more precise.","syntaxes":[{"syntax":"boundingBoxReal object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative","description":"the extreme points of the model along Arma 3 v1.92 the bounding box sphere radius, in format [[xmin, ymin, zmin], [xmax, ymax, zmax], boundingSphereRadius]"},"form":"unary","right":{"text":"object"}},{"syntax":"clippingType boundingBoxReal object","since":"arma3 1.92","params":[{"name":"clippingType","type":"Number","description":"can be one of:\n\n- 0 - ClipVisual (can significantly reduce bounding box's size on buildings)\n- 1 - ClipShadow\n- 2 - ClipGeometry\n- 3 - ClipGeneral (same type that is used in the main syntax)","type_expr":"Number"},{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative","description":"the extreme points of the model, as well as bounding sphere radius, in format [[xmin, ymin, zmin], [xmax, ymax, zmax], boundingSphereRadius]"},"form":"binary","left":{"text":"clippingType"},"right":{"text":"object"}},{"syntax":"boundingBoxReal [object, LOD]","since":"arma3 2.14","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"LOD","type":"String or Number","description":"can be one of:\n\n- `\"Memory\"`\n- `\"Geometry\"`\n- `\"FireGeometry\"`\n- `\"LandContact\"`\n- `\"HitPoints\"`\n- `\"ViewGeometry\"`\n\nWhen Number is used, command searches for a LOD with the similar LOD resolution","type_expr":"String | Number"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative","description":"the extreme points of the model, as well as bounding box sphere radius, in format [[xmin, ymin, zmin], [xmax, ymax, zmax], boundingSphereRadius]"},"form":"unary","right":{"text":"[object, LOD]"}}],"examples":[{"code":["private _bbr = boundingBoxReal vehicle player;\nprivate _p1 = _bbr select 0;\nprivate _p2 = _bbr select 1;\nprivate _maxWidth = abs ((_p2 select 0) - (_p1 select 0));\nprivate _maxLength = abs ((_p2 select 1) - (_p1 select 1));\nprivate _maxHeight = abs ((_p2 select 2) - (_p1 select 2));"]},{"code":["hint str (0 boundingBoxReal cursorObject);"]}],"see_also":["boundingBox","sizeOf","boundingCenter"]},{"name":"boundingCenter","title":"boundingCenter","type":"command","url":"https://community.bistudio.com/wiki/boundingCenter","revid":377382,"updated":"2026-01-02T06:43:49Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the position of the original (loaded) center of an object in model coordinates. Despite its name, it has nothing to do with boundingBox or boundingBoxReal, it returns offset where `[0, 0, 0]` was Object Builder / Oxygen 2 when model was created.","syntaxes":[{"syntax":"boundingCenter object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_center = boundingCenter TruckOne;"]}],"see_also":["boundingBox","sizeOf","boundingBoxReal","getPosWorld","setPosWorld","aimPos"],"notes":[{"user":"Sa-Matra","date":"2023-04-20T06:33:26Z","text":"Some objects have boundingCenter in really weird positions. In general this command is borderline useless."}]},{"name":"brakesDisabled","title":"brakesDisabled","type":"command","url":"https://community.bistudio.com/wiki/brakesDisabled","revid":376404,"updated":"2025-10-11T00:55:54Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"argument":"global"},"description":"Returns the status of autobrake (see disableBrakes).","syntaxes":[{"syntax":"brakesDisabled transport","params":[{"name":"transport","type":"Object","description":"PhysX car or tank","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if autobrake is disabled"},"form":"unary","right":{"text":"transport"}}],"examples":[{"text":"```sqf\nif !(brakesDisabled _vehicle) then\n{\n    _vehicle disableBrakes true;\n};\n```","code":["if !(brakesDisabled _vehicle) then\n{\n\t_vehicle disableBrakes true;\n};"]}],"see_also":["disableBrakes","awake","isAwake","addTorque","addForce","vectorModelToWorld","vectorModelToWorldVisual","selectionPosition","setVelocityTransformation","setVelocityModelSpace"]},{"name":"break","title":"break","type":"command","url":"https://community.bistudio.com/wiki/break","revid":370194,"updated":"2024-11-06T11:55:55Z","groups":["Program Flow"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Skips all loop iterations (for, forEach, while, findIf etc).","syntaxes":[{"syntax":"break","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"text":"```sqf\n// prints 0, 1 and then exits\nfor \"_i\" from 0 to 3 do\n{\n    if (_i == 2) then { break };\n    systemChat str _i;\n};\n```","code":["// prints 0, 1 and then exits\nfor \"_i\" from 0 to 3 do\n{\n\tif (_i == 2) then { break };\n\tsystemChat str _i;\n};"]},{"text":"```sqf\nprivate _moneyHolder = objNull;\n{\n    if (\"Money_roll\" in items _x) then\n    {\n        _moneyHolder = _x;\n        break;\n    };\n} forEach units group player;\n\nif (isNull _moneyHolder) then\n{\n    hint \"We have to find this money.\";\n}\nelse\n{\n    hint format [\"%1 has the money!\", name _moneyHolder];\n};\n```","code":["private _moneyHolder = objNull;\n{\n\tif (\"Money_roll\" in items _x) then\n\t{\n\t\t_moneyHolder = _x;\n\t\tbreak;\n\t};\n} forEach units group player;\n\nif (isNull _moneyHolder) then\n{\n\thint \"We have to find this money.\";\n}\nelse\n{\n\thint format [\"%1 has the money!\", name _moneyHolder];\n};"]},{"text":"```sqf\n0 spawn\n{\n    private _value = 0;\n\n    while { _value < 10 } do\n    {\n        if (_value == 8) then\n        {\n            break; // 8 and 9 will never be printed\n        };\n\n        systemChat str _value ;\n        _value = _value + 1;\n    };\n};\n```","code":["0 spawn\n{\n\tprivate _value = 0;\n\n\twhile { _value < 10 } do\n\t{\n\t\tif (_value == 8) then\n\t\t{\n\t\t\tbreak; // 8 and 9 will never be printed\n\t\t};\n\n\t\tsystemChat str _value ;\n\t\t_value = _value + 1;\n\t};\n};"]}],"see_also":["continueWith","continue","breakWith","breakOut"]},{"name":"breakOut","title":"breakOut","type":"command","url":"https://community.bistudio.com/wiki/breakOut","revid":369282,"updated":"2024-09-03T18:42:47Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Breaks out of the scope with given **name**.\n\n- An unknown scopeName name will cause the script error `Generic error in expression`\n- If multiple scopes with the same **name** exist, the command will break out the nearest scope. See Example 3.","syntaxes":[{"syntax":"breakOut name","params":[{"name":"name","type":"String","description":"name of the scope which was previously set with scopeName. `\"\"` will exit the current scope (see also exitWith)","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"name"}},{"syntax":"value breakOut name","since":"arma3 1.48","params":[{"name":"value","type":"Anything","description":"a value to return","type_expr":"Anything"},{"name":"name","type":"String","description":"name of the scope which was previously set with scopeName. `\"\"` will exit the current scope (see also exitWith)","type_expr":"String"}],"returns":{"type":"Anything","type_expr":"Anything","description":"will return value","text":"Anything - will return **value**"},"form":"binary","left":{"text":"value"},"right":{"text":"name"}}],"examples":[{"text":"```sqf\nscopeName \"main\";\nwhile { true } do {\n    scopeName \"loop1\";\n    while {true} do {\n        scopeName \"loop2\";\n        if (condition1) then {breakTo \"main\"}; // Breaks all scopes and return to \"main\"\n        if (condition2) then {breakOut \"loop2\"}; // Breaks scope named \"loop2\"\n        sleep 1;\n    };\n    sleep 1;\n};\n```","code":["scopeName \"main\";\nwhile { true } do {\n\tscopeName \"loop1\";\n\twhile {true} do {\n\t\tscopeName \"loop2\";\n\t\tif (condition1) then {breakTo \"main\"}; // Breaks all scopes and return to \"main\"\n\t\tif (condition2) then {breakOut \"loop2\"}; // Breaks scope named \"loop2\"\n\t\tsleep 1;\n\t};\n\tsleep 1;\n};"]},{"text":"```sqf\ncall {\n    scopeName \"main\";\n    call {\n        123 breakOut \"main\"\n    };\n    345\n}; // call returns 123\n```","code":["call {\n\tscopeName \"main\";\n\tcall {\n\t\t123 breakOut \"main\"\n\t};\n\t345\n}; // call returns 123"]},{"text":"```sqf\ncall {\n    scopeName \"Main\"; // Parent Main\n    call {\n        scopeName \"Main\"; // Child Main\n        \"String\" breakOut \"Main\"; // Will break out of child main and return \"String\" to parent main\n    };\n};\n```","code":["call {\n\tscopeName \"Main\"; // Parent Main\n\tcall {\n\t\tscopeName \"Main\"; // Child Main\n\t\t\"String\" breakOut \"Main\"; // Will break out of child main and return \"String\" to parent main\n\t};\n};"]}],"see_also":["scopeName","breakTo","exitWith"]},{"name":"breakTo","title":"breakTo","type":"command","url":"https://community.bistudio.com/wiki/breakTo","revid":364900,"updated":"2024-06-29T14:38:35Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Breaks block to scope named *name*.\n\nScope name can be assigned using the scopeName command.","syntaxes":[{"syntax":"breakTo name","params":[{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"name"}}],"examples":[{"text":"```sqf\nscopeName \"main\";\nwhile { true } do\n{\n    scopeName \"loop1\";\n    while { true } do\n    {\n        scopeName \"loop2\";\n        if (condition1) then { breakTo \"main\" };    // breaks all scopes and return to \"main\"\n        if (condition2) then { breakOut \"loop2\" };    // breaks scope named \"loop2\"\n        sleep 1;\n    };\n    sleep 1;\n};\n```","code":["scopeName \"main\";\nwhile { true } do\n{\n\tscopeName \"loop1\";\n\twhile { true } do\n\t{\n\t\tscopeName \"loop2\";\n\t\tif (condition1) then { breakTo \"main\" };\t// breaks all scopes and return to \"main\"\n\t\tif (condition2) then { breakOut \"loop2\" };\t// breaks scope named \"loop2\"\n\t\tsleep 1;\n\t};\n\tsleep 1;\n};"]}],"see_also":["scopeName","breakOut","exitWith"],"notes":[{"user":"Nelis75733126","date":"2017-05-18T18:19:00Z","text":"I wish to clarify the behaviour of this command by saying that the `breakTo` command will literally break the scope in which it has been placed, and continue reading whatever is after and outside of that scope.\nExample:\n\n```sqf\nscopeName \"something\";\nif true then\n{\n    breakTo \"something\";\n    _v = 0;    // this line will be skipped\n};\n\n_a = 0;        // this is where script execution will jump to.\n```"}]},{"name":"breakWith","title":"breakWith","type":"command","url":"https://community.bistudio.com/wiki/breakWith","revid":349341,"updated":"2023-11-08T14:53:30Z","groups":["Program Flow"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Skips all loop iterations and immediately returns the given value.","syntaxes":[{"syntax":"breakWith return","params":[{"name":"return","type":"Anything","description":"value to be returned when iterations are skipped","type_expr":"Anything"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"unary","right":{"text":"return"}}],"examples":[{"text":"```sqf\n// stops once _i reaches 5 and outputs 0, 1, 2, 3, 4, END\nsystemChat call {\n    for \"_i\" from 0 to 10 do {\n        if (_i == 5) then { breakWith \"END\"; };\n        systemChat str _i;\n    };\n};\n```","code":["// stops once _i reaches 5 and outputs 0, 1, 2, 3, 4, END\nsystemChat call {\n\tfor \"_i\" from 0 to 10 do {\n\t\tif (_i == 5) then { breakWith \"END\"; };\n\t\tsystemChat str _i;\n\t};\n};"]}],"see_also":["continueWith","break","continue","breakOut"]},{"name":"briefingName","title":"briefingName","type":"command","url":"https://community.bistudio.com/wiki/briefingName","revid":310777,"updated":"2022-05-07T20:21:45Z","groups":["Briefing"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","description":"Returns the name of the current briefing/scenario name.","syntaxes":[{"syntax":"briefingName","params":[],"returns":{"type":"String","type_expr":"String"},"form":"nullary"}],"examples":[{"code":["_name = briefingName;"]}],"see_also":["missionName","worldName","serverName","worldSize"]},{"name":"buildingExit","title":"buildingExit","type":"command","url":"https://community.bistudio.com/wiki/buildingExit","revid":377513,"updated":"2026-01-02T06:50:20Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the given indexed exit in a building. The returned value is in format Position.","syntaxes":[{"syntax":"building buildingExit index","params":[{"name":"building","type":"Object","type_expr":"Object"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Position","type_expr":"Position"},"form":"binary","left":{"text":"building"},"right":{"text":"index"}}],"examples":[{"code":["_building buildingExit 0;"]}],"see_also":["buildingPos","insideBuilding","BIS_fnc_buildingPositions"]},{"name":"buildingPos","title":"buildingPos","type":"command","url":"https://community.bistudio.com/wiki/buildingPos","revid":379404,"updated":"2026-10-31T00:02:01Z","groups":["Positions"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns position of a given indexed position in a building.","syntaxes":[{"syntax":"building buildingPos index","params":[{"name":"building","type":"Object","type_expr":"Object"},{"name":"index","type":"Number","description":"index of a specific position\n\n> [!NOTE]\n> **Arma 3:** Since v1.56 index `-1` will return all available building positions.","type_expr":"Number"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"a single building position. If building position with given index does not exist, `[0, 0, 0]` is returned\n> [!NOTE] > **Arma 3:** Since v1.56 it can also return an array of all building positions in format PositionAGL if index that was given is `-1`.","text":"PositionAGL - a single building position. If building position with given index does not exist, `[0, 0, 0]` is returned\n\n> [!NOTE]\n> **Arma 3:** Since v1.56 it can also return an array of all building positions in format PositionAGL if index that was given is `-1`."},"form":"binary","left":{"text":"building"},"right":{"text":"index"}}],"examples":[{"code":["_soldier setPosATL (_house1 buildingPos 2);"]},{"code":["_allpositions = nearestBuilding player buildingPos -1;"]}],"see_also":["nearestBuilding","nearestObject","nearestObjects","nearObjects","insideBuilding","buildingExit","position","setPos","setWaypointHousePosition","waypointHousePosition","BIS_fnc_buildingPositions"],"notes":[{"user":"Hardrock","date":"2006-08-02T10:45:00Z","text":"*Notes from before the conversion:*\nThese examples will move a unit to the 1st position specified in a buildings model, in the second example - bunker1.\n\n```sqf\nthis move (building buildingPos 1);\nthis move (bunker1 buildingPos 1);\n```\n\nIn the default game buildings, the buildingPos is usually right behind a window. This can make it easy to place units in the windows of buildings, by putting the unit near a building and putting this in its init field:\n\n```sqf\nthis setPosATL ((nearestBuilding this) buildingPos 1);\n```\n\nThe location returned by buildingPos is not reliable after the player has exited and then resumed the mission. For code that is executed immediately after the mission starts there is no problem.\nIf buildingPos locations are to be accessed during the mission when the player may have exited and then resumed, save the locations you require at the start of the mission and use these saved locations in your subsequent scripts."},{"user":"Kronzky","date":"2007-01-26T01:02:00Z","text":"The highest index is *not* necessarily the highest position in a building! Check the z-value to find out the absolute height of a position."},{"user":".kju","date":"2011-01-08T00:00:00Z","text":"Almost all buildings loose their building positions when they get (visually) damaged or destroyed. Some debris do still have building positions though. So it is no technical limitation. Just most damaged/destructed buildings models do not (yet?) have building positions. Keep in mind that a damaged or destroyed building is a different object instance (and model)."}]},{"name":"buldozer_enableRoadDiag","title":"buldozer enableRoadDiag","type":"command","url":"https://community.bistudio.com/wiki/buldozer_enableRoadDiag","revid":310178,"updated":"2022-05-05T13:10:30Z","groups":["System"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","description":"Enables road diagnostics in buldozer.","syntaxes":[{"syntax":"buldozer_enableRoadDiag enable","params":[{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enable"}}],"examples":[{"code":["buldozer_enableRoadDiag true;"]}],"see_also":["buldozer_loadNewRoads","buldozer_isEnabledRoadDiag"]},{"name":"buldozer_isEnabledRoadDiag","title":"buldozer isEnabledRoadDiag","type":"command","url":"https://community.bistudio.com/wiki/buldozer_isEnabledRoadDiag","revid":310886,"updated":"2022-05-07T20:28:58Z","groups":["System"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","description":"Returns if road diagnostics are enabled in buldozer.","syntaxes":[{"syntax":"buldozer_isEnabledRoadDiag","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if enabled, otherwise false"},"form":"nullary"}],"examples":[{"code":["_isEnabled = buldozer_isEnabledRoadDiag;"]}],"see_also":["buldozer_loadNewRoads","buldozer_enableRoadDiag"]},{"name":"buldozer_loadNewRoads","title":"buldozer loadNewRoads","type":"command","url":"https://community.bistudio.com/wiki/buldozer_loadNewRoads","revid":318691,"updated":"2022-05-13T09:21:20Z","groups":["System"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Generates new roads. Working only in buldozer.","syntaxes":[{"syntax":"buldozer_loadNewRoads path","params":[{"name":"path","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"path"}}],"examples":[{"code":["_loaded = buldozer_loadNewRoads \"C:/A3/Map_Stratis/data/roads/\""]}],"see_also":["buldozer_reloadOperMap"]},{"name":"buldozer_reloadOperMap","title":"buldozer reloadOperMap","type":"command","url":"https://community.bistudio.com/wiki/buldozer_reloadOperMap","revid":318695,"updated":"2022-05-13T09:21:20Z","groups":["System"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Reload oper map visible in costMap diag tool. Working only in buldozer.","syntaxes":[{"syntax":"buldozer_reloadOperMap","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["buldozer_reloadOperMap;"]}],"see_also":["buldozer_loadNewRoads"]},{"name":"buttonAction","title":"buttonAction","type":"command","url":"https://community.bistudio.com/wiki/buttonAction","revid":376407,"updated":"2025-10-11T00:59:12Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local"},"description":"Returns the action assigned to a control of the currently active user dialog. Can be used for buttons and active texts. Read Arma: GUI Configuration for more information about user dialogs and controls.","syntaxes":[{"syntax":"buttonAction idc","params":[{"name":"idc","type":"Number","description":"button IDC","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"idc"}},{"syntax":"buttonAction control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["buttonSetAction [100, { player exec \"reply.sqs\" }];\n_action = buttonAction 100; // Returns { player exec \"reply.sqs\" };"]}],"see_also":["buttonSetAction"]},{"name":"buttonSetAction","title":"buttonSetAction","type":"command","url":"https://community.bistudio.com/wiki/buttonSetAction","revid":364179,"updated":"2024-05-05T10:46:46Z","groups":["GUI Control"],"status":"deprecated","replaced_by":["ctrlAddEventHandler"],"games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"> [!CAUTION]\n> This information is **obsolete**. Reason: Use ctrlAddEventHandler instead.\n\nSet the action of a control of the currently active user dialog. The script statement is executed on button release and `_this` is available, but contains \"\"; See Arma: GUI Configuration for more information about user dialogs. Works with:\n\n- CT_BUTTON\n- CT_XBUTTON\n- CT_ACTIVETEXT\n- CT_SHORTCUTBUTTON","syntaxes":[{"syntax":"buttonSetAction [idc, action]","params":[{"name":"idc","type":"Number","description":"button IDC","type_expr":"Number"},{"name":"action","type":"String","description":"**SQS** code body that should be executed when the button/active text is clicked","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, action]"}},{"syntax":"control buttonSetAction action","params":[{"name":"control","type":"Control","description":"button control","type_expr":"Control"},{"name":"action","type":"String","description":"**SQS** code body that should be executed when the button/active text is clicked","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"action"}}],"examples":[{"code":["buttonSetAction [100, \"player exec \"\"reply.sqs\"\"\"];"]},{"code":["_ctrl buttonSetAction \"if (alive bob) then {hint 'alive'} else {hint 'dead'}\"; // SQF but SQS compatible, see SQS"]},{"text":"Script is SQS:\n\n```sqs\n_control buttonSetAction \"hint format ['Is SQS: %1', !isNil '_time']\"\n```","code":["_control buttonSetAction \"hint format ['Is SQS: %1', !isNil '_time']\""]}],"see_also":["buttonAction"],"notes":[{"user":"Kungtotte","date":"2009-10-05T16:23:00Z","text":"When using buttonSetAction for an ActiveText control from a script, you cannot use any variables local to the script in it.\n\n```sqf\n/* This will print 'any bar' in the hint box,\n since _foo has no value according to buttonSetAction */\n\n_foo = \"foo\";\nbuttonSetAction [100, \"hint format [\"\"%1 bar\"\", _foo];\"];\n```"},{"user":"Molaron","date":"2016-02-15T10:15:00Z","text":"This command does not overwrite the button's action that was set via \"action\" in the `.hpp` of the dialog."},{"user":"Nomisum","date":"2016-06-11T19:24:00Z","text":"To use variables local to the defining script, a syntax like the one below needs to be used:\n\n```sqf\n_foo = \"foo\";\nbuttonSetAction [100, format [\"hint '%1 bar'\", _foo]];\n```\n\nworks! thanks to Kronzky for commenting this workaround in the VBS wiki"}]},{"name":"cadetMode","title":"cadetMode","type":"command","url":"https://community.bistudio.com/wiki/cadetMode","revid":325302,"updated":"2022-07-10T22:51:20Z","groups":["Difficulty"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"**Prior to Arma 3** it returns if the player is currently playing in cadet or veteran mode.","syntaxes":[{"syntax":"cadetMode","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when playing in cadet mode, false when playing in veteran mode"},"form":"nullary"}],"examples":[{"text":"SQS Syntax:\n\n```sqs\n? (cadetMode) : _AIsoldier setSkill 0.1\n```","code":["? (cadetMode) : _AIsoldier setSkill 0.1"]},{"text":"SQF Syntax:\n\n```sqf\nif (cadetMode) then { _AIsoldier setSkill 0.1 };\n```","code":["if (cadetMode) then { _AIsoldier setSkill 0.1 };"]}],"problems":"> [!NOTE]\n> This command returns the status of the global difficulty `showCadetHints`.\n> Use `difficulty in [0, 1]` to achieve the **original intended** functionality!","see_also":["hintCadet","difficulty"],"notes":[{"user":"Killswitch","date":"2009-12-01T17:49:00Z","text":"In Arma 2, this command will return true if the difficulty level is set to \"Recruit\" or \"Regular\". It returns false for the \"Veteran\" and \"Expert\" difficulty levels."}]},{"name":"calculatePath","title":"calculatePath","type":"command","url":"https://community.bistudio.com/wiki/calculatePath","revid":376951,"updated":"2026-01-01T04:02:40Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.94"},"since":"arma3 1.94","arma3_since":"1.94","description":"Spawns an agent that will execute an AI path calculation and fire the `\"PathCalculated\"` event handler.\nThe vehicle type to simulate could be one of the following presets:\n\n- `\"man\"`: C_man_1\n- `\"car\"`: C_Offroad_01_F\n- `\"tank\"`: B_MBT_01_cannon_F\n- `\"wheeled_APC\"`: B_APC_Tracked_01_rcws_F\n- `\"boat\"`: C_Rubberboat\n- `\"plane\"`: B_Plane_CAS_01_dynamicLoadout_F\n- `\"helicopter\"`: B_Heli_Light_01_F\n\nIf the given vehicle type is not one of the above presets, the exact given type is used.\n\n> [!IMPORTANT]\n> In order to guarantee that the event handler is added to the result of this command before the path is calculated, use isNil to run the code in an Unscheduled Environment:\n>\n> ```sqf\n> isNil { calculatePath [\"man\", \"safe\", _startPos, _endPos] addEventHandler [\"PathCalculated\", { hint str _this }] };\n> ```\n\n> [!NOTE]\n> If an exact path is desired, it is recommended to avoid this command and simply use the PathCalculated event handler.\n> Paths to long distances are typically calculated in segments. This command only gives the first calculated segment.","syntaxes":[{"syntax":"calculatePath [type, behaviour, from, to]","params":[{"name":"type","type":"String","description":"vehicle type to simulate (see description)","type_expr":"String"},{"name":"behaviour","type":"String","description":"AI behaviour, one of \"CARELESS\", \"SAFE\", \"AWARE\", \"COMBAT\" or \"STEALTH\"","type_expr":"String"},{"name":"from","type":"Array","description":"start position in format [x,y,z]","type_expr":"Array"},{"name":"to","type":"Array","description":"end position in format [x,y,z]","type_expr":"Array"}],"returns":{"type":"Object","type_expr":"Object","description":"the agent to add the `\"PathCalculated\"` Event Handler to."},"form":"unary","right":{"text":"[type, behaviour, from, to]"}}],"examples":[{"code":["calculatePath [\"car\", \"safe\", [2150.67,5778.19,0], [2184.11,5802.28,0]];"]},{"text":"Draws the path from South West to North East of Agia Marina:\n\n```sqf\n(calculatePath [\"man\", \"safe\", [2832.9,5927.79,0], [3107.46,6036.61,0]]) addEventHandler [\"PathCalculated\", {\n    {\n        private _marker = createMarker [\"marker\" + str _forEachIndex, _x];\n        _marker setMarkerType \"mil_dot\";\n        _marker setMarkerText str _forEachIndex;\n    } forEach (_this select 1);\n}];\n```","code":["(calculatePath [\"man\", \"safe\", [2832.9,5927.79,0], [3107.46,6036.61,0]]) addEventHandler [\"PathCalculated\", {\n\t{\n\t\tprivate _marker = createMarker [\"marker\" + str _forEachIndex, _x];\n\t\t_marker setMarkerType \"mil_dot\";\n\t\t_marker setMarkerText str _forEachIndex;\n\t} forEach (_this select 1);\n}];"]},{"text":"Alternative usage of calculatePath functionality that is free of the double execution bug (and calculatePath command):\n\n```sqf\nprivate _agent = createAgent [typeOf player, position player, [], 0, \"NONE\"];\n_agent addEventHandler [\"PathCalculated\",\n{\n    {\n        private _marker = createMarker [\"marker\" + str _forEachIndex, _x];\n        _marker setMarkerType \"mil_dot\";\n        _marker setMarkerText str _forEachIndex;\n    }\n    forEach (_this select 1);\n}];\n_agent setDestination [player getRelPos [500, 0], \"LEADER PLANNED\", true];\n```","code":["private _agent = createAgent [typeOf player, position player, [], 0, \"NONE\"];\n_agent addEventHandler [\"PathCalculated\",\n{ \n\t{ \n\t\tprivate _marker = createMarker [\"marker\" + str _forEachIndex, _x];\n\t\t_marker setMarkerType \"mil_dot\";\n\t\t_marker setMarkerText str _forEachIndex;\n\t} \n\tforEach (_this select 1);\n}];\n_agent setDestination [player getRelPos [500, 0], \"LEADER PLANNED\", true];"]},{"text":"Same as above but for a vehicle:\n\n```sqf\nprivate _agent = createAgent [typeOf player, position player, [], 0, \"NONE\"];\nprivate _car = \"B_Quadbike_01_F\" createVehicle position player;\n_agent moveInDriver _car;\n_agent addEventHandler [\"PathCalculated\",\n{\n    {\n        private _marker = createMarker [\"marker\" + str _forEachIndex, _x];\n        _marker setMarkerType \"mil_dot\";\n        _marker setMarkerText str _forEachIndex;\n    }\n    forEach (_this select 1);\n}];\n_agent setDestination [player getRelPos [500, 0], \"LEADER PLANNED\", true];\n```","code":["private _agent = createAgent [typeOf player, position player, [], 0, \"NONE\"];\nprivate _car = \"B_Quadbike_01_F\" createVehicle position player;\n_agent moveInDriver _car;\n_agent addEventHandler [\"PathCalculated\",\n{ \n\t{ \n\t\tprivate _marker = createMarker [\"marker\" + str _forEachIndex, _x];\n\t\t_marker setMarkerType \"mil_dot\";\n\t\t_marker setMarkerText str _forEachIndex;\n\t} \n\tforEach (_this select 1);\n}];\n_agent setDestination [player getRelPos [500, 0], \"LEADER PLANNED\", true];"]}],"problems":"For some unknown reason, the \"PathCalculated\" Event Handler is fired twice, first with the calculated path and second with an array consisting of 2 elements, which are identical and are equal to the end point.\nSee **Example 3 & 4** for a workaround.","see_also":["setDriveOnPath","setDestination"],"notes":[{"user":"Tankbuster","date":"2019-06-06T10:28:00Z","text":"When using this command to get the predicted path of vehicles driving and having them stay on roads (not go cross country) is important,\nthe best vehicle to use is \"wheeled_APC\" and careless behaviour."}]},{"name":"calculatePlayerVisibilityByFriendly","title":"calculatePlayerVisibilityByFriendly","type":"command","url":"https://community.bistudio.com/wiki/calculatePlayerVisibilityByFriendly","revid":309210,"updated":"2022-05-03T22:23:29Z","groups":["System"],"status":"ok","games":{"arma3":"1.84"},"since":"arma3 1.84","arma3_since":"1.84","description":"Sets if friendly units will calculate player's visibility or not. Default value is false.","syntaxes":[{"syntax":"calculatePlayerVisibilityByFriendly calculate","params":[{"name":"calculate","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"calculate"}}],"examples":[{"code":["calculatePlayerVisibilityByFriendly true;"]}],"see_also":["getCalculatePlayerVisibilityByFriendly","knowsAbout"]},{"name":"call","title":"call","type":"command","url":"https://community.bistudio.com/wiki/call","revid":373729,"updated":"2025-06-23T13:37:41Z","groups":["Program Flow"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Adds given set of compiled instructions to the current stack and waits for it to finish and return, provides an option to pass arguments to the executed Code.\nSee Scheduler to learn more about how the code is executed and behaves.","syntaxes":[{"syntax":"call code","params":[{"name":"code","type":"Code","description":"compiled instructions\n\n> [!NOTE]\n> **Operation Flashpoint:** Operation Flashpoint takes String.\n\n> [!NOTE]\n> This way of calling has access to its parent scope's `_this`, as all it does is creating a scope.","type_expr":"Code"}],"returns":{"type":"Anything","type_expr":"Anything","description":"the last value given in the function is returned - see the topic Function for more information"},"form":"unary","right":{"text":"code"}},{"syntax":"args call code","params":[{"name":"args","type":"Anything","description":"arguments that are passed to the function in the `_this` variable.","type_expr":"Anything"},{"name":"code","type":"Code","description":"compiled instructions\n\n> [!NOTE]\n> **Operation Flashpoint:** Operation Flashpoint takes String.","type_expr":"Code"}],"returns":{"type":"Anything","type_expr":"Anything","description":"the last value given in the function is returned. See the topic Function for more information."},"form":"binary","left":{"text":"args"},"right":{"text":"code"}},{"syntax":"hashMapObj call [methodName, arguments]","since":"arma3 2.14","params":[{"name":"hashMapObj","type":"HashMap","description":"the HashMap (not necessarily created through createHashMapObject) to call the method on","type_expr":"HashMap"},{"name":"methodName","type":"String","description":"the name of the method to call (the method must be defined in *hashMapObj*; see createHashMapObject)","type_expr":"String"},{"name":"arguments","type":"Anything","optional":true,"default":"parent scope's `_this`","description":"arguments passed to the method in the `_this` variable","type_expr":"Anything","text":"arguments: Anything - (Optional, default parent scope's `_this`) arguments passed to the method in the `_this` variable"}],"returns":{"type":"Anything","type_expr":"Anything","description":"the value returned by the methodName method","text":"Anything - the value returned by the *methodName* method"},"form":"binary","left":{"text":"hashMapObj"},"right":{"text":"[methodName, arguments]"}}],"examples":[{"code":["call { hint str 123; };"]},{"code":["123 call { hint str _this; };"]},{"code":["_sum = [1, 2] call { (_this select 0) + (_this select 1); };\nhint str _sum; // displays 3"]},{"code":["123 call compile \"hint str _this;\";"]},{"code":["_result = 123 call compile preprocessFileLineNumbers \"myFile.sqf\";"]},{"text":"```sqf\nprivate _hashMapObj = createHashMapObject [[\n    [\"MyMethod\", { systemChat (\"MyMethod arguments: \" + str _this); }]\n]];\n\n_hashMapObj call [\"MyMethod\", [\"Hello there\", player, 123]]; // hints 'MyMethod arguments: [\"Hello there\", player, 123]'\n```","code":["private _hashMapObj = createHashMapObject [[\n\t[\"MyMethod\", { systemChat (\"MyMethod arguments: \" + str _this); }]\n]];\n\n_hashMapObj call [\"MyMethod\", [\"Hello there\", player, 123]]; // hints 'MyMethod arguments: [\"Hello there\", player, 123]'"]}],"see_also":["spawn","execVM","canSuspend","compile","compileScript","preprocessFile","remoteExec","remoteExecCall"],"notes":[{"user":"Leopard20","date":"2021-11-05T10:52:49Z","text":"Contrary to a widespread misconception in the community, call doesn't necessarily execute the code in the Unscheduled Environment. Call simply means: \"execute the code here\", just like how you execute a code using then (`if (true) then _code`) or do. Therefore it does not change the environment:\n\n| *call* executed in environment: | Resulting environment of the code: |\n|---|---|\n| Scheduled | Scheduled |\n| Unscheduled | Unscheduled |\n\nThis means that doing something like this (which is misused very often):\n\n```sqf\nprivate _handle = _params spawn MY_fnc_Function;\nwaitUntil { scriptDone _handle };\n```\n\nis not needed, because a lot of performance would be wasted compared to simply doing this:\n\n```sqf\n_params call MY_fnc_Function;\n```\n\nwhich does the exact same thing as the previous code, except no new *\"scheduler thread\"* is created and the function executes seamlessly, plus the added performance benefit as mentioned before.\nIf it is necessary to execute a code in the Unscheduled Environment, one can use isNil instead:\n\n```sqf\nisNil {_params call MY_fnc_Function}; // MY_fnc_Function is always executed unscheduled, regardless of the current environment\n```\n\nor if there are no parameters, one can simply do this:\n\n```sqf\nisNil MY_fnc_Function\n```"}]},{"name":"callExtension","title":"callExtension","type":"command","url":"https://community.bistudio.com/wiki/callExtension","revid":378445,"updated":"2026-04-14T14:09:53Z","groups":["System"],"status":"ok","games":{"arma2oa":"1.60","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.60","arma3_since":"0.50","description":"Calls custom .dll also known as Extension. The name of the extension is the name of the extension .dll without \".dll\" part (or without \"_x64.dll\" part on 64-bit Arma). For example if the file is 'myExtension.dll' the name of the extension will be \"myExtension\". For 64-bit extensions, the name of the extension doesn't need to change and is still \"myExtension\". The game will automatically look for 'myExtension_x64.dll' when you use 64-bit Arma exe.\n\nThis command is blocking, meaning that the game will wait for the extension to return before continuing. This may cause FPS drop if extension is not optimised. If extension takes too long, consider making asynchronous extension, where the result of the work of the extension is collected in a separate call.\n\nCurrently there is no limit how much data you can send to the extension. However there is a limit on how much data you can return from extension in one call. The limit is known to the extension and is passed in `int outputSize`. The limit may or may not change in the future and is currently 10240 bytes. It is up to extension designer to handle multipart results if returned data exceeds output limit.\n\nSince Arma 3 v1.68 it is possible to pass array of arguments to extensions. The array of arguments could be anything and all elements will be converted to strings, however you might want to only send simple types like Booleans, Strings, Numbers and Arrays of all of the above. There is currently a limit on how many arguments can be sent and it is 2048 (since Arma 3 v1.92; previous limit: 1024). However an argument could be an Array itself, in this case extension maker will have to provide additional methods for parsing such arguments.\n\nPossible error codes:\n\n- 101: SYNTAX_ERROR_WRONG_PARAMS_SIZE\n- 102: SYNTAX_ERROR_WRONG_PARAMS_TYPE\n- 201: PARAMS_ERROR_TOO_MANY_ARGS\n- 301: EXECUTION_WARNING_TAKES_TOO_LONG\n- Arma 3 v2.22 400: EXTENSION_LOAD_FAILED\n- Arma 3 v2.22 403: EXTENSION_BLOCKED_BY_BATTLEYE\n- Arma 3 v2.22 404: EXTENSION_NOT_FOUND\n- Arma 3 v2.22 412: EXTENSION_BLOCKED_BY_SCRIPT\n- Arma 3 v2.22 415: EXTENSION_WRONG_ARCHITECTURE\n\nEach error will have entry in .rpt file with more details.\n\nThe extension execution timeout, after which `301: EXECUTION_WARNING_TAKES_TOO_LONG` warning is issued, is hardcoded on clients and is 1000.0 milliseconds (1 second). On the server the default limit is also 1 second, however it is possible to set custom limit with `callExtReportLimit` param (see Server Options).\n\nIf an extension with the given name cannot be found (or it is found but doesn't implement the required interface properly / at all) the following error will be written into the RPT (In this example the given dll-name was \"MyExtension\"):\n\n```\n14:27:07 CallExtension 'MyExtension' could not be found\n```\n\nIf an extension is not whitelisted with BattlEye (see Extensions for more info) it will be blocked on clients running with enabled BattlEye protection. RPT message outputted however is a little obscure:\n\n```\n21:35:04 Call extension 'MyExtension' could not be loaded: Insufficient system resources exist to complete the requested service\n```\n\nSince Arma 3 v1.70, `RVExtensionVersion` interface (see source code example below) has been added, which is called by the engine on extension load and expects extension version. This interface is designed to work with both, Linux and Windows. The max buffer size is 32 bytes. The version information will then appear in .rpt file like so:\n\n```\n19:06:36 CallExtension loaded: test_extension (.\\test_extension.dll) [1.0.0.1]\n```\n\nFor more information see Extensions.\n\nLinux specific\nWhile on Windows the extension name is case-insensitive, on Linux the extension name is case-sensitive and should match the name of the .so file exactly (minus \".so\" part).\n\n> [!IMPORTANT]\n> If a user has **anti-virus software real time protection running**, this could cause brand new extension to stutter the game and return with `EXECUTION_WARNING_TAKES_TOO_LONG` when executed for the first time, because of the AV software scanning.\n>\n> After the extension is whitelisted by AV this should go away until a new version of the extension is installed.\n>\n> Perhaps a dummy call to the extension on init should be considered as a feature of implementation to account for that.\n\n**Extension Context**\n\nSince Arma 3 v2.12 the engine will call the `RVExtensionContext` method (if it exists, see Example 4) and pass the following data:\n\n- `steamID` of the client calling extension getPlayerUID or \"0\"\n- `fileSource` from which the extension was executed or \"\" if done on the fly\n- `missionName` missionNameSource\n- `serverName` serverName","syntaxes":[{"syntax":"extension callExtension function","params":[{"name":"extension","type":"String","description":"extension name","type_expr":"String"},{"name":"function","type":"String","description":"data sent to the extension","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"data sent back from extension; If the extensiion was not found an empty String will be returned"},"form":"binary","left":{"text":"extension"},"right":{"text":"function"}},{"syntax":"extension callExtension [function, arguments]","since":"arma3 1.68","params":[{"name":"extension","type":"String","description":"extension name","type_expr":"String"},{"name":"function","type":"String","description":"extension function identifier","type_expr":"String"},{"name":"arguments","type":"Array of Anything","description":"function arguments. Each element will be converted to String automatically. Current allowed max length of this array is 2048 (since Arma 3 v1.92; previous limit: 1024)","type_expr":"Array<Anything>"}],"returns":{"type":"Array","type_expr":"Array","description":"with [result, returnCode, errorCode]\n- result: String - data sent back from extension. It is up to extension maker what it is. - returnCode: Number - integer return from extension method. It is up to extension maker to define it. - errorCode: Number - error code in case of command error (see description). 0 means no errors.","text":"Array with [result, returnCode, errorCode]\n\n- result: String - data sent back from extension. It is up to extension maker what it is.\n- returnCode: Number - integer return from extension method. It is up to extension maker to define it.\n- errorCode: Number - error code in case of command error (see description). 0 means no errors."},"form":"binary","left":{"text":"extension"},"right":{"text":"[function, arguments]"}}],"examples":[{"code":["_return = \"myExtension\" callExtension \"stringToBeParsed\";"]},{"code":["_result = \"test_extension\" callExtension str weapons player;\n_result = \"test_extension\" callExtension [\"fnc1\", getUnitLoadout player];\n_result = \"test_extension\" callExtension [\"fnc2\", magazinesAmmoFull player];\n_result = \"test_extension\" callExtension [\"fnc1\", [weapons player, magazines player]];"]},{"text":"```sqf\n_result = \"test_extension\" callExtension [\"fnc1\", [1, \"two\", true, [4, \"five\", false]]];\nparseSimpleArray (_result select 0) params [\"_number\",\"_string\",\"_boolean\",\"_array\"];\nsystemChat str [_number,_string,_boolean,_array];\n```\n\nSource Code ([Download .dll](http://data.bistudio.com/a3data/test_extension.zip))\n\nThis is an example of an extension compatible with both syntaxes. When using 1st syntax, the data is just copied from input to output. When using alt syntax, the arguments are parsed and then assembled back into string array in 2 ways: fnc1 and fnc2. fnc1 is a fraction faster.\n\n```cpp\n#include <string>\n#include <vector>\n#include <iterator>\n#include <sstream>\n\n#define CURRENT_VERSION \"1.0.0.1\"\n\nextern \"C\"\n{\n    //--- Engine called on extension load\n    __declspec (dllexport) void __stdcall RVExtensionVersion(char *output, int outputSize);\n    //--- STRING callExtension STRING\n    __declspec (dllexport) void __stdcall RVExtension(char *output, int outputSize, const char *function);\n    //--- STRING callExtension ARRAY\n    __declspec (dllexport) int __stdcall RVExtensionArgs(char *output, int outputSize, const char *function, const char **args, int argsCnt);\n}\n\n//--- Extension version information shown in .rpt file\nvoid __stdcall RVExtensionVersion(char *output, int outputSize)\n{\n    //--- max outputSize is 32 bytes\n    strncpy_s(output, outputSize, CURRENT_VERSION, _TRUNCATE);\n}\n\n//--- name callExtension function\nvoid __stdcall RVExtension(char *output, int outputSize, const char *function)\n{\n    std::string str = function;\n    strncpy_s(output, outputSize, (\"Input Was: \" + str).c_str(), _TRUNCATE);\n}\n\n//--- name callExtension [function, args]\nint __stdcall RVExtensionArgs(char *output, int outputSize, const char *function, const char **args, int argsCnt)\n{\n    if (strcmp(function, \"fnc1\") == 0)\n    {\n        //--- Manually assemble output array\n        int i = 0;\n        std::string str = \"[\";\n\n        //--- Each argument can be accessed via args[n]\n        if (argsCnt > 0)\n            str += args[i++];\n\n        while (i < argsCnt)\n        {\n            str += \",\";\n            str += args[i++];\n        }\n\n        str += \"]\";\n\n        //--- Extension result\n        strncpy_s(output, outputSize, str.c_str(), _TRUNCATE);\n\n        //--- Extension return code\n        return 100;\n    }\n\n    else if (strcmp(function, \"fnc2\") == 0)\n    {\n        //--- Parse args into vector\n        std::vector<std::string> vec(args, std::next(args, argsCnt));\n\n        std::ostringstream oss;\n        if (!vec.empty())\n        {\n            //--- Assemble output array\n            std::copy(vec.begin(), vec.end() - 1, std::ostream_iterator<std::string>(oss, \",\"));\n            oss << vec.back();\n        }\n\n        //--- Extension result\n        strncpy_s(output, outputSize, (\"[\" + oss.str() + \"]\").c_str(), _TRUNCATE);\n\n        //--- Extension return code\n        return 200;\n    }\n\n    else\n    {\n        strncpy_s(output, outputSize, \"Avaliable Functions: fnc1, fnc2\", outputSize - 1);\n        return -1;\n    }\n}\n```","code":["_result = \"test_extension\" callExtension [\"fnc1\", [1, \"two\", true, [4, \"five\", false]]];\nparseSimpleArray (_result select 0) params [\"_number\",\"_string\",\"_boolean\",\"_array\"];\nsystemChat str [_number,_string,_boolean,_array];"]},{"text":"Since Arma 3 v2.12:\n\n```sqf\nhint (\"myExtContext\" callExtension \"\");\n```\n\nHere is a minimal example:\n\n```cpp\n#include <string>\n#include <vector>\n#include <iterator>\n#include <sstream>\n#include <iomanip>\n\nBOOL APIENTRY DllMain(    HMODULE hModule,\n                        DWORD ul_reason_for_call,\n                        LPVOID lpReserved)\n{\n    switch (ul_reason_for_call)\n    {\n        case DLL_PROCESS_ATTACH:\n        case DLL_THREAD_ATTACH:\n        case DLL_THREAD_DETACH:\n        case DLL_PROCESS_DETACH:\n            break;\n    }\n    return TRUE;\n}\n\nstd::vector<std::string> contextInfo;\n\nextern \"C\"\n{\n    //--- User entry point\n    __declspec (dllexport) void __stdcall RVExtension(char *output, int outputSize, const char *function);\n    //--- Engine passed context\n    __declspec (dllexport) void __stdcall RVExtensionContext(const char **args, int argsCnt);\n}\n\n//--- name callExtension function\nvoid __stdcall RVExtension(char *output, int outputSize, const char *function)\n{\n    //--- Not used here\n    (void)function;\n\n    if (!contextInfo.empty())\n    {\n        std::ostringstream oss;\n        const char qt = '\"';\n\n        for (auto it = contextInfo.begin(); it != contextInfo.end() - 1; ++it)\n            oss << std::quoted(*it, qt, qt) << \",\";\n        oss << std::quoted(contextInfo.back(), qt, qt);\n\n        //--- Send context info back\n        strncpy_s(output, outputSize, (\"[\" + oss.str() + \"]\").c_str(), _TRUNCATE);\n    }\n}\n\n//--- Context is executed first, copy it\nvoid __stdcall RVExtensionContext(const char **args, int argsCnt)\n{\n    contextInfo.assign(args, std::next(args, argsCnt));\n}\n```","code":["hint (\"myExtContext\" callExtension \"\");"]}],"see_also":["freeExtension","call","compile","parseSimpleArray","Extensions"]},{"name":"camCommand","title":"camCommand","type":"command","url":"https://community.bistudio.com/wiki/camCommand","revid":369082,"updated":"2024-09-02T20:36:38Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Executes a command on the given *camera / actor* object. Known commands:\n\n| All cameras | \"Camera\" | \"Seagull\" | \"CamCurator\" |\n|---|---|---|---|\n| - `\"manual on\"`<br>- `\"manual off\"` | - `\"inertia on\"`<br>- `\"inertia off\"` | - `\"landed\"` lands the seagull<br>- `\"airborne\"` makes the seagull fly | - `\"maxPitch (x)\"` (number, in degrees)<br>- `\"minPitch (x)\"` (number, in degrees)<br>- `\"speedDefault (x)\"` (number)<br>- `\"speedMax (x)\"` (number)<br>- `\"ceilingHeight (x)\"` (number, in meters, ASL)<br>- `\"atl (x)\"` (on/off)<br>- `\"surfaceSpeed (x)\"` (on/off) |\n\n> [!NOTE]\n> The camCommand effect is immediate and does not need camCommit/camCommitPrepared.","syntaxes":[{"syntax":"camera camCommand command","params":[{"name":"camera","type":"Object","description":"see camCreate","type_expr":"Object"},{"name":"command","type":"String","description":"see description","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"command"}}],"examples":[{"code":["_camera camCommand \"manual on\";"]},{"code":["private _camera = \"CamCurator\" camCreate [0,0,0];\n_camera camCommand \"maxPitch 89\";\n_camera camCommand \"minPitch -89\";\n_camera camCommand \"speedDefault 0.1\";\n_camera camCommand \"speedMax 2\";\n_camera camCommand \"ceilingHeight 5000\";\n_camera camCommand \"atl off\";\n_camera camCommand \"surfaceSpeed off\";"]}],"see_also":["cameraEffect","camCreate","camCommit"]},{"name":"camCommit","title":"camCommit","type":"command","url":"https://community.bistudio.com/wiki/camCommit","revid":325309,"updated":"2022-07-10T23:02:07Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Smoothly conduct the changes that were assigned to a camera within the given time. If the time is set to zero, the changes are done immediately. For `camPrepareXXX` commands use camCommitPrepared.","syntaxes":[{"syntax":"camera camCommit time","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"time","type":"Number","description":"time in seconds during which the changes shall be done","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"time"}}],"examples":[{"text":"SQS Syntax:\n\n```sqs\n; create a camera object\n_cam = \"camera\" camCreate [5600,4800,10]\n_cam camSetTarget player\n_cam cameraEffect [\"internal\", \"BACK\"]\n_cam camCommit 0\n\n; smoothly move the camera to its new position in 6 seconds\n_cam camSetPos [5680,4720,20]\n_cam camCommit 6\n@camCommitted _cam\n\n; proceed\n```","code":["; create a camera object\n_cam = \"camera\" camCreate [5600,4800,10]\n_cam camSetTarget player\n_cam cameraEffect [\"internal\", \"BACK\"]\n_cam camCommit 0\n\n; smoothly move the camera to its new position in 6 seconds\n_cam camSetPos [5680,4720,20]\n_cam camCommit 6\n@camCommitted _cam\n\n; proceed"]},{"text":"SQF Syntax:\n\n```sqf\nprivate \"_cam\";\n\n// create a camera object\n_cam = \"camera\" camCreate [position player select 0, position player select 1, 2];\n_cam camSetTarget player;\n_cam cameraEffect [\"internal\", \"BACK\"];\n_cam camCommit 0;\n\n// smoothly move the camera to its new position in 6 seconds\n_cam camSetPos [position player select 0, (position player select 1) + 10, 20];\n_cam camCommit 6;\nwaitUntil { camCommitted _cam; };\n```","code":["private \"_cam\";\n\n// create a camera object\n_cam = \"camera\" camCreate [position player select 0, position player select 1, 2];\n_cam camSetTarget player;\n_cam cameraEffect [\"internal\", \"BACK\"];\n_cam camCommit 0;\n\n// smoothly move the camera to its new position in 6 seconds\n_cam camSetPos [position player select 0, (position player select 1) + 10, 20];\n_cam camCommit 6;\nwaitUntil { camCommitted _cam; };"]}],"see_also":["camCommitted","camCommitPrepared"]},{"name":"camCommitPrepared","title":"camCommitPrepared","type":"command","url":"https://community.bistudio.com/wiki/camCommitPrepared","revid":349291,"updated":"2023-11-08T14:51:57Z","groups":["Camera Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Smoothly conducts the changes that were assigned to a camera within the given time. If the time is set to zero, the changes are done immediately.\nThis command is for use with `camPrepareXXX` commands. For the normal cam command use camCommit.","syntaxes":[{"syntax":"camera camCommitPrepared time","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"time","type":"Number","description":"time in seconds in which the changes shall be done","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"time"}}],"examples":[{"code":["// create a camera object\n_cam = \"camera\" camCreate [5600, 4800, 10];\n_cam camPrepareTarget player;\n_cam cameraEffect [\"internal\", \"BACK\"];\n_cam camCommitPrepared 0;\n\n// smoothly move the camera to its new position in 6 seconds\n_cam camPreparePos [5680, 4720, 20];\n_cam camCommitPrepared 6;\nwaitUntil { camCommitted _cam };\n\n// proceed"]}],"see_also":["camCommitted","camCommit"]},{"name":"camCommitted","title":"camCommitted","type":"command","url":"https://community.bistudio.com/wiki/camCommitted","revid":325310,"updated":"2022-07-10T23:05:00Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Checks if the conduction of the last camCommit call already finished.","syntaxes":[{"syntax":"camCommitted camera","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the last camCommit already finished, false if not"},"form":"unary","right":{"text":"camera"}}],"examples":[{"text":"SQS:\n\n```sqs\n; create a camera object\n_cam = \"camera\" camCreate [5600,4800,10]\n_cam camSetTarget player\n_cam cameraEffect [\"internal\", \"BACK\"]\n_cam camCommit 0\n\n; smoothly move the camera to its new position in 6 seconds\n_cam camSetPos [5680,4720,20]\n_cam camCommit 6\n@camCommitted _cam\n\n; proceed\n```","code":["; create a camera object\n_cam = \"camera\" camCreate [5600,4800,10]\n_cam camSetTarget player\n_cam cameraEffect [\"internal\", \"BACK\"]\n_cam camCommit 0\n\n; smoothly move the camera to its new position in 6 seconds\n_cam camSetPos [5680,4720,20]\n_cam camCommit 6\n@camCommitted _cam\n\n; proceed"]},{"text":"SQF:\n\n```sqf\n_cam = \"camera\" camCreate [0, 0, 0];\n_cam camSetTarget player;\n_cam camSetRelPos [0, -5, 10];\n_cam cameraEffect [\"internal\", \"back\"];\n_cam camCommit 0;\n\nwaitUntil { camCommitted _cam };\n\n_cam camSetTarget player;\n_cam camSetRelPos [90, 25, 10];\n_cam cameraEffect [\"internal\", \"back\"];\n_cam camCommit 5;\n\nwaitUntil {camCommitted _cam};\n\n_cam camSetTarget player;\n_cam camSetRelPos [-90, -5, 10];\n_cam cameraEffect [\"internal\", \"back\"];\n_cam camCommit 5;\n```","code":["_cam = \"camera\" camCreate [0, 0, 0];\n_cam camSetTarget player;\n_cam camSetRelPos [0, -5, 10];\n_cam cameraEffect [\"internal\", \"back\"];\n_cam camCommit 0;\n\nwaitUntil { camCommitted _cam };\n\n_cam camSetTarget player;\n_cam camSetRelPos [90, 25, 10];\n_cam cameraEffect [\"internal\", \"back\"];\n_cam camCommit 5;\n\nwaitUntil {camCommitted _cam};\n\n_cam camSetTarget player;\n_cam camSetRelPos [-90, -5, 10];\n_cam cameraEffect [\"internal\", \"back\"];\n_cam camCommit 5;"]}],"see_also":["camCommit"]},{"name":"camConstuctionSetParams","title":"camConstuctionSetParams","type":"command","url":"https://community.bistudio.com/wiki/camConstuctionSetParams","revid":377514,"updated":"2026-01-02T06:50:21Z","groups":["Camera Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets construction camera parameters. To work with \"camconstruct\" object.\n\n> [!IMPORTANT]\n> Beware: camCon**stu**ctionSetParams [sic].","syntaxes":[{"syntax":"camera camConstuctionSetParams [position, radius, maxAboveLand]","params":[{"name":"camera","type":"Object","type_expr":"Object"},{"name":"position","type":"Position","type_expr":"Position"},{"name":"radius","type":"Number","type_expr":"Number"},{"name":"maxAboveLand","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"[position, radius, maxAboveLand]"}}],"examples":[{"code":["_camera camConstuctionSetParams [getPos player, 50, 20];"]}],"see_also":["camCreate","cameraEffect"]},{"name":"camCreate","title":"camCreate","type":"command","url":"https://community.bistudio.com/wiki/camCreate","revid":377423,"updated":"2026-01-02T06:45:34Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Create a camera or a seagull object on the given position. The creation happens immediately and doesn't wait for camCommit.\nAmong other commands, cameraEffect must be used to enter the camera's view and camDestroy to delete the created camera. See also Camera Control.\n\n> [!IMPORTANT]\n> - Other objects can be created this way, but vehicles created with camCreate cannot be entered\n> - Any unit created with camCreate will remain static\n> - Unlike createVehicle, objects are created exactly at the given position, without consideration of the surrounding objects.","syntaxes":[{"syntax":"type camCreate position","params":[{"name":"type","type":"String","description":"camera type, one of the following:\n\n- \"camera\"\n- \"seagull\" (a crow in Arma 2)\n- \"camconstruct\"\n- \"camcurator\" (Since Arma 3 Zeus)\n- \"crowe\" (crow - Arma 3)\n- or any vehicle class suitable to be spawned with camera","type_expr":"String"},{"name":"position","type":"PositionAGL","description":"position at which to create the object","type_expr":"PositionAGL"}],"returns":{"type":"Object","type_expr":"Object","description":"the created camera"},"form":"binary","left":{"text":"type"},"right":{"text":"position"}}],"examples":[{"code":["_cam = \"camera\" camCreate (ASLToAGL eyePos player);"]},{"code":["_flr = \"flare\" camCreate (position _myPlane); // works too"]}],"multiplayer":"camCreated objects are only visible locally (meaning they are client-side effects).","see_also":["camCommand","camDestroy","camSetFocus","camCommit","setPiPEffect","createVehicle","createUnit","showCinemaBorder","cameraEffect","cameraEffectEnableHUD"]},{"name":"camDestroy","title":"camDestroy","type":"command","url":"https://community.bistudio.com/wiki/camDestroy","revid":369081,"updated":"2024-09-02T20:36:38Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Destroys camera object created with camCreate. This command doesn't need camCommit.\n\n> [!IMPORTANT]\n> Destroying camera object does not terminate camera effect automatically, use cameraEffect prior to deleting the camera (see Example 2)","syntaxes":[{"syntax":"camDestroy object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["camDestroy _cam;"]},{"code":["_cam cameraEffect [\"terminate\",\"back\"];\ncamDestroy _cam;"]}],"see_also":["camCreate","cameraEffect"]},{"name":"cameraEffect","title":"cameraEffect","type":"command","url":"https://community.bistudio.com/wiki/cameraEffect","revid":336915,"updated":"2023-01-04T16:43:59Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets the given effect on the given camera. If you want to switch the screen directly to the first-person, aiming, third-person or group view of an object, use switchCamera instead. The effect type \"Terminate\" is used to exit the current camera view and switch back to the player's view. Does not need camCommit.\n\nSince Arma 3 v1.74, it is possible to terminate individual r2t source. For example:\n\n```sqf\ncam cameraEffect [\"terminate\", \"back\", \"rtt1\"]; // would terminate \"rtt1\" r2t source\ncam cameraEffect [\"terminate\", \"back\"]; // would terminate all r2t sources\n```\n\n> [!IMPORTANT]\n> One cannot mix and match cameraEffect and can either have multiple r2t cameras or a single camera for the whole screen.\n> If one needs a background stream overlayed with r2t streams, this could be achieved by creating an object and using switchCamera to switch to it for background image, while using cameraEffect for r2t overlay (see Example 4).","syntaxes":[{"syntax":"camera cameraEffect [effectName, effectPosition, r2tName]","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"effectName","type":"String","description":"the effect type (defined in main config or CfgCameraEffects >> Array). Defaults are: `\"Internal\"`, `\"External\"`, `\"Fixed\"`, `\"FixedWithZoom\"`, `\"Terminate\"`","type_expr":"String"},{"name":"effectPosition","type":"String","description":"position of the effect. Can be one of:\n\n- `\"TOP\"`\n- `\"LEFT\"`\n- `\"RIGHT\"`\n- `\"FRONT\"`\n- `\"BACK\"`\n- `\"LEFT FRONT\"`\n- `\"RIGHT FRONT\"`\n- `\"LEFT BACK\"`\n- `\"RIGHT BACK\"`\n- `\"LEFT TOP\"`\n- `\"RIGHT TOP\"`\n- `\"FRONT TOP\"`\n- `\"BACK TOP\"`\n- `\"BOTTOM\"`\n\nThese are usually used with \"Fixed\" and \"FixedWithZoom\" effect types. If not sure which position to use, set it to `\"BACK\"`.","type_expr":"String"},{"name":"r2tName","type":"String","optional":true,"description":"Render To Texture surface reference","type_expr":"String","text":"r2tName: String - (Optional) Render To Texture surface reference"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"[effectName, effectPosition, r2tName]"}}],"examples":[{"code":["_cam cameraEffect [\"internal\", \"BACK\"];"]},{"code":["_cam cameraEffect [\"internal\", \"back\", \"rendersurface\"];"]},{"code":["cam = \"seagull\" camCreate (player modelToWorld [0,0,100]);\ncam cameraEffect [\"FIXED\", \"LEFT TOP\"];\ncam camCommand \"MANUAL ON\";"]},{"code":["_ctrl = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscPicture\", -1];\n_ctrl ctrlSetPosition [0.5, 0, 0.5, 0.5];\n_ctrl ctrlSetText \"#(argb,512,512,1)r2t(rtt1,1.0)\";\n_ctrl ctrlCommit 0;\n_cam1 = \"camera\" camCreate (ASLToAGL eyePos player vectorAdd [0, -10, 0]);\n_cam1 cameraEffect [\"Internal\", \"Back\", \"rtt1\"];\n_cam2 = \"Land_HandyCam_F\" createVehicle [0,0,0];\n_cam2 enableSimulation false;\n_cam2 setPos (ASLToAGL eyePos player vectorAdd [0, 10, 0]);\n_cam2 setDir (_cam2 getDir player);\nswitchCamera _cam2;"]}],"see_also":["switchCamera","cameraView","cameraOn","setPiPEffect","camCreate","cameraEffectEnableHUD","camUseNVG","setCamUseTI"],"notes":[{"user":"Killzone_Kid","date":"2016-10-30T16:40:00Z","text":"Types of camera for CfgCameraEffects config:\n\n- CamExternal (CamInterpolated) `type = 0;` // linked directly with object\n- CamStatic `type = 1;` // fixed point in space\n- CamStaticWithZoom `type = 2;` // fixed point in space\n- CamChained `type = 3;` // chained\n- CamTerminate `type = 4;` // terminate\n- CamInternal `type = 5;` // internal view"}]},{"name":"cameraEffectEnableHUD","title":"cameraEffectEnableHUD","type":"command","url":"https://community.bistudio.com/wiki/cameraEffectEnableHUD","revid":379319,"updated":"2026-10-30T23:50:42Z","groups":["Camera Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Enable / disable showing of in-game UI during currently active camera effect. By default the HUD is off, which will make results of drawIcon3D invisible, for example.","syntaxes":[{"syntax":"cameraEffectEnableHUD enable","params":[{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enable"}}],"examples":[{"code":["cameraEffectEnableHUD true;"]}],"see_also":["showHUD","shownMap","visibleMap","forceMap","shownGPS","shownWatch","shownCompass","shownUAVFeed","camCreate","cameraEffect"],"notes":[{"user":"Rebelvg","date":"2015-11-03T09:04:00Z","text":"Must be executed after camCommit."}]},{"name":"cameraInterest","title":"cameraInterest","type":"command","url":"https://community.bistudio.com/wiki/cameraInterest","revid":320962,"updated":"2022-05-13T10:04:50Z","groups":["Camera Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return camera interest for given entity, as set by setCameraInterest, or as autodetected.","syntaxes":[{"syntax":"cameraInterest entity","params":[{"name":"entity","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"entity"}}],"examples":[{"code":["camInterest = cameraInterest myUnit;"]}],"see_also":["setCameraInterest"]},{"name":"cameraOn","title":"cameraOn","type":"command","url":"https://community.bistudio.com/wiki/cameraOn","revid":347206,"updated":"2023-09-05T08:55:52Z","groups":["Camera Control","Remote Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the vehicle to which the camera is attached. If you need the person, see focusOn.","syntaxes":[{"syntax":"cameraOn","params":[],"returns":{"type":"Object","type_expr":"Object","description":"vehicle"},"form":"nullary"}],"examples":[{"code":["_object = cameraOn;"]}],"see_also":["switchCamera","cameraView","cameraEffect","focusOn","remoteControl"]},{"name":"cameraView","title":"cameraView","type":"command","url":"https://community.bistudio.com/wiki/cameraView","revid":378176,"updated":"2026-03-03T19:06:53Z","groups":["Camera Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns mode of active camera view. Mode is one of:\n\n- \"INTERNAL\" (1st person)\n- \"EXTERNAL\" (3rd person)\n- \"GUNNER\" (optics / sights)\n- \"GROUP\" (commander view)","syntaxes":[{"syntax":"cameraView","params":[],"returns":{"type":"String","type_expr":"String"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (cameraOn == _vehicle && cameraView == \"EXTERNAL\") then\n{\n    _vehicle switchCamera \"INTERNAL\";\n};\n```","code":["if (cameraOn == _vehicle && cameraView == \"EXTERNAL\") then\n{\n\t_vehicle switchCamera \"INTERNAL\";\n};"]}],"see_also":["switchCamera","cameraOn","cameraEffect"]},{"name":"campaignConfigFile","title":"campaignConfigFile","type":"command","url":"https://community.bistudio.com/wiki/campaignConfigFile","revid":347514,"updated":"2023-09-28T02:08:51Z","groups":["Config"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns root of campaign description.ext entries hierarchy.","syntaxes":[{"syntax":"campaignConfigFile","params":[],"returns":{"type":"Config","type_expr":"Config"},"form":"nullary"}],"examples":[{"code":["_config = campaignConfigFile;"]}],"see_also":["configFile","missionConfigFile"]},{"name":"camPreload","title":"camPreload","type":"command","url":"https://community.bistudio.com/wiki/camPreload","revid":369112,"updated":"2024-09-03T10:28:47Z","groups":["Camera Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Preloads the scene for the prepared camera with given timeout after which preloading is aborted. Max timeout is 30 seconds. Timeout of 0 means max timeout of 30 seconds as well.\n\n> [!NOTE]\n> This command will read prepared params set with camPrepareFOV, camPreparePos and camPrepareTarget, so no camCommitPrepared is necessary. If camPrepareFOV is not set, the default value is 1. If camPrepareTarget (for direction) and camPreparePos (for position) are not set, current direction and position of the camera are used. The prepared camera preload will preload main camera as well. cameraEffect is not necessary","syntaxes":[{"syntax":"camera camPreload timeout","params":[{"name":"camera","type":"Object","type_expr":"Object"},{"name":"timeout","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"timeout"}}],"examples":[{"code":["_camera camPreload 5;"]},{"text":"Preload camera around player to avoid stuttering on optics zooming:\n\n```sqf\n0 spawn\n{\n    _cam = \"camera\" camCreate (player selectionPosition \"camera\");\n    for \"_i\" from 0 to 359 do\n    {\n        _cam setDir _i;\n        _cam camPrepareFov 0.25;\n        _cam camPreload 0;\n        waitUntil { camPreloaded _cam };\n    };\n    camDestroy _cam;\n};\n```","code":["0 spawn \n{\n\t_cam = \"camera\" camCreate (player selectionPosition \"camera\");\n\tfor \"_i\" from 0 to 359 do\n\t{\n\t\t_cam setDir _i;\n\t\t_cam camPrepareFov 0.25;\n\t\t_cam camPreload 0;\n\t\twaitUntil { camPreloaded _cam };\n\t};\n\tcamDestroy _cam;\n};"]}],"see_also":["camPreloaded","preloadCamera"]},{"name":"camPreloaded","title":"camPreloaded","type":"command","url":"https://community.bistudio.com/wiki/camPreloaded","revid":321907,"updated":"2022-05-22T12:22:10Z","groups":["Camera Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Checks whether the camera has finished preloading.","syntaxes":[{"syntax":"camPreloaded camera","params":[{"name":"camera","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"camera"}}],"examples":[{"code":["if (camPreloaded _camera) exitWith { hint \"loaded\" };"]}],"see_also":["cameraEffect","camCreate","camCommit"]},{"name":"camPrepareBank","title":"camPrepareBank","type":"command","url":"https://community.bistudio.com/wiki/camPrepareBank","revid":352123,"updated":"2024-02-01T23:25:04Z","groups":["Broken Commands","Camera Control"],"status":"broken","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Prepares the camera bank angle.\n\n> [!WARNING]\n> This command is **non-functional**!","syntaxes":[{"syntax":"camera camPrepareBank bank","params":[{"name":"camera","type":"Object","type_expr":"Object"},{"name":"bank","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"bank"}}],"examples":[{"code":["_camera camPrepareBank -0.1;"]}],"see_also":["camPreload","camCommitPrepared"]},{"name":"camPrepareDir","title":"camPrepareDir","type":"command","url":"https://community.bistudio.com/wiki/camPrepareDir","revid":352231,"updated":"2024-02-01T23:26:09Z","groups":["Broken Commands","Camera Control"],"status":"broken","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Prepares the camera heading.\n\n> [!WARNING]\n> This command is **non-functional**!","syntaxes":[{"syntax":"camera camPrepareDir direction","params":[{"name":"camera","type":"Object","type_expr":"Object"},{"name":"direction","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"direction"}}],"examples":[{"code":["_camera camPrepareDir 150;"]}],"see_also":["camPreload","camCommitPrepared"]},{"name":"camPrepareDive","title":"camPrepareDive","type":"command","url":"https://community.bistudio.com/wiki/camPrepareDive","revid":352190,"updated":"2024-02-01T23:25:57Z","groups":["Broken Commands","Camera Control"],"status":"broken","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Prepares the camera dive angle.\n\n> [!WARNING]\n> This command is **non-functional**!","syntaxes":[{"syntax":"camera camPrepareDive dive","params":[{"name":"camera","type":"Object","type_expr":"Object"},{"name":"dive","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"dive"}}],"examples":[{"code":["_camera camPrepareDive -0.1;"]}],"see_also":["camPreload","camCommitPrepared"]},{"name":"camPrepareFocus","title":"camPrepareFocus","type":"command","url":"https://community.bistudio.com/wiki/camPrepareFocus","revid":323042,"updated":"2022-06-28T21:43:09Z","groups":["Camera Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"focusRange is . Prepares the camera focus blur.\n\n**[-1,1]** will reset default values (auto focusing), **[-1,-1]** will disable postprocessing (all is focused). Needs the call of camCommitPrepared to be conducted.","syntaxes":[{"syntax":"camera camPrepareFocus [distance, blur]","params":[{"name":"camera","type":"Object","type_expr":"Object"},{"name":"distance","type":"Number","description":"blur distance","type_expr":"Number"},{"name":"blur","type":"Number","description":"blur intensity","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"[distance, blur]"}}],"examples":[{"code":["_camera camPrepareFocus [50, 1];"]}],"see_also":["camPreload","camCommitPrepared","camSetFocus"]},{"name":"camPrepareFov","title":"camPrepareFov","type":"command","url":"https://community.bistudio.com/wiki/camPrepareFov","revid":323072,"updated":"2022-06-28T21:43:12Z","groups":["Camera Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Prepares the camera field of view (zoom). The default zoom level is 0.75, 0.01 is the nearest and 2 the furthest zoom value. The angle of the field of view is *atan(FOV)*2* radians when in 4:3 aspect ratio. Needs the call of camCommitPrepared to be conducted.","syntaxes":[{"syntax":"camera camPrepareFov fieldOfView","params":[{"name":"camera","type":"Object","type_expr":"Object"},{"name":"fieldOfView","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"fieldOfView"}}],"examples":[{"code":["_camera camPrepareFov 0.1;"]}],"see_also":["camSetFov","camPreload","camCommitPrepared"]},{"name":"camPrepareFovRange","title":"camPrepareFovRange","type":"command","url":"https://community.bistudio.com/wiki/camPrepareFovRange","revid":369600,"updated":"2024-09-26T20:16:06Z","groups":["Broken Commands","Camera Control"],"status":"broken","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Prepares the camera field of view range for auto zooming.\n\n> [!WARNING]\n> This command is **non-functional**!","syntaxes":[{"syntax":"camera camPrepareFovRange [minFovRange, maxFovRange]","params":[{"name":"camera","type":"Object","type_expr":"Object"},{"name":"minFovRange","type":"Number","type_expr":"Number"},{"name":"maxFovRange","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"[minFovRange, maxFovRange]"}}],"examples":[{"code":["_camera camPrepareFovRange [0.1, 0.5];"]}],"see_also":["camPreload","camCommitPrepared"]},{"name":"camPreparePos","title":"camPreparePos","type":"command","url":"https://community.bistudio.com/wiki/camPreparePos","revid":377762,"updated":"2026-01-03T00:59:06Z","groups":["Camera Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Prepares the camera position. Needs the call of camCommitPrepared to be conducted.","syntaxes":[{"syntax":"camera camPreparePos position","params":[{"name":"camera","type":"Object","type_expr":"Object"},{"name":"position","type":"Position","type_expr":"Position"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"position"}}],"examples":[{"code":["_camera camPreparePos getPos player;"]}],"see_also":["camPreload","camCommitPrepared","camSetPos"]},{"name":"camPrepareRelPos","title":"camPrepareRelPos","type":"command","url":"https://community.bistudio.com/wiki/camPrepareRelPos","revid":377385,"updated":"2026-01-02T06:43:54Z","groups":["Camera Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Prepares the camera position relative to the current position of the currect target (see camPrepareTarget). Needs the call of camCommitPrepared to be conducted.","syntaxes":[{"syntax":"camera camPrepareRelPos position","params":[{"name":"camera","type":"Object","type_expr":"Object"},{"name":"position","type":"PositionRelative","type_expr":"PositionRelative"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"position"}}],"examples":[{"code":["_camera camPrepareRelPos [10,5,-2];"]}],"see_also":["camPreload","camCommitPrepared","camSetRelPos"]},{"name":"camPrepareTarget","title":"camPrepareTarget","type":"command","url":"https://community.bistudio.com/wiki/camPrepareTarget","revid":318609,"updated":"2022-05-13T09:21:11Z","groups":["Camera Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Prepares the camera target to a position or to a target. Needs the call of camCommitPrepared to be conducted.","syntaxes":[{"syntax":"camera camPrepareTarget position","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"position","type":"Position","description":"target location","type_expr":"Position"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"position"}},{"syntax":"camera camPrepareTarget target","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"target"}}],"examples":[{"code":["_camera camPrepareTarget getPos player;"]},{"code":["_camera camPrepareTarget player;"]}],"see_also":["camPreload","camCommitPrepared","camSetTarget"]},{"name":"camSetBank","title":"camSetBank","type":"command","url":"https://community.bistudio.com/wiki/camSetBank","revid":352087,"updated":"2024-02-01T23:24:46Z","groups":["Broken Commands","Camera Control"],"status":"broken","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Sets camera bank angle. Does not commit changes.\n\n> [!WARNING]\n> This command is **non-functional**!","syntaxes":[{"syntax":"camera camSetBank bank","params":[{"name":"camera","type":"Object","type_expr":"Object"},{"name":"bank","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"bank"}}],"examples":[{"code":["_camera camSetBank -0.1;"]}],"see_also":["camSetDive","setVectorUp"]},{"name":"camSetDir","title":"camSetDir","type":"command","url":"https://community.bistudio.com/wiki/camSetDir","revid":377244,"updated":"2026-01-02T04:23:26Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets the orientation of the given camera in the direction of the given vector. Needs camCommit. Since Arma 3 v0.50, only the second syntax with a Vector3D is available.","syntaxes":[{"syntax":"camera camSetDir azimuth","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"azimuth","type":"Number","description":"camera azimuth","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"azimuth"}},{"syntax":"camera camSetDir direction","since":"arma3 0.50","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"direction","type":"Vector3D","description":"direction of camera. Must be a valid vector.","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"direction"}}],"examples":[{"text":"Since Arma 3:\n\n```sqf\nprivate _pos1 = player modelToWorld [0, 5, 5];\nprivate _pos2 = player modelToWorld [0, 50, 50];\n\nprivate _cam = \"camera\" camCreate _pos1;\n_cam cameraEffect [\"INTERNAL\", \"BACK\"];\n\n_cam camSetPos _pos2;\n_cam camSetDir (_pos2 vectorFromTo _pos1);\n_cam camCommit 5;\nwaitUntil { camCommitted _cam };\n\n_cam camSetPos _pos1;\n_cam camCommit 5;\n```","code":["private _pos1 = player modelToWorld [0, 5, 5];\nprivate _pos2 = player modelToWorld [0, 50, 50];\n\nprivate _cam = \"camera\" camCreate _pos1;\n_cam cameraEffect [\"INTERNAL\", \"BACK\"];\n\n_cam camSetPos _pos2;\n_cam camSetDir (_pos2 vectorFromTo _pos1);\n_cam camCommit 5;\nwaitUntil { camCommitted _cam };\n\n_cam camSetPos _pos1;\n_cam camCommit 5;"]},{"text":"Before Arma 3:\n\n```sqf\nprivate _pos1 = player modelToWorld [0, 5, 5];\nprivate _pos2 = player modelToWorld [0, 50, 50];\n\nprivate _cam = \"camera\" camCreate _pos1;\n_cam cameraEffect [\"INTERNAL\", \"BACK\"];\n\n_cam camSetPos _pos2;\n_cam camSetDir 180;\n_cam camCommit 5;\nwaitUntil { camCommitted _cam };\n\n_cam camSetPos _pos1;\n_cam camCommit 5;\n```","code":["private _pos1 = player modelToWorld [0, 5, 5];\nprivate _pos2 = player modelToWorld [0, 50, 50];\n\nprivate _cam = \"camera\" camCreate _pos1;\n_cam cameraEffect [\"INTERNAL\", \"BACK\"];\n\n_cam camSetPos _pos2;\n_cam camSetDir 180;\n_cam camCommit 5;\nwaitUntil { camCommitted _cam };\n\n_cam camSetPos _pos1;\n_cam camCommit 5;"]}],"see_also":["direction","setDir","camSetTarget","getCameraViewDirection"],"notes":[{"user":"Killzone_Kid","date":"2016-05-09T19:47:00Z","text":"cameraEffect \"INTERNAL\" works better than \"EXTERNAL\" with this command."}]},{"name":"camSetDive","title":"camSetDive","type":"command","url":"https://community.bistudio.com/wiki/camSetDive","revid":352204,"updated":"2024-02-01T23:26:03Z","groups":["Broken Commands","Camera Control"],"status":"broken","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Sets camera dive angle. Does not commit changes.\n\n> [!WARNING]\n> This command is **non-functional**!","syntaxes":[{"syntax":"camera camSetDive dive","params":[{"name":"camera","type":"Object","type_expr":"Object"},{"name":"dive","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"dive"}}],"examples":[{"code":["_camera camSetDive -0.1;"]}],"see_also":["camSetBank","setVectorUp"],"notes":[{"user":"Kronzky","date":"2010-04-15T18:29:00Z","text":"Command is non-functional.\nInstead use setVectorUp or [this user function](http://forums.bistudio.com/showthread.php?t=67384) in Armed Assault.\n\n```sqf\n// Get Pitch and Bank\n// By General Barron (aw_barron@hotmail.com) and vektorboson\n// Parameters: object\n// Returns: [pitch, bank]\n// Returns the pitch and bank of an object, in degrees.\n// Yaw can be found using the getdir command.\n// Pitch is 0 when the object is level; 90 when pointing straight\n// up; and -90 when pointing straight down.\n// Bank is 0 when level; 90 when the object is rolled to the right,\n// -90 when rolled to the left, and 180 when rolled upside down.\n\n// extract parameters\nprivate [\"_obj\", \"_pitch\", \"_bank\", \"_yaw\", \"_vdir\", \"_vup\", \"_sign\", \"_rotate\"];\n_obj = _this;\n// find the yaw (direction) of the object\n// note that map compass directions go CW, while coordinate (vector) directions go CCW\n// so when we rotate vectors by this much (below), we are actually adjusting the vector as though the object were pointing north\n_yaw = getDir _obj;\n\n//----------------------------\n// function to rotate a 2d vector around the origin\n//----------------------------\n_rotate =\n{\n    private [\"_v\", \"_d\", \"_x\", \"_y\"];\n\n    // extract parameters\n    _v = +(_this select 0); // we don't want to modify the originally passed vector\n    _d = _this select 1;\n\n    // extract old x/y values\n    _x = _v select 0;\n    _y = _v select 1;\n    // if vector is 3d, we don't want to mess up the last element\n    _v set [0, (cos _d)*_x - (sin _d)*_y];\n    _v set [1, (sin _d)*_x + (cos _d)*_y];\n    // return new vector\n    _v;\n};\n//----------------------------\n// find pitch\n//----------------------------\n// get vector dir (pitch)\n_vdir = vectorDir _obj;\n\n// rotate X & Y around the origin according to the object's yaw (direction)\n// we will then be left with the objects vectordir if it were facing north\n_vdir = [_vdir, _yaw] call _rotate;\n\n// if we reverse the process we used to set pitch when facing north, we can now get pitch\nif ((_vdir select 1) != 0) then\n{\n    _pitch = atan ((_vdir select 2) / (_vdir select 1));\n}\nelse\n{\n    // we need a fail-safe here to prevent divide-by-zero errors\n    // if X is zero, that means pitch is +/-90, we just need to figure out which one\n    if ((_vdir select 2) >= 0) then { _pitch = 90 } else { _pitch = -90 };\n};\n\n//----------------------------\n// find bank\n//----------------------------\n// get vector up (bank)\n_vup = vectorUp _obj;\n\n// rotate X & Y around the origin according to the object's yaw (direction)\n// we will then be left with the objects vectorup if it were facing north\n_vup = [_vup, _yaw] call _rotate;\n\n// rotate Y & Z around according to the object's pitch\n_vup = [_vup select 0] + ([[_vup select 1, _vup select 2], 360 - _pitch] call _rotate);\n\n// if we reverse the process we used to set bank when facing north, we can now get bank\nif ((_vup select 2) != 0) then\n{\n    _bank = atan ((_vup select 0) / (_vup select 2));\n}\nelse\n{\n    // we need a fail-safe here to prevent divide-by-zero errors\n    // if Z is zero, that means bank is +/-90, we just need to figure out which one\n    if ((_vdir select 2) >= 0) then { _bank = 90 } else { _bank = -90 };\n};\n\n// if we are rolled over (abs bank > 90), we need to adjust our result\nif ((_vup select 2) < 0) then\n{\n    _sign = [1, -1] select (_bank < 0);\n    _bank = _bank - _sign*180;\n};\n\n//----------------------------\n// return value\n//----------------------------\n[_pitch, _bank];\n```"}]},{"name":"camSetFocus","title":"camSetFocus","type":"command","url":"https://community.bistudio.com/wiki/camSetFocus","revid":377681,"updated":"2026-01-02T09:02:47Z","groups":["Camera Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Sets camera focus range. It does not automatically commit changes (see camCommit). Use [-1, -1] to disable focus completely.","syntaxes":[{"syntax":"camera camSetFocus focusRange","params":[{"name":"camera","type":"Object","type_expr":"Object"},{"name":"focusRange","type":"Array with [distance, blur]","description":"Array with [distance, blur]\n\n- distance: Number\n- blur: Number - sets the camera focus blur","type_expr":"Array","text":"focusRange: Array with [distance, blur]\n\n- distance: Number\n- blur: Number - sets the camera focus blur"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"focusRange"}}],"examples":[{"code":["_camera camSetFocus [50, 1];"]}],"see_also":["camCreate","camCommand","camDestroy","camCommit","camPrepareFocus"]},{"name":"camSetFov","title":"camSetFov","type":"command","url":"https://community.bistudio.com/wiki/camSetFov","revid":318602,"updated":"2022-05-13T09:21:10Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Set the zoom level (**F**ield **O**f **V**iew) of the given camera.\n\nThe zoom level is from *`0.01`* for the nearest and *`8.5`* for the furthest zoom value, with a default zoom level of *`0.75`*\n\nThe angle of the field of view is *`atan(FOV)*2`* radians when in 4:3 aspect ratio. Needs the call of camCommit to be conducted.","syntaxes":[{"syntax":"camera camSetFov level","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"level","type":"Number","description":"zoom level, range 0.01 to 8.5 (see description above)","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"level"}}],"examples":[{"code":["_cam camSetFov 0.75;"]}],"see_also":["camPrepareFov","camSetFovRange","camSetTarget"]},{"name":"camSetFovRange","title":"camSetFovRange","type":"command","url":"https://community.bistudio.com/wiki/camSetFovRange","revid":369601,"updated":"2024-09-26T20:17:08Z","groups":["Broken Commands","Camera Control"],"status":"broken","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Set the zoom level (**F**ield **O**f **V**iew) start and end values for automatical zooming.\n\nThe default zoom level is *`0.7`* where *`0`* is the nearest and *`1`* is the most far zoom value.\n\n> [!WARNING]\n> This command is **non-functional**!","syntaxes":[{"syntax":"camera camSetFovRange [minFovRange, maxFovRange]","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"minFovRange","type":"Number","type_expr":"Number"},{"name":"maxFovRange","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"[minFovRange, maxFovRange]"}}],"examples":[{"code":["_cam camSetFovRange [0.1, 0.7];"]}],"see_also":["camSetFov"]},{"name":"camSetPos","title":"camSetPos","type":"command","url":"https://community.bistudio.com/wiki/camSetPos","revid":377590,"updated":"2026-01-02T06:58:01Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets the position of the given camera or seagull (see camCreate).\nIt is worth mentioning that camera position can also be set with setPos, in which case it would be instant.\nWith camSetPos it is possible to make smooth position transition in time, defined with camCommit, which is required in this case.","syntaxes":[{"syntax":"camera camSetPos position","params":[{"name":"camera","type":"Object","description":"object of type \"camera\" or \"seagull\"","type_expr":"Object"},{"name":"position","type":"PositionAGL","description":"camera destination","type_expr":"PositionAGL"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"position"}}],"examples":[{"code":["_cam camSetPos [2300, 1000, 130];\n_cam camCommit 10;"]}],"see_also":["camSetRelPos","setPos"]},{"name":"camSetRelPos","title":"camSetRelPos","type":"command","url":"https://community.bistudio.com/wiki/camSetRelPos","revid":377388,"updated":"2026-01-02T06:43:59Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets the position of the given camera relative to its target, set with camSetTarget. Needs a call to camCommit to be conducted.\n\n> [!IMPORTANT]\n> Since it sets relative position to the target, the camSetTarget command should be executed already, before camSetRelPos.","syntaxes":[{"syntax":"camera camSetRelPos position","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"position","type":"PositionRelative","type_expr":"PositionRelative"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"position"}}],"examples":[{"code":["_cam camSetTarget _car;\n_cam camSetRelPos [0,10,8];"]}],"see_also":["camSetPos"],"notes":[{"user":"Unknown","text":"The location of the camera will depend on the direction the target object is facing.\nThe camera does not bank with the target (bug?)."}]},{"name":"camSetTarget","title":"camSetTarget","type":"command","url":"https://community.bistudio.com/wiki/camSetTarget","revid":369114,"updated":"2024-09-03T10:28:47Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Set the target object or position where the given camera should point at. Needs the call of camCommit to be conducted. To reset the target use objNull.","syntaxes":[{"syntax":"camera camSetTarget target","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"target","type":"Object","description":"target location","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"target"}},{"syntax":"camera camSetTarget position","params":[{"name":"camera","type":"Object","description":"object of type \"camera\"","type_expr":"Object"},{"name":"position","type":"Array","description":"target location - Position","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"camera"},"right":{"text":"position"}}],"examples":[{"code":["_camera camSetTarget player;"]},{"code":["_camera camSetTarget [2540,1503,26];"]},{"code":["_cam = \"camera\" camCreate (player modelToWorld [0, 100, 10]);\n_cam camSetTarget player;\n_cam camSetRelPos [0, 0.5, 1.5];\n_cam cameraEffect [\"internal\", \"back\"];\n_cam camCommit 1;\nplayer setRandomLip true;"]}],"see_also":["camCreate","camTarget"]},{"name":"camTarget","title":"camTarget","type":"command","url":"https://community.bistudio.com/wiki/camTarget","revid":363230,"updated":"2024-03-26T10:51:07Z","groups":["Camera Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns camera's target.","syntaxes":[{"syntax":"camTarget camera","params":[{"name":"camera","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"camera"}}],"examples":[{"code":["_someObject = camTarget _camera;"]}],"see_also":["camSetTarget"]},{"name":"camUseNVG","title":"camUseNVG","type":"command","url":"https://community.bistudio.com/wiki/camUseNVG","revid":369119,"updated":"2024-09-03T10:30:51Z","groups":["Camera Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Set / clear using of night vision during cutscenes. This command only works with camCreate created camera that is currently the main camera for the player (see Examples).","syntaxes":[{"syntax":"camUseNVG set","params":[{"name":"set","type":"Boolean","description":"enable/disable night vision","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"set"}}],"examples":[{"code":["camUseNVG true;"]},{"code":["setDate [2000, 12, 31, 0, 0];\n_cam = \"camera\" camCreate [0, 0, 0];\n_cam camSetTarget player;\n_cam camSetRelPos [0, -5, 3];\n_cam cameraEffect [\"Internal\", \"Back\"];\n_cam camCommit 0;\ncamUseNVG true;"]}],"see_also":["setCamUseTI","disableTIEquipment"]},{"name":"canAdd","title":"canAdd","type":"command","url":"https://community.bistudio.com/wiki/canAdd","revid":379207,"updated":"2026-10-30T21:13:13Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.70"},"since":"arma3 0.70","arma3_since":"0.70","description":"Checks if given object can be stored in inventory of given object or any inventory container (uniform, vest, backpack) of given unit.\nBefore Arma 3 v2.10 this comment verified only the biggest container when multiple items were queried; now it checks all containers.\n\n> [!IMPORTANT]\n> Avoid passing an empty string `\"\"` to this command as it will create a warning dialog:\n>\n> Warning Message: Bad vehicle type\n>\n> This message will show once per mission restart.","syntaxes":[{"syntax":"object canAdd item","params":[{"name":"object","type":"Object","description":"unit or container","type_expr":"Object"},{"name":"item","type":"String","description":"config class","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"object"},"right":{"text":"item"}},{"syntax":"object canAdd [item, count, ignoreSoldierMaxLoad]","since":"arma3 1.56","params":[{"name":"object","type":"Object","description":"unit or container","type_expr":"Object"},{"name":"item","type":"String","description":"config class","type_expr":"String"},{"name":"count","type":"Number","description":"desired quantity","type_expr":"Number"},{"name":"ignoreSoldierMaxLoad","type":"Boolean","optional":true,"default":"false","description":"true to ignore 'soldierMaxLoad' param, container's maxLoad is still counted","type_expr":"Boolean","since":"arma3 2.18","text":"ignoreSoldierMaxLoad: Boolean - (Optional, default false) true to ignore 'soldierMaxLoad' param, container's maxLoad is still counted"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"object"},"right":{"text":"[item, count, ignoreSoldierMaxLoad]"}},{"syntax":"weapon canAdd item","since":"arma3 2.10","params":[{"name":"weapon","type":"String","description":"weapon class name","type_expr":"String"},{"name":"item","type":"String","description":"config class of magazine or attachment","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"weapon"},"right":{"text":"item"}},{"syntax":"weapon canAdd [attachment, slot]","since":"arma3 2.10","params":[{"name":"weapon","type":"String","description":"weapon class name","type_expr":"String"},{"name":"attachment","type":"String","description":"attachment class name","type_expr":"String"},{"name":"slot","type":"String","description":"slot class name (defined under **WeaponSlotsInfo** class in weapon config), for example:\n\n- \"CowsSlot\" for optics\n- \"MuzzleSlot\" for silencers\n- \"PointerSlot\" for laser pointers and flashlights\n- \"UnderBarrelSlot\" for bipods","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"weapon"},"right":{"text":"[attachment, slot]"}},{"syntax":"weapon canAdd [magazine, muzzle]","since":"arma3 2.10","params":[{"name":"weapon","type":"String","description":"weapon class name","type_expr":"String"},{"name":"magazine","type":"String","description":"magazine class name","type_expr":"String"},{"name":"muzzle","type":"String","description":"muzzle class name","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"weapon"},"right":{"text":"[magazine, muzzle]"}}],"examples":[{"text":"```sqf\nif (player canAdd \"FirstAidKit\") then\n{\n    player addItem \"FirstAidKit\";\n}\nelse\n{\n    hint \"Not enough space\";\n};\n```","code":["if (player canAdd \"FirstAidKit\") then\n{\n\tplayer addItem \"FirstAidKit\";\n}\nelse\n{\n\thint \"Not enough space\";\n};"]},{"text":"```sqf\nif (_box canAdd \"FirstAidKit\") then\n{\n    _box addWeaponCargo [\"FirstAidKit\", 1];\n}\nelse\n{\n    hint \"Not enough space\";\n};\n```","code":["if (_box canAdd \"FirstAidKit\") then\n{\n\t_box addWeaponCargo [\"FirstAidKit\", 1];\n}\nelse\n{\n\thint \"Not enough space\";\n};"]},{"code":["car canAdd [currentWeapon player, 50];"]},{"code":["// check if attachment can be loaded\n\"arifle_Katiba_GL_F\" canAdd \"acc_pointer_IR\";\n\"arifle_Katiba_GL_F\" canAdd [\"acc_pointer_IR\", \"PointerSlot\"];"]},{"code":["// check if magazine can be loaded\n\"arifle_Katiba_GL_F\" canAdd \"30Rnd_65x39_caseless_green\";\n\"arifle_Katiba_GL_F\" canAdd [\"30Rnd_65x39_caseless_green\", \"this\"];\n\"arifle_Katiba_GL_F\" canAdd [\"1Rnd_SmokeRed_Grenade_shell\", \"EGLM\"];"]}],"see_also":["canAddItemToBackpack","canAddItemToUniform","canAddItemToVest","compatibleMagazines","compatibleItems","compatibleWeapons"],"notes":[{"user":"Jonpas","date":"2015-11-29T00:02:00Z","text":"Can also be used on any object that has inventory, not only player inventory containers.\n\nWhere **_box** is **B_supplyCrate_F**:\n\n```sqf\n// empty\n_box canAdd \"FirstAidKit\"; // returns true\n\n// full\n_box canAdd \"FirstAidKit\"; // returns false\n```"},{"user":"Demellion","date":"2017-02-11T18:40:00Z","text":"This can also be used as alternative to canAddItemToBackpack, canAddItemToUniform, canAddItemToVest where container might not be strictly defined. In some cases it might be a good optimisation for your code, where you also don't need to perform checks on which type of player container this is. Example:\n\n```sqf\nprivate _container = selectRandom [uniformContainer player, vestContainer player, backpackContainer player];\nif (_container canAdd \"Rangefinder\") then\n{\n    _container addItemCargoGlobal [\"Rangefinder\", 1];\n};\n```"}]},{"name":"canAddItemToBackpack","title":"canAddItemToBackpack","type":"command","url":"https://community.bistudio.com/wiki/canAddItemToBackpack","revid":369124,"updated":"2024-09-03T10:33:08Z","groups":["Containers"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Checks if given object can be stored into soldier's backpack.\n\n> [!IMPORTANT]\n> Avoid passing an empty string `\"\"` to this command as it will create a warning dialog:\n>\n> Warning Message: Bad vehicle type\n>\n> This message will show once per mission restart.","syntaxes":[{"syntax":"unit canAddItemToBackpack item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}},{"syntax":"unit canAddItemToBackpack [item, count, ignoreSoldierMaxLoad]","since":"arma3 1.56","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"},{"name":"count","type":"Number","type_expr":"Number"},{"name":"ignoreSoldierMaxLoad","type":"Boolean","optional":true,"default":"false","description":"true to ignore 'soldierMaxLoad' param, container maxLoad is still counted.","type_expr":"Boolean","since":"arma3 2.18","text":"ignoreSoldierMaxLoad: Boolean - (Optional, default false) true to ignore 'soldierMaxLoad' param, container maxLoad is still counted."}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"unit"},"right":{"text":"[item, count, ignoreSoldierMaxLoad]"}}],"examples":[{"code":["if (player canAddItemToBackpack \"HandGrenade\") then { player addItemToBackpack _item } else { hint \"no room!\" };"]}],"see_also":["canAdd","canAddItemToUniform","canAddItemToVest","backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","addItemToBackpack","removeItemFromBackpack","everyBackpack"],"notes":[{"user":"AgentRev","date":"2022-03-29T04:56:58Z","text":"This command is very unreliable, along with all other canAdd commands. For example, in the inventory screen, an empty `\"B_Bergen_dgtl_F\"` backpack can fit a total of 30 `\"5Rnd_127x108_APDS_Mag\"` mags. However, `player canAddItemToBackpack \"5Rnd_127x108_APDS_Mag\"` starts returning false once there are 17 in the backpack. Furthermore, if the player has equipped an empty PCML launcher (without any missile in his inventory), the command starts returning false once there are only 11, despite the fact that the launcher has no effect on backpack space...\nI wrote a function almost 9 years ago to bypass this (surprisingly still existing) bug. You can check it [here](https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/dev/client/functions/fn_fitsInventory.sqf), with a usage example [here](https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/dc41623f154d6c5be683374784aba201a0628e60/client/functions/addWeaponInventory.sqf#L18-L20)."}]},{"name":"canAddItemToUniform","title":"canAddItemToUniform","type":"command","url":"https://community.bistudio.com/wiki/canAddItemToUniform","revid":376946,"updated":"2025-12-31T22:55:22Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Checks if given object can be stored into soldier's uniform.\n\n> [!IMPORTANT]\n> Avoid passing an empty string `\"\"` to this command as it will create a warning dialog:\n>\n> Warning Message: Bad vehicle type\n>\n> This message will show once per mission restart.","syntaxes":[{"syntax":"unit canAddItemToUniform item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}},{"syntax":"unit canAddItemToUniform [item, count, ignoreSoldierMaxLoad]","since":"arma3 1.56","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"},{"name":"count","type":"Number","type_expr":"Number"},{"name":"ignoreSoldierMaxLoad","type":"Boolean","optional":true,"default":"false","description":"true to ignore 'soldierMaxLoad' param, container maxLoad is still counted.","type_expr":"Boolean","since":"arma3 2.18","text":"ignoreSoldierMaxLoad: Boolean - (Optional, default false) true to ignore 'soldierMaxLoad' param, container maxLoad is still counted."}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"unit"},"right":{"text":"[item, count, ignoreSoldierMaxLoad]"}}],"examples":[{"text":"```sqf\n_item = \"HandGrenade\";\n_fits = player canAddItemToUniform _item;\nif (_fits) then\n{\n    player addItemToUniform _item;\n}\nelse\n{\n    hint \"no room!\";\n};\n```","code":["_item = \"HandGrenade\";\n_fits = player canAddItemToUniform _item;\nif (_fits) then\n{\n\tplayer addItemToUniform _item;\n}\nelse\n{\n\thint \"no room!\";\n};"]}],"see_also":["canAdd","canAddItemToBackpack","canAddItemToVest"]},{"name":"canAddItemToVest","title":"canAddItemToVest","type":"command","url":"https://community.bistudio.com/wiki/canAddItemToVest","revid":369122,"updated":"2024-09-03T10:33:08Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Checks if given object can be stored into soldier's vest.\n\n> [!IMPORTANT]\n> Avoid passing an empty string `\"\"` to this command as it will create a warning dialog:\n>\n> Warning Message: Bad vehicle type\n>\n> This message will show once per mission restart.","syntaxes":[{"syntax":"unit canAddItemToVest item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}},{"syntax":"unit canAddItemToVest [item, count, ignoreSoldierMaxLoad]","since":"arma3 1.56","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"},{"name":"count","type":"Number","type_expr":"Number"},{"name":"ignoreSoldierMaxLoad","type":"Boolean","optional":true,"default":"true","description":"true to ignore 'soldierMaxLoad' param, container maxLoad is still counted.","type_expr":"Boolean","since":"arma3 2.18","text":"ignoreSoldierMaxLoad: Boolean - (Optional, default true) true to ignore 'soldierMaxLoad' param, container maxLoad is still counted."}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"unit"},"right":{"text":"[item, count, ignoreSoldierMaxLoad]"}}],"examples":[{"text":"```sqf\n_item = \"HandGrenade\";\nprivate _fits = player canAddItemToVest _item;\nif (_fits) then {\n    player addItemToVest _item;\n} else {\n    hint \"no room!\";\n};\n```","code":["_item = \"HandGrenade\";\nprivate _fits = player canAddItemToVest _item;\nif (_fits) then {\n\tplayer addItemToVest _item;\n} else {\n\thint \"no room!\";\n};"]}],"see_also":["canAdd","canAddItemToBackpack","canAddItemToUniform"]},{"name":"cancelSimpleTaskDestination","title":"cancelSimpleTaskDestination","type":"command","url":"https://community.bistudio.com/wiki/cancelSimpleTaskDestination","revid":320959,"updated":"2022-05-13T10:04:50Z","groups":["Briefing"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Cancels a simple task destination.","syntaxes":[{"syntax":"cancelSimpleTaskDestination task","params":[{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["cancelSimpleTaskDestination myTask;"]}],"see_also":["taskDestination","setSimpleTaskDestination"]},{"name":"canDeployWeapon","title":"canDeployWeapon","type":"command","url":"https://community.bistudio.com/wiki/canDeployWeapon","revid":310452,"updated":"2022-05-05T18:08:10Z","groups":["Weapons"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"argument":"local"},"description":"Returns true if a unit's weapon can be deployed.","syntaxes":[{"syntax":"canDeployWeapon unit","params":[{"name":"unit","type":"Object","type_expr":"Object","text":"unit : Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if unit's weapon can be deployed"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["if (canDeployWeapon player) then { hint \"I could rest my weapon here...\" };"]}],"see_also":["isWeaponDeployed","isWeaponRested"]},{"name":"canFire","title":"canFire","type":"command","url":"https://community.bistudio.com/wiki/canFire","revid":377852,"updated":"2026-01-03T21:50:58Z","groups":["Weapons"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns true if the given vehicle is still able to fire.\nFor the command to return true, vehicle must be alive, have weapon operator and the weapon cannot be damaged ≥ 0.9 but can be empty due to running out of ammo.\nIf mission starts with vehicle having no ammo or setVehicleAmmo 0 command is executed on the vehicle, then canFire will always report false for it.","syntaxes":[{"syntax":"canFire unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if able to fire"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"text":"```sqf\nif (not canFire _tank) then\n{\n    player sideChat \"Tank disabled!\";\n};\n```","code":["if (not canFire _tank) then\n{\n\tplayer sideChat \"Tank disabled!\";\n};"]}],"see_also":["canMove","canStand","fire","doFire","commandFire","fireAtTarget","forceWeaponFire","commandArtilleryFire","commandSuppressiveFire","doArtilleryFire","doSuppressiveFire","isManualFire"],"notes":[{"user":"Bdfy","date":"2007-01-20T07:16:00Z","text":"true even if unit is out of ammo. Only false if gun is damaged."},{"user":"Canukausiuka","date":"2008-08-24T05:20:00Z","text":"False if there is no gunner in the vehicle, regardless of damage level."},{"user":"Pierre MGI","date":"2018-04-23T07:20:00Z","text":"This command seems to have evolved. Returns \"true\" (on Hunter, Ifrit) even if Gun's damage is set to 1 and turret also, as far there is a gunner. The only way to obtain a canFire \"false\" is to make the crew disembark (2 burned tires for example). Then no matter the gun state, if the gunner disembarks without order, the vehicle can't fire. In this case: can't move >> can't fire.\nNB: if you jump into a hunter HMG after having setHitPointDamage(d) \"hitTurret\" and \"hitGun\" to 1, the turret can't rotate any more, the gun is pitched down but you can fire (trigger) to the ground. Difficult to check the behavior for each vehicles."}]},{"name":"canMove","title":"canMove","type":"command","url":"https://community.bistudio.com/wiki/canMove","revid":369116,"updated":"2024-09-03T10:28:47Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns if the given vehicle is still able to move.\n\n- This command does not check for the amount of fuel the vehicle has, except for helicopters and airplanes.\n- A helicopter with a damaged tail rotor may return that it cannot move, where a skilled pilot could use it.","syntaxes":[{"syntax":"canMove vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the vehicle is able to move, false if not"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"text":"```sqf\nif (not canMove _tank) then\n{\n    player sideChat \"He's nailed on the ground! Now hurry!\";\n};\n```","code":["if (not canMove _tank) then\n{\n\tplayer sideChat \"He's nailed on the ground! Now hurry!\";\n};"]}],"see_also":["canFire","canStand"]},{"name":"canSlingLoad","title":"canSlingLoad","type":"command","url":"https://community.bistudio.com/wiki/canSlingLoad","revid":352426,"updated":"2024-02-09T15:26:09Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns true if setSlingLoad is possible.","syntaxes":[{"syntax":"heli canSlingLoad cargo","params":[{"name":"heli","type":"Object","description":"a helicopter","type_expr":"Object"},{"name":"cargo","type":"Object","description":"an entity","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if setSlingLoad is possible"},"form":"binary","left":{"text":"heli"},"right":{"text":"cargo"}},{"syntax":"typeOfHeli canSlingLoad typeOfCargo","since":"arma3 2.12","params":[{"name":"typeOfHeli","type":"String","description":"a config type of helicopter","type_expr":"String"},{"name":"typeOfCargo","type":"String","description":"a config type of cargo (the object of type cargo has to exist in the mission)","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if can be sling loaded in principle","text":"Boolean - true if can be sling loaded *in principle*"},"form":"binary","left":{"text":"typeOfHeli"},"right":{"text":"typeOfCargo"}}],"examples":[{"code":["_canSling = veh1 canSlingLoad veh2;"]},{"code":["hint str ((vehicle player) canSlingLoad veh1);"]}],"see_also":["ropes","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeLength","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind","setSlingLoad","slingLoadAssistantShown"]},{"name":"canStand","title":"canStand","type":"command","url":"https://community.bistudio.com/wiki/canStand","revid":329497,"updated":"2022-07-29T13:30:20Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns if the given soldier is able to stand up. It only checks for the unit's legs and not its alive/dead status - it can return true for a dead unit.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.60 and the introduction of limping, this command always returns true for humans.","syntaxes":[{"syntax":"canStand unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the unit is human and is still able to stand up, false otherwise."},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"SQS:\n\n```sqs\n? (not canStand player) : player groupChat \"My legs! They hit my legs!\"\n```","code":["? (not canStand player) : player groupChat \"My legs! They hit my legs!\""]},{"text":"```sqf\nif (not canStand player) then\n{\n    player groupChat \"My legs! They hit my legs!\";\n};\n```","code":["if (not canStand player) then\n{\n\tplayer groupChat \"My legs! They hit my legs!\";\n};"]}],"see_also":["canMove","canFire"]},{"name":"canSuspend","title":"canSuspend","type":"command","url":"https://community.bistudio.com/wiki/canSuspend","revid":353403,"updated":"2024-03-17T20:47:33Z","groups":["Program Flow"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns true if sleep, uiSleep or waitUntil commands can be used in the current scope.\nUsually when suspension is not allowed but used, for example when code is executed in unscheduled environment, the script engine would ignore any suspension command and throw error: \"Suspending not allowed in this context\".\nUsing canSuspend command allows to detect the correct environment for the code.\n\n> [!NOTE]\n> The definition of scheduled and unscheduled environment is not the same as whether or not the script execution can or cannot be suspended.\n>\n> For example while .*sqs* and .*fsm* scripts are scheduled (i.e. added to the scheduler:\n>\n> diag_activeSQSScripts, diag_activeMissionFSMs), they cannot use sleep or be suspended like execVM or spawn scripts can, therefore canSuspend for these types of scripts will return false.","syntaxes":[{"syntax":"canSuspend","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"text":"```sqf\nonEachFrame\n{\n    systemChat str canSuspend;            // false\n    0 spawn { hint str canSuspend };    // true\n    onEachFrame {};\n};\n```","code":["onEachFrame\n{\n\tsystemChat str canSuspend;\t\t\t// false\n\t0 spawn { hint str canSuspend };\t// true\n\tonEachFrame {};\n};"]},{"text":"Make sure the function code is always spawned even when called:\n\n```sqf\nprivate _sleepingCode =\n{\n    if (!canSuspend) exitWith { _this spawn _sleepingCode };\n    sleep _this;\n    hint (\"slept \" + str _this);\n};\n\n5 call _sleepingCode;\n```","code":["private _sleepingCode =\n{\n\tif (!canSuspend) exitWith { _this spawn _sleepingCode };\n\tsleep _this;\n\thint (\"slept \" + str _this);\n};\n\n5 call _sleepingCode;"]}],"see_also":["sleep","uiSleep","waitUntil","call","spawn","execVM","isRemoteExecuted","isRemoteExecutedJIP","remoteExecutedOwner","isUIContext","isGamePaused","isGameFocused"]},{"name":"canTriggerDynamicSimulation","title":"canTriggerDynamicSimulation","type":"command","url":"https://community.bistudio.com/wiki/canTriggerDynamicSimulation","revid":351687,"updated":"2023-12-24T14:10:58Z","groups":["Dynamic Simulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"A getter for triggerDynamicSimulation.\n\n> [!IMPORTANT]\n> This command returns always true for vehicles.","syntaxes":[{"syntax":"canTriggerDynamicSimulation unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hint str canTriggerDynamicSimulation player;"]}],"see_also":["enableDynamicSimulationSystem","dynamicSimulationSystemEnabled","enableDynamicSimulation","dynamicSimulationEnabled","setDynamicSimulationDistance","dynamicSimulationDistance","setDynamicSimulationDistanceCoef","dynamicSimulationDistanceCoef","triggerDynamicSimulation","enableSimulation","simulationEnabled","enableSimulationGlobal","Arma 3: Dynamic Simulation"]},{"name":"canUnloadInCombat","title":"canUnloadInCombat","type":"command","url":"https://community.bistudio.com/wiki/canUnloadInCombat","revid":363231,"updated":"2024-03-26T10:51:07Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns config value of `unloadInCombat` for a vehicle. Alternatively see getUnloadInCombat","syntaxes":[{"syntax":"canUnloadInCombat vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["if (canUnloadInCombat _vehicle) then { hint \"unload in combat is possible!\" };"]}],"see_also":["setUnloadInCombat","getUnloadInCombat"]},{"name":"canVehicleCargo","title":"canVehicleCargo","type":"command","url":"https://community.bistudio.com/wiki/canVehicleCargo","revid":336373,"updated":"2022-12-30T13:44:50Z","groups":["Vehicle in Vehicle Transport"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Returns bool array if it is possible to load cargo inside vehicle and if possible to load cargo into empty vehicle","syntaxes":[{"syntax":"vehicle canVehicleCargo cargo","params":[{"name":"vehicle","type":"Object","description":"vehicle carrying cargo","type_expr":"Object"},{"name":"cargo","type":"Object","description":"cargo to put in vehicle","type_expr":"Object"}],"returns":{"type":"Array of Booleans","type_expr":"Array<Boolean>","description":"[willFitIntoCurrentVehicle, willFitIntoEmptyVehicle]"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"cargo"}}],"examples":[{"text":"Blackfish with no vehicle cargo loaded\n\n```sqf\nprivate _result = blackfish canVehicleCargo offroad; // [true, true]\n```","code":["private _result = blackfish canVehicleCargo offroad; // [true, true]"]},{"text":"Blackfish with one vehicle cargo called offroad already loaded\n\n```sqf\nprivate _result = blackfish canVehicleCargo offroad; // [false, false]\n```\n\nEven if the Blackfish were empty, the offroad could not be loaded because it is already in a cargo space","code":["private _result = blackfish canVehicleCargo offroad; // [false, false]"]},{"text":"Blackfish with one vehicle cargo called offroad already loaded\n\n```sqf\nprivate _result = blackfish canVehicleCargo offroad2; // [false, true]\n```\n\noffroad2 can't be loaded because there isn't enough space in the Blackfish, but if there were space offroad2 could be loaded into the Blackfish","code":["private _result = blackfish canVehicleCargo offroad2; // [false, true]"]}],"see_also":["setVehicleCargo","enableVehicleCargo","getVehicleCargo","isVehicleCargo","vehicleCargoEnabled","canSlingLoad","Arma 3: Vehicle in Vehicle Transport"]},{"name":"captive","title":"captive","type":"command","url":"https://community.bistudio.com/wiki/captive","revid":318573,"updated":"2022-05-13T09:21:07Z","groups":["Object Manipulation","Sides"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the captive state of the given unit (set with setCaptive). A captive unit will not be attacked by its enemies.\n\n> [!IMPORTANT]\n> While a captive unit won't be attacked, it will still attack its enemies – be sure to setBehaviour \"CARELESS\" / removeAllWeapons accordingly.","syntaxes":[{"syntax":"captive object","params":[{"name":"object","type":"Object","description":"unit or vehicle","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the unit is captive, false if not"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["if (captive _general) then { removeAllWeapons _general; };"]}],"see_also":["captiveNum","setCaptive","side"]},{"name":"captiveNum","title":"captiveNum","type":"command","url":"https://community.bistudio.com/wiki/captiveNum","revid":369311,"updated":"2024-09-03T18:42:55Z","groups":["Object Manipulation","Sides"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks whether the unit is a captive. If the unit is a vehicle, its commander is checked instead.\nIf a unit's captivity level was set as a Boolean, then the returned number is either 0 (for false) or 1 (for true).","syntaxes":[{"syntax":"captiveNum unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"anything from 0 to value set by setCaptive alt syntax. A non zero value means captive."},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_captivity = captiveNum _unit;"]},{"code":["_unit setCaptive 1024;\nhint str captive _unit; // true\nhint str captiveNum _unit; // 1024"]}],"see_also":["captive","setCaptive"]},{"name":"case","title":"case","type":"command","url":"https://community.bistudio.com/wiki/case","revid":347319,"updated":"2023-09-10T15:36:24Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"This command is used as a keyword inside a switch structure to define a value case.\n\n> [!IMPORTANT]\n> This command **must** be written and used inside a switch construct, never stored in a variable, otherwise its behaviour is not guaranteed - see https://foxhound.international/arma-3-sqf-grammar.html for further explanation.","syntaxes":[{"syntax":"case b","params":[{"name":"b","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Switch Type","type_expr":"Switch Type"},"form":"unary","right":{"text":"b"}}],"examples":[{"text":"```sqf\nswitch (_condition) do\n{\n    case 1: { hint \"1\" };\n    case 2: { hint \"2\" };\n    default { hint \"default\" };\n};\n```","code":["switch (_condition) do\n{\n\tcase 1: { hint \"1\" };\n\tcase 2: { hint \"2\" };\n\tdefault { hint \"default\" };\n};"]}],"see_also":["Control Structures","switch","default"]},{"name":"catch","title":"catch","type":"command","url":"https://community.bistudio.com/wiki/catch","revid":369419,"updated":"2024-09-03T18:48:49Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Processes code when an exception is thrown in a try block. The exception caught can be found in the *_exception* variable.","syntaxes":[{"syntax":"tryBlock catch code","params":[{"name":"tryBlock","type":"Exception Type","type_expr":"Exception handling"},{"name":"code","type":"Code","type_expr":"Code"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"tryBlock"},"right":{"text":"code"}}],"examples":[{"code":["try { throw \"invalid argument\" } catch {hint str _exception};"]},{"code":["123 try { if (_this != 123) throw \"invalid argument\" } catch { hint str _exception };"]},{"text":"The correct usage of shorthand alt syntax:\n\n```sqf\ntry {\n    if (a > b) throw \"Error: some error\"; // OK\n    // the command argument is static\n} catch {\n    hint str _exception;\n};\n\ntry {\n    _someFunc = {\n        // ...\n    };\n    if (a > b) throw (call _someFunc); // NOT OK\n    // the command argument is dynamic\n    // _someFunc is called first to get the value regardless of (a > b) outcome\n} catch {\n    hint str _exception;\n};\n\ntry {\n    _someFunc = {\n        // ...\n    };\n    if (a > b) then { throw (call _someFunc) }; /// OK\n    // the command argument is dynamic\n    // _someFunc is only called when (a > b) is true\n} catch {\n    hint str _exception;\n};\n```","code":["try {\n\tif (a > b) throw \"Error: some error\"; // OK\n\t// the command argument is static\n} catch {\n\thint str _exception;\n};\n\ntry {\n\t_someFunc = {\n\t\t// ...\n\t};\n\tif (a > b) throw (call _someFunc); // NOT OK\n\t// the command argument is dynamic\n\t// _someFunc is called first to get the value regardless of (a > b) outcome\n} catch {\n\thint str _exception;\n};\n\ntry {\n\t_someFunc = {\n\t\t// ...\n\t};\n\tif (a > b) then { throw (call _someFunc) }; /// OK\n\t// the command argument is dynamic\n\t// _someFunc is only called when (a > b) is true\n} catch {\n\thint str _exception;\n};"]}],"see_also":["Exception handling","try","throw"]},{"name":"cbChecked","title":"cbChecked","type":"command","url":"https://community.bistudio.com/wiki/cbChecked","revid":310825,"updated":"2022-05-07T20:23:49Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","description":"Returns the current state of a CT_CHECKBOX control.","syntaxes":[{"syntax":"cbChecked control","params":[{"name":"control","type":"Control","type_expr":"Control","text":"control : Control"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_checked = cbChecked _myCheckBox;"]}],"see_also":["cbSetChecked","ctrlChecked","ctrlSetChecked"]},{"name":"cbSetChecked","title":"cbSetChecked","type":"command","url":"https://community.bistudio.com/wiki/cbSetChecked","revid":369236,"updated":"2024-09-03T10:35:01Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","description":"Sets the current state of a CT_CHECKBOX control. Use `\"CheckedChanged\"` control event handler with it.","syntaxes":[{"syntax":"control cbSetChecked state","params":[{"name":"control","type":"Control","type_expr":"Control","text":"control : Control"},{"name":"state","type":"Boolean","type_expr":"Boolean","text":"state : Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"state"}}],"examples":[{"code":["_myCheckBox cbSetChecked true;"]},{"code":["_disp = findDisplay 46 createDisplay \"RscDisplayEmpty\";\n_chk = _disp ctrlCreate [\"RscCheckBox\", -1];\n_chk cbSetChecked true;"]}],"see_also":["cbChecked","ctrlSetChecked","ctrlChecked"]},{"name":"ceil","title":"ceil","type":"command","url":"https://community.bistudio.com/wiki/ceil","revid":318729,"updated":"2022-05-13T09:21:23Z","groups":["Math"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"The ceil value of x.","syntaxes":[{"syntax":"ceil x","params":[{"name":"x","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"x"}}],"examples":[{"code":["ceil 5.25; // Result is 6"]},{"code":["ceil -5.25; // Result is -5"]}],"see_also":["floor","round","linearConversion"]},{"name":"channelEnabled","title":"channelEnabled","type":"command","url":"https://community.bistudio.com/wiki/channelEnabled","revid":378505,"updated":"2026-05-03T16:53:27Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","description":"Returns Array of Booleans in format [enabledChat, enabledVoN] for the given channel.\nFor more information about enabling/disabling of chat channels see enableChannel.\n\n| Channel ID number correspondence |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| Default Channels |  |  |  |  |  | Custom Channels |  |  |  |  |  |  |  |  |  |\n| Global | Side | Command | Group | Vehicle | Direct | CC 1 | CC 2 | CC 3 | CC 4 | CC 5 | CC 6 | CC 7 | CC 8 | CC 9 | CC 10 |\n| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |","syntaxes":[{"syntax":"channelEnabled channelID","params":[{"name":"channelID","type":"Number","description":"Channel ID (see description)","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"with [chat, VoN, mapMarkers, mapDrawing]\n- chat: Boolean - is use of the text chat enabled - VoN: Boolean - is use of the voice chat enabled - Arma 3 v2.20 mapMarkers: Boolean - can map markers be created - Arma 3 v2.20 mapDrawing: Boolean - can players draw on the map","text":"Array with [chat, VoN, mapMarkers, mapDrawing]\n\n- chat: Boolean - is use of the text chat enabled\n- VoN: Boolean - is use of the voice chat enabled\n- Arma 3 v2.20 mapMarkers: Boolean - can map markers be created\n- Arma 3 v2.20 mapDrawing: Boolean - can players draw on the map"},"form":"unary","right":{"text":"channelID"}}],"examples":[{"code":["_isGlobalChatEnabled = (channelEnabled 0) select 0; // check if user can use text on global channel"]},{"code":["_isGlobalVoiceEnabled = (channelEnabled 0) select 1; // check if user can use the VoN on global channel"]},{"text":"```sqf\n// sets all variables\n(channelEnabled 0) params [\n    \"_isGlobalChatEnabled\",\n    \"_isGlobalVoiceEnabled\",\n    \"_areMarkersEnabled\",\n    \"_isMapDrawingEnabled\"\n];\n```","code":["// sets all variables\n(channelEnabled 0) params [\n\t\"_isGlobalChatEnabled\",\n\t\"_isGlobalVoiceEnabled\",\n\t\"_areMarkersEnabled\",\n\t\"_isMapDrawingEnabled\"\n];"]}],"see_also":["currentChannel","setCurrentChannel","getPlayerChannel","enableChannel","radioChannelCreate"]},{"name":"cheatsEnabled","title":"cheatsEnabled","type":"command","url":"https://community.bistudio.com/wiki/cheatsEnabled","revid":351326,"updated":"2023-11-27T05:09:28Z","groups":["System"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Checks whether cheats are enabled (whether the designers' version is running).","syntaxes":[{"syntax":"cheatsEnabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_enabled = cheatsEnabled;"]}],"see_also":["ArmA: Armed Assault: Cheats","Arma 3: Cheats"]},{"name":"checkAIFeature","title":"checkAIFeature","type":"command","url":"https://community.bistudio.com/wiki/checkAIFeature","revid":369971,"updated":"2024-10-22T12:51:32Z","groups":["AI Behaviour"],"status":"ok","games":{"arma2":"1.05","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.05","arma3_since":"0.50","description":"Checks if the given AI feature is currently enabled.","syntaxes":[{"syntax":"checkAIFeature feature","params":[{"name":"feature","type":"String","description":"can be one of:\n\n- `\"AwareFormationSoft\"`\n- `\"CombatFormationSoft\"`\n- AI skill - see disableAI - Syntax 1 (since Arma 3 v1.96)","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if is enabled"},"form":"unary","right":{"text":"feature"}},{"syntax":"unit checkAIFeature feature","since":"arma3 1.96","params":[{"name":"unit","type":"Object","description":"unit to test AI feature for","type_expr":"Object"},{"name":"feature","type":"String","description":"disableAI / enableAI feature","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if is enabled"},"form":"binary","left":{"text":"unit"},"right":{"text":"feature"}}],"examples":[{"code":["_featureUsed = checkAIFeature \"AwareFormationSoft\";"]},{"code":["_autotargetOn = bob checkAIFeature \"AUTOTARGET\";"]}],"see_also":["enableAIFeature","enableAI","getUnitState","disableAI"]},{"name":"checkVisibility","title":"checkVisibility","type":"command","url":"https://community.bistudio.com/wiki/checkVisibility","revid":377827,"updated":"2026-01-03T04:27:56Z","groups":["Math - Geometry"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"| Affected by | Not affected by |\n|---|---|\n| - terrain grid<br>- obstacles<br>- particles<br>  (with `blockAIVisibility = 1`) | - daylight<br>- distance<br>- overcast<br>- fog |\n\nChecks if one position is visible from another position and how much.\n\n> [!NOTE]\n> Particles that have `blockAIVisibility` set to 1 will influence the result, but will never make checkVisibility return 0; an extremely small number will be returned instead.","syntaxes":[{"syntax":"[ignore, LOD, ignore2] checkVisibility [beg, end]","params":[{"name":"ignore","type":"Object","description":"object to exclude from calculations","type_expr":"Object"},{"name":"LOD","type":"String","description":"level of details to use. Possible values are: `\"FIRE\"`, `\"VIEW\"`, `\"GEOM\"`, `\"IFIRE\"`, and Arma 3 v2.02 `\"PHYSX\"`","type_expr":"String"},{"name":"ignore2","type":"Object","optional":true,"default":"objNull","description":"second object to exclude from calculations","type_expr":"Object","since":"arma3 1.62","text":"ignore2: Object - (Optional, default objNull) second object to exclude from calculations"},{"name":"beg","type":"PositionASL","description":"start position","type_expr":"PositionASL"},{"name":"end","type":"PositionASL","description":"end position","type_expr":"PositionASL"}],"returns":{"type":"Number","type_expr":"Number","description":"how much end position is visible to start position in range 0..1, where 1 is fully visible."},"form":"binary","left":{"text":"[ignore, LOD, ignore2]"},"right":{"text":"[beg, end]"}}],"examples":[{"code":["private _canSee = [objNull, \"VIEW\"] checkVisibility [eyePos player, eyePos unit1];"]}],"see_also":["lineIntersectsWith","lineIntersectsSurfaces","lineIntersectsObjs","intersect","terrainIntersect","terrainIntersectASL","terrainIntersectAtASL","lineIntersects","cursorObject","cursorTarget","disableRemoteSensors"]},{"name":"childAttached","title":"childAttached","type":"command","url":"https://community.bistudio.com/wiki/childAttached","revid":378906,"updated":"2026-08-11T14:57:07Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"local"},"description":"Get the child that has been attached via attachChild","syntaxes":[{"syntax":"childAttached parent","params":[{"name":"parent","type":"Object","description":"Must be a Transport vehicle like Car/Tank (Maybe helicopter/airplane works?).","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"parent"}}],"see_also":["attachChild","parentAttached"]},{"name":"civilian","title":"civilian","type":"command","url":"https://community.bistudio.com/wiki/civilian","revid":343875,"updated":"2023-07-27T16:10:26Z","groups":["Sides"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Pre-defined variable for the civilian side.\nWhen used in a format statement (`hint format [\"%1\", civilian]`), the string returned is `\"CIV\"`.","syntaxes":[{"syntax":"civilian","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"text":"SQS:\n\n```sqs\n? side _unit == civilian : hint \"This is a civilian unit!\"\n```","code":["? side _unit == civilian : hint \"This is a civilian unit!\""]},{"text":"SQF:\n\n```sqf\nif (side _unit == civilian) then\n{\n    hint \"This is a civilian unit!\";\n};\n```","code":["if (side _unit == civilian) then\n{\n\thint \"This is a civilian unit!\";\n};"]}],"see_also":["side","west","east","resistance","sideEmpty","sideAmbientLife"],"notes":[{"user":"Ceeeb","date":"2007-02-12T06:06:00Z","text":"In **OFP v1.96**, empty vehicles, objects and dead soldiers are on side civilian."},{"user":"KC Grimes","date":"2018-05-01T15:03:00Z","text":"In **Arma 3 v1.82**, units where setCaptive and/or setUnconscious are set to true are on side civilian, regardless of low rating (Renegade status)."}]},{"name":"className","title":"className","type":"command","url":"https://community.bistudio.com/wiki/className","revid":318707,"updated":"2022-05-13T09:21:21Z","groups":["Locations"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns short name of location. For config class name, see configName","syntaxes":[{"syntax":"className location","params":[{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"location"}}],"examples":[{"code":["_shortName = className myLocation;"]}],"see_also":["setText","createLocation","deleteLocation","drawLocation","locationPosition","locationNull","nearestLocation","nearestLocations","nearestLocationWithDubbing","name"]},{"name":"clear3DENAttribute","title":"clear3DENAttribute","type":"command","url":"https://community.bistudio.com/wiki/clear3DENAttribute","revid":364152,"updated":"2024-05-05T10:44:17Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Clears the value of the given entity's attribute in Eden Editor. An attribute is identified by its `property` (`data` when it is engine-drive attribute) value in config. For the list of all attributes with their properties, see Setting Attributes.\n\n> [!IMPORTANT]\n> Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!","syntaxes":[{"syntax":"entity clear3DENAttribute attribute","params":[{"name":"entity","type":"Eden Entity or Eden ID","type_expr":"Eden Entity | Eden ID"},{"name":"attribute","type":"String","description":"attribute property","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success"},"form":"binary","left":{"text":"entity"},"right":{"text":"attribute"}}],"examples":[{"code":["0 clear3DENAttribute \"name\";"]}],"see_also":["set3DENAttribute","set3DENAttributes","set3DENMissionAttributes","get3DENMissionAttribute","get3DENAttribute"]},{"name":"clear3DENInventory","title":"clear3DENInventory","type":"command","url":"https://community.bistudio.com/wiki/clear3DENInventory","revid":321908,"updated":"2022-05-22T12:24:36Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Deletes inventory from mission.sqm of given units. Effect is not immediately visible, only when previewing the inventory resets to default.","syntaxes":[{"syntax":"clear3DENInventory entities","params":[{"name":"entities","type":"Array of Eden Entity or Eden ID","type_expr":"Array<Eden Entity | Eden ID>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"entities"}}],"examples":[{"code":["clear3DENInventory get3DENSelected \"Object\";"]}],"see_also":["save3DENInventory","get3DENEntityID","collect3DENHistory","get3DENSelected"]},{"name":"clearAllItemsFromBackpack","title":"clearAllItemsFromBackpack","type":"command","url":"https://community.bistudio.com/wiki/clearAllItemsFromBackpack","revid":310196,"updated":"2022-05-05T13:10:37Z","groups":["Containers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Removes all items from backpack of a unit.","syntaxes":[{"syntax":"clearAllItemsFromBackpack unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["clearAllItemsFromBackpack player;"]}],"see_also":["backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack"]},{"name":"clearBackpackCargo","title":"clearBackpackCargo","type":"command","url":"https://community.bistudio.com/wiki/clearBackpackCargo","revid":379320,"updated":"2026-10-30T23:50:50Z","groups":["Containers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Removes all backpacks from ammo box (or any general weapon holder container).","syntaxes":[{"syntax":"clearBackpackCargo box","params":[{"name":"box","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"box"}}],"examples":[{"code":["clearBackpackCargo myBox;"]}],"see_also":["backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack"],"notes":[{"user":"Pharenhite","date":"2017-07-06T16:26:00Z","text":"This will remove not only backpacks, but vests and uniforms as well."}]},{"name":"clearBackpackCargoGlobal","title":"clearBackpackCargoGlobal","type":"command","url":"https://community.bistudio.com/wiki/clearBackpackCargoGlobal","revid":378439,"updated":"2026-04-12T19:56:27Z","groups":["Containers"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes all backpacks from the vehicle cargo space; MP-synchronised.","syntaxes":[{"syntax":"clearBackpackCargoGlobal unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["clearBackpackCargoGlobal jeepOne;"]}],"see_also":["backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack","clearMagazineCargo","clearMagazineCargoGlobal","clearWeaponCargo","clearWeaponCargoGlobal","clearItemCargo","clearItemCargoGlobal"]},{"name":"clearForcesRTD","title":"clearForcesRTD","type":"command","url":"https://community.bistudio.com/wiki/clearForcesRTD","revid":379524,"updated":"2026-10-31T00:50:18Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Removes all force generators from world.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"clearForcesRTD","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["clearForcesRTD;"]}],"see_also":["forceGeneratorRTD","forceAtPositionRTD"]},{"name":"clearGroupIcons","title":"clearGroupIcons","type":"command","url":"https://community.bistudio.com/wiki/clearGroupIcons","revid":347632,"updated":"2023-09-28T20:46:38Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Removes all icons from group.","syntaxes":[{"syntax":"clearGroupIcons group","params":[{"name":"group","type":"Group","type_expr":"Group"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"group"}}],"examples":[{"code":["clearGroupIcons (group player);"]}],"see_also":["addGroupIcon","getGroupIcon","getGroupIconParams","groupIconSelectable","groupIconsVisible","onGroupIconClick","removeGroupIcon","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible"]},{"name":"clearItemCargo","title":"clearItemCargo","type":"command","url":"https://community.bistudio.com/wiki/clearItemCargo","revid":309943,"updated":"2022-05-05T12:16:59Z","groups":["Containers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Removes all items from ammo box (or any general weapon holder container).","syntaxes":[{"syntax":"clearItemCargo box","params":[{"name":"box","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"box"}}],"examples":[{"code":["clearItemCargo myBox;"]}],"see_also":["clearItemCargoGlobal","addItemCargo","clearMagazineCargo","clearMagazineCargoGlobal","clearWeaponCargo","clearWeaponCargoGlobal","clearBackpackCargo","clearBackpackCargoGlobal"]},{"name":"clearItemCargoGlobal","title":"clearItemCargoGlobal","type":"command","url":"https://community.bistudio.com/wiki/clearItemCargoGlobal","revid":309899,"updated":"2022-05-05T12:16:44Z","groups":["Containers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes all items from ammo box (or any general weapon holder container). It also removes vests and uniforms.","syntaxes":[{"syntax":"clearItemCargoGlobal box","params":[{"name":"box","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"box"}}],"examples":[{"code":["clearItemCargoGlobal _ammoBox;"]}],"see_also":["clearItemCargo","addItemCargoGlobal","clearMagazineCargo","clearMagazineCargoGlobal","clearWeaponCargo","clearWeaponCargoGlobal","clearBackpackCargo","clearBackpackCargoGlobal"]},{"name":"clearItemPool","title":"clearItemPool","type":"command","url":"https://community.bistudio.com/wiki/clearItemPool","revid":379214,"updated":"2026-10-30T22:17:19Z","groups":["Weapon Pool"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Removes all items from the weapon pool (used in campaigns to transfer items to the next mission).","syntaxes":[{"syntax":"clearItemPool","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["clearItemPool;"]}],"see_also":["addItemPool"]},{"name":"clearMagazineCargo","title":"clearMagazineCargo","type":"command","url":"https://community.bistudio.com/wiki/clearMagazineCargo","revid":379321,"updated":"2026-10-30T23:50:58Z","groups":["Containers"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Remove all magazines from the given vehicle's magazine cargo space.","syntaxes":[{"syntax":"clearMagazineCargo vehicleName","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"vehicleName"}}],"examples":[{"code":["clearMagazineCargo _truck;"]}],"see_also":["clearMagazineCargoGlobal","addMagazineCargo","addWeaponCargo","clearWeaponCargo","clearWeaponCargoGlobal","clearBackpackCargo","clearBackpackCargoGlobal","clearItemCargo","clearItemCargoGlobal","addMagazineAmmoCargo"],"notes":[{"user":"Sbsmac","date":"2009-10-24T09:02:00Z","text":"Effect is local, run on each client for global effect."}]},{"name":"clearMagazineCargoGlobal","title":"clearMagazineCargoGlobal","type":"command","url":"https://community.bistudio.com/wiki/clearMagazineCargoGlobal","revid":309919,"updated":"2022-05-05T12:16:57Z","groups":["Containers"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes all magazines from the vehicle cargo space. MP synchronized.","syntaxes":[{"syntax":"clearMagazineCargoGlobal object","params":[{"name":"object","type":"Object","description":"vehicle or ammo box","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["clearMagazineCargoGlobal jeepOne;"]}],"see_also":["clearMagazineCargo","addMagazineCargoGlobal","clearWeaponCargo","clearWeaponCargoGlobal","clearBackpackCargo","clearBackpackCargoGlobal","clearItemCargo","clearItemCargoGlobal"]},{"name":"clearMagazinePool","title":"clearMagazinePool","type":"command","url":"https://community.bistudio.com/wiki/clearMagazinePool","revid":318569,"updated":"2022-05-13T09:21:06Z","groups":["Weapon Pool"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Removes all magazines from the magazine pool, of which the player may choose in the following missions. Available in campaigns only.","syntaxes":[{"syntax":"clearMagazinePool","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["clearMagazinePool;"]}],"see_also":["addMagazinePool"]},{"name":"clearOverlay","title":"clearOverlay","type":"command","url":"https://community.bistudio.com/wiki/clearOverlay","revid":376349,"updated":"2025-10-07T17:08:59Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Clear the current overlay.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"clearOverlay map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"map"}}],"examples":[{"code":["clearOverlay _map;"]}]},{"name":"clearRadio","title":"clearRadio","type":"command","url":"https://community.bistudio.com/wiki/clearRadio","revid":370204,"updated":"2024-11-06T23:34:35Z","groups":["Radio and Chat"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Clean up the content of radio protocol history.","syntaxes":[{"syntax":"clearRadio","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"text":"```sqf\nfor \"_i\" from 3 to 1 step -1 do\n{\n    systemChat format [\"The chat history will disappear in %1\", _i];\n    sleep 1;\n};\n\nclearRadio;            // removes previous messages\nenableRadio false;    // disables the chat\n```","code":["for \"_i\" from 3 to 1 step -1 do\n{\n\tsystemChat format [\"The chat history will disappear in %1\", _i];\n\tsleep 1;\n};\n\nclearRadio;\t\t\t// removes previous messages\nenableRadio false;\t// disables the chat"]}],"see_also":["enableRadio"]},{"name":"clearWeaponCargo","title":"clearWeaponCargo","type":"command","url":"https://community.bistudio.com/wiki/clearWeaponCargo","revid":379322,"updated":"2026-10-30T23:51:06Z","groups":["Containers"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Remove all weapons from the given vehicle's weapon cargo space.","syntaxes":[{"syntax":"clearWeaponCargo vehicleName","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"vehicleName"}}],"examples":[{"code":["clearWeaponCargo _truck;"]}],"see_also":["clearWeaponCargoGlobal","addWeaponCargo","addMagazineCargo","clearMagazineCargo","clearMagazineCargoGlobal","clearBackpackCargo","clearBackpackCargoGlobal","clearItemCargo","clearItemCargoGlobal"],"notes":[{"user":"Sbsmac","date":"2009-10-24T09:02:00Z","text":"Only works on clients."}]},{"name":"clearWeaponCargoGlobal","title":"clearWeaponCargoGlobal","type":"command","url":"https://community.bistudio.com/wiki/clearWeaponCargoGlobal","revid":309985,"updated":"2022-05-05T12:17:03Z","groups":["Containers"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes all weapons from the vehicle cargo space. MP synchronized.","syntaxes":[{"syntax":"clearWeaponCargoGlobal unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["clearWeaponCargoGlobal jeepOne;"]}],"see_also":["clearWeaponCargo","addWeaponCargo","clearMagazineCargo","clearMagazineCargoGlobal","clearBackpackCargo","clearBackpackCargoGlobal","clearItemCargo","clearItemCargoGlobal"]},{"name":"clearWeaponPool","title":"clearWeaponPool","type":"command","url":"https://community.bistudio.com/wiki/clearWeaponPool","revid":318753,"updated":"2022-05-13T09:21:26Z","groups":["Weapon Pool"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Remove all weapons from the weapon pool, of which the player may choose in the following missions. Available in campaigns only.","syntaxes":[{"syntax":"clearWeaponPool","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["clearWeaponPool;"]}],"see_also":["addWeaponPool"]},{"name":"clientOwner","title":"clientOwner","type":"command","url":"https://community.bistudio.com/wiki/clientOwner","revid":379323,"updated":"2026-10-30T23:51:14Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns the machine network ID of the client executing the command.","syntaxes":[{"syntax":"clientOwner","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["private _myNetworkId = clientOwner;"]}],"see_also":["owner","groupOwner","onPlayerConnected","onPlayerDisconnected","getClientState","getClientStateNumber","admin","remoteExecutedOwner"],"notes":[{"user":"Killzone_Kid","date":"2016-02-17T18:54:00Z","text":"On hosted server there could be some inconsistency between clientOwner, owner and object creator id, especially in missions started from save.\nOn the dedicated server this command however works reliably."}]},{"name":"closeDialog","title":"closeDialog","type":"command","url":"https://community.bistudio.com/wiki/closeDialog","revid":349590,"updated":"2023-11-11T22:42:19Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Closes the currently active dialog with exit code. It does not instantly close the dialog but does it on next simulation cycle. Most common exit codes are:\n\n```cpp\n#define IDC_OK        1 // emulate \"OK\" button\n#define IDC_CANCEL    2 // emulate \"Cancel\" button\n```","syntaxes":[{"syntax":"closeDialog exitcode","params":[{"name":"exitcode","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"exitcode"}}],"examples":[{"code":["closeDialog 2;"]},{"code":["#define IDC_CANCEL 2\ncloseDialog IDC_CANCEL;"]}],"see_also":["createDialog","dialog","closeDisplay"]},{"name":"closeDisplay","title":"closeDisplay","type":"command","url":"https://community.bistudio.com/wiki/closeDisplay","revid":323157,"updated":"2022-07-01T10:11:40Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Closes given display with exit code. It does not instantly close the display but does it on next simulation cycle. Most common exit codes are:\n\n```cpp\n#define IDC_OK        1 // emulate \"OK\" button\n#define IDC_CANCEL    2 // emulate \"Cancel\" button\n```\n\n> [!IMPORTANT]\n> Sometimes when one display is opened on top of another display the previous display may not close properly; some display EHs such as \"onUnload\" may never fire.\n> Use this command to manually handle such displays.","syntaxes":[{"syntax":"display closeDisplay exitCode","params":[{"name":"display","type":"Display","type_expr":"Display"},{"name":"exitCode","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"display"},"right":{"text":"exitCode"}}],"examples":[{"code":["_display closeDisplay 1;"]},{"code":["#define IDC_OK 1\n_display closeDisplay IDC_OK;"]}],"see_also":["createDisplay","closeDialog"]},{"name":"closeOverlay","title":"closeOverlay","type":"command","url":"https://community.bistudio.com/wiki/closeOverlay","revid":363284,"updated":"2024-03-26T10:51:54Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Closes the current overlay without committing.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"closeOverlay map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"map"}}],"examples":[{"text":"-"}]},{"name":"collapseObjectTree","title":"collapseObjectTree","type":"command","url":"https://community.bistudio.com/wiki/collapseObjectTree","revid":376356,"updated":"2025-10-07T21:29:10Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Collapse the object tree.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"collapseObjectTree map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"map"}}],"examples":[{"code":["collapseObjectTree _map;"]}]},{"name":"collect3DENHistory","title":"collect3DENHistory","type":"command","url":"https://community.bistudio.com/wiki/collect3DENHistory","revid":376415,"updated":"2025-10-11T01:38:31Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Execute a block of code in which all Eden Editor operations will be recorded as one history step. For example creating an entity, setting its attributes and then connections would normally be recorded as three different steps. Calling them all within single **collect3DENHistory** block will group them together and the user will need to undo only once to revert the changes. Use ignore3DENHistory to ignore history entry creation.\n\n> [!NOTE]\n> In order to only change the 2nd or 3rd parameter of the alternative syntax use nil as the preceding parameters.\n\nSome useful icons are:\n\n- `\"\\a3\\3den\\data\\cfg3den\\history\\addtolayer_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\changeattributes_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\changeseat_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\connectitems_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\create_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\createcomment_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\deleteitems_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\disconnectitems_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\makenewlayer_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\missionnew_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\moveitems_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\multipleoperations_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\pasteitems_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\removefromlayer_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\rotateitems_ca.paa\"`\n- `\"\\a3\\3den\\data\\cfg3den\\history\\scaleitems_ca.paa\"`","syntaxes":[{"syntax":"collect3DENHistory code","params":[{"name":"code","type":"Code","description":"code that is executed in **Unscheduled Environment**","type_expr":"Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"code"}},{"syntax":"[text, tooltip, icon] collect3DENHistory code","since":"arma3 2.06","params":[{"name":"text","type":"String or Nothing","description":"text of the entry that is added to the history list","type_expr":"String | Nothing"},{"name":"tooltip","type":"String","optional":true,"default":"\"Batch Change\" (localized)","description":"tooltip of the entry","type_expr":"String","text":"tooltip: String - (Optional, default \"Batch Change\" (localized)) - tooltip of the entry"},{"name":"icon","type":"String","optional":true,"default":"\"a3\\3den\\data\\cfg3den\\history\\multipleoperations_ca.paa\"","description":"path to the icon that is displayed left of the *text*. **Must not start with a `\\`!**","type_expr":"String","text":"icon: String - (Optional, default \"a3\\3den\\data\\cfg3den\\history\\multipleoperations_ca.paa\") - path to the icon that is displayed left of the *text*. **Must not start with a `\\`!**"},{"name":"code","type":"Code","description":"code that is executed in **Unscheduled Environment**","type_expr":"Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"[text, tooltip, icon]"},"right":{"text":"code"}}],"examples":[{"text":"```sqf\ncollect3DENHistory\n{\n    _logic = create3DENEntity [\"Logic\", \"Logic\", position player];\n    add3DENConnection [\"Sync\", [_logic], player];\n}; // Creates a logic and connects it to player in one history step.\n```","code":["collect3DENHistory \n{\n\t_logic = create3DENEntity [\"Logic\", \"Logic\", position player];\n\tadd3DENConnection [\"Sync\", [_logic], player];\n}; // Creates a logic and connects it to player in one history step."]},{"text":"```sqf\n[\"Create Entity\", \"B_Soldier_F\", \"a3\\3den\\data\\cfg3den\\history\\create_ca.paa\"] collect3DENHistory\n{\n    create3DENEntity [\"Object\",\"B_Soldier_F\", screenToWorld [0.5,0.5]];\n};\n```","code":["[\"Create Entity\", \"B_Soldier_F\", \"a3\\3den\\data\\cfg3den\\history\\create_ca.paa\"] collect3DENHistory \n{\n\tcreate3DENEntity [\"Object\",\"B_Soldier_F\", screenToWorld [0.5,0.5]];\n};"]},{"text":"```sqf\n[nil, nil, \"a3\\3den\\data\\cfg3den\\history\\moveitems_ca.paa\"] collect3DENHistory\n{\n    create3DENEntity [\"Object\",\"B_Soldier_F\", screenToWorld [0.5,0.5]];\n}; // Change only the icon\n```","code":["[nil, nil, \"a3\\3den\\data\\cfg3den\\history\\moveitems_ca.paa\"] collect3DENHistory \n{\n\tcreate3DENEntity [\"Object\",\"B_Soldier_F\", screenToWorld [0.5,0.5]];\n}; // Change only the icon"]}],"see_also":["ignore3DENHistory","add3DENConnection","create3DENComposition","create3DENEntity","delete3DENEntities","do3DENAction","remove3DENConnection","set3DENAttributes","set3DENObjectType"],"notes":[{"user":"7erra","date":"2020-10-26T01:15:00Z","text":"Contrary to other code block structures (call, if/then/exitWith, switch/case/default, etc.) the code block of collect3DENHistory will not return any value:\n\n```sqf\n_unit = collect3DENHistory {\n    create3DENEntity [\"Object\", \"C_Protagonist_VR_F\", screenToWorld [0.5, 0.5]];\n};\n_unit // <null>\n```"}]},{"name":"collectiveRTD","title":"collectiveRTD","type":"command","url":"https://community.bistudio.com/wiki/collectiveRTD","revid":377772,"updated":"2026-01-03T01:32:23Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Returns the current position of a helicopter's collective pitch control.\n\n- 0: fully lowered\n- 1: fully raised\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"collectiveRTD helicopterRTD","params":[{"name":"helicopterRTD","type":"ObjectRTD","description":"helicopter","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"helicopterRTD"}}],"examples":[{"code":["_collective = collectiveRTD vehicle player;"]}],"see_also":["setActualCollectiveRTD"]},{"name":"collisionDisabledWith","title":"collisionDisabledWith","type":"command","url":"https://community.bistudio.com/wiki/collisionDisabledWith","revid":377648,"updated":"2026-01-02T09:01:51Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"argument":"global"},"description":"Returns the object, given object has collision disabled with and whether or not returned object has also collision disabled with given object.","syntaxes":[{"syntax":"collisionDisabledWith obj","params":[{"name":"obj","type":"Object","description":"given object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [other, mutual]\n- other: Object - the object, obj has collision disabled with, or objNull - mutual: Boolean - true if other has also disabled collision with obj, false otherwise","text":"Array with [other, mutual]\n\n- other: Object - the object, *obj* has collision disabled with, or objNull\n- mutual: Boolean - true if *other* has also disabled collision with *obj*, false otherwise"},"form":"unary","right":{"text":"obj"}}],"examples":[{"code":["private _collisionInfo = collisionDisabledWith _tank;"]}],"see_also":["disableCollisionWith","enableCollisionWith"]},{"name":"combatBehaviour","title":"combatBehaviour","type":"command","url":"https://community.bistudio.com/wiki/combatBehaviour","revid":351327,"updated":"2023-11-27T05:09:56Z","groups":["AI Behaviour","Groups"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","locality":{"argument":"global"},"description":"Returns combat behaviour of unit or group. To set unit or group behaviour see setCombatBehaviour. The behaviour is one of:","syntaxes":[{"syntax":"combatBehaviour unitOrGroup","params":[{"name":"unitOrGroup","type":"Object or Group","description":"AI unit or group","type_expr":"Object | Group"}],"returns":{"type":"String","type_expr":"String","description":"unit behaviour - one of:\n- \"CARELESS\" - \"SAFE\" - \"AWARE\" - \"COMBAT\" - \"STEALTH\" - \"ERROR\" - when not available","text":"String - unit behaviour - one of:\n\n- \"CARELESS\"\n- \"SAFE\"\n- \"AWARE\"\n- \"COMBAT\"\n- \"STEALTH\"\n- \"ERROR\" - when not available"},"form":"unary","right":{"text":"unitOrGroup"}}],"examples":[{"code":["unit1 setCombatBehaviour \"CARELESS\";\ncombatBehaviour unit1; // \"CARELESS\""]},{"code":["group unit1 setCombatBehaviour \"SAFE\";\ncombatBehaviour group unit1; // \"SAFE\""]}],"see_also":["setCombatBehaviour","setBehaviour","setBehaviourStrong","setWaypointBehaviour","combatMode","setCombatMode","skill","setSkill"]},{"name":"combatMode","title":"combatMode","type":"command","url":"https://community.bistudio.com/wiki/combatMode","revid":379285,"updated":"2026-10-30T23:46:10Z","groups":["Groups","AI Behaviour"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the combat mode of the given AI group. See setCombatMode for more information about combat modes.","syntaxes":[{"syntax":"combatMode group","params":[{"name":"group","type":"Group or Object","description":"Group or Object\n\n- Group\n- Object of type Unit - if the argument is unit Object, unit's current group is used.","type_expr":"Group | Object","text":"group: Group or Object\n\n- Group\n- Object of type Unit - if the argument is unit Object, unit's current group is used."}],"returns":{"type":"String","type_expr":"String","description":"one of:\n- \"BLUE\" - \"GREEN\" - \"WHITE\" - \"YELLOW\" - \"RED\" - \"ERROR\"","text":"String - one of:\n\n- \"BLUE\"\n- \"GREEN\"\n- \"WHITE\"\n- \"YELLOW\"\n- \"RED\"\n- \"ERROR\""},"form":"unary","right":{"text":"group"}}],"examples":[{"code":["if (combatMode _grp1 == \"BLUE\") then {_grp1 setCombatMode \"GREEN\"};"]}],"see_also":["Combat Modes","setCombatMode","behaviour","setBehaviour","skill","setSkill","Arma 3: AI Skill","setUnitCombatMode","unitCombatMode","setCombatBehaviour","combatBehaviour"],"notes":[{"user":"Ceeeb","text":"In **OFP v1.96**, combatMode return value does not change when unit's combat mode is set with radio commands, i.e troops under the player's command."}]},{"name":"combatPace","title":"combatPace","type":"command","url":"https://community.bistudio.com/wiki/combatPace","revid":378225,"updated":"2026-03-15T12:52:32Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"local"},"description":"Sets or gets the combat pace for the local player. If the right-hand array is empty, the command will simply return the current combat pace mode without making any changes to combat pace.","syntaxes":[{"syntax":"soldier combatPace [enable, duration]","params":[{"name":"soldier","type":"Object","description":"The local player unit.","type_expr":"Object"},{"name":"enable","type":"Boolean","optional":true,"description":"Whether to enable or disable combat pace. This param is optional, i.e. the right-hand array can be completely empty (see #Example 1).","type_expr":"Boolean","text":"enable: Boolean - (Optional, no default) Whether to enable or disable combat pace. This param is optional, i.e. the right-hand array can be completely empty (see #Example 1)."},{"name":"duration","type":"Scalar","optional":true,"default":"-1","description":"Duration of combat pace in seconds (maximum 5 seconds). If duration < 0, combat pace will be toggled. If duration >= 0, short combat pace will be used. duration == 0 means use the default short combat pace duration in config, similar to when the player presses the fire button and weapon is raised. Note that the combat pace modes are mutually exclusive (enabling one disables the other)","type_expr":"Scalar","text":"duration: Scalar - (Optional, default -1) Duration of combat pace in seconds (maximum 5 seconds). If duration < 0, combat pace will be toggled. If duration >= 0, short combat pace will be used. duration == 0 means use the default short combat pace duration in config, similar to when the player presses the fire button and weapon is raised. Note that the combat pace modes are mutually exclusive (enabling one disables the other)"}],"returns":{"type":"String","type_expr":"String","description":"previous combat pace. Possible values: \"None\", \"Timer\", \"Toggle\""},"form":"binary","left":{"text":"soldier"},"right":{"text":"[enable, duration]"}}],"examples":[{"code":["private _isCombatPaceToggled = player combatPace [] == \"Toggle\"; // current combat pace is toggled"]},{"code":["private _isInCombatPace = player combatPace [] != \"None\"; // either using timer or toggled combat pace"]},{"code":["player combatPace [false]; // disables combat pace (both short and toggle)"]},{"code":["player combatPace [true]; // enables combat pace toggle and disables timer mode"]},{"code":["player combatPace [true, 1]; // disables combat pace toggle, enables timer mode for 1 second"]},{"code":["player combatPace [player combatPace [] != \"Toggle\"]; // toggle combat pace (enable<->disable)"]}],"see_also":["forceWalk","getSpeed","isWalking","isForcedWalk"]},{"name":"commandArtilleryFire","title":"commandArtilleryFire","type":"command","url":"https://community.bistudio.com/wiki/commandArtilleryFire","revid":379213,"updated":"2026-10-30T21:51:08Z","groups":["Artillery"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local"},"description":"Orders an artillery unit to fire a burst on the given position (via the radio).","syntaxes":[{"syntax":"unit commandArtilleryFire [position, type, rounds]","params":[{"name":"unit","type":"Object or Array of Objects","description":"if an array is given, only its first element is used","type_expr":"Object | Array<Object>"},{"name":"position","type":"PositionAGL","type_expr":"PositionAGL"},{"name":"type","type":"String","description":"magazine class name from CfgMagazines (case sensitive).","type_expr":"String"},{"name":"rounds","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[position, type, rounds]"}}],"examples":[{"code":["Mortar commandArtilleryFire [[3000, 120, 1000], \"8Rnd_82mm_Mo_shells\", 3];"]}],"problems":"The unit will fire a burst even if the **rounds** parameter is 0 or a negative number.","see_also":["doArtilleryFire","getArtilleryAmmo","getArtilleryETA","enableEngineArtillery","getArtilleryComputerSettings","shownArtilleryComputer","inRangeOfArtillery","fire","doFire","commandFire","canFire","fireAtTarget","forceWeaponFire","commandSuppressiveFire","doSuppressiveFire","isManualFire"],"notes":[{"user":"ansin11","date":"2020-04-18T14:28:00Z","text":"This command can not fire bursts consisting of more rounds than the given magazine type holds, even if there are several magazines of the same type available. The fire mission issued by this command ends once the artillery unit has to reload.\n\n**Example:**\n\nThe Mk6 Mortar comes with four \"8Rnd_82mm_Mo_shells\" magazines, giving it a total of 32 HE shells. However, `_mortar commandArtilleryFire [_somePos, \"8Rnd_82mm_Mo_shells\", 10];` will only fire 8 rounds instead of 10.\n\nSimilarly, ...\n\n```sqf\n_mortar commandArtilleryFire [_somePos, \"8Rnd_82mm_Mo_shells\", 7]; // First burst\nsleep 20; // Wait until first burst has been fired\n_mortar commandArtilleryFire [_somePos, \"8Rnd_82mm_Mo_shells\", 2]; // Second burst\n```\n\n... will only fire 8 rounds total instead of 9; the second round of the second burst is never fired because the artillery unit has to reload after the first round of the second burst."}]},{"name":"commandChat","title":"commandChat","type":"command","url":"https://community.bistudio.com/wiki/commandChat","revid":376776,"updated":"2025-11-17T00:05:50Z","groups":["Radio and Chat","Sounds"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Types text to the command radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec). Use clearRadio to clear chat history\n\n> [!IMPORTANT]\n> The unit must have an assigned radio item (such as ***\"ItemRadio\"***) to see or transmit the messages. A radio item must have the property `simulation = \"ItemRadio\";` in its CfgWeapons config.","syntaxes":[{"syntax":"unit commandChat chatText","params":[{"name":"unit","type":"Object","description":"unit transmitting message","type_expr":"Object"},{"name":"chatText","type":"String","description":"message to transmit","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"chatText"}},{"syntax":"[side, identity] commandChat chatText","params":[{"name":"side","type":"Side","description":"side to which the message will be seen","type_expr":"Side"},{"name":"identity","type":"String","description":"class name of one of the identities in CfgHQIdentities. Possible identities in Arma 3 are:\n\n- \"Base\"\n- \"HQ\"\n- \"PAPA_BEAR\"\n- \"AirBase\"\n- \"BLU\"\n- \"OPF\"\n- \"IND\"\n- \"IND_G\"","type_expr":"String"},{"name":"chatText","type":"String","description":"message to transmit","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"[side, identity]"},"right":{"text":"chatText"}}],"examples":[{"code":["_soldierOne commandChat \"Show this text\";"]},{"code":["[playerSide, \"HQ\"] commandChat \"Do this! That's an order!\";"]},{"code":["driver vehicle player sideChat \"sideChat\";\ndriver vehicle player globalChat \"globalChat\";\ndriver vehicle player groupChat \"groupChat\";\nvehicle player vehicleChat \"vehicleChat\";\ndriver vehicle player commandChat \"commandChat\";\ndriver vehicle player customChat [1, \"customChat\"];\nsystemChat \"systemChat\";"]}],"see_also":["globalChat","groupChat","vehicleChat","sideChat","customChat","systemChat","commandRadio"]},{"name":"commander","title":"commander","type":"command","url":"https://community.bistudio.com/wiki/commander","revid":363370,"updated":"2024-03-28T10:39:29Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"In Operation Flashpoint it returns the commander of a vehicle. Since Armed Assault it returns the primary observer. The commander of a vehicle can be found with effectiveCommander.","syntaxes":[{"syntax":"commander vehicle","params":[{"name":"vehicle","type":"Object","description":"vehicle","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"the unit sitting in the commander place is returned. If vehicle is not a vehicle but a person, the person is returned."},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["moveOut commander _tank;"]},{"text":"Detect if player is in commander turret of a vehicle:\n\n```sqf\n_isVehicleCommander = player isEqualTo commander objectParent player;\n```","code":["_isVehicleCommander = player isEqualTo commander objectParent player;"]}],"see_also":["driver","gunner","crew","currentPilot","effectiveCommander"]},{"name":"commandFire","title":"commandFire","type":"command","url":"https://community.bistudio.com/wiki/commandFire","revid":379286,"updated":"2026-10-30T23:46:18Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Order the given unit to fire on the given target (via the radio).\nIf the target is objNull, the unit is ordered to fire on its current target (set with doTarget or commandTarget).","syntaxes":[{"syntax":"unit commandFire target","params":[{"name":"unit","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"target"}}],"examples":[{"code":["_ESoldier1 commandFire _WSoldier1;"]}],"see_also":["fire","doFire","canFire","fireAtTarget","forceWeaponFire","commandArtilleryFire","commandSuppressiveFire","doArtilleryFire","doSuppressiveFire","isManualFire"]},{"name":"commandFollow","title":"commandFollow","type":"command","url":"https://community.bistudio.com/wiki/commandFollow","revid":370900,"updated":"2025-02-21T10:44:32Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local"},"description":"Order the given unit(s) to follow another from his own group (via radio).\nIt can also be used to resume unit formation after e.g doStop.","syntaxes":[{"syntax":"unit commandFollow unitLead","params":[{"name":"unit","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"unitLead","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"unitLead"}}],"examples":[{"code":["_soldier1 commandFollow _soldier2;"]},{"code":["(units group _leader - [_leader]) commandFollow _leader; // returns all the units (but the leader) to formation"]}],"see_also":["doFollow","formationLeader","formLeader","isFormationLeader","leader","selectLeader","setLeader"]},{"name":"commandFSM","title":"commandFSM","type":"command","url":"https://community.bistudio.com/wiki/commandFSM","revid":377186,"updated":"2026-01-01T10:51:44Z","groups":["Unit Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Orders a unit to process command defined by FSM file (via the radio).","syntaxes":[{"syntax":"unitName commandFSM [fsmFile, position, target]","params":[{"name":"unitName","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"fsmFile","type":"String","type_expr":"String"},{"name":"position","type":"Position","type_expr":"Position"},{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"[fsmFile, position, target]"}}],"examples":[{"code":["_soldierOne commandFSM [\"move.fsm\", position player, player];"]}],"see_also":["FSM","FSM Editor Manual","execFSM","completedFSM","doFSM","getFSMVariable","setFSMVariable"]},{"name":"commandGetOut","title":"commandGetOut","type":"command","url":"https://community.bistudio.com/wiki/commandGetOut","revid":364242,"updated":"2024-05-06T09:38:17Z","groups":["Unit Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Orders one or multiple units to get out from the vehicle (via the radio). Same as doGetOut with latter being silent.\n\n> [!NOTE]\n> - Works for both AI and player entities\n> - AI unit gets back in - unless is under player command or combined with other sqf commands (orderGetIn false, allowGetIn false or leaveVehicle)\n> - Ignores vehicle's lock state - unlike action \"Eject\" and moveOut\n> - AI waits for execution until vehicle has stopped/is no longer flying (unclear if any timeout exists for order to be discarded) - unlike action \"Eject\" and moveOut\n> - Plays the vehicle's position's get out animation (same as action \"Eject\") - unlike moveOut\n> - When execute for multiple units, it waits till the action is completed, before the next to take his turn (same as action \"Eject\") - unlike moveOut\n> - AI gets back into formation afterwards\n> - Works only on alive units - unlike action \"Eject\" (one after another) or moveOut (instantly)\n> - Does not work on unconscious units - unless the AI is under player command. Unlike moveOut or action \"Eject\" (but one after another)","syntaxes":[{"syntax":"commandGetOut unit(s)","params":[{"name":"unit(s)","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit(s)"}}],"examples":[{"code":["commandGetOut _unitOne;"]},{"code":["commandGetOut [_unitOne,_unitTwo];"]}],"multiplayer":"This command is only effective when used on local units. When used on a remote unit, this command will create radio dialogue on the machine the unit is local to, but the unit will not leave the vehicle.","see_also":["doGetOut","moveOut","leaveVehicle"]},{"name":"commandingMenu","title":"commandingMenu","type":"command","url":"https://community.bistudio.com/wiki/commandingMenu","revid":337562,"updated":"2023-02-10T01:04:40Z","groups":["Interaction"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the name of the topmost commanding menu or \"\" if the menu is closed. For action menu visibility check see isActionMenuVisible. See Notes for Arma 2/Arma 3 structure.","syntaxes":[{"syntax":"commandingMenu","params":[],"returns":{"type":"String","type_expr":"String"},"form":"nullary"}],"examples":[{"code":["waitUntil { sleep 0.1; commandingMenu == \"RscStatus\" };\nhint \"Press 4, I'm bleeding !\";"]},{"code":["if (commandingMenu != \"\") then { hint \"Command menu is opened\" };"]}],"see_also":["showCommandingMenu","isActionMenuVisible","BIS_fnc_addCommMenuItem","BIS_fnc_removeCommMenuItem"],"notes":[{"user":"Lou Montana","date":"2009-07-15T12:21:00Z","text":"Arma 2 possible values are:\n\n- **\"\"** - means the menu is closed\n- **\"RscMainMenu\"** - Main menu, by pressing backspace\n  - **\"RscMoveHigh\"** - Move menu (1)\n  - **\"#WATCH\"** - Watch menu (2)\n    - **\"#WATCH0\"** - Watch menu - next page (2-0)\n  - **\"RscWatchDir\"** - Engage menu (3)\n    - **\"RscWatchMoreDir\"** - Engage menu - watch a direction (3-8)\n  - **\"#GET_IN\"** - Mount menu (4)\n  - **\"RscStatus\"** - Status menu (5)\n    - **\"RscCallSupport\"** - Mount menu - call support (5-1)\n  - **\"#ACTION\"** - Action menu (6)\n  - **\"RscCombatMode\"** - Combat mode menu (7)\n  - **\"RscFormations\"** - Formation menu(8)\n  - **\"RscTeam\"** - Team menu (9)\n    - **\"RscSelectTeam\"** - Team menu - select team (0-5)\n  - **\"RscReply\"** - Reply menu (0)\n    - **\"#User:BIS_Menu_GroupCommunication\"** - Communication menu (0-8)\n    - **\"#CUSTOM_RADIO\"** - Custom sounds menu (0-9)\n  - **\"RscRadio\"** - Radio menu (0-0)\n- **\"RscGroupRootMenu\"** - \"simplified\" menu"},{"user":"Lou Montana","date":"2021-08-02T07:42:00Z","text":"Arma 3 possible values (thanks to **RCA3**):\n\n- **\"\"** - means the menu is closed\n- **\"RscGroupRootMenu\"** Group menu root\n  - **\"RscMenuMove\"** (1) Move menu\n  - **\"#WATCH\"** (2) Watch menu\n    - **\"#WATCH1\"** (2-0) Watch menu - next page\n  - **\"RscMenuEngage\"** (3) Engage menu\n    - **\"RscMenuWatchDir\"** (3-8) Engage menu - watch a direction\n  - **\"#GET_IN\"** (4) Mount menu\n  - **\"RscMenuStatus\"** (5) Status menu\n    - **\"RscCallSupport\"** (5-1) Status menu - call support\n  - **\"#ACTION\"** (6) Action menu Action menu\n  - **\"RscMenuCombatMode\"** (7) Combat mode menu\n  - **\"RscMenuFormations\"** (8) Formation menu\n  - **\"RscMenuTeam\"** (9) Team menu\n    - **\"RscMenuSelectTeam\"** (9-9) Team menu - select team\n  - **\"RscMenuReply\"** (0) Reply menu\n    - **\"#User:BIS_fnc_addCommMenuItem_menu\"** (0-8) BIS Supports\n    - **\"#CUSTOM_RADIO\"** (0-9) Custom radio\n    - **\"RscRadio\"** (0-0) Radio menu\n  - **\"RscMainMenu\"** (Backspace) Main menu"}]},{"name":"commandMove","title":"commandMove","type":"command","url":"https://community.bistudio.com/wiki/commandMove","revid":377521,"updated":"2026-01-02T06:52:09Z","groups":["Groups"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Order the given unit(s) to move to the given location (via the radio). Exactly the same as doMove, except this command displays a radio message. The command will not put a visible waypoint marker unlike when move command is given via commanding menu.","syntaxes":[{"syntax":"unitName commandMove position","params":[{"name":"unitName","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"position","type":"Position","type_expr":"Position"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"position"}}],"examples":[{"code":["_soldier1 commandMove getMarkerPos \"Marker1\";"]},{"code":["[_soldier1, _soldier2] commandMove getMarkerPos \"Marker1\";"]}],"multiplayer":"When used on a remote unit, this command will still create a radio message on the remote machine but the unit will not move.","see_also":["doMove","setDestination","moveTo","move","addWaypoint"]},{"name":"commandRadio","title":"commandRadio","type":"command","url":"https://community.bistudio.com/wiki/commandRadio","revid":325178,"updated":"2022-07-01T14:34:30Z","groups":["Radio and Chat","Sounds"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sends the audio message to the command radio channel. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec).\n\n> [!IMPORTANT]\n> The unit must have an assigned radio item (such as ***\"ItemRadio\"***) to see or transmit the messages.\n> A radio item must have the property `simulation = \"ItemRadio\";` in its CfgWeapons config.\n\n> [!NOTE]\n> When transmitting unit gets killed, transmission will be interrupted. However when receiving unit gets killed, the transmission continues to play.","syntaxes":[{"syntax":"unit commandRadio radioName","params":[{"name":"unit","type":"Object","description":"unit to transmit","type_expr":"Object"},{"name":"radioName","type":"String","description":"class name from CfgRadio","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"radioName"}},{"syntax":"[side, identity] commandRadio radioName","params":[{"name":"side","type":"Side","description":"side to which the transmission will be played","type_expr":"Side"},{"name":"identity","type":"String","description":"class name of one of the identities in CfgHQIdentities. Possible identities in Arma 3 are:\n\n- \"Base\"\n- \"HQ\"\n- \"PAPA_BEAR\"\n- \"AirBase\"\n- \"BLU\"\n- \"OPF\"\n- \"IND\"\n- \"IND_G\"","type_expr":"String"},{"name":"radioName","type":"String","description":"class name from CfgRadio","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"[side, identity]"},"right":{"text":"radioName"}}],"examples":[{"code":["_soldierOne commandRadio \"messageOne\";"]},{"code":["player commandRadio configName selectRandom (\"true\" configClasses (configFile >> \"CfgRadio\"));"]},{"code":["[west, \"Base\"] commandRadio configName selectRandom (\"true\" configClasses (configFile >> \"CfgRadio\"));"]}],"see_also":["sideRadio","groupRadio","customRadio","vehicleRadio","globalRadio","directSay","commandChat"],"notes":[{"user":"Nikita320106","date":"2010-06-24T08:55:00Z","text":"*example:*\n\n```sqf\n_unit commandRadio \"SentCmdHide\";\n```\n\nradio command from CA_Dubbing config should work"},{"user":"Killzone_Kid","date":"2016-12-03T21:33:00Z","text":"To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial), prefix the full filename including file extension with #.\nFor example if there is a custom user sound file called `MySound.ogg`, to play it on the radio use:\n\n```sqf\nplayer commandRadio \"#MySound.ogg\";\n```"}]},{"name":"commandStop","title":"commandStop","type":"command","url":"https://community.bistudio.com/wiki/commandStop","revid":318579,"updated":"2022-05-13T09:21:07Z","groups":["Groups"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Order the given unit(s) to stop via radio. A stop command will never finish, the unit(s) will never be ready.","syntaxes":[{"syntax":"commandStop target","params":[{"name":"target","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"target"}}],"examples":[{"code":["commandStop _soldier1;"]},{"code":["commandStop [_soldier1, _soldier2];"]},{"code":["commandStop (units player);"]}],"see_also":["doStop","stopped","stop"],"notes":[{"user":"Ceeeb","text":"In **Armed Assault v1.14**, this command will not stop a unit that has been given a move order by means of selecting the unit, then clicking on the in game map or ground."}]},{"name":"commandSuppressiveFire","title":"commandSuppressiveFire","type":"command","url":"https://community.bistudio.com/wiki/commandSuppressiveFire","revid":377828,"updated":"2026-01-03T04:28:29Z","groups":["Unit Control"],"status":"ok","games":{"arma3":"1.60"},"since":"arma3 1.60","arma3_since":"1.60","locality":{"argument":"local","effect":"global"},"description":"Orders the given unit or a group of units to suppress the given position or target (with radio messages, see doSuppressiveFire if you do not want messages).\n\n- When an Array of units is passed as param, only units from the same Group as the first unit in array are considered.\n- The unit (units) starts firing at the given target or position random amount of shots (exact formula unknown, but seems to depend on amount of ammo unit has) after which it stops.\n- currentCommand shows `\"Suppress\"` and there is no way of stopping unit before it completes random amount of rounds.\n- If a position is passed as target param, it stays fixed.\n- If an object is passed as target param, it depends on what kind of object:\n  - If it is considered a proper target by the unit, it is tracked by the unit dynamically.\n  - If it is not, the position gets obtained via getPosWorld, which could be different from PositionASL of the object, and it is fixed even if the target is able to change position later.","syntaxes":[{"syntax":"unit commandSuppressiveFire target","params":[{"name":"unit","type":"Object or Array of Objects","description":"a single unit or array of units","type_expr":"Object | Array<Object>"},{"name":"target","type":"Object or PositionASL","description":"actual target or position","type_expr":"Object | PositionASL"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"target"}}],"examples":[{"code":["_soldier commandSuppressiveFire getPosWorld _enemy;"]},{"code":["_soldier commandSuppressiveFire cursorTarget;"]}],"see_also":["fire","doFire","commandFire","canFire","fireAtTarget","forceWeaponFire","commandArtilleryFire","doArtilleryFire","doSuppressiveFire","isManualFire","suppressFor"]},{"name":"commandTarget","title":"commandTarget","type":"command","url":"https://community.bistudio.com/wiki/commandTarget","revid":379215,"updated":"2026-10-30T22:18:05Z","groups":["Groups"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Order the given unit(s) to target the given target (via the radio). Command given to the player, puts a red square with words Target and Distance on player's HUD at target location. If player in vehicle and has radar facilities, it also adds target marker to the radar.","syntaxes":[{"syntax":"unit commandTarget target","params":[{"name":"unit","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"target"}}],"examples":[{"code":["_ESoldier1 commandTarget _WSoldier1;"]},{"code":["[_ESoldier1, _ESoldier2] commandTarget _WSoldier1;"]}],"multiplayer":"This command is only effective when used on local units. When used on a remote unit, this command will create radio dialogue on the machine the unit is local to, but the unit will not target the target.","see_also":["assignedTarget","doTarget"]},{"name":"commandWatch","title":"commandWatch","type":"command","url":"https://community.bistudio.com/wiki/commandWatch","revid":378095,"updated":"2026-02-12T23:52:45Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Orders the unit(s) to watch the given position or target (via the radio). Use objNull as the target to order a unit to stop watching a position/target.","syntaxes":[{"syntax":"units commandWatch target","params":[{"name":"units","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"target","type":"Position or Object","type_expr":"Position | Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"units"},"right":{"text":"target"}}],"examples":[{"code":["_soldierOne commandWatch markerPos \"MarkerMoveOne\";"]},{"code":["[s1, s2] commandWatch player;"]}],"multiplayer":"This command is only effective when used on local units.\nWhen used on a remote unit, this command will create radio dialogue on the machine the unit is local to, but the unit will not watch the target object/position.","see_also":["doWatch","lookAt","glanceAt"]},{"name":"comment","title":"comment","type":"command","url":"https://community.bistudio.com/wiki/comment","revid":363597,"updated":"2024-04-07T18:56:13Z","groups":["Strings"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Defines a comment. See SQF Syntax - Comments to learn more about comments.\n\n> [!WARNING]\n> This command is evaluated during execution, and as such is infinitely slower than other SQF comment methods (`// comment` or `/* comment */`) which get preprocessed and do not exist at runtime).\n> See SQF Syntax for additional documentation on comments.\n\n> [!NOTE]\n> This command is only used to place comments in unpreprocessed codes, such as trigger On Activation field, object init field, etc.\n> Alternatively, one can use a plain string followed by a semicolon as a way to comment; e.g `\"Some comment\";`.","syntaxes":[{"syntax":"comment text","params":[{"name":"text","type":"String","description":"the comment","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"text"}}],"examples":[{"text":"In a preprocessed SQF script (e.g. when doing `execVM \"myScript.sqf\"`)\n\n```sqf\ncomment \"This is a commented line\";        // bad\n\"This is a commented line\";                // slightly better\n// This is a commented line                // perfect\n```","code":["comment \"This is a commented line\";\t\t// bad\n\"This is a commented line\";\t\t\t\t// slightly better\n// This is a commented line\t\t\t\t// perfect"]},{"text":"In an object init field (in editor):\n\n```sqf\ncomment \"This comment works\";\n\"This comment works too\";\n// This doesn't work\n/* This doesn't work either */\n```","code":["comment \"This comment works\";\n\"This comment works too\";\n// This doesn't work\n/* This doesn't work either */"]}],"see_also":["Control Structures"],"notes":[{"user":"Tom_48_97","date":"2009-09-12T19:50:00Z","text":"Like Armed Assault, you can not use brackets to make a multi-lines comment. But, in a sqf file, you can make a comment as follow :\n\n```sqf\ncomment \"\n first line\n seconde line\";\n```"}]},{"name":"commitOverlay","title":"commitOverlay","type":"command","url":"https://community.bistudio.com/wiki/commitOverlay","revid":376346,"updated":"2025-10-07T17:02:42Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Commit the current overlay.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"commitOverlay map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"map"}}],"examples":[{"code":["commitOverlay _map;"]}]},{"name":"compatibleItems","title":"compatibleItems","type":"command","url":"https://community.bistudio.com/wiki/compatibleItems","revid":376857,"updated":"2025-12-08T20:38:25Z","groups":["Weapons"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns all items (attachments) that can be mounted on the given weapon.","syntaxes":[{"syntax":"compatibleItems weapon","params":[{"name":"weapon","type":"String","description":"weapon class name","type_expr":"String"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"compatible attachments"},"form":"unary","right":{"text":"weapon"}},{"syntax":"compatibleItems [weapon, slot]","params":[{"name":"weapon","type":"String","description":"weapon class name","type_expr":"String"},{"name":"slot","type":"String","description":"class name of the slot (defined under **WeaponSlotsInfo** class in weapon config), for example:\n\n- \"CowsSlot\" for optics\n- \"MuzzleSlot\" for silencers\n- \"PointerSlot\" for laser pointers and flashlights\n- \"UnderBarrelSlot\" for bipods","type_expr":"String"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"compatible attachments"},"form":"unary","right":{"text":"[weapon, slot]"}}],"examples":[{"code":["compatibleItems \"arifle_Katiba_GL_F\"; // [\"optic_Nightstalker\",\"optic_tws\",\"optic_tws_mg\",\"optic_NVS\", ...]"]},{"code":["compatibleItems [\"arifle_Katiba_GL_F\", \"PointerSlot\"]; // [\"acc_flashlight\",\"acc_flashlight_broken\",\"acc_pointer_IR\", ...]"]}],"see_also":["compatibleWeapons","compatibleMagazines","BIS_fnc_compatibleItems","canAdd"]},{"name":"compatibleMagazines","title":"compatibleMagazines","type":"command","url":"https://community.bistudio.com/wiki/compatibleMagazines","revid":376900,"updated":"2025-12-20T16:40:46Z","groups":["Weapons"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns all magazines that can be loaded in the given weapon or all magazines containing the provided ammo. No compatible magazines are returned for submunition or missiles.","syntaxes":[{"syntax":"compatibleMagazines weaponOrAmmo","params":[{"name":"weaponOrAmmo","type":"String","description":"weapon class name or Arma 3 v2.22 ammo class name","type_expr":"String"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"all magazines that can be loaded in any muzzle of the given weapon or magazines containing given ammo.","text":"Array of Strings - all magazines that can be loaded in **any muzzle** of the given weapon or magazines containing given ammo."},"form":"unary","right":{"text":"weaponOrAmmo"}},{"syntax":"compatibleMagazines [weapon, muzzle]","params":[{"name":"weapon","type":"String","description":"weapon class name","type_expr":"String"},{"name":"muzzle","type":"String","description":"muzzle name (\"this\" is supported for primary muzzle)","type_expr":"String"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"all magazines that can be loaded in the given muzzle of the given weapon."},"form":"unary","right":{"text":"[weapon, muzzle]"}}],"examples":[{"code":["compatibleMagazines \"arifle_Katiba_GL_F\";"]},{"code":["compatibleMagazines [\"arifle_Katiba_GL_F\", \"this\"];"]},{"code":["compatibleMagazines [\"arifle_Katiba_GL_F\", \"EGLM\"];"]},{"code":["compatibleMagazines \"B_65x39_Caseless_green\"; // [\"30Rnd_65x39_caseless_green\", \"30Rnd_65x39_caseless_green_mag_Tracer\"]"]}],"see_also":["compatibleWeapons","compatibleItems","BIS_fnc_compatibleMagazines","canAdd"]},{"name":"compatibleWeapons","title":"compatibleWeapons","type":"command","url":"https://community.bistudio.com/wiki/compatibleWeapons","revid":378898,"updated":"2026-08-11T14:56:33Z","groups":["Weapons"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","description":"Returns all compatible weapons for given weapon item, weapon magazine or weapon slot.","syntaxes":[{"syntax":"compatibleWeapons name","params":[{"name":"name","type":"String","description":"weapon item (see compatibleItems), weapon magazine (see compatibleMagazines) or weapon slot (defined under **WeaponSlotsInfo** class in weapon config), for example:\n\n- \"CowsSlot\" for optics\n- \"MuzzleSlot\" for silencers\n- \"PointerSlot\" for laser pointers and flashlights\n- \"UnderBarrelSlot\" for bipods","type_expr":"String"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"in format:\n- [weapon, slot] - for weapon items - [weapon, muzzle] - for weapon magazines (primary muzzle returned as \"this\") - [weapon, slot] - for weapon slot","text":"Array of Arrays in format:\n\n- [weapon, slot] - for weapon items\n- [weapon, muzzle] - for weapon magazines (primary muzzle returned as \"this\")\n- [weapon, slot] - for weapon slot"},"form":"unary","right":{"text":"name"}}],"examples":[{"code":["compatibleWeapons \"LaserBatteries\"; // [[\"Laserdesignator_pilotCamera\",\"this\"],[\"Laserdesignator_mounted\",\"this\"],...]"]},{"code":["compatibleWeapons \"PointerSlot\"; // [[\"arifle_MX_ACO_pointer_F\",\"PointerSlot\"],[\"arifle_TRG21_F\",\"PointerSlot\"],...]"]},{"code":["compatibleWeapons \"1Rnd_HE_Grenade_shell\"; // [[\"arifle_Katiba_GL_F\",\"EGLM\"],[\"arifle_Katiba_GL_ACO_F\",\"EGLM\"],...]"]},{"code":["compatibleWeapons \"bipod_01_F_blk\"; // [[\"arifle_MX_ACO_pointer_F\",\"UnderBarrelSlot\"],[\"arifle_MX_F\",\"UnderBarrelSlot\"],...]"]}],"see_also":["compatibleItems","compatibleMagazines","BIS_fnc_compatibleItems","canAdd"]},{"name":"compile","title":"compile","type":"command","url":"https://community.bistudio.com/wiki/compile","revid":321043,"updated":"2022-05-13T12:05:32Z","groups":["Strings"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Compiles String expression into Code.","syntaxes":[{"syntax":"compile expression","params":[{"name":"expression","type":"String","description":"expression to be compiled","type_expr":"String"}],"returns":{"type":"Code","type_expr":"Code","description":"compiled expression"},"form":"unary","right":{"text":"expression"}}],"examples":[{"code":["_string = \"a = a + 1\";\n_code = compile _string;\ncall _code;"]},{"code":["hint str compile \"a = b\";\n// result: { a = b }"]}],"see_also":["call","spawn","compileFinal","compileScript","parseSimpleArray","isFinal"]},{"name":"compileFinal","title":"compileFinal","type":"command","url":"https://community.bistudio.com/wiki/compileFinal","revid":378946,"updated":"2026-08-29T21:45:18Z","groups":["Strings"],"status":"ok","games":{"arma3":"0.56"},"since":"arma3 0.56","arma3_since":"0.56","description":"Compiles an expression / takes an existing HashMap and makes it final, preventing it from being modified or overwritten (by = assignation, publicVariable, set or any other command).\n\n> [!NOTE]\n> This feature is only available in the retail version of Arma 3.","syntaxes":[{"syntax":"compileFinal expression","params":[{"name":"expression","type":"String, Arma 3 v2.14 Code or HashMap","type_expr":"String | Code | HashMap"}],"returns":{"type":"Code or HashMap","type_expr":"Code | HashMap"},"form":"unary","right":{"text":"expression"}}],"examples":[{"text":"```sqf\nMyCode = compileFinal \"a = a + 1\";\ncall MyCode;\n\n// repeated compile won't have any effect\nMyCode = compileFinal \"a = a + 2\";\n```","code":["MyCode = compileFinal \"a = a + 1\";\ncall MyCode;\n \n// repeated compile won't have any effect\nMyCode = compileFinal \"a = a + 2\";"]},{"code":["// duplicate code will be final as well\nMyDuplicateCode = MyCode;\n\n// an alternative is to copy str'd code (since Arma 3 v2.02)\nMyNonFinalCopy = compile toString MyCode;"]},{"code":["// since Arma 3 v2.14\nReadonlyCode = compileFinal { systemChat \"Hello World!\"; };\nReadonlyHashMap = compileFinal _myHashMap;"]}],"see_also":["compile","compileScript","isFinal","call","spawn"],"notes":[{"user":"AgentRev01","date":"2013-08-15T00:35:00Z","text":"When broadcasting a compileFinal'ed variable using publicVariable or its variants, the variable also becomes final on the other client(s) and/or the server.\nAlso, compileFinal does not prevent event handlers from being removed or overwritten."},{"user":"Nelis75733126","date":"2017-05-27T11:58:00Z","text":"in Arma 3 v1.70.141838, compileFinal also works for profileNamespace and uiNamespace. But be careful with that."},{"user":"Hypoxic125","date":"2024-06-22T23:41:27Z","text":"Making a base class read only using HashMapObjects\n\n```sqf\nClass_Dog = compileFinal createHashMapObject [\n    // Properties\n    [\"#type\", \"Dog\"],\n    [\"owner\", objNull],\n    [\"legs\", 4],\n    [\"health\", 100],\n    [\"vehicleclass\", \"Dog_Base_F\"],\n    [\"vehicle\", objNull],\n\n    // Constructor\n    [\"#create\", {\n        params [[\"_owner\", objNull], [\"_vehicle\", objNull]];\n\n        if ([_owner, _vehicle] findIf {isNull _x} != -1) exitWith {};\n\n        _self set [\"owner\", _owner];\n        _self set [\"vehicle\", _vehicle]\n    }]\n];\n\nNewDog = createHashMapObject [\n    [[\"#base\", Class_Dog]],\n    [player_1, createVehicle [Class_Dog get \"vehicleclass\", [0,0,0], 0, [], \"NONE\"]]\n];\n\nNewDog set [\"owner\", player_2];\nNewDog get \"owner\";                 // returns player_2\n\nClass_Dog set [\"owner\", player_1];  // Error: Read Only\n```"}]},{"name":"compileScript","title":"compileScript","type":"command","url":"https://community.bistudio.com/wiki/compileScript","revid":365141,"updated":"2024-07-26T16:44:13Z","groups":["System"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"This command is an alias for `compile(Final) (prefixHeader + preprocessFileLineNumbers path)`. See description of preprocessFileLineNumbers for more details.\nIn addition, this command can also compile SQF Bytecode files, which can reduce compilation time. If both a .sqf file and .sqfc file are pressing in the the path, this command will automatically compile the .sqfc file.","syntaxes":[{"syntax":"compileScript [path, final, prefixHeader]","params":[{"name":"path","type":"String","description":"path to script file","type_expr":"String"},{"name":"final","type":"Boolean","optional":true,"default":"false","description":"compile final, see compileFinal","type_expr":"Boolean","text":"final: Boolean - (Optional, default false) compile final, see compileFinal"},{"name":"prefixHeader","type":"String","optional":true,"default":"\"\"","description":"value added at the beginning of the file","type_expr":"String","text":"prefixHeader: String - (Optional, default \"\") value added at the beginning of the file"}],"returns":{"type":"Code","type_expr":"Code"},"form":"unary","right":{"text":"[path, final, prefixHeader]"}}],"examples":[{"text":"```sqf\ncompileScript [\"a3\\props_f_enoch\\military\\equipment\\scripts\\meteo.sqf\"];\n// has the same functionality as\ncompile preprocessFileLineNumbers \"a3\\props_f_enoch\\military\\equipment\\scripts\\meteo.sqf\";\n```","code":["compileScript [\"a3\\props_f_enoch\\military\\equipment\\scripts\\meteo.sqf\"];\n// has the same functionality as \ncompile preprocessFileLineNumbers \"a3\\props_f_enoch\\military\\equipment\\scripts\\meteo.sqf\";"]}],"see_also":["compile","compileFinal","preprocessFileLineNumbers","preprocessFile","call","spawn"]},{"name":"completedFSM","title":"completedFSM","type":"command","url":"https://community.bistudio.com/wiki/completedFSM","revid":310814,"updated":"2022-05-07T20:23:36Z","groups":["System"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Checks whether the given FSM is completed. The FSM handle is the number returned by the execFSM command.","syntaxes":[{"syntax":"completedFSM fsmHandle","params":[{"name":"fsmHandle","type":"Number","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"fsmHandle"}}],"examples":[{"code":["_completed = completedFSM _fsmHandle;"]}],"see_also":["FSM","commandFSM","doFSM","execFSM","getFSMVariable","setFSMVariable"]},{"name":"composeText","title":"composeText","type":"command","url":"https://community.bistudio.com/wiki/composeText","revid":336896,"updated":"2023-01-04T16:43:56Z","groups":["Strings","Structured Text"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Creates a Structured Text by joining the given structured or plain text arguments.","syntaxes":[{"syntax":"composeText arguments","params":[{"name":"arguments","type":"Array of String and/or Structured Text","description":"use Structured Text where necessary (see Example 2)","type_expr":"Array<String | Structured Text>"}],"returns":{"type":"Structured Text","type_expr":"Structured Text"},"form":"unary","right":{"text":"arguments"}}],"examples":[{"code":["hint composeText [\"Image: \", image \"\\a3\\Data_f\\Flags\\flag_Altis_co.paa\"];"]},{"text":"```sqf\nhint composeText [\"line1\", \"<br/>\", \"line2\"];        // result displayed in one line\nhint composeText [\"line1\", lineBreak, \"line2\"];    // result displayed in two lines\n```","code":["hint composeText [\"line1\", \"<br/>\", \"line2\"];\t\t// result displayed in one line\nhint composeText [\"line1\", lineBreak, \"line2\"];\t// result displayed in two lines"]}],"see_also":["Structured Text","formatText","image","lineBreak","parseText","text","setAttributes"]},{"name":"config greater greater name","operator":">>","title":"config greater greater name","type":"command","url":"https://community.bistudio.com/wiki/config_greater_greater_name","revid":363978,"updated":"2024-04-29T22:51:43Z","groups":["Config"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns config entry with given name (alias of a / b, slightly faster but with lower precedence)","syntaxes":[{"syntax":"config >> name","params":[{"name":"config","type":"Config","type_expr":"Config"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Config","type_expr":"Config","description":"config entry"},"form":"binary","left":{"text":"config"},"right":{"text":"name"}}],"examples":[{"code":["configFile >> \"CfgVehicles\";"]}],"see_also":["configFile","a / b","configName","count","getText","isArray","isClass","isNumber","isText","select","configClasses"]},{"name":"configClasses","title":"configClasses","type":"command","url":"https://community.bistudio.com/wiki/configClasses","revid":378371,"updated":"2026-04-03T16:49:12Z","groups":["Config"],"status":"ok","games":{"arma3":"1.24"},"since":"arma3 1.24","arma3_since":"1.24","description":"Returns an array of config entries which meet criteria in condition code. Command iterates through all available config sub classes of the given config class. Current looked at config is stored in _x variable (similar to alternative count command implementation). Condition has to return true in order for the looked at config to be added to the resulting array. Slightly faster than configProperties, but doesn't account for config properties or inherited entries.\n\n> [!IMPORTANT]\n> - The condition code passed to configClasses should only be used for **simple filter expressions** and nothing more\n> - Do not use `\"isClass _x\"` in the condition. The engine does this check already\n> - Arma 3 v2.02 brought specific engine optimisations for the following conditions:\n>   - `\"true\"`\n>   - `\"getNumber (_x >> 'scope') > 0\"`","syntaxes":[{"syntax":"condition configClasses config","params":[{"name":"condition","type":"String","type_expr":"String"},{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Array of Configs","type_expr":"Array<Config>"},"form":"binary","left":{"text":"condition"},"right":{"text":"config"}},{"syntax":"configClasses [config, depth, includeInherited, allSubclasses, classNames]","since":"arma3 2.22","params":[{"name":"config","type":"Config","description":"target config","type_expr":"Config"},{"name":"depth","type":"Number","description":"how many levels of subclasses to go deep","type_expr":"Number"},{"name":"includeInherited","type":"Boolean","description":"true to look through inherited classes","type_expr":"Boolean"},{"name":"allSubclasses","type":"Boolean","description":"true to return all subclasses, false - to return only the last tier.","type_expr":"Boolean"},{"name":"classNames","type":"Boolean","optional":true,"default":"false","description":"when true class names Strings are returned, when false - Configs are returned.","type_expr":"Boolean","text":"classNames: Boolean - (Optional, default: false) when true class names Strings are returned, when false - Configs are returned."}],"returns":{"type":"Array of Configs or Strings","type_expr":"Array<Config | String>","description":"which represent class names.","text":"Array of Configs or Strings, which represent class names."},"form":"unary","right":{"text":"[config, depth, includeInherited, allSubclasses, classNames]"}}],"examples":[{"text":"collect all CfgVehicles configs:\n\n```sqf\n_configs = \"true\" configClasses (configFile >> \"CfgVehicles\");\n```","code":["_configs = \"true\" configClasses (configFile >> \"CfgVehicles\");"]},{"text":"Return all classes that can transport 10 and more soldiers:\n\n```sqf\n_transporters = \"getNumber (_x >> 'transportSoldier') >= 10\" configClasses (configFile >> \"CfgVehicles\");\n```","code":["_transporters = \"getNumber (_x >> 'transportSoldier') >= 10\" configClasses (configFile >> \"CfgVehicles\");"]},{"text":"Return all classes that inherit from 'RscText':\n\n```sqf\nhint str (\"inheritsFrom _x == (configFile >> 'RscText')\" configClasses configFile);\n```","code":["hint str (\"inheritsFrom _x == (configFile >> 'RscText')\" configClasses configFile);"]},{"text":"Return children:\n\n```sqf\nconfigClasses [configFile >> \"CfgGroups\", 0, true, true, true]\n//Returns [\"West\",\"East\",\"Indep\",\"Empty\"]\n```","code":["configClasses [configFile >> \"CfgGroups\", 0, true, true, true]\n//Returns [\"West\",\"East\",\"Indep\",\"Empty\"]"]}],"see_also":["Config","configFile","missionConfigFile","configProperties","configHierarchy","BIS_fnc_returnChildren"],"notes":[{"user":"Iceman77","date":"2014-10-19T12:24:00Z","text":"A fantastic way to filter stuff. eg:\n\n```sqf\n// create an array of west vehicles and spawn then in front of the player in rows of 5\n\nprivate [\"_cfgArray\", \"_xPos\", \"_yPos\", \"_veh\"];\n\n_cfgArray = \"(\n    (getNumber (_x >> 'scope') >= 2) &&\n    {\n        getNumber (_x >> 'side') == 1 &&\n        { getText (_x >> 'vehicleClass') in ['Armored', 'Car', 'Air'] }\n    }\n)\" configClasses (configFile >> \"CfgVehicles\");\n\n_xPos = 0;\n_yPos = 0;\n\n{\n    _yPos = _yPos + 20;\n    _veh = createVehicle [(configName _x), player modelToWorld [_xPos, _yPos, 0], [], 0, \"NONE\"];\n    if (_yPos >= 100) then\n    {\n        _yPos = 0;\n        _xPos = _xPos + 20;\n    };\n} forEach _cfgArray;\n```"},{"user":"Benargee","date":"2016-05-28T20:28:00Z","text":"configClasses does not account for inherited subclasses, use configProperties with isClass filter instead\n\n```sqf\nconfigProperties [_config, \"isClass _x\", true];\n```"},{"user":"Nelis75733126","date":"2017-05-28T09:18:00Z","text":"this will get a list of ALL locations on the currently loaded world\n\n```sqf\n( \"true\" configClasses (configFile >> \"CfgWorlds\" >> worldName >> \"names\" ) ) apply {\n    // change each config entry into a location\n    nearestLocation [\n        getArray ( _x >> \"position\" ),\n        getText ( _x >> \"type\" )\n    ]\n};\n```"}]},{"name":"configFile","title":"configFile","type":"command","url":"https://community.bistudio.com/wiki/configFile","revid":369418,"updated":"2024-09-03T18:48:49Z","groups":["Config"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return root of config entries hierarchy.","syntaxes":[{"syntax":"configFile","params":[],"returns":{"type":"Config","type_expr":"Config"},"form":"nullary"}],"examples":[{"code":["_isMyClassActive = isClass (configFile >> \"CfgPatches\" >> \"MyClass\");"]}],"see_also":["missionConfigFile","campaignConfigFile"],"notes":[{"user":"ffur2007slx2_5","date":"2014-07-19T20:08:00Z","text":"Arma 3 v1.24 It is recommended to use configClasses instead of BIS_fnc_getCfgSubClasses and BIS_fnc_uniqueClasses on subclasses collection or conditional selection.\n\n```sqf\n_faces = \"true\" configClasses (configFile >> \"CfgFaces\");\n// same as:\n_faces = (configfile >> \"CfgFaces\") call BIS_fnc_getCfgSubClasses;\n```\n\n```sqf\n//Extract all animals:\nanimals = \"configName _x isKindOf 'animal'\" configClasses (configFile >> \"CfgVehicles\");\n// same as:\nanimals = [];\n[\n    configFile >> \"CfgVehicles\",\n    {\n        if ((configName _this) isKindOf \"animal\") then {\n            animals set [count animals, _this]\n        }\n    }\n] call BIS_fnc_uniqueClasses;\n```\n\nReturn nested subclasses, currently still BIS_fnc_returnChildren\n\n```sqf\n// return all nested config classes\n[configFile >> \"CfgFaces\", 1, true, true] call BIS_fnc_returnChildren;\n```"}]},{"name":"configHierarchy","title":"configHierarchy","type":"command","url":"https://community.bistudio.com/wiki/configHierarchy","revid":378521,"updated":"2026-05-04T01:50:46Z","groups":["Config"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","description":"Returns hierarchy of the given config class. Just like with inheritsFrom, only complete config classes are supported (before Arma 3 v2.14). Since Arma 3 v2.22, an alt syntax is added, which allows to return parents identical to BIS_fnc_returnParents (see Example 2)","syntaxes":[{"syntax":"configHierarchy config","params":[{"name":"config","type":"Config","description":"target config","type_expr":"Config"}],"returns":{"type":"Array of Configs","type_expr":"Array<Config>","description":"ordered from parent to child"},"form":"unary","right":{"text":"config"}},{"syntax":"configHierarchy [config, classesOnly, includeBases, reversedOrder, configNames]","since":"arma3 2.22","params":[{"name":"config","type":"Config","description":"target config","type_expr":"Config"},{"name":"classesOnly","type":"Boolean","description":"when true, only classes are included in output and not properties","type_expr":"Boolean"},{"name":"includeBases","type":"Boolean","description":"when true, returned parents will include base classes (see description)","type_expr":"Boolean"},{"name":"reversedOrder","type":"Boolean","description":"when true, the return order is from child to parent","type_expr":"Boolean"},{"name":"configNames","type":"Boolean","optional":true,"default":"false","description":"when true, the return is Array of Strings, when false - Array of Configs.","type_expr":"Boolean","text":"configNames: Boolean - (Optional) when true, the return is Array of Strings, when false - Array of Configs. Default: false"}],"returns":{"type":"Array of Configs or Strings","type_expr":"Array<Config | String>","description":"Strings represent config names"},"form":"unary","right":{"text":"[config, classesOnly, includeBases, reversedOrder, configNames]"}}],"examples":[{"code":["_hierarchy = configHierarchy (configFile >> \"CfgVehicles\" >> \"Car\");\n// Returns [bin\\config.bin, bin\\config.bin/CfgVehicles, bin\\config.bin/CfgVehicles/Car]"]},{"code":["_bis_fnc_returnParents = configHierarchy [configFile >> \"CfgVehicles\" >> \"Land_FirePlace_F\", true, true, true, true];\n// Returns [\"Land_FirePlace_F\",\"House_F\",\"House\",\"HouseBase\",\"NonStrategic\",\"Building\",\"Static\",\"All\"]"]}],"see_also":["configClasses","configProperties","missionConfigFile","campaignConfigFile","a / b","config greater greater name","configName","count","getArray","getText","getNumber","inheritsFrom","isArray","isClass","isNumber","isText","select","isKindOf","BIS_fnc_returnParents"]},{"name":"configName","title":"configName","type":"command","url":"https://community.bistudio.com/wiki/configName","revid":339071,"updated":"2023-04-26T10:53:59Z","groups":["Config"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns name of config entry.","syntaxes":[{"syntax":"configName config","params":[{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["_name = configName (configFile >> \"CfgVehicles\"); // result is \"CfgVehicles\""]}],"see_also":["configFile","a / b","config greater greater name","count","getArray","getText","getNumber","inheritsFrom","isArray","isClass","isNumber","isText","select"]},{"name":"configNull","title":"configNull","type":"command","url":"https://community.bistudio.com/wiki/configNull","revid":321052,"updated":"2022-05-13T12:13:46Z","groups":["Variables","Config"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"A non-existing Config.\n\n> [!IMPORTANT]\n> Unlike other null values (objNull, grpNull, etc), configNull returns true when compared to itself.\n>\n> ```sqf\n> configNull == configNull;                            // returns true\n> isNull configNull;                                    // returns true\n> configNull isEqualTo configNull;                    // returns true\n> configNull == configFile >> \"ANonExistentEntry\";    // returns true\n> ```","syntaxes":[{"syntax":"configNull","params":[],"returns":{"type":"Config","type_expr":"Config"},"form":"nullary"}],"examples":[{"code":["_config = missionNamespace getVariable [\"myConfig\", configNull];"]},{"code":["str configNull; // returns \"\""]}],"see_also":["controlNull","displayNull","grpNull","locationNull","objNull","taskNull","teamMemberNull","scriptNull","typeName","isNull"]},{"name":"configOf","title":"configOf","type":"command","url":"https://community.bistudio.com/wiki/configOf","revid":309234,"updated":"2022-05-04T10:23:40Z","groups":["Config"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","locality":{"argument":"global"},"description":"Returns config path of the provided object.","syntaxes":[{"syntax":"configOf object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Config","type_expr":"Config"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["configOf player; // returns bin\\config.bin/CfgVehicles/B_W_Soldier_TL_F"]}],"see_also":["typeOf"]},{"name":"configProperties","title":"configProperties","type":"command","url":"https://community.bistudio.com/wiki/configProperties","revid":377082,"updated":"2026-01-01T09:41:25Z","groups":["Config"],"status":"ok","games":{"arma3":"1.36"},"since":"arma3 1.36","arma3_since":"1.36","description":"Returns an array of config entries that meet the criteria in the condition code. The command iterates through available classes and config properties for given config entry.\nCurrent looked at config is stored in _x variable (similar to alternative count command implementation).\nThe condition has to return true in order for the looked at property to be added to the resulting array. This command is a bit slower than configClasses but allows to access inherited entries.","syntaxes":[{"syntax":"configProperties [config, condition, inherit]","params":[{"name":"config","type":"Config","description":"config entry to search","type_expr":"Config"},{"name":"condition","type":"String","optional":true,"default":"\"true\"","description":"expression, which if returns true, adds current property to result\n\n> [!IMPORTANT]\n> - The condition code passed to configProperties should only be used for **simple filter expressions** and nothing more.\n> - Since Arma 3 v2.02 the following conditions are optimised for performance:\n>   - `\"true\"` (omitted condition)\n>   - `\"isClass _x\"`\n>   - `\"isClass _x && (...)\"`","type_expr":"String","text":"condition: String - (Optional, default \"true\") expression, which if returns true, adds current property to result\n\n> [!IMPORTANT]\n> - The condition code passed to configProperties should only be used for **simple filter expressions** and nothing more.\n> - Since Arma 3 v2.02 the following conditions are optimised for performance:\n>   - `\"true\"` (omitted condition)\n>   - `\"isClass _x\"`\n>   - `\"isClass _x && (...)\"`"},{"name":"inherit","type":"Boolean","optional":true,"default":"true","description":"include inherited properties","type_expr":"Boolean","text":"inherit: Boolean - (Optional, default true) include inherited properties"}],"returns":{"type":"Array of Configs","type_expr":"Array<Config>"},"form":"unary","right":{"text":"[config, condition, inherit]"}}],"examples":[{"code":["_configs = configProperties [configFile >> \"CfgVehicles\" >> \"O_Truck_02_box_F\"];"]},{"code":["_configs = configProperties [configFile >> \"RscText\", \"true\", true];"]},{"text":"Get all hitpoints of a truck:\n\n```sqf\n_hitPoints = [];\n_hitPointsCfgs = configProperties [\n    configFile >> \"CfgVehicles\" >> \"O_Truck_02_box_F\" >> \"HitPoints\",\n    \"true\",\n    true\n];\nhint str _hitPointsCfgs;\n```","code":["_hitPoints = [];\n_hitPointsCfgs = configProperties [\n\tconfigFile >> \"CfgVehicles\" >> \"O_Truck_02_box_F\" >> \"HitPoints\", \n\t\"true\", \n\ttrue\n];\nhint str _hitPointsCfgs;"]}],"see_also":["Config","configFile","missionConfigFile","configClasses","configHierarchy"]},{"name":"configSourceAddonList","title":"configSourceAddonList","type":"command","url":"https://community.bistudio.com/wiki/configSourceAddonList","revid":318786,"updated":"2022-05-13T09:21:30Z","groups":["Mods and Addons","Config"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns an array of addons (CfgPatches) in which the given config class is defined.","syntaxes":[{"syntax":"configSourceAddonList config","params":[{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["_addons = configSourceAddonList (configFile >> \"CfgVehicles\" >> \"Man\"); // returns [\"A3_Data_F\", \"A3_Characters_F\", \"A3_Data_F_Curator\", \"A3_Air_F_Heli\"]"]}],"see_also":["configFile","configSourceMod","configSourceModList"]},{"name":"configSourceMod","title":"configSourceMod","type":"command","url":"https://community.bistudio.com/wiki/configSourceMod","revid":318766,"updated":"2022-05-13T09:21:28Z","groups":["Mods and Addons"],"status":"ok","games":{"arma3":"1.38"},"since":"arma3 1.38","arma3_since":"1.38","description":"Returns modDir of the mod that given config class was loaded from.","syntaxes":[{"syntax":"configSourceMod config","params":[{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["configSourceMod (configFile >> \"CfgVehicles\" >> \"Heli_Transport_04_base_F\"); // returns \"heli\""]},{"code":["configSourceMod (configFile >> \"CfgVehicles\" >> \"Car\"); // returns \"A3\""]}],"see_also":["configFile","configSourceModList","modParams"]},{"name":"configSourceModList","title":"configSourceModList","type":"command","url":"https://community.bistudio.com/wiki/configSourceModList","revid":369411,"updated":"2024-09-03T18:43:26Z","groups":["Mods and Addons"],"status":"ok","games":{"arma3":"1.40"},"since":"arma3 1.40","arma3_since":"1.40","description":"Returns an array of mods (CfgMods) in which the given config class is defined.","syntaxes":[{"syntax":"configSourceModList config","params":[{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["_mods = configSourceModList (configFile >> \"CfgVehicles\" >> \"Man\");\nhint str _mods; // [\"A3\",\"curator\",\"heli\"]"]}],"see_also":["configFile","configSourceMod","configSourceAddonList","modParams"]},{"name":"confirmSensorTarget","title":"confirmSensorTarget","type":"command","url":"https://community.bistudio.com/wiki/confirmSensorTarget","revid":310881,"updated":"2022-05-07T20:25:14Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Sets for which Side the entity becomes a \"confirmed hostile\" target - a target that becomes highlighted red on the sensors display.","syntaxes":[{"syntax":"vehicle confirmSensorTarget [side, isConfirmed]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"side","type":"Side","type_expr":"Side"},{"name":"isConfirmed","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[side, isConfirmed]"}}],"examples":[{"code":["vehicle player confirmSensorTarget [blufor, true];"]}],"see_also":["setVehicleRadar","setVehicleReportRemoteTargets","vehicleReportRemoteTargets","vehicleReceiveRemoteTargets","setVehicleReceiveRemoteTargets","vehicleReportOwnPosition","setVehicleReportOwnPosition","reportRemoteTarget"]},{"name":"connectTerminalToUAV","title":"connectTerminalToUAV","type":"command","url":"https://community.bistudio.com/wiki/connectTerminalToUAV","revid":363209,"updated":"2024-03-25T20:30:02Z","groups":["Remote Control"],"status":"ok","games":{"arma3":"0.76"},"since":"arma3 0.76","arma3_since":"0.76","locality":{"argument":"global","effect":"global"},"description":"Connect person with UAV terminal to UAV unit. UAV Terminal item needs to be assigned to GPS slot. In MP the connection is handled locally, therefore it is possible for multiple MP clients to connect to the same UAV. However, each UAV can only have one connection to a terminal per MP client, so if UAV is already connected to another terminal on the same MP client, this new connection will fail.","syntaxes":[{"syntax":"person connectTerminalToUAV uav","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"uav","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success"},"form":"binary","left":{"text":"person"},"right":{"text":"uav"}}],"examples":[{"code":["bool = player connectTerminalToUAV uav1;"]},{"code":["player connectTerminalToUAV objNull; //disconnect"]}],"see_also":["allUnitsUAV","getConnectedUAV","isUAVConnected","UAVControl","showUAVFeed","shownUAVFeed"]},{"name":"connectToServer","title":"connectToServer","type":"command","url":"https://community.bistudio.com/wiki/connectToServer","revid":373150,"updated":"2025-04-04T09:14:53Z","groups":["System"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Connects the client to the provided server.\n\n> [!NOTE]\n> - only works on the Main Menu.\n> - must be executed from UI context, such as *onButtonDown* or similar events (see User Interface Event Handlers).\n\n> [!NOTE]\n> **Since Arma 3 v2.20:** If port is 0, the IP will be resolved as a SRV DNS Record.\n>\n> [\"domain.com\", 0, \"password\"] will be resolved as \"_arma3._udp.domain.com\".\n>\n> Only the first found record will be used, there is no support for multiple records with priority/weights.","syntaxes":[{"syntax":"connectToServer [ip, port, password]","params":[{"name":"ip","type":"String","description":"IP in [IPv4](https://en.wikipedia.org/wiki/IPv4) format or Arma 3 v2.20 domain name","type_expr":"String"},{"name":"port","type":"Number","type_expr":"Number"},{"name":"password","type":"String","description":"\"\" if no password","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[ip, port, password]"}}],"examples":[{"code":["connectToServer [\"192.168.0.2\", 2302, \"test\"];"]},{"code":["connectToServer [\"publicserver.mydomain.com\", 2302, \"\"];"]}],"see_also":["serverCommand","getSteamFriendsServers"]},{"name":"continue","title":"continue","type":"command","url":"https://community.bistudio.com/wiki/continue","revid":309284,"updated":"2022-05-04T15:26:09Z","groups":["Program Flow"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Skips current loop iteration and continues with the next one.","syntaxes":[{"syntax":"continue","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"text":"```sqf\n// prints 0, 1, 3\nfor \"_i\" from 0 to 3 do\n{\n    if (_i == 2) then { continue };\n    systemChat str _i;\n};\n```","code":["// prints 0, 1, 3\nfor \"_i\" from 0 to 3 do \n{\n\tif (_i == 2) then { continue };\n\tsystemChat str _i;\n};"]}],"see_also":["continueWith","break","breakWith"]},{"name":"continueWith","title":"continueWith","type":"command","url":"https://community.bistudio.com/wiki/continueWith","revid":378202,"updated":"2026-03-12T15:42:26Z","groups":["Program Flow"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Skips the current loop iteration, continues with the next one and returns the given value.","syntaxes":[{"syntax":"continueWith return","params":[{"name":"return","type":"Anything","description":"value to be returned when iteration is skipped","type_expr":"Anything"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"unary","right":{"text":"return"}},{"syntax":"scriptHandle continueWith code","since":"arma3 2.22","params":[{"name":"scriptHandle","type":"Script Handle","type_expr":"Script Handle"},{"name":"code","type":"Code","description":"Code to execute once the Promise has completed. The code will be executed in Unscheduled Environment.","type_expr":"Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"scriptHandle"},"right":{"text":"code"}},{"syntax":"scriptHandle continueWith [code, args]","since":"arma3 2.22","params":[{"name":"scriptHandle","type":"Script Handle","type_expr":"Script Handle"},{"name":"code","type":"Code","description":"Code to execute once the Promise has completed. The code will be executed in Unscheduled Environment.","type_expr":"Code"},{"name":"args","type":"Anything","description":"Arguments passed into code in _thisArgs variable","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"scriptHandle"},"right":{"text":"[code, args]"}}],"examples":[{"text":"```sqf\n// results in [2, \"TEST\", 4]\nprivate _result = [1, 2, 3] apply {\n    if (_x == 2) then {\n        continueWith \"TEST\";\n    } else {\n        _x + 1;\n    };\n};\n```","code":["// results in [2, \"TEST\", 4]\nprivate _result = [1, 2, 3] apply {\n\tif (_x == 2) then {\n\t\tcontinueWith \"TEST\";\n\t} else {\n\t\t_x + 1;\n\t};\n};"]}],"see_also":["continue","break","breakWith"]},{"name":"controlNull","title":"controlNull","type":"command","url":"https://community.bistudio.com/wiki/controlNull","revid":369405,"updated":"2024-09-03T18:43:23Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"A non-existing Control. To compare non-existent objects use isNull or isEqualTo (see examples).","syntaxes":[{"syntax":"controlNull","params":[],"returns":{"type":"Control","type_expr":"Control"},"form":"nullary"}],"examples":[{"code":["if (_myCtrl isEqualTo controlNull) then { hint \"_myCtrl is null!\"; };"]},{"text":"```sqf\ncontrolNull == controlNull;            // returns false\nisNull controlNull;                        // returns true\ncontrolNull isEqualTo controlNull;        // returns true\n```","code":["controlNull == controlNull;\t\t\t// returns false\nisNull controlNull;\t\t\t\t\t\t// returns true\ncontrolNull isEqualTo controlNull;\t\t// returns true"]},{"code":["str controlNull; // No control"]}],"see_also":["displayNull","grpNull","locationNull","objNull","taskNull","teamMemberNull","scriptNull","configNull","typeName","isNull"]},{"name":"controlsGroupCtrl","title":"controlsGroupCtrl","type":"command","url":"https://community.bistudio.com/wiki/controlsGroupCtrl","revid":310912,"updated":"2022-05-07T20:33:32Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","description":"Returns a child control with specified idc from a controls group","syntaxes":[{"syntax":"ctrlgrp controlsGroupCtrl idc","params":[{"name":"ctrlgrp","type":"Control","type_expr":"Control"},{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Control","type_expr":"Control"},"form":"binary","left":{"text":"ctrlgrp"},"right":{"text":"idc"}}],"examples":[{"code":["_control = _controlsGroup controlsGroupCtrl 101;"]}],"see_also":["allDisplays","allControls","ctrlCreate","ctrlParentControlsGroup"]},{"name":"conversationDisabled","title":"conversationDisabled","type":"command","url":"https://community.bistudio.com/wiki/conversationDisabled","revid":349091,"updated":"2023-11-08T14:47:27Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"A getter for disableConversation.","syntaxes":[{"syntax":"conversationDisabled unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if the status of kbTell's IsSpeaking for the given unit is `> 0`. See disableConversation for more info","text":"Boolean - returns true if the status of kbTell's *IsSpeaking* for the given unit is `> 0`. See disableConversation for more info"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["if (conversationDisabled soldier1) then { soldier1 disableConversation false };"]}],"see_also":["disableConversation"]},{"name":"copyFromClipboard","title":"copyFromClipboard","type":"command","url":"https://community.bistudio.com/wiki/copyFromClipboard","revid":310206,"updated":"2022-05-05T13:10:41Z","groups":["System","Strings"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return ANSI content of the (text) clipboard. If Unicode support is desired, see forceUnicode.","syntaxes":[{"syntax":"copyFromClipboard","params":[],"returns":{"type":"String","type_expr":"String"},"form":"nullary"}],"examples":[{"code":["hint copyFromClipboard;"]}],"multiplayer":"> [!IMPORTANT]\n> This command is disabled in multiplayer for security reasons.","see_also":["copyToClipboard","diag_log","forceUnicode"]},{"name":"copyToClipboard","title":"copyToClipboard","type":"command","url":"https://community.bistudio.com/wiki/copyToClipboard","revid":337563,"updated":"2023-02-10T01:05:53Z","groups":["System","Strings"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"server_exec":true},"description":"Copies ANSI text string to the clipboard. If Unicode support is desired, see forceUnicode.","syntaxes":[{"syntax":"copyToClipboard text","params":[{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"text"}}],"examples":[{"code":["copyToClipboard str _data;"]}],"multiplayer":"> [!IMPORTANT]\n> Restricted to **the server** for safety reasons.","see_also":["copyFromClipboard","diag_log","forceUnicode"],"notes":[{"user":"Benargee","date":"2014-10-12T02:38:00Z","text":"To add a line break in output text do this:\n\n```sqf\n_br = toString [13,10]; // (carriage return & line feed)\n_string = \"Line 1\" + _br + \"Line 2\";\ncopyToClipboard _string;\n```\n\nPaste into text editor of choice, you get:\n\n```\nLine 1\nLine 2\n```\n\n(A3 1.30 Stable executed inside .sqf via execVM)"}]},{"name":"copyWaypoints","title":"copyWaypoints","type":"command","url":"https://community.bistudio.com/wiki/copyWaypoints","revid":320957,"updated":"2022-05-13T10:04:50Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Copy the chain of waypoints from source to target group. The target group will start to process waypoints from the first one.","syntaxes":[{"syntax":"groupTo copyWaypoints groupFrom","params":[{"name":"groupTo","type":"Group","type_expr":"Group"},{"name":"groupFrom","type":"Group","type_expr":"Group"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"groupTo"},"right":{"text":"groupFrom"}}],"examples":[{"code":["group1 copyWaypoints group2;"]}],"see_also":["waypoints","deleteWaypoint","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed"]},{"name":"cos","title":"cos","type":"command","url":"https://community.bistudio.com/wiki/cos","revid":321053,"updated":"2022-05-13T12:15:18Z","groups":["Math - Geometry"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Cosine of a number, argument in degrees.","syntaxes":[{"syntax":"cos x","params":[{"name":"x","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"x"}}],"examples":[{"code":["cos 60; // returns 0.5"]}],"see_also":["acos","sin","asin","tan","atan","atan2"],"notes":[{"user":"Hardrock","date":"2006-08-08T23:54:00Z","text":"Be aware that there might be rounding errors in the results of this command.\n\n```sqf\ncos 90\n```\n\nfor example doesn't return the expected '0', but '-4.37114e-008'. So, if you want to compare results of Cosinus, don't use the compare operator\n\n```sqf\n(cos 90) == 0\n```\n\nbut rather use less than.\n\n```sqf\n(cos 90) < 0.00001\n```"}]},{"name":"count","title":"count","type":"command","url":"https://community.bistudio.com/wiki/count","revid":377184,"updated":"2026-01-01T10:51:01Z","groups":["Arrays","Strings","Config","HashMap"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Can be used to count:\n\n- The number of elements in an array (returns the already internally known array size)\n- The number of elements in an array matching the condition\n- The number of sub-entries in a config entry\n- Arma 3 v1.28 The number of characters in an ANSI string\n\n  > [!NOTE]\n  > If Unicode support is desired, see forceUnicode.","syntaxes":[{"syntax":"count value","params":[{"name":"value","type":"String, Config, HashMap or Array of Anything","type_expr":"String | Config | HashMap | Array<Anything>"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"value"}},{"syntax":"condition count array","params":[{"name":"condition","type":"Code","description":"condition that must return true for the tested element to be counted. The variable `_x` will contain the currently tested element\n\n> [!NOTE]\n> **Arma 3:** If the provided array contains different data types, use isEqualTo for item comparison instead of ==.","type_expr":"Code"},{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"condition"},"right":{"text":"array"}}],"examples":[{"code":["count [0, 0, 1, 2]; // returns 4\ncount units group player; // returns number of units in player group"]},{"code":["private _cnt = { _x == 4 } count [1, 9, 8, 3, 4, 4, 4, 5, 6]; // returns 3\n_cnt = { alive _x } count allUnits; // returns the number of alive units"]},{"code":["private _cnt = count (configFile >> \"CfgVehicles\");"]},{"code":["hint str count \"japa is the man!\"; // 16"]},{"code":["hint format [\"There are %1 elements in the provided hashmap\", count _myHashMap];"]}],"see_also":["apply","select","in","find","countFriendly","countEnemy","countUnknown","countSide","countType","findIf","forceUnicode"],"notes":[{"user":"Hardrock","date":"2006-08-03T14:27:00Z","text":"*Notes from before the conversion:*\nUse this to calculate how many \"M16\" mags a soldier has left.\n\n```sqf\n{ _x == \"M16\" } count magazines soldier1;\n```\n\nTake care when using count to determine how many units are left alive in a group: count units group player or count units groupname Will return the number of units the leader of the group thinks are alive. If some units have been killed out of sight of other members of the group then it may take sometime for this to be the actual numbers in the group. To determine exactly how many units are really alive in a group use:\n\n```sqf\n{ alive _x } count units group player;\n```\n\nor\n\n```sqf\n{ alive _x } count units groupname;\n```"},{"user":"Heeeere's Johnny!","date":"2014-12-15T00:01:00Z","text":"*count* can be (ab)used for a very fast and simple check if at least one element in an array fulfills a certain condition:\n\n```sqf\nif ({ if (/* _x fulfills condition */) exitWith {1}; false } count _array isEqualTo 1) then\n{\n    // do whatever here\n};\n```\n\nThis code will exit the *count* loop as soon as it finds an element fulfilling the condition, leaving the *count* with the value of 1, hence make the larger if-condition be *true*.\nIf no array element fulfills the condition, the *count* will be 0 and the if-condition will be *false*."},{"user":"Killzone_Kid","date":"2014-12-29T21:23:00Z","text":"Quit loop at first fulfilled condition (same as above but faster):\n\n```sqf\n{\n    if (_x == 4) exitWith {\n        // do something when we reach 4\n    }\n} count [1,2,3,4,5,6];\n```"},{"user":"Heeeere's Johnny!","date":"2015-01-02T22:32:00Z","text":"Using exitWith inside a **count** loop will overwrite the default functionality and make **count** return whatever the **exitWith** returns:\n\n```sqf\n_result = {\n    if (_x isEqualTo 3) exitWith { \"Hello\" }\n} count [1,2,3,4,5];\n// _result = \"Hello\"\n```"},{"user":"Ebay","date":"2016-08-22T19:41:00Z","text":"With the alternative syntax each iteration should result in an interior return of bool or nothing. Example:\n\n```sqf\ncreateDialog \"RscFunctionsViewer\";\n{ lbAdd [292901, _x]; } count [\"first\", \"second\", \"third\"];\n```\n\nlbAdd returns a number, so this throws \"Error Type Number, expected Bool\". Tested in A2OA 1.63.131129"}]},{"name":"countEnemy","title":"countEnemy","type":"command","url":"https://community.bistudio.com/wiki/countEnemy","revid":379405,"updated":"2026-10-31T00:02:09Z","groups":["Sides","Object Detection"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Count how many units in the array are considered enemy to the given unit.","syntaxes":[{"syntax":"unit countEnemy others","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"others","type":"Array of Objects","type_expr":"Array<Object>"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"unit"},"right":{"text":"others"}}],"examples":[{"code":["_num = player countEnemy list _triggerOne;"]}],"see_also":["countFriendly","count","countUnknown","countSide","countType"],"notes":[{"user":"Hardrock","date":"2006-08-03T14:28:00Z","text":"*Notes from before the conversion:*\n\nThe countEnemy command seem to count the number of units from the array that are considered to be of the given type by the whole side, not just the specified unit."},{"user":"Kronzky","date":"2006-12-15T04:46:00Z","text":"The unit that's checking (left side of the command) needs a certain level of knowledge about the target (about .1) before the enemy units are actually counted. (OFP & ArmA)"}]},{"name":"countFriendly","title":"countFriendly","type":"command","url":"https://community.bistudio.com/wiki/countFriendly","revid":379406,"updated":"2026-10-31T00:02:17Z","groups":["Sides"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Count how many units in the array are considered friendly to the given unit.","syntaxes":[{"syntax":"unit countFriendly others","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"others","type":"Array of Objects","type_expr":"Array<Object>"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"unit"},"right":{"text":"others"}}],"examples":[{"code":["_num = player countFriendly list _triggerOne;"]}],"see_also":["count","countEnemy","countUnknown","countSide","countType"],"notes":[{"user":"Hardrock","date":"2006-08-03T14:28:00Z","text":"*Notes from before the conversion:*\n\nThe countFriendly command seem to count the number of units from the array that are considered to be of the given type by the whole side, not just the specified unit."}]},{"name":"countSide","title":"countSide","type":"command","url":"https://community.bistudio.com/wiki/countSide","revid":379324,"updated":"2026-10-30T23:51:22Z","groups":["Sides","Object Detection"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns how many units in the given array belong to given side.","syntaxes":[{"syntax":"side countSide array","params":[{"name":"side","type":"Side","type_expr":"Side"},{"name":"array","type":"Array of Objects or Groups","description":"Array of Objects or Groups\n\n> [!NOTE]\n> If the object in passed array is a Group, the leader of the group will be counted.","type_expr":"Array<Object | Group>","text":"array: Array of Objects or Groups\n\n> [!NOTE]\n> If the object in passed array is a Group, the leader of the group will be counted."}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"side"},"right":{"text":"array"}}],"examples":[{"code":["_num = west countSide list _triggerOne;"]},{"code":["_numCivPlayable = civilian countSide playableUnits;"]}],"see_also":["countFriendly","countEnemy","countUnknown","count","countType","playersNumber","units","allUnits"],"notes":[{"user":"AgentRev","date":"2014-10-19T01:00:00Z","text":"This command considers captive units as civilians, regardless of their group's side."}]},{"name":"countType","title":"countType","type":"command","url":"https://community.bistudio.com/wiki/countType","revid":379407,"updated":"2026-10-31T00:02:25Z","groups":["Object Detection"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Count how many objects in the array are of given type. This command also works with parent classes like \"Air\", \"Tank\", and \"Car\". For a full class reference see Classes.","syntaxes":[{"syntax":"type countType objects","params":[{"name":"type","type":"String","description":"class type","type_expr":"String"},{"name":"objects","type":"Array of Objects","type_expr":"Array<Object>"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"type"},"right":{"text":"objects"}}],"examples":[{"code":["_count = \"Tank\" countType list _triggerOne;"]},{"code":["_count = \"B_medic_F\" countType units player;"]}],"see_also":["count","isKindOf","typeOf","countFriendly","countEnemy","countSide","countUnknown"],"notes":[{"user":"Kronzky","date":"2007-04-23T16:34:00Z","text":"This command can be used on the whole hierarchical class tree (i.e. when checking a HMMWV, one could test for \"HMMWV50\", \"Car\", \"LandVehicle\", etc.)"},{"user":"Killzone_Kid","date":"2016-05-04T13:30:00Z","text":"To complement Kronzky's note, if one needs to count exact types, countType is not suitable for this, use count instead:\n\n```sqf\n_count = {typeOf _x == \"B_medic_F\"} count units player;\n```"}]},{"name":"countUnknown","title":"countUnknown","type":"command","url":"https://community.bistudio.com/wiki/countUnknown","revid":377181,"updated":"2026-01-01T10:49:16Z","groups":["Sides"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Count how many units in the array are unknown to the given unit.","syntaxes":[{"syntax":"unit countUnknown others","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"others","type":"Array of Objects","type_expr":"Array<Object>"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"unit"},"right":{"text":"others"}}],"examples":[{"code":["_num = player countUnknown list _triggerOne;"]}],"see_also":["countFriendly","countEnemy","count","countSide","countType"]},{"name":"create3DENComposition","title":"create3DENComposition","type":"command","url":"https://community.bistudio.com/wiki/create3DENComposition","revid":377506,"updated":"2026-01-02T06:50:07Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Create new Composition. To create individual entities, use create3DENEntity.","syntaxes":[{"syntax":"create3DENComposition [configPath, position]","params":[{"name":"configPath","type":"Config","description":"path to `CfgGroups` or since Arma 3 v2.18 `configFile >> \"Cfg3DEN\" >> \"Compositions\"` class of a composition","type_expr":"Config"},{"name":"position","type":"Position","type_expr":"Position"}],"returns":{"type":"Array of Eden Entities","type_expr":"Array<Eden Entity>"},"form":"unary","right":{"text":"[configPath, position]"}}],"examples":[{"text":"```sqf\nmyComposition = create3DENComposition [\n    configFile >> \"CfgGroups\" >> \"West\" >> \"BLU_F\" >> \"Infantry\" >> \"BUS_InfSquad\",\n    screenToWorld [0.5, 0.5]\n];\n```","code":["myComposition = create3DENComposition [\n\tconfigFile >> \"CfgGroups\" >> \"West\" >> \"BLU_F\" >> \"Infantry\" >> \"BUS_InfSquad\",\n\tscreenToWorld [0.5, 0.5]\n];"]}],"see_also":["create3DENEntity"]},{"name":"create3DENEntity","title":"create3DENEntity","type":"command","url":"https://community.bistudio.com/wiki/create3DENEntity","revid":377519,"updated":"2026-01-02T06:52:05Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Create new Eden Entity. Used for creating individual entities; to create a composition (e.g., infantry squad), use create3DENComposition and to create a layer use add3DENLayer.\nThis is the only way to add new editable entities to an Eden Editor scenario. Other 'create' commands like createVehicle or createUnit will still work, but the resulting entity will not be editable.","syntaxes":[{"syntax":"create3DENEntity [mode, class, position, isEmpty]","params":[{"name":"mode","type":"String","description":"can be \"Object\", \"Trigger\", \"Waypoint\", \"Logic\", \"Marker\" or Arma 3 v2.14 \"Comment\"","type_expr":"String"},{"name":"class","type":"String","description":"entity class, defined in one of the following classes:\n\n- `CfgVehicles` - objects and logic entities\n- `CfgNonAIVehicles` - triggers\n- `CfgWaypoint` - waypoints\n- `CfgMarkers` - markers","type_expr":"String"},{"name":"position","type":"Position","type_expr":"Position"},{"name":"isEmpty","type":"Boolean","optional":true,"default":"false","description":"true to create vehicle without crew","type_expr":"Boolean","text":"isEmpty: Boolean - (Optional, default false) true to create vehicle without crew"}],"returns":{"type":"Eden Entity","type_expr":"Eden Entity | Eden ID","description":"(Eden_ID for Comment)","text":"Eden Entity (Eden_ID for Comment)"},"form":"unary","right":{"text":"[mode, class, position, isEmpty]"}},{"syntax":"group create3DENEntity [mode, class, position]","params":[{"name":"group","type":"Group","description":"group in which an AI character or waypoint is created.\n\n- When missing for AI characters, a new group is created for them\n- When missing for waypoints, an error is logged and nothing is created\n- When used on any other mode, it is ignored and the entity is created as usual","type_expr":"Group"},{"name":"mode","type":"String","description":"can be \"Object\", \"Trigger\", \"Waypoint\", \"Logic\", \"Marker\" or Arma 3 v2.14 \"Comment\"","type_expr":"String"},{"name":"class","type":"String","description":"entity class","type_expr":"String"},{"name":"position","type":"Position","type_expr":"Position"}],"returns":{"type":"Eden Entity","type_expr":"Eden Entity | Eden ID","description":"(Eden_ID for Comment)","text":"Eden Entity (Eden_ID for Comment)"},"form":"binary","left":{"text":"group"},"right":{"text":"[mode, class, position]"}}],"examples":[{"code":["dude1 = create3DENEntity [\"Object\", \"B_Soldier_F\", screenToWorld [0.5, 0.5]];"]},{"code":["dude2 = group dude1 create3DENEntity [\"Object\", \"B_Soldier_AR_F\", screenToWorld [0.5, 0.5]];"]},{"code":["myMarker = create3DENEntity [\"Marker\", \"mil_warning\", getPosATL player];"]},{"code":["mytrigger = create3DENEntity [\"Trigger\", \"EmptyDetectorArea10x10\", getPosATL player];"]},{"text":"Arma 3 v2.06 Create a shape marker:\n\n```sqf\nm = create3DENEntity [\"Marker\", \"\", getPosATL player];    // default rectangular marker\nm set3DENAttribute [\"markerType\", 1];                    // 0 - rectangle; 1 - ellipse\nm set3DENAttribute [\"brush\", \"DiagGrid\"];\n```","code":["m = create3DENEntity [\"Marker\", \"\", getPosATL player];\t// default rectangular marker\nm set3DENAttribute [\"markerType\", 1];\t\t\t\t\t// 0 - rectangle; 1 - ellipse\nm set3DENAttribute [\"brush\", \"DiagGrid\"];"]},{"text":"Arma 3 v2.14 Create a comment:\n\n```sqf\nmyComment = create3DENEntity [\"Comment\", \"loc_talk\", [0,0,0]];\nmyComment set3DENAttribute [\"name\", \"Title Here\"];\nmyComment set3DENAttribute [\"description\", \"Tooltip Here\"];\n```","code":["myComment = create3DENEntity [\"Comment\", \"loc_talk\", [0,0,0]];\nmyComment set3DENAttribute [\"name\", \"Title Here\"];\nmyComment set3DENAttribute [\"description\", \"Tooltip Here\"];"]}],"see_also":["create3DENComposition","delete3DENEntities","add3DENLayer"],"notes":[{"user":"R3vo","date":"2019-09-06T08:33:00Z","text":"To create a waypoint, use the alternative syntax and pass the group which should receive it as the left-hand argument."},{"user":"POLPOX","date":"2022-10-09T07:26:29Z","text":"Due to an unknown reason, you cannot create3DENEntity animals, will cause a crash of the game."}]},{"name":"createAgent","title":"createAgent","type":"command","url":"https://community.bistudio.com/wiki/createAgent","revid":378352,"updated":"2026-04-02T16:33:41Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Creates an agent of the given type. An agent does not have a group or leader or the standard soldier FSM associated with it - for instance, an enemy soldier spawned as an agent has limited AI and will do nothing when fired upon - which can be useful to limit the amount of AI processing being done in a mission with very large numbers of \"AI\". Animals are also commonly created as agents.\n\n> [!NOTE]\n> - Players assigned to an agent using selectPlayer will be able to control the agent, operate weapons and other actions, but will not be able to access their inventory using the gear screen.\n> - To create objects of type `\"Logic\"`, use createUnit.","syntaxes":[{"syntax":"createAgent [type, position, markers, placement, special]","params":[{"name":"type","type":"String","description":"class from CfgVehicles","type_expr":"String"},{"name":"position","type":"Object or PositionAGL or Position2D","description":"desired placement position","type_expr":"Object | PositionAGL | Position2D"},{"name":"markers","type":"Array of Strings","description":"if the markers array contains any markers, the position is randomly picked from array of given markers plus desired placement position. If any of the markers were given z coordinate with setMarkerPos, the vehicle will also be created at given z coordinate.","type_expr":"Array<String>"},{"name":"placement","type":"Number","description":"placement radius, the unit is randomly place in a circle with this radius","type_expr":"Number"},{"name":"special","type":"String","description":"one of:\n\n- `\"NONE\"` - will look for a suitable empty position near given position (subject to other placement params) before creating the agent\n- `\"CAN_COLLIDE\"` - creates the agent at given position (subject to other placement params), without checking if others objects can cross its 3D model","type_expr":"String"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"[type, position, markers, placement, special]"}}],"examples":[{"code":["private _agent = createAgent [\"B_Soldier_F\", getPosATL player, [], 0, \"NONE\"];"]},{"code":["private _agent = createAgent [\"Snake_random_F\", ASLToAGL getPosASL player, [], 0, \"CAN_COLLIDE\"]; // Creates a snake at player's feet"]}],"see_also":["agent","agents","isAgent","forEachMemberAgent","execFSM","BIS_fnc_execFSM"],"notes":[{"user":"Killzone_Kid","date":"2014-09-29T20:03:00Z","text":"In Arma 3, default FSM is calling BIS_fnc_animalBehaviour script upon agent creation, which takes on some animal behavioural logic. The problem here is that it is almost impossible to make animal do what is told. Until now. Since Arma 3 v1.32 you can set *BIS_fnc_animalBehaviour_disable* variable on the agent at the moment of agent creation, to override the function.\n\n```sqf\ntr = createTrigger [\"EmptyDetector\", player modelToWorld [0, 10, 0]];\ntr setTriggerArea [5, 5, 0, true];\ntr setTriggerActivation [\"CIV\", \"PRESENT\", true];\nrabbits = [];\nprivate \"_r\";\nfor \"_i\" from 1 to 10 do {\n    _r = createAgent [\"Rabbit_F\", position tr, [], 0, \"NONE\"];\n    _r setVariable [\"BIS_fnc_animalBehaviour_disable\", true];\n    rabbits pushBack _r;\n};\ntr setTriggerStatements [\n    \"if (rabbits isEqualTo thisList) exitWith {\n        _r = thisList select floor random count thisList;\n        _r moveTo (_r modelToWorld [2.5 - random 5, 2.5 - random 5, 0]);\n    };\n    _esc = rabbits - thisList;\n    doStop _esc;\n    {_x moveTo position thisTrigger} forEach _esc;\n    systemChat str [time, _esc];\n    false\",\n    \"\",\n    \"\"\n];\n```"},{"user":"Waffle SS.","date":"2015-04-18T07:17:00Z","text":"Agents seem to use the same collision model that the player uses, unlike normal AI. Normal AI don't collide with objects, but agents are physically stopped by obstacles the same way players are. This also probably means agents cost more resources than normal AI."}]},{"name":"createCenter","title":"createCenter","type":"command","url":"https://community.bistudio.com/wiki/createCenter","revid":353367,"updated":"2024-03-15T17:11:57Z","groups":["Sides"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Instanciate a Side center. A Side center is required to be able to create groups of this side.\nCenters can only be created for east, west, resistance, civilian and sideLogic sides.\nCreated sides must have their \"side-friendship\" defined with setFriend.\n\n> [!NOTE]\n> In Armed Assault and Arma 2, only Mission.sqm's units side centers are created; e.g if no resistance unit has been placed in the editor you must use createCenter before being able to create a resistance group.\n\n> [!NOTE]\n> **Arma 3:** In Arma 3, centers for all sides are all created by the engine.","syntaxes":[{"syntax":"createCenter side","params":[{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Side","type_expr":"Side"},"form":"unary","right":{"text":"side"}}],"examples":[{"code":["createCenter east;"]}],"see_also":["deleteCenter","createUnit","createGroup","createVehicle","side","Side"]},{"name":"createDialog","title":"createDialog","type":"command","url":"https://community.bistudio.com/wiki/createDialog","revid":338553,"updated":"2023-03-19T00:02:56Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"effect":"local"},"description":"Creates a dialog which is defined either in the mission's description.ext, in the campaign's description.ext or in the global resource.cpp. The given name has to be the class name used in one of these files. If another dialog is already opened, the desired dialog is created as a child dialog of the one already opened.\n\n> [!NOTE]\n> By default, displays created with createDisplay are rendered on top of dialogs created with createDialog. If *forceOnTop* is set to true, the dialog will be rendered on top of displays.","syntaxes":[{"syntax":"createDialog dialogName","params":[{"name":"dialogName","type":"String","description":"class name used in the description.ext, resource.cpp or config.cpp","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when the dialog was created successfully"},"form":"unary","right":{"text":"dialogName"}},{"syntax":"createDialog [dialogName, forceOnTop]","since":"arma3 2.08","params":[{"name":"dialogName","type":"String","description":"class name used in the description.ext, resource.cpp or config.cpp","type_expr":"String"},{"name":"forceOnTop","type":"Boolean","optional":true,"default":"false","description":"if true, dialog will be rendered on top of displays","type_expr":"Boolean","text":"forceOnTop: Boolean - (Optional, default false) if true, dialog will be rendered on top of displays"}],"returns":{"type":"Display","type_expr":"Display","description":"created dialog"},"form":"unary","right":{"text":"[dialogName, forceOnTop]"}}],"examples":[{"code":["private _ok = createDialog \"RscDisplayGame\";\nif (!_ok) then { hint \"Dialog could not be opened!\" };"]}],"see_also":["displayCtrl","createDisplay","closeDialog","dialog","displayNull","controlNull","ctrlCreate","displayParent"],"notes":[{"user":"Killzone_Kid","date":"2017-07-29T09:04:00Z","text":"A user dialog created with createDisplay over mission display (findDisplay 46) will stop display event handlers added to mission display from firing. However if it is created with createDialog then the event handlers continue to work."}]},{"name":"createDiaryLink","title":"createDiaryLink","type":"command","url":"https://community.bistudio.com/wiki/createDiaryLink","revid":325179,"updated":"2022-07-01T14:35:13Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Creates a link to the given diary entry.","syntaxes":[{"syntax":"createDiaryLink [subject, record, text]","params":[{"name":"subject","type":"String","type_expr":"String"},{"name":"record","type":"Object, Task or Diary Record","type_expr":"Object | Task | Diary Record"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"empty string or a string similar to the result of `format [\"<log subject=\"\"%1\"\" record=\"\"%2\"\">%3</log>\", subject, processedRecordId, text]`"},"form":"unary","right":{"text":"[subject, record, text]"}}],"examples":[{"code":["_diaryRec1 = player createDiaryRecord [\"Diary\", [\"Record 1\", \"We can not refer to the next record because it does not exist yet.\"]];\n_diaryRec2 = player createDiaryRecord [\"Diary\", [\"Record 2\", \"Go to \" + createDiaryLink [\"Diary\", _diaryRec1, \"record 1\"]]];\n_diaryRec3 = player createDiaryRecord [\"Diary\", [\"Record 3\", \"Go to \" + createDiaryLink [\"Diary\", _diaryRec2, \"record 2\"]]];"]},{"text":"In this example, one can go to any next record.\n\n```sqf\nTAG_fnc_processDiaryLink = {\n    processDiaryLink createDiaryLink [\"Diary\", _this, \"\"];\n};\nDiaryRec1 = player createDiaryRecord [\"Diary\", [\"Record 1\",\n    \"Go to <execute expression='DiaryRec2 call TAG_fnc_processDiaryLink'>Record 2</execute>\"\n]];\nDiaryRec2 = player createDiaryRecord [\"Diary\", [\"Record 2\",\n    \"Go to <execute expression='DiaryRec3 call TAG_fnc_processDiaryLink'>Record 3</execute>\"\n]];\nDiaryRec3 = player createDiaryRecord [\"Diary\", [\"Record 3\",\n    \"Go to <execute expression='DiaryRec1 call TAG_fnc_processDiaryLink'>Record 1</execute>\"\n]];\n```","code":["TAG_fnc_processDiaryLink = {\n\tprocessDiaryLink createDiaryLink [\"Diary\", _this, \"\"];\n};\nDiaryRec1 = player createDiaryRecord [\"Diary\", [\"Record 1\", \n\t\"Go to <execute expression='DiaryRec2 call TAG_fnc_processDiaryLink'>Record 2</execute>\"\n]];\nDiaryRec2 = player createDiaryRecord [\"Diary\", [\"Record 2\", \n\t\"Go to <execute expression='DiaryRec3 call TAG_fnc_processDiaryLink'>Record 3</execute>\"\n]];\nDiaryRec3 = player createDiaryRecord [\"Diary\", [\"Record 3\", \n\t\"Go to <execute expression='DiaryRec1 call TAG_fnc_processDiaryLink'>Record 1</execute>\"\n]];"]}],"see_also":["processDiaryLink","createDiaryRecord","createDiarySubject","diarySubjectExists","setDiaryRecordText"]},{"name":"createDiaryRecord","title":"createDiaryRecord","type":"command","url":"https://community.bistudio.com/wiki/createDiaryRecord","revid":370359,"updated":"2024-12-02T16:08:54Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Creates a Diary entry. Supported tags and their parameters:\n\n| Tag | Options | Example |\n|---|---|---|\n| img | - *image*: String - path to image. When present, any element with it will be displayed as image.<br>- *width*: Number - image width in pixels.<br>- *height*: Number - image height in pixels.<br>- Arma 3 v2.10 *title*: String - tooltip to show on mouse over image<br>- Arma 3 v2.10 *src*: String - alternative to 'image'<br>> [!NOTE]<br>> **Arma 3:** Maximum width supported seems to be **370** pixels as a wider image will be cut off. Height should be calculated with the aspect ratio of the image. `height = 370; ratio = 16/9; height = width / ratio;` | `<img image=\"picture.paa\" width=\"128\" height=\"64\" />`<br>Since Arma 3 v2.10:<br>`<img src=\"picture.paa\" width=\"128\" height=\"64\" title=\"this is an image\" />` |\n| font | - *color*: String - [HTML color](https://en.wikipedia.org/wiki/HTML_color) in format #aarrggbb or #rrggbb<br>- *size*: Number - font height in pixels (default: 14)<br>- *face*: String - font type (see Fonts) | `<font color=\"#FF00FF\" size=\"16\" face=\"LucidaConsoleB\">Hello there</font>` |\n| br | N/A | `Line 1<br />Line 2` |\n| marker | - *name*: String - marker name | `<marker name=\"respawn_west\">Respawn point</marker>` |\n| execute | - *expression*: String - executed code | `<execute expression=\"player setDamage 1\">Die!</execute>` |\n| executeClose | - *expression*: String - executed code, diary is closed afterwards | `<executeClose expression=\"player setDamage 1\">Die and close</executeClose>` |\n| log | - *subject*: String - subject name.<br>- *record*: String - record ID (e.g. \"Record6\" or \"Unit1059524\") | `<log subject=\"Hello\">Get to the \"Hello\" subject</log>`<br>`<log subject=\"Hello\" record=\"Record0\">Go to the first record added to \"Hello\"</log>` |\n| gear | - *unit*: Number - unit ID | `<gear unit=\"123456\">Open unit 123456's gear</gear>` |\n| teamSwitch | - *unit*: Number - unit ID | `<teamSwitch unit=\"123456\">Switch to unit 123456</teamSwitch>` |\n| kick | - *id*: Number - unit ID | `<kick unit=\"123456\">Kick player unit 123456</kick>` |\n| ban | - *id*: Number - unit ID | `<ban unit=\"123456\">ban player unit 123456</ban>` |\n| mute | - *id*: Number - unit ID | `<mute unit=\"123456\">mute player unit 123456</mute>` |\n| voteadmin | - *id*: Number - unit ID | `<voteadmin unit=\"123456\">vote admin unit 123456</voteadmin>` |\n| votekick | - *id*: Number - unit ID | `<votekick unit=\"123456\">vote kick player unit 123456</votekick>` |\n| currentTask | - *id*: Number - task ID<br>- *action*: String - 'n' or 's' (select) | `<currentTask id=\"my_task\">get to my_task task</currentTask>` |\n\n> [!NOTE]\n> If the createDiaryRecord command fails, it returns a null record.\n>\n> Before Arma 3 v2.00, isNull did not work with the diary record type and diaryRecordNull did not exist.\n> In order to verify a null record, it is possible to create a variable and compare against it:\n>\n> ```sqf\n> private _recordNull = objNull createDiaryRecord [];\n> private _createdRecord = player createDiaryRecord [\"Diary\", [\"Title\", \"Description\"]];\n> if (_createdRecord isEqualTo _recordNull) then { hint \"Failed\"; };\n> ```","syntaxes":[{"syntax":"player createDiaryRecord [subject, textInfo, task, taskState, showTitle]","params":[{"name":"player","type":"Object","type_expr":"Object"},{"name":"subject","type":"String","type_expr":"String"},{"name":"textInfo","type":"String or Array of Strings","description":"can be:\n\n- String - the record's content - its title will be empty\n- Array of Strings - format [title, text, icon]:\n  - title: String\n  - text: String\n  - Arma 3 v2.10 icon: String - (Optional) icon to show next to the title","type_expr":"String | Array<String>"},{"name":"task","type":"Task","optional":true,"default":"taskNull","type_expr":"Task","text":"task: Task - (Optional, default taskNull)"},{"name":"taskState","type":"String","optional":true,"default":"`\"NONE\"`","description":"changes the state of the given task. Can be one of:\n\n- `\"NONE\"`\n- `\"CREATED\"`\n- `\"ASSIGNED\"`\n- `\"SUCCEEDED\"`\n- `\"FAILED\"`\n- `\"CANCELED\"`","type_expr":"String","text":"taskState: String - (Optional, default `\"NONE\"`) changes the state of the given task. Can be one of:\n\n- `\"NONE\"`\n- `\"CREATED\"`\n- `\"ASSIGNED\"`\n- `\"SUCCEEDED\"`\n- `\"FAILED\"`\n- `\"CANCELED\"`"},{"name":"showTitle","type":"Boolean","optional":true,"default":"true","description":"whether or not to show title in the description section as well","type_expr":"Boolean","since":"arma3 1.96","text":"showTitle: Boolean - (Optional, default true) whether or not to show title in the description section as well"}],"returns":{"type":"Diary Record","type_expr":"Diary Record"},"form":"binary","left":{"text":"player"},"right":{"text":"[subject, textInfo, task, taskState, showTitle]"}}],"examples":[{"code":["player createDiaryRecord [\"Diary\", [\"Intel\", \"Enemy base is on grid <marker name='enemyBase'>161170</marker>\"]];"]},{"code":["player createDiaryRecord [\"Diary\", \"Information gathered.<br /><img image='wellDone_ca.paa' />\"];"]},{"code":["player createDiaryRecord [\"Diary\", [\"Title\", \"Description\"], taskNull, \"\", false];"]},{"text":"```sqf\nplayer createDiaryRecord [\n    \"Diary\",\n    [\"Font tag\", \"<font color='#7FFF00' size='30' face='TahomaB'>This will changed text size, colour and font</font>\"],\n    taskNull,\n    \"\",\n    false\n];\n```","code":["player createDiaryRecord [\n\t\"Diary\",\n\t[\"Font tag\", \"<font color='#7FFF00' size='30' face='TahomaB'>This will changed text size, colour and font</font>\"],\n\ttaskNull,\n\t\"\",\n\tfalse\n];"]},{"text":"```sqf\nplayer createDiaryRecord [\n    \"Diary\",\n    [\"Image\", \"<img image='\\A3\\Ui_F_Curator\\Data\\Logos\\arma3_curator_artwork.jpg' width='500' height='800' />\"],\n    taskNull,\n    \"\",\n    false\n];\n```","code":["player createDiaryRecord [\n\t\"Diary\",\n\t[\"Image\", \"<img image='\\A3\\Ui_F_Curator\\Data\\Logos\\arma3_curator_artwork.jpg' width='500' height='800' />\"],\n\ttaskNull,\n\t\"\",\n\tfalse\n];"]},{"code":["player createDiaryRecord [\"Diary\", [\"Linebreak\", \"Line1<br />Line2<br /><br />Line4\"], taskNull, \"\", false];"]},{"code":["player createDiaryRecord [\"Diary\", [\"Execute\",\"<execute expression='hint \"\"Some code\"\";'>Some text</execute>\"], taskNull, \"\", false];"]},{"code":["player createDiaryRecord [\"Diary\", [\"ExecuteClose\", \"<executeClose expression=\"\"hint 'Diary closed';\"\">Close Diary</executeClose>\"], taskNull, \"\", false];"]}],"see_also":["allDiaryRecords","processDiaryLink","createDiaryLink","createDiarySubject","diarySubjectExists","setDiaryRecordText","removeDiaryRecord"],"notes":[{"user":"Tankbuster","date":"2017-03-24T20:11:00Z","text":"When adding multiple diary records, be aware that they appear in reverse order. ie the first one you add will appear last and the last one you add will be first."},{"user":"R3vo","date":"2019-06-22T16:28:00Z","text":"It seems that the **task** parameter has no effect in Arma 3 because the task entry in the briefing menu is created when the task itself was created."},{"user":"Honger","date":"2022-10-18T17:51:12Z","text":"<log>, as `createDiaryLink`, requires declaring **both** subject and ID of the record belonging to said subject. Otherwise generated text will not be clickable or might open a non-existing record (behaviour similar to clicking on map when viewing Diary)."}]},{"name":"createDiarySubject","title":"createDiarySubject","type":"command","url":"https://community.bistudio.com/wiki/createDiarySubject","revid":364194,"updated":"2024-05-05T10:46:53Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Creates a new subject in the Diary.","syntaxes":[{"syntax":"player createDiarySubject [subject, displayName, picture]","params":[{"name":"player","type":"Object","type_expr":"Object"},{"name":"subject","type":"String","type_expr":"String"},{"name":"displayName","type":"String","description":"the visible name","type_expr":"String"},{"name":"picture","type":"String","optional":true,"default":"`\"\"`","description":"icon to display next to the subject. Can be set later with setDiarySubjectPicture. Similar to lbSetPictureRight.","type_expr":"String","text":"picture: String - (Optional, default `\"\"`) icon to display next to the subject. Can be set later with setDiarySubjectPicture. Similar to lbSetPictureRight."}],"returns":{"type":"Number","type_expr":"Number","description":"index of the entry that was added"},"form":"binary","left":{"text":"player"},"right":{"text":"[subject, displayName, picture]"}}],"examples":[{"code":["_index = player createDiarySubject [\"myPage\",\"My page\"];"]}],"see_also":["removeDiarySubject","processDiaryLink","createDiaryLink","createDiaryRecord","diarySubjectExists","setDiarySubjectPicture","allDiarySubjects"]},{"name":"createDisplay","title":"createDisplay","type":"command","url":"https://community.bistudio.com/wiki/createDisplay","revid":369323,"updated":"2024-09-03T18:42:58Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Creates child display of given display and loads from \"resourceName\". The notable difference between createDisplay and createDialog is that with createDisplay the player would be able to move around while the display is shown.\nDisplays created with createDisplay or createDialog will take control of the mouse pointer and will close when user presses <kbd>Esc</kbd>.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.50 createDisplay returns Display and will first look in description.ext for resourceName config, if not found, it will then look in main config.\n\n> [!NOTE]\n> If an *overlay* is needed instead, use cutRsc.","syntaxes":[{"syntax":"parent createDisplay resourceName","params":[{"name":"parent","type":"Display","type_expr":"Display"},{"name":"resourceName","type":"String","description":"custom display class defined in description.ext or existing display class from main config","type_expr":"String"}],"returns":{"type":"Display","type_expr":"Display | Nothing","description":"(since Arma 3 v1.50, Nothing before)","text":"Display (since Arma 3 v1.50, Nothing before)"},"form":"binary","left":{"text":"parent"},"right":{"text":"resourceName"}}],"examples":[{"code":["findDisplay 46 createDisplay \"RscCredits\";"]},{"code":["// creates an empty display\nprivate _emptyDisplay = findDisplay 46 createDisplay \"RscDisplayEmpty\";"]}],"see_also":["closeDisplay","createDialog","displayCtrl","dialog","displayNull","controlNull","ctrlCreate","displayParent"],"notes":[{"user":"MrPineapple","date":"2014-11-15T13:20:00Z","text":"When using createDisplay instead of createDialog, all the commands for working with the controls of the display only work with the control version, not the IDC version:\n\n```sqf\nlbAdd [1234, \"item\"];    // does not work on displays, and won't error either\n_ctrl lbAdd \"item\";        // does work with displays\n```\n\nSo you have to use the control(DisplayCtrl) and not the IDC."},{"user":"Killzone_Kid","date":"2017-06-29T09:02:00Z","text":"A user dialog created with createDisplay over mission display (findDisplay 46) will stop display event handlers added to mission display from firing. However if it is created with createDialog then the event handlers continue to work."},{"user":"Target_practice","date":"2020-06-21T17:01:00Z","text":"Creating a display with the same parent as an existing display will destroy the latter and all of its children. However, their onUnload, onChildDestroyed, and onDestroy event handlers will not fire."},{"user":"7erra","date":"2022-02-05T15:47:14Z","text":"When trying to create a display with createDisplay on a non existing display the command will fail silently and return displayNull."}]},{"name":"createGearDialog","title":"createGearDialog","type":"command","url":"https://community.bistudio.com/wiki/createGearDialog","revid":321391,"updated":"2022-05-14T11:20:25Z","groups":["GUI Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Opens gear dialog for given unit.\n\n> [!NOTE]\n> action command can also be used:\n>\n> ```sqf\n> player action [\"Gear\", player];\n> ```","syntaxes":[{"syntax":"createGearDialog [unit, resource]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"resource","type":"String","optional":true,"type_expr":"String","text":"resource: String - (Optional)"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[unit, resource]"}}],"examples":[{"code":["createGearDialog [player];"]}],"see_also":["createDialog","createDisplay","action"]},{"name":"createGroup","title":"createGroup","type":"command","url":"https://community.bistudio.com/wiki/createGroup","revid":364085,"updated":"2024-05-03T19:33:29Z","groups":["Groups"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Creates a new Group for the given Side. Using this command if the group limit is reached will return grpNull. The new Group exists globally, but it's locality is where this command was executed.\n\n|  |  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|---|\n| Game | Operation Flashpoint v1.00 | Operation Flashpoint: Elite v1.00 | Armed Assault v1.00 | Arma 2 v1.00 | Arma 2: Operation Arrowhead v1.50 | Take On Helicopters v1.00 | Arma 3 v1.00 | Arma 3 v1.68 |\n| Group auto-deletion | ✗ |  |  |  |  |  | ✓ |  |\n| Group limit per side | 63 | 144 |  |  |  |  |  | 288 |\n\n> [!IMPORTANT]\n> - Groups can only be created for the west/blufor, opfor/east, independent/resistance, civilian and sideLogic sides - any other side will return grpNull\n> - Before Arma 3, a Side center must exist before group creation (either by having editor-placed units or createCenter usage)\n\n> [!NOTE]\n> **Arma 3:**\n>\n> - createCenter usage is not needed anymore as all centers are automatically created.\n> - When the last unit leaves its group, the group usually gets immediately auto-deleted, regardless of its auto-deletion setting.","syntaxes":[{"syntax":"createGroup side","params":[{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Group","type_expr":"Group","description":"grpNull if the group limit is reached"},"form":"unary","right":{"text":"side"}},{"syntax":"createGroup [side, deleteWhenEmpty]","since":"arma3 1.68","params":[{"name":"side","type":"Side","type_expr":"Side"},{"name":"deleteWhenEmpty","type":"Boolean","description":"true to delete the group when empty.\n\n- If set to true, forces a group to get deleted when empty - it does **not** prevent its deletion by other commands when set to false.\n- Deletion may take up to a minute after the last unit is removed.","type_expr":"Boolean"}],"returns":{"type":"Group","type_expr":"Group","description":"grpNull if the group limit is reached"},"form":"unary","right":{"text":"[side, deleteWhenEmpty]"}}],"examples":[{"code":["private _group = createGroup east;"]},{"code":["private _group = createGroup [east, true];"]}],"see_also":["deleteGroup","deleteGroupWhenEmpty","isGroupDeletedWhenEmpty","group","setGroupId","groupID","units","groupFromNetId","netId","leader","selectLeader","join","createCenter","createUnit","createVehicle","Side"],"notes":[{"user":".kju","date":"2011-01-04T10:19:00Z","text":"A group created with createGroup will get a waypoint at [0,0,0]. When you use createUnit to fill it with units, it will get an additional waypoint at the position the first unit is created. This new waypoint will also be set as currentWaypoint. However keep these two waypoints in mind when you do some scripting involving this groups' waypoints."},{"user":"DreadedEntity","date":"2022-05-04T14:20:23Z","text":"New group is local to the machine that executed the command (**A3 2.08.149102**):\n\n```sqf\nplayer addAction [\"Group Test (Dedicated Server)\", {\n    [[], {\n        _test = createGroup [west, true];\n        [str (local _test)] remoteExec [\"hint\", -2]; //tell all clients group locality; true\n        missionNamespace setVariable [\"Group_Reference\", _test, true]; //broadcast group reference to all players\n    }] remoteExec [\"call\", 2]; //create group on dedicated server only\n    sleep 1;\n    _newGroup = missionNamespace getVariable \"Group_Reference\"; //receive group reference from server\n    systemChat format [\"Group local to player: %1\", local _newGroup]; //false\n}];\n```"}]},{"name":"createGuardedPoint","title":"createGuardedPoint","type":"command","url":"https://community.bistudio.com/wiki/createGuardedPoint","revid":348606,"updated":"2023-11-08T13:45:17Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Adds a point guarded by the given side (scripted way of adding equivalent of \"GUARDED BY\" trigger in Editor). A closest AI group in the given side with assigned \"GUARD\" waypoint will attempt to secure this guard point. The actual guarded position is determined via the following rules:\n\n- Given \"position\" is always considered. It could be Object, Group, Position2D or Position3D. In every case, z coordinate will be ignored and point will be placed on nearest surface.\n- If \"objectMapID\" is not negative, the position of the object with the given ID is used (Overrides \"position\"). -1 to ignore this argument. z of the object position will be intact.\n- If the given \"vehicle\" is valid, the position of the vehicle is extracted and guarded (Overrides both \"position\" and \"objectMapID\"). objNull to ignore. z of the vehicle position will be intact.\n\nTo be used with \"GUARD\" waypoint.\n\n> [!NOTE]\n> To know how does the \"GUARD\" waypoint work, see Waypoint:Guard.","syntaxes":[{"syntax":"createGuardedPoint [side, position, objectMapID, vehicle]","params":[{"name":"side","type":"Side","description":"the side which will be guarding","type_expr":"Side"},{"name":"position","type":"Object, Group, Position2D or Position3D","type_expr":"Object | Group | Position2D | Position3D"},{"name":"objectMapID","type":"Number","description":"static id of map object. -1 to ignore","type_expr":"Number"},{"name":"vehicle","type":"Object","description":"vehicle to be used for position. objNull to ignore","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[side, position, objectMapID, vehicle]"}}],"examples":[{"code":["createGuardedPoint [east, [0,0], -1, vehicle player];"]}],"see_also":["createTrigger","addWaypoint","setWaypointType"]},{"name":"createHashMap","title":"createHashMap","type":"command","url":"https://community.bistudio.com/wiki/createHashMap","revid":308959,"updated":"2022-04-18T21:22:24Z","groups":["HashMap"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Creates a new empty HashMap.","syntaxes":[{"syntax":"createHashMap","params":[],"returns":{"type":"HashMap","type_expr":"HashMap"},"form":"nullary"}],"examples":[{"code":["private _myHashMap = createHashMap;"]}],"see_also":["createHashMapFromArray"]},{"name":"createHashMapFromArray","title":"createHashMapFromArray","type":"command","url":"https://community.bistudio.com/wiki/createHashMapFromArray","revid":377214,"updated":"2026-01-02T00:12:06Z","groups":["HashMap","Arrays"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Creates a new HashMap and initializes it from a key-value pair array","syntaxes":[{"syntax":"createHashMapFromArray [[key1, value1], [key2, value2], ...]","params":[{"name":"keyN","type":"HashMapKey","type_expr":"HashMapKey"},{"name":"valueN","type":"Anything","type_expr":"Anything"}],"returns":{"type":"HashMap","type_expr":"HashMap"},"form":"unary","right":{"text":"[[key1, value1], [key2, value2], ...]"}},{"syntax":"keys createHashMapFromArray values","since":"arma3 2.04","params":[{"name":"keys","type":"Array of HashMapKeys","type_expr":"Array<HashMapKey>"},{"name":"values","type":"Array of Anything","description":"Array of Anything\n\n> [!NOTE]\n> Size of *keys* and size of *values* arrays do not need to be equal. Missing values will be filled with nil.","type_expr":"Array<Anything>","text":"values: Array of Anything\n\n> [!NOTE]\n> Size of *keys* and size of *values* arrays do not need to be equal. Missing values will be filled with nil."}],"returns":{"type":"HashMap","type_expr":"HashMap"},"form":"binary","left":{"text":"keys"},"right":{"text":"values"}}],"examples":[{"code":["createHashMapFromArray [[\"a\", 1], [\"b\", 2], [\"c\", 3]];"]},{"code":["[1, 2, 3, 4] createHashMapFromArray []; // returns [[1, <null>], [2, <null>], [4, <null>], [3, <null>]]"]},{"code":["[1, 2, 3] createHashMapFromArray [\"one\", \"two\", \"three\", \"four\"]; // returns [[1, \"one\"], [2, \"two\"], [3, \"three\"]]"]}],"see_also":["createHashMap"]},{"name":"createHashMapObject","title":"createHashMapObject","type":"command","url":"https://community.bistudio.com/wiki/createHashMapObject","revid":377952,"updated":"2026-01-15T10:26:48Z","groups":["HashMap"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","description":"Create a HashMap with an [Object-Oriented Programming](https://en.wikipedia.org/wiki/Object-oriented_programming) behaviour.\nInside a object, Methods (if they are called correctly, either by engine or via call - Syntax 3) will have the objects instance inside the `_self` variable.\nThe Destructor (\"#delete\" method) will be executed when the last reference to the objects variable gets deleted. (Except when the mission is ended and all variables are deleted at once)\n\nInheritance: HashMap objects support a simple form of Inheritance.\nIt behaves similar to the merge command with overwriteExisting enabled. Sub-class methods and properties with same name, overwrite their Base-class values.\nConstructor/Destructor/Clone methods will be merged together and executed in sequence.\nFlags entry will use overwrite behaviour.","syntaxes":[{"syntax":"createHashMapObject [classDefinition, constructorArguments]","params":[{"name":"classDefinition","type":"HashMap or Array of Arrays, format [name, value]:","description":"HashMap or Array of Arrays, format [name, value]:\n*name* can be anything like any other HashMap, but it must be a String for it to be used like an OOP object method (see call - Syntax 3).\nSome special values, starting with `#`, are reserved and expect a specific *value* type (they are all optional):\n\n- `\"#create\"`: Code - this is the hashmap object's constructor\n- `\"#clone\"`: Code - this is code happening when cloning is done on this hashmap object\n- `\"#delete\"`: Code - this is the hashmap object's destructor. It will always be executed inside missionNamespace.\n- `\"#str\"`: Code - code that is used to evaluate what is displayed when the str function is called on the object - **must** return String\n- `\"#flags\"`: Array of Strings - case-*in*sensitive flags regarding this hashmap object\n  - \"noCopy\": forbids copying, `+_hashMapObject` will throw an error\n  - \"sealed\": prevents from adding and removing any keys - key values can still be edited\n  - \"unscheduled\": all methods (including `#clone` and `#create`) will be executed in unscheduled environment\n- `\"#base\"`: Array or HashMap - declaration of base class for inheritance\n- `\"#type\"`: String - can be used to give a object a \"type name\", on inheritance types will be merged into an Array\n\nNote that all entries beginning with `#` are reserved, the engine might use these internally without their use being documented.","type_expr":"HashMap | Array<Array>","text":"classDefinition: HashMap or Array of Arrays, format [name, value]:\n*name* can be anything like any other HashMap, but it must be a String for it to be used like an OOP object method (see call - Syntax 3).\nSome special values, starting with `#`, are reserved and expect a specific *value* type (they are all optional):\n\n- `\"#create\"`: Code - this is the hashmap object's constructor\n- `\"#clone\"`: Code - this is code happening when cloning is done on this hashmap object\n- `\"#delete\"`: Code - this is the hashmap object's destructor. It will always be executed inside missionNamespace.\n- `\"#str\"`: Code - code that is used to evaluate what is displayed when the str function is called on the object - **must** return String\n- `\"#flags\"`: Array of Strings - case-*in*sensitive flags regarding this hashmap object\n  - \"noCopy\": forbids copying, `+_hashMapObject` will throw an error\n  - \"sealed\": prevents from adding and removing any keys - key values can still be edited\n  - \"unscheduled\": all methods (including `#clone` and `#create`) will be executed in unscheduled environment\n- `\"#base\"`: Array or HashMap - declaration of base class for inheritance\n- `\"#type\"`: String - can be used to give a object a \"type name\", on inheritance types will be merged into an Array\n\nNote that all entries beginning with `#` are reserved, the engine might use these internally without their use being documented."},{"name":"constructorArguments","type":"Anything","optional":true,"default":"Nothing","description":"passed as `_this` argument to the \"#create\" method.","type_expr":"Anything","text":"constructorArguments: Anything - (Optional, default Nothing) passed as `_this` argument to the \"#create\" method."}],"returns":{"type":"HashMap","type_expr":"HashMap"},"form":"unary","right":{"text":"[classDefinition, constructorArguments]"}}],"examples":[{"text":"```sqf\nprivate _declaration = [\n    [\"#flags\", [\"sealed\"]],\n    [\"#create\", { hint \"Hello!\" }],\n    [\"#clone\", { hint \"We were copied!\" }],\n    [\"#delete\", { hint \"Goodbye\" }],\n    [\"#str\", { \"My HashMap Object\" }],\n    [\"Method\", { hint \"Method has been called\" }]\n];\n\nprivate _hashMapObject = createHashMapObject [_declaration];    // hints \"Hello!\"\n_hashMapObject call [\"Method\"];                                    // hints \"Method has been called\"\nhint str _hashMapObject;                                        // hints \"My HashMap Object\"\nprivate _shallowCopy = _hashMapObject;                            // no hint\nprivate _deepCopy = +_hashMapObject;                            // hints \"We were copied!\"\n// at the end of the scope, _hashMapObject is deleted and hints \"Goodbye\"\n```","code":["private _declaration = [\n\t[\"#flags\", [\"sealed\"]],\n\t[\"#create\", { hint \"Hello!\" }],\n\t[\"#clone\", { hint \"We were copied!\" }],\n\t[\"#delete\", { hint \"Goodbye\" }],\n\t[\"#str\", { \"My HashMap Object\" }],\n\t[\"Method\", { hint \"Method has been called\" }]\n];\n\nprivate _hashMapObject = createHashMapObject [_declaration];\t// hints \"Hello!\"\n_hashMapObject call [\"Method\"];\t\t\t\t\t\t\t\t\t// hints \"Method has been called\"\nhint str _hashMapObject;\t\t\t\t\t\t\t\t\t\t// hints \"My HashMap Object\"\nprivate _shallowCopy = _hashMapObject;\t\t\t\t\t\t\t// no hint\nprivate _deepCopy = +_hashMapObject;\t\t\t\t\t\t\t// hints \"We were copied!\"\n// at the end of the scope, _hashMapObject is deleted and hints \"Goodbye\""]},{"text":"Inheritance constructor/destructor/copy orderings:\n\n```sqf\nprivate _animalDeclaration = [\n    [\"#type\", \"IAnimal\"],\n    [\"#create\", { systemChat \"Animal Init\" }],\n    [\"#clone\", { systemChat \"Animal Copied\" }],\n    [\"#delete\", { systemChat \"Animal Bye\" }]\n];\n\nprivate _pigDeclaration = [\n    [\"#base\", _animalDeclaration],\n    [\"#type\", \"Pig\"],\n    [\"#create\", { systemChat \"Pig Init\" }],\n    [\"#clone\", { systemChat \"Pig Copied\" }],\n    [\"#delete\", { systemChat \"Pig Bye\" }]\n];\n\nprivate _smolPigDeclaration = [\n    [\"#base\", _pigDeclaration],\n    [\"#type\", \"SmolPig\"],\n    [\"#create\", { systemChat \"SmolPig Init\" }],\n    [\"#clone\", { systemChat \"Smol Copied\" }],\n    [\"#delete\", { systemChat \"Smol Bye\" }]\n];\n\nprivate _smolPigInstance = createHashMapObject [_smolPigDeclaration]; // prints \"Animal Init\", \"Pig Init\", \"SmolPig Init\"\nprivate _copy = +_smolPigInstance; // prints \"Animal Copied\", \"Pig Copied\", \"SmolPig Copied\"\n_copy = nil; // prints \"SmolPig Bye\", \"Pig Bye\", \"Animal Bye\"\n```","code":["private _animalDeclaration = [\n\t[\"#type\", \"IAnimal\"],\n\t[\"#create\", { systemChat \"Animal Init\" }],\n\t[\"#clone\", { systemChat \"Animal Copied\" }],\n\t[\"#delete\", { systemChat \"Animal Bye\" }]\n];\n\nprivate _pigDeclaration = [\n\t[\"#base\", _animalDeclaration],\n\t[\"#type\", \"Pig\"],\n\t[\"#create\", { systemChat \"Pig Init\" }],\n\t[\"#clone\", { systemChat \"Pig Copied\" }],\n\t[\"#delete\", { systemChat \"Pig Bye\" }]\n];\n\nprivate _smolPigDeclaration = [\n\t[\"#base\", _pigDeclaration],\n\t[\"#type\", \"SmolPig\"],\n\t[\"#create\", { systemChat \"SmolPig Init\" }],\n\t[\"#clone\", { systemChat \"Smol Copied\" }],\n\t[\"#delete\", { systemChat \"Smol Bye\" }]\n];\n\nprivate _smolPigInstance = createHashMapObject [_smolPigDeclaration]; // prints \"Animal Init\", \"Pig Init\", \"SmolPig Init\"\nprivate _copy = +_smolPigInstance; // prints \"Animal Copied\", \"Pig Copied\", \"SmolPig Copied\"\n_copy = nil; // prints \"SmolPig Bye\", \"Pig Bye\", \"Animal Bye\""]},{"text":"Inheritance type checking:\n\n```sqf\nprivate _animalDeclaration = [\n    [\"#type\", \"IAnimal\"],\n    [\"FurType\", { \"None\" }] // default implementation\n];\n\nprivate _pigDeclaration = [\n    [\"#base\", _animalDeclaration],\n    [\"#type\", \"Pig\"],\n    [\"FurType\", { \"Bristles\" }] // override the base class method\n];\n\nprivate _catDeclaration = [\n    [\"#base\", _animalDeclaration],\n    [\"#type\", \"Cat\"],\n    [\"FurType\", { \"Hair\" }] // override the base class method\n];\n\nprivate _instance = createHashMapObject [selectRandom [_pigDeclaration, _catDeclaration]];\n\nif (\"IAnimal\" in (_instance get \"#type\")) then // check if a object instance is or inherits from a specific type\n{\n    _instance call [\"FurType\"]; // now that we know it implements IAnimal, we know that \"FurType\" method will be present\n};\n```","code":["private _animalDeclaration = [\n\t[\"#type\", \"IAnimal\"],\n\t[\"FurType\", { \"None\" }] // default implementation\n];\n\nprivate _pigDeclaration = [\n\t[\"#base\", _animalDeclaration],\n\t[\"#type\", \"Pig\"],\n\t[\"FurType\", { \"Bristles\" }] // override the base class method\n];\n\nprivate _catDeclaration = [\n\t[\"#base\", _animalDeclaration],\n\t[\"#type\", \"Cat\"],\n\t[\"FurType\", { \"Hair\" }] // override the base class method\n];\n\nprivate _instance = createHashMapObject [selectRandom [_pigDeclaration, _catDeclaration]];\n\nif (\"IAnimal\" in (_instance get \"#type\")) then // check if a object instance is or inherits from a specific type\n{\n\t_instance call [\"FurType\"]; // now that we know it implements IAnimal, we know that \"FurType\" method will be present\n};"]},{"text":"Destructor:\n\n```sqf\nprivate _temporaryVehicle = [\n    [\"#create\", {\n        params [\"_vehicleType\", \"_vehiclePos\", \"_lifetimeSeconds\"]; // handle constructor arguments\n        private _newVehicle = _vehicleType createVehicle _vehiclePos;\n        _self set [\"MyVehicle\", _newVehicle]; // Store the vehicle inside the object for later\n\n        // because _self is passed as parameter, it will be referenced by the spawned script until it ends.\n        [_lifetimeSeconds, _self] spawn { params [\"_lifetimeSeconds\", \"_self\"]; sleep _lifetimeSeconds; };\n    }],\n    [\"#delete\", {\n        deleteVehicle (_self get \"MyVehicle\"); // delete the vehicle when we go away\n    }],\n    [\"MyVehicle\", objNull] // placeholder, this is not needed\n];\n\n// create a temporary RoadCone, at player position, that will delete itself after 5 seconds.\ncreateHashMapObject [_temporaryVehicle, [\"RoadCone_F\", getPos player, 5]];\n```","code":["private _temporaryVehicle = [\n\t[\"#create\", {\n\t\tparams [\"_vehicleType\", \"_vehiclePos\", \"_lifetimeSeconds\"]; // handle constructor arguments\n\t\tprivate _newVehicle = _vehicleType createVehicle _vehiclePos;\n\t\t_self set [\"MyVehicle\", _newVehicle]; // Store the vehicle inside the object for later\n\n\t\t// because _self is passed as parameter, it will be referenced by the spawned script until it ends.\n\t\t[_lifetimeSeconds, _self] spawn { params [\"_lifetimeSeconds\", \"_self\"]; sleep _lifetimeSeconds; };\n\t}],\n\t[\"#delete\", {\n\t\tdeleteVehicle (_self get \"MyVehicle\"); // delete the vehicle when we go away\n\t}],\n\t[\"MyVehicle\", objNull] // placeholder, this is not needed\n];\n\n// create a temporary RoadCone, at player position, that will delete itself after 5 seconds.\ncreateHashMapObject [_temporaryVehicle, [\"RoadCone_F\", getPos player, 5]];"]}],"see_also":["call","createHashMap"]},{"name":"createLocation","title":"createLocation","type":"command","url":"https://community.bistudio.com/wiki/createLocation","revid":322768,"updated":"2022-06-23T13:56:55Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","locality":{"effect":"local"},"description":"Creates a location of the specified class and dimensions at the specified position.\nClasses are defined in `CfgLocationTypes`; for possible location types see Location Types.\nThe alternative syntax allows to convert a non-editable (built-in) terrain location into an editable one, with the following restrictions:\n\n- it cannot be deleted (but can be setType to \"Invisible\" to hide it)\n- it cannot be moved","syntaxes":[{"syntax":"createLocation [className, position, sizeX, sizeY]","params":[{"name":"className","type":"String","type_expr":"String"},{"name":"position","type":"Position2D, Position3D or Object","type_expr":"Position2D | Position3D | Object"},{"name":"sizeX","type":"Number","description":"in meters","type_expr":"Number"},{"name":"sizeY","type":"Number","description":"in meters","type_expr":"Number"}],"returns":{"type":"Location","type_expr":"Location"},"form":"unary","right":{"text":"[className, position, sizeX, sizeY]"}},{"syntax":"createLocation [location]","since":"arma3 2.10","params":[{"name":"location","type":"Location","description":"a terrain's location. If a scripted location is provided, it is simply returned","type_expr":"Location"}],"returns":{"type":"Location","type_expr":"Location","description":"a script-editable location"},"form":"unary","right":{"text":"[location]"}}],"examples":[{"code":["_location = createLocation [\"NameVillage\", [4035,2151,10], 100, 100];"]},{"code":["_location = createLocation [\"NameVillage\", [4035,2151,10], 30, 30];\n_location setText \"Player town\";"]},{"text":"```sqf\nprivate _terrainLocation = nearestLocation [player, \"nameCity\"];    // assuming it returns a built-in location\n_terrainLocation setType \"Invisible\";                                // does not do anything\nprivate _editableLocation = createLocation [_terrainLocation];        // does the conversion\n_editableLocation setType \"Invisible\";                                // hides the location\n```","code":["private _terrainLocation = nearestLocation [player, \"nameCity\"];\t// assuming it returns a built-in location\n_terrainLocation setType \"Invisible\";\t\t\t\t\t\t\t\t// does not do anything\nprivate _editableLocation = createLocation [_terrainLocation];\t\t// does the conversion\n_editableLocation setType \"Invisible\";\t\t\t\t\t\t\t\t// hides the location"]}],"see_also":["setText","nearestLocation","nearestLocations","locationPosition","nearestLocationWithDubbing","setRectangular","rectangular","size"]},{"name":"createMarker","title":"createMarker","type":"command","url":"https://community.bistudio.com/wiki/createMarker","revid":378854,"updated":"2026-07-21T08:47:29Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Creates a new map marker at the given position. The marker will be created for every connected player as well as all JIP players. The marker name has to be unique; the command will be ignored if a marker with the given name already exists.\n\n> [!IMPORTANT]\n> The marker will be visible only once at least markerType has been defined:\n>\n> ```sqf\n> _marker = createMarker [\"markername\", player]; // Not visible yet.\n> _marker setMarkerType \"hd_dot\"; // Visible.\n> ```\n\n> [!NOTE]\n> If the marker position is given in 3D format, the `z`-coordinate is stored with the marker and will be used when the marker is passed to commands such as createVehicle, createUnit, createAgent, createMine or setVehiclePosition.\n> When a marker is manually placed in the editor, `z` is always 0, which means the marker is placed on the ground. But when the player places a marker on the map in game, it is placed at sea level, so the `z`-coordinate of that marker is `-getTerrainHeightASL markerPos \"userMarker\";`.","syntaxes":[{"syntax":"createMarker [name, position, channel, creator]","params":[{"name":"name","type":"String","description":"the marker's name, used to reference the marker in scripts.","type_expr":"String"},{"name":"position","type":"Position2D, PositionAGL or Object","description":"In case of an object, the object's model [0,0,0] is used.","type_expr":"Position2D | PositionAGL | Object"},{"name":"channel","type":"Number","optional":true,"default":"-1","description":"the marker channel - see Channel IDs (for multiplayer)","type_expr":"Number","since":"arma3 2.02","text":"channel: Number - (Optional, default -1) the marker channel - see Channel IDs (for multiplayer)"},{"name":"creator","type":"Object","optional":true,"default":"objNull","description":"the marker creator (for multiplayer)","type_expr":"Object","since":"arma3 2.02","text":"creator: Object - (Optional, default objNull) the marker creator (for multiplayer)"}],"returns":{"type":"String","type_expr":"String","description":"the marker's name or empty string if the marker name is not unique."},"form":"unary","right":{"text":"[name, position, channel, creator]"}}],"examples":[{"code":["_marker1 = createMarker [\"Marker1\", position player];"]},{"code":["_marker2 = createMarker [\"Marker2\", player]; // since Arma 3 1.50"]}],"multiplayer":"> [!NOTE]\n> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.\n> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).","problems":"setMarkerDrawPriority sorts allMapMarkers from least to most priority. Before Arma 3 v2.18 createMarker/createMarkerLocal did **not** care about drawing priority and added the created marker to the end of the array, making it top priority. Running setMarkerDrawPriority again sorted this issue.","see_also":["createMarkerLocal","deleteMarker","BIS_fnc_markerToString","BIS_fnc_stringToMarker"],"notes":[{"user":"Soldia","date":"2015-09-19T21:02:00Z","text":"createMarker accepts an object as position parameter as well . You could try this with the following code (both SP/MP)\n\n```sqf\n_markerstr = createMarker [\"markername\", player];\n_markerstr setMarkerShape \"RECTANGLE\";\n_markerstr setMarkerSize [100, 100];\n```"},{"user":"X39","date":"2018-05-28T11:57:00Z","text":"In Arma 3, one can create markers which are deletable by the user by prefixing the name with `_USER_DEFINED`.\n\nExample:\n\n```sqf\ncreateMarker \"_USER_DEFINED someMarkerName\"\n```"},{"user":"7erra","date":"2019-05-03T15:53:00Z","text":"There is a new function with which you can create a marker with all settings applied in one step: BIS_fnc_stringToMarker and BIS_fnc_stringToMarkerLocal"},{"user":"Tirpitz","date":"2021-01-26T22:42:00Z","text":"When creating a marker with the name format: \"_USER_DEFINED #n1/n2/n3\".\nn1 can be used to set the owner, n2 I think is an incrementing index to ensure markers are unique, to this end also mangle some more characters onto the end of the string, and n3 is the channel ID the marker is in.\n\n```sqf\n_markerName = format [\"_USER_DEFINED #%1/%2/%3\" , clientOwner,_index, _ChannelID];\n_marker = createMarkerLocal [_markerName, _pos];\n```"},{"user":"POLPOX","date":"2023-07-08T16:03:57Z","text":"If you use the letter \"/\" in the name, it may break the channel visibilities (especially in MP).\nPossible reason is described above by Tirpitz, the engine may confuse which channel the marker belongs to after the \"/\"."},{"user":"Leopard20","date":"2026-07-21T08:47:29Z","text":"You can use a helper function if you intend to call createMarker with duplicate marker names. It doesn't necessarily guarantee that the marker has been created (e.g. it could fail not due to duplicate name, but due to maximum number of allowed markers reached)\n\n```sqf\nprivate _fnc_createMarkerSafe = { private _marker = _this#0; createMarker _this; _marker };\nprivate _marker = [\"MyMarker\", [0,0]] call _fnc_createMarkerSafe; // will return \"MyMarker\"\n```"}]},{"name":"createMarkerLocal","title":"createMarkerLocal","type":"command","url":"https://community.bistudio.com/wiki/createMarkerLocal","revid":378419,"updated":"2026-04-05T12:27:41Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.04","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.04","arma3_since":"0.50","locality":{"effect":"local"},"description":"Creates a local marker at the given position - the marker only exists on the machine that created it. The marker name has to be unique, if a marker with the given name exists, the command will be ignored. Use deleteMarkerLocal to delete a local marker.\n\nIf the position is given in 3D format, `z` coordinate is stored with the marker and will be used when marker is passed to commands like createVehicle, createUnit, createAgent, createMine, setVehiclePosition for example. However getMarkerPos and markerPos will always return 0 for `z`.\n\n> [!IMPORTANT]\n> Local markers have their own set of local commands \"xxMarkerxxLocal\" to work with. If you use global marker commands on a local marker, the local marker will become **global**.","syntaxes":[{"syntax":"createMarkerLocal [name, position, channel, creator]","params":[{"name":"name","type":"String","type_expr":"String"},{"name":"position","type":"Position2D, PositionAGL or Object","description":"object's model centre is used (see getPosWorld)","type_expr":"Position2D | PositionAGL | Object"},{"name":"channel","type":"Number","optional":true,"description":"The marker side for multiplayer","type_expr":"Number","since":"arma3 2.02","text":"channel: Number - (Optional)The marker side for multiplayer"},{"name":"creator","type":"Object","optional":true,"description":"The marker creator for multiplayer","type_expr":"Object","since":"arma3 2.02","text":"creator: Object - (Optional) The marker creator for multiplayer"}],"returns":{"type":"String","type_expr":"String","description":"the marker's name, or an empty string if the marker name is not unique"},"form":"unary","right":{"text":"[name, position, channel, creator]"}}],"examples":[{"code":["_marker = createMarkerLocal [\"Marker1\", position player];"]}],"multiplayer":"createMarkerLocal is local, so it should be used along with the other local commands. For global equivalent use createMarker.","problems":"setMarkerDrawPriority sorts allMapMarkers from least to most priority. Before Arma 3 v2.18 createMarker/createMarkerLocal did **not** care about drawing priority and added the created marker to the end of the array, making it top priority. Running setMarkerDrawPriority again sorted this issue.","see_also":["allMapMarkers","deleteMarkerLocal","createMarker","setMarkerBrushLocal","setMarkerColorLocal","setMarkerDirLocal","setMarkerPosLocal","setMarkerShapeLocal","setMarkerSizeLocal","setMarkerTextLocal","setMarkerTypeLocal","setMarkerAlphaLocal","BIS_fnc_markerToString","BIS_fnc_stringToMarkerLocal"],"notes":[{"user":"Hoz","date":"2007-01-06T17:21:00Z","text":"To create a marker which is visible on the map you need to define *at least* the following three settings:\n\n```sqf\n_markerstr = createMarkerLocal [\"markername\",[_Xpos,_Ypos]];\n_markerstr setMarkerShapeLocal \"ICON\";\n_markerstr setMarkerTypeLocal \"DOT\";\n```"}]},{"name":"createMenu","title":"createMenu","type":"command","url":"https://community.bistudio.com/wiki/createMenu","revid":363232,"updated":"2024-03-26T10:51:07Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Creates a previously added menu.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map createMenu index","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"index"}}],"examples":[{"text":"-"}]},{"name":"createMine","title":"createMine","type":"command","url":"https://community.bistudio.com/wiki/createMine","revid":377391,"updated":"2026-01-02T06:44:33Z","groups":["Mines"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Creates a mine of the given type.\nIf the *markers* array only contains one marker name, it is ignored and the *position* parameter is used instead.\nIf *markers* contains multiple marker names, one of them is chosen randomly and used as the center of the placement area.\n\nThis command creates objects of the `CfgAmmo` class named in `configFile >> \"CfgVehicles\" >> _type >> \"ammo\"`.\n\n> [!NOTE]\n> Unit ability to detect mines depends on many factors:\n>\n> The starting value is defined in config, for example `./CfgVehicles/B_soldier_F/detectSkill`, which in this case is 12.\n> Mine specialist value for example, defined in `./CfgVehicles/B_soldier_exp_F/detectSkill` is 38.\n>\n> This value is then dynamically reduced depending on factors such as distance, if a unit is in a vehicle, if it is day or night time, how directly unit is looking at the mine, how fast unit is moving, how inconspicuous is the mine or even if it is visible.","syntaxes":[{"syntax":"createMine [type, position, markers, placement]","params":[{"name":"type","type":"String","description":"mine class name from `CfgVehicles`","type_expr":"String"},{"name":"position","type":"Object or PositionAGL","type_expr":"Object | PositionAGL"},{"name":"markers","type":"Array of Strings","description":"marker name(s)","type_expr":"Array<String>"},{"name":"placement","type":"Number","description":"placement radius","type_expr":"Number"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"[type, position, markers, placement]"}}],"examples":[{"code":["_mine = createMine [\"APERSMine\", ASLToAGL getPosASL player, [], 3];"]},{"text":"Create a satchel charge and give the player control over it:\n\n```sqf\n_charge = createMine [\"SatchelCharge_F\", player, [], 0];\nplayer addOwnedMine _charge;\n```","code":["_charge = createMine [\"SatchelCharge_F\", player, [], 0];\nplayer addOwnedMine _charge;"]}],"see_also":["allMines","detectedMines","mineDetectedBy","mineActive","revealMine","getAllOwnedMines","addOwnedMine","removeOwnedMine","removeAllOwnedMines"],"notes":[{"user":"Tankbuster","date":"2017-06-05T22:43:00Z","text":"Note that this command uses AGL (very similar to ASL) positions, so if you want to use the moored or seabed mine, you'll have to find the appropriate negative z value that is underwater and convert that to ASL.\nAlso note that you can't adjust the positions of sea mines after they've been created. The command is either ignored or not propagated across the network to clients."},{"user":"Killzone_Kid","date":"2019-09-25T03:28:00Z","text":"The following explosives used in Arma 3 can be created with this command:\n\n| Mines | Remote detonation charges |\n|---|---|\n| - `\"ATMine\"`<br>- `\"APERSMine\"`<br>- `\"APERSBoundingMine\"`<br>- `\"SLAMDirectionalMine\"`<br>- `\"APERSTripMine\"`<br>- `\"UnderwaterMine\"`<br>- `\"UnderwaterMineAB\"`<br>- `\"UnderwaterMinePDM\"` | - `\"SatchelCharge_F\"`<br>- `\"DemoCharge_F\"`<br>- `\"Claymore_F\"`<br>- `\"IEDUrbanBig_F\"`<br>- `\"IEDLandBig_F\"`<br>- `\"IEDUrbanSmall_F\"`<br>- `\"IEDLandSmall_F\"` |"}]},{"name":"createMissionDisplay","title":"createMissionDisplay","type":"command","url":"https://community.bistudio.com/wiki/createMissionDisplay","revid":368962,"updated":"2024-08-21T08:48:56Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Create single missions display as a child of given display. The mission dialog will be set to the directory given as an argument \"root\".","syntaxes":[{"syntax":"display createMissionDisplay missionRootDirectoryString","params":[{"name":"display","type":"Display","type_expr":"Display"},{"name":"missionRootDirectoryString","type":"String","type_expr":"String"}],"returns":{"type":"Display","type_expr":"Display"},"form":"binary","left":{"text":"display"},"right":{"text":"missionRootDirectoryString"}},{"syntax":"display createMissionDisplay [missionRootDirectoryString, cfgMissionsClass]","params":[{"name":"display","type":"Display","type_expr":"Display"},{"name":"missionRootDirectoryString","type":"String","description":"root direction from `\\Arma 3\\Missions\\ROOT`","type_expr":"String"},{"name":"cfgMissionsClass","type":"String","description":"cfgMissions class to use","type_expr":"String"}],"returns":{"type":"Display","type_expr":"Display"},"form":"binary","left":{"text":"display"},"right":{"text":"[missionRootDirectoryString, cfgMissionsClass]"}}],"examples":[{"code":["_ChildDisplay = _Rootdisplay createMissionDisplay \"Tutorial\";"]},{"text":"In Arma 3 this creates the scenarios UI:\n\n```sqf\nfindDisplay 46 createMissionDisplay \"\";\n```","code":["findDisplay 46 createMissionDisplay \"\";"]},{"text":"Other options for Arma 3:\n\n```sqf\nprivate _missionDisplay = findDisplay 46;\n_missionDisplay createMissionDisplay [\"\", \"Cutscenes\"];\n_missionDisplay createMissionDisplay [\"\", \"Campaigns\"];\n_missionDisplay createMissionDisplay [\"\", \"MPMissions\"];\n_missionDisplay createMissionDisplay [\"\", \"Challenges\"];\n_missionDisplay createMissionDisplay [\"\", \"Showcases\"];\n```","code":["private _missionDisplay = findDisplay 46;\n_missionDisplay createMissionDisplay [\"\", \"Cutscenes\"];\n_missionDisplay createMissionDisplay [\"\", \"Campaigns\"];\n_missionDisplay createMissionDisplay [\"\", \"MPMissions\"];\n_missionDisplay createMissionDisplay [\"\", \"Challenges\"];\n_missionDisplay createMissionDisplay [\"\", \"Showcases\"];"]}],"see_also":["createMPCampaignDisplay","playMission","playScriptedMission","hostMission"]},{"name":"createMPCampaignDisplay","title":"createMPCampaignDisplay","type":"command","url":"https://community.bistudio.com/wiki/createMPCampaignDisplay","revid":368963,"updated":"2024-08-21T08:49:17Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","locality":{"argument":"local","effect":"local"},"description":"Create a MP campaign display. The class name must be a mission collection declared in the configs; for example, `configFile >> \"CfgMissions\" >> \"MPMissions\" >> \"Apex\"`\nIf the class does not exist or is not a mission collection, the display will be created empty.","syntaxes":[{"syntax":"display createMPCampaignDisplay class","params":[{"name":"display","type":"Display","type_expr":"Display"},{"name":"class","type":"String","description":"mission collection classname","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"display"},"right":{"text":"class"}}],"examples":[{"code":["findDisplay 46 createMPCampaignDisplay \"Apex\";"]}],"see_also":["createMissionDisplay","playMission","playScriptedMission","hostMission"],"notes":[{"user":"R3vo","date":"2016-07-14T23:16:00Z","text":"```sqf\nfindDisplay 46 createMPCampaignDisplay \"123\";\n```\n\nAPEX Protocol Campaign Screen"}]},{"name":"createSimpleObject","title":"createSimpleObject","type":"command","url":"https://community.bistudio.com/wiki/createSimpleObject","revid":377446,"updated":"2026-01-02T06:47:00Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","locality":{"effect":"global"},"description":"Create object with given shape defined as path to .p3d model. Supported LODs include Geometry, Fire Geometry, Roadway, View Geometry and ShadowVolume. Supported features include collision, texturing, animation, penetration, AI spotting occlusion, and surface specific sounds (like footsteps). Unsupported features include PhysX, damage, AI pathfinding (causes walking through walls), and built-in lights.\n\nGiven the simulation limitations, global decorative objects can be created with very little network traffic. Objects that could be exclusively created with this command are: trees, bushes, rocks, bridges, roads, vehicle wrecks, custom models in mission, and other objects without a class in config. The height of the placement position might need to be adjusted experimentally.\n\n> [!NOTE]\n> - See Arma 3: Simple Objects to learn more about simple objects.\n> - See Arma 3: createSimpleObject/objects for a p3d models' list.\n> - See Arma 3: Livonia Props for Livonia furniture.\n>\n> Please note that:\n>\n> - addAction does not work with simple objects.\n> - objects created with Syntax 1 cannot be textured. Some objects may also have inverted default direction.\n> - objects created with Syntax 2 can be textured. The default direction should match the direction of the object if it was created with createVehicle.\n> - only as of Arma 3 v1.68 do simple objects support getVariable and setVariable.","syntaxes":[{"syntax":"createSimpleObject [shapeName, positionWorld, local]","params":[{"name":"shapeName","type":"String","description":"path to the 3d model (can be obtained with getModelInfo command)","type_expr":"String"},{"name":"positionWorld","type":"PositionASL","description":"placement position by the **model centre**'s position (see getPosWorld)","type_expr":"PositionASL"},{"name":"local","type":"Boolean","optional":true,"default":"false","description":"true to create a local instance only","type_expr":"Boolean","since":"arma3 1.96","text":"local: Boolean - (Optional, default false) true to create a local instance only"}],"returns":{"type":"Object","type_expr":"Object","description":"created simple object"},"form":"unary","right":{"text":"[shapeName, positionWorld, local]"}},{"syntax":"createSimpleObject [className, positionASL, local]","params":[{"name":"className","type":"String","description":"CfgVehicles class name","type_expr":"String"},{"name":"positionASL","type":"PositionASL","description":"placement position","type_expr":"PositionASL"},{"name":"local","type":"Boolean","optional":true,"default":"false","description":"true to create a local instance only","type_expr":"Boolean","since":"arma3 1.96","text":"local: Boolean - (Optional, default false) true to create a local instance only"}],"returns":{"type":"Object","type_expr":"Object","description":"created simple object"},"form":"unary","right":{"text":"[className, positionASL, local]"}}],"examples":[{"text":"```sqf\nprivate _pos = player getRelPos [10, 0];\nprivate _tank = createSimpleObject [\"a3\\armor_f_beta\\apc_tracked_01\\apc_tracked_01_rcws_f.p3d\", _pos];\n_tank setPos (_pos vectorAdd (getPosWorld _tank vectorDiff (_tank modelToWorld [0,0,0])));\n\n_tank hideSelection [\"zasleh\", true];\n_tank hideSelection [\"zasleh2\", true];\n_tank hideSelection [\"clan\", true];\n\n_tank animate [\"Wheel_podkoloL3\", 0.5, true];\n_tank animate [\"Wheel_podkoloL6\", 0.5, true];\n```","code":["private _pos = player getRelPos [10, 0];\nprivate _tank = createSimpleObject [\"a3\\armor_f_beta\\apc_tracked_01\\apc_tracked_01_rcws_f.p3d\", _pos];\n_tank setPos (_pos vectorAdd (getPosWorld _tank vectorDiff (_tank modelToWorld [0,0,0])));\n\n_tank hideSelection [\"zasleh\", true];\n_tank hideSelection [\"zasleh2\", true];\n_tank hideSelection [\"clan\", true];\n \n_tank animate [\"Wheel_podkoloL3\", 0.5, true];\n_tank animate [\"Wheel_podkoloL6\", 0.5, true];"]},{"text":"```sqf\nprivate _pos = player getRelPos [10, 0];\nprivate _tank = createSimpleObject [\"B_APC_Tracked_01_CRV_F\", AGLToASL _pos];\n_tank setObjectTexture [0, \"#(rgb,8,8,3)color(0,1,0,0.01)\"];\n\n_tank hideSelection [\"zasleh\", true];\n_tank hideSelection [\"zasleh2\", true];\n_tank hideSelection [\"clan\", true];\n\n_tank animate [\"Wheel_podkoloL3\", 0.5, true];\n_tank animate [\"Wheel_podkoloL6\", 0.5, true];\n```","code":["private _pos = player getRelPos [10, 0];\nprivate _tank = createSimpleObject [\"B_APC_Tracked_01_CRV_F\", AGLToASL _pos];\n_tank setObjectTexture [0, \"#(rgb,8,8,3)color(0,1,0,0.01)\"];\n\n_tank hideSelection [\"zasleh\", true];\n_tank hideSelection [\"zasleh2\", true];\n_tank hideSelection [\"clan\", true];\n  \n_tank animate [\"Wheel_podkoloL3\", 0.5, true];\n_tank animate [\"Wheel_podkoloL6\", 0.5, true];"]},{"text":"Create a pond:\n\n```sqf\nprivate _waterTileModel = \"a3\\structures_f_enoch\\Water\\pond_big_01.p3d\"; // visual only - this pond is a hard surface\nprivate _tileSize = 18; // width & height\nprivate _tileX = 10;\nprivate _tileY = 5;\nprivate _bottomLeftCorner = getPosWorld player;\nprivate _tilePos = -1;\nprivate _tiles = [];\nprivate _tile = objNull;\nfor \"_y\" from 0 to (_tileY - 1) do\n{\n    for \"_x\" from 0 to (_tileX - 1) do\n    {\n        _tilePos = _bottomLeftCorner vectorAdd [_x * _tileSize, _y * _tileSize, 0];\n        _tile = createSimpleObject [_waterTileModel, _tilePos];\n        _tiles pushBack _tile;\n    };\n};\nsleep 10;\n{ deleteVehicle _x } forEach _tiles;\n```","code":["private _waterTileModel = \"a3\\structures_f_enoch\\Water\\pond_big_01.p3d\"; // visual only - this pond is a hard surface\nprivate _tileSize = 18; // width & height\nprivate _tileX = 10;\nprivate _tileY = 5;\nprivate _bottomLeftCorner = getPosWorld player;\nprivate _tilePos = -1;\nprivate _tiles = [];\nprivate _tile = objNull;\nfor \"_y\" from 0 to (_tileY - 1) do\n{\n\tfor \"_x\" from 0 to (_tileX - 1) do\n\t{\n\t\t_tilePos = _bottomLeftCorner vectorAdd [_x * _tileSize, _y * _tileSize, 0];\n\t\t_tile = createSimpleObject [_waterTileModel, _tilePos];\n\t\t_tiles pushBack _tile;\n\t};\n};\nsleep 10;\n{ deleteVehicle _x } forEach _tiles;"]}],"see_also":["isSimpleObject","hideSelection","selectionPosition","getModelInfo","getObjectType","cursorObject","selectionNames","animationNames","createVehicle","enableSimulation","hideObject","getMissionPath","allLODs","Arma 3: Simple Objects","Arma 3: createSimpleObject/objects"],"notes":[{"user":"Killzone_Kid","date":"2016-04-18T20:03:00Z","text":"The easiest way to correctly place simple object is to create normal object of the same shape from class (if possible), then copy getPosWorld, vectorDir and vectorUp from it. Then create the simple object and apply copied values to it, this will position simple object exactly as normal object was positioned:\n\n```sqf\nprivate _heli = \"B_Heli_Light_01_F\" createVehicleLocal (player getRelPos [10, 0]);\nprivate _position = getPosWorld _heli;\nprivate _vectorDirUp = [vectorDir _heli, vectorUp _heli];\nprivate _model = getModelInfo _heli select 1;\ndeleteVehicle _heli;\nprivate _simpleHeli = createSimpleObject [_model, _position];\n_simpleHeli setVectorDirAndUp _vectorDirUp;\n```"},{"user":"Waffle SS.","date":"2016-04-28T18:10:00Z","text":"Models from within the mission file/folder can be created, but full system path is needed. See getMissionPath"},{"user":"Waffle SS.","date":"2016-05-11T01:28:00Z","text":"simulationEnabled returns false."},{"user":"Warka","date":"2016-09-05T15:10:00Z","text":"There is a section in function library dedicated to simple object creation and interaction. It's purpose is to simplify the operations:\n\n- BIS_fnc_createSimpleObject\n  - creates simple object according to the supplied data\n  - you can supply p3d path, class name or data you get from scanning a non-simple object\n\n- BIS_fnc_simpleObjectData\n  - gathers and returns data about the non-simple object\n  - data can be then used to create simple object\n\n- BIS_fnc_replaceWithSimpleObject\n  - replaces non-simple object with simple object on the scene\n  - do not use it in large scale in MP missions as it is not network efficient\n\n- BIS_fnc_adjustSimpleObject\n  - adjusts simple object to looks as close to the non-simple object as possible\n  - function is internally called from the 'BIS_fnc_createSimpleObject', you won't probably need to call this function directly\n\nCheck the function headers for more info about the input parameters and possibilities."},{"user":"POLPOX","date":"2024-01-27T23:23:10Z","text":"Before circa Arma 3 2.07: The path must **not** start with a backslash:\n\n|  |  |\n|---|---|\n| ✗ | `\"\\a3\\armor_f_beta...` |\n| ✓ | `\"a3\\armor_f_beta...` |"}]},{"name":"createSimpleTask","title":"createSimpleTask","type":"command","url":"https://community.bistudio.com/wiki/createSimpleTask","revid":379287,"updated":"2026-10-30T23:46:26Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Creates a new Task and adds it to the Diary.\n\n> [!NOTE]\n> **Arma 3:** Using the **Arma 3: Task Framework** instead is recommended\n\n> [!NOTE]\n> When task is added as a child, it appears as subcategory to the parent task in the Tasks menu and can be parent to another child task. However this is cosmetic appearance as each task has own id and can be referenced directly via diary link.","syntaxes":[{"syntax":"unit createSimpleTask [name, parentTask]","params":[{"name":"unit","type":"Object","description":"unit to add this new task","type_expr":"Object"},{"name":"name","type":"String","type_expr":"String"},{"name":"parentTask","type":"Task","optional":true,"default":"taskNull","description":"The new task will be a sub task of the parent task","type_expr":"Task","text":"parentTask: Task - (Optional, default taskNull) - The new task will be a sub task of the parent task"}],"returns":{"type":"Task","type_expr":"Task","description":"the new task"},"form":"binary","left":{"text":"unit"},"right":{"text":"[name, parentTask]"}}],"examples":[{"code":["_currentTask = player createSimpleTask [\"NewTask\"];"]},{"code":["_childTask = player createSimpleTask [\"ChildTask\", _currentTask];"]}],"multiplayer":"The task effect is local, it will only exist on the client it was added.","see_also":["simpleTasks","removeSimpleTask","setSimpleTaskDescription","setSimpleTaskDestination","setTaskState","setTaskResult","taskState","Tasks","Briefing"],"notes":[{"user":"Lou Montana","date":"2011-07-02T11:45:00Z","text":"- Creating child will position the new task just under the parent task.\n- Creating another \"normal\" (parent) task will create a new line **above** the others. Think of it if you want ordered objectives.\n- Succeeding parent task will automatically succeed childs, whatever their taskState was set to. (I.E. If a task is set as a child to another, it will be completed when its parent is complete.. no matter if the child task really was or not).\n- This command has to be executed again for it to be applied for JIP players - no server sync\n\nFull step by step code from beginning to end:\n**Step 1: create a new simpleTask**\n\n```sqf\nMySimpleTask = player createSimpleTask [(localize \"STR_aSimpleTask\")];\n```\n\nYou may create a task at any given point in time. You just need to be aware of the fact, that you've created the task for a single unit (the player). So if you make use of teamSwitch, respawn or similiar, you need to think about how to manage this, so all of these units will have up to date tasks assigned to them.\nSecond, it is a good practice to use a stringtable, even if you do not plan (yet) to offer translations.\n**Step 2: task destination**\n\n```sqf\nMySimpleTask setSimpleTaskDestination _destination;\n```\n\nvariable/pointer-to-your-task setSimpleTaskDestination some-position. That's it.\n**Step 3: task description**\n\n```sqf\nMySimpleTask setSimpleTaskDescription [\n    localize \"STR_aSimpleTaskLongText\",\n    localize \"STR_aSimpleTask\",\n    localize \"STR_aSimpleTaskWaypointLabel\"\n];\n```\n\nAgain, no magic involved here. You take your task, the command setSimpleTaskDescription an pass an array with three strings in it.\nThe first string is the long description text, the second is the name/title of the task and the last one will show up on-screen on the waypoint in cadet mode.\n**Step 4: set and update task states**\n\n```sqf\nMySimpleTask setTaskState \"CREATED\";\n```\n\nAnd that's it. Here a minimal working example:\n\n```sqf\nMySimpleTask = player createSimpleTask [\"simple task title\"];\nMySimpleTask setSimpleTaskDestination (position player);\nMySimpleTask setSimpleTaskDescription [\n    \"simple task long description\",\n    \"simple task title\",\n    \"simple task waypoint label\"\n];\nMySimpleTask setTaskState \"CREATED\";\n```\n\nAnd then later in the mission:\n\n```sqf\nMySimpleTask setTaskState \"SUCCEEDED\";\n```\n\nIf you want to keep the player in the loop about the status of tasks, you may always do this:\n\n```sqf\n[objNull, objNull, MySimpleTask, \"SUCCEEDED\"] execVM \"CA\\Modules\\MP\\data\\scriptCommands\\taskHint.sqf\";\n```"}]},{"name":"createSite","title":"createSite","type":"command","url":"https://community.bistudio.com/wiki/createSite","revid":337564,"updated":"2023-02-10T01:11:02Z","groups":["Broken Commands","Sides"],"status":"broken","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Create a new site.\n\n> [!WARNING]\n> This command is considered deprecated and is no longer supported","syntaxes":[{"syntax":"type createSite pos","params":[{"name":"type","type":"String","type_expr":"String"},{"name":"pos","type":"Position","type_expr":"Position"}],"returns":{"type":"Object","type_expr":"Object"},"form":"binary","left":{"text":"type"},"right":{"text":"pos"}}],"examples":[{"text":"-"}],"see_also":["deleteSite","allSites"],"notes":[{"user":"Strangepete","date":"2014-02-19T02:49:00Z","text":"> « CreateSite is an obsolete command from the time in development when Sites were handled separately from other modules. Now they use the modules framework. If you want a specific Site to be activated during the mission, place it in the editor and use the Condition line in its parameters (the last one). » – Jezuro ([source](https://forums.bohemia.net/forums/topic/140086-how-do-we-use-createsite/?tab=comments#comment-2382204))"}]},{"name":"createSoundSource","title":"createSoundSource","type":"command","url":"https://community.bistudio.com/wiki/createSoundSource","revid":377426,"updated":"2026-01-02T06:45:39Z","groups":["Sounds"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Creates a sound source of the given type (type is the name of the subclass of CfgVehicles which is pointing to the sound defined in CfgSFX).\nThe actual sound object created is of type `\"#dynamicsound\"` and could be detected with allMissionObjects.\nIf the markers array contains several marker names, the position of a random one is used, otherwise, the given position is used.\nThe sound source is placed inside a circle with this position as its center and placement as its radius. Some of the vanilla classes pre-configured in Arma 3:\n\n- `\"Sound_Alarm\"`\n- `\"Sound_Alarm2\"`\n- `\"Sound_BattlefieldExplosions\"`\n- `\"Sound_BattlefieldFirefight\"`\n- `\"Sound_Fire\"`\n- `\"Sound_SmokeWreck1\"`\n- `\"Sound_SparklesWreck1\"`\n- `\"Sound_SparklesWreck2\"`\n- `\"Sound_Stream\"`\n\nSince Arma 3 v1.70 it is possible to define sounds for use with createSoundSource in Description.ext.\nAs mentioned earlier, the sounds needed for this command should be defined inside CfgVehicles class, which itself references CfgSFX class.\nIf given class searched in main config and is not found, the search will continue in description.ext - see Example 3.\n\n> [!NOTE]\n> A sound created by createSoundSource will always be looping.\n\n> [!NOTE]\n> **Arma 3:** In earlier Arma 3 versions, the sound created was greatly attenuated if the player was in first person view inside a vehicle at the moment of execution.","syntaxes":[{"syntax":"createSoundSource [type, position, markers, placement]","params":[{"name":"type","type":"String","description":"CfgVehicles class","type_expr":"String"},{"name":"position","type":"Object or PositionAGL or Position2D","description":"desired placement position","type_expr":"Object | PositionAGL | Position2D"},{"name":"markers","type":"Array","description":"if the markers array contains any markers, the position is randomly picked from array of given markers plus desired placement position.\nIf any of the markers were given a Z coordinate with setMarkerPos, the sound will also be created at the given Z coordinate","type_expr":"Array"},{"name":"placement","type":"Number","description":"the sound is placed inside a circle with given position as center and placement as its radius","type_expr":"Number"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"[type, position, markers, placement]"}}],"examples":[{"code":["_soundSource = createSoundSource [\"LittleDog\", position player, [], 0];"]},{"text":"```sqf\n0 spawn\n{\n    _alarm = createSoundSource [\"Sound_Alarm\", position player, [], 0]; // starts alarm\n    sleep 10;\n    deleteVehicle _alarm; // stops alarm\n};\n```","code":["0 spawn \n{\n\t_alarm = createSoundSource [\"Sound_Alarm\", position player, [], 0]; // starts alarm\n\tsleep 10;\n\tdeleteVehicle _alarm; // stops alarm\n};"]},{"text":"Arma 3 v1.70 Here is an example of suitable mission config definition:\n\n```cpp\n// description.ext\nclass CfgSFX\n{\n    class MyOwl\n    {\n        sound0[] = { \"@A3\\Sounds_F\\environment\\animals\\birds\\owl1\", db-10, 1.0, 1000, 0.2, 0, 15, 30 };    // path to addon sound\n        sound1[] = { \"@A3\\Sounds_F\\environment\\animals\\birds\\owl2\", db-10, 1.0, 1000, 0.2, 0, 15, 30 };    // path to addon sound\n        sound2[] = { \"@A3\\Sounds_F\\environment\\animals\\birds\\owl3\", db-10, 1.0, 1000, 0.2, 0, 15, 30 };    // path to addon sound\n        sounds[] = { \"sound0\", \"sound1\", \"sound2\" };\n        empty[] = { \"\", 0, 0, 0, 0, 0, 0, 0 };\n    };\n};\n\nclass CfgVehicles\n{\n    class MyOwlSound // class name to be used with createSoundSource\n    {\n        sound = \"MyOwl\"; // reference to CfgSFX class\n    };\n};\n```\n\n```sqf\nprivate _owl = createSoundSource [\"MyOwlSound\", position player, [], 0];\n```","code":["private _owl = createSoundSource [\"MyOwlSound\", position player, [], 0];"]}],"multiplayer":"When a CfgSFX sound definition contains more than 1 sound, there is no guarantee that the sound played will be the same on every PC in Multiplayer.","see_also":["createSoundSourceLocal","playSound","playSound3D","sideRadio","say","say2D","say3D","playMusic","playSoundUI"]},{"name":"createSoundSourceLocal","title":"createSoundSourceLocal","type":"command","url":"https://community.bistudio.com/wiki/createSoundSourceLocal","revid":369781,"updated":"2024-10-08T15:09:02Z","groups":["Sounds"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"global","effect":"local"},"description":"Same as createSoundSource but with local effect - the created sound is not transferred to other clients.","syntaxes":[{"syntax":"see createSoundSource","params":[{"name":"see createSoundSource"}],"returns":{"type":"see createSoundSource"}}],"examples":[{"text":"```sqf\ncreateSoundSource        [\"LittleDog\", position player, [], 0]; // global\ncreateSoundSourceLocal    [\"LittleDog\", position player, [], 0]; // local\n```","code":["createSoundSource\t\t[\"LittleDog\", position player, [], 0]; // global\ncreateSoundSourceLocal\t[\"LittleDog\", position player, [], 0]; // local"]}],"see_also":["createSoundSource","Description.ext","CfgSFX"]},{"name":"createTarget","title":"createTarget","type":"command","url":"https://community.bistudio.com/wiki/createTarget","revid":352192,"updated":"2024-02-01T23:25:58Z","groups":["Broken Commands"],"status":"broken","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Create a target.","syntaxes":[{"syntax":"obj createTarget [type, position, typeAccuracy, posAccuracy]","params":[{"name":"obj","type":"Object","type_expr":"Object"},{"name":"type","type":"String","type_expr":"String"},{"name":"position","type":"Position Placement","type_expr":"Position"},{"name":"typeAccuracy","type":"Number","type_expr":"Number"},{"name":"posAccuracy","type":"Number","type_expr":"Number"}],"returns":{"type":"Target","type_expr":"Target"},"form":"binary","left":{"text":"obj"},"right":{"text":"[type, position, typeAccuracy, posAccuracy]"}}],"examples":[{"code":["_target = createTarget [\"targetType\", [0,0,0], 1, 1];"]}],"problems":"> [!WARNING]\n> This command is not implemented.","see_also":["moveTarget","deleteTarget"]},{"name":"createTask","title":"createTask","type":"command","url":"https://community.bistudio.com/wiki/createTask","revid":351331,"updated":"2023-11-27T05:30:49Z","groups":["Briefing","Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Create a new AI task (subtask of parentTask). Type is name of registered task type.","syntaxes":[{"syntax":"teamMember createTask [[type, parentTask], priority, name1, value1, ...]","params":[{"name":"teamMember","type":"Team Member","type_expr":"Team Member"},{"name":"type","type":"String","description":"`name` defined in `CfgTasks`","type_expr":"String"},{"name":"parentTask","type":"Task","optional":true,"type_expr":"Task","text":"parentTask: Task - (Optional)"},{"name":"priority","type":"Number","type_expr":"Number"},{"name":"nameN","type":"String","type_expr":"String"},{"name":"valueN","type":"String","type_expr":"String"}],"returns":{"type":"Task","type_expr":"Task"},"form":"binary","left":{"text":"teamMember"},"right":{"text":"[[type, parentTask], priority, name1, value1, ...]"}}],"see_also":["Tasks","type","briefing","createSimpleTask","simpleTasks","currentTask","currentTasks","setCurrentTask","taskState","setTaskState","taskResult","setTaskResult","taskCompleted","removeSimpleTask"]},{"name":"createTeam","title":"createTeam","type":"command","url":"https://community.bistudio.com/wiki/createTeam","revid":364171,"updated":"2024-05-05T10:46:44Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Creates a Team and names it.","syntaxes":[{"syntax":"createTeam [type, name]","params":[{"name":"type","type":"String","type_expr":"String"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Team Member","type_expr":"Team Member"},"form":"unary","right":{"text":"[type, name]"}}],"examples":[{"code":["_team = createTeam [\"USMC_Team\", \"Fire Team Red\"];"]}],"see_also":["addTeamMember","removeTeamMember"]},{"name":"createTrigger","title":"createTrigger","type":"command","url":"https://community.bistudio.com/wiki/createTrigger","revid":370090,"updated":"2024-10-31T19:20:48Z","groups":["Triggers"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Creates a trigger of the given type and at the given position. The type must be a class name in *CfgNonAIVehicles* or *CfgVehicles* with `simulation = detector`. An array containing all units that have activated the trigger is available via `list triggerobj`. Since triggers are **Objects**, commands such as getPosASL, setPosASL, deleteVehicle etc. work on them.\n\n> [!IMPORTANT]\n> Triggers are always created on the road surface (AGL) at provided x, y coordinates. The z param is ignored. In order to place the trigger with a custom z, use a 'setPosXXX' command after trigger creation.\n\n> [!NOTE]\n> Since Arma 3 v1.54 triggers can be disabled/enabled using enableSimulation command.\n\nTriggers are created with default parameters:\n\n- `a`: 50\n- `b`: 50\n- `c`: -1\n- `angle`: 0\n- `rectangular`: false\n- `activationBy`: None\n- `activationType`: Present\n- `repeating`: false\n- `timeoutMin`: 0\n- `timeoutMid`: 0\n- `timeoutMax`: 0\n- `interruptable`: true\n- `type`: None\n- `text`: \"\"\n- `name`: \"\"\n- `expCond`: \"this\"\n- `expActiv`: \"\"\n- `expDesactiv`: \"\"\n- Arma 3 v1.98 `interval`: 0.5","syntaxes":[{"syntax":"createTrigger [type, position, makeGlobal]","params":[{"name":"type","type":"String","description":"usually \"EmptyDetector\"","type_expr":"String"},{"name":"position","type":"Position2D, Position3D or Object (see the note in description)","type_expr":"Position2D | Position3D | Object"},{"name":"makeGlobal","type":"Boolean","optional":true,"default":"true","description":"locality flag\n\n- true - trigger is global Global effect\n- false - trigger is local Local effect","type_expr":"Boolean","since":"arma3 1.44","text":"makeGlobal: Boolean - (Optional - default true) locality flag\n\n- true - trigger is global Global effect\n- false - trigger is local Local effect"}],"returns":{"type":"Object","type_expr":"Object","description":"created trigger"},"form":"unary","right":{"text":"[type, position, makeGlobal]"}}],"examples":[{"code":["_trg = createTrigger [\"EmptyDetector\", getPos player];\n_trg setTriggerArea [5, 5, 0, false];\n_trg setTriggerActivation [\"CIV\", \"PRESENT\", true];\n_trg setTriggerStatements [\"this\", \"hint 'Civilian near player'\", \"hint 'no civilian near'\"];"]},{"text":"Open/close Bar Gate automatically:\n\n```sqf\n//--- init of the Bar Gate\nif (isServer) then\n{\n    _gateTrigger = createTrigger [\"EmptyDetector\", getPosWorld this, false];\n    _gateTrigger setVariable [\"BarGateObj\", this];\n    _gateTrigger setTriggerActivation [\"ANYPLAYER\", \"PRESENT\", true];\n    _gateTrigger setTriggerArea [5, 25, getDir this, true];\n    _gateTrigger setTriggerStatements\n    [\n        \"this\",\n        \"thisTrigger getVariable \"\"BarGateObj\"\" animateSource [\"\"Door_1_sound_source\"\", 1]\",\n        \"thisTrigger getVariable \"\"BarGateObj\"\" animateSource [\"\"Door_1_sound_source\"\", 0]\"\n    ];\n};\n```","code":["//--- init of the Bar Gate\nif (isServer) then\n{\t\n\t_gateTrigger = createTrigger [\"EmptyDetector\", getPosWorld this, false];\n\t_gateTrigger setVariable [\"BarGateObj\", this];\n\t_gateTrigger setTriggerActivation [\"ANYPLAYER\", \"PRESENT\", true];\n\t_gateTrigger setTriggerArea [5, 25, getDir this, true];\n\t_gateTrigger setTriggerStatements \n\t[\n\t\t\"this\", \n\t\t\"thisTrigger getVariable \"\"BarGateObj\"\" animateSource [\"\"Door_1_sound_source\"\", 1]\", \n\t\t\"thisTrigger getVariable \"\"BarGateObj\"\" animateSource [\"\"Door_1_sound_source\"\", 0]\"\n\t];\n};"]}],"see_also":["setTriggerActivation","setTriggerArea","setTriggerStatements","setTriggerText","setTriggerTimeout","setTriggerType","setEffectCondition","setSoundEffect","setMusicEffect","setTitleEffect","deleteVehicle","synchronizeWaypoint","synchronizeTrigger","createGuardedPoint","triggerInterval","setTriggerInterval","enableSimulation","simulationEnabled"],"notes":[{"user":"TeaCup","date":"2013-03-06T14:15:00Z","text":"Calling list immediately after creating a trigger this way (and setting up activation, area, statements, timeout, etc..), will return <null> instead of an array. It seems the trigger needs about 1 second to initialise, after which it will behave as expected: returning an array of all the objects inside the trigger (the ones matching the criteria), or an empty array."}]},{"name":"createUnit","title":"createUnit","type":"command","url":"https://community.bistudio.com/wiki/createUnit","revid":377516,"updated":"2026-01-02T06:50:26Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.34","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.34","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Create a unit of the provided CfgVehicles class.\n\n> [!WARNING]\n> The unit will not be created if the passed group does not exist (a.k.a grpNull);\n> this can happen if createGroup fails because the **group limit has been reached** (see createGroup for respective game limits).\n\n|  | Syntax 1 | Syntax 2 |\n|---|---|---|\n| Group's locality | the provided group *can* be non-local, but a warning will be logged | the provided group **must** be local |\n| Unit's side | using a classname from a different side than the provided group will result in the unit itself being of a (config-defined) side inside a group of another side - see Example 6 for more information | using a classname from a different side than the provided group will result in the unit being of the same side as the provided group |\n| Other | the unit's init code will execute after a slight delay if the provided group is not local | this syntax does **not** return a reference to the created unit (see Example 7) |\n\n> [!NOTE]\n> **Armed Assault:** Operation Flashpoint v1.34 Armed Assault v1.00 This command was sometimes bugged in Operation Flashpoint or Armed Assault; an additional join may solve the problem.\n> However, some commands such as setUnitPos only work if run before the join.","syntaxes":[{"syntax":"group createUnit [type, position, markers, placement, special]","params":[{"name":"group","type":"Group","description":"existing group new unit will join; if the group is not local, a warning will be logged","type_expr":"Group"},{"name":"type","type":"String","description":"classname of unit to be created as per CfgVehicles","type_expr":"String"},{"name":"position","type":"Object, Group or Position or Position2D","description":"location where to create the unit. In case of Group, the group leader's position is used. The Z component of the position is ignored and the unit is always placed on the surface.","type_expr":"Object | Group | Position | Position2D"},{"name":"markers","type":"Array","description":"placement markers","type_expr":"Array"},{"name":"placement","type":"Number","description":"placement radius","type_expr":"Number"},{"name":"special","type":"String","description":"unit placement special, one of:\n\n- `\"NONE\"` - The unit will be created at the first available free position nearest to given position\n- `\"FORM\"` - Not implemented, currently functions the same as \"NONE\"\n- `\"CAN_COLLIDE\"` - The unit will be created exactly at the provided position\n- `\"CARGO\"` - The unit will be created in cargo of the group's vehicle, regardless of the passed position (see Example 5). If group has no vehicle or there is no cargo space available, the unit will be placed according to `\"NONE\"`. `\"CARGO\"` placement excludes cargo positions with personal FFV turrets. To check available cargo space use:\n\n|  |  |\n|---|---|\n| Arma 3 v1.34 FFV | `private _hasCargo = { isNull (_x select 0) } count (fullCrew [_veh, \"cargo\", true]) > 0;` |\n| before | `_hasCargo = _veh emptyPositions \"CARGO\" > 0;` |","type_expr":"String"}],"returns":{"type":"Object","type_expr":"Object","description":"the created unit"},"form":"binary","left":{"text":"group"},"right":{"text":"[type, position, markers, placement, special]"}},{"syntax":"type createUnit [position, group, init, skill, rank]","params":[{"name":"type","type":"String","description":"classname of unit to be created as per CfgVehicles","type_expr":"String"},{"name":"position","type":"Object, Group or Position or Position2D","description":"location at which the unit is created. In case of Group position of the group leader is used","type_expr":"Object | Group | Position | Position2D"},{"name":"group","type":"Group","description":"existing group the new unit will join","type_expr":"Group"},{"name":"init","type":"String","optional":true,"default":"\"\"","description":"unit init statement, similar to unit init field in the editor. The code placed in unit init will run upon unit creation for every client on network, present and future.\nThe code itself receives the reference to the created unit via local variable this.\n\n> [!WARNING]\n> - Do not use global effect commands in a unit's *init* as it runs on every client (local effect ones are OK, e.g setIdentity).\n> - Do not use local variables inside the init code as they are not available in multiplayer.","type_expr":"String","text":"init: String - (Optional, default \"\") unit init statement, similar to unit init field in the editor. The code placed in unit init will run upon unit creation for every client on network, present and future.\nThe code itself receives the reference to the created unit via local variable this.\n\n> [!WARNING]\n> - Do not use global effect commands in a unit's *init* as it runs on every client (local effect ones are OK, e.g setIdentity).\n> - Do not use local variables inside the init code as they are not available in multiplayer."},{"name":"skill","type":"Number","optional":true,"default":"0.5","description":"unit skill","type_expr":"Number","text":"skill: Number - (Optional, default 0.5) unit skill"},{"name":"rank","type":"String","optional":true,"default":"\"PRIVATE\"","description":"unit rank","type_expr":"String","text":"rank: String - (Optional, default \"PRIVATE\") unit rank"}],"returns":{"type":"> [!WARNING] > Nothing","types":["Nothing"],"description":"this syntax does not return a unit reference! See Example 7 for a workaround.","text":"> [!WARNING]\n> **Nothing** - this syntax does **not** return a unit reference! See Example 7 for a workaround."},"form":"binary","left":{"text":"type"},"right":{"text":"[position, group, init, skill, rank]"}}],"examples":[{"code":["_unit = group player createUnit [\"B_RangeMaster_F\", position player, [], 0, \"NONE\"];"]},{"code":["\"B_RangeMaster_F\" createUnit [position player, group player];"]},{"code":["\"B_RangeMaster_F\" createUnit [getMarkerPos \"barracks\", _groupAlpha];"]},{"text":"```sqf\n\"B_RangeMaster_F\" createUnit [\n    getMarkerPos \"marker_1\",\n    _groupAlpha,\n    \"loon1 = this; this addWeapon 'BAF_L85A2_RIS_SUSAT'\",\n    0.6,\n    \"corporal\"\n];\n```","code":["\"B_RangeMaster_F\" createUnit [\n\tgetMarkerPos \"marker_1\",\n\t_groupAlpha,\n\t\"loon1 = this; this addWeapon 'BAF_L85A2_RIS_SUSAT'\",\n\t0.6,\n\t\"corporal\"\n];"]},{"code":["_veh = \"O_Quadbike_01_F\" createVehicle (player getRelPos [10, 0]);\n_grp = createVehicleCrew _veh;\n_unit = _grp createUnit [typeOf driver _veh, _grp, [], 0, \"CARGO\"];"]},{"text":"Creating a unit from a different side may lead to issues:\n\n```sqf\n_grp = createGroup east;\nhint str side _grp; // EAST\n_ap = _grp createUnit [\"C_man_p_beggar_F\", position player, [], 0, \"NONE\"];\nhint str side _ap; // CIV, not EAST\n\n// workaround\n[_ap] joinSilent _grp;\nhint str side _ap; // EAST\n```","code":["_grp = createGroup east;\nhint str side _grp; // EAST\n_ap = _grp createUnit [\"C_man_p_beggar_F\", position player, [], 0, \"NONE\"];\nhint str side _ap; // CIV, not EAST\n\n// workaround\n[_ap] joinSilent _grp;\nhint str side _ap; // EAST"]},{"text":"Reference the created unit through a global variable:\n\n```sqf\n_myUnit = \"B_RangeMaster_F\" createUnit [position player, group player];            // wrong - this syntax does not return a reference\n\n\"B_RangeMaster_F\" createUnit [position player, group player, \"myUnit = this\"];    // correct - the unit is myUnit (NOT _myUnit!)\n```","code":["_myUnit = \"B_RangeMaster_F\" createUnit [position player, group player];\t\t\t// wrong - this syntax does not return a reference\n\n\"B_RangeMaster_F\" createUnit [position player, group player, \"myUnit = this\"];\t// correct - the unit is myUnit (NOT _myUnit!)"]}],"multiplayer":"It is recommended to create the unit where the group is **local** - use remoteExec if needed.","see_also":["createCenter","createGroup","createVehicle","setVehiclePosition","create3DENEntity"],"notes":[{"user":"oOKexOo","date":"2018-12-08T21:57:00Z","text":"Since Arma 3 v1.86: If you want to place a module with createUnit, you have to ensure that the module gets activated automatically by setting **BIS_fnc_initModules_disableAutoActivation** to false, *e.g*:\n\n```sqf\nprivate _grp = createGroup sideLogic;\n\"ModuleSmokeWhite_F\" createUnit [\n    getPos player,\n    _grp,\n    \"this setVariable ['BIS_fnc_initModules_disableAutoActivation', false, true];\"\n];\n```"},{"user":"Killzone_Kid","date":"2019-03-18T19:31:00Z","text":"Alt Syntax is the older syntax and differs in functionality from the main, newer syntax. The main difference is that the older syntax **does not** return unit reference.\nThis is because the unit created with Alt Syntax is created strictly where passed group is local.\nThis means that if the group is remote the unit will be created on the different client than the one the command was executed on and therefore it is not possible to return created unit reference immediately.\nIn contrast, the newer syntax allows creating units in remote groups while returning unit reference immediately, which could be unsafe and the appropriate warning is logged into *.rpt* file: `Warning: Adding units to a remote group is not safe. Please use setGroupOwner to change the group owner first.`\n\nAnother very important difference is that the older syntax (Alt Syntax) will create unit of the same side as the side of the group passed as argument.\nFor example, if the group is WEST and the unit faction is OPFOR of type, say `\"O_Soldier_GL_F\"`, the unit created will be on the WEST side as well.\nIn contrast, newer syntax will create the same unit on the EAST side in the WEST group, which will be treated as hostile by other group members and eliminated.\n\n> [!WARNING]\n> Beware that in MP if unit is created in remote group with older syntax, the unit init will execute on calling client sometime in the future, after the unit is created on remote client, therefore the following code will fail:\n>\n> ```sqf\n> // real example of the bad code\n> \"O_Soldier_AR_F\" createUnit [position player, someRemoteGroup, \"thisUnit = this\"];\n> publicVariable \"thisUnit\";\n> hint str isNil \"thisUnit\"; // true!\n> // the unit reference is nil because init statement has not been executed on this client yet\n> ```"},{"user":"fusselwurm","date":"2020-06-19T10:13:00Z","text":"Arma 3 v1.98 note that even when setting the *placement special* parameter to \"NONE\", 3DEN-placed objects are being ignored when looking for a free position.\nIn other words: units will spawn within editor-placed rocks or under houses."}]},{"name":"createVehicle","title":"createVehicle","type":"command","url":"https://community.bistudio.com/wiki/createVehicle","revid":377509,"updated":"2026-01-02T06:50:13Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.34","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.34","arma3_since":"0.50","locality":{"effect":"global"},"description":"Creates an empty object of given classname type.\nSee Arma 3: Assets / Arma 3: createVehicle/vehicles, or Category:CfgVehicles for earlier games.\n\n> [!NOTE]\n> - To create objects of type `\"Logic\"`, use createUnit.\n> - To create an editable Eden Editor entity, see create3DENEntity.\n\n> [!NOTE]\n> **Arma 3:** To avoid vehicle randomisation in Arma 3, set the `BIS_enableRandomization` variable immediately after creating the vehicle:\n>\n> ```sqf\n> private \"_vehicle\";\n> isNil { // run unscheduled\n>     _vehicle = \"C_Offroad_01_F\" createVehicle getPosATL player;\n>     _vehicle setVariable [\"BIS_enableRandomization\", false];\n> };\n> // the _vehicle variable is available after that\n> ```\n>\n> See the Arma 3: Vehicle Customisation page for more information and settings.","syntaxes":[{"syntax":"type createVehicle position","params":[{"name":"type","type":"String","description":"vehicle/object className","type_expr":"String"},{"name":"position","type":"Position","description":"desired placement position. If the exact position is occupied, nearest empty position is used.","type_expr":"Position"}],"returns":{"type":"Object","type_expr":"Object"},"form":"binary","left":{"text":"type"},"right":{"text":"position"}},{"syntax":"createVehicle [type, position, markers, placement, special]","params":[{"name":"type","type":"String","description":"vehicle/object className","type_expr":"String"},{"name":"position","type":"Object, Position2D, PositionATL or PositionAGL","description":"desired placement position, (PositionAGL if watercraft or amphibious)","type_expr":"Object | Position2D | PositionATL | PositionAGL"},{"name":"markers","type":"Array of Strings","optional":true,"default":"`[]`","description":"if the markers array contains any markers, the position is randomly picked from array of given markers plus desired placement position.\nIf any of the markers were given z coordinate with setMarkerPos, the vehicle will also be created at given z coordinate.","type_expr":"Array<String>","text":"markers: Array of Strings - (Optional, default `[]`) if the markers array contains any markers, the position is randomly picked from array of given markers plus desired placement position.\nIf any of the markers were given z coordinate with setMarkerPos, the vehicle will also be created at given z coordinate."},{"name":"placement","type":"Number","optional":true,"default":"0","description":"the vehicle is placed inside a circle with given position as center and placement as its radius.","type_expr":"Number","text":"placement: Number - (Optional, default 0) the vehicle is placed inside a circle with given position as center and placement as its radius."},{"name":"special","type":"String","optional":true,"default":"\"NONE\"","description":"can be one of the following:\n\n- `\"NONE\"` - will look for suitable empty position near given position (subject to other placement params) before placing vehicle there.\n- `\"CAN_COLLIDE\"` - places vehicle at given position (subject to other placement params), without checking if others objects can cross its 3D model.\n- `\"FLY\"` - if vehicle is capable of flying and has crew, it will be made airborne at default height.\n\nIf *special* is \"\" or not specified, default `\"NONE\"` is used.","type_expr":"String","text":"special: String - (Optional, default \"NONE\") can be one of the following:\n\n- `\"NONE\"` - will look for suitable empty position near given position (subject to other placement params) before placing vehicle there.\n- `\"CAN_COLLIDE\"` - places vehicle at given position (subject to other placement params), without checking if others objects can cross its 3D model.\n- `\"FLY\"` - if vehicle is capable of flying and has crew, it will be made airborne at default height.\n\nIf *special* is \"\" or not specified, default `\"NONE\"` is used."}],"returns":{"type":"Object","type_expr":"Object","description":"created vehicle or objNull if failed"},"form":"unary","right":{"text":"[type, position, markers, placement, special]"}}],"examples":[{"code":["_jeep = \"Jeep\" createVehicle position player;"]},{"code":["_heli = \"AH1Z\" createVehicle getMarkerPos \"hspawn\";"]},{"code":["_veh = createVehicle [\"ah1w\", position player, [], 0, \"FLY\"];"]},{"code":["_veh = createVehicle [\"2S6M_Tunguska\", getMarkerPos \"marker1\", [\"marker2\", \"marker3\"], 0, \"NONE\"];"]},{"text":"Objects such as\n\n- \"test_EmptyObjectForBubbles\"\n- \"test_EmptyObjectForFireBig\"\n- \"test_EmptyObjectForSmoke\"\n\ncreate additional emitters, which are stored in \"effects\" variable on the object. Since Arma 3 v1.72 these emitters are automatically deleted when object is deleted\n\n```sqf\n0 spawn\n{\n    private _fire = \"test_EmptyObjectForFireBig\" createVehicle position player;\n    sleep 5;\n    deleteVehicle _fire;\n};\n```","code":["0 spawn\n{\n\tprivate _fire = \"test_EmptyObjectForFireBig\" createVehicle position player;\n\tsleep 5;\n\tdeleteVehicle _fire;\n};"]},{"text":"The following explosives (ending with `_Scripted`) can be set off by applying setDamage 1 to them for ease of scripting:\n\n- \"DemoCharge_Remote_Ammo_Scripted\"\n- \"SatchelCharge_Remote_Ammo_Scripted\"\n- \"ClaymoreDirectionalMine_Remote_Ammo_Scripted\"\n\n```sqf\n_claymore = \"ClaymoreDirectionalMine_Remote_Ammo_Scripted\" createVehicle position player;\n_claymore spawn\n{\n    sleep 5;\n    _this setDamage 1;\n};\n```","code":["_claymore = \"ClaymoreDirectionalMine_Remote_Ammo_Scripted\" createVehicle position player;\n_claymore spawn\n{\n\tsleep 5;\n\t_this setDamage 1;\n};"]},{"text":"Add inventory to objects without inventory:\n\n```sqf\n_boxes = \"Land_Pallet_MilBoxes_F\" createVehicle position player;\n_cargo = \"Supply500\" createVehicle [0,0,0];\n_cargo attachTo [_boxes, [0,0,0.85]];\n\n// optional for objects that can take damage\n_boxes addEventHandler [\"Killed\",\n{\n    {\n        detach _x;\n        deleteVehicle _x;\n    }\n    forEach attachedObjects (_this select 0);\n}];\n```","code":["_boxes = \"Land_Pallet_MilBoxes_F\" createVehicle position player;\n_cargo = \"Supply500\" createVehicle [0,0,0];\n_cargo attachTo [_boxes, [0,0,0.85]];\n\n// optional for objects that can take damage\n_boxes addEventHandler [\"Killed\",\n{\n\t{\n\t\tdetach _x;\n\t\tdeleteVehicle _x;\n\t}\n\tforEach attachedObjects (_this select 0);\n}];"]},{"text":"Drop player's weapon:\n\n```sqf\n_weaponHolder = \"GroundWeaponHolder_Scripted\" createVehicle position player;\nplayer action [\"DropWeapon\", _weaponHolder, currentWeapon player];\n```","code":["_weaponHolder = \"GroundWeaponHolder_Scripted\" createVehicle position player;\nplayer action [\"DropWeapon\", _weaponHolder, currentWeapon player];"]},{"text":"The following weapon holders (ending with *_Scripted*) do **not** auto-delete when empty. It is up to the mission maker to take care of these:\n\n- \"GroundWeaponHolder_Scripted\"\n- \"WeaponHolderSimulated_Scripted\"\n- \"Weapon_Empty\" (a special weaponholder that displays only a single weapon, even if it contains magazines for this weapon)\n\n```sqf\n0 spawn\n{\n    private _weaponHolder = createVehicle [\"Weapon_Empty\", getPosATL player, [], 0, \"CAN_COLLIDE\"];\n    _weaponHolder addWeaponCargo [\"arifle_Katiba_F\", 1];\n    hint \"You have 5 seconds to grab this weapon\";\n    sleep 5;\n    deleteVehicle _weaponHolder;\n};\n```","code":["0 spawn \n{\n\tprivate _weaponHolder = createVehicle [\"Weapon_Empty\", getPosATL player, [], 0, \"CAN_COLLIDE\"];\n\t_weaponHolder addWeaponCargo [\"arifle_Katiba_F\", 1];\n\thint \"You have 5 seconds to grab this weapon\";\n\tsleep 5;\n\tdeleteVehicle _weaponHolder;\n};"]}],"see_also":["createVehicleLocal","create3DENEntity","createVehicleCrew","createAgent","createTrigger","createUnit","createMine","deleteVehicle","createGroup","createCenter","setVehiclePosition"],"notes":[{"user":"MrSanchez","date":"2015-08-22T13:04:00Z","text":"GroundWeaponHolder class is automatically deleted when empty after 0.5 to 1 seconds in A3 1.48. The exact delay is random but never lower than 0.50 secs after creation.\nYou can stop deletion by adding something (cargo) to it within 0.5 seconds."},{"user":"AgentRev","date":"2017-05-16T09:05:00Z","text":"For the alternative syntax, if the vehicle has `canFloat = 1;` in its config class (e.g. boats and wheeled APCs) the command expects PositionAGL,\notherwise always PositionATL."},{"user":"demellion","date":"2018-11-02T12:16:00Z","text":"**WARNING:** Do not instigate createVehicle or createVehicleLocal within a server function executed with preInit flag.\nThis will cause *\"You cannot play/edit this mission\"* for a vehicles compiled from a -mod and make server skip/loop that mission init."},{"user":"R3vo","date":"2019-08-10T09:10:00Z","text":"The main syntax creates vehicles at ground level ignoring the Z in *pos* and is also faster than the alternative syntax.\n\n```sqf\n\"vehclass\" createVehicle pos;\n```\n\nThis is equivalent to\n\n```sqf\ncreateVehicle [\"vehclass\", [pos select 0, pos select 1, 0], [], 0, \"NONE\"];\n```"},{"user":"DreadedEntity","date":"2022-03-13T17:22:36Z","text":"Objects are created with a vectorUp of terrain surface normal. If you are creating new buildings to add to the map, you will probably want to call setVectorUp on the newly-spawned object.\n\n```sqf\n_veh = createVehicle [/*etc...*/];\n_veh setVectorUp [0,0,1];\n```"}]},{"name":"createVehicleCrew","title":"createVehicleCrew","type":"command","url":"https://community.bistudio.com/wiki/createVehicleCrew","revid":369241,"updated":"2024-09-03T10:35:01Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.76"},"since":"arma3 0.76","arma3_since":"0.76","locality":{"argument":"global","effect":"global"},"description":"Creates vehicle crew corresponding to the provided vehicle's faction. If the vehicle is already occupied, the command will only create missing crew in the existing vehicle's group.\nTo find out which crew will be created, use BIS_fnc_vehicleCrewTurrets.\n\n**This command:**\n\n| Does | Does not |\n|---|---|\n| - Arma 3 v1.26 create a group if one is needed (otherwise uses `group _vehicle`)<br>- create a driver if the vehicle needs one (`hasDriver = 1;` in config)<br>- create all non-FFV turrets gunners (if the turret needs one - config {`hasGunner` without `dontCreateAI`)<br>- create crew with **ranks** - with the driver as `\"LIEUTENANT\"` and all turret units as `\"SERGEANT\"`, unlike a crewed vehicle placed in Eden Editor where all units are `\"PRIVATE\"`. | - add vehicle to the group, unlike a crewed vehicle placed in Eden Editor. See BIS_fnc_spawnVehicle to spawn a crew-full vehicle with group addition<br>- create cargo units. |","syntaxes":[{"syntax":"createVehicleCrew vehicle","params":[{"name":"vehicle","type":"Object","description":"vehicle to populate with crew","type_expr":"Object"}],"returns":{"type":"Group","type_expr":"Group","description":"the group of the created crew (since Arma 3 v1.94; before that returned Nothing)"},"form":"unary","right":{"text":"vehicle"}},{"syntax":"group createVehicleCrew vehicle","since":"arma3 2.14","params":[{"name":"group","type":"Group","description":"group to put crew in","type_expr":"Group"},{"name":"vehicle","type":"Object","description":"vehicle to populate with crew","type_expr":"Object"}],"returns":{"type":"Group","type_expr":"Group","description":"the group of the created crew or grpNull"},"form":"binary","left":{"text":"group"},"right":{"text":"vehicle"}},{"syntax":"side createVehicleCrew vehicle","since":"arma3 2.14","params":[{"name":"side","type":"Side","description":"side to create crew on","type_expr":"Side"},{"name":"vehicle","type":"Object","description":"vehicle to populate with crew","type_expr":"Object"}],"returns":{"type":"Group","type_expr":"Group","description":"the group of the created crew or grpNull"},"form":"binary","left":{"text":"side"},"right":{"text":"vehicle"}}],"examples":[{"code":["_veh = createVehicle [\"B_MRAP_01_F\", getMarkerPos \"createVeh\", [], 0, \"NONE\"];\ncreateVehicleCrew _veh;"]},{"text":"```sqf\n_veh = createVehicle [\"O_MRAP_02_hmg_F\", position player, [], 0, \"NONE\"];\ncreateVehicleCrew _veh;\n{\n    diag_log [_x, faction _x, side _x, side group _x];\n} forEach crew _veh;\n\n// [O Alpha 1-1:1,\"OPF_F\",EAST,EAST]\n// [O Alpha 1-1:2,\"OPF_F\",EAST,EAST]\n```","code":["_veh = createVehicle [\"O_MRAP_02_hmg_F\", position player, [], 0, \"NONE\"];\ncreateVehicleCrew _veh;\n{\n\tdiag_log [_x, faction _x, side _x, side group _x];\n} forEach crew _veh;\n\n// [O Alpha 1-1:1,\"OPF_F\",EAST,EAST]\n// [O Alpha 1-1:2,\"OPF_F\",EAST,EAST]"]}],"multiplayer":"This command seems to be Local argument with UAVs.","see_also":["deleteVehicleCrew","moveInDriver","moveInGunner","moveInCommander","moveInTurret","moveInCargo","BIS_fnc_spawnVehicle"],"notes":[{"user":"SilentSpike","date":"2014-08-20T14:01:00Z","text":"As of Arma 3 v1.26 the command will work on non-empty vehicles. If any of the crew defined in config are missing they will be added."},{"user":"DrPastah","date":"2015-12-22T14:19:00Z","text":"createVehicleCrew does not work with Transport Unload waypoints for helicopters. You need to spawn the pilots separately and then get them into the helicopter in order to get Transport Unload waypoints to work."},{"user":"AgentRev","date":"2017-06-02T03:26:00Z","text":"The particular seats to which units are added depend on the `dontCreateAI` property, the `hasDriver` property of the base class, and the `hasGunner` propery of turret classes.\nFor instance, the following snippet calculates how many seats will be occupied by the created crew:\n\n```sqf\nprivate _vehCfg = configFile >> \"CfgVehicles\" >> typeOf _vehicle;\nprivate _crewCount = {\n    round getNumber (_x >> \"dontCreateAI\") < 1 &&\n    ((_x == _vehCfg && { round getNumber (_x >> \"hasDriver\") > 0 }) ||\n    (_x != _vehCfg && { round getNumber (_x >> \"hasGunner\") > 0 }))\n} count ([_vehicle, configNull] call BIS_fnc_getTurrets);\n```\n\nAlso, I've written a function to create a UAV crew for a specific side: https://gist.github.com/AgentRev/cb25d30e464f2239b6cee51fa0110c78"}]},{"name":"createVehicleLocal","title":"createVehicleLocal","type":"command","url":"https://community.bistudio.com/wiki/createVehicleLocal","revid":377538,"updated":"2026-01-02T06:54:18Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Creates an object of the given type. The Created object is not transferred through network in MP games.\nnetId of such vehicle in multiplayer will be \"0:0\". To disable local vehicle creation, use CfgDisabledCommands to blacklist this command.\nAlternatively, you can use createSimpleObject with local option enabled where applicable.","syntaxes":[{"syntax":"type createVehicleLocal position","params":[{"name":"type","type":"String","description":"vehicle/object className","type_expr":"String"},{"name":"position","type":"PositionAGL","type_expr":"PositionAGL"}],"returns":{"type":"Object","type_expr":"Object"},"form":"binary","left":{"text":"type"},"right":{"text":"position"}},{"syntax":"createVehicleLocal [type, position, markers, placement, special]","since":"arma3 2.14","params":[{"name":"type","type":"String","description":"vehicle/object className","type_expr":"String"},{"name":"position","type":"Object, Position2D or PositionATL (PositionAGL if watercraft or amphibious)","description":"desired placement position","type_expr":"Object | Position2D | PositionATL | PositionAGL"},{"name":"markers","type":"Array of Strings","optional":true,"default":"`[]`","description":"if the markers array contains any markers, the position is randomly picked from array of given markers plus desired placement position.\nIf any of the markers were given z coordinate with setMarkerPos, the vehicle will also be created at given z coordinate.","type_expr":"Array<String>","text":"markers: Array of Strings - (Optional, default `[]`) if the markers array contains any markers, the position is randomly picked from array of given markers plus desired placement position.\nIf any of the markers were given z coordinate with setMarkerPos, the vehicle will also be created at given z coordinate."},{"name":"placement","type":"Number","optional":true,"default":"0","description":"the vehicle is placed inside a circle with given position as center and placement as its radius.","type_expr":"Number","text":"placement: Number - (Optional, default 0) the vehicle is placed inside a circle with given position as center and placement as its radius."},{"name":"special","type":"String","optional":true,"default":"\"NONE\"","description":"can be one of the following:\n\n- `\"NONE\"` - will look for suitable empty position near given position (subject to other placement params) before placing vehicle there.\n- `\"CAN_COLLIDE\"` - places vehicle at given position (subject to other placement params), without checking if others objects can cross its 3D model.\n- `\"FLY\"` - if vehicle is capable of flying and has crew, it will be made airborne at default height.\n\nIf *special* is \"\" or not specified, default `\"NONE\"` is used.","type_expr":"String","text":"special: String - (Optional, default \"NONE\") can be one of the following:\n\n- `\"NONE\"` - will look for suitable empty position near given position (subject to other placement params) before placing vehicle there.\n- `\"CAN_COLLIDE\"` - places vehicle at given position (subject to other placement params), without checking if others objects can cross its 3D model.\n- `\"FLY\"` - if vehicle is capable of flying and has crew, it will be made airborne at default height.\n\nIf *special* is \"\" or not specified, default `\"NONE\"` is used."}],"returns":{"type":"Object","type_expr":"Object","description":"created vehicle or objNull if failed"},"form":"unary","right":{"text":"[type, position, markers, placement, special]"}}],"examples":[{"code":["_lightSource = \"#lightpoint\" createVehicleLocal _pos;"]},{"text":"Multiple types:\n\n```sqf\nprivate _lightSource =        \"#lightsource\"        createVehicleLocal _pos;    // see Light Source Tutorial\nprivate _lightReflector =    \"#lightreflector\"    createVehicleLocal _pos;    // see Light Source Tutorial - since Arma 3 v2.06\nprivate _particleSource =    \"#particlesource\"    createVehicleLocal _pos;    // see Particles Tutorial\nprivate _dynamicSound =        \"#dynamicsound\"        createVehicleLocal _pos;    // see createSoundSource\n```","code":["private _lightSource =\t\t\"#lightsource\"\t\tcreateVehicleLocal _pos;\t// see Light Source Tutorial\nprivate _lightReflector =\t\"#lightreflector\"\tcreateVehicleLocal _pos;\t// see Light Source Tutorial - since Arma 3 v2.06\nprivate _particleSource =\t\"#particlesource\"\tcreateVehicleLocal _pos;\t// see Particles Tutorial\nprivate _dynamicSound =\t\t\"#dynamicsound\"\t\tcreateVehicleLocal _pos;\t// see createSoundSource"]},{"code":["// since Arma 3 v2.14\nprivate _lightPoint = createVehicleLocal [\"#lightpoint\", getMarkerPos \"marker1\", [\"marker2\", \"marker3\"], 0, \"NONE\"];"]}],"see_also":["createVehicle","createMine","deleteVehicle","createUnit"],"notes":[{"user":"Kronzky","date":"2008-06-05T07:18:00Z","text":"If the object that is created is of the type ammo, then it will created on **all** clients (*tested only on VBS2*)."},{"user":"DamonDaemon","date":"2013-09-05T18:04:00Z","text":"Indeed the type of Ammo is transfered to **ALL** clients, but apparently also the muzzle effects (firing sound, light, etc.); this includes muzzles from Horns (Truck or Car Horn, Bicycle bells, etc.) as well as any other weapon. Tested on ArmA - Arma 2:OA (latest patch)."},{"user":"demellion","date":"2018-11-02T12:16:00Z","text":"**WARNING:** Do not instigate createVehicle or createVehicleLocal within a server function executed with preInit flag.\nThis will cause *\"You cannot play/edit this mission\"* for a vehicles compiled from a -mod and make server skip/loop that mission init."}]},{"name":"crew","title":"crew","type":"command","url":"https://community.bistudio.com/wiki/crew","revid":379408,"updated":"2026-10-31T00:02:33Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the crew (both dead and alive) of the given vehicle.","syntaxes":[{"syntax":"crew vehicleName","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"an array with all units in the vehicle is returned."},"form":"unary","right":{"text":"vehicleName"}}],"examples":[{"code":["player in (crew _tank);"]}],"see_also":["commander","driver","gunner","fullCrew","assignedVehicleRole"],"notes":[{"user":"Ofpwarior","date":"2010-02-03T11:28:00Z","text":"The crew command will return crew in order [driver,gunner,commander,turrets,cargo]"},{"user":"SilentSpike","date":"2014-06-01T18:17:00Z","text":"The crew command will return an empty array if the object has no crew - this includes objects that can't hold crew. If used on a unit (man, module, etc.) it will return an array containing that unit."}]},{"name":"ctAddHeader","title":"ctAddHeader","type":"command","url":"https://community.bistudio.com/wiki/ctAddHeader","revid":377658,"updated":"2026-01-02T09:02:08Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Adds a header line of controls according to the HeaderTemplate class. Note that rows and headers are indexed separately.","syntaxes":[{"syntax":"ctAddHeader control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Array","type_expr":"Array","description":"with [headerIndex, createdControls]\n- headerIndex: Number - createdControls: Array of Controls","text":"Array with [headerIndex, createdControls]\n\n- headerIndex: Number\n- createdControls: Array of Controls"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["private _array = ctAddHeader _control;"]}],"see_also":["ctAddRow","ctClear","ctCurSel","ctSetCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetValue","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctAddRow","title":"ctAddRow","type":"command","url":"https://community.bistudio.com/wiki/ctAddRow","revid":310853,"updated":"2022-05-07T20:24:08Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Adds one row of controls according to the RowTemplate class. It returns an array containing row index and array of created controls in a format [<rowIndex>, [<control0>, <control1>...<control n>]].\n\nNote that rows and headers are indexed separately.","syntaxes":[{"syntax":"ctAddRow control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Array","type_expr":"Array"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_array = ctAddRow _control;"]}],"see_also":["ctAddHeader","ctClear","ctCurSel","ctSetCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetValue","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctClear","title":"ctClear","type":"command","url":"https://community.bistudio.com/wiki/ctClear","revid":309971,"updated":"2022-05-05T12:17:02Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Removes all the lines from the RscControlsTable. Returns Nothing.","syntaxes":[{"syntax":"ctClear ctrl","params":[{"name":"ctrl","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"ctrl"}}],"examples":[{"code":["ctClear _control;"]}],"see_also":["ctAddHeader","ctAddRow","ctCurSel","ctSetCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetValue","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctCurSel","title":"ctCurSel","type":"command","url":"https://community.bistudio.com/wiki/ctCurSel","revid":310869,"updated":"2022-05-07T20:24:09Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Returns index of the selected row. Will take only rows, but not headers into account.","syntaxes":[{"syntax":"ctCurSel ctrl","params":[{"name":"ctrl","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"ctrl"}}],"examples":[{"code":["_curSel = ctCurSel _control;"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctSetCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetValue","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctData","title":"ctData","type":"command","url":"https://community.bistudio.com/wiki/ctData","revid":309082,"updated":"2022-04-30T15:25:34Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Returns metadata associated with a particular row of a CT_CONTROLS_TABLE control.","syntaxes":[{"syntax":"ctrl ctData row","params":[{"name":"ctrl","type":"Control","description":"the respective control","type_expr":"Control"},{"name":"row","type":"Number","description":"the row index","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"row"}}],"examples":[{"code":["private _data = _ctrl ctData 0;"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctCurSel","ctSetCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetValue","ctValue","ctSetData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctFindHeaderRows","title":"ctFindHeaderRows","type":"command","url":"https://community.bistudio.com/wiki/ctFindHeaderRows","revid":377180,"updated":"2026-01-01T10:48:22Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Gets array of indices of rows under this header.","syntaxes":[{"syntax":"ctrl ctFindHeaderRows index","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","description":"header's index","type_expr":"Number"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"index"}}],"examples":[{"code":["private _indices = _control ctFindHeaderRows 0;"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctCurSel","ctSetCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetValue","ctValue","ctSetData","ctData","ctFindRowHeader","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctFindRowHeader","title":"ctFindRowHeader","type":"command","url":"https://community.bistudio.com/wiki/ctFindRowHeader","revid":310883,"updated":"2022-05-07T20:26:57Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Gets index of the closest header above this row.","syntaxes":[{"syntax":"ctrl ctFindRowHeader rowIndex","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"rowIndex","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"rowIndex"}}],"examples":[{"code":["private _index = _control ctFindRowHeader 0;"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctCurSel","ctSetCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetValue","ctValue","ctSetData","ctData","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctHeaderControls","title":"ctHeaderControls","type":"command","url":"https://community.bistudio.com/wiki/ctHeaderControls","revid":377179,"updated":"2026-01-01T10:48:06Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Returns array of controls on the header with the given index.","syntaxes":[{"syntax":"ctrl ctHeaderControls index","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Array of Controls","type_expr":"Array<Control>"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"index"}}],"examples":[{"code":["_array = _control ctHeaderControls 0;"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctCurSel","ctSetCurSel","ctRowControls","ctRowCount","ctHeaderCount","ctSetValue","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctHeaderCount","title":"ctHeaderCount","type":"command","url":"https://community.bistudio.com/wiki/ctHeaderCount","revid":309979,"updated":"2022-05-05T12:17:02Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Returns number of headers (rows not included) in the RscControlsTable.","syntaxes":[{"syntax":"ctHeaderCount ctrl","params":[{"name":"ctrl","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"ctrl"}}],"examples":[{"code":["ctHeaderCount _control;"]}],"see_also":["ctAddHeader","ctAddRow","ctClear","ctCurSel","ctSetCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctSetValue","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctRemoveHeaders","title":"ctRemoveHeaders","type":"command","url":"https://community.bistudio.com/wiki/ctRemoveHeaders","revid":377178,"updated":"2026-01-01T10:47:51Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Takes array of header indices as a parameter and removes headers with those indices. Indices of remaining headers will be recomputed.","syntaxes":[{"syntax":"ctrl ctRemoveHeaders indices","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"indices","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"indices"}}],"examples":[{"code":["_control ctRemoveHeaders [0, 1, 2];"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctCurSel","ctSetCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetValue","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctRemoveRows","title":"ctRemoveRows","type":"command","url":"https://community.bistudio.com/wiki/ctRemoveRows","revid":376516,"updated":"2025-10-22T23:05:37Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Takes array of row indices as a parameter and removes rows with those indices. Indices of remaining rows will be recomputed.","syntaxes":[{"syntax":"ctrl ctRemoveRows [index1, index2, ...]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"indexN","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[index1, index2, ...]"}}],"examples":[{"code":["_control ctRemoveRows [0, 1, 2];"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctCurSel","ctSetCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetValue","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"],"notes":[{"user":"7erra","date":"2021-01-02T15:05:00Z","text":"If you want to remove a row by clicking on a button in the ControlsTable make sure that the code is scheduled. Otherwise the game will crash."}]},{"name":"ctrlActivate","title":"ctrlActivate","type":"command","url":"https://community.bistudio.com/wiki/ctrlActivate","revid":369263,"updated":"2024-09-03T18:42:41Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Launches action attached to given (button based) control. Command ignores control disabled state. (Example 2). Main syntax command only triggers engine-based actions (cancel or ok codes) and will not trigger button related User Interface Event Handlers or buttonAction, use the alternative syntax for this. \"ButtonClick\" UI event handler will also be triggered with the alternative syntax. Use isUIContext to distinguish between scripted activation and user activation.","syntaxes":[{"syntax":"ctrlActivate control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"control"}},{"syntax":"control ctrlActivate full","since":"arma3 2.18","params":[{"name":"control","type":"Control","description":"button based control (CT_BUTTON, CT_XBUTTON, CT_SHORTCUTBUTTON, CT_ACTIVETEXT)","type_expr":"Control"},{"name":"full","type":"Boolean","description":"true to simulate button click in full including UI event handling","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"full"}}],"examples":[{"code":["ctrlActivate _control;"]},{"code":["_control ctrlEnable false;\nctrlActivate _control; // Action fired."]}],"see_also":["allControls","allDisplays","controlsGroupCtrl","ctrlDelete","ctrlModel","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlClassName","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp","displayParent"]},{"name":"ctrlAddEventHandler","title":"ctrlAddEventHandler","type":"command","url":"https://community.bistudio.com/wiki/ctrlAddEventHandler","revid":379288,"updated":"2026-10-30T23:46:34Z","groups":["GUI Control - Event Handlers","Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Add an event handler to the given control.\n\n> [!IMPORTANT]\n> - Control event handlers are processed in reversed order, i.e. last added: first, first added: last. So if you have an override it should be set up in the 1st added EH.\n> - When using the event names listed here with the ctrlAddEventHandler, ctrlSetEventHandler, displayAddEventHandler or displaySetEventHandler commands, the prefix \"on\" in the event name must be removed (e.g. '**ButtonDown'** instead of '**onButtonDown'**).","syntaxes":[{"syntax":"control ctrlAddEventHandler [handler, function]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"handler","type":"String","description":"handler name, see User Interface Event Handlers","type_expr":"String"},{"name":"function","type":"String or Arma 3 v1.06 Code","description":"script. Several Magic Variables are available:\n\n- Event Handler parameters are accessible via `_this`\n- The Event Handler type is available as `_thisEvent`\n- The Event Handler index is available as `_thisEventHandler`","type_expr":"String | Code"}],"returns":{"type":"Number","type_expr":"Number","description":"handler ID or -1 if failed"},"form":"binary","left":{"text":"control"},"right":{"text":"[handler, function]"}}],"examples":[{"code":["_map ctrlAddEventHandler [\"Draw\", \"_this call BIS_fnc_strategicMapOpen_draw\"];"]},{"code":["_map ctrlAddEventHandler [\"Draw\", { hintSilent str _this }];"]},{"code":["findDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\", { hintSilent str _this }]; //Arma 3 map control"]}],"see_also":["displayAddEventHandler","ctrlRemoveEventHandler","ctrlRemoveAllEventHandlers"]},{"name":"ctrlAngle","title":"ctrlAngle","type":"command","url":"https://community.bistudio.com/wiki/ctrlAngle","revid":378507,"updated":"2026-05-03T17:04:17Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.52"},"since":"arma3 1.52","arma3_since":"1.52","description":"Gets rotation info of a control set as `ST_PICTURE`. Supported control types:\n\n- CT_STATIC\n- Arma 3 v2.10 CT_ACTIVETEXT","syntaxes":[{"syntax":"ctrlAngle control","params":[{"name":"control","type":"Control","description":"picture control","type_expr":"Control"}],"returns":{"type":"Array","type_expr":"Array","description":"with [angle, centerX, centerY]\n- angle: Number - centerX: Number - centerY: Number","text":"Array with [angle, centerX, centerY]\n\n- angle: Number\n- centerX: Number\n- centerY: Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["ctrlAngle _control;"]}],"see_also":["ctrlSetAngle"]},{"name":"ctrlAnimateModel","title":"ctrlAnimateModel","type":"command","url":"https://community.bistudio.com/wiki/ctrlAnimateModel","revid":329860,"updated":"2022-08-07T23:03:59Z","groups":["GUI Control - Object"],"status":"ok","games":{"arma3":"1.84"},"since":"arma3 1.84","arma3_since":"1.84","description":"Process an animation of 3D Arma: GUI Configuration. Command uses name defined by source property and works similar like animateSource command.","syntaxes":[{"syntax":"control ctrlAnimateModel [source, phase, speed]","params":[{"name":"control","type":"Control","description":"3D control","type_expr":"Control","text":"control : Control - 3D control"},{"name":"source","type":"String","description":"common source","type_expr":"String"},{"name":"phase","type":"Number","description":"wanted animation phase","type_expr":"Number"},{"name":"speed","type":"Boolean or Number","optional":true,"default":"false","description":"Boolean - when set to true, animation is instant\n- Arma 3 v1.66 Number - > 0 is treated as config speed value multiplier","type_expr":"Boolean | Number","text":"speed: Boolean or Number - (Optional, default false)\n\n- Boolean - when set to true, animation is instant\n- Arma 3 v1.66 Number - > 0 is treated as config speed value multiplier"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[source, phase, speed]"}}],"examples":[{"code":["_control3D ctrlAnimateModel [\"Close\", 1];"]},{"code":["_ctrlLaptop ctrlAnimateModel [\"Lid\", 1, 2];"]}],"see_also":["ctrlAnimationPhaseModel","ctrlCreate","ctrlDelete","ctrlModel","ctrlPosition","ctrlSetPosition","ctrlClassName","displayCtrl","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp"]},{"name":"ctrlAnimationPhaseModel","title":"ctrlAnimationPhaseModel","type":"command","url":"https://community.bistudio.com/wiki/ctrlAnimationPhaseModel","revid":309213,"updated":"2022-05-03T22:27:25Z","groups":["GUI Control - Object"],"status":"ok","games":{"arma3":"1.84"},"since":"arma3 1.84","arma3_since":"1.84","description":"Returns current animation phase of given source. Similar to animationSourcePhase.","syntaxes":[{"syntax":"control ctrlAnimationPhaseModel source","params":[{"name":"control","type":"Control","description":"3D control","type_expr":"Control","text":"control : Control - 3D control"},{"name":"source","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"control"},"right":{"text":"source"}}],"examples":[{"code":["private _phase = _control3D ctrlAnimationPhaseModel \"Close\";"]}],"see_also":["ctrlAnimateModel","ctrlCreate","ctrlDelete","ctrlModel","ctrlPosition","ctrlSetPosition","ctrlClassName","displayCtrl","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp"]},{"name":"ctrlAt","title":"ctrlAt","type":"command","url":"https://community.bistudio.com/wiki/ctrlAt","revid":338355,"updated":"2023-03-01T00:25:09Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Returns the control at the specified coordinates.","syntaxes":[{"syntax":"display ctrlAt [x, y]","params":[{"name":"display","type":"Display","description":"the display to check","type_expr":"Display"},{"name":"x","type":"Number","description":"position (0 = left, 1 = right)","type_expr":"Number"},{"name":"y","type":"Number","description":"position (0 = top, 1 = bottom)","type_expr":"Number"}],"returns":{"type":"Control","type_expr":"Control","description":"the control at the specified coordinates, controlNull if none"},"form":"binary","left":{"text":"display"},"right":{"text":"[x, y]"}}],"examples":[{"code":["private _ctrl = _myDisplay ctrlAt [0.5, 0.5];"]}],"see_also":["ctrlCreate","ctrlSetPosition","ctrlCommit"]},{"name":"ctrlAutoScrollDelay","title":"ctrlAutoScrollDelay","type":"command","url":"https://community.bistudio.com/wiki/ctrlAutoScrollDelay","revid":310817,"updated":"2022-05-07T20:23:39Z","groups":["GUI Control","GUI Control - ListBox","GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns number of seconds auto-scroll will wait before scroll and/or rewind. -2 if scrollbar not present.\n\nAutorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be > 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.","syntaxes":[{"syntax":"ctrlAutoScrollDelay control","params":[{"name":"control","type":"Control","description":"CT_LISTBOX or CT_CONTROLS_GROUP","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_ctrlDelay = ctrlAutoScrollDelay _ctrlGroup;"]}],"see_also":["ctrlSetAutoScrollSpeed","ctrlAutoScrollSpeed","ctrlSetAutoScrollDelay","ctrlSetAutoScrollRewind","ctrlAutoScrollRewind"]},{"name":"ctrlAutoScrollRewind","title":"ctrlAutoScrollRewind","type":"command","url":"https://community.bistudio.com/wiki/ctrlAutoScrollRewind","revid":310871,"updated":"2022-05-07T20:24:10Z","groups":["GUI Control","GUI Control - ListBox","GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns true if auto-scroll should move back to start after it reaches the end.\n\nAutorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be > 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.","syntaxes":[{"syntax":"ctrlAutoScrollRewind control","params":[{"name":"control","type":"Control","description":"CT_LISTBOX or CT_CONTROLS_GROUP","type_expr":"Control"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_ctrlRewind = ctrlAutoScrollRewind _ctrlGroup;"]}],"see_also":["ctrlSetAutoScrollSpeed","ctrlAutoScrollSpeed","ctrlSetAutoScrollDelay","ctrlAutoScrollDelay","ctrlSetAutoScrollRewind"]},{"name":"ctrlAutoScrollSpeed","title":"ctrlAutoScrollSpeed","type":"command","url":"https://community.bistudio.com/wiki/ctrlAutoScrollSpeed","revid":319021,"updated":"2022-05-13T09:22:12Z","groups":["GUI Control","GUI Control - ListBox","GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns number of seconds to auto-scroll one line. -1 if auto-scroll is disabled. -2 if scrollbar not present.\n\nAutoscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be > 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.","syntaxes":[{"syntax":"ctrlAutoScrollSpeed control","params":[{"name":"control","type":"Control","description":"CT_LISTBOX or CT_CONTROLS_GROUP","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_ctrlSpeed =  ctrlAutoScrollSpeed _ctrlGroup;"]}],"see_also":["ctrlSetAutoScrollSpeed","ctrlSetAutoScrollDelay","ctrlAutoScrollDelay","ctrlSetAutoScrollRewind","ctrlAutoScrollRewind"]},{"name":"ctrlBackgroundColor","title":"ctrlBackgroundColor","type":"command","url":"https://community.bistudio.com/wiki/ctrlBackgroundColor","revid":377353,"updated":"2026-01-02T06:40:17Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Returns control's background color.","syntaxes":[{"syntax":"ctrlBackgroundColor control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Color (RGBA)","type_expr":"Color"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["ctrlBackgroundColor _control;"]}],"see_also":["ctrlSetBackgroundColor","ctrlText"]},{"name":"ctrlChecked","title":"ctrlChecked","type":"command","url":"https://community.bistudio.com/wiki/ctrlChecked","revid":353343,"updated":"2024-03-15T17:11:52Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns the current state of given CT_CHECKBOXES control. Since Arma 3 v1.72 it is possible to query multiple checkboxes by providing checkbox index. For more information see CT_CHECKBOXES.\n\n> [!NOTE]\n> The `\"CheckBoxesSelChanged\"` control EH returns the control, index of changed checkbox and its current checked state. The checked state however is not a Boolean but Number 0 or 1. To convert ctrlChecked command output into number as well, use parseNumber command","syntaxes":[{"syntax":"ctrlChecked control","params":[{"name":"control","type":"Control","description":"CT_CHECKBOXES control. If control contain multiple checkboxes, only checkbox with index 0 is queried.","type_expr":"Control"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true checked, false unchecked"},"form":"unary","right":{"text":"control"}},{"syntax":"control ctrlChecked index","since":"arma3 1.72","params":[{"name":"control","type":"Control","description":"CT_CHECKBOXES control","type_expr":"Control"},{"name":"index","type":"Number","description":"checkbox index","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true checked, false unchecked"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["ctrlChecked _control;"]},{"code":["_control ctrlChecked 3;"]}],"see_also":["ctrlSetChecked","cbChecked","cbSetChecked"]},{"name":"ctrlClassName","title":"ctrlClassName","type":"command","url":"https://community.bistudio.com/wiki/ctrlClassName","revid":321025,"updated":"2022-05-13T11:30:29Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","description":"Returns the class name of a Control as it is defined in config. If you need config class of a game created Display, it is stored on display itself:\n\n```sqf\n_className = findDisplay 12 getVariable [\"BIS_fnc_initDisplay_configClass\", \"\"]; // \"RscDiary\"\n```","syntaxes":[{"syntax":"ctrlClassName control","params":[{"name":"control","type":"Control","type_expr":"Control","text":"control : Control"}],"returns":{"type":"String","type_expr":"String","description":"class name"},"form":"unary","right":{"text":"control"}}],"examples":[{"text":"List class names of all controls present on display 46:\n\n```sqf\n_return = [];\n{\n    _return pushBack format [\"IDC: %1, className: %2\", ctrlIDC _x, ctrlClassName _x];\n} forEach (allControls findDisplay 46);\n\ncopyToClipboard (_return joinString endl);\n```","code":["_return = [];\n{\n\t_return pushBack format [\"IDC: %1, className: %2\", ctrlIDC _x, ctrlClassName _x];\n} forEach (allControls findDisplay 46);\n\ncopyToClipboard (_return joinString endl);"]}],"see_also":["ctrlIDC","ctrlIDD","ctrlType","ctrlCreate","ctrlDelete","ctrlModel","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp"]},{"name":"ctrlCommit","title":"ctrlCommit","type":"command","url":"https://community.bistudio.com/wiki/ctrlCommit","revid":369237,"updated":"2024-09-03T10:35:01Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Commits control animation to last specified duration.\n\n> [!IMPORTANT]\n> The duration of the animation is not guaranteed to be exactly the same as the given time.","syntaxes":[{"syntax":"control ctrlCommit time","params":[{"name":"control","type":"Control","description":"control to animate","type_expr":"Control"},{"name":"time","type":"Number","description":"animation duration","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"time"}}],"examples":[{"code":["_control ctrlCommit 2; // make animation last approx. 2 seconds"]}],"see_also":["ctrlCommitted","ctrlSetPosition","ctrlSetFade"],"notes":[{"user":"Nelis75733126","date":"2015-04-11T23:06:00Z","text":"**2024-04-16 edit:**:\n`ctrlCommit` is required to apply the effect of, for example, ctrlSetFade."},{"user":"Demellion","date":"2017-08-28T11:33:00Z","text":"The resulting speed might not to be exactly what ctrlCommit commands it to be. It seems to be dependent on your current framerate. Example:\n\n```sqf\n_ctrl ctrlSetFade 0.5;\n_ctrl ctrlCommit 1;\n```\n\nWill actually result in:\n\n| FPS | Duration |\n|---|---|\n| 60+ | ~1.0s |\n| ~30 | ~1.2s |\n| 10- | ~5-10s |\n\nThis phenomenon probably occurs because of engine time simulation disruption caused by performance damage."}]},{"name":"ctrlCommitted","title":"ctrlCommitted","type":"command","url":"https://community.bistudio.com/wiki/ctrlCommitted","revid":310867,"updated":"2022-05-07T20:24:09Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Check if the control animation is finished.","syntaxes":[{"syntax":"ctrlCommitted controlName","params":[{"name":"controlName","type":"Control","type_expr":"Control"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"controlName"}}],"examples":[{"code":["_done = ctrlCommitted _control;"]}],"see_also":["ctrlCommit"]},{"name":"ctrlCreate","title":"ctrlCreate","type":"command","url":"https://community.bistudio.com/wiki/ctrlCreate","revid":378109,"updated":"2026-02-15T22:08:16Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","description":"Creates a new control in the given display.\nThe control class could be an existing class from the main config or a custom class defined in the mission config.\nThe main config is searched first, if the class does not exist there, the mission config is searched.\nSome of the common controls defined in the main config that can be used with this command:\n\n> [!NOTE]\n> This list contains controls which are guaranteed to work with this command. However, controls not listed here should work as well - as long as they are properly defined.\n\n| Class | Description | Available since |\n|---|---|---|\n| RscText | simple text box |  |\n| RscStructuredText | text box which supports structured text |  |\n| RscTextMulti | simple multiline text box |  |\n| RscPicture | simple picture box |  |\n| RscPictureKeepAspect | picture box that doesn't stretch picture |  |\n| RscEdit | input box |  |\n| RscEditMulti | multiline input box |  |\n| RscEditReadOnly | input box with `canModify = false;` | Arma 3 v1.98 |\n| RscEditMultiReadOnly | multiline input box with `canModify = false;` | Arma 3 v1.98 |\n| RscTree | tree view control |  |\n| RscTreeMulti | multi-select tree view | Arma 3 v2.02 |\n| RscTreeSearch | searchable tree view control (see Example 4) |  |\n| RscVideo | picture control with autostart for video texture (see BIS_fnc_playVideo) |  |\n| RscVideoKeepAspect | picture control for video to keep original video aspect ratio |  |\n| RscButtonMenuBIKI | shortcut button with url pointing to \"https://community.bistudio.com/wiki/\" | Arma 3 v1.98 |\n| RscControlsGroup | default controls group |  |\n| RscControlsGroupNoScrollbars | controls group without scrollbars |  |\n| RscControlsGroupNoHScrollbars | controls group without horizontal scrollbar |  |\n| RscControlsGroupNoVScrollbars | controls group without vertical scrollbar |  |\n\n> [!IMPORTANT]\n> If you are creating CT_MAP control dynamically, use ctrlMapSetPosition to update control position instead of ctrlSetPosition.","syntaxes":[{"syntax":"display ctrlCreate [class, idc, controlsGroup]","params":[{"name":"display","type":"Display","description":"display in which control will be created","type_expr":"Display"},{"name":"class","type":"String or Arma 3 v2.14 Config","description":"existing classname (see ctrlCreate/classnames) of the new control; Arma 3 v1.70 it is possible to use classes defined in mission config","type_expr":"String | Config"},{"name":"idc","type":"Number","description":"IDC of the new control. Use -1 if not needed. Using 0 will use the IDC that is provided by the class.\n\n> [!WARNING]\n> Be careful when setting the IDC to `-1` if the GUI also contains a CT_LISTNBOX since `idcLeft` and `idcRight` by default have `idc = -1;`.","type_expr":"Number"},{"name":"controlsGroup","type":"Control","optional":true,"default":"controlNull","description":"creates controls in existing controls group","type_expr":"Control","text":"controlsGroup: Control - (Optional, default controlNull) creates controls in existing controls group"}],"returns":{"type":"Control","type_expr":"Control"},"form":"binary","left":{"text":"display"},"right":{"text":"[class, idc, controlsGroup]"}}],"examples":[{"code":["_display ctrlCreate [\"RscText\", 1234];"]},{"code":["_map = findDisplay 46 ctrlCreate [\"RscMapControl\", -1];\n_multiLineText = findDisplay 46 ctrlCreate [\"RscTextMulti\", -1];\n_multiLineEdit = findDisplay 46 ctrlCreate [\"RscEditMulti\", -1];"]},{"code":["myControl = findDisplay 0 ctrlCreate [\"RscText\", 1234, findDisplay 0 displayCtrl 2300];"]},{"text":"Create Tree View control with search. Available `RscTreeSearch` class is hardcoded to be used with `RscEdit` with idc `645`.\nExample below demonstrates how to. After tree is generated, try typing something in the top box.\n\n```sqf\n0 spawn\n{\n    disableSerialization;\n\n    _display = (if (is3DEN) then {findDisplay 313} else {[] call BIS_fnc_displayMission}) createDisplay \"RscDisplayEmpty\";\n\n    _edit = _display ctrlCreate [\"RscEdit\", 645];\n    _edit ctrlSetPosition [0,0,1,0.04];\n    _edit ctrlSetBackgroundColor [0,0,0,1];\n    _edit ctrlCommit 0;\n\n    _tv = _display ctrlCreate [\"RscTreeSearch\", -1];\n    _tv ctrlSetFont \"EtelkaMonospacePro\";\n    _tv ctrlSetFontHeight 0.03;\n    _tv ctrlSetPosition [0,0.06,1,0.94];\n    _tv ctrlSetBackgroundColor [0,0,0,1];\n    _tv ctrlCommit 0;\n\n    _classes = \"true\" configClasses (configFile >> \"CfgVehicles\");\n\n    for \"_i\" from 0 to 5 do\n    {\n        _tv tvAdd [[], configName selectRandom _classes];\n        for \"_j\" from 0 to 5 do\n        {\n            _tv tvAdd [[_i], configName selectRandom _classes];\n            for \"_k\" from 0 to 5 do\n            {\n                _tv tvAdd [[_i, _j], configName selectRandom _classes];\n                for \"_n\" from 0 to 5 do\n                {\n                    _tv tvAdd [[_i, _j, _k], configName selectRandom _classes];\n                };\n            };\n        };\n    };\n};\n```","code":["0 spawn \n{\n\tdisableSerialization;\n\n\t_display = (if (is3DEN) then {findDisplay 313} else {[] call BIS_fnc_displayMission}) createDisplay \"RscDisplayEmpty\";\n\n\t_edit = _display ctrlCreate [\"RscEdit\", 645];\n\t_edit ctrlSetPosition [0,0,1,0.04];\n\t_edit ctrlSetBackgroundColor [0,0,0,1];\n\t_edit ctrlCommit 0;\n\n\t_tv = _display ctrlCreate [\"RscTreeSearch\", -1];\n\t_tv ctrlSetFont \"EtelkaMonospacePro\";\n\t_tv ctrlSetFontHeight 0.03;\n\t_tv ctrlSetPosition [0,0.06,1,0.94];\n\t_tv ctrlSetBackgroundColor [0,0,0,1];\n\t_tv ctrlCommit 0;\n\n\t_classes = \"true\" configClasses (configFile >> \"CfgVehicles\");\n\n\tfor \"_i\" from 0 to 5 do\n\t{\n\t\t_tv tvAdd [[], configName selectRandom _classes];\n\t\tfor \"_j\" from 0 to 5 do\n\t\t{\n\t\t\t_tv tvAdd [[_i], configName selectRandom _classes];\n\t\t\tfor \"_k\" from 0 to 5 do\n\t\t\t{\n\t\t\t\t_tv tvAdd [[_i, _j], configName selectRandom _classes];\n\t\t\t\tfor \"_n\" from 0 to 5 do\n\t\t\t\t{\n\t\t\t\t\t_tv tvAdd [[_i, _j, _k], configName selectRandom _classes];\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n};"]},{"text":"Create a simple submit edit box and show content in hint:\n\n```sqf\ndisableSerialization;\nprivate _display = findDisplay 46 createDisplay \"RscDisplayEmpty\";\nprivate _ctrlGroup = _display ctrlCreate [\"RscControlsGroupNoScrollbars\", -1];\nprivate _ctrlBackground = _display ctrlCreate [\"RscTextMulti\", -1, _ctrlGroup];\nIDD_EDIT_BOX = 123;\nprivate _ctrlEdit = _display ctrlCreate [\"RscEditMulti\", IDD_EDIT_BOX, _ctrlGroup];\nprivate _ctrlButton = _display ctrlCreate [\"RscShortcutButton\", -1, _ctrlGroup];\n_ctrlGroup ctrlSetPosition [0.5, 0.5, 0, 0];\n_ctrlGroup ctrlCommit 0;\n_ctrlBackground ctrlSetPosition [0, 0, 0.5, 0.5];\n_ctrlBackground ctrlSetBackgroundColor [0.5, 0.5, 0.5, 0.9];\n_ctrlBackground ctrlSetText \"ENTER TEXT:\";\n_ctrlBackground ctrlEnable false;\n_ctrlBackground ctrlCommit 0;\n_ctrlEdit ctrlSetPosition [0.01, 0.05, 0.48, 0.34];\n_ctrlEdit ctrlSetBackgroundColor [0, 0, 0, 0.5];\n_ctrlEdit ctrlCommit 0;\n_ctrlButton ctrlSetPosition [0.185, 0.42, 0.13, 0.05];\n_ctrlButton ctrlCommit 0;\n_ctrlButton ctrlSetText \"SUBMIT\";\n_ctrlButton ctrlAddEventHandler [\"ButtonClick\",\n{\n    params [\"_ctrl\"];\n    _display = ctrlParent _ctrl;\n    _text = ctrlText (_display displayCtrl IDD_EDIT_BOX);\n    if (_text == \"\") then { _text = \"EMPTY\" };\n    hint _text;\n    _display closeDisplay 1;\n}];\nctrlSetFocus _ctrlEdit;\n_ctrlGroup ctrlSetPosition [0.25, 0.25, 0.5, 0.5];\n_ctrlGroup ctrlCommit 0.1;\nplaySound \"Hint3\";\n```","code":["disableSerialization;\nprivate _display = findDisplay 46 createDisplay \"RscDisplayEmpty\";\nprivate _ctrlGroup = _display ctrlCreate [\"RscControlsGroupNoScrollbars\", -1];\nprivate _ctrlBackground = _display ctrlCreate [\"RscTextMulti\", -1, _ctrlGroup];\nIDD_EDIT_BOX = 123;\nprivate _ctrlEdit = _display ctrlCreate [\"RscEditMulti\", IDD_EDIT_BOX, _ctrlGroup];\nprivate _ctrlButton = _display ctrlCreate [\"RscShortcutButton\", -1, _ctrlGroup];\n_ctrlGroup ctrlSetPosition [0.5, 0.5, 0, 0];\n_ctrlGroup ctrlCommit 0;\n_ctrlBackground ctrlSetPosition [0, 0, 0.5, 0.5];\n_ctrlBackground ctrlSetBackgroundColor [0.5, 0.5, 0.5, 0.9];\n_ctrlBackground ctrlSetText \"ENTER TEXT:\";\n_ctrlBackground ctrlEnable false;\n_ctrlBackground ctrlCommit 0;\n_ctrlEdit ctrlSetPosition [0.01, 0.05, 0.48, 0.34];\n_ctrlEdit ctrlSetBackgroundColor [0, 0, 0, 0.5];\n_ctrlEdit ctrlCommit 0;\n_ctrlButton ctrlSetPosition [0.185, 0.42, 0.13, 0.05];\n_ctrlButton ctrlCommit 0;\n_ctrlButton ctrlSetText \"SUBMIT\";\n_ctrlButton ctrlAddEventHandler [\"ButtonClick\", \n{\n\tparams [\"_ctrl\"];\n\t_display = ctrlParent _ctrl;\n\t_text = ctrlText (_display displayCtrl IDD_EDIT_BOX);\n\tif (_text == \"\") then { _text = \"EMPTY\" };\n\thint _text;\n\t_display closeDisplay 1;\n}];\nctrlSetFocus _ctrlEdit;\n_ctrlGroup ctrlSetPosition [0.25, 0.25, 0.5, 0.5];\n_ctrlGroup ctrlCommit 0.1;\nplaySound \"Hint3\";"]},{"code":["// since Arma 3 v2.14\nfindDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [configFile >> \"RscDisplayBootcampMsgBox\" >> \"controls\" >> \"BootcampMessageBox\", -1];"]},{"text":"```sqf\n// Creates a vertical slider. Execute in Eden Editor\nprivate _display = findDisplay 313 createDisplay \"RscDisplayEmpty\";\nprivate _ctrlSlider = _display ctrlCreate [\"ctrlSliderV\", -1];\n\n_ctrlSlider ctrlSetPosition\n[\n  0.5 - 0.5 * pixelGrid * pixelW * 10,\n  0.5 - 0.5 * pixelGrid * pixelH * 40,\n  0.5 * pixelGrid * pixelW * 20,\n  0.5 * pixelGrid * pixelH * 80\n];\n\n_ctrlSlider ctrlCommit 0;\n```","code":["// Creates a vertical slider. Execute in Eden Editor\nprivate _display = findDisplay 313 createDisplay \"RscDisplayEmpty\";\nprivate _ctrlSlider = _display ctrlCreate [\"ctrlSliderV\", -1];\n\n_ctrlSlider ctrlSetPosition \n[\n  0.5 - 0.5 * pixelGrid * pixelW * 10, \n  0.5 - 0.5 * pixelGrid * pixelH * 40, \n  0.5 * pixelGrid * pixelW * 20, \n  0.5 * pixelGrid * pixelH * 80\n];\n\n_ctrlSlider ctrlCommit 0;"]},{"code":["// The following script creates a button that follows the position of the player unit in Eden Editor\n\nif (isNull player) exitWith {[\"Place a player entity first\", 1] call BIS_fnc_3DENNotification};\n\nprivate _display = findDisplay 313;\n\nprivate _ctrlButton = _display ctrlCreate [\"ctrlButton\", 1234];\n_ctrlButton ctrlSetText \"Delete Me\";\n\n_ctrlButton ctrlAddEventHandler [\"ButtonClick\",\n{\n    params [\"_ctrlButton\"];\n\n    onEachFrame {};\n    _ctrlButton spawn {sleep 0.05; ctrlDelete _this};\n}];\n\nonEachFrame\n{\n    private _ctrlButton = findDisplay 313 displayCtrl 1234;\n\n    if (isNull player) exitWith {};\n\n    (worldToScreen getPosWorld player) params [\"_xPos\", \"_yPos\"];\n\n    _ctrlButton ctrlSetPosition [_xPos, _yPos, 0.1 * safeZoneW, 0.05 * safeZoneH];\n    _ctrlButton ctrlCommit 0;\n};"]}],"see_also":["ctrlMapSetPosition","allControls","allDisplays","controlsGroupCtrl","ctrlDelete","ctrlModel","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlClassName","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp","displayParent"]},{"name":"ctrlDelete","title":"ctrlDelete","type":"command","url":"https://community.bistudio.com/wiki/ctrlDelete","revid":337526,"updated":"2023-02-05T19:30:47Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","description":"Deletes given control. The control has to be created either by script with ctrlCreate or to have `deletable` property in config set to 1. Use ctrlShow false and ctrlEnable false to disable controls that cannot be deleted. Returns Boolean indicating whether the deletion was successful.\n\n> [!WARNING]\n> Using ctrlDelete in a UI eventhandler called by the to be deleted control will crash the game! This also happens when a controls group is deleted that contains the \"calling\" control.","syntaxes":[{"syntax":"ctrlDelete control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["ctrlDelete ((findDisplay 20000) displayCtrl 20001);"]}],"see_also":["ctrlCreate","ctrlModel","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlClassName","displayCtrl","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp"]},{"name":"ctrlEnable","title":"ctrlEnable","type":"command","url":"https://community.bistudio.com/wiki/ctrlEnable","revid":364166,"updated":"2024-05-05T10:46:43Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Enables or disables a control of the currently active user dialog.\nDisabled controls cannot be clicked onto.\nRead Arma: GUI Configuration for more information about user dialogs and controls.","syntaxes":[{"syntax":"ctrlEnable [idc, enable]","params":[{"name":"idc","type":"Number","description":"control IDC","type_expr":"Number"},{"name":"enable","type":"Boolean","description":"true to enable the control, false to disable it","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, enable]"}},{"syntax":"controlName ctrlEnable enable","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"enable"}}],"examples":[{"code":["ctrlEnable [100, false];"]},{"code":["_ctrl ctrlEnable false;"]}],"see_also":["ctrlEnabled"],"notes":[{"user":"Yuval","date":"2017-07-20T11:59:00Z","text":"Please do note that enabled controls can gain focus upon click. Therefore do not enable background controls or else they will cover any controls on top of them.\nAs a general rule of thumb, enabled controls should only be already on the top of the GUI."},{"user":"R3vo","date":"2020-09-07T22:26:00Z","text":"One can disable a control when it is loaded by using ctrlEnable in the onLoad event handler.\n\n```cpp\nclass MyDialog\n{\n    class MyControl\n    {\n        onLoad = \"(_this # 0) ctrlEnable false;\";\n    };\n};\n```"}]},{"name":"ctrlEnabled","title":"ctrlEnabled","type":"command","url":"https://community.bistudio.com/wiki/ctrlEnabled","revid":338573,"updated":"2023-03-20T14:59:19Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local"},"description":"Returns if a control on the currently active user dialog is enabled. Disabled controls cannot be focused. Read Arma: GUI Configuration for more information about user dialogs and controls.","syntaxes":[{"syntax":"ctrlEnabled idc","params":[{"name":"idc","type":"Number","description":"control's IDC","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the control is enabled, false if not"},"form":"unary","right":{"text":"idc"}},{"syntax":"ctrlEnabled controlName","params":[{"name":"controlName","type":"Control","type_expr":"Control"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the control is enabled, false if not"},"form":"unary","right":{"text":"controlName"}}],"examples":[{"text":"```sqf\nif !(ctrlEnabled 100) then\n{\n    ctrlEnable [100, true];\n};\n```","code":["if !(ctrlEnabled 100) then\n{\n\tctrlEnable [100, true];\n};"]},{"code":["_enabled = ctrlEnabled _control;"]}],"see_also":["ctrlEnable"]},{"name":"ctrlFade","title":"ctrlFade","type":"command","url":"https://community.bistudio.com/wiki/ctrlFade","revid":379115,"updated":"2026-10-07T21:16:51Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the current fade factor of control.\n\n> [!NOTE]\n> Despite having `fade = 1;` inside a control's config, this command **will** report a fade of 0.\n> Only the value actually set by ctrlSetFade will be returned by ctrlFade.","syntaxes":[{"syntax":"ctrlFade controlName","params":[{"name":"controlName","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"controlName"}}],"examples":[{"code":["_fade = ctrlFade _control;"]}],"see_also":["ctrlSetFade"]},{"name":"ctrlFontHeight","title":"ctrlFontHeight","type":"command","url":"https://community.bistudio.com/wiki/ctrlFontHeight","revid":309906,"updated":"2022-05-05T12:16:53Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Returns control's font size, usually `sizeEx` value (see ctrlSetFontHeight).","syntaxes":[{"syntax":"ctrlFontHeight control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["ctrlFontHeight _control;"]}],"see_also":["ctrlTextHeight","ctrlTextWidth","ctrlSetFontHeight"]},{"name":"ctrlForegroundColor","title":"ctrlForegroundColor","type":"command","url":"https://community.bistudio.com/wiki/ctrlForegroundColor","revid":377364,"updated":"2026-01-02T06:40:35Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Returns control's foreground color.","syntaxes":[{"syntax":"ctrlForegroundColor control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Color (RGBA)","type_expr":"Color"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["ctrlForegroundColor _control;"]}],"see_also":["ctrlSetForegroundColor","ctrlText"]},{"name":"ctrlGetProperty","title":"ctrlGetProperty","type":"command","url":"https://community.bistudio.com/wiki/ctrlGetProperty","revid":379130,"updated":"2026-10-09T16:30:40Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.24"},"since":"arma3 2.24","arma3_since":"2.24","branch":["dev"],"locality":{"argument":"local","effect":"local"},"description":"Returns one or multiple given properties of given control.","syntaxes":[{"syntax":"control ctrlGetProperty property","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"property","type":"String","description":"Any property available for given control type. Case insensitive","type_expr":"String"}],"returns":{"type":"Anything","type_expr":"Anything","description":"Return value depends on the property"},"form":"binary","left":{"text":"control"},"right":{"text":"property"}},{"syntax":"control ctrlGetProperty properties","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"properties","type":"Array of Strings","description":"Properties available for given control type. Case insensitive","type_expr":"Array<String>"}],"returns":{"type":"HashMap","type_expr":"HashMap","description":"in format:\n- key: String - Name of the property - value: Anything - Value depends on the property","text":"HashMap in format:\n\n- key: String - Name of the property\n- value: Anything - Value depends on the property"},"form":"binary","left":{"text":"control"},"right":{"text":"properties"}}],"examples":[{"code":["_ctrl ctrlGetProperty \"x\"; // Return 0.015"]},{"code":["_ctrl ctrlGetProperty [\"x\", \"colorBackground\"]; // Return {\"x\": 0.015, \"colorBackground\": [1, 0.4, 1, 1]}"]}],"see_also":["ctrlSetProperty"]},{"name":"ctrlHTMLLoaded","title":"ctrlHTMLLoaded","type":"command","url":"https://community.bistudio.com/wiki/ctrlHTMLLoaded","revid":369233,"updated":"2024-09-03T10:35:01Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns true when HTML content was successfully loaded.","syntaxes":[{"syntax":"ctrlHTMLLoaded control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"control"}}],"examples":[{"text":"```sqf\n_control htmlLoad \"test.html\";\nif (!ctrlHTMLLoaded _control) then {\n    hint \"Loading test.html failed!\";\n};\n```","code":["_control htmlLoad \"test.html\";\nif (!ctrlHTMLLoaded _control) then {\n\thint \"Loading test.html failed!\";\n};"]}],"see_also":["htmlLoad","Arma: GUI Configuration"]},{"name":"ctrlIDC","title":"ctrlIDC","type":"command","url":"https://community.bistudio.com/wiki/ctrlIDC","revid":364443,"updated":"2024-05-16T09:58:13Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns control IDC.","syntaxes":[{"syntax":"ctrlIDC control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["ctrlIDC _ctrl;"]},{"code":["ctrlIDC controlNull; // returns -1"]}],"see_also":["allControls","allDisplays","controlsGroupCtrl","ctrlDelete","ctrlModel","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlClassName","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp","displayParent"]},{"name":"ctrlIDD","title":"ctrlIDD","type":"command","url":"https://community.bistudio.com/wiki/ctrlIDD","revid":376847,"updated":"2025-12-05T16:57:27Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns display IDD.","syntaxes":[{"syntax":"ctrlIDD display","params":[{"name":"display","type":"Display","type_expr":"Display"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"display"}}],"examples":[{"code":["_display = findDisplay 46;\nctrlIDD _display; // 46"]}],"see_also":["displayCtrl","findDisplay"]},{"name":"ctrlMapAnimAdd","title":"ctrlMapAnimAdd","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapAnimAdd","revid":377869,"updated":"2026-01-04T11:37:23Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Adds the next frame to the map animation.","syntaxes":[{"syntax":"map ctrlMapAnimAdd [time, zoom, position]","params":[{"name":"map","type":"Control","description":"CT_MAP control","type_expr":"Control"},{"name":"time","type":"Number","description":"duration of the animation in seconds","type_expr":"Number"},{"name":"zoom","type":"Number","description":"zoom in range from 0.001 (max) to 1 (min). Custom map scales can be set in map control's config. See also ctrlMapScale","type_expr":"Number"},{"name":"position","type":"Position2D, Position3D, Object","type_expr":"Position2D | Position3D | Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[time, zoom, position]"}}],"examples":[{"code":["_map ctrlMapAnimAdd [1, 0.1, getMarkerPos \"anim1\"];\nctrlMapAnimCommit _map;"]},{"text":"Center map on player:\n\n```sqf\n_ctrl ctrlMapAnimAdd [0, 0.05, player];\nctrlMapAnimCommit _ctrl;\n```","code":["_ctrl ctrlMapAnimAdd [0, 0.05, player];\nctrlMapAnimCommit _ctrl;"]},{"code":["_map ctrlMapSetPosition [];\n_map ctrlMapAnimAdd [1, 0.1, getMarkerPos \"anim1\"];\nctrlMapAnimCommit _map;"]}],"problems":"When used on a CT_MAP that was created dynamically the target position could be offset. Use ctrlMapSetPosition before adding animation (Example 3).","see_also":["ctrlMapSetPosition","mapAnimAdd","mapAnimClear","mapAnimCommit","mapAnimDone","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone"]},{"name":"ctrlMapAnimClear","title":"ctrlMapAnimClear","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapAnimClear","revid":339139,"updated":"2023-04-26T10:55:02Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Clears the map animation.","syntaxes":[{"syntax":"ctrlMapAnimClear controlName","params":[{"name":"controlName","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"controlName"}}],"examples":[{"code":["ctrlMapAnimClear _ctrlMap;"]}],"see_also":["mapAnimAdd","mapAnimClear","mapAnimCommit","mapAnimDone","ctrlMapAnimAdd","ctrlMapAnimCommit","ctrlMapAnimDone"]},{"name":"ctrlMapAnimCommit","title":"ctrlMapAnimCommit","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapAnimCommit","revid":321386,"updated":"2022-05-14T11:14:10Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Plays the map animation.","syntaxes":[{"syntax":"ctrlMapAnimCommit mapControl","params":[{"name":"mapControl","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"mapControl"}}],"examples":[{"text":"Center map on player:\n\n```sqf\n_ctrl ctrlMapAnimAdd [0, 0.05, player];\nctrlMapAnimCommit _ctrl;\n```","code":["_ctrl ctrlMapAnimAdd [0, 0.05, player];\nctrlMapAnimCommit _ctrl;"]}],"see_also":["mapAnimAdd","mapAnimClear","mapAnimCommit","mapAnimDone","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimDone"]},{"name":"ctrlMapAnimDone","title":"ctrlMapAnimDone","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapAnimDone","revid":351328,"updated":"2023-11-27T05:10:48Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Checks whether the map animation has finished.","syntaxes":[{"syntax":"ctrlMapAnimDone controlName","params":[{"name":"controlName","type":"Control","type_expr":"Control"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"controlName"}}],"examples":[{"code":["_isDone = ctrlMapAnimDone _ctrlMap;"]}],"see_also":["mapAnimAdd","mapAnimClear","mapAnimCommit","mapAnimDone","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit"]},{"name":"ctrlMapCursor","title":"ctrlMapCursor","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapCursor","revid":369056,"updated":"2024-09-02T20:24:53Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Changes the default cursor that appears when interacting with a map control to a custom one. Use an empty string to restore the default cursor.\n\n> [!IMPORTANT]\n> Before Arma 3, if the specified cursor does not exist the default is used and no error is produced.\n> In Arma 3, this would result in the following error: `\"No entry 'bin\\config.bin/CfgWrapperUI/Cursors'\"`.\n\nThe cursor is the name of a config entry from *CfgWrapperUI / Cursors*. This command has the following specifics:\n\n- When used on the Main Map (`findDisplay 12 displayCtrl 51`), it is possible to override multiple default cursors. For example, while leaving default \"Arrow\" intact, it is possible to just override \"Scroll\" with e.g \"Wait\" (See Example 3)\n- When used on a custom map, for example user made Mini Map, there is only one single cursor \"\" for everything, therefore only this cursor can be overridden (see Example 4 on how to override it)\n\nSome possible class names (See ctrlMapCursor/cursors for the whole list):\n\n- Arrow\n- Track\n- Move\n- Scroll\n- Rotate\n- Track3D\n- Move3D\n- Rotate3D\n- Raise3D\n- Wait\n- HC_move\n- HC_overFriendly\n- HC_overEnemy\n- HC_overMission\n- HC_unsel","syntaxes":[{"syntax":"control ctrlMapCursor [defaultCursor, newCursor]","params":[{"name":"control","type":"Control","description":"map control","type_expr":"Control"},{"name":"defaultCursor","type":"String","description":"cursor class name, **case-sensitive**","type_expr":"String"},{"name":"newCursor","type":"String","description":"cursor class name, **case-sensitive**","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[defaultCursor, newCursor]"}}],"examples":[{"code":["_map ctrlMapCursor [\"Track\", \"Arrow\"];"]},{"code":["uiNamespace setVariable [\"_map\", findDisplay 12 displayCtrl 51];\n(uiNamespace getVariable \"_map\") ctrlMapCursor [\"Track\", \"HC_overFriendly\"];"]},{"code":["findDisplay 12 displayCtrl 51 ctrlMapCursor [\"Scroll\", \"Wait\"];"]},{"text":"Cycle through all available cursors over custom map:\n\n```sqf\n0 spawn\n{\n    disableSerialization;\n    _map = findDisplay 46 createDisplay \"RscCredits\" ctrlCreate [\"RscMapControl\", -1];\n    _map ctrlSetPosition [0,0,1,1];\n    _map ctrlCommit 0;\n    {\n        _map ctrlMapCursor [\"\", configName _x]; //<-- the actual usage\n        hint format [\"Current cursor: %1\", configName _x];\n        sleep 1;\n    }\n    forEach (\"true\" configClasses (configFile >> \"CfgWrapperUI\" >> \"Cursors\"));\n};\n```","code":["0 spawn\n{\n\tdisableSerialization;\n\t_map = findDisplay 46 createDisplay \"RscCredits\" ctrlCreate [\"RscMapControl\", -1];\n\t_map ctrlSetPosition [0,0,1,1];\n\t_map ctrlCommit 0;\n\t{\n\t\t_map ctrlMapCursor [\"\", configName _x]; //<-- the actual usage\n\t\thint format [\"Current cursor: %1\", configName _x];\n\t\tsleep 1;\n\t}\n\tforEach (\"true\" configClasses (configFile >> \"CfgWrapperUI\" >> \"Cursors\"));\n};"]}],"see_also":["setMousePosition","getMousePosition"],"notes":[{"user":"Bull A","date":"2016-02-08T22:43:00Z","text":"When using this command, the cursor will change for the whole display, resulting in visual glitches. Adding the onMouseMoving event handler can help solve this problem:\n\n```sqf\n_control ctrlAddEventHandler [\"MouseMoving\", {\n    params [\n        [\"_mapCtrl\",controlNull, [controlNull]],\n        [\"_xPos\",-1,[0]],\n        [\"_yPos\",-1,[0]],\n        [\"_mouseIn\", false, [true]]\n    ];\n\n    if (_mouseIn) then {\n    // Mouse is in control area\n    _mapCtrl ctrlMapCursor [\"\", \"Track\"];\n    } else {\n    // Mouse is out of control area, goes back to arrow\n    _mapCtrl ctrlMapCursor [\"\", \"Arrow\"];\n    };\n}];\n```"}]},{"name":"ctrlMapDir","title":"ctrlMapDir","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapDir","revid":347213,"updated":"2023-09-05T16:49:02Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","description":"Returns the current orientation angle of the map control in degrees.","syntaxes":[{"syntax":"ctrlMapDir ctrl","params":[{"name":"ctrl","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"ctrl"}}],"examples":[{"code":["private _mapControl = findDisplay 12 displayCtrl 51; // get the map\nprivate _dir = ctrlMapDir _mapControl; // returns 0 as the main map does not autorotate"]}],"see_also":["ctrlMapScale"]},{"name":"ctrlMapMouseOver","title":"ctrlMapMouseOver","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapMouseOver","revid":369404,"updated":"2024-09-03T18:43:23Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns description of map sign mouse cursor is over. Works with in-game map as well as 2D editor map in edit mode.","syntaxes":[{"syntax":"ctrlMapMouseOver control","params":[{"name":"control","type":"Control","description":"map control","type_expr":"Control"}],"returns":{"type":"Array","type_expr":"Array","description":"possible values:\n- [\"unit\", Object] - [\"vehicle\", Object] - [\"vehicleGroup\", Object] - [\"object\", Object] - [\"waypoint\", Waypoint] - [\"trigger\", Object] - [\"marker\", String] - [\"task\", Task] - [\"customMark\"]","text":"Array - possible values:\n\n- [\"unit\", Object]\n- [\"vehicle\", Object]\n- [\"vehicleGroup\", Object]\n- [\"object\", Object]\n- [\"waypoint\", Waypoint]\n- [\"trigger\", Object]\n- [\"marker\", String]\n- [\"task\", Task]\n- [\"customMark\"]"},"form":"unary","right":{"text":"control"}}],"examples":[{"text":"```sqf\n(uiNamespace getVariable \"_map\") ctrlMapCursor [\"Track\",\"HC_overFriendly\"];\n\n_mouseover = if (count (ctrlMapMouseOver (uiNamespace getVariable \"_map\")) > 0) then\n{\n    ctrlMapMouseOver (uiNamespace getVariable \"_map\")\n}\nelse\n{\n    [\"\"]\n};\n\nif (_mouseover select 0 == \"task\" && str(_logic getVariable \"onTaskAssigned\") != str{}) then\n{\n    //--- Task\n    (uiNamespace getVariable \"_map\") ctrlMapCursor [\"Track\",\"HC_overMission\"];\n}\nelse\n{\n    //--- Waypoint\n    (uiNamespace getVariable \"_map\") ctrlMapCursor [\"Track\",\"HC_move\"];\n};\n```","code":["(uiNamespace getVariable \"_map\") ctrlMapCursor [\"Track\",\"HC_overFriendly\"];\n\n_mouseover = if (count (ctrlMapMouseOver (uiNamespace getVariable \"_map\")) > 0) then\n{\n\tctrlMapMouseOver (uiNamespace getVariable \"_map\")\n}\nelse\n{\n\t[\"\"]\n};\n\nif (_mouseover select 0 == \"task\" && str(_logic getVariable \"onTaskAssigned\") != str{}) then\n{\n\t//--- Task\n\t(uiNamespace getVariable \"_map\") ctrlMapCursor [\"Track\",\"HC_overMission\"];\n}\nelse\n{\n\t//--- Waypoint\n\t(uiNamespace getVariable \"_map\") ctrlMapCursor [\"Track\",\"HC_move\"];\n};"]},{"code":["onEachFrame {hintSilent str ctrlMapMouseOver (findDisplay 12 displayCtrl 51)};"]}],"see_also":["findDisplay","displayCtrl","BIS_fnc_createTooltip"]},{"name":"ctrlMapPosition","title":"ctrlMapPosition","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapPosition","revid":377802,"updated":"2026-01-03T04:03:42Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","description":"A getter for ctrlMapSetPosition. Returns map position in format [x, y, w, h]. If map is inside a Controls Group, the x and y position is relative to the Controls Group top left corner.","syntaxes":[{"syntax":"ctrlMapPosition map","params":[{"name":"map","type":"Control","description":"Map control","type_expr":"Control"}],"returns":{"type":"Array","type_expr":"Array","description":"with [x, y, w, h]\n- x: Number - position in x - y: Number - position in y - w: Number - width of the map control - h: Number - height of the map control","text":"Array with [x, y, w, h]\n\n- x: Number - position in x\n- y: Number - position in y\n- w: Number - width of the map control\n- h: Number - height of the map control"},"form":"unary","right":{"text":"map"}}],"examples":[{"code":["ctrlMapPosition _map;"]}],"see_also":["ctrlMapSetPosition","ctrlCreate"]},{"name":"ctrlMapScale","title":"ctrlMapScale","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapScale","revid":378435,"updated":"2026-04-07T21:06:22Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the current scale of given map control.","syntaxes":[{"syntax":"ctrlMapScale ctrl","params":[{"name":"ctrl","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"ctrl"}}],"examples":[{"code":["_control = (findDisplay 12) displayCtrl 51; // Arma 3\n_scale = ctrlMapScale _control; // returns number from 1 to 0.001"]}],"see_also":["ctrlScale","ctrlSetScale","ctrlMapDir"],"notes":[{"user":"Veteran29","date":"2024-10-07T00:35:13Z","text":"Following formula can be used to calculate current \"zoom points\", these can be used to hide/show icons at the same thresholds as the native map icons:\n\n```sqf\n800 * (1 / ctrlMapScale _ctrlMap) * (1 / getTerrainInfo#1)\n```\n\nThe thresholds are defined in\nptsPerSquare* ctrl map properties, e.g:\n\n```sqf\ngetNumber (configFile >> \"ctrlMap\" >> \"ptsPerSquareObj\")\n```"}]},{"name":"ctrlMapScreenToWorld","title":"ctrlMapScreenToWorld","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapScreenToWorld","revid":377831,"updated":"2026-01-03T04:31:43Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma1":"1.05","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.05","arma3_since":"0.50","description":"Converts map screen coordinates into world coordinates. Unlike posScreenToWorld, this command returns world position is format [x, y], otherwise it is identical to posScreenToWorld.","syntaxes":[{"syntax":"control ctrlMapScreenToWorld [x, y]","params":[{"name":"control","type":"Control","description":"map control","type_expr":"Control"},{"name":"x","type":"Number","description":"screen X","type_expr":"Number"},{"name":"y","type":"Number","description":"screen Y","type_expr":"Number"}],"returns":{"type":"Position2D","type_expr":"Position2D","description":"world coordinates"},"form":"binary","left":{"text":"control"},"right":{"text":"[x, y]"}}],"examples":[{"code":["_worldCoord = _control ctrlMapScreenToWorld _ScreenCoord;"]},{"code":["_worldCoord = _control ctrlMapScreenToWorld [_x, _y];"]},{"code":["_worldCoord = findDisplay 12 displayCtrl 51 ctrlMapScreenToWorld [0.5, 0.5];"]}],"see_also":["ctrlMapWorldToScreen","posScreenToWorld","posWorldToScreen","findDisplay","displayCtrl"],"notes":[{"user":"LowFly","date":"2007-04-06","text":"You can get the screen coordinates by the UI Event Handlers onMouseButtonDown, onMouseButtonUp, onMouseButtonClick, onMouseButtonDblClick.\n\nThe return Array is in 2D, you can use it with all set-position commands.\n\n```sqf\n_x = returnArray select 0;\n_y = returnArray select 1;\n```"},{"user":"Ceeeb","text":"The command parameters are screen position coordinates, which may not equate to the map control's coordinates. A map control's screen coordinates and size can be found use the ctrlPosition command. This is an issue when using the Arma 3 in-game map, which is not fullscreen (all previous titles used full screen map controls, so map control coords did equate to screen coords)."},{"user":"Icaruk","date":"2017-08-28","text":"This example creates a RscMapControl and hints you the [x,y] position where you clicked.\n\n```sqf\n0 spawn {\n    disableSerialization;\n    _map = findDisplay 46 createDisplay \"RscCredits\" ctrlCreate [\"RscMapControl\", -1];\n    _map ctrlSetPosition [0,0,1,1];\n    _map ctrlCommit 0;\n\n    _map ctrlAddEventHandler [\"mouseButtonDown\", {\n        _ctrl = _this select 0;\n        _x = _this select 2;\n        _y = _this select 3;\n\n        _pos = _ctrl ctrlMapScreenToWorld [_x, _y];\n        hint format [\"pos: %1\", _pos];\n    }];\n};\n```"}]},{"name":"ctrlMapSetPosition","title":"ctrlMapSetPosition","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapSetPosition","revid":352027,"updated":"2024-02-01T23:24:23Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Sets position and size of the given map control and recalculates control center. The effect is immediate and no ctrlCommit is necessary, unlike with ctrlSetPosition command.\n\n> [!NOTE]\n> The Map control is different from other controls and normally does not behave well inside Controls Groups. When this command is used on the Map control inside a Controls Group, The *x* and *y* will be treated as relative position to the top left of Controls Group. Use this command to set position before you use ctrlMapAnimAdd. Use this command to update Map control after its position or size had been changed or the Map control was created dynamically (Example 2). If you move Controls Group, use this command to refresh Map control (Example 3).","syntaxes":[{"syntax":"map ctrlMapSetPosition [x, y, w, h]","params":[{"name":"map","type":"Control","description":"Map control","type_expr":"Control"},{"name":"x","type":"Number","optional":true,"description":"Left top x of map control","type_expr":"Number","text":"x: Number - (Optional) Left top x of map control"},{"name":"y","type":"Number","optional":true,"description":"Left top y of map control","type_expr":"Number","text":"y: Number - (Optional) Left top y of map control"},{"name":"w","type":"Number","optional":true,"description":"Width of map control","type_expr":"Number","text":"w: Number - (Optional) Width of map control"},{"name":"h","type":"Number","optional":true,"description":"Height of map control","type_expr":"Number","text":"h: Number - (Optional) Height of map control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[x, y, w, h]"}}],"examples":[{"code":["_map ctrlMapSetPosition [0,0,1,1];"]},{"code":["_map ctrlSetPosition [0.5, 0.5, 0.5, 0.5];\n_map ctrlCommit 0;\n_map ctrlMapSetPosition []; // sync"]},{"text":"```sqf\nwith localNamespace do\n{\n    private _display = findDisplay 46 createDisplay \"RscDisplayEmpty\";\n    private _ctrlGroup = _display ctrlCreate [\"RscControlsGroup\", -1];\n    private _ctrlText = _display ctrlCreate [\"RscText\", -1, _ctrlGroup];\n    _ctrltext ctrlSetPosition [0, 0, 1, 1];\n    _ctrlText ctrlSetBackgroundColor [1, 0, 0, 0.5];\n    _ctrlText ctrlCommit 0;\n    private _ctrlMap = _display ctrlCreate [\"RscMapControl\", -1, _ctrlGroup];\n    _ctrlMap ctrlMapSetPosition [0, 0, 0.5, 0.5]; // effect is immediate\n    _ctrlMap ctrlMapAnimAdd [0, ctrlMapScale _ctrlMap, player];\n    ctrlMapAnimCommit _ctrlMap;\n    _ctrlGroup ctrlSetPosition [safeZoneX, safeZoneY, 1, 1];\n    _ctrlGroup ctrlCommit 0.3; // non instant transition\n    _ctrlMap ctrlMapSetPosition []; // instant sync to new _ctrlGroup position\n};\n```","code":["with localNamespace do\n{\n\tprivate _display = findDisplay 46 createDisplay \"RscDisplayEmpty\";\n\tprivate _ctrlGroup = _display ctrlCreate [\"RscControlsGroup\", -1];\n\tprivate _ctrlText = _display ctrlCreate [\"RscText\", -1, _ctrlGroup];\n\t_ctrltext ctrlSetPosition [0, 0, 1, 1];\n\t_ctrlText ctrlSetBackgroundColor [1, 0, 0, 0.5];\n\t_ctrlText ctrlCommit 0;\n\tprivate _ctrlMap = _display ctrlCreate [\"RscMapControl\", -1, _ctrlGroup];\n\t_ctrlMap ctrlMapSetPosition [0, 0, 0.5, 0.5]; // effect is immediate\n\t_ctrlMap ctrlMapAnimAdd [0, ctrlMapScale _ctrlMap, player];\n\tctrlMapAnimCommit _ctrlMap;\n\t_ctrlGroup ctrlSetPosition [safeZoneX, safeZoneY, 1, 1];\n\t_ctrlGroup ctrlCommit 0.3; // non instant transition\n\t_ctrlMap ctrlMapSetPosition []; // instant sync to new _ctrlGroup position\n};"]}],"see_also":["ctrlMapPosition","ctrlSetPosition","ctrlMapAnimAdd","ctrlCreate"]},{"name":"ctrlMapWorldToScreen","title":"ctrlMapWorldToScreen","type":"command","url":"https://community.bistudio.com/wiki/ctrlMapWorldToScreen","revid":379409,"updated":"2026-10-31T00:02:41Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma1":"1.05","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.05","arma3_since":"0.50","description":"Converts world coordinates into map screen coordinates. This command is identical to posWorldToScreen.","syntaxes":[{"syntax":"control ctrlMapWorldToScreen position","params":[{"name":"control","type":"Control","description":"map control","type_expr":"Control","text":"control : Control - map control"},{"name":"position","type":"Position2D or Position3D","description":"world position","type_expr":"Position2D | Position3D","text":"position : Position2D or Position3D - world position"}],"returns":{"type":"Position2D","type_expr":"Position2D","description":"screen coordinates in format [x, y]"},"form":"binary","left":{"text":"control"},"right":{"text":"position"}}],"examples":[{"code":["_screenCoord = _control ctrlMapWorldToScreen _worldCoord;"]},{"code":["_screenCoord = _control ctrlMapWorldToScreen position player;"]}],"see_also":["ctrlMapScreenToWorld","posWorldToScreen"],"notes":[{"user":".kju","date":"2010-06-16T00:00:00Z","text":"This command returns a 2D array with the position on the active map display. Say the return [0.5.0.5] would mean that your input 3d world position, like [500,1000], is currently at the center of the active map display.\nIn other words you can make the actual world position (of an object for example), relative to your active map display."}]},{"name":"ctrlModel","title":"ctrlModel","type":"command","url":"https://community.bistudio.com/wiki/ctrlModel","revid":310856,"updated":"2022-05-07T20:24:08Z","groups":["GUI Control - Object"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","description":"Returns model used in 3D-Dialog.","syntaxes":[{"syntax":"ctrlModel control","params":[{"name":"control","type":"Control","description":"3D control","type_expr":"Control","text":"control : Control - 3D control"}],"returns":{"type":"String","type_expr":"String","description":"model path"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_model = ctrlModel _control3D;"]}],"see_also":["ctrlCreate","ctrlDelete","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlClassName","displayCtrl","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp"]},{"name":"ctrlModelDirAndUp","title":"ctrlModelDirAndUp","type":"command","url":"https://community.bistudio.com/wiki/ctrlModelDirAndUp","revid":365012,"updated":"2024-07-10T09:58:01Z","groups":["GUI Control - Object"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","description":"Returns vectorDir and vectorUp of the model used in 3D-Dialogs. Returns [[],[]] if control is null.","syntaxes":[{"syntax":"ctrlModelDirAndUp control","params":[{"name":"control","type":"Control","description":"3D control","type_expr":"Control","text":"control : Control - 3D control"}],"returns":{"type":"Array of Vector3Ds","type_expr":"Array<Vector3D>","description":"format [vectorDir, vectorUp] or [[],[]]","text":"Array of Vector3Ds format [vectorDir, vectorUp] or [[],[]]"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_vectorDirAndUp = ctrlModelDirAndUp _control3D;"]}],"see_also":["ctrlModelVectorSide","ctrlCreate","ctrlDelete","ctrlSetModelDirAndUp","ctrlModel","ctrlSetModel","ctrlSetModelScale","ctrlModelScale","ctrlPosition","ctrlSetPosition","ctrlClassName","displayCtrl"]},{"name":"ctrlModelScale","title":"ctrlModelScale","type":"command","url":"https://community.bistudio.com/wiki/ctrlModelScale","revid":310836,"updated":"2022-05-07T20:23:59Z","groups":["GUI Control - Object","GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","description":"Returns 3D control model scale.","syntaxes":[{"syntax":"ctrlModelScale control","params":[{"name":"control","type":"Control","description":"3D control","type_expr":"Control","text":"control : Control - 3D control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_currentScale = ctrlModelScale _ctrl3D;"]}],"see_also":["ctrlModelDirAndUp","ctrlCreate","ctrlDelete","ctrlModel","ctrlSetModel","ctrlSetModelDirAndUp","ctrlSetModelScale","ctrlPosition","ctrlScale","ctrlSetScale","ctrlSetPosition","ctrlClassName","vectorDir","vectorUp","setVectorDirAndUp"]},{"name":"ctrlModelVectorSide","title":"ctrlModelVectorSide","type":"command","url":"https://community.bistudio.com/wiki/ctrlModelVectorSide","revid":377877,"updated":"2026-01-04T13:26:46Z","groups":["GUI Control - Object"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Get the provided control model's vectorSide in 3D-Dialogs.","syntaxes":[{"syntax":"ctrlModelVectorSide control","params":[{"name":"control","type":"Control","description":"3D control","type_expr":"Control","text":"control : Control - 3D control"}],"returns":{"type":"Vector3D","type_expr":"Vector3D","description":"vectorSide of the model or empty array if control is null","text":"Vector3D - vectorSide of the model or empty array if *control* is null"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["private _vectorSide = ctrlModelVectorSide _control3D;"]}],"see_also":["ctrlModelDirAndUp","ctrlCreate","ctrlDelete","ctrlSetModelDirAndUp","ctrlModel","ctrlSetModel","ctrlSetModelScale","ctrlModelScale","ctrlPosition","ctrlSetPosition","ctrlClassName","displayCtrl"]},{"name":"ctrlMousePosition","title":"ctrlMousePosition","type":"command","url":"https://community.bistudio.com/wiki/ctrlMousePosition","revid":378524,"updated":"2026-05-04T01:55:42Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns position of the mouse on the screen relative to UI Control in UI coordinates. Also works within CT_CONTROLS_GROUPs. In that case, returned position is relative to the position of the group.","syntaxes":[{"syntax":"ctrlMousePosition control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Position2D","type_expr":"Position2D","description":"x and y UI coordinates of the mouse position"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["private _mouseRelPos = ctrlMousePosition _ctrl;"]}],"see_also":["ctrlSetMousePosition","setMousePosition","getMousePosition","ctrlMapCursor"]},{"name":"ctrlParent","title":"ctrlParent","type":"command","url":"https://community.bistudio.com/wiki/ctrlParent","revid":310860,"updated":"2022-05-07T20:24:09Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the parent Display of the given control. For parent Controls group see ctrlParentControlsGroup.","syntaxes":[{"syntax":"ctrlParent control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Display","type_expr":"Display"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_display = ctrlParent _control;"]}],"see_also":["allControls","allDisplays","controlsGroupCtrl","ctrlDelete","ctrlModel","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlClassName","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp","displayParent","ctrlParentControlsGroup"]},{"name":"ctrlParentControlsGroup","title":"ctrlParentControlsGroup","type":"command","url":"https://community.bistudio.com/wiki/ctrlParentControlsGroup","revid":369358,"updated":"2024-09-03T18:43:05Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns the parent control of a given child control. If the control is not part of a CT_CONTROLS_GROUP control then controlNull is returned. To return parent Display of the control use ctrlParent.","syntaxes":[{"syntax":"ctrlParentControlsGroup ctrl","params":[{"name":"ctrl","type":"Control","description":"child control","type_expr":"Control"}],"returns":{"type":"Control","type_expr":"Control"},"form":"unary","right":{"text":"ctrl"}}],"examples":[{"code":["_ctrlCombo = _ctrl controlsGroupCtrl 100; // control\nctrlParentControlsGroup _ctrlCombo; // parent control group (_ctrl)"]}],"see_also":["controlsGroupCtrl","ctrlParent","displayParent","allControls","allDisplays"]},{"name":"ctrlPosition","title":"ctrlPosition","type":"command","url":"https://community.bistudio.com/wiki/ctrlPosition","revid":377302,"updated":"2026-01-02T06:38:20Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the current position of 2D control as `[x, y, w, h]` array. For 3D control it returns relative `[x, z, y]`.\nIf the control is within a CT_CONTROLS_GROUP, the returned position will be relative to the group's position.\nIf the control is a CT_CONTROLS_TABLE header or row the returned position is relative to the table's position.","syntaxes":[{"syntax":"ctrlPosition controlName","params":[{"name":"controlName","type":"Control","type_expr":"Control"}],"returns":{"type":"Array","type_expr":"Array","description":"format `[x, y, w, h]` (2D) or `[x, z, y]` (3D)","text":"Array format `[x, y, w, h]` (2D) or `[x, z, y]` (3D)"},"form":"unary","right":{"text":"controlName"}}],"examples":[{"code":["_pos = ctrlPosition _control;"]}],"see_also":["ctrlCreate","ctrlDelete","ctrlModel","ctrlSetModel","ctrlSetPosition","ctrlClassName","displayCtrl","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp"]},{"name":"ctrlRemoveAllEventHandlers","title":"ctrlRemoveAllEventHandlers","type":"command","url":"https://community.bistudio.com/wiki/ctrlRemoveAllEventHandlers","revid":363228,"updated":"2024-03-26T10:51:07Z","groups":["GUI Control - Event Handlers","Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Remove all event handlers from the given control.","syntaxes":[{"syntax":"control ctrlRemoveAllEventHandlers handlerName","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"handlerName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"handlerName"}}],"examples":[{"code":["_ctrlButton ctrlRemoveAllEventHandlers \"ButtonDown\";"]}],"see_also":["ctrlAddEventHandler"]},{"name":"ctrlRemoveEventHandler","title":"ctrlRemoveEventHandler","type":"command","url":"https://community.bistudio.com/wiki/ctrlRemoveEventHandler","revid":329861,"updated":"2022-08-07T23:04:48Z","groups":["GUI Control - Event Handlers","Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Remove a given event handler from the given control.","syntaxes":[{"syntax":"control ctrlRemoveEventHandler [type, id]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"type","type":"String","type_expr":"String"},{"name":"id","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[type, id]"}}],"examples":[{"code":["_map ctrlRemoveEventHandler [\"Draw\", _id];"]}],"see_also":["ctrlAddEventHandler","ctrlRemoveAllEventHandlers"]},{"name":"ctrlScale","title":"ctrlScale","type":"command","url":"https://community.bistudio.com/wiki/ctrlScale","revid":310878,"updated":"2022-05-07T20:24:10Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the current scale of the control.","syntaxes":[{"syntax":"ctrlScale control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_scale = ctrlScale _control;"]}],"see_also":["ctrlSetScale","ctrlModelScale","ctrlSetModelScale"]},{"name":"ctrlScrollValues","title":"ctrlScrollValues","type":"command","url":"https://community.bistudio.com/wiki/ctrlScrollValues","revid":377723,"updated":"2026-01-02T09:27:52Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns scroll values for current scrollbars in range 0...1 (-1 if not applicable) for the following controls:\n\n- CT_CONTROLS_TABLE\n- CT_CONTROLS_GROUP\n- CT_TREE\n- CT_LISTBOX\n- CT_COMBO\n- CT_XCOMBO\n- CT_LISTNBOX\n- CT_LISTNBOX_CHECKABLE","syntaxes":[{"syntax":"ctrlScrollValues control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Array","type_expr":"Array","description":"with [vertical, horizontal]\n- vertical: Number in range 0..1 - horizontal: Number in range 0..1","text":"Array with [vertical, horizontal]\n\n- vertical: Number in range 0..1\n- horizontal: Number in range 0..1"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["private _scrollvalues = ctrlScrollValues _ctrl;"]},{"text":"```sqf\n// ControlsGroup\nprivate _disp = findDisplay 46 createDisplay \"RscDisplayEmpty\";\nprivate _ctrlGrp = _disp ctrlCreate [\"RscControlsGroup\", -1];\nprivate _ctrl = _disp ctrlCreate [\"RscTree\", -1, _ctrlGrp];\n_ctrl tvAdd [[], \"Root\"];\nfor \"_i\" from 1 to 25 do\n{\n    _ctrl tvAdd [[0], format [\"Tree Item %1\", _i]];\n};\n_ctrl ctrlSetPosition [0,0,0.3,1.2];\n_ctrl ctrlCommit 0;\ntvExpandAll _ctrl;\n_ctrlGrp ctrlSetPosition [0,0,0.2,0.3];\n_ctrlGrp ctrlCommit 0;\n\nuiNamespace setVariable [\"_ctrl\", _ctrlGrp];\nonEachFrame\n{\n    hintSilent str ctrlScrollValues (uiNamespace getVariable [\"_ctrl\", controlNull]);\n};\n0 spawn\n{\n    sleep 1;\n    uiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [0.3, -1];\n    sleep 1;\n    uiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [-1, 0.3];\n    sleep 1;\n    uiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [0.7, -1];\n    sleep 1;\n    uiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [-1, 0.7];\n};\n```","code":["// ControlsGroup\nprivate _disp = findDisplay 46 createDisplay \"RscDisplayEmpty\";\nprivate _ctrlGrp = _disp ctrlCreate [\"RscControlsGroup\", -1];\nprivate _ctrl = _disp ctrlCreate [\"RscTree\", -1, _ctrlGrp];\n_ctrl tvAdd [[], \"Root\"];\nfor \"_i\" from 1 to 25 do\n{\n\t_ctrl tvAdd [[0], format [\"Tree Item %1\", _i]];\n};\n_ctrl ctrlSetPosition [0,0,0.3,1.2];\n_ctrl ctrlCommit 0;\ntvExpandAll _ctrl;\n_ctrlGrp ctrlSetPosition [0,0,0.2,0.3];\n_ctrlGrp ctrlCommit 0;\n \nuiNamespace setVariable [\"_ctrl\", _ctrlGrp];\nonEachFrame\n{\n\thintSilent str ctrlScrollValues (uiNamespace getVariable [\"_ctrl\", controlNull]);\n};\n0 spawn\n{\n\tsleep 1;\n\tuiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [0.3, -1];\n\tsleep 1;\n\tuiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [-1, 0.3];\n\tsleep 1;\n\tuiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [0.7, -1];\n\tsleep 1;\n\tuiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [-1, 0.7];\n};"]}],"see_also":["ctrlSetScrollValues","sliderPosition","progressPosition"]},{"name":"ctrlSetActiveColor","title":"ctrlSetActiveColor","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetActiveColor","revid":377734,"updated":"2026-01-03T00:21:56Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets text color of given control when it is selected.","syntaxes":[{"syntax":"control ctrlSetActiveColor color","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"color"}}],"examples":[{"code":["_control ctrlSetActiveColor [1, 0, 0, 1];"]}],"see_also":["allControls","allDisplays","controlsGroupCtrl","ctrlDelete","ctrlModel","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlClassName","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp","displayParent"]},{"name":"ctrlSetAngle","title":"ctrlSetAngle","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetAngle","revid":376965,"updated":"2026-01-01T05:57:04Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","locality":{"argument":"local","effect":"local"},"description":"Sets the rotation of a control set as `ST_PICTURE`. Rotation will be done within the control boundaries, so if the X and Y are given off center, the picture may get clipped by the control boundaries.\nOnly requires ctrlCommit when fourth parameter is set to false. Procedural textures filled controls do not rotate. Supported control types:\n\n- CT_STATIC\n- Arma 3 v2.10 CT_ACTIVETEXT\n\n> [!IMPORTANT]\n> Images that touch borders may \"bleed\" during rotation transformation, to avoid this, make sure the image has a 1px transparent padding.","syntaxes":[{"syntax":"control ctrlSetAngle [angle, centerX, centerY, now]","params":[{"name":"control","type":"Control","description":"picture control","type_expr":"Control"},{"name":"angle","type":"Number","description":"rotation angle (clockwise)","type_expr":"Number"},{"name":"centerX","type":"Number in range 0..1","description":"rotation center X. Control center is 0.5","type_expr":"Number"},{"name":"centerY","type":"Number in range 0..1","description":"rotation center Y. Control center is 0.5","type_expr":"Number"},{"name":"now","type":"Boolean","optional":true,"default":"true","description":"if false, control will wait for ctrlCommit input for result to apply","type_expr":"Boolean","since":"arma3 1.78","text":"now: Boolean - (Optional, default true) if false, control will wait for ctrlCommit input for result to apply"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[angle, centerX, centerY, now]"}}],"examples":[{"code":["_control ctrlSetAngle [25, 0.5, 0.5];"]},{"text":"```sqf\nwith uiNamespace do\n{\n    ctrl = findDisplay 46 ctrlCreate [\"RscPictureKeepAspect\", -1];\n    ctrl ctrlSetPosition [0,0,1,1];\n    ctrl ctrlSetText \"A3\\Missions_F_Exp\\data\\Img\\lobby\\ui_campaign_lobby_background_tablet_radial_left_ca.paa\";\n    ctrl ctrlCommit 0;\n    angle = 0;\n    onEachFrame\n    {\n        with uiNamespace do\n        {\n            if (angle > 359) then { angle = 0 };\n            ctrl ctrlSetAngle [angle, 0.5, 0.5];\n            angle = angle + 1;\n        };\n    };\n};\n```","code":["with uiNamespace do\n{\n\tctrl = findDisplay 46 ctrlCreate [\"RscPictureKeepAspect\", -1];\n\tctrl ctrlSetPosition [0,0,1,1];\n\tctrl ctrlSetText \"A3\\Missions_F_Exp\\data\\Img\\lobby\\ui_campaign_lobby_background_tablet_radial_left_ca.paa\";\n\tctrl ctrlCommit 0;\n\tangle = 0;\n\tonEachFrame\n\t{\n\t\twith uiNamespace do\n\t\t{\n\t\t\tif (angle > 359) then { angle = 0 };\n\t\t\tctrl ctrlSetAngle [angle, 0.5, 0.5];\n\t\t\tangle = angle + 1;\n\t\t};\n\t};\n};"]},{"code":["_control ctrlSetAngle [25, 0.5, 0.5, false];\n_control ctrlCommit 1; // Rotation applies smoothly for 1 second."]}],"see_also":["ctrlAngle"]},{"name":"ctrlSetAutoScrollDelay","title":"ctrlSetAutoScrollDelay","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetAutoScrollDelay","revid":310075,"updated":"2022-05-05T12:25:08Z","groups":["GUI Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets number of second before auto-scroll starts/rewinds. Setter for ctrlAutoScrollDelay.\n\nAutorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be > 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.","syntaxes":[{"syntax":"control ctrlSetAutoScrollDelay delay","params":[{"name":"control","type":"Control","description":"CT_LISTBOX or CT_CONTROLS_GROUP","type_expr":"Control"},{"name":"delay","type":"Number","description":"seconds to wait before scroll and/or rewind","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"delay"}}],"examples":[{"code":["_ctrlGroup ctrlSetAutoScrollDelay 5;"]}],"see_also":["ctrlSetAutoScrollSpeed","ctrlAutoScrollSpeed","ctrlAutoScrollDelay","ctrlSetAutoScrollRewind","ctrlAutoScrollRewind"]},{"name":"ctrlSetAutoScrollRewind","title":"ctrlSetAutoScrollRewind","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetAutoScrollRewind","revid":318987,"updated":"2022-05-13T09:22:08Z","groups":["GUI Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Defines if scroll should rewind when auto-scroll reach end. Setter for ctrlAutoScrollRewind.\n\nAutorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be > 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.","syntaxes":[{"syntax":"control ctrlSetAutoScrollRewind set","params":[{"name":"control","type":"Control","description":"CT_LISTBOX or CT_CONTROLS_GROUP","type_expr":"Control"},{"name":"set","type":"Boolean","description":"true to enable rewind","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"set"}}],"examples":[{"code":["_ctrlGroup ctrlSetAutoScrollRewind true;"]}],"see_also":["ctrlSetAutoScrollSpeed","ctrlAutoScrollSpeed","ctrlSetAutoScrollDelay","ctrlAutoScrollDelay","ctrlAutoScrollRewind"]},{"name":"ctrlSetAutoScrollSpeed","title":"ctrlSetAutoScrollSpeed","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetAutoScrollSpeed","revid":318963,"updated":"2022-05-13T09:22:07Z","groups":["GUI Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets number of second required to scroll to next line. If speed < 0, auto-scroll is disabled. Setter for ctrlAutoScrollSpeed.\n\nAutorscroll is available for CT_LISTBOX and CT_CONTROLS_GROUP types of controls only. Autoscroll will wait ctrlAutoScrollDelay seconds (must be > 0) and then will scroll the scroll bar down to the bottom. ctrlAutoScrollSpeed defines the speed with which scrollbar is scrolled. If ctrlAutoScrollRewind is true, the control will fade out, immediately rewind to the top, then fade in, wait ctrlAutoScrollDelay seconds and then repeat the scrolling in a loop. If user focuses on the control, autoscrolling is interrupted.","syntaxes":[{"syntax":"control ctrlSetAutoScrollSpeed speed","params":[{"name":"control","type":"Control","description":"CT_LISTBOX or CT_CONTROLS_GROUP","type_expr":"Control"},{"name":"speed","type":"Number","description":"seconds to autoscroll to the next line","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"speed"}}],"examples":[{"code":["_ctrlGroup ctrlSetAutoScrollSpeed 0.1;"]}],"see_also":["ctrlAutoScrollSpeed","ctrlSetAutoScrollDelay","ctrlAutoScrollDelay","ctrlSetAutoScrollRewind","ctrlAutoScrollRewind"]},{"name":"ctrlSetBackgroundColor","title":"ctrlSetBackgroundColor","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetBackgroundColor","revid":377733,"updated":"2026-01-03T00:21:54Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets background color of given control. Only affects:\n\n- CT_COMBO\n- CT_STATIC\n- CT_STRUCTURED_TEXT\n- CT_MAP\n- CT_MAP_MAIN\n- Arma 3 v2.02 CT_BUTTON\n- Arma 3 v2.02 CT_SHORTCUTBUTTON\n- Arma 3 v2.02 CT_ACTIVETEXT","syntaxes":[{"syntax":"control ctrlSetBackgroundColor color","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"color"}}],"examples":[{"code":["_control ctrlSetBackgroundColor [1, 0, 0, 1];"]}],"see_also":["allControls","allDisplays","controlsGroupCtrl","ctrlDelete","ctrlModel","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlClassName","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp","displayParent"]},{"name":"ctrlSetChecked","title":"ctrlSetChecked","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetChecked","revid":330383,"updated":"2022-09-04T21:37:19Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Sets checked state of a CT_CHECKBOXES control.","syntaxes":[{"syntax":"control ctrlSetChecked checked","params":[{"name":"control","type":"Control","description":"CT_CHECKBOXES control. If control contain multiple checkboxes, only checkbox with index 0 is queried.","type_expr":"Control"},{"name":"checked","type":"Boolean","description":"true to check, false to uncheck the checkbox","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"checked"}},{"syntax":"control ctrlSetChecked [index, checked]","since":"arma3 1.72","params":[{"name":"control","type":"Control","description":"CT_CHECKBOXES control","type_expr":"Control"},{"name":"index","type":"Number","description":"checkbox index","type_expr":"Number"},{"name":"checked","type":"Boolean","description":"true to check, false to uncheck the checkbox","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, checked]"}}],"examples":[{"code":["_control ctrlSetChecked true;"]},{"code":["_control ctrlSetChecked [3, true];"]}],"see_also":["ctrlChecked","cbChecked","cbSetChecked"]},{"name":"ctrlSetDisabledColor","title":"ctrlSetDisabledColor","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetDisabledColor","revid":379525,"updated":"2026-10-31T00:50:26Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Sets the colorDisabled attribute of a control.","syntaxes":[{"syntax":"ctrl ctrlSetDisabledColor color","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"color"}}],"examples":[{"code":["_control ctrlSetDisabledColor [0.5, 0.5, 0.5, 0.5];"]}],"see_also":["ctrlSetActiveColor","ctrlSetBackgroundColor","ctrlTextColor"]},{"name":"ctrlSetEventHandler","title":"ctrlSetEventHandler","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetEventHandler","revid":369343,"updated":"2024-09-03T18:43:02Z","groups":["GUI Control - Event Handlers","Event Handlers"],"status":"deprecated","replaced_by":["ctrlAddEventHandler"],"games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"> [!CAUTION]\n> This information is **obsolete** as of Arma 2 v1.00. Reason: Use ctrlAddEventHandler instead as it can stack event handlers.\n\nSets given event handler of given control: any previously added event handler is removed.\n\n> [!NOTE]\n> - See User Interface Event Handlers for the full list of handler names\n> - See also DIK KeyCodes for a list of key code constants relevant to key-related events like KeyDown and KeyUp\n\n> [!IMPORTANT]\n> When using the event names listed here with the ctrlAddEventHandler, ctrlSetEventHandler, displayAddEventHandler or displaySetEventHandler commands, the prefix \"on\" in the event name must be removed (e.g. '**ButtonDown'** instead of '**onButtonDown'**).","syntaxes":[{"syntax":"controlName ctrlSetEventHandler [handlerName, function]","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"handlerName","type":"String","type_expr":"String"},{"name":"function","type":"String","description":"should return a Boolean indicating that the event has handled this event fully or not and whether the engine should execute its default code or not afterwards","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"[handlerName, function]"}}],"examples":[{"code":["_control ctrlSetEventHandler [\"KeyDown\", \"\"];"]},{"code":["(_display displayCtrl 108) ctrlSetEventHandler [\"LBSelChanged\",\"['ListChange',_this] call FireEvents\"];"]}],"see_also":["displaySetEventHandler","ctrlAddEventHandler","ctrlRemoveEventHandler","User Interface Event Handlers","DIK KeyCodes"],"notes":[{"user":"pierremgi","date":"2021-04-28T19:59:00Z","text":"This command doesn't work on map.\n\n```sqf\nwaitUntil { !isNull (findDisplay 12 displayCtrl 51) };\n(findDisplay 12 displayCtrl 51) ctrlSetEventHandler [\"MouseButtonDblClick\", \"hint str _this; true\"]; // doesn't skip the marker dialog as it should.\n```"}]},{"name":"ctrlSetFade","title":"ctrlSetFade","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFade","revid":369232,"updated":"2024-09-03T10:35:00Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets wanted transparency for control animation. Requires ctrlCommit to commit changes. To hide or show a control instantly, use ctrlShow.\n\n> [!NOTE]\n> If there are multiple (interactable) controls on top of each other but the top-most control is faded using `ctrlSetFade 1`,\n>\n> this control will interfere with other controls that were defined earlier and in the exact same position.\n>\n> To counter that, the faded control **must** be disabled with ctrlEnable.","syntaxes":[{"syntax":"controlName ctrlSetFade fade","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fade","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fade"}}],"examples":[{"code":["_control ctrlSetFade 1;\n_control ctrlCommit 5;"]}],"problems":"Despite having `fade = 1;` in a control's config, ctrlFade will still report a fade of 0 - resulting in `ctrlSetFade 0` doing nothing.\nTo counter that, first use `ctrlSetFade 1`, then `ctrlCommit 0` to apply it, and only then ctrlSetFade can be used as usual.","see_also":["ctrlFade","cutFadeOut","ctrlCommit"],"notes":[{"user":"Nelis75733126","date":"2024-04-16T21:10:07Z","text":"in Arma 3 2.17, when `ctrlSetFade` is used on a CtrlToolbox or RscToolbox, it only has effect on the text of it."}]},{"name":"ctrlSetFocus","title":"ctrlSetFocus","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFocus","revid":373983,"updated":"2025-07-13T08:12:31Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets the input focus on given control.\n\n> [!IMPORTANT]\n> - ctrlSetFocus seems to only work on controls that accept any input from keyboard or mouse.\n> - if ctrlSetFocus is used on a CT_CONTROLS_GROUP that contains an interactable control, that control will automatically be active.\n> - if ctrlSetFocus is used on a CT_CONTROLS_GROUP in which there are no interactable controls, then ctrlSetFocus will do nothing.","syntaxes":[{"syntax":"ctrlSetFocus control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["ctrlSetFocus _control;"]}],"see_also":["focusedCtrl"]},{"name":"ctrlSetFont","title":"ctrlSetFont","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFont","revid":323058,"updated":"2022-06-28T21:43:11Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets the font for given control (see available fonts)","syntaxes":[{"syntax":"control ctrlSetFont fontName","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","description":"one of the fonts defined in CfgFontFamilies","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFont \"TahomaB\";"]}],"see_also":["Fonts"]},{"name":"ctrlSetFontH1","title":"ctrlSetFontH1","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontH1","revid":323052,"updated":"2022-06-28T21:43:10Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H1 font of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontH1 fontName","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFontH1 \"TahomaB\";"]}],"see_also":["Fonts"]},{"name":"ctrlSetFontH1B","title":"ctrlSetFontH1B","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontH1B","revid":318797,"updated":"2022-05-13T09:21:51Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H1 bold font of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontH1B fontName","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFontH1B \"TahomaB\";"]}],"see_also":["ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B"]},{"name":"ctrlSetFontH2","title":"ctrlSetFontH2","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontH2","revid":323053,"updated":"2022-06-28T21:43:10Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H2 font of given HTML control","syntaxes":[{"syntax":"controlName ctrlSetFontH2 fontName","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFontH2 \"TahomaB\";"]}],"see_also":["ctrlSetFontH1B","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B"]},{"name":"ctrlSetFontH2B","title":"ctrlSetFontH2B","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontH2B","revid":323059,"updated":"2022-06-28T21:43:11Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H2 bold font of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontH2B fontName","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFontH2B \"TahomaB\";"]}],"see_also":["ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B"]},{"name":"ctrlSetFontH3","title":"ctrlSetFontH3","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontH3","revid":323048,"updated":"2022-06-28T21:43:10Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H3 font of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontH3 fontName","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFontH3 \"TahomaB\";"]}],"see_also":["ctrlSetFocus","ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B"]},{"name":"ctrlSetFontH3B","title":"ctrlSetFontH3B","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontH3B","revid":323049,"updated":"2022-06-28T21:43:10Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H3 bold font of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontH3B fontName","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFontH3B \"TahomaB\";"]}],"see_also":["ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B"]},{"name":"ctrlSetFontH4","title":"ctrlSetFontH4","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontH4","revid":322929,"updated":"2022-06-28T21:42:41Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H4 font of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontH4 fontName","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFontH4 \"TahomaB\";"]}],"see_also":["ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B"]},{"name":"ctrlSetFontH4B","title":"ctrlSetFontH4B","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontH4B","revid":323039,"updated":"2022-06-28T21:43:09Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H4 bold font of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontH4B fontName","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFontH4B \"TahomaB\";"]}],"see_also":["ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B"]},{"name":"ctrlSetFontH5","title":"ctrlSetFontH5","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontH5","revid":322973,"updated":"2022-06-28T21:42:53Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H5 font of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontH5 fontName","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFontH5 \"TahomaB\";"]}],"see_also":["ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B"]},{"name":"ctrlSetFontH5B","title":"ctrlSetFontH5B","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontH5B","revid":322936,"updated":"2022-06-28T21:42:44Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H5 bold font of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontH5B fontName","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFontH5B \"TahomaB\";"]}],"see_also":["ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH6","ctrlSetFontH6B"]},{"name":"ctrlSetFontH6","title":"ctrlSetFontH6","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontH6","revid":322949,"updated":"2022-06-28T21:42:48Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H6 font of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontH6 fontName","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFontH6 \"TahomaB\";"]}],"see_also":["ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6B"]},{"name":"ctrlSetFontH6B","title":"ctrlSetFontH6B","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontH6B","revid":323027,"updated":"2022-06-28T21:43:08Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H6 bold font of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontH6B fontName","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFontH6B \"TahomaB\";"]}],"see_also":["ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6"]},{"name":"ctrlSetFontHeight","title":"ctrlSetFontHeight","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontHeight","revid":336297,"updated":"2022-12-21T11:10:07Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets the `sizeEx` property for most controls as follows:\n\n- `CT_MAP` - \"sizeExNames\"\n- `CT_HTML` - \"P\" >> \"sizeEx\"\n- Other - \"sizeEx\"\n- Arma 3 v2.02 `CT_STRUCTURED_TEXT` - \"size\"","syntaxes":[{"syntax":"control ctrlSetFontHeight size","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"size","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"size"}}],"examples":[{"code":["_control ctrlSetFontHeight 0.05;"]}],"see_also":["ctrlFontHeight","Arma: GUI Configuration"]},{"name":"ctrlSetFontHeightH1","title":"ctrlSetFontHeightH1","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontHeightH1","revid":323080,"updated":"2022-06-28T21:43:13Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H1 font size of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontHeightH1 height","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"height","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"height"}}],"examples":[{"code":["_control ctrlSetFontHeightH1 0.05;"]}],"see_also":["ctrlSetFontH1"]},{"name":"ctrlSetFontHeightH2","title":"ctrlSetFontHeightH2","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontHeightH2","revid":322946,"updated":"2022-06-28T21:42:46Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H2 font size of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontHeightH2 height","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"height","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"height"}}],"examples":[{"code":["_control ctrlSetFontHeightH2 0.05;"]}],"see_also":["ctrlSetFontH2"]},{"name":"ctrlSetFontHeightH3","title":"ctrlSetFontHeightH3","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontHeightH3","revid":322957,"updated":"2022-06-28T21:42:50Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H3 font size of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontHeightH3 height","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"height","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"height"}}],"examples":[{"code":["_control ctrlSetFontHeightH3 0.05;"]}],"see_also":["ctrlSetFontH3"]},{"name":"ctrlSetFontHeightH4","title":"ctrlSetFontHeightH4","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontHeightH4","revid":323040,"updated":"2022-06-28T21:43:09Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H4 font size of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontHeightH4 height","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"height","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"height"}}],"examples":[{"code":["_control ctrlSetFontHeightH4 0.05;"]}],"see_also":["ctrlSetFontH4"]},{"name":"ctrlSetFontHeightH5","title":"ctrlSetFontHeightH5","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontHeightH5","revid":323046,"updated":"2022-06-28T21:43:09Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H5 font size of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontHeightH5 height","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"height","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"height"}}],"examples":[{"code":["_control ctrlSetFontHeightH5 0.05;"]}],"see_also":["ctrlSetFontH5"]},{"name":"ctrlSetFontHeightH6","title":"ctrlSetFontHeightH6","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontHeightH6","revid":323026,"updated":"2022-06-28T21:43:08Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets H6 font size of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontHeightH6 height","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"height","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"height"}}],"examples":[{"code":["_control ctrlSetFontHeightH6 0.05;"]}],"see_also":["ctrlSetFontH6"]},{"name":"ctrlSetFontHeightSecondary","title":"ctrlSetFontHeightSecondary","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontHeightSecondary","revid":297936,"updated":"2022-01-20T13:02:47Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","locality":{"effect":"local"},"description":"Sets the font size of the secondary text of given control.","syntaxes":[{"syntax":"ctrl ctrlSetFontHeightSecondary value","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"value"}}],"examples":[{"text":"_control ctrlSetFontHeightSecondary 0.05;"}],"see_also":["ctrlSetFontP","ctrlSetFontSecondary"]},{"name":"ctrlSetFontP","title":"ctrlSetFontP","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontP","revid":318848,"updated":"2022-05-13T09:21:55Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets P font of given HTML control or its size.","syntaxes":[{"syntax":"control ctrlSetFontP fontOrSize","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"fontOrSize","type":"String or Number","type_expr":"String | Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"fontOrSize"}}],"examples":[{"code":["_control ctrlSetFontP \"TahomaB\";"]},{"code":["_control ctrlSetFontP 0.05;"]}],"see_also":["ctrlSetFontHeightSecondary","ctrlSetFontSecondary"]},{"name":"ctrlSetFontPB","title":"ctrlSetFontPB","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontPB","revid":323083,"updated":"2022-06-28T21:43:13Z","groups":["GUI Control - HTML"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets P bold font of given HTML control.","syntaxes":[{"syntax":"controlName ctrlSetFontPB fontName","params":[{"name":"controlName","type":"Control","type_expr":"Control"},{"name":"fontName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"fontName"}}],"examples":[{"code":["_control ctrlSetFontPB \"TahomaB\";"]}],"see_also":["ctrlSetFontP"]},{"name":"ctrlSetFontSecondary","title":"ctrlSetFontSecondary","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetFontSecondary","revid":348687,"updated":"2023-11-08T14:29:23Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","locality":{"effect":"local"},"description":"Sets the font size of the secondary text of given control.","syntaxes":[{"syntax":"ctrl ctrlSetFontSecondary fontClass","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"fontClass","type":"String","description":"font class","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"fontClass"}}],"examples":[{"text":"_control ctrlSetFontSecondary \"TahomaB\";"}],"see_also":["ctrlSetFontP","ctrlSetFontHeightSecondary"]},{"name":"ctrlSetForegroundColor","title":"ctrlSetForegroundColor","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetForegroundColor","revid":377732,"updated":"2026-01-03T00:21:53Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets foreground color of the given control.\n\n> [!NOTE]\n> Also try ctrlSetTextColor, if this command doesn't have the desired effect.","syntaxes":[{"syntax":"control ctrlSetForegroundColor color","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"color"}}],"examples":[{"code":["_control ctrlSetForegroundColor [1, 0, 0, 1];"]}],"see_also":["ctrlSetTextColor","ctrlSetBackgroundColor"]},{"name":"ctrlSetModel","title":"ctrlSetModel","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetModel","revid":336418,"updated":"2023-01-03T08:09:24Z","groups":["GUI Control - Object"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","description":"Sets model for 3D-Dialogs (see Arma 3: createSimpleObject/objects for a p3d models' list).","syntaxes":[{"syntax":"control ctrlSetModel model","params":[{"name":"control","type":"Control","description":"3D control","type_expr":"Control","text":"control : Control - 3D control"},{"name":"model","type":"String","description":"model path","type_expr":"String","text":"model : String - model path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"model"}}],"examples":[{"code":["_control3D ctrlSetModel \"\\a3\\Ui_f\\objects\\Compass.p3d\";"]}],"see_also":["ctrlCreate","ctrlDelete","ctrlModel","ctrlPosition","ctrlSetPosition","ctrlClassName","displayCtrl","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp"]},{"name":"ctrlSetModelDirAndUp","title":"ctrlSetModelDirAndUp","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetModelDirAndUp","revid":378364,"updated":"2026-04-03T16:42:03Z","groups":["GUI Control - Object"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","description":"Sets orientation of 3D control model. It is similar to setVectorDirAndUp command for an object.","syntaxes":[{"syntax":"control ctrlSetModelDirAndUp dirAndUp","params":[{"name":"control","type":"Control","description":"3D control","type_expr":"Control","text":"control : Control - 3D control"},{"name":"dirAndUp","type":"Array with [vectorDir, vectorUp]","description":"Array with [vectorDir, vectorUp]\n\n- vectorDir: Vector3D - see vectorDir\n- vectorUp: Vector3D - see vectorUp","type_expr":"Array","text":"dirAndUp: Array with [vectorDir, vectorUp]\n\n- vectorDir: Vector3D - see vectorDir\n- vectorUp: Vector3D - see vectorUp"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"dirAndUp"}}],"examples":[{"code":["_ctrl3D ctrlSetModelDirAndUp [[0,1,0],[0,0,1]]; //default orientation"]}],"see_also":["ctrlModelDirAndUp","ctrlCreate","ctrlDelete","ctrlModel","ctrlSetModel","ctrlModelScale","ctrlSetModelScale","ctrlPosition","ctrlSetPosition","ctrlClassName","vectorDir","vectorUp","setVectorDirAndUp","ctrlModelVectorSide"]},{"name":"ctrlSetModelScale","title":"ctrlSetModelScale","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetModelScale","revid":318942,"updated":"2022-05-13T09:22:05Z","groups":["GUI Control - Object","GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","description":"Sets 3D control model scale","syntaxes":[{"syntax":"control ctrlSetModelScale scale","params":[{"name":"control","type":"Control","description":"3D control","type_expr":"Control","text":"control : Control - 3D control"},{"name":"scale","type":"Number","type_expr":"Number","text":"scale : Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"scale"}}],"examples":[{"code":["_ctrl3D ctrlSetModelScale 1.5;"]}],"see_also":["ctrlModelDirAndUp","ctrlCreate","ctrlDelete","ctrlModel","ctrlSetModel","ctrlSetModelDirAndUp","ctrlModelScale","ctrlPosition","ctrlScale","ctrlSetScale","ctrlSetPosition","ctrlClassName","vectorDir","vectorUp","setVectorDirAndUp"]},{"name":"ctrlSetMousePosition","title":"ctrlSetMousePosition","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetMousePosition","revid":348960,"updated":"2023-11-08T14:45:40Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Similar to setMousePosition but relative to the given control.","syntaxes":[{"syntax":"control ctrlSetMousePosition [x, y]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"x","type":"Number","description":"position in x","type_expr":"Number"},{"name":"y","type":"Number","description":"position in y","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[x, y]"}}],"examples":[{"code":["_control ctrlSetMousePosition [0.5, 0.5];"]}],"see_also":["ctrlMousePosition","setMousePosition","getMousePosition","ctrlMapCursor"]},{"name":"ctrlSetPixelPrecision","title":"ctrlSetPixelPrecision","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetPixelPrecision","revid":309215,"updated":"2022-05-03T22:40:41Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.82"},"since":"arma3 1.82","arma3_since":"1.82","description":"Switches mode of pixel precision (rounding) in a given control interface.","syntaxes":[{"syntax":"control ctrlSetPixelPrecision mode","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"mode","type":"Number or String","description":"can be one of the following:\n\n- 0 / \"AUTO\" - control position (x, y, w, h) is always rounded to whole pixels (game default)\n- 1 / \"ON\" - control position (x, y, w, h) is rounded to whole pixels only when not animating\n- 2 / \"OFF\" - control position (x, y, w, h) is always precise, no pixel rounding applies here","type_expr":"Number | String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"mode"}}],"examples":[{"code":["_control ctrlSetPixelPrecision 2; // Enables pixel precision of the given control"]}],"see_also":["ctrlCommit","ctrlCreate","ctrlDelete","ctrlModel","ctrlSetModel","ctrlPosition","ctrlClassName","displayCtrl","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp","ctrlSetPosition"]},{"name":"ctrlSetPosition","title":"ctrlSetPosition","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetPosition","revid":373619,"updated":"2025-05-25T10:19:49Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets wanted position and size for 2D control animation. Width and height are optional. ctrlCommit is required to complete the operation.\nFor 3D control, param is relative `[x, z, y]` and no ctrlCommit is required as it cannot be animated. If target control is inside a CT_CONTROLS_GROUP, the position needs to be relative to it.\n\n> [!IMPORTANT]\n> This command doesn't work well with CT_MAP control. Use ctrlMapSetPosition instead.","syntaxes":[{"syntax":"controlName ctrlSetPosition [x, y]","params":[{"name":"controlName","type":"Control","description":"2D control","type_expr":"Control"},{"name":"x","type":"Number","description":"position in x","type_expr":"Number"},{"name":"y","type":"Number","description":"position in y","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"[x, y]"}},{"syntax":"controlName ctrlSetPosition [x, y, w, h]","params":[{"name":"controlName","type":"Control","description":"2D control","type_expr":"Control"},{"name":"x","type":"Number","description":"position in x","type_expr":"Number"},{"name":"y","type":"Number","description":"position in y","type_expr":"Number"},{"name":"w","type":"Number","description":"width of the control","type_expr":"Number"},{"name":"h","type":"Number","description":"height of the control","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"[x, y, w, h]"}},{"syntax":"controlName ctrlSetPosition [x, z, y]","params":[{"name":"controlName","type":"Control","description":"3D control","type_expr":"Control"},{"name":"x","type":"Number","description":"screen x","type_expr":"Number"},{"name":"z","type":"Number","description":"distance from the screen (depth). If object is too far, it cannot be dragged by the mouse.","type_expr":"Number"},{"name":"y","type":"Number","description":"screen y","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlName"},"right":{"text":"[x, z, y]"}}],"examples":[{"text":"Move control:\n\n```sqf\n_control2D ctrlSetPosition [0, 0];\n_control2D ctrlCommit 0;\n```","code":["_control2D ctrlSetPosition [0, 0];\n_control2D ctrlCommit 0;"]},{"text":"Move control and resize:\n\n```sqf\n_control2D ctrlSetPosition [0, 0, 1, 1];\n_control2D ctrlCommit 0;\n```","code":["_control2D ctrlSetPosition [0, 0, 1, 1];\n_control2D ctrlCommit 0;"]},{"code":["_control3D ctrlSetPosition [0.5, 1, 0.5]; //centered and 1m away from screen"]},{"text":"Typewriter effect:\n\n```sqf\nwith uiNamespace do\n{\n    0 spawn\n    {\n        _text1 = \"This is a simple demo of typewriter text effect with various speed.\";\n        _text2 = \"This took 10 seconds.\";\n        _text3 = \"This is a fast one, set for 2 seconds.\";\n\n        ctrl = findDisplay 46 ctrlCreate [\"RscStructuredText\", -1];\n\n        ctrl ctrlSetPosition [0, 0, 0, 0.1];\n        ctrl ctrlCommit 0;\n        ctrl ctrlSetStructuredText parseText format [\"<t color='#ff0000' size='2.1'>%1</t>\", _text1 splitString \" \" joinString \"&#160;\"];\n        ctrl ctrlSetPosition [0, 0, ctrlTextWidth ctrl, 0.1];\n        ctrl ctrlCommit 8;\n\n        waitUntil { ctrlCommitted ctrl };\n        sleep 0.5;\n\n        ctrl ctrlSetPosition [0,0,0,0.1];\n        ctrl ctrlCommit 0;\n        ctrl ctrlSetStructuredText parseText format [\"<t color='#ff0000' size='2.1'>%1</t>\", _text2 splitString \" \" joinString \"&#160;\"];\n        ctrl ctrlSetPosition [0, 0, ctrlTextWidth ctrl, 0.1];\n        ctrl ctrlCommit 2;\n\n        waitUntil { ctrlCommitted ctrl };\n        sleep 2;\n\n        ctrl ctrlSetPosition [0,0,0,0.1];\n        ctrl ctrlCommit 0;\n        ctrl ctrlSetStructuredText parseText format [\"<t color='#00ff00' size='2.1'>%1</t>\", _text3 splitString \" \" joinString \"&#160;\"];\n        ctrl ctrlSetPosition [0,0,ctrlTextWidth ctrl,0.1];\n        ctrl ctrlCommit 2;\n\n        waitUntil { ctrlCommitted ctrl };\n        sleep 2;\n\n        ctrlDelete ctrl;\n    };\n};\n```","code":["with uiNamespace do\n{\n\t0 spawn\n\t{\n\t\t_text1 = \"This is a simple demo of typewriter text effect with various speed.\";\n\t\t_text2 = \"This took 10 seconds.\";\n\t\t_text3 = \"This is a fast one, set for 2 seconds.\";\n\n\t\tctrl = findDisplay 46 ctrlCreate [\"RscStructuredText\", -1];\n\n\t\tctrl ctrlSetPosition [0, 0, 0, 0.1];\n\t\tctrl ctrlCommit 0;\n\t\tctrl ctrlSetStructuredText parseText format [\"<t color='#ff0000' size='2.1'>%1</t>\", _text1 splitString \" \" joinString \" \"];\n\t\tctrl ctrlSetPosition [0, 0, ctrlTextWidth ctrl, 0.1];\n\t\tctrl ctrlCommit 8;\n\n\t\twaitUntil { ctrlCommitted ctrl };\n\t\tsleep 0.5;\n\n\t\tctrl ctrlSetPosition [0,0,0,0.1];\n\t\tctrl ctrlCommit 0;\n\t\tctrl ctrlSetStructuredText parseText format [\"<t color='#ff0000' size='2.1'>%1</t>\", _text2 splitString \" \" joinString \" \"];\n\t\tctrl ctrlSetPosition [0, 0, ctrlTextWidth ctrl, 0.1];\n\t\tctrl ctrlCommit 2;\n\n\t\twaitUntil { ctrlCommitted ctrl };\n\t\tsleep 2;\n\n\t\tctrl ctrlSetPosition [0,0,0,0.1];\n\t\tctrl ctrlCommit 0;\n\t\tctrl ctrlSetStructuredText parseText format [\"<t color='#00ff00' size='2.1'>%1</t>\", _text3 splitString \" \" joinString \" \"];\n\t\tctrl ctrlSetPosition [0,0,ctrlTextWidth ctrl,0.1];\n\t\tctrl ctrlCommit 2;\n\n\t\twaitUntil { ctrlCommitted ctrl };\n\t\tsleep 2;\n\n\t\tctrlDelete ctrl;\n\t};\n};"]}],"see_also":["ctrlMapSetPosition","ctrlCommit","ctrlCreate","ctrlDelete","ctrlModel","ctrlSetModel","ctrlPosition","ctrlClassName","displayCtrl","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp"],"notes":[{"user":"Yuval","date":"2017-06-20T11:56:00Z","text":"If the target control is a controls' group, all the child controls of that group will be moved automatically (as their position is relative to the control group rather than the display)."}]},{"name":"ctrlSetPositionH","title":"ctrlSetPositionH","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetPositionH","revid":309179,"updated":"2022-05-03T18:04:10Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Sets the height of a 2D control. ctrlCommit is required to complete the operation.","syntaxes":[{"syntax":"control ctrlSetPositionH h","params":[{"name":"control","type":"Control","description":"2D control","type_expr":"Control"},{"name":"h","type":"Number","description":"height of the control","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"h"}}],"examples":[{"code":["_ctrl ctrlSetPositionH 0.5;\n_ctrl ctrlCommit 1;"]}],"see_also":["ctrlSetPosition","ctrlSetPositionX","ctrlSetPositionY","ctrlSetPositionW"]},{"name":"ctrlSetPositionW","title":"ctrlSetPositionW","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetPositionW","revid":309180,"updated":"2022-05-03T18:04:27Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Sets the width of a 2D control. ctrlCommit is required to complete the operation.","syntaxes":[{"syntax":"control ctrlSetPositionW w","params":[{"name":"control","type":"Control","description":"2D control","type_expr":"Control"},{"name":"w","type":"Number","description":"width of the control","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"w"}}],"examples":[{"code":["_ctrl ctrlSetPositionW 0.5;\n_ctrl ctrlCommit 1;"]}],"see_also":["ctrlSetPosition","ctrlSetPositionX","ctrlSetPositionY","ctrlSetPositionH"]},{"name":"ctrlSetPositionX","title":"ctrlSetPositionX","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetPositionX","revid":309181,"updated":"2022-05-03T18:04:56Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Sets horizontal position (x) of the 2D control. ctrlCommit is required to complete the operation.","syntaxes":[{"syntax":"control ctrlSetPositionX x","params":[{"name":"control","type":"Control","description":"2D control","type_expr":"Control"},{"name":"x","type":"Number","description":"horizontal position of the control","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"x"}}],"examples":[{"code":["_ctrl ctrlSetPositionX 0.5;\n_ctrl ctrlCommit 1;"]}],"see_also":["ctrlSetPosition","ctrlSetPositionY","ctrlSetPositionW","ctrlSetPositionH"]},{"name":"ctrlSetPositionY","title":"ctrlSetPositionY","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetPositionY","revid":349336,"updated":"2023-11-08T14:53:28Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Sets vertical position (y) of a 2D control. ctrlCommit is required to complete the operation.","syntaxes":[{"syntax":"control ctrlSetPositionY y","params":[{"name":"control","type":"Control","description":"2D control","type_expr":"Control"},{"name":"y","type":"Number","description":"vertical position of the control","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"y"}}],"examples":[{"code":["_ctrl ctrlSetPositionY 0.5;\n_ctrl ctrlCommit 1;"]}],"see_also":["ctrlSetPosition","ctrlSetPositionX","ctrlSetPositionW","ctrlSetPositionH"]},{"name":"ctrlSetProperty","title":"ctrlSetProperty","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetProperty","revid":379135,"updated":"2026-10-12T14:41:15Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.24"},"since":"arma3 2.24","arma3_since":"2.24","branch":["dev"],"locality":{"argument":"local","effect":"local"},"description":"Sets one or multiple given properties of given control.","syntaxes":[{"syntax":"control ctrlSetProperty property","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"property","type":"Array in format [name, value]:","description":"Array in format [name, value]:\n\n- name: String - Name of the property, case insensitive\n- value: Anything- Value depends on the property","type_expr":"Array","text":"property: Array in format [name, value]:\n\n- name: String - Name of the property, case insensitive\n- value: Anything- Value depends on the property"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"property"}},{"syntax":"control ctrlSetProperty properties","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"properties","type":"HashMap in format:","description":"HashMap in format:\n\n- key: String - Name of the property, case insensitive\n- value: Anything - Value depends on the property","type_expr":"HashMap","text":"properties: HashMap in format:\n\n- key: String - Name of the property, case insensitive\n- value: Anything - Value depends on the property"}],"returns":null,"form":"binary","left":{"text":"control"},"right":{"text":"properties"}}],"examples":[{"code":["_ctrl ctrlSetProperty [\"x\", 0.015];"]},{"text":"```sqf\n_ctrl ctrlSetProperty #{\n    \"x\": 0.015,\n    \"colorBackground\": [1, 0.4, 1, 1]\n}\n```","code":["_ctrl ctrlSetProperty #{\n\t\"x\": 0.015, \n\t\"colorBackground\": [1, 0.4, 1, 1]\n}"]}],"see_also":["ctrlGetProperty"]},{"name":"ctrlSetScale","title":"ctrlSetScale","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetScale","revid":369376,"updated":"2024-09-03T18:43:13Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets scale of a control. Top left corner remains same. This command requires ctrlCommit.","syntaxes":[{"syntax":"control ctrlSetScale scale","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"scale","type":"Number","description":"scale e.g. 2 = 200% in size","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"scale"}}],"examples":[{"code":["_control ctrlSetScale 0.5;// Makes the control 50% smaller\n_control ctrlCommit 0;"]}],"see_also":["ctrlScale","ctrlModelScale","ctrlSetModelScale"]},{"name":"ctrlSetScrollValues","title":"ctrlSetScrollValues","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetScrollValues","revid":338941,"updated":"2023-04-17T15:45:43Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Sets scroll values for current scrollbars in range 0..1 for the following controls:\n\n- CT_CONTROLS_TABLE\n- CT_CONTROLS_GROUP\n- CT_TREE\n- CT_LISTBOX\n- CT_COMBO\n- CT_XCOMBO\n- CT_LISTNBOX\n- CT_LISTNBOX_CHECKABLE","syntaxes":[{"syntax":"control ctrlSetScrollValues [vScrollValue, hScrollValue]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"vScrollValue","type":"Number","description":"vertical scroll value in 0..1 range. -1 to skip","type_expr":"Number"},{"name":"hScrollValue","type":"Number","description":"horizontal scroll value in 0..1 range. -1 to skip","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[vScrollValue, hScrollValue]"}}],"examples":[{"code":["_ctrlGrp ctrlSetScrollValues [-1, 0.5];"]},{"text":"```sqf\n// ControlsGroup\nprivate _disp = findDisplay 46 createDisplay \"RscDisplayEmpty\";\nprivate _ctrlGrp = _disp ctrlCreate [\"RscControlsGroup\", -1];\nprivate _ctrl = _disp ctrlCreate [\"RscTree\", -1, _ctrlGrp];\n_ctrl tvAdd [[], \"Root\"];\nfor \"_i\" from 1 to 25 do\n{\n    _ctrl tvAdd [[0], format [\"Tree Item %1\", _i]];\n};\n_ctrl ctrlSetPosition [0,0,0.3,1.2];\n_ctrl ctrlCommit 0;\ntvExpandAll _ctrl;\n_ctrlGrp ctrlSetPosition [0,0,0.2,0.3];\n_ctrlGrp ctrlCommit 0;\n\nuiNamespace setVariable [\"_ctrl\", _ctrlGrp];\nonEachFrame\n{\n    hintSilent str ctrlScrollValues (uiNamespace getVariable [\"_ctrl\", controlNull]);\n};\n0 spawn\n{\n    sleep 1;\n    uiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [0.3, -1];\n    sleep 1;\n    uiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [-1, 0.3];\n    sleep 1;\n    uiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [0.7, -1];\n    sleep 1;\n    uiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [-1, 0.7];\n};\n```","code":["// ControlsGroup\nprivate _disp = findDisplay 46 createDisplay \"RscDisplayEmpty\";\nprivate _ctrlGrp = _disp ctrlCreate [\"RscControlsGroup\", -1];\nprivate _ctrl = _disp ctrlCreate [\"RscTree\", -1, _ctrlGrp];\n_ctrl tvAdd [[], \"Root\"];\nfor \"_i\" from 1 to 25 do\n{\n\t_ctrl tvAdd [[0], format [\"Tree Item %1\", _i]];\n};\n_ctrl ctrlSetPosition [0,0,0.3,1.2];\n_ctrl ctrlCommit 0;\ntvExpandAll _ctrl;\n_ctrlGrp ctrlSetPosition [0,0,0.2,0.3];\n_ctrlGrp ctrlCommit 0;\n \nuiNamespace setVariable [\"_ctrl\", _ctrlGrp];\nonEachFrame\n{\n\thintSilent str ctrlScrollValues (uiNamespace getVariable [\"_ctrl\", controlNull]);\n};\n0 spawn\n{\n\tsleep 1;\n\tuiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [0.3, -1];\n\tsleep 1;\n\tuiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [-1, 0.3];\n\tsleep 1;\n\tuiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [0.7, -1];\n\tsleep 1;\n\tuiNamespace getVariable [\"_ctrl\", controlNull] ctrlSetScrollValues [-1, 0.7];\n};"]}],"see_also":["ctrlScrollValues","sliderSetPosition","progressSetPosition"]},{"name":"ctrlSetShadow","title":"ctrlSetShadow","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetShadow","revid":330159,"updated":"2022-08-23T12:23:54Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Sets 'shadow' property of the control:\n\n- 0 - no shadow\n- 1 - shadow\n- 2 - outline","syntaxes":[{"syntax":"control ctrlSetShadow shadow","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"shadow","type":"Number","description":"shadow value, see description","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"shadow"}}],"examples":[{"code":["_control ctrlSetShadow 1;"]}],"see_also":["ctrlShadow","ctrlCreate"]},{"name":"ctrlSetStructuredText","title":"ctrlSetStructuredText","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetStructuredText","revid":321026,"updated":"2022-05-13T11:32:18Z","groups":["GUI Control","Structured Text"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Set the Structured Text which will be displayed in structured text control.","syntaxes":[{"syntax":"control ctrlSetStructuredText structuredText","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"structuredText","type":"Structured Text","type_expr":"Structured Text"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"structuredText"}}],"examples":[{"code":["_control ctrlSetStructuredText parseText \"First line<img image=data\\isniper.paa /><br />Second line\""]},{"text":"To adjust text vertically, add extra line above with blank space (&#160;) and set its size accordingly:\n\n```sqf\nwith uiNamespace do {\n    button = findDisplay 46 ctrlCreate [\"RscShortcutButton\", -1];\n    button ctrlSetPosition [0,0,0.3,0.1];\n    button ctrlCommit 0;\n    button ctrlSetStructuredText parseText\n    \"<t size='0.5'>&#160;</t><br/><t size='1' align='center'>Button Text&#160;&#160;</t>\";\n};\n```","code":["with uiNamespace do {\n\tbutton = findDisplay 46 ctrlCreate [\"RscShortcutButton\", -1];\n\tbutton ctrlSetPosition [0,0,0.3,0.1];\n\tbutton ctrlCommit 0;\n\tbutton ctrlSetStructuredText parseText \n\t\"<t size='0.5'> </t><br/><t size='1' align='center'>Button Text  </t>\";\n};"]},{"text":"There is a bug with `valign` that requires adding 1 extra trailing space per line to the displayed text in order to keep it centered horizontally:\n\n```sqf\ndisableSerialization;\nprivate _ctrl = findDisplay 46 ctrlCreate [\"RscStructuredText\", -1];\n_ctrl ctrlSetPosition [0, 0, 0.5, 0.5];\n_ctrl ctrlSetBackgroundColor [0, 0, 0, 1];\n_ctrl ctrlCommit 0;\nprivate _lineHeight = getNumber (configFile >> \"RscStructuredText\" >> \"size\");\nprivate _linesTotal = (ctrlPosition _ctrl select 2) / _lineHeight;\nprivate _trailingSpace = \"\";\nfor \"_i\" from 1 to _linesTotal do { _trailingSpace = _trailingSpace + \" \" };\n_ctrl ctrlSetStructuredText parseText format [\"<t size='%1'><t size='1' align='center' valign='middle'>%2%3</t> </t>\", _linesTotal, \"------ Centered Text ------\", _trailingSpace];\n```","code":["disableSerialization;\nprivate _ctrl = findDisplay 46 ctrlCreate [\"RscStructuredText\", -1];\n_ctrl ctrlSetPosition [0, 0, 0.5, 0.5];\n_ctrl ctrlSetBackgroundColor [0, 0, 0, 1];\n_ctrl ctrlCommit 0;\nprivate _lineHeight = getNumber (configFile >> \"RscStructuredText\" >> \"size\");\nprivate _linesTotal = (ctrlPosition _ctrl select 2) / _lineHeight;\nprivate _trailingSpace = \"\";\nfor \"_i\" from 1 to _linesTotal do { _trailingSpace = _trailingSpace + \" \" };\n_ctrl ctrlSetStructuredText parseText format [\"<t size='%1'><t size='1' align='center' valign='middle'>%2%3</t> </t>\", _linesTotal, \"------ Centered Text ------\", _trailingSpace];"]}],"problems":"Using this command will modify the provided *structuredText* - a way to circumvent this issue is to parseText in-line. See Notes.","see_also":["Structured Text","composeText","parseText","text"],"notes":[{"user":"Dscha","date":"2020-03-20T19:48:00Z","text":"When using parseText on an RscStructuredText control, with **custom Attributes** set (extra config Class), it needs to be in the same line as ctrlSetStructuredText:\n\n```sqf\n_text = \"abc\";\n_ctrl ctrlSetStructuredText parseText _text;\n```\n\nThe following Code would use **none** of the custom Attributes of the selected Control, instead it falls back to Standard Values (Font, Size, Color, Align, etc)\n\n```sqf\n_text = parseText \"abc\";\n_ctrl ctrlSetStructuredText _text;\n```"}]},{"name":"ctrlSetText","title":"ctrlSetText","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetText","revid":378494,"updated":"2026-04-26T15:15:10Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets the text of a control of the currently active user dialog or display.\nThis command can be used for static texts, buttons, edit lines and active texts as well as for images, where you can use it to set the image path.\n\nRead Arma: GUI Configuration for more information about user dialogs and controls.\nUse endl to insert line breaks.\n\nSince Arma 3 v2.06 supported control types are:\n\n- CT_STATIC\n- CT_EDIT\n- CT_XKEYDESC\n- CT_XBUTTON\n- CT_SHORTCUTBUTTON\n- CT_STRUCTURED_TEXT\n- CT_BUTTON\n- CT_ACTIVETEXT\n\nSince Arma 3 v2.22 CT_PROGRESS is also supported.","syntaxes":[{"syntax":"ctrlSetText [idc, text]","params":[{"name":"idc","type":"Number","description":"control IDC","type_expr":"Number"},{"name":"text","type":"String","description":"text or image path or texture, depending on the control type","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, text]"}},{"syntax":"control ctrlSetText text","params":[{"name":"control","type":"Control","description":"control","type_expr":"Control"},{"name":"text","type":"String","description":"text or image path or texture, depending on the control type","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"text"}}],"examples":[{"code":["ctrlSetText [100, \"Hello world\"]; // for Dialogs"]},{"code":["_control ctrlSetText \"Hello world.\"; // for Displays"]},{"text":"Since Arma 3 2.22:\n\n```sqf\nwith uiNamespace do\n{\n bar = findDisplay 46 ctrlCreate [\"RscProgress\", -1];\n bar ctrlSetText \"\\A3\\Data_F\\Flags\\Flag_red_CO.paa\";\n bar ctrlSetPosition [0,0,1,0.25];\n bar ctrlCommit 0;\n bar progressSetPosition 0.7;\n};\n```","code":["with uiNamespace do \n{ \n bar = findDisplay 46 ctrlCreate [\"RscProgress\", -1]; \n bar ctrlSetText \"\\A3\\Data_F\\Flags\\Flag_red_CO.paa\";\n bar ctrlSetPosition [0,0,1,0.25]; \n bar ctrlCommit 0; \n bar progressSetPosition 0.7;\n};"]}],"see_also":["ctrlText","ctrlTextSelection","ctrlSetTextSelection"]},{"name":"ctrlSetTextColor","title":"ctrlSetTextColor","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetTextColor","revid":379325,"updated":"2026-10-30T23:51:30Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets text color of given control. As of Arma 3 v1.40 this command can also be used to change fill-color of a CT_PROGRESS control.\n\n> [!NOTE]\n> Also try ctrlSetForegroundColor, if this command doesn't have the desired effect.","syntaxes":[{"syntax":"control ctrlSetTextColor color","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"color"}}],"examples":[{"code":["_control ctrlSetTextColor [1, 0, 0, 1];"]}],"see_also":["ctrlSetForegroundColor","ctrlTextColor","ctrlSetText"],"notes":[{"user":"Fight9","date":"2015-04-10T06:47:00Z","text":"When used on a CT_PROGRESS control, remove the configured \"texture\" first. The two will affect each other. - Arma 3 v1.42"},{"user":"feint","date":"2018-03-04T22:57:00Z","text":"This command can be used to change the color of the light that is illuminating a texture in a display. By default, textures are lit with white light at 100% [1,1,1,1];"}]},{"name":"ctrlSetTextColorSecondary","title":"ctrlSetTextColorSecondary","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetTextColorSecondary","revid":377731,"updated":"2026-01-03T00:21:36Z","groups":["GUI Control"],"status":"ok","games":{"ofp":null,"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","description":"Sets the secondary text color of a text control.","syntaxes":[{"syntax":"control ctrlSetTextColorSecondary color","params":[{"name":"control","type":"Control","description":"text control","type_expr":"Control"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"color"}}],"examples":[{"code":["_ctrlText ctrlSetTextColorSecondary [1, 0.5, 0.1, 0.5];"]}],"see_also":["ctrlTextSecondary","ctrlSetText","ctrlText","ctrlSetTextSecondary"]},{"name":"ctrlSetTextSecondary","title":"ctrlSetTextSecondary","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetTextSecondary","revid":349266,"updated":"2023-11-08T14:51:08Z","groups":["GUI Control"],"status":"ok","games":{"ofp":null,"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","description":"Sets the secondary text of a text control.","syntaxes":[{"syntax":"control ctrlSetTextSecondary text","params":[{"name":"control","type":"Control","description":"text control","type_expr":"Control"},{"name":"text","type":"String","description":"secondary text","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"text"}}],"examples":[{"code":["_ctrlText ctrlSetTextSecondary \"Hello World!\";"]}],"see_also":["ctrlTextSecondary","ctrlSetText","ctrlText","ctrlSetTextColorSecondary"]},{"name":"ctrlSetTextSelection","title":"ctrlSetTextSelection","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetTextSelection","revid":309239,"updated":"2022-05-04T10:30:57Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Selects `length` characters of edit control from the `start` position and places cursor at the end of selection.\n\n> [!NOTE]\n> To only move the cursor, set *length* to 0. To select text from right to left, use negative *length* (See ctrlTextSelection for more info)","syntaxes":[{"syntax":"control ctrlSetTextSelection [start, length]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"start","type":"Number","description":"selection start position","type_expr":"Number"},{"name":"length","type":"Number","description":"length of characters to select (0 to only move the cursor). Negative length will select text from right to left (see example 3)","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[start, length]"}}],"examples":[{"code":["_control ctrlSetTextSelection [5, 10];"]},{"code":["disableSerialization;\nprivate _ctrl = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscEditMulti\", -1];\n_ctrl ctrlSetPosition [0,0,0.5,0.3];\n_ctrl ctrlCommit 0;\n_ctrl ctrlSetText \"Hello World\";\n_ctrl ctrlSetTextSelection [6, 5]; // selects World\nctrlSetFocus _ctrl;"]},{"text":"Select text from right to left:\n\n```sqf\n_control ctrlSetTextSelection [5, -4];\n```","code":["_control ctrlSetTextSelection [5, -4];"]}],"see_also":["ctrlTextSelection","ctrlSetText"]},{"name":"ctrlSetTooltip","title":"ctrlSetTooltip","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetTooltip","revid":379326,"updated":"2026-10-30T23:51:38Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets tooltip text of given control.\n\n> [!NOTE]\n> If control supports URL property, like `RscActiveText` for example, and the URL is set, tooltip text displayed on mouse over will be appended with URL text.","syntaxes":[{"syntax":"control ctrlSetTooltip text","params":[{"name":"control","type":"Control","description":"any control type, (except for CT_STATIC & CT_STRUCTURED_TEXT, although Arma 3 now supports these too)","type_expr":"Control"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"text"}}],"examples":[{"code":["_control ctrlSetTooltip \"tooltip\";"]},{"code":["findDisplay 10000 displayCtrl 10001 ctrlSetTooltip \"ThisIsAGoodTip\";"]},{"text":"```sqf\nwith uiNamespace do\n{\n    bar = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscProgress\", -1];\n    bar ctrlSetPosition [0,0,1,0.01];\n    bar ctrlCommit 0;\n    bar progressSetPosition 0.75;\n    bar ctrlSetTooltip \"lalalalalalalala\";\n};\n```","code":["with uiNamespace do \n{\n\tbar = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscProgress\", -1];\n\tbar ctrlSetPosition [0,0,1,0.01];\n\tbar ctrlCommit 0;\n\tbar progressSetPosition 0.75;\n\tbar ctrlSetTooltip \"lalalalalalalala\";\n};"]}],"see_also":["ctrlSetTooltipColorBox","ctrlSetTooltipColorShade","ctrlSetTooltipColorText"],"notes":[{"user":"Demellion","date":"2017-09-26T08:08:00Z","text":"**NOTE**: If you want to receive a multi-line tooltip, you can simply input newline escape symbol in your text:\n\n```sqf\n_ctrl ctrlSetTooltip \"Your text\\nYour text on next line\";\n```\n\nLocalization files (stringtable.xml) also supports that."}]},{"name":"ctrlSetTooltipColorBox","title":"ctrlSetTooltipColorBox","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetTooltipColorBox","revid":378388,"updated":"2026-04-04T06:25:53Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets tooltip border color of given control.","syntaxes":[{"syntax":"control ctrlSetTooltipColorBox color","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"color"}}],"examples":[{"code":["_control ctrlSetTooltipColorBox [1, 0, 0, 1];"]}],"see_also":["ctrlSetTooltip","ctrlSetTooltipColorShade","ctrlSetTooltipColorText"]},{"name":"ctrlSetTooltipColorShade","title":"ctrlSetTooltipColorShade","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetTooltipColorShade","revid":377368,"updated":"2026-01-02T06:42:12Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets tooltip background color of given control.","syntaxes":[{"syntax":"control ctrlSetTooltipColorShade color","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"color"}}],"examples":[{"code":["_control ctrlSetTooltipColorShade [1, 0, 0, 1];"]}],"see_also":["ctrlSetTooltip","ctrlSetTooltipColorBox","ctrlSetTooltipColorText"]},{"name":"ctrlSetTooltipColorText","title":"ctrlSetTooltipColorText","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetTooltipColorText","revid":377176,"updated":"2026-01-01T10:47:06Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets tooltip text color of given control.","syntaxes":[{"syntax":"display ctrlSetTooltipColorText color","params":[{"name":"display","type":"Control","type_expr":"Control"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"display"},"right":{"text":"color"}}],"examples":[{"code":["_control ctrlSetTooltipColorText [1, 0, 0, 1];"]}],"see_also":["ctrlSetTooltip","ctrlSetTooltipColorBox","ctrlSetTooltipColorShade"]},{"name":"ctrlSetTooltipMaxWidth","title":"ctrlSetTooltipMaxWidth","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetTooltipMaxWidth","revid":310331,"updated":"2022-05-05T16:44:26Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Set maximum width of a control's tooltip.","syntaxes":[{"syntax":"ctrl ctrlSetTooltipMaxWidth width","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"width","type":"Number","description":"in screen measurement units","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"the previous maximum width of the tooltip"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"width"}}],"examples":[{"code":["private _previousMaxWidth = _myControl ctrlSetTooltipMaxWidth (SafeZoneW / 2);"]}],"see_also":["SafeZone","SafeZoneW"]},{"name":"ctrlSetURL","title":"ctrlSetURL","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetURL","revid":325207,"updated":"2022-07-03T07:02:32Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Sets URL property of the given control subject to `allowedHTMLLoadURIs[]` whitelisting in CfgCommands config. Supported controls are:\n\n- `CT_BUTTON`\n- `CT_SHORTCUTBUTTON`\n- `CT_ACTIVETEXT`","syntaxes":[{"syntax":"control ctrlSetURL URL","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"URL","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"URL"}}],"examples":[{"code":["_control ctrlSetURL \"http://arma3.com/\";"]}],"see_also":["ctrlURL","menuSetURL"]},{"name":"ctrlSetURLOverlayMode","title":"ctrlSetURLOverlayMode","type":"command","url":"https://community.bistudio.com/wiki/ctrlSetURLOverlayMode","revid":376033,"updated":"2025-07-22T09:12:10Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Sets how to handle opening of URL, default browser or Steam overlay. Possible values:\n\n- 0 - default browser\n- 1 - Steam overlay if enabled, otherwise default browser\n- 2 - Steam overlay, shows error message box if disabled (the box has a button to continue with default browser)\n\n> [!NOTE]\n> Toggling Steam overlay in Steam options will require game restart for the changes to take effect.","syntaxes":[{"syntax":"control ctrlSetURLOverlayMode mode","params":[{"name":"control","type":"Control","description":"control that contain url opening action","type_expr":"Control"},{"name":"mode","type":"Number","description":"overlay mode, see description","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"mode"}}],"examples":[{"code":["_control ctrlSetURLOverlayMode 1;"]}],"see_also":["isSteamOverlayEnabled","ctrlURLOverlayMode","ctrlURL","menuSetURL"]},{"name":"ctrlShadow","title":"ctrlShadow","type":"command","url":"https://community.bistudio.com/wiki/ctrlShadow","revid":330174,"updated":"2022-08-23T12:24:04Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns 'shadow' property of the control (see ctrlSetShadow).","syntaxes":[{"syntax":"ctrlShadow control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_shadow = ctrlShadow _control;"]}],"see_also":["ctrlSetShadow","ctrlCreate"]},{"name":"ctrlShow","title":"ctrlShow","type":"command","url":"https://community.bistudio.com/wiki/ctrlShow","revid":370565,"updated":"2025-01-09T18:12:50Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Shows or hides a control, or group of controls together with all the controls inside that group of controls.\nRead Arma: GUI Configuration for more information about user dialogs and controls.\n\n> [!NOTE]\n> Using ctrlShow on a controls group will show or hide all controls within the controls group (including controls that are placed in nested controls groups).","syntaxes":[{"syntax":"ctrlShow [idc, show]","params":[{"name":"idc","type":"Number","description":"control IDC","type_expr":"Number"},{"name":"show","type":"Boolean","description":"true to show the control, false to hide it","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, show]"}},{"syntax":"control ctrlShow show","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"show","type":"Boolean","description":"true to show the control, false to hide it","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"show"}}],"examples":[{"code":["ctrlShow [100, false];"]},{"code":["_control ctrlShow false;"]}],"see_also":["ctrlVisible","ctrlShown","ctrlEnable"]},{"name":"ctrlShown","title":"ctrlShown","type":"command","url":"https://community.bistudio.com/wiki/ctrlShown","revid":310874,"updated":"2022-05-07T20:24:10Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns whether given control is shown.","syntaxes":[{"syntax":"ctrlShown controlName","params":[{"name":"controlName","type":"Control","type_expr":"Control"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"controlName"}}],"examples":[{"code":["_bool = ctrlShown _ctrl;"]}],"see_also":["ctrlShow","ctrlVisible"]},{"name":"ctrlStyle","title":"ctrlStyle","type":"command","url":"https://community.bistudio.com/wiki/ctrlStyle","revid":336960,"updated":"2023-01-04T16:44:17Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","locality":{"argument":"local"},"description":"Returns the provided control's style. See Arma: GUI Configuration - Control Styles.","syntaxes":[{"syntax":"ctrlStyle control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number","description":"see Arma: GUI Configuration - Control Styles"},"form":"unary","right":{"text":"control"}}],"examples":[{"text":"```sqf\nprivate _ctrlStyle = ctrlStyle _myControl;\n\nprivate _bitFlags = _ctrlStyle call BIS_fnc_bitflagsToArray;\nif (2 in _bitFlags) then\n{\n    hint \"This control has centered text!\";\n};\n```","code":["private _ctrlStyle = ctrlStyle _myControl;\n\nprivate _bitFlags = _ctrlStyle call BIS_fnc_bitflagsToArray;\nif (2 in _bitFlags) then\n{\n\thint \"This control has centered text!\";\n};"]}],"see_also":["ctrlType","BIS_fnc_bitflagsToArray"]},{"name":"ctrlText","title":"ctrlText","type":"command","url":"https://community.bistudio.com/wiki/ctrlText","revid":378493,"updated":"2026-04-26T15:11:35Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Returns the text of a control of the currently active user dialog. This command can be used on static texts, buttons, edit lines and active texts as well as for images, where it returns the image path. Does not work on HTML control and returns empty string \"\". Since Arma 3 v2.05 supported control types are:\n\n* CT_STATIC\n\n- CT_EDIT\n- CT_XKEYDESC\n- CT_XBUTTON\n- CT_SHORTCUTBUTTON\n- CT_STRUCTURED_TEXT\n- CT_BUTTON\n- CT_ACTIVETEXT\n\nSince Arma 3 v2.20 CT_PROGRESS is also supported.","syntaxes":[{"syntax":"ctrlText idc","params":[{"name":"idc","type":"Number","description":"control ID","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String","description":"the text or image path or texture is returned, dependent on the control type"},"form":"unary","right":{"text":"idc"}},{"syntax":"ctrlText controlName","params":[{"name":"controlName","type":"Control","description":"control","type_expr":"Control"}],"returns":{"type":"String","type_expr":"String","description":"the text or image path or texture is returned, dependent on the control type"},"form":"unary","right":{"text":"controlName"}}],"examples":[{"code":["_text = ctrlText 100;"]},{"code":["_text = ctrlText _control;"]}],"see_also":["ctrlTextSecondary","ctrlSetText","Arma: GUI Configuration"]},{"name":"ctrlTextColor","title":"ctrlTextColor","type":"command","url":"https://community.bistudio.com/wiki/ctrlTextColor","revid":377354,"updated":"2026-01-02T06:40:18Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Returns control's text color","syntaxes":[{"syntax":"ctrlTextColor control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Color (RGBA)","type_expr":"Color","description":"text color"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["ctrlTextColor _control;"]}],"see_also":["ctrlSetTextColor","ctrlText"]},{"name":"ctrlTextHeight","title":"ctrlTextHeight","type":"command","url":"https://community.bistudio.com/wiki/ctrlTextHeight","revid":377912,"updated":"2026-01-09T17:38:24Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns the text control's height. Supported control types:\n\n- CT_STATIC\n- CT_STRUCTURED_TEXT\n- CT_EDIT\n- Arma 3 v2.06 CT_XKEYDESC\n- Arma 3 v2.06 CT_XBUTTON\n- Arma 3 v2.06 CT_SHORTCUTBUTTON\n- Arma 3 v2.06 CT_BUTTON\n- Arma 3 v2.06 CT_ACTIVETEXT","syntaxes":[{"syntax":"ctrlTextHeight control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_h = ctrlTextHeight _ctrl;"]}],"see_also":["ctrlFontHeight","ctrlTextWidth","ctrlSetText","ctrlType","Arma: GUI Configuration"],"notes":[{"user":"Nelis75733126","date":"2017-05-24T21:34:00Z","text":"In Arma 3 v1.70, this command always returns 0 if the definition for width of the control ( inside .hpp or .cpp file ) is missing."}]},{"name":"ctrlTextSecondary","title":"ctrlTextSecondary","type":"command","url":"https://community.bistudio.com/wiki/ctrlTextSecondary","revid":349260,"updated":"2023-11-08T14:51:05Z","groups":["GUI Control"],"status":"ok","games":{"ofp":null,"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","description":"Returns the secondary text of a text control.","syntaxes":[{"syntax":"ctrlTextSecondary control","params":[{"name":"control","type":"Control","description":"text control","type_expr":"Control"}],"returns":{"type":"String","type_expr":"String","description":"secondary text of given control"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_secondaryText = ctrlTextSecondary _ctrlText;"]}],"see_also":["ctrlSetTextSecondary","ctrlSetText","ctrlText","ctrlSetTextColorSecondary"]},{"name":"ctrlTextSelection","title":"ctrlTextSelection","type":"command","url":"https://community.bistudio.com/wiki/ctrlTextSelection","revid":377654,"updated":"2026-01-02T09:02:02Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns edit control text selection in format [start, length, selectedText].\n\n> [!NOTE]\n> *length* can be negative if text selection is made from right to left. Use abs with *length* or count with `selectedText` if string length is required. *start* always indicates at what position in text the selection is started. The cursor position will always be at the end of the selection. So if selection is made from right to left the cursor position will be at the left end of the selection. In order to find cursor position add *start* and *length* together (see Example 3).","syntaxes":[{"syntax":"ctrlTextSelection control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Array","type_expr":"Array","description":"with [start, length, selectedText]\n- start: Number - position in text selection started - length: Number - number of the highlighted characters (this number could be negative, see description) - selectedText: String - selected text","text":"Array with [start, length, selectedText]\n\n- start: Number - position in text selection started\n- length: Number - number of the highlighted characters (this number could be negative, see description)\n- selectedText: String - selected text"},"form":"unary","right":{"text":"control"}}],"examples":[{"text":"Selection is made from left to right:\n\n```sqf\nctrlTextSelection _control; //[0, 11, \"Hello World\"];\n```","code":["ctrlTextSelection _control; //[0, 11, \"Hello World\"];"]},{"text":"Selection is made from right to left:\n\n```sqf\nctrlTextSelection _control; //[11, -11, \"Hello World\"];\n```","code":["ctrlTextSelection _control; //[11, -11, \"Hello World\"];"]},{"text":"Find cursor position:\n\n```sqf\nctrlTextSelection _control params [\"_start\", \"_length\"];\nprivate _cursorPos = _start + _length;\n```","code":["ctrlTextSelection _control params [\"_start\", \"_length\"];\nprivate _cursorPos = _start + _length;"]}],"see_also":["ctrlSetTextSelection"]},{"name":"ctrlTextWidth","title":"ctrlTextWidth","type":"command","url":"https://community.bistudio.com/wiki/ctrlTextWidth","revid":373703,"updated":"2025-06-20T08:16:47Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.78"},"since":"arma3 1.78","arma3_since":"1.78","description":"Returns the width of the control text including left and right margins (0.008 each). Supported control types are:\n\n- CT_STATIC 0\n- CT_EDIT 2\n- CT_STRUCTURED_TEXT 13\n- Arma 3 v2.06 CT_XKEYDESC 40\n- Arma 3 v2.06 CT_XBUTTON 41\n- Arma 3 v2.06 CT_SHORTCUTBUTTON 16\n- Arma 3 v2.06 CT_BUTTON 1\n- Arma 3 v2.06 CT_ACTIVETEXT 11\n\n> [!NOTE]\n> For control-independent text width estimate see getTextWidth.","syntaxes":[{"syntax":"ctrlTextWidth control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["private _w = ctrlTextWidth _ctrl;"]}],"see_also":["getTextWidth","ctrlTextHeight","ctrlSetText","ctrlType","Arma: GUI Configuration"],"notes":[{"user":"R3vo","date":"2020-10-28T22:10:00Z","text":"When working with multiline controls ctrlTextWidth or getTextWidth will not return a proper value since the text will be treated as one long line.\n\n**Solution (Execute in Eden Editor):**\n\n```sqf\ndisableSerialization;\n\nprivate _display = findDisplay 313 createDisplay \"RscDisplayEmpty\";\n\nprivate _edit = _display ctrlCreate [\"RscEditMulti\", -1];\n_edit ctrlSetPosition [0,0,1,1];\n_edit ctrlSetBackgroundColor [0,0,0,1];\n_edit ctrlSetFont \"EtelkaMonospacePro\";\n_edit ctrlSetFontHeight 0.03;\n_edit ctrlCommit 0;\n\nprivate _longestLineWidth = 0;\nprivate _exampleString = \"abcdefghijklmnopqrstuvxyz0134567890\";\nprivate _text = \"\";\n\nfor \"_lines\" from 1 to 400 do // loop through all lines and find the longest one\n{\n    _lineText = _exampleString select [round random 35];\n    _longestLineWidth = _longestLineWidth max (_lineText getTextWidth [\"EtelkaMonospacePro\", 0.03]);\n    _text = _text + _lineText + endl;\n};\n\n_edit ctrlSetPositionW (_longestLineWidth + 2 * 0.008); // width of longest line + left and right margin set in engine\n_edit ctrlCommit 0;\n_edit ctrlSetText _text;\n```"},{"user":"Sa-Matra","date":"2025-06-20T04:57:35Z","text":"If you have ui2textures in the text, there is a slight change this command can return NaN if texture is bugged, can be checked with finite for these rare cases."}]},{"name":"ctrlTooltip","title":"ctrlTooltip","type":"command","url":"https://community.bistudio.com/wiki/ctrlTooltip","revid":309294,"updated":"2022-05-05T11:52:36Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Returns the tooltip property of a button control. Getter for ctrlSetTooltip.","syntaxes":[{"syntax":"ctrlTooltip control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["ctrlTooltip _control;"]}],"see_also":["ctrlSetTooltip"]},{"name":"ctrlType","title":"ctrlType","type":"command","url":"https://community.bistudio.com/wiki/ctrlType","revid":318899,"updated":"2022-05-13T09:22:00Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns number representing the type of control, which is also defined by *type* property in config. For more information see Arma: GUI Configuration","syntaxes":[{"syntax":"ctrlType control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_type = ctrlType _rscEdit; // 2"]}],"see_also":["ctrlCreate","Arma: GUI Configuration"]},{"name":"ctrlURL","title":"ctrlURL","type":"command","url":"https://community.bistudio.com/wiki/ctrlURL","revid":309293,"updated":"2022-05-05T11:52:21Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Returns the URL property of a button control. Getter for ctrlSetURL.","syntaxes":[{"syntax":"ctrlURL control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["private _ctrlUrl = ctrlURL _control; // e.g. \"http://arma3.com/\""]}],"see_also":["ctrlSetURL"]},{"name":"ctrlURLOverlayMode","title":"ctrlURLOverlayMode","type":"command","url":"https://community.bistudio.com/wiki/ctrlURLOverlayMode","revid":330165,"updated":"2022-08-23T12:23:58Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns the URL overlay mode 0, 1, 2 (see ctrlSetURLOverlayMode) or -1 if something went wrong.","syntaxes":[{"syntax":"ctrlURLOverlayMode control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_mode = ctrlURLOverlayMode _control; // e.g. 0"]}],"see_also":["ctrlSetURLOverlayMode","ctrlURL","isSteamOverlayEnabled"]},{"name":"ctrlVisible","title":"ctrlVisible","type":"command","url":"https://community.bistudio.com/wiki/ctrlVisible","revid":348410,"updated":"2023-11-08T13:00:06Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local"},"description":"Returns if a control of the currently active user dialog is shown or not. Read Arma: GUI Configuration for more information about user dialogs and controls.","syntaxes":[{"syntax":"ctrlVisible idc","params":[{"name":"idc","type":"Number","description":"control IDC","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the control is shown, false if not"},"form":"unary","right":{"text":"idc"}}],"examples":[{"code":["_bool = ctrlVisible 100;"]}],"see_also":["ctrlShow","ctrlShown"]},{"name":"ctrlWebBrowserAction","title":"ctrlWebBrowserAction","type":"command","url":"https://community.bistudio.com/wiki/ctrlWebBrowserAction","revid":379585,"updated":"2026-11-03T16:20:55Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.20"},"since":"arma3 2.20","arma3_since":"2.20","locality":{"argument":"local","effect":"local"},"description":"Executes an action on a WebBrowser control. The type of parameters depends on the action type. Possible Actions are:\n\n| Action | Parameter | Result | Description |\n|---|---|---|---|\n| OpenDevConsole | None | Nothing | Opens a Chrome Developer console for this browser, in a external window. (Only available if -debug start parameter is set) |\n| ExecJS | String | Nothing | Executes Javascript code inside the currently loaded page. |\n| JSDialogResponse | Boolean | Nothing | Respond to a Javascript alert() or confirm(), after triggered by \"JSDialog\" Eventhandler |\n| OpenDataAsURL | String | Nothing | Displays provided data in browser. This can be used to load HTML from a file and display it in the Browser window. |\n| LoadFile | String | Nothing | Loads file into browser (Equivalent to [\"OpenDataAsURL\", loadFile \"filePathHere\"])<br>_ctrl ctrlWebBrowserAction [\"LoadFile\", \"z\\mod\\file.html\"] is equivalent to _ctrl ctrlSetURL \"file://z/mod/file.html\" |\n| ToBase64 | String | String | Encodes the input string into Base64 (This also works with controlNull) |\n| FromBase64 | String | String | Decodes the input Base64 string (This also works with controlNull) |\n| Deflate | String | String | Compresses the input and returns a Base64 Deflate compressed output with ZLib header (This also works with controlNull) |\n| Inflate | String | String | Takes Base64 encoded, Deflate compressed input data and returns the decompressed output (This also works with controlNull). Output is limited to 1Megabyte. Equivalent Javascript code:<br>is https://gist.github.com/asidko/9c7064027039411a11323eaf7d8ea2a4#file-gzip-js-L12 but replace 'gzip' with 'deflate' |\n| StopBrowser |  | Nothing | Freezes the currently displayed image (the same image will keep being displayed). Closes the browser and free's all resources of it. This is useful if the Browser is only used to generate a static element and it doesn't need to keep updating it. It saves CPU and Memory resources. |\n| ResumeBrowser |  | Nothing | Unfreezes the browser, and loads the currently set URL (Either that was set before StopBrowser, or which has been set while the browser was paused). Note that when unfreezing, the browser may show one or two black frames while the page is loading. For seemless transition from Paused/Resumed state, you can use a ui2texture and not send any displayUpdate's to it until you consider the resumed browser to be ready. |\n| SetBrowserInternalSize Arma 3 v2.24 | Scalar, Scalar (width, height) | Nothing | Sets the browsers internal render size. Any display will scale the texture up/down as needed. |\n| SetControlReference | Control | Nothing | This has moved to ctrlProperty command. You cannot use this version here. |","syntaxes":[{"syntax":"control ctrlWebBrowserAction [Action, ...]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"Action","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[Action, ...]"}}],"examples":[{"code":["_control ctrlWebBrowserAction [\"OpenDataAsURL\", loadFile \"example.html\"];"]}],"see_also":["ctrlURL","menuSetURL"]},{"name":"ctRowControls","title":"ctRowControls","type":"command","url":"https://community.bistudio.com/wiki/ctRowControls","revid":377175,"updated":"2026-01-01T10:46:47Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Returns array of controls on the row with the given index.","syntaxes":[{"syntax":"control ctRowControls index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Array of Controls","type_expr":"Array<Control>"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["_array = _control ctRowControls 0;"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctCurSel","ctSetCurSel","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetValue","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctRowCount","title":"ctRowCount","type":"command","url":"https://community.bistudio.com/wiki/ctRowCount","revid":309962,"updated":"2022-05-05T12:17:01Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Returns number of rows (headers not included) in the RscControlsTable.","syntaxes":[{"syntax":"ctRowCount control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["ctRowCount _control;"]}],"see_also":["ctAddHeader","ctAddRow","ctClear","ctCurSel","ctSetCurSel","ctRowControls","ctHeaderControls","ctHeaderCount","ctSetValue","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctSetCurSel","title":"ctSetCurSel","type":"command","url":"https://community.bistudio.com/wiki/ctSetCurSel","revid":310076,"updated":"2022-05-05T12:25:08Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Selects the line with the given index. Will take only rows, but not headers into account. -1 deselects all. Returns Nothing.","syntaxes":[{"syntax":"control ctSetCurSel index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["_control ctSetCurSel 0;"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetValue","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctSetData","title":"ctSetData","type":"command","url":"https://community.bistudio.com/wiki/ctSetData","revid":310914,"updated":"2022-05-07T20:34:41Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Associates metadata (string) with the row determined by the index. Returns Nothing.","syntaxes":[{"syntax":"ctrl ctSetData [index, data]","params":[{"name":"ctrl","type":"Control","description":"the respective control","type_expr":"Control"},{"name":"index","type":"Number","description":"the row index","type_expr":"Number"},{"name":"data","type":"String","description":"the data to set","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[index, data]"}}],"examples":[{"code":["_control ctSetData [0, \"Test\"];"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctCurSel","ctSetCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetValue","ctValue","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctSetHeaderTemplate","title":"ctSetHeaderTemplate","type":"command","url":"https://community.bistudio.com/wiki/ctSetHeaderTemplate","revid":310130,"updated":"2022-05-05T12:25:42Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Takes config path to the new header template. Clears the whole RscControlsTable and sets the new header template.","syntaxes":[{"syntax":"control ctSetHeaderTemplate config","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"config"}}],"examples":[{"code":["_control ctSetHeaderTemplate _configPath;"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetCurSel","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate"]},{"name":"ctSetRowTemplate","title":"ctSetRowTemplate","type":"command","url":"https://community.bistudio.com/wiki/ctSetRowTemplate","revid":310121,"updated":"2022-05-05T12:25:35Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Takes config path to the new row template. Clears the whole RscControlsTable and sets the new row template (Deleting all rows and headers is easier to implement than replacing the rows and filling them with new data. IDCs could overflow etc.).","syntaxes":[{"syntax":"control ctSetRowTemplate config","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"config"}}],"examples":[{"code":["_control ctSetRowTemplate _configPath;"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetCurSel","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetHeaderTemplate"]},{"name":"ctSetValue","title":"ctSetValue","type":"command","url":"https://community.bistudio.com/wiki/ctSetValue","revid":310049,"updated":"2022-05-05T12:23:39Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Associates metadata (number) with the row determined by the index. Returns Nothing.","syntaxes":[{"syntax":"control ctSetValue [index, value]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, value]"}}],"examples":[{"code":["_control ctSetValue [0, 23];"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetCurSel","ctValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"ctValue","title":"ctValue","type":"command","url":"https://community.bistudio.com/wiki/ctValue","revid":310913,"updated":"2022-05-07T20:33:32Z","groups":["GUI Control - Controls Table"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Returns metadata (number) associated with a particular row of RscControlsTable.","syntaxes":[{"syntax":"control ctValue index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["_number = _control ctValue 0;"]}],"see_also":["ctAddRow","ctAddHeader","ctClear","ctCurSel","ctSetCurSel","ctRowControls","ctHeaderControls","ctRowCount","ctHeaderCount","ctSetValue","ctSetData","ctData","ctFindRowHeader","ctFindHeaderRows","ctRemoveRows","ctRemoveHeaders","ctSetRowTemplate","ctSetHeaderTemplate"]},{"name":"curatorAddons","title":"curatorAddons","type":"command","url":"https://community.bistudio.com/wiki/curatorAddons","revid":377174,"updated":"2026-01-01T10:46:28Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns list of addons allowed to given curator. The addon names are not guaranteed to be all lower case","syntaxes":[{"syntax":"curatorAddons curatorObj","params":[{"name":"curatorObj","type":"Object","description":"curator module","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"curatorObj"}}],"examples":[{"code":["private _addons = curatorAddons myCurator;"]}],"see_also":["Arma 3: Curator","addCuratorAddons","removeCuratorAddons","removeAllCuratorAddons"]},{"name":"curatorCamera","title":"curatorCamera","type":"command","url":"https://community.bistudio.com/wiki/curatorCamera","revid":310772,"updated":"2022-05-07T20:21:44Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns curator camera object.","syntaxes":[{"syntax":"curatorCamera","params":[],"returns":{"type":"Object","type_expr":"Object"},"form":"nullary"}],"examples":[{"code":["_camCurator = curatorCamera;"]}],"see_also":["Arma 3: Curator"]},{"name":"curatorCameraArea","title":"curatorCameraArea","type":"command","url":"https://community.bistudio.com/wiki/curatorCameraArea","revid":377883,"updated":"2026-01-04T16:25:20Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns all curator camera areas.","syntaxes":[{"syntax":"curatorCameraArea curatorObj","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [cameraAreaID, position, radius]\n- cameraAreaID: Number - position: Position - radius: Number","text":"Array with [cameraAreaID, position, radius]\n\n- cameraAreaID: Number\n- position: Position\n- radius: Number"},"form":"unary","right":{"text":"curatorObj"}}],"examples":[{"code":["_camArea = curatorCameraArea myCurator; // [[8052,[4027.36,4024.89,0],250]]"]}],"see_also":["Arma 3: Curator","addCuratorCameraArea","removeCuratorCameraArea","removeAllCuratorCameraAreas"]},{"name":"curatorCameraAreaCeiling","title":"curatorCameraAreaCeiling","type":"command","url":"https://community.bistudio.com/wiki/curatorCameraAreaCeiling","revid":348441,"updated":"2023-11-08T13:00:15Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns ceiling height for curator camera.","syntaxes":[{"syntax":"curatorCameraAreaCeiling curatorObj","params":[{"name":"curatorObj","type":"Object","description":"curator module","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"curatorObj"}}],"examples":[{"code":["private _height = curatorCameraAreaCeiling BIS_curatorUnit;"]}]},{"name":"curatorCoef","title":"curatorCoef","type":"command","url":"https://community.bistudio.com/wiki/curatorCoef","revid":348299,"updated":"2023-11-08T12:59:35Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns current coeficient setting.","syntaxes":[{"syntax":"curatorObj curatorCoef action","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"},{"name":"action","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"action"}}],"examples":[{"code":["curatorModule curatorCoef \"Place\";"]}],"see_also":["Arma 3: Curator"]},{"name":"curatorEditableObjects","title":"curatorEditableObjects","type":"command","url":"https://community.bistudio.com/wiki/curatorEditableObjects","revid":377173,"updated":"2026-01-01T10:46:13Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"argument":"global"},"description":"Returns all editable objects which belong to a curator.","syntaxes":[{"syntax":"curatorEditableObjects curatorObj","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"curatorObj"}}],"examples":[{"code":["_objects = curatorEditableObjects myCurator;"]}],"see_also":["Arma 3: Curator","curatorMouseOver","addCuratorEditableObjects","removeCuratorEditableObjects"]},{"name":"curatorEditingArea","title":"curatorEditingArea","type":"command","url":"https://community.bistudio.com/wiki/curatorEditingArea","revid":348379,"updated":"2023-11-08T12:59:58Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns all curator editing areas.","syntaxes":[{"syntax":"curatorEditingArea curator","params":[{"name":"curator","type":"Object","description":"curator module.","type_expr":"Object"}],"returns":{"type":"Array of arrays","type_expr":"Array<Array>","description":"in format: [ID, PositionAGL, radius]","text":"Array of arrays in format: [ID, PositionAGL, radius]"},"form":"unary","right":{"text":"curator"}}],"examples":[{"code":["_editingAreas = curatorEditingArea myCurator;"]}],"see_also":["Arma 3: Curator","addCuratorEditingArea","removeCuratorEditingArea","removeAllCuratorEditingAreas"]},{"name":"curatorEditingAreaType","title":"curatorEditingAreaType","type":"command","url":"https://community.bistudio.com/wiki/curatorEditingAreaType","revid":310854,"updated":"2022-05-07T20:24:08Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns type of edit areas assigned to curator (blacklist/whitelist).","syntaxes":[{"syntax":"curatorEditingAreaType curator","params":[{"name":"curator","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"curator"}}],"examples":[{"code":["_isBlacklist = curatorEditingAreaType _curator;"]}],"see_also":["BIS_fnc_addCuratorAreaFromTrigger","removeCuratorEditingArea","removeAllCuratorEditingAreas","curatorEditingArea"]},{"name":"curatorMouseOver","title":"curatorMouseOver","type":"command","url":"https://community.bistudio.com/wiki/curatorMouseOver","revid":318936,"updated":"2022-05-13T09:22:04Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"argument":"local"},"description":"Returns Curator Editable Object under curator mouse pointer.","syntaxes":[{"syntax":"curatorMouseOver","params":[],"returns":{"type":"Array","type_expr":"Array","description":"- [] - when not in curator mode - [\"\"] - if no curator editable object under the pointer in curator mode - [typeName, Curator Editable Object] - if there is curator editable object under the pointer in curator mode","text":"Array\n\n- [] - when not in curator mode\n- [\"\"] - if no curator editable object under the pointer in curator mode\n- [typeName, Curator Editable Object] - if there is curator editable object under the pointer in curator mode"},"form":"nullary"}],"examples":[{"code":["_mouseOver = curatorMouseOver; // Possible return value: [\"OBJECT\", 3594ab00# 164218: apc_wheeled_01_cannon_f.p3d]"]}],"see_also":["Arma 3: Curator","curatorEditableObjects","curatorSelected"]},{"name":"curatorPoints","title":"curatorPoints","type":"command","url":"https://community.bistudio.com/wiki/curatorPoints","revid":376976,"updated":"2026-01-01T06:06:14Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns number of points that curator have.","syntaxes":[{"syntax":"curatorPoints curatorObj","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"in range 0..1","text":"Number in range 0..1"},"form":"unary","right":{"text":"curatorObj"}}],"examples":[{"code":["_points = curatorPoints myCurator;"]}],"see_also":["Arma 3: Curator","addCuratorPoints"]},{"name":"curatorRegisteredObjects","title":"curatorRegisteredObjects","type":"command","url":"https://community.bistudio.com/wiki/curatorRegisteredObjects","revid":377172,"updated":"2026-01-01T10:45:58Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns array with all objects that has curator registered and their settings.","syntaxes":[{"syntax":"curatorRegisteredObjects curator","params":[{"name":"curator","type":"Object","description":"curator module","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"curator"}}],"examples":[{"code":["curatorRegisteredObjects _curatorModule;"]}],"see_also":["Arma 3: Curator"]},{"name":"curatorSelected","title":"curatorSelected","type":"command","url":"https://community.bistudio.com/wiki/curatorSelected","revid":377660,"updated":"2026-01-02T09:02:11Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns list of all curator selected items.","syntaxes":[{"syntax":"curatorSelected","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [objects, groups, waypoints, markers]\n- objects: Array of Objects - groups: Array of Groups - waypoints: Waypoint - markers: Array of Strings","text":"Array with [objects, groups, waypoints, markers]\n\n- objects: Array of Objects\n- groups: Array of Groups\n- waypoints: Waypoint\n- markers: Array of Strings"},"form":"nullary"}],"examples":[{"code":["_selectedItems = curatorSelected;"]},{"code":["curatorSelected params [\"_selObjects\", \"_selGroups\", \"_selWaypoints\", \"_selMarkers\"];"]}],"see_also":["curatorMouseOver","setCuratorSelected","addCuratorSelected","Arma 3: Curator"]},{"name":"curatorSelectionPreset","title":"curatorSelectionPreset","type":"command","url":"https://community.bistudio.com/wiki/curatorSelectionPreset","revid":347229,"updated":"2023-09-05T17:11:28Z","groups":["Curator"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","description":"Returns list of all objects stored in the given selection preset.","syntaxes":[{"syntax":"curatorSelectionPreset numkey","params":[{"name":"numkey","type":"Number","description":"number key under which the selection preset is saved","type_expr":"Number"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"objects saved in the selection preset"},"form":"unary","right":{"text":"numkey"}}],"examples":[{"code":["private _savedItems = curatorSelectionPreset 1;"]}],"see_also":["loadCuratorSelectionPreset","setCuratorSelectionPreset","curatorSelected","setCuratorSelected","addCuratorSelected","Arma 3: Curator"]},{"name":"curatorWaypointCost","title":"curatorWaypointCost","type":"command","url":"https://community.bistudio.com/wiki/curatorWaypointCost","revid":353723,"updated":"2024-03-21T19:38:08Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Return current price for placing waypoints (curator specific).","syntaxes":[{"syntax":"curatorWaypointCost curatorObj","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"curatorObj"}}],"examples":[{"code":["var_wpcost = curatorWaypointCost bis_curator;"]}],"see_also":["Arma 3: Curator","curatorPoints","addCuratorPoints"]},{"name":"current3DENOperation","title":"current3DENOperation","type":"command","url":"https://community.bistudio.com/wiki/current3DENOperation","revid":348917,"updated":"2023-11-08T14:44:04Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns the currently performed editing operation in Eden Editor.","syntaxes":[{"syntax":"current3DENOperation","params":[],"returns":{"type":"String","type_expr":"String","description":"operation name. Can be:\n- `\"\"` (no operation) - `\"CreateObject\"` - `\"CreateMarker\"` - `\"CreateTrigger\"` - `\"MoveItems\"` - `\"RotateItems\"` - `\"ScaleItems\"` - `\"SyncWith\"` - `\"GroupWith\"` - `\"SetTriggerOwner\"` - `\"AddRandomStart\"`","text":"String - operation name. Can be:\n\n- `\"\"` (no operation)\n- `\"CreateObject\"`\n- `\"CreateMarker\"`\n- `\"CreateTrigger\"`\n- `\"MoveItems\"`\n- `\"RotateItems\"`\n- `\"ScaleItems\"`\n- `\"SyncWith\"`\n- `\"GroupWith\"`\n- `\"SetTriggerOwner\"`\n- `\"AddRandomStart\"`"},"form":"nullary"}],"examples":[{"code":["if (current3DENOperation == \"MoveItems\") then { hint \"Moving things are we\"; };"]}],"see_also":["do3DENAction","get3DENActionState"]},{"name":"currentChannel","title":"currentChannel","type":"command","url":"https://community.bistudio.com/wiki/currentChannel","revid":376817,"updated":"2025-11-21T20:34:59Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","description":"Returns currently selected user chat channel on the UI (selected with <kbd><</kbd> and <kbd>></kbd> in multiplayer).\n\n| channel ID number correspondence |  |  |  |  |  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| N/A | Global | Side | Command | Group | Vehicle | Direct | Custom1 | .. | Custom10 | Arma 3 v2.22 Custom11 | .. | Custom50 |\n| -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | .. | 15 | 26 | .. | 65 |\n\nFor Custom Radio, see radioChannelCreate.","syntaxes":[{"syntax":"currentChannel","params":[],"returns":{"type":"Number","type_expr":"Number","description":"channel ID (see BIS_fnc_channelNumToRadioChannelID, BIS_fnc_radioChannelIDToChannelNum)"},"form":"nullary"}],"examples":[{"code":["_selected = currentChannel; // 3 for the Group channel"]}],"see_also":["setCurrentChannel","getPlayerChannel","enableChannel","channelEnabled","radioChannelCreate"]},{"name":"currentCommand","title":"currentCommand","type":"command","url":"https://community.bistudio.com/wiki/currentCommand","revid":318985,"updated":"2022-05-13T09:22:08Z","groups":["Unit Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return the current command type (empty string when no command) for the commander of given vehicle (or for a given soldier). Returned value can be one of:\n\n- \"WAIT\"\n- \"ATTACK\"\n- \"HIDE\"\n- \"MOVE\"\n- \"HEAL\"\n- \"REPAIR\"\n- \"REFUEL\"\n- \"REARM\"\n- \"SUPPORT\"\n- \"JOIN\"\n- \"GET IN\"\n- \"FIRE\"\n- \"GET OUT\"\n- \"STOP\"\n- \"EXPECT\"\n- \"ACTION\"\n- \"ATTACKFIRE\"\n- \"Suppress\"","syntaxes":[{"syntax":"currentCommand vehicleName","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"vehicleName"}}],"examples":[{"code":["_command = currentCommand player;"]}],"see_also":["commandFire","commandMove","commandSuppressiveFire","join"]},{"name":"currentMagazine","title":"currentMagazine","type":"command","url":"https://community.bistudio.com/wiki/currentMagazine","revid":379410,"updated":"2026-10-31T00:02:49Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns class name of currently loaded vehicle's / unit's magazine.","syntaxes":[{"syntax":"currentMagazine vehicle","params":[{"name":"vehicle","type":"Object","description":"unit or vehicle","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_magazineClass = currentMagazine player;//Example: \"30Rnd_545x39_AK\""]}],"see_also":["magazines","currentMagazineDetail","currentWeapon","currentMuzzle","currentThrowable","currentVisionMode","currentWeaponMode","currentZeroing","magazinesTurret","weaponsTurret"],"notes":[{"user":".kju","date":"2010-10-04T00:00:00Z","text":"See notes of currentWeapon."}]},{"name":"currentMagazineDetail","title":"currentMagazineDetail","type":"command","url":"https://community.bistudio.com/wiki/currentMagazineDetail","revid":369313,"updated":"2024-09-03T18:42:56Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns description of vehicle's currently loaded magazine, its ammo count (current/default) and its id.","syntaxes":[{"syntax":"currentMagazineDetail object","params":[{"name":"object","type":"Object","description":"unit or vehicle","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_currentMagazineDetail = currentMagazineDetail player; // \"6.5mm 30Rnd STANAG Mag(30/30)[id:0]\""]},{"code":["_currentMagazineDetail = currentMagazineDetail Mi_48; // \"30mm HE Shells(250/250)[id:21]"]},{"code":["_cmd = currentMagazineDetail player; // \"9mm 16Rnd Mag(13/16)[id/cr:10000011/0]\"\n_cmd splitString \"([ ]/:)\"; // [\"9mm\",\"16Rnd\",\"Mag\",\"13\",\"16\",\"id\",\"cr\",\"10000011\",\"0\"]"]}],"see_also":["magazinesDetail","currentMagazine"]},{"name":"currentMagazineDetailTurret","title":"currentMagazineDetailTurret","type":"command","url":"https://community.bistudio.com/wiki/currentMagazineDetailTurret","revid":377470,"updated":"2026-01-02T06:48:37Z","groups":["Turrets"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","description":"Returns the class name of currently used magazine on specified turret. Use turret path [-1] for driver's turret. Note that a turret is not loaded until unit enters it, so this command will return \"\".","syntaxes":[{"syntax":"vehicle currentMagazineDetailTurret turretPath","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}}],"examples":[{"code":["_magazineDetail = MBT_Kuma currentMagazineDetailTurret [0];"]}],"see_also":["currentMagazineTurret","currentWeaponTurret","addWeaponTurret","removeWeaponTurret","turretLocal"]},{"name":"currentMagazineTurret","title":"currentMagazineTurret","type":"command","url":"https://community.bistudio.com/wiki/currentMagazineTurret","revid":377500,"updated":"2026-01-02T06:49:28Z","groups":["Turrets"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","description":"Returns the name of the type of the currently using magazine on specified turret. Use turret path [-1] for driver's turret. Note that a turret is not loaded until unit enters it, so this command will return \"\".","syntaxes":[{"syntax":"vehicle currentMagazineTurret turretPath","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}}],"examples":[{"code":["_magazine = MBT_Kuma currentMagazineTurret [0];"]}],"see_also":["currentMagazineDetailTurret","currentWeaponTurret","addWeaponTurret","removeWeaponTurret","turretLocal"]},{"name":"currentMuzzle","title":"currentMuzzle","type":"command","url":"https://community.bistudio.com/wiki/currentMuzzle","revid":321269,"updated":"2022-05-13T19:08:05Z","groups":["Weapons"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Returns a unit's current weapon muzzle. Does not work on vehicles.","syntaxes":[{"syntax":"currentMuzzle unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"current muzzle\n> [!IMPORTANT] > In earlier games/versions, this command could return a Number (`0`) if unit was in a vehicle. > > Use the following to circumvent the issue: > > ```sqf > _muzzle = weaponState unit select 1; > ```","text":"String - current muzzle\n\n> [!IMPORTANT]\n> In earlier games/versions, this command could return a Number (`0`) if *unit* was in a vehicle.\n>\n> Use the following to circumvent the issue:\n>\n> ```sqf\n> _muzzle = weaponState unit select 1;\n> ```"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_muzzle = currentMuzzle player;"]},{"code":["_muzzle = currentMuzzle (gunner (vehicle player));"]}],"see_also":["currentWeapon","currentMagazine","currentThrowable"]},{"name":"currentNamespace","title":"currentNamespace","type":"command","url":"https://community.bistudio.com/wiki/currentNamespace","revid":339095,"updated":"2023-04-26T10:54:14Z","groups":["Namespaces","System"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","description":"Returns the current global namespace the script runs in.\n\n> [!NOTE]\n> Since Arma 3 v2.00, Namespaces can be compared with == and != operators in addition to isEqualTo.","syntaxes":[{"syntax":"currentNamespace","params":[],"returns":{"type":"Namespace","type_expr":"Namespace","description":"one of:\n- missionNamespace - uiNamespace - parsingNamespace - profileNamespace - localNamespace","text":"Namespace - one of:\n\n- missionNamespace\n- uiNamespace\n- parsingNamespace\n- profileNamespace\n- localNamespace"},"form":"nullary"}],"examples":[{"code":["if (currentNamespace isEqualTo uiNamespace) then { hint \"This is uiNamespace\" };"]},{"text":"```sqf\nprivate _fn_getCurrentNamespaceName = {\n    if (currentNamespace isEqualTo missionNamespace) exitWith { \"missionNamespace\" };\n    if (currentNamespace isEqualTo parsingNamespace) exitWith { \"parsingNamespace\" };\n    if (currentNamespace isEqualTo profileNamespace) exitWith { \"profileNamespace\" };\n    if (currentNamespace isEqualTo uiNamespace) exitWith { \"uiNamespace\" };\n    \"error\";\n};\n\nwith profileNamespace do {\n    systemChat call _fn_getCurrentNamespaceName;    // profileNamespace\n};\n\nsystemChat call _fn_getCurrentNamespaceName;        // missionNamespace\n\nwith uiNamespace do {\n    systemChat call _fn_getCurrentNamespaceName;    // uiNamespace\n};\n```","code":["private _fn_getCurrentNamespaceName = {\n\tif (currentNamespace isEqualTo missionNamespace) exitWith { \"missionNamespace\" };\n\tif (currentNamespace isEqualTo parsingNamespace) exitWith { \"parsingNamespace\" };\n\tif (currentNamespace isEqualTo profileNamespace) exitWith { \"profileNamespace\" };\n\tif (currentNamespace isEqualTo uiNamespace) exitWith { \"uiNamespace\" };\n\t\"error\";\n};\n\nwith profileNamespace do {\n\tsystemChat call _fn_getCurrentNamespaceName;\t// profileNamespace\n};\n\nsystemChat call _fn_getCurrentNamespaceName;\t\t// missionNamespace\n\nwith uiNamespace do {\n\tsystemChat call _fn_getCurrentNamespaceName;\t// uiNamespace\n};"]}],"see_also":["missionNamespace","uiNamespace","parsingNamespace","profileNamespace","localNamespace","allVariables","with","ArmA: Editing"]},{"name":"currentPilot","title":"currentPilot","type":"command","url":"https://community.bistudio.com/wiki/currentPilot","revid":309146,"updated":"2022-05-03T14:07:26Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","description":"Returns the person piloting the vehicle. If co-pilot is piloting, co-pilot is returned. If you need current pilot of a UAV or UGV, see UAVControl command.","syntaxes":[{"syntax":"currentPilot vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"piloting unit or objNull"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"text":"```sqf\nif (currentPilot _vehicle != driver _vehicle) then\n{\n    hint \"The pilot is not piloting!\";\n};\n```","code":["if (currentPilot _vehicle != driver _vehicle) then\n{\n\thint \"The pilot is not piloting!\";\n};"]}],"see_also":["driver","gunner","commander","effectiveCommander","turretUnit","UAVControl","enableCopilot"],"notes":[{"user":"Killzone_Kid","date":"2019-08-20T23:15:00Z","text":"To return co-pilot units:\n\n```sqf\nprivate _fnc_getCoPilots =\n{\n    private _copilotTurrets = allTurrets _this select { getNumber ([_this, _x] call BIS_fnc_turretConfig >> \"isCopilot\") > 0 };\n    private _copilots = _copilotTurrets apply { _this turretUnit _x };\n    _copilots;\n};\n\nhint str (heli call _fnc_getCoPilots);\n```"}]},{"name":"currentTask","title":"currentTask","type":"command","url":"https://community.bistudio.com/wiki/currentTask","revid":318828,"updated":"2022-05-13T09:21:54Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return current task of given person.","syntaxes":[{"syntax":"currentTask person","params":[{"name":"person","type":"Object","type_expr":"Object"}],"returns":{"type":"Task","type_expr":"Task"},"form":"unary","right":{"text":"person"}}],"examples":[{"code":["_currTask = currentTask player;"]}],"see_also":["taskNull","createSimpleTask","simpleTasks","taskCompleted"]},{"name":"currentTasks","title":"currentTasks","type":"command","url":"https://community.bistudio.com/wiki/currentTasks","revid":377084,"updated":"2026-01-01T09:42:58Z","groups":["Briefing","Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns array with all uncompleted tasks for the given agent.\ngetVariable could be used on Task to get the following special local variables from the task:\n\n- `\"_this\"` Team Member - the teamMember agent the task is assigned to\n- `\"_taskType\"` String - the name of the task (see registeredTasks)\n- `\"_thisCreated\"` Number - 1 or 0\n- `\"_thisRunning\"` Number - 1 or 0\n- `\"_totalCreated\"` Number - total number of tasks\n- `\"_totalRunning\"` Number - total number of running tasks\n- `\"_task\"`Task - often null","syntaxes":[{"syntax":"currentTasks teamMember","params":[{"name":"teamMember","type":"Team Member","description":"teamMember agent","type_expr":"Team Member"}],"returns":{"type":"Array of Tasks","type_expr":"Array<Task>"},"form":"unary","right":{"text":"teamMember"}}],"examples":[{"code":["currentTasks teamMember _agent;"]}],"see_also":["taskCompleted","registerTask","registeredTasks","unregisterTask","sendTask","createTask"]},{"name":"currentThrowable","title":"currentThrowable","type":"command","url":"https://community.bistudio.com/wiki/currentThrowable","revid":377712,"updated":"2026-01-02T09:03:53Z","groups":["Weapons","Unit Inventory"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","description":"Returns currently selected throwable (and the muzzle it is loaded into), which will be launched if the user presses <kbd>G</kbd>.","syntaxes":[{"syntax":"currentThrowable unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [magazineName, muzzleName, id, ammoCount]\n- magazineName: String - muzzleName: String - id: Array of Number pairs: [itemWorldID, creatorID] - Arma 3 v2.22 ammoCount: Number - magazine ammo","text":"Array with [magazineName, muzzleName, id, ammoCount]\n\n- magazineName: String\n- muzzleName: String\n- id: Array of Number pairs: [itemWorldID, creatorID]\n- Arma 3 v2.22 ammoCount: Number - magazine ammo"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["currentThrowable player; // [\"SmokeShellGreen\", \"SmokeShellGreenMuzzle\", [1.00002e+007, 0], 1]"]},{"text":"```sqf\n_ct = currentThrowable player;                // [\"HandGrenade\", \"HandGrenadeMuzzle\", [1e+007, 0], 1]\n_id = (_ct select 2 select 0) - 1e7;        // 18\n```","code":["_ct = currentThrowable player;\t\t\t\t// [\"HandGrenade\", \"HandGrenadeMuzzle\", [1e+007, 0], 1]\n_id = (_ct select 2 select 0) - 1e7;\t\t// 18"]}],"see_also":["selectThrowable","currentWeapon","currentMagazine","currentMuzzle","BIS_fnc_isThrowable"]},{"name":"currentVisionMode","title":"currentVisionMode","type":"command","url":"https://community.bistudio.com/wiki/currentVisionMode","revid":378560,"updated":"2026-05-08T13:11:39Z","groups":["Weapons"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns current vision mode of unit's weapon. Vision mode could be one of:\n\n- 0 - normal vision\n- 1 - night vision\n- 2 - thermal vision\n\nAlternative syntaxes additionally return FLIR index (see setCamUseTI) of the thermal vision mode (See also \"VisionModeChanged\" entity event handler)","syntaxes":[{"syntax":"currentVisionMode entity","params":[{"name":"entity","type":"Object","description":"unit or vehicle. Unit query returns current vision mode of the unit. Vehicle query returns driver seat vision mode","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"vision mode (0 on error, e.g on objNull)","text":"Number - vision mode (**0** on error, e.g on objNull)"},"form":"unary","right":{"text":"entity"}},{"syntax":"currentVisionMode [entity]","since":"arma3 2.08","params":[{"name":"entity","type":"Object","description":"unit or vehicle. Unit query returns current vision mode of the unit. Vehicle query returns driver seat vision mode","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"format [visionMode, flirIndex] where:\n- visionMode: Number - flirIndex: Number [-1, -1] on error","text":"Array format [visionMode, flirIndex] where:\n\n- visionMode: Number\n- flirIndex: Number\n\n[-1, -1] on error"},"form":"unary","right":{"text":"[entity]"}},{"syntax":"vehicle currentVisionMode turretPath","since":"arma3 2.08","params":[{"name":"vehicle","type":"Object","description":"vehicle with vision modes","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","description":"path to vehicle's turret. Use [-1] for driver turret, [] for default primary gunner turret","type_expr":"Turret Path"}],"returns":{"type":"Array","type_expr":"Array","description":"format [visionMode, flirIndex] where:\n- visionMode: Number - flirIndex: Number [-1, -1] on error","text":"Array format [visionMode, flirIndex] where:\n\n- visionMode: Number\n- flirIndex: Number\n\n[-1, -1] on error"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}},{"syntax":"unit currentVisionMode weapon","since":"arma3 2.08","params":[{"name":"unit","type":"Object","description":"soldier","type_expr":"Object"},{"name":"weapon","type":"String","description":"unit's weapon. Use \"\" for current weapon","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"format [visionMode, flirIndex] where:\n- visionMode: Number - flirIndex: Number [-1, -1] on error","text":"Array format [visionMode, flirIndex] where:\n\n- visionMode: Number\n- flirIndex: Number\n\n[-1, -1] on error"},"form":"binary","left":{"text":"unit"},"right":{"text":"weapon"}}],"examples":[{"code":["_visionMode = currentVisionMode gunner _tank;"]},{"text":"```sqf\nif (currentVisionMode player == 1) then\n{\n    hint \"nightvision active\";\n};\n```","code":["if (currentVisionMode player == 1) then\n{\n\thint \"nightvision active\";\n};"]},{"code":["private _detailedVisionMode = currentVisionMode [gunner _tank];\n_detailedVisionMode params [\"_mode\", \"_flirIndex\"];"]},{"code":["private _detailedGunnerVisionMode = _tank currentVisionMode [0];"]},{"code":["private _detailedWeaponVisionMode = player currentVisionMode \"\";"]}],"see_also":["disableNVGEquipment","disableTIEquipment","camUseNVG","setCamUseTI","currentMagazine","currentWeapon","currentMuzzle","currentWeaponMode","currentZeroing","magazinesTurret","weaponsTurret"],"notes":[{"user":"AgentRev","date":"2016-04-29T21:31:00Z","text":"> [!CAUTION]\n> This information is **obsolete** as of Arma 3 v2.08.\n\nThe return value is somewhat erratic for UAVs. For example, if you are connected to a UAV, with the turret set to thermal vision and PIP feed enabled, `currentVisionMode gunner _uav` returns 2 when controlling the turret, but returns 0 after releasing control, even thought the PIP feed is still in thermal mode. With nightvision, it will return 1 whether or not you are controlling the turret, but if you switch from 1st to 3rd person before releasing control, then it returns 0 afterwards..."}]},{"name":"currentWaypoint","title":"currentWaypoint","type":"command","url":"https://community.bistudio.com/wiki/currentWaypoint","revid":378132,"updated":"2026-02-22T20:40:12Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the *index* of the current waypoint (**not** the waypoint in Waypoint Array format).\n\n- To determine the validity of the index, compare it to the waypoints count.\n- If all waypoints are completed, then the index is 1 greater than the last valid index.\n- If there are no waypoints, then the index is 0.\n\nBy default, a group has one already-completed waypoint at their starting position, making the first waypoint number one, not zero.","syntaxes":[{"syntax":"currentWaypoint groupName","params":[{"name":"groupName","type":"Group","type_expr":"Group"}],"returns":{"type":"Number","type_expr":"Number","description":"index of the current waypoint"},"form":"unary","right":{"text":"groupName"}}],"examples":[{"code":["_index = currentWaypoint group player;"]},{"code":["_waypointFormat = [_group, currentWaypoint _group];"]}],"see_also":["waypoints","setCurrentWaypoint"]},{"name":"currentWeapon","title":"currentWeapon","type":"command","url":"https://community.bistudio.com/wiki/currentWeapon","revid":379411,"updated":"2026-10-31T00:02:57Z","groups":["Weapons","Unit Inventory"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return the name of the currently selected weapon (on the primary turret for vehicles).","syntaxes":[{"syntax":"currentWeapon vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_weaponClass = currentWeapon (vehicle player);//Example: \"M16A2GL\""]},{"code":["_weaponClass = currentWeapon player;"]}],"see_also":["currentMagazine","currentMuzzle","currentThrowable","currentVisionMode","currentWeaponMode","currentZeroing","magazinesTurret","weaponsTurret","currentWeaponTurret","weaponState"],"notes":[{"user":"Lou Montana","date":"2009-07-15T02:00:00Z","text":"You have to make a little delay (sleep 0.001; (not less)) to use this command, else you will be returned an empty string."},{"user":"Lou Montana","date":"2009-07-15T02:00:00Z","text":"It seems it is not working in 1.02 for other unit than player."},{"user":"Terox","date":"2010-05-04T00:00:00Z","text":"This works for vehicles providing there is a gunner"}]},{"name":"currentWeaponMode","title":"currentWeaponMode","type":"command","url":"https://community.bistudio.com/wiki/currentWeaponMode","revid":379327,"updated":"2026-10-30T23:51:46Z","groups":["Weapons"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Returns current weapon mode of unit's weapon.\n\n> [!WARNING]\n> This command will return 0 Number if given object is a vehicle instead of a person.\n> You can alternatively use\n>\n> ```sqf\n> _muzzle = weaponState player select 2;\n> ```","syntaxes":[{"syntax":"currentWeaponMode gunner","params":[{"name":"gunner","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"current mode's classname"},"form":"unary","right":{"text":"gunner"}}],"examples":[{"code":["_weaponMode = currentWeaponMode player;"]},{"code":["_weaponMode = currentWeaponMode gunner vehicle player;"]}],"see_also":["ArmA: Actions","currentWeapon"],"notes":[{"user":"Pierre MGI","date":"2014-09-27T18:20:00Z","text":"- Be careful using this in script. This function returns these strings but also:\n- 0 if unit is in a vehicle (pax),\n- absolutely nothing if AH-99 helo driver or all weapons removed,\n- \"truckhorn2\" if Hunter driver...\nAbsolutely nothing means: if you use a hint to display the returned value, you obtain absolutely no text,no black box, no error! Hint isn't displayed and there is no error in rpt file with compile preprocessFileLineNumbers.\n\nOn the other hand, returned value 0 when unit is pax of a vehicle, could lead to a variable error type if your script is waiting for a string."},{"user":"Sarogahtyp","date":"2022-07-04T12:48:33Z","text":"To set the firemode of the current weapon of a player, simply use the workaround described by Killzone_Kid in the first note of the forceWeaponFire wiki entry:\n\n```sqf\n_weapon = currentWeapon player;\n_ammo = player ammo _weapon;\nplayer setAmmo [_weapon, 0];\nplayer forceWeaponFire [_weapon, \"FullAuto\"];\nplayer setAmmo [_weapon, _ammo];\n```"}]},{"name":"currentWeaponTurret","title":"currentWeaponTurret","type":"command","url":"https://community.bistudio.com/wiki/currentWeaponTurret","revid":378861,"updated":"2026-07-22T17:03:52Z","groups":["Turrets"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","description":"Returns the name of the currently selected weapon on specified turret. Use turret path [-1] for driver's turret.","syntaxes":[{"syntax":"vehicle currentWeaponTurret turretPath","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}}],"examples":[{"code":["_weapon = MBT_Kuma currentWeaponTurret [0];"]}],"see_also":["currentMagazineDetailTurret","currentMagazineTurret","addWeaponTurret","removeWeaponTurret","turretLocal","currentWeapon"]},{"name":"currentZeroing","title":"currentZeroing","type":"command","url":"https://community.bistudio.com/wiki/currentZeroing","revid":378508,"updated":"2026-05-03T17:08:03Z","groups":["Weapons"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"argument":"local"},"description":"Returns current zeroing.","syntaxes":[{"syntax":"currentZeroing object","params":[{"name":"object","type":"Object","description":"unit (vehicles are not supported)","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"object"}},{"syntax":"object currentZeroing [weaponClass, muzzleClass]","since":"arma3 2.04","params":[{"name":"object","type":"Object","description":"unit (vehicles are not supported)","type_expr":"Object"},{"name":"weaponClass","type":"String","description":"class name of weapon","type_expr":"String"},{"name":"muzzleClass","type":"String","optional":true,"default":"currently active muzzle or first that is found","description":"muzzle classname","type_expr":"String","text":"muzzleClass: String - (Optional, default currently active muzzle or first that is found) muzzle classname"}],"returns":{"type":"Array","type_expr":"Array","description":"with [distance, zeroingIndex]\n- distance: Number - distance in meters, Since Arma 3 v2.20 supports laser rangefinder value - zeroingIndex: Number - 0 ≙ 50 m, 1 ≙ 100 m, 2 ≙ 150 m, ..., -1 for laser rangefinding","text":"Array with [distance, zeroingIndex]\n\n- distance: Number - distance in meters, Since Arma 3 v2.20 supports laser rangefinder value\n- zeroingIndex: Number - 0 ≙ 50 m, 1 ≙ 100 m, 2 ≙ 150 m, ..., -1 for laser rangefinding"},"form":"binary","left":{"text":"object"},"right":{"text":"[weaponClass, muzzleClass]"}}],"examples":[{"code":["private _zeroing = currentZeroing player;"]},{"code":["(player currentZeroing [\"arifle_MX_GL_F\", \"GL_3GL_F\"]) params [\"_distance\", \"_zeroingIndex\"];"]},{"code":["private _zeroing = currentZeroing myVehicle; // does not work\nprivate _zeroing = currentZeroing gunner myVehicle; // works"]}],"see_also":["setWeaponZeroing"]},{"name":"cursorObject","title":"cursorObject","type":"command","url":"https://community.bistudio.com/wiki/cursorObject","revid":379328,"updated":"2026-10-30T23:51:54Z","groups":["Object Detection"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns the object under cursor. This command is quite different from cursorTarget as it is more precise in determining the boundaries of the pointed at object and can detect a larger variety of objects including map objects and trees.","syntaxes":[{"syntax":"cursorObject","params":[],"returns":{"type":"Object","type_expr":"Object"},"form":"nullary"}],"examples":[{"code":["hint str [getModelInfo cursorObject, typeOf cursorObject];"]}],"see_also":["getCursorObjectParams","cursorTarget","lineIntersects","lineIntersectsWith","lineIntersectsObjs","lineIntersectsSurfaces","intersect","checkVisibility"],"notes":[{"user":"Pierre MGI","date":"2015-03-23T18:17:00Z","text":"If you point at the primary weapon of an infantry unit, cursorObject will return the p3d of the weapon instead of the unit itself (B Alpha 1-2:1.. or its variable name ). That doesn't occur for anything else (backpack or headgear)."}]},{"name":"cursorTarget","title":"cursorTarget","type":"command","url":"https://community.bistudio.com/wiki/cursorTarget","revid":373164,"updated":"2025-04-08T21:03:11Z","groups":["Object Detection"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the target pointed at by the player (usually with cross-hairs). The target has to be known to the player to some degree (knowsAbout > 0). If target is completely unknown, command returns objNull.\n\nA valid target could belong to an enemy or a friendly side. Buildings are normally known to player and so are valid targets. Try nearTargets to see what else is considered a target.\nWhile friendly targets are usually known to the player, enemy targets can be totally unknown, especially if \"auto-spotting\" (or sometimes called \"auto-reporting\") is switched off. To check if auto-spotting is enabled: `difficultyEnabled \"autospot\"`.\n\ncursorTarget also returns locked target for the duration of the lock even if there is another target under the cursor. As soon as missile is fired, cursorTarget switches to current known target under cursor or objNull.\nTargeting (<kbd>T</kbd> in Arma 3) works regardless of the state of \"auto-spotting\".\n\nAdding a target to the known list could be done with reveal command. When auto-spotting is enabled, zooming on the enemy target with cross-hairs usually reveals the target.\nAs friendly targets are always known, zooming on friendly target could improve knowsAbout value.\n\nSide Relations can also influence target knowledge. For example east target is unknown target for civilian, but making them friends with setFriend instantly improves civilian knowledge of the east.","syntaxes":[{"syntax":"cursorTarget","params":[],"returns":{"type":"Object","type_expr":"Object"},"form":"nullary"}],"examples":[{"code":["alive cursorTarget;"]}],"see_also":["cursorObject","getCursorObjectParams","laserTarget","nearTargets","knowsAbout","reveal","lineIntersects","lineIntersectsWith","lineIntersectsObjs","lineIntersectsSurfaces","intersect","checkVisibility"],"notes":[{"user":"FRL Myke","date":"2011-02-18T00:28:00Z","text":"If the player is in a vehicle and a lockable weapon is selected and a target is locked, the locked target will be returned, regardless if it is in sight or not."},{"user":".kju","date":"2011-03-11T12:48:00Z","text":"Addition to Myke's note:\nIt also works for infantry with launchers that canLock, like Javelin or AA.\nOnly the lock cursor must be visible on the target - not a full lock necessarily."},{"user":"Lou Montana","date":"2009-07-11T12:13:00Z","text":"- Player must know about what he is pointing to for this command to return something other than <NULL-OBJECT>\n- This command doesn't work through building windows\n- This recognition doesn't work with every object : soldiers, vehicles, big houses are ok, but not trees, plants, road signs or others little things"},{"user":"Killzone_Kid","date":"2013-08-23T22:16:00Z","text":"To add to User:Lou Montana's note, use reveal command on the object you want to be detected with cursorTarget when pointing at it.\nWithout it, distant units are most likely to return objNull even if you shoot and hit them.\n\nUnits that have been previously subjected to enableSimulation false; or enableSimulationGlobal false; may stay unrecognised for a long time even after simulation was re-enabled, returning objNull as cursorTarget.\nForce revealing units with reveal command usually solves the problem. For example:\n\n```sqf\n{ player reveal _x } forEach allUnits;\n```"},{"user":"DreadedEntity","date":"2014-12-03T18:40:00Z","text":"cursorTarget seems to change when your cursor enters an object's boundingBox.\nBecause of this, if the player is **inside** the boundingBox, the object will always be the current cursorTarget if the player is not looking at another object, although sometimes the object will remain the cursorTarget even if the player does."},{"user":"Pierre MGI","date":"2015-04-21T03:53:00Z","text":"cursorTarget will not return enemy units, even very close, if \"autoreport\" is disabled in game difficulty settings, and if player is alone.\nHowever, when enemy units open fire on player, the cursortarget becomes functional on these units. If player is in a group, cursortarget is also functional (report by other units)."},{"user":"Pierre MGI","date":"2016-02-05T20:38:00Z","text":"CursorTarget will return a <Null_Object> for all of thus which have a disabled simulation (_object enableSimulation false)."}]},{"name":"customChat","title":"customChat","type":"command","url":"https://community.bistudio.com/wiki/customChat","revid":376773,"updated":"2025-11-17T00:04:58Z","groups":["Radio and Chat","Custom Radio and Chat"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sends the chat message to the custom radio channel. The radio channel needs to be created on the server before hand, with radioChannelCreate command. Use clearRadio to clear chat history\n\n> [!IMPORTANT]\n> The unit must have an assigned radio item (such as ***\"ItemRadio\"***) to see or transmit the messages. A radio item must have the property `simulation = \"ItemRadio\";` in its CfgWeapons config.","syntaxes":[{"syntax":"unit customChat [customChannelID, message]","params":[{"name":"unit","type":"Object","description":"sender","type_expr":"Object"},{"name":"customChannelID","type":"Number","description":"Custom channel ID returned by radioChannelCreate command","type_expr":"Number"},{"name":"message","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[customChannelID, message]"}}],"examples":[{"code":["_unit customChat [1, \"Hi, I am a custom chat message\"];"]},{"code":["driver vehicle player sideChat \"sideChat\";\ndriver vehicle player globalChat \"globalChat\";\ndriver vehicle player groupChat \"groupChat\";\nvehicle player vehicleChat \"vehicleChat\";\ndriver vehicle player commandChat \"commandChat\";\ndriver vehicle player customChat [1, \"customChat\"];\nsystemChat \"systemChat\";"]}],"see_also":["globalChat","groupChat","vehicleChat","commandChat","sideChat","systemChat","radioChannelCreate","customRadio"]},{"name":"customRadio","title":"customRadio","type":"command","url":"https://community.bistudio.com/wiki/customRadio","revid":376763,"updated":"2025-11-16T23:13:01Z","groups":["Radio and Chat","Sounds","Custom Radio and Chat"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sends the message to the custom radio channel. The message is defined in the description.ext file or radio protocol.\n\n> [!IMPORTANT]\n> The unit must have an assigned radio item to the radio inventory slot (such as ***\"ItemRadio\"***) to see or transmit the messages. A radio item must have the property `simulation = \"ItemRadio\";` in its CfgWeapons config.\n\n> [!NOTE]\n> When transmitting unit gets killed, transmission will be interrupted. However when receiving unit gets killed, the transmission continues to play.","syntaxes":[{"syntax":"unit customRadio [customChannelID, message]","params":[{"name":"unit","type":"Object","description":"sender","type_expr":"Object"},{"name":"customChannelID","type":"Number","description":"custom channel ID returned by radioChannelCreate command","type_expr":"Number"},{"name":"message","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[customChannelID, message]"}}],"examples":[{"code":["_soldierOne customRadio [1, \"WordEnemy\"];"]}],"see_also":["radioChannelCreate","customChat","sideRadio","groupRadio","vehicleRadio","globalRadio","directSay"],"notes":[{"user":"Killzone_Kid","date":"2016-12-03T21:35:00Z","text":"To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial), prefix the full filename including file extension with #. For example if there is a custom user sound file called `MySound.ogg`, to play it on the radio use:\n\n```sqf\nplayer customRadio [1, \"#MySound.ogg\"];\n```"}]},{"name":"customWaypointPosition","title":"customWaypointPosition","type":"command","url":"https://community.bistudio.com/wiki/customWaypointPosition","revid":377508,"updated":"2026-01-02T06:50:11Z","groups":["Waypoints"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Returns player's custom waypoint (<kbd>⇧ Shift</kbd> + Left Mouse Button) position.","syntaxes":[{"syntax":"customWaypointPosition","params":[],"returns":{"type":"Position","type_expr":"Position","description":"as [x,y,0], or empty array [] if the waypoint does not exist","text":"Position as [x,y,0], or empty array [] if the waypoint does not exist"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (customWaypointPosition isNotEqualTo []) then\n{\n    hint format [\"You are %1m away from your custom waypoint.\", round (player distance customWaypointPosition)];\n};\n```","code":["if (customWaypointPosition isNotEqualTo []) then\n{\n\thint format [\"You are %1m away from your custom waypoint.\", round (player distance customWaypointPosition)];\n};"]}],"see_also":["allMapMarkers"]},{"name":"cutFadeOut","title":"cutFadeOut","type":"command","url":"https://community.bistudio.com/wiki/cutFadeOut","revid":379329,"updated":"2026-10-30T23:52:02Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.05","arma2":"1.00","arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.05","arma3_since":"0.50","description":"Terminates the effect in the given layer by fading it out according to the given duration. If named layer is used and it doesn't exist, it will be allocated. For title layer see titleFadeOut.\n\n> [!NOTE]\n> **Arma 3:** For greater efficiency and ease of moddability, it is recommended to use named layers.","syntaxes":[{"syntax":"layer cutFadeOut duration","params":[{"name":"layer","type":"Number","type_expr":"Number"},{"name":"duration","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"layer"},"right":{"text":"duration"}},{"syntax":"layerName cutFadeOut duration","since":"arma3 1.58","params":[{"name":"layerName","type":"String","description":"effect layer name. Layer names are CaSe SeNsItIvE","type_expr":"String"},{"name":"duration","type":"Number","description":"fade out time","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"number of the corresponding layer"},"form":"binary","left":{"text":"layerName"},"right":{"text":"duration"}}],"examples":[{"code":["0 cutFadeOut 2;"]},{"code":["private _layer = \"layer1\" cutFadeOut 2;"]}],"see_also":["allCutLayers","cutText","cutRsc","cutObj","allActiveTitleEffects","activeTitleEffectParams"],"notes":[{"user":"Krzmbrzl00","date":"2016-07-09T11:30:00Z","text":"Arma 3 v1.60 The actual fadeOut-duration can be dependent on the duration for the fadeIn (e.g. specified by cutText). If the fadeIn-duration is set to a value less than 1 the fadeOut-duration will be the given number multiplied by the fadeIn-duration.\n\n```sqf\n\"test\" cutText [\"\", \"BLACK\", 0.5, true]; // fadein is < 0\n\"test\" cutFadeOut 2; // The actual fadeout-time is 2 * 0.5 = 1\n```"}]},{"name":"cutObj","title":"cutObj","type":"command","url":"https://community.bistudio.com/wiki/cutObj","revid":348145,"updated":"2023-11-08T11:32:40Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Displays an object defined in the global config in `CfgTitles`.\n\n> [!NOTE]\n> **Arma 3:** For greater efficiency and ease of modability, it is recommended to use named layers with Syntax 3.","syntaxes":[{"syntax":"cutObj [class, type, speed, showInMap, drawOverHUD]","params":[{"name":"class","type":"String","description":"the className of the object defined in `configFile >> \"CfgTitles\" >> class`","type_expr":"String"},{"name":"type","type":"String","description":"one of \"PLAIN\", \"PLAIN DOWN\", \"BLACK\", \"BLACK FADED\", \"BLACK OUT\", \"BLACK IN\", \"WHITE OUT\" and \"WHITE IN\". See Title Effect Types for more information about these values","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"-1","description":"time in seconds to fade in resource","type_expr":"Number","text":"speed: Number - (Optional, default -1) time in seconds to fade in resource"},{"name":"showInMap","type":"Boolean","optional":true,"default":"true","description":"false to hide the text when the map is opened","type_expr":"Boolean","text":"showInMap: Boolean - (Optional, default true) false to hide the text when the map is opened"},{"name":"drawOverHUD","type":"Boolean","optional":true,"default":"true","description":"false to show the object under in-game HUD","type_expr":"Boolean","since":"arma3 2.16","text":"drawOverHUD: Boolean - (Optional, default true) false to show the object under in-game HUD"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[class, type, speed, showInMap, drawOverHUD]"}},{"syntax":"layer cutObj [class, type, speed, showInMap, drawOverHUD]","params":[{"name":"layer","type":"Number","description":"layer number on which the effect is shown, where 0 is the back most. Layer number is rounded to the nearest integer and also cannot be negative. Layer 99.5 will be treated as layer 100","type_expr":"Number"},{"name":"class","type":"String","description":"the className of the object defined in `configFile >> \"CfgTitles\" >> class`","type_expr":"String"},{"name":"type","type":"String","description":"one of \"PLAIN\", \"PLAIN DOWN\", \"BLACK\", \"BLACK FADED\", \"BLACK OUT\", \"BLACK IN\", \"WHITE OUT\" and \"WHITE IN\". See Title Effect Types for more information about these values.","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"-1","description":"time in seconds to fade in resource","type_expr":"Number","text":"speed: Number - (Optional, default -1) time in seconds to fade in resource"},{"name":"showInMap","type":"Boolean","optional":true,"default":"true","description":"false to hide the text when the map is opened","type_expr":"Boolean","text":"showInMap: Boolean - (Optional, default true) false to hide the text when the map is opened"},{"name":"drawOverHUD","type":"Boolean","optional":true,"default":"true","description":"false to show the object under in-game HUD","type_expr":"Boolean","since":"arma3 2.16","text":"drawOverHUD: Boolean - (Optional, default true) false to show the object under in-game HUD"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"layer"},"right":{"text":"[class, type, speed, showInMap, drawOverHUD]"}},{"syntax":"layerName cutObj [class, type, speed, showInMap, drawOverHUD]","since":"arma3 1.58","params":[{"name":"layerName","type":"String","description":"layer name on which the effect is shown. Layer names are CaSe SeNsItIvE","type_expr":"String"},{"name":"class","type":"String","description":"the className of the object defined in `configFile >> \"CfgTitles\" >> class`","type_expr":"String"},{"name":"type","type":"String","description":"one of \"PLAIN\", \"PLAIN DOWN\", \"BLACK\", \"BLACK FADED\", \"BLACK OUT\", \"BLACK IN\", \"WHITE OUT\" and \"WHITE IN\". See Title Effect Types for more information about these values","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"-1","description":"time in seconds to fade in resource","type_expr":"Number","text":"speed: Number - (Optional, default -1) time in seconds to fade in resource"},{"name":"showInMap","type":"Boolean","optional":true,"default":"true","description":"false to hide the text when the map is opened","type_expr":"Boolean","text":"showInMap: Boolean - (Optional, default true) false to hide the text when the map is opened"},{"name":"drawOverHUD","type":"Boolean","optional":true,"default":"true","description":"false to show the object under in-game HUD","type_expr":"Boolean","since":"arma3 2.16","text":"drawOverHUD: Boolean - (Optional, default true) false to show the object under in-game HUD"}],"returns":{"type":"Number","type_expr":"Number","description":"number of the allocated layer"},"form":"binary","left":{"text":"layerName"},"right":{"text":"[class, type, speed, showInMap, drawOverHUD]"}}],"examples":[{"code":["cutObj [\"TVSet\", \"PLAIN\"];\ncutObj [\"TVSet\", \"PLAIN\", 2];"]},{"code":["2 cutObj [\"Sphere\", \"PLAIN\"];"]},{"code":["private _layer = \"layer1\" cutObj [\"BISLogo\", \"PLAIN\"];"]}],"see_also":["allCutLayers","titleObj","cutText","cutRsc","cutFadeOut","allActiveTitleEffects","activeTitleEffectParams"]},{"name":"cutRsc","title":"cutRsc","type":"command","url":"https://community.bistudio.com/wiki/cutRsc","revid":379526,"updated":"2026-10-31T00:50:34Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Display a resource defined in RscTitles of the mission's Description.ext, the campaign's description.ext or the global config.\n\n> [!NOTE]\n> **Arma 3:** For greater efficiency and ease of modability, it is recommended to use named layers available with String and Syntax 2.\n\n> [!IMPORTANT]\n> To avoid conflicts with existing layers it is recommended to register a layer with BIS_fnc_rscLayer and to start the name with a TAG:\n>\n> ```sqf\n> (\"TAG_myLayer\" call BIS_fnc_rscLayer) cutRsc [\"myRsc\", \"PLAIN\"];\n> \"TAG_myLayer\" cutRsc [\"myRsc\", \"PLAIN\"];\n> ```","syntaxes":[{"syntax":"cutRsc [class, effect, speed, showInMap, drawOverHUD]","params":[{"name":"class","type":"String","description":"the class name of the resource. (\"Default\" will remove the current resource.)","type_expr":"String"},{"name":"effect","type":"String","description":"one of \"PLAIN\", \"PLAIN DOWN\", \"BLACK\", \"BLACK FADED\", \"BLACK OUT\", \"BLACK IN\", \"WHITE OUT\" and \"WHITE IN\". See Title Effect Types for more information about these values.","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"-1","description":"time in seconds to fade in resource.","type_expr":"Number","text":"speed: Number - (Optional, default -1) time in seconds to fade in resource."},{"name":"showInMap","type":"Boolean","optional":true,"default":"true","description":"false to hide the text when the map is opened.","type_expr":"Boolean","text":"showInMap: Boolean - (Optional, default true) false to hide the text when the map is opened."},{"name":"drawOverHUD","type":"Boolean","optional":true,"default":"true","description":"false to show the resource under in-game HUD (for example, a binocular effect)","type_expr":"Boolean","since":"arma3 2.16","text":"drawOverHUD: Boolean - (Optional, default true) false to show the resource under in-game HUD (for example, a binocular effect)"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[class, effect, speed, showInMap, drawOverHUD]"}},{"syntax":"layer cutRsc [class, effect, speed, showInMap, drawOverHUD]","params":[{"name":"layer","type":"Number or String","description":"Number or String\n\n- Number - layer number on which the effect is shown, where 0 is the back most. Layer number is rounded to the nearest integer and also cannot be negative. Layer 99.5 will be treated as layer 100\n- String - Arma 3 v1.58 layer name on which the effect is shown. Layer names are **CaSe SeNsItIvE**.","type_expr":"Number | String","text":"layer: Number or String\n\n- Number - layer number on which the effect is shown, where 0 is the back most. Layer number is rounded to the nearest integer and also cannot be negative. Layer 99.5 will be treated as layer 100\n- String - Arma 3 v1.58 layer name on which the effect is shown. Layer names are **CaSe SeNsItIvE**."},{"name":"class","type":"String","description":"the class name of the resource. (\"Default\" will remove the current resource.)","type_expr":"String"},{"name":"effect","type":"String","description":"one of \"PLAIN\", \"PLAIN DOWN\", \"BLACK\", \"BLACK FADED\", \"BLACK OUT\", \"BLACK IN\", \"WHITE OUT\" and \"WHITE IN\". See Title Effect Types for more information about these values.","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"-1","description":"time in seconds to fade in resource.","type_expr":"Number","text":"speed: Number - (Optional, default -1) time in seconds to fade in resource."},{"name":"showInMap","type":"Boolean","optional":true,"default":"true","description":"false to hide the text when the map is opened.","type_expr":"Boolean","text":"showInMap: Boolean - (Optional, default true) false to hide the text when the map is opened."},{"name":"drawOverHUD","type":"Boolean","optional":true,"default":"true","description":"false to show the resource under in-game HUD (for example, a binocular effect)","type_expr":"Boolean","since":"arma3 2.16","text":"drawOverHUD: Boolean - (Optional, default true) false to show the resource under in-game HUD (for example, a binocular effect)"}],"returns":{"type":"Nothing or Number","type_expr":"Nothing | Number","description":"- Nothing - if layer is a Number - Number - if layer is a String: the layer number used for that name","text":"Nothing or Number:\n\n- Nothing - if layer is a Number\n- Number - if layer is a String: the layer number used for that name"},"form":"binary","left":{"text":"layer"},"right":{"text":"[class, effect, speed, showInMap, drawOverHUD]"}}],"examples":[{"code":["cutRsc [\"binocular\", \"PLAIN\"];\ncutRsc [\"binocular\", \"PLAIN\", 2];\ncutRsc [\"binocular\", \"PLAIN\", 2, false];"]},{"code":["2 cutRsc [\"binocular\", \"PLAIN\", 2];"]},{"code":["\"layer1\" cutRsc [\"binocular\", \"PLAIN\", 2];"]},{"code":["// create IGUI display\n// such display can be closed with closeDisplay command or by overwriting the same cut layer with another output.\n// note that \"Unload\" EH for some reason does not work with such display.\n\"someLayer\" cutRsc [\"RscTitleDisplayEmpty\", \"PLAIN\"];\nprivate _display = uiNamespace getVariable \"RscTitleDisplayEmpty\";"]}],"see_also":["allCutLayers","titleRsc","cutText","cutObj","cutFadeOut","setTitleEffect","allActiveTitleEffects","activeTitleEffectParams"],"notes":[{"user":"Dr_Eyeball","date":"2008-06-30T08:44:00Z","text":"Using cutRsc (instead of titleRsc) for a HUD has the benefits of:\n\n- having the HUD automatically hide itself when you access the map and redisplay itself after closing the map.\n- using the 'Direct communication' chat channel messages will not interfere with the HUD by hiding it."},{"user":"Killzone_Kid","date":"2013-10-17T16:30:00Z","text":"Regarding removing current resource with cutRsc [\"Default\", \"PLAIN\"]. If it does't work and it gives you error message that \"Default\" is not found, add it by yourself to RscTitles in description.ext so it looks like this:\n\n```cpp\nclass RscTitles\n{\n    class Default\n    {\n        idd = -1;\n        fadein = 0;\n        fadeout = 0;\n        duration = 0;\n    };\n};\n```\n\nAlternatively, you can use cutText, yes cutText command to cancel your resources. As Karel Moricky explains: \"All 'cut' commands are in the same layer, the same as all 'title' commands are in another one.\" So to remove cutRsc resource execute cutText on the same layer:\n\n```sqf\ncutRsc [\"myRsc\", \"PLAIN\"];    // show\ncutText [\"\", \"PLAIN\"];        // remove\n```\n\n```sqf\n10 cutRsc [\"myRsc\", \"PLAIN\"];    // show\n10 cutText [\"\", \"PLAIN\"];        // remove\n```\n\nAlso if you use layers would be a good idea to register them with BIS_fnc_rscLayer to avoid possible clashes with other layers:\n\n```sqf\n(\"myLayerName\" call BIS_fnc_rscLayer) cutRsc [\"myRsc\", \"PLAIN\"];    // show\n(\"myLayerName\" call BIS_fnc_rscLayer) cutText [\"\", \"PLAIN\"];        // remove\n```\n\nYou can also immediately remove resource with cutFadeOut command:\n\n```sqf\n123 cutFadeOut 0;\n```"},{"user":"Sa-Matra","date":"2023-04-13T08:19:35Z","text":"Layer display time seems to be display's \"duration\" parameter divided by \"speed\" provided into this command, which also acts as effect time. So to make sure your display doesn't close after a bit, have your \"\"duration\"\" at a very high number like `duration = 1e11;`"},{"user":"Rpg12","date":"2025-09-01T21:27:41Z","text":"The note by Killzone_kid is no longer valid due to an arma 3 update, ensure you do this instead:\n\n```sqf\n\"exampleLayer\" cutRsc [\"RCSDefinedLayer\", \"PLAIN\"];\n```\n\nThe RCSDefinedLayer is something you define in either config.cpp or description.ext"}]},{"name":"cutText","title":"cutText","type":"command","url":"https://community.bistudio.com/wiki/cutText","revid":347960,"updated":"2023-11-07T15:58:14Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Displays a text message in the center of the screen. The text can be displayed on multiple lines by using \"\\n\" new line characters: `cutText [\"line1\\nline2\\nline3\", \"PLAIN\"];`\n\n> [!NOTE]\n> **Arma 3:** For greater efficiency and ease of modability it is recommended to use named layers through the alternative syntax.","syntaxes":[{"syntax":"cutText [text, type, speed, showInMap, isStructuredText, drawOverHUD]","params":[{"name":"text","type":"String","description":"text to be displayed","type_expr":"String"},{"name":"type","type":"String","description":"one of \"PLAIN\", \"PLAIN DOWN\", \"BLACK\", \"BLACK FADED\", \"BLACK OUT\", \"BLACK IN\", \"WHITE OUT\" and \"WHITE IN\". See Title Effect Types for more information about these values.","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"1","description":"time in seconds to fade in resource. If 0 or less, default value is used","type_expr":"Number","text":"speed: Number - (Optional, default 1) time in seconds to fade in resource. If 0 or less, default value is used"},{"name":"showInMap","type":"Boolean","optional":true,"default":"true","description":"false to hide the text when the map is opened","type_expr":"Boolean","since":"arma3 0.50","text":"showInMap: Boolean - (Optional, default true) false to hide the text when the map is opened"},{"name":"isStructuredText","type":"Boolean","optional":true,"default":"false","description":"true to switch support for Structured Text formatting - see Example 4","type_expr":"Boolean","since":"arma3 1.74","text":"isStructuredText: Boolean - (Optional, default false) true to switch support for Structured Text formatting - see Example 4"},{"name":"drawOverHUD","type":"Boolean","optional":true,"default":"true","description":"false to show the text under in-game HUD","type_expr":"Boolean","since":"arma3 2.16","text":"drawOverHUD: Boolean - (Optional, default true) false to show the text under in-game HUD"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[text, type, speed, showInMap, isStructuredText, drawOverHUD]"}},{"syntax":"layer cutText [text, type, speed, showInMap, isStructuredText, drawOverHUD]","since":"arma3 1.58","params":[{"name":"layer","type":"Number or String","description":"Number or String\n\n- Number - layer number on which the effect is shown, where 0 is the back most. Layer number is rounded to the nearest integer and also cannot be negative. Layer 99.5 will be treated as layer 100.\n- String - layer name on which the effect is shown. Layer names are CaSe SeNsItIvE.","type_expr":"Number | String","text":"layer: Number or String\n\n- Number - layer number on which the effect is shown, where 0 is the back most. Layer number is rounded to the nearest integer and also cannot be negative. Layer 99.5 will be treated as layer 100.\n- String - layer name on which the effect is shown. Layer names are CaSe SeNsItIvE."},{"name":"text","type":"String","description":"text to be displayed","type_expr":"String"},{"name":"type","type":"String","description":"one of \"PLAIN\", \"PLAIN DOWN\", \"BLACK\", \"BLACK FADED\", \"BLACK OUT\", \"BLACK IN\", \"WHITE OUT\" and \"WHITE IN\". See Title Effect Types for more information about these values.","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"-1","description":"time in seconds to fade in resource. If 0 or less, default value is used","type_expr":"Number","text":"speed: Number - (Optional, default -1) time in seconds to fade in resource. If 0 or less, default value is used"},{"name":"showInMap","type":"Boolean","optional":true,"default":"true","description":"false to hide the text when the map is opened","type_expr":"Boolean","text":"showInMap: Boolean - (Optional, default true) false to hide the text when the map is opened"},{"name":"isStructuredText","type":"Boolean","optional":true,"default":"false","description":"true to switch support for Structured Text formatting - see Example 4","type_expr":"Boolean","since":"arma3 1.74","text":"isStructuredText: Boolean - (Optional, default false) true to switch support for Structured Text formatting - see Example 4"},{"name":"drawOverHUD","type":"Boolean","optional":true,"default":"true","description":"false to show the text under in-game HUD","type_expr":"Boolean","since":"arma3 2.16","text":"drawOverHUD: Boolean - (Optional, default true) false to show the text under in-game HUD"}],"returns":{"type_expr":"Nothing | Number","description":"- Nothing when layer is a Number - Number when layer is a String","text":"- Nothing when *layer* is a Number\n- Number when *layer is a String*"},"form":"binary","left":{"text":"layer"},"right":{"text":"[text, type, speed, showInMap, isStructuredText, drawOverHUD]"}}],"examples":[{"code":["cutText [\"\", \"BLACK OUT\"];\ncutText [\"Hello World!\", \"PLAIN\", 2];"]},{"code":["2 cutText [\"Hello World!\", \"PLAIN\", 2]; // returns nothing"]},{"code":["private _layer1 = \"normal\" cutText [\"In The Centre\", \"PLAIN\"];\nprivate _layer2 = \"down\" cutText [\"At The Bottom\", \"PLAIN DOWN\"];"]},{"code":["cutText [\"<t color='#ff0000' size='5'>RED ALERT!</t><br/>***********\", \"PLAIN\", -1, true, true];"]}],"see_also":["allCutLayers","titleText","cutRsc","cutObj","cutFadeOut","allActiveTitleEffects","activeTitleEffectParams"]},{"name":"damage","title":"damage","type":"command","url":"https://community.bistudio.com/wiki/damage","revid":364153,"updated":"2024-05-05T10:44:17Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":null,"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","locality":{"argument":"global"},"description":"Return the damage value of an object.","syntaxes":[{"syntax":"damage object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"the returned number in range (healthy) 0..1 (dead)."},"form":"unary","right":{"text":"object"}}],"examples":[{"text":"```sqs\n? damage player > 0.1 : player groupChat \"I'm hurt! Medic!\"\n```","code":["? damage player > 0.1 : player groupChat \"I'm hurt! Medic!\""]},{"text":"```sqf\nif (damage player > 0.1) then\n{\n    player groupChat \"I'm hurt! Medic!\";\n};\n```","code":["if (damage player > 0.1) then\n{\n\tplayer groupChat \"I'm hurt! Medic!\";\n};"]},{"code":["private _health = (1 - damage player) * 100; // health in % from 0 to 100"]}],"aliases":["getDammage"],"see_also":["setDamage","setHit","getHit","getHitIndex","setHitIndex","getHitPointDamage","setHitPointDamage","waterDamaged","Arma 3: Event Handlers"],"notes":[{"user":"Pierre MGI","date":"2015-02-13T20:20:00Z","text":"The returned value depends on the couple target/ammo fired. This value has no correlation with the sum of all hitpoints damage status and the effective status of the object.\nFiring bullets on cars often lead to weird results. For example: damage returns zero while a Hunter is fired at will with an .50 HMG! Hunter can be almost destroyed with zero damage for this function.\nIf you script, use instead the getHitPointDamage command."}]},{"name":"date","title":"date","type":"command","url":"https://community.bistudio.com/wiki/date","revid":377601,"updated":"2026-01-02T08:16:59Z","groups":["Environment"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Return the actual in-mission date and time.","syntaxes":[{"syntax":"date","params":[],"returns":{"type":"Date","type_expr":"Date"},"form":"nullary"}],"examples":[{"text":"```sqf\n// in Arma 3\ndate params [\"_year\", \"_month\", \"_day\", \"_hours\", \"_minutes\"];\n\n// pre Arma 3\nprivate [\"_now\", \"_year\", \"_month\", \"_day\", \"_hours\", \"_minutes\"];\n_now = date;    // [2014,10,30,2,30] a.k.a Oct. 30th, 2:30am\n_year        = _now select 0;\n_month        = _now select 1;\n_day        = _now select 2;\n_hours        = _now select 3;\n_minutes    = _now select 4;\n```","code":["// in Arma 3\ndate params [\"_year\", \"_month\", \"_day\", \"_hours\", \"_minutes\"];\n\n// pre Arma 3\nprivate [\"_now\", \"_year\", \"_month\", \"_day\", \"_hours\", \"_minutes\"];\n_now = date;\t// [2014,10,30,2,30] a.k.a Oct. 30th, 2:30am\n_year\t\t= _now select 0;\n_month\t\t= _now select 1;\n_day\t\t= _now select 2;\n_hours\t\t= _now select 3;\n_minutes\t= _now select 4;"]},{"text":"```sqf\nif (date select 3 >= 19) then        // 7pm\n{\n    hintSilent \"ah, Arma sunset\";    // ...cue bad guys\n};\n```","code":["if (date select 3 >= 19) then\t\t// 7pm\n{\n\thintSilent \"ah, Arma sunset\";\t// ...cue bad guys\n};"]}],"multiplayer":"Returns the current **local** (MP client) in-game date.\n\n> [!NOTE]\n> **Arma 3:** Clients' local date is automatically and periodically synchronised with the server date.","see_also":["setDate","dateToNumber","numberToDate","time","missionStart","systemTime","systemTimeUTC"],"notes":[{"user":"Lou Montana","date":"2018-01-23T23:35:00Z","text":"a useful script to format the date:\n\n```sqf\n_curDate = date;\nprivate _ddMMyyyy = format [\"%3/%2/%1\",\n    _curDate select 0,\n    (if (_curDate select 1 < 10) then { \"0\" } else { \"\" }) + str (_curDate select 1),\n    (if (_curDate select 2 < 10) then { \"0\" } else { \"\" }) + str (_curDate select 2)\n];\n```\n\nit can be shortened to: (no intermediary variable but more request to date)\n\n```sqf\nprivate _ddMMyyyy = format [\"%3/%2/%1\",\n    date select 0,\n    (if (date select 1 < 10) then { \"0\" } else { \"\" }) + str (date select 1),\n    (if (date select 2 < 10) then { \"0\" } else { \"\" }) + str (date select 2)\n];\n```\n\n**EDIT:** or to\n\n```sqf\nprivate _ddMMyyyy = format [\"%4%5/%2%3/%1\",\n    date select 0,\n    [\"\", \"0\"] select (date select 1 < 10),\n    date select 1,\n    [\"\", \"0\"] select (date select 2 < 10),\n    date select 2\n];\n```"}]},{"name":"dateToNumber","title":"dateToNumber","type":"command","url":"https://community.bistudio.com/wiki/dateToNumber","revid":378087,"updated":"2026-02-12T17:31:59Z","groups":["Environment"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Convert a date to a float number, based on Jan 1st 00:00:00 = 0 and Dec 31st 23:59:59 = 1.\nThe same day and time in leap year will be different after 28th of February and 23:59 on 31st of December will be 1.00274.\n\nThis is how this command works. The 365 days of the year are presented in range 0..1. So each day will be:\n\n```sqf\n1 / 365 = 0.00273973\n```\n\nIn a leap year there are 366 days, so the range will increase by 1 day:\n\n```sqf\n1 / 365 * 366 = 1.00274\n```\n\nIn short, in a normal year the command returns in range 0...1 in a leap year it will return in range 0...1.00274.","syntaxes":[{"syntax":"dateToNumber date","params":[{"name":"date","type":"Date","type_expr":"Date"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"date"}}],"examples":[{"code":["_float = dateToNumber [2035, 7, 6, 12, 0]; // 0.510959"]},{"code":["dateToNumber date; // returns float number for the current date"]},{"text":"Calculate days from 1/1/1970:\n\n```sqf\n_fnc_daysFromEpoch =\n{\n    private _year = param [0];\n    private _days = 0;\n    for \"_i\" from 1970 to _year - 1 do\n    {\n        _days = _days + round linearConversion [0, 1, dateToNumber [_i, 12, 31, 23, 59], 0, 365, false];\n    };\n\n    _days + linearConversion [0, 1, dateToNumber _this, 0, 365, false];\n};\n\nhint str (date call _fnc_daysFromEpoch);\n```","code":["_fnc_daysFromEpoch =\n{\n\tprivate _year = param [0];\n\tprivate _days = 0;\n\tfor \"_i\" from 1970 to _year - 1 do\n\t{\n\t\t_days = _days + round linearConversion [0, 1, dateToNumber [_i, 12, 31, 23, 59], 0, 365, false];\n\t};\n\n\t_days + linearConversion [0, 1, dateToNumber _this, 0, 365, false];\n};\n\nhint str (date call _fnc_daysFromEpoch);"]}],"see_also":["date","dayTime","time","numberToDate"]},{"name":"dayTime","title":"dayTime","type":"command","url":"https://community.bistudio.com/wiki/dayTime","revid":378415,"updated":"2026-04-04T08:39:14Z","groups":["Environment","Mission Information","Time"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the current in-game time in hours. For a formatted version of time, see BIS_fnc_timeToString.","syntaxes":[{"syntax":"dayTime","params":[],"returns":{"type":"Number in range 0..24","type_expr":"Number","description":"day time using a 24 hour clock, using fractions of hours"},"form":"nullary"}],"examples":[{"code":["dayTime; // returns 16.5 given it is 16:30 (4.30pm) in game"]},{"text":"Get hour, minute, seconds:\n\n```sqf\nprivate _daytime = dayTime; // assuming dayTime returns 1.66046\nprivate _hours = floor _daytime;                                            //  1\nprivate _minutes = floor ((_daytime - _hours) * 60);                        // 39\nprivate _seconds = floor ((((_daytime - _hours) * 60) - _minutes) * 60);    // 37\n```","code":["private _daytime = dayTime; // assuming dayTime returns 1.66046\nprivate _hours = floor _daytime;\t\t\t\t\t\t\t\t\t\t\t//  1\nprivate _minutes = floor ((_daytime - _hours) * 60);\t\t\t\t\t\t// 39\nprivate _seconds = floor ((((_daytime - _hours) * 60) - _minutes) * 60);\t// 37"]}],"multiplayer":"Returns the current **local** in-game time in hours.","see_also":["date","dateToNumber","BIS_fnc_timeToString","time","skipTime","systemTime","systemTimeUTC"]},{"name":"deActivateKey","title":"deActivateKey","type":"command","url":"https://community.bistudio.com/wiki/deActivateKey","revid":318885,"updated":"2022-05-13T09:21:59Z","groups":["Mission Information"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Deactivates the given keyname for the current user profile. The keys are used to unlock missions or campaigns.\n\nSee keys, keysLimit and doneKeys in the description.ext file of the missions.","syntaxes":[{"syntax":"deActivateKey keyname","params":[{"name":"keyname","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"keyname"}}],"examples":[{"code":["deActivateKey \"Mission04Key\";"]}],"see_also":["isKeyActive","activateKey"]},{"name":"debriefingText","title":"debriefingText","type":"command","url":"https://community.bistudio.com/wiki/debriefingText","revid":318861,"updated":"2022-05-13T09:21:57Z","groups":["Briefing"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns debriefing text of provided end.","syntaxes":[{"syntax":"debriefingText end","params":[{"name":"end","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"end debriefing text. If it does not exist in config, empty string is returned.","text":"String - *end* debriefing text. If it does not exist in config, empty string is returned."},"form":"unary","right":{"text":"end"}}],"examples":[{"code":["_deathText = debriefingText \"endDeath\";"]}],"see_also":["setDebriefingText","disableDebriefingStats","enableDebriefingStats"]},{"name":"debugFSM","title":"debugFSM","type":"command","url":"https://community.bistudio.com/wiki/debugFSM","revid":352205,"updated":"2024-02-01T23:26:03Z","groups":["Broken Commands"],"status":"broken","games":{"arma2":"1.05","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.05","arma3_since":"0.50","description":"Dump (something about FSM) to debugging output. This command is (assumed to be) non-functional in the retail version.\n\n> [!WARNING]\n> Non functional in retail","syntaxes":[{"syntax":"FSMhandle debugFSM true","params":[{"name":"FSMhandle","type":"Number","type_expr":"Number"},{"name":"true","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"FSMhandle"},"right":{"text":"true"}}],"examples":[{"text":"-"}],"see_also":["FSM","FSM Editor"]},{"name":"debugLog","title":"debugLog","type":"command","url":"https://community.bistudio.com/wiki/debugLog","revid":352160,"updated":"2024-02-01T23:25:24Z","groups":["Broken Commands"],"status":"broken","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Dump argument type and value to debugging output.\n\n> [!WARNING]\n> This command is non-functional in the retail version. Use diag_log instead.","syntaxes":[{"syntax":"debugLog anything","params":[{"name":"anything","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"anything"}}],"examples":[{"code":["debugLog player;"]}],"see_also":["diag_log"]},{"name":"decayGraphValues","title":"decayGraphValues","type":"command","url":"https://community.bistudio.com/wiki/decayGraphValues","revid":309184,"updated":"2022-05-03T18:08:43Z","groups":["Math"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Multiplies graph values by the given coefficient. The corresponding lower bound value is used instead if the product is smaller than the bound.","syntaxes":[{"syntax":"decayGraphValues [lowerBoundValues, graphValues, coef]","params":[{"name":"lowerBoundValues","type":"Array of Numbers","description":"lower bound for the new graph","type_expr":"Array<Number>"},{"name":"graphValues","type":"Array of Numbers","description":"graph values","type_expr":"Array<Number>"},{"name":"coef","type":"Number","description":"the multiplication coefficient","type_expr":"Number"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"unary","right":{"text":"[lowerBoundValues, graphValues, coef]"}}],"examples":[{"code":["decayGraphValues [[1,2,3,4,5], [1,4,9,16,25], 0.3]; // returns [1,2,3,4.8,7.5]"]}],"see_also":["getGraphValues"]},{"name":"default","title":"default","type":"command","url":"https://community.bistudio.com/wiki/default","revid":369400,"updated":"2024-09-03T18:43:21Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Defines a Switch Type default case - does **not** need a colon to define its block. See switch for more information.","syntaxes":[{"syntax":"default a","params":[{"name":"a","type":"Code","type_expr":"Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"a"}}],"examples":[{"text":"```sqf\nswitch (_condition) do\n{\n    case 1: { hint \"1\" };\n    case 2: { hint \"2\" };\n    default { hint \"default\" }; // no colon after default\n};\n```","code":["switch (_condition) do\n{\n\tcase 1: { hint \"1\" };\n\tcase 2: { hint \"2\" };\n\tdefault { hint \"default\" }; // no colon after default\n};"]}],"see_also":["Control Structures","switch","case"]},{"name":"deg","title":"deg","type":"command","url":"https://community.bistudio.com/wiki/deg","revid":349072,"updated":"2023-11-08T14:47:22Z","groups":["Math - Geometry"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Converts given value in radians to degrees. 1 degree equals 0.01745 radians or pi / 180.\n\n> [!NOTE]\n> `2 * pi ≙ 360° → 1 rad = 2 * pi / 360°`","syntaxes":[{"syntax":"deg value","params":[{"name":"value","type":"Number","description":"radians","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"degrees"},"form":"unary","right":{"text":"value"}}],"examples":[{"code":["_degrees = deg 1; // Returns 57.2958"]},{"code":["deg (2 * pi / 360); // Returns 1"]}],"see_also":["rad"]},{"name":"delete3DENEntities","title":"delete3DENEntities","type":"command","url":"https://community.bistudio.com/wiki/delete3DENEntities","revid":342152,"updated":"2023-07-09T12:26:49Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Delete given entities in Eden Editor.","syntaxes":[{"syntax":"delete3DENEntities entities","params":[{"name":"entities","type":"Array of Eden Entity or Eden ID","type_expr":"Array<Eden Entity | Eden ID>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"entities"}}],"examples":[{"code":["delete3DENEntities (all3DENEntities select 0); // Removes all objects"]}],"see_also":["collect3DENHistory","create3DENComposition","create3DENEntity","all3DENEntities"]},{"name":"deleteAt","title":"deleteAt","type":"command","url":"https://community.bistudio.com/wiki/deleteAt","revid":378389,"updated":"2026-04-04T07:34:56Z","groups":["Arrays","HashMap"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","description":"Removes array element at the given index and returns removed element (modifies the original array, just like resize or set).\n\n> [!NOTE]\n> For the main Array variant, if the index is a negative Number, no error will appear, making it ideal for using with find (see Example 2) or findIf (see Example 3).","syntaxes":[{"syntax":"array deleteAt index","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"index","type":"Number","description":"see the note in description","type_expr":"Number"}],"returns":{"type":"Anything or Nothing","type_expr":"Anything | Nothing","description":"returns the deleted element if one existed"},"form":"binary","left":{"text":"array"},"right":{"text":"index"}},{"syntax":"hashMap deleteAt key","since":"arma3 2.02","params":[{"name":"hashMap","type":"HashMap","type_expr":"HashMap"},{"name":"key","type":"HashMapKey","type_expr":"HashMapKey"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"hashMap"},"right":{"text":"key"}},{"syntax":"array deleteAt indexes","since":"arma3 2.18","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"indexes","type":"Array of Numbers","description":"multiple indexes, negative indexes are supported and would remove elements counting from the end of array (see Example 4).","type_expr":"Array<Number>"}],"returns":{"type":"Array of Anything","type_expr":"Array<Anything>","description":"deleted elements in order of user supplied indexes"},"form":"binary","left":{"text":"array"},"right":{"text":"indexes"}}],"examples":[{"code":["_arr = [1,2,3];\n_rem = _arr deleteAt 1;\nhint str [_rem, _arr]; // [2, [1, 3]]"]},{"code":["_arr = [1,2,3];\n_arr deleteAt (_arr find 0); // non existent item\nhint str _arr; // [1,2,3]\n_arr deleteAt (_arr find 2); // existent item\nhint str _arr; // [1,3]"]},{"code":["_arr = [1,2,3];\n_arr deleteAt (_arr findIf {(_x % 5) == 0}); // Remove first number that's divisible by 5\nhint str _arr; // [1,2,3]\n_arr deleteAt (_arr findIf {(_x % 2) == 0}); // Remove first number that's divisible by 2\nhint str _arr; // [1,3]"]},{"code":["_arr = [1,2,3,4];\n_res = _arr deleteAt [-1, 0]; // Remove the last and the first array element\nsystemchat str [_res, _arr]; // [[4,1],[2,3]]"]}],"see_also":["deleteRange","set","resize","select","in","find","findIf","toArray","toString","forEach","count","pushBack","pushBackUnique","apply","append","sort","param","params","arrayIntersect","splitString","joinString"],"notes":[{"user":"Heeeere's Johnny!","date":"2014-10-15T16:55:00Z","text":"```sqf\n_array deleteAt 0;\n```\n\nis almost 60x faster than\n\n```sqf\n_array = _array - [_array select 0]\n```\n\n(Tested with an array of 10.000 strings, iterating through it using a for-from-to-do loop)"},{"user":"Highhead","date":"2016-03-04T15:58:00Z","text":"Deleting from an array with foreach and _foreachIndex variable is tricky.\nThe array is being altered, the _foreachIndex won't keep up and other elements in the array will be skipped and in worst case not being deleted.\nIf you delete elements from an array in descending order (using while or for) it will work."},{"user":"Igneous01","date":"2017-02-09T22:45:00Z","text":"To expand on Highheads comment above - this is because forEach implements iterators to traverse a collection, which are read only by definition.\nThe variable _x is an iterator that points to the current item in the collection. Trying to alter _x will have no effect.\n\n```sqf\nprivate _array = [1,2,3,4,5,6,7,8];\n{ _x = 2; } forEach _array\n// _array is still [1,2,3,4,5,6,7,8]\n```\n\nWhen trying to use deleteAt inside forEach, the behaviour would be undefined as you are invalidating the iterator reference, and it will not know how to traverse to the next element.\nIn short, only use forEach when reading data from an array.\nFor more info about iterators, see C++ Iterators."},{"user":"Freghar","date":"2021-02-01T18:06:00Z","text":"As you would expect from a simple array implementation,\n\n```sqf\narray deleteAt (count array - 1);\n```\n\nis virtually zero cost (0.0005ms on an array of 1000000 elements), while\n\n```sqf\narray deleteAt 0;\n```\n\nis very performance heavy (0.7ms on the same huge array)."}]},{"name":"deleteCenter","title":"deleteCenter","type":"command","url":"https://community.bistudio.com/wiki/deleteCenter","revid":310241,"updated":"2022-05-05T13:11:01Z","groups":["Sides"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"In a nutshell, this command removes gaming Side (see createCenter). If a side has >0 Groups it cannot be deleted. Center can only be created for: east, west, resistance, civilian and sideLogic, therefore only centers from the mentioned sides can be deleted.\n\n**Old description:** Destroys the AI center of the given side.","syntaxes":[{"syntax":"deleteCenter side","params":[{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"side"}}],"examples":[{"code":["deleteCenter east;"]}],"see_also":["createCenter"]},{"name":"deleteCollection","title":"deleteCollection","type":"command","url":"https://community.bistudio.com/wiki/deleteCollection","revid":379330,"updated":"2026-10-30T23:52:10Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Delete a collection. As example, used with a soldier, it'll hide the ingame model.\n\n*When targetting Arma 2 1.06 or newer, use hideObject instead. This function is a relic from dynamic building destruction development. It is left only for compatibility with scripts created before Arma 2 1.06, and its functionality may be changed or removed in the future.*","syntaxes":[{"syntax":"deleteCollection object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["deleteCollection unitName;"]}],"see_also":["hideObject","hideObjectGlobal","isObjectHidden"],"notes":[{"user":"Killzone_Kid","date":"2014-08-20T21:23:00Z","text":"In Arma 3 deleteCollection is alias for hideObject"}]},{"name":"deleteEditorObject","title":"deleteEditorObject","type":"command","url":"https://community.bistudio.com/wiki/deleteEditorObject","revid":363263,"updated":"2024-03-26T10:51:33Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Delete the editor object. Requires all editor object links to be removed prior.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map deleteEditorObject object","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"object","type":"String","type_expr":"String"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"map"},"right":{"text":"object"}}],"examples":[{"text":"-"}]},{"name":"deleteGroup","title":"deleteGroup","type":"command","url":"https://community.bistudio.com/wiki/deleteGroup","revid":330309,"updated":"2022-08-30T23:40:39Z","groups":["Groups"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Destroys the given group - the group must be empty and local to the machine executing this command.\n\n> [!NOTE]\n> In Arma 3 you can find out locality of the group with local command, unlike with previous games. However owner and setOwner don't work with groups anywhere. The group will always be local to the client that created it, until the client disconnects, then the group becomes local to the server. So if you need to delete a group, delete all members first then execute deleteGroup where is it local.\n\n> [!NOTE]\n> **Arma 3:** In Arma 3 when the last unit leaves a group, the group gets automatically deleted. Manually deleting all units from a group, however, does **not** automatically delete the empty group. To force the group to get auto-deleted when empty, use deleteGroupWhenEmpty.","syntaxes":[{"syntax":"deleteGroup group","params":[{"name":"group","type":"Group","type_expr":"Group"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"group"}}],"examples":[{"code":["deleteGroup _group;"]},{"code":["[_group] remoteExec [\"deleteGroup\", groupOwner _group]; // server only"]}],"see_also":["deleteGroupWhenEmpty","isGroupDeletedWhenEmpty","createGroup","units","group","groupFromNetId"],"notes":[{"user":"ColonelSandersLite","date":"2006-12-17T00:34:00Z","text":"The deleteGroup Command does not work when there are living members of in the group. It doesn't error, it simply doesn't do anything."},{"user":"5133p39","date":"2007-07-10T07:50:00Z","text":"Living or not doesn't matter - you can't delete the group while it contains any units - even dead ones. It takes few seconds until a dead unit is automatically removed from its group."},{"user":"LongEnoughName","date":"2013-09-12T03:54:00Z","text":"deleteGroup will only delete local groups even if called by server.\nSay we have a situation where client creates a group and puts a unit there and later unit dies/gets deleted, server will not be able to delete that empty group until client leaves the game and group ownership switches to server."}]},{"name":"deleteGroupWhenEmpty","title":"deleteGroupWhenEmpty","type":"command","url":"https://community.bistudio.com/wiki/deleteGroupWhenEmpty","revid":353027,"updated":"2024-03-12T11:37:47Z","groups":["Groups"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","locality":{"argument":"local","effect":"global"},"description":"Marks given group for auto-deletion when group is empty.\ntrue will mark the group for auto-deletion once empty, false will simply unmark the group that was marked previously.\n\n> [!IMPORTANT]\n> This command does **not** prevent group deletion (through e.g deleteGroup or any engine group management).","syntaxes":[{"syntax":"group deleteGroupWhenEmpty delete","params":[{"name":"group","type":"Group","type_expr":"Group"},{"name":"delete","type":"Boolean","description":"true to mark for auto-deletion on empty group, false to not use this auto-deletion system","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"delete"}}],"examples":[{"code":["_group deleteGroupWhenEmpty true;"]},{"text":"Executed on the server:\n\n```sqf\nif (local _group) then\n{\n    _group deleteGroupWhenEmpty true;\n}\nelse // group is local to a client\n{\n    [_group, true] remoteExec [\"deleteGroupWhenEmpty\", groupOwner _group];\n};\n```","code":["if (local _group) then\n{\n\t_group deleteGroupWhenEmpty true;\n}\nelse // group is local to a client\n{\n\t[_group, true] remoteExec [\"deleteGroupWhenEmpty\", groupOwner _group];\n};"]}],"see_also":["deleteGroup","isGroupDeletedWhenEmpty","createGroup","group","setGroupId","groupID","units","groupFromNetId","netId","leader","selectLeader","join","createCenter","createUnit","createVehicle","Side"],"notes":[{"user":"PierreMGI","date":"2023-12-01T05:04:28Z","text":"The auto-deletion of a group is not automatic. For example, if you place a group in editor, name it (grp1), and kill the units in preview, this group remains not null and is counted as group (checked by count allGroups).\nOn the other hand, if you write: `this deleteGroupWhenEmpty true` in composition init (group init), this group will become null sometimes after the units are killed. It takes a little time for dead units to exit the group, then an extra time for the group to be deleted once all units dead. (count allGroups decreases).\nOf course, in both cases, grp1 remains a variable (\"grp1\" is not nil)."}]},{"name":"deleteIdentity","title":"deleteIdentity","type":"command","url":"https://community.bistudio.com/wiki/deleteIdentity","revid":348911,"updated":"2023-11-08T14:40:02Z","groups":["Unit Identity"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"effect":"local"},"description":"Deletes an identity created with saveIdentity from the campaign's progress file.","syntaxes":[{"syntax":"deleteIdentity identityName","params":[{"name":"identityName","type":"String","description":"name of the saved identity","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the identity was deleted successfully, false if not"},"form":"unary","right":{"text":"identityName"}}],"examples":[{"code":["_deleted = deleteIdentity \"playerIdentity\";"]}],"see_also":["saveIdentity"]},{"name":"deleteLocation","title":"deleteLocation","type":"command","url":"https://community.bistudio.com/wiki/deleteLocation","revid":309921,"updated":"2022-05-05T12:16:57Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Deletes scripted location.","syntaxes":[{"syntax":"deleteLocation location","params":[{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"location"}}],"examples":[{"code":["deleteLocation myLocation;"]}],"see_also":["location","text"]},{"name":"deleteMarker","title":"deleteMarker","type":"command","url":"https://community.bistudio.com/wiki/deleteMarker","revid":338571,"updated":"2023-03-20T14:56:08Z","groups":["Markers"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Destroys the given marker.","syntaxes":[{"syntax":"deleteMarker name","params":[{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"name"}}],"examples":[{"code":["deleteMarker \"Marker1\";"]}],"see_also":["createMarker","deleteMarkerLocal"]},{"name":"deleteMarkerLocal","title":"deleteMarkerLocal","type":"command","url":"https://community.bistudio.com/wiki/deleteMarkerLocal","revid":338570,"updated":"2023-03-20T14:55:35Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.04","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.04","arma3_since":"0.50","locality":{"effect":"local"},"description":"Destroys the given marker.","syntaxes":[{"syntax":"deleteMarkerLocal markerName","params":[{"name":"markerName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"markerName"}}],"examples":[{"code":["deleteMarkerLocal \"Marker1\";"]}],"see_also":["createMarkerLocal","deleteMarker"],"notes":[{"user":"HomerJohnston","date":"2012-01-07T09:16:00Z","text":"Unproven: I believe that if you use this command on a globally-created marker, and subsequently another machine executes a global command on the same marker (e.g. setMarkerPos), then the marker will be re-created on the machine it was previously deleted on. Can result in confusing marker behaviour."}]},{"name":"deleteRange","title":"deleteRange","type":"command","url":"https://community.bistudio.com/wiki/deleteRange","revid":377170,"updated":"2026-01-01T10:45:25Z","groups":["Arrays"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","description":"Removes a range of array elements from the given array. Modifies the original array, just like resize or set.","syntaxes":[{"syntax":"array deleteRange [from, count]","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"from","type":"Number","description":"array index to start selection from.","type_expr":"Number"},{"name":"count","type":"Number","description":"number of array elements to remove. If the selected range exceeds source array boundaries, selection will be made up to the end of the array.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"array"},"right":{"text":"[from, count]"}}],"examples":[{"code":["_arr = [1,2,3,4,5,6];\n_arr deleteRange [1,4];\nhint str _arr; // [1,6]"]}],"see_also":["deleteAt","set","resize","select","in","find","toArray","toString","forEach","count","pushBack","pushBackUnique","apply","append","sort","param","params","arrayIntersect","splitString","joinString"]},{"name":"deleteResources","title":"deleteResources","type":"command","url":"https://community.bistudio.com/wiki/deleteResources","revid":321170,"updated":"2022-05-13T15:14:30Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Delete (unregister) resources of the team member. Resources are deleted in the order they were added. Case insensitive.","syntaxes":[{"syntax":"teamMember deleteResources resources","params":[{"name":"teamMember","type":"Team Member","type_expr":"Team Member"},{"name":"resources","type":"Array of Strings","type_expr":"Array<String>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"teamMember"},"right":{"text":"resources"}}],"examples":[{"code":["teamMember _agent deleteResources [\"Legs\"];"]}],"see_also":["resources","addResources"]},{"name":"deleteSite","title":"deleteSite","type":"command","url":"https://community.bistudio.com/wiki/deleteSite","revid":364517,"updated":"2024-05-16T20:46:22Z","groups":["Broken Commands"],"status":"broken","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Removes the site.\n\n> [!WARNING]\n> This command is considered deprecated and is no longer supported","syntaxes":[{"syntax":"deleteSite site","params":[{"name":"site","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"site"}}],"examples":[{"text":"-"}],"see_also":["createSite","allSites"]},{"name":"deleteStatus","title":"deleteStatus","type":"command","url":"https://community.bistudio.com/wiki/deleteStatus","revid":348884,"updated":"2023-11-08T14:39:49Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"effect":"global"},"description":"Deletes a status created with saveStatus from the campaign's progress file.","syntaxes":[{"syntax":"deleteStatus statusName","params":[{"name":"statusName","type":"String","description":"name of the saved status","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the status was deleted successfully, false if not"},"form":"unary","right":{"text":"statusName"}}],"examples":[{"code":["_deleted = deleteStatus \"playerStatus\";"]}],"see_also":["saveStatus","deleteIdentity","saveIdentity"]},{"name":"deleteTarget","title":"deleteTarget","type":"command","url":"https://community.bistudio.com/wiki/deleteTarget","revid":352111,"updated":"2024-02-01T23:24:58Z","groups":["Broken Commands"],"status":"broken","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Delete a target.","syntaxes":[{"syntax":"deleteTarget target","params":[{"name":"target","type":"Target","type_expr":"Target"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"target"}}],"examples":[{"code":["deleteTarget target1;"]}],"problems":"> [!WARNING]\n> This command is not implemented.","see_also":["createTarget","moveTarget"]},{"name":"deleteTeam","title":"deleteTeam","type":"command","url":"https://community.bistudio.com/wiki/deleteTeam","revid":309920,"updated":"2022-05-05T12:16:57Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Destroy given team.","syntaxes":[{"syntax":"deleteTeam team","params":[{"name":"team","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"team"}}],"examples":[{"code":["deleteTeam _team;"]}],"see_also":["addTeamMember","createTeam","forEachMemberTeam","removeTeamMember","teamMember","teamName","teams","teamType","forEachMember","forEachMemberAgent"]},{"name":"deleteVehicle","title":"deleteVehicle","type":"command","url":"https://community.bistudio.com/wiki/deleteVehicle","revid":352346,"updated":"2024-02-08T14:01:50Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.34","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.34","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Deletes an object. Only objects inserted in the mission editor and objects created during the game's progress can be deleted by this command. Terrain objects and players cannot be deleted.\n\n> [!NOTE]\n> The actual object deletion, when the object becomes objNull, happens on the next frame after command execution, but there are some object modifications that happen immediately. For example if the object is a unit in a group, it immediately becomes groupless (`isNull group _unit; // true`).","syntaxes":[{"syntax":"deleteVehicle object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"object"}},{"syntax":"deleteVehicle objects","since":"arma3 2.18","params":[{"name":"objects","type":"Array of Objects","type_expr":"Array<Object>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"objects"}}],"examples":[{"code":["deleteVehicle _house1;"]},{"text":"Deleting a vehicle with crew:\n\n```sqf\n// might want to make sure that the car is local\n{ car deleteVehicleCrew _x } forEach crew car;\ndeleteVehicle car;\n```","code":["// might want to make sure that the car is local\n{ car deleteVehicleCrew _x } forEach crew car;\ndeleteVehicle car;"]}],"problems":"> [!WARNING]\n> Use deleteVehicleCrew to delete units that are in a vehicle! Do **not** use this command for a vehicle's crew members as it may lead to all sorts of bugs and ghost objects left on the map.","see_also":["deleteVehicleCrew","createUnit","createVehicleLocal","createVehicle","Arma 3: Event Handlers"]},{"name":"deleteVehicleCrew","title":"deleteVehicleCrew","type":"command","url":"https://community.bistudio.com/wiki/deleteVehicleCrew","revid":347420,"updated":"2023-09-18T16:02:36Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global","effect":"global"},"description":"Deletes a member of or the whole crew of a vehicle. Human players cannot be deleted.\n\n> [!NOTE]\n> This command attempts to move the given crew member out before deleting it. Made especially for deleting dead crew members, as using conventional deleteVehicle leads to all sorts of bugs and ghost objects. While the argument is global, you should take extra steps and execute this where vehicle is local as moving units out of the vehicle happens where vehicle is local and you want this to always precede deletion.","syntaxes":[{"syntax":"vehicle deleteVehicleCrew unit","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"unit"}},{"syntax":"deleteVehicleCrew vehicle","since":"arma3 2.06","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"text":"```sqf\n// delete when knowing the vehicle\n_helicopter deleteVehicleCrew driver _helicopter;\n\n// delete when only knowing the unit\n// vehicle _soldier deleteVehicleCrew _soldier;        // may return the unit itself when used on dead crew\nobjectParent _soldier deleteVehicleCrew _soldier;    // faster and always returns the vehicle\n```","code":["// delete when knowing the vehicle\n_helicopter deleteVehicleCrew driver _helicopter;\n\n// delete when only knowing the unit\n// vehicle _soldier deleteVehicleCrew _soldier;\t\t// may return the unit itself when used on dead crew\nobjectParent _soldier deleteVehicleCrew _soldier;\t// faster and always returns the vehicle"]},{"text":"Delete entire crew:\n\n```sqf\ndeleteVehicleCrew _tank; // since v2.06\n\n{ _helicopter deleteVehicleCrew _x } forEach crew _helicopter; // before v2.06\n```","code":["deleteVehicleCrew _tank; // since v2.06\n\n{ _helicopter deleteVehicleCrew _x } forEach crew _helicopter; // before v2.06"]}],"see_also":["createVehicleCrew","moveInDriver","moveInGunner","moveInCommander","moveInTurret","moveInCargo","Arma 3: Event Handlers"],"notes":[{"user":"Killzone_Kid","date":"2014-08-31T10:15:00Z","text":"If you delete the AI pilot with `deleteVehicle driver heli` the co-pilot will jump out.\nIf you delete the AI pilot with `heli deleteVehicleCrew driver heli` the co-pilot will stay."}]},{"name":"deleteWaypoint","title":"deleteWaypoint","type":"command","url":"https://community.bistudio.com/wiki/deleteWaypoint","revid":339202,"updated":"2023-04-27T17:09:15Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes the specified waypoint.\n\n> [!NOTE]\n> - When a waypoint is deleted, all other group waypoints are immediately re-indexed. See Example 2 for a deletion of all group's waypoints.\n> - Deleting a group's current waypoint will *not* stop the group on its tracks.","syntaxes":[{"syntax":"deleteWaypoint [group, index]","params":[{"name":"group","type":"Group","type_expr":"Group"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[group, index]"}}],"examples":[{"code":["deleteWaypoint [_grp, 2];"]},{"text":"Because waypoints get immediately re-indexed when one gets deleted, delete them from last to first:\n\n```sqf\nprivate _group = group _unit;\nfor \"_i\" from (count waypoints _group - 1) to 0 step -1 do\n{\n    deleteWaypoint [_group, _i];\n};\n```\n\nor always delete the first one (if you want to delete them all)\n\n```sqf\nprivate _group = group _unit;\nfor \"_i\" from 0 to (count waypoints _group - 1) do\n{\n    deleteWaypoint [_group, 0];\n};\n```\n\nor use forEachReversed:\n\n```sqf\n{ deleteWaypoint _x } forEachReversed waypoints _group; // Arma 3 v2.14+ only\n```","code":["private _group = group _unit;\nfor \"_i\" from (count waypoints _group - 1) to 0 step -1 do\n{\n\tdeleteWaypoint [_group, _i];\n};","private _group = group _unit;\nfor \"_i\" from 0 to (count waypoints _group - 1) do\n{\n\tdeleteWaypoint [_group, 0];\n};","{ deleteWaypoint _x } forEachReversed waypoints _group; // Arma 3 v2.14+ only"]}],"see_also":["waypoints","setCurrentWaypoint","setWaypointPosition","setWaypointScript","setWaypointStatements","setWaypointType","addWaypoint"],"notes":[{"user":"Saintolaf","date":"2008-01-01T07:48:00Z","text":"In order to change the behavior of a unit currently following some waypoints, it is not enough to use deleteWaypoint.\nTo achieve the wanted effect, you should rather use setWPPos to the unit's current position (thereby stopping the unit), and (after a small delay) use deleteWaypoint to remove the next waypoints."},{"user":"VictorFarbau","date":"2008-11-15T13:37:00Z","text":"Another (more foolproof) method to avoid the problem of non-deleteable waypoints is to introduce another group (createGroup) and join all units of the present group. A new group will start without any preset waypoints so you can start setting new WPs all over again.\nOld group is \"_combatGroup\", new group is \"_combatGroup2\"\n\n```sqf\n_combatGroup2 = createGroup east;\n{ [_x] joinSilent _combatGroup2 } forEach (units _combatGroup);\n_combatGroup2 addWaypoint [getPos player, 25];\n```"},{"user":"Mr H.","date":"2019-11-17T16:52:00Z","text":"To have the unit stop on the spot you need to set its current waypoint where it is and add a little delay, as stated above by Saintolaf so:\n\n```sqf\ngroup _unit spawn\n{\n    [_this, currentWaypoint _this] setWaypointPosition [getPosASL ((units _this) select 0), -1];\n    sleep 0.1;\n    for \"_i\" from count waypoints _this - 1 to 0 step -1 do\n    {\n        deleteWaypoint [_this, _i];\n    };\n};\n```\n\nWill stop the group where it is and delete its waypoints."}]},{"name":"detach","title":"detach","type":"command","url":"https://community.bistudio.com/wiki/detach","revid":369227,"updated":"2024-09-03T10:34:55Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Detaches previously attached with attachTo object.","syntaxes":[{"syntax":"detach object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["obj1 attachTo [player];\ndetach obj1;"]}],"multiplayer":"Only has to be executed on one client.","see_also":["attachedObjects","attachedTo","attachTo"]},{"name":"detachChild","title":"detachChild","type":"command","url":"https://community.bistudio.com/wiki/detachChild","revid":378900,"updated":"2026-08-11T14:56:33Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"local","effect":"global"},"description":"Detaches previously attached with attachChild object.","syntaxes":[{"syntax":"detachChild parent","params":[{"name":"parent","type":"Object","description":"The parent object that another object is attached to. Must be a Transport vehicle like Car/Tank (Maybe helicopter/airplane works?).","type_expr":"Object"}],"returns":{"type":"Nothing or Object","type_expr":"Nothing | Object"},"form":"unary","right":{"text":"parent"}}],"examples":[{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"}],"see_also":["attachChild","childAttached","parentAttached","chainedObjects"]},{"name":"detectedMines","title":"detectedMines","type":"command","url":"https://community.bistudio.com/wiki/detectedMines","revid":377169,"updated":"2026-01-01T10:45:10Z","groups":["Mines"],"status":"ok","games":{"arma3":"1.24"},"since":"arma3 1.24","arma3_since":"1.24","description":"Returns an array of all mines detected by a given side","syntaxes":[{"syntax":"detectedMines side","params":[{"name":"side","type":"side","type_expr":"Side"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"side"}}],"examples":[{"code":["detectedMines west;"]},{"code":["detectedMines side player;"]}],"see_also":["allMines","mineDetectedBy","createMine","mineActive","revealMine"]},{"name":"diag_activeMissionFSMs","title":"diag activeMissionFSMs","type":"command","url":"https://community.bistudio.com/wiki/diag_activeMissionFSMs","revid":349639,"updated":"2023-11-16T21:59:22Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.44"},"since":"arma3 1.44","arma3_since":"1.44","description":"Returns array with active Mission FSMs. To see number of all scripts currently in the scheduler use diag_activeScripts.","syntaxes":[{"syntax":"diag_activeMissionFSMs","params":[],"returns":{"type":"Array","type_expr":"Array","description":"format [[name, state, timeout],...]:\n- name: String - state: - timeout:","text":"Array - format [[name, state, timeout],...]:\n\n- name: String\n- state:\n- timeout:"},"form":"nullary"}],"examples":[{"code":["{ systemChat str _x } forEach diag_activeMissionFSMs;"]}],"see_also":["diag_activeSQSScripts","diag_activeSQFScripts","diag_log","diag_fps","diag fpsmin","diag frameno","diag_tickTime","diag_activeScripts"]},{"name":"diag_activeScripts","title":"diag activeScripts","type":"command","url":"https://community.bistudio.com/wiki/diag_activeScripts","revid":379080,"updated":"2026-09-27T07:38:25Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","description":"Returns 4 element array with numbers of currently running scripts","syntaxes":[{"syntax":"diag_activeScripts","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [spawn, execVM, exec, execFSM]\n- spawn: Number - The number of scripts running with spawn - execVM: Number - The number of scripts running with execVM - exec: Number - The number of scripts running with exec - execFSM: Number - The number of scripts running with execFSM","text":"Array with [spawn, execVM, exec, execFSM]\n\n- spawn: Number - The number of scripts running with spawn\n- execVM: Number - The number of scripts running with execVM\n- exec: Number - The number of scripts running with exec\n- execFSM: Number - The number of scripts running with execFSM"},"form":"nullary"}],"examples":[{"code":["hint str diag_activeScripts; //[0,0,0,1]"]}],"see_also":["diag_log","diag_fps","diag fpsmin","diag frameno","diag_tickTime","diag_activeSQFScripts","diag_activeSQSScripts","diag_activeMissionFSMs"]},{"name":"diag_activeSQFScripts","title":"diag activeSQFScripts","type":"command","url":"https://community.bistudio.com/wiki/diag_activeSQFScripts","revid":363594,"updated":"2024-04-07T18:45:53Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.44"},"since":"arma3 1.44","arma3_since":"1.44","description":"Returns information about active SQF scripts. To see number of all scripts currently in the scheduler use diag_activeScripts.","syntaxes":[{"syntax":"diag_activeSQFScripts","params":[],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"to format [[scriptName, fileName, isRunning, currentLine], ...]:\n- scriptName: String - Returns: - Script name set with scriptName - File name if script name is empty - <spawn> + first 100 characters if script name and file name are both empty - filePath: String - path of the parent script - isRunning: Boolean - currentLine: Number - line currently executing","text":"Array of Arrays - to format [[scriptName, fileName, isRunning, currentLine], ...]:\n\n- scriptName: String - Returns:\n  - Script name set with scriptName\n  - File name if script name is empty\n  - <spawn> + first 100 characters if script name and file name are both empty\n- filePath: String - path of the parent script\n- isRunning: Boolean\n- currentLine: Number - line currently executing"},"form":"nullary"}],"examples":[{"code":["0 spawn { hint str diag_activeSQFScripts; }; // displays [[\"<spawn> hint str diag_activeSQFScripts;\", \"\", true, 1]]"]},{"text":"```sqf\n0 spawn {\n    hint str diag_activeSQFScripts; // displays [[\"<spawn> hint str diag_activeSQFScripts;\", \"\", true, 2]]\n};\n```","code":["0 spawn {\n\thint str diag_activeSQFScripts; // displays [[\"<spawn> hint str diag_activeSQFScripts;\", \"\", true, 2]]\n};"]},{"text":"```sqf\n0 spawn {\n    scriptName \"aScript\";\n    hint str diag_activeSQFScripts; // displays [[\"aScript\", \"\", true, 3]]\n};\n```","code":["0 spawn {\n\tscriptName \"aScript\";\n\thint str diag_activeSQFScripts; // displays [[\"aScript\", \"\", true, 3]]\n};"]}],"see_also":["diag_log","diag_fps","diag fpsmin","diag_frameNo","diag_tickTime","diag_activeSQSScripts","diag_activeMissionFSMs","diag_activeScripts","execVM","spawn"]},{"name":"diag_activeSQSScripts","title":"diag activeSQSScripts","type":"command","url":"https://community.bistudio.com/wiki/diag_activeSQSScripts","revid":377696,"updated":"2026-01-02T09:03:19Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.44"},"since":"arma3 1.44","arma3_since":"1.44","description":"Returns array with active SQSs. To see number of all scripts currently in the scheduler use diag_activeScripts.","syntaxes":[{"syntax":"diag_activeSQSScripts","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [[name, fileName, isRunning, currentLine],...]\n- name: String - function or file name - fileName: String - isRunning: Boolean - currentLine: Number - line currently executing","text":"Array with [[name, fileName, isRunning, currentLine],...]\n\n- name: String - function or file name\n- fileName: String\n- isRunning: Boolean\n- currentLine: Number - line currently executing"},"form":"nullary"}],"examples":[{"code":["{ systemChat str _x } forEach diag_activeSQSScripts;"]}],"see_also":["diag_activeMissionFSMs","diag_activeSQFScripts","diag_log","diag_fps","diag fpsmin","diag frameno","diag_tickTime","diag_activeScripts"]},{"name":"diag_allMissionEventHandlers","title":"diag allMissionEventHandlers","type":"command","url":"https://community.bistudio.com/wiki/diag_allMissionEventHandlers","revid":363556,"updated":"2024-04-06T08:27:26Z","groups":["Diagnostic","Event Handlers"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","locality":{"effect":"local"},"description":"Returns an array with all mission event handlers.","syntaxes":[{"syntax":"diag_allMissionEventHandlers","params":[],"returns":{"type":"Array","type_expr":"Array","description":"in format [\"EH1name\", EH1count, \"EH2name\", EH2count, ...]"},"form":"nullary"}],"examples":[{"text":"```sqf\ndiag_allMissionEventHandlers;\n/*\nreturns:\n[\n    \"Ended\",0,\n    \"SelectedActionPerformed\",0,\n    \"SelectedRotorLibActionPerformed\",0,\n    \"SelectedActionChanged\",0,\n    \"SelectedRotorLibActionChanged\",0,\n    \"ControlsShifted\",0,\n    \"Draw3D\",1,\n    \"Loaded\",0,\n    \"HandleDisconnect\",0,\n    \"EntityRespawned\",0,\n    \"EntityKilled\",0,\n    \"MapSingleClick\",0,\n    \"HCGroupSelectionChanged\",0,\n    \"CommandModeChanged\",0,\n    \"PlayerConnected\",0,\n    \"PlayerDisconnected\",0,\n    \"TeamSwitch\",0,\n    \"GroupIconClick\",0,\n    \"GroupIconOverEnter\",0,\n    \"GroupIconOverLeave\",0,\n    \"EachFrame\",0,\n    \"PreloadStarted\",0,\n    \"PreloadFinished\",0,\n    \"Map\",0,\n    \"PlayerViewChanged\",0,\n    \"BuildingChanged\",0,\n    \"MPEnded\",0,\n    \"HandleAccTime\",0,\n    \"ExtensionCallback\",0\n]\n*/\n```","code":["diag_allMissionEventHandlers;\n/*\nreturns:\n[\n\t\"Ended\",0,\n\t\"SelectedActionPerformed\",0,\n\t\"SelectedRotorLibActionPerformed\",0,\n\t\"SelectedActionChanged\",0,\n\t\"SelectedRotorLibActionChanged\",0,\n\t\"ControlsShifted\",0,\n\t\"Draw3D\",1,\n\t\"Loaded\",0,\n\t\"HandleDisconnect\",0,\n\t\"EntityRespawned\",0,\n\t\"EntityKilled\",0,\n\t\"MapSingleClick\",0,\n\t\"HCGroupSelectionChanged\",0,\n\t\"CommandModeChanged\",0,\n\t\"PlayerConnected\",0,\n\t\"PlayerDisconnected\",0,\n\t\"TeamSwitch\",0,\n\t\"GroupIconClick\",0,\n\t\"GroupIconOverEnter\",0,\n\t\"GroupIconOverLeave\",0,\n\t\"EachFrame\",0,\n\t\"PreloadStarted\",0,\n\t\"PreloadFinished\",0,\n\t\"Map\",0,\n\t\"PlayerViewChanged\",0,\n\t\"BuildingChanged\",0,\n\t\"MPEnded\",0,\n\t\"HandleAccTime\",0,\n\t\"ExtensionCallback\",0\n]\n*/"]}],"see_also":["addMissionEventHandler","Arma 3: Mission Event Handlers"]},{"name":"diag_captureFrame","title":"diag captureFrame","type":"command","url":"https://community.bistudio.com/wiki/diag_captureFrame","revid":379089,"updated":"2026-09-27T09:45:01Z","groups":["Diagnostic","Performance Profiling"],"status":"ok","games":{"arma2oa":"1.63","arma3":"1.00"},"since":"arma2oa 1.63","arma3_since":"1.00","branch":["diag","prof"],"description":"This command starts counting frames from the moment it is executed and when the count reaches the number passed as param, the current frame is captured and captured data UI dialog appears, similar to diag_captureSlowFrame. This can also be executed on a dedicated Server and because a Server has no UI it will behave like diag_captureFrameToFile.\n\n> [!IMPORTANT]\n> BattlEye's RCON variant of this command is **#captureFrame**","syntaxes":[{"syntax":"diag_captureFrame frame","params":[{"name":"frame","type":"Number","description":"next n-th frame to be captured","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"frame"}}],"examples":[{"code":["diag_captureFrame 1; // capture the first frame after command execution"]},{"code":["diag_captureFrame 24; // capture 24th frame after command execution"]}],"see_also":["Arma 3: Diagnostics Exe","Performance Profiling","Arma 3: Cheats","Multiplayer Server Commands","diag_captureFrameToFile","diag_captureSlowFrame","diag logSlowFrame","logEntities","exportJIPMessages"]},{"name":"diag_captureFrameToFile","title":"diag captureFrameToFile","type":"command","url":"https://community.bistudio.com/wiki/diag_captureFrameToFile","revid":318853,"updated":"2022-05-13T09:21:56Z","groups":["Diagnostic","Performance Profiling"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","branch":["diag","prof"],"description":"This command starts counting frames from the moment it is executed and when the count reaches the number passed as param, the current frame is captured and\nwritten to a log file in the same directory as the .rpt file.\nThe full Path to the log file is logged to simultaneously.\nThe data in the log file can be copied and pasted into the diag_captureFrame UI dialog to get a visualisation later on.","syntaxes":[{"syntax":"diag_captureFrameToFile frame","params":[{"name":"frame","type":"Number","description":"next n-th frame to be captured","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"frame"}}],"examples":[{"code":["diag_captureFrameToFile 1; //capture the first frame after command execution"]},{"code":["diag_captureFrameToFile 24; //capture 24th frame after command execution"]}],"see_also":["Performance Profiling","diag_captureSlowFrame","diag logSlowFrame","diag_captureFrame","logEntities","exportJIPMessages"]},{"name":"diag_captureSlowFrame","title":"diag captureSlowFrame","type":"command","url":"https://community.bistudio.com/wiki/diag_captureSlowFrame","revid":370412,"updated":"2024-12-05T18:30:13Z","groups":["Diagnostic","Performance Profiling"],"status":"ok","games":{"arma2oa":"1.63","tkoh":"1.00","arma3":"1.00"},"since":"arma2oa 1.63","arma3_since":"1.00","branch":["diag","prof"],"description":"Opens \"capture frame\" dialog if current frame exceeds set threshold in seconds. One can indicate to either capture duration of a specific profiling selection or the total duration of the frame.\nThe selection names can be obtained by expanding the profiling tree. Clicking on a tree item will highlight the item on the graph and vice versa.\nThe GUI also provides method of copying of the displayed data to clipboard.\n\n> [!NOTE]\n> **Chrome export format**:\n>\n> Capturing to file also creates a .trace file, which can be imported into chrome://tracing (in chromium based webbrowsers), or https://ui.perfetto.dev/\n>\n> The same format can be exported by pressing the \"COPY ALL\" button, in the capture frame UI, with <kbd>Ctrl</kbd> key being held down.","syntaxes":[{"syntax":"diag_captureSlowFrame [section, threshold, frameSkip, toFile, continuousCounter]","params":[{"name":"section","type":"String","description":"**case-sensitive**; some of the selections:\n\n| Render | Main Thread | Visualize | Mjob |\n|---|---|---|---|\n| - bgD3D | - total<br>- sLoop (for dedicated server)<br>- cLoop (for headless client)<br>- memAl | - visul | - Mjob |","type_expr":"String"},{"name":"threshold","type":"Number or Arma 3 v2.20 String","description":"Number or Arma 3 v2.20 String\n\n- Number: section duration in seconds. 0 captures always **IF** the section you gave as section filter appears inside the given frame. \"total\" always appears, while \"callExt\" might not always appear for example.\n- String: number with unit (s / ms / us / ns / fps, e.g \"30fps\" - see [SI prefixes](https://en.wikipedia.org/wiki/Second#SI_multiples) for more unit information)\n\n  > [!IMPORTANT]\n  > The capture happens \"when the section/scope duration is larger/longer than this\", except with \"fps\" where it is \"when smaller/lower\".","type_expr":"Number | String","text":"threshold: Number or Arma 3 v2.20 String\n\n- Number: section duration in seconds. 0 captures always **IF** the section you gave as section filter appears inside the given frame. \"total\" always appears, while \"callExt\" might not always appear for example.\n- String: number with unit (s / ms / us / ns / fps, e.g \"30fps\" - see [SI prefixes](https://en.wikipedia.org/wiki/Second#SI_multiples) for more unit information)\n\n  > [!IMPORTANT]\n  > The capture happens \"when the section/scope duration is larger/longer than this\", except with \"fps\" where it is \"when smaller/lower\"."},{"name":"frameSkip","type":"Number","optional":true,"default":"0","description":"number of frames to ignore before measuring","type_expr":"Number","since":"arma3 1.18","text":"frameSkip: Number - (Optional, default 0) number of frames to ignore before measuring"},{"name":"toFile","type":"Boolean","optional":true,"default":"false","description":"if true, doesn't open UI and writes straight to file. If logging to file, it automatically also outputs a .trace file. Note: even if false it might still force to file if it doesn't have a UI, like a server or HC","type_expr":"Boolean","since":"arma3 2.20","text":"toFile: Boolean - (Optional, default false) if true, doesn't open UI and writes straight to file. If logging to file, it automatically also outputs a .trace file. Note: even if false it might still force to file if it doesn't have a UI, like a server or HC"},{"name":"continuousCounter","type":"Number","optional":true,"default":"0","description":"captures N slow frames. 0 or 1 will only capture one frame - do **not** set it to negative! Can be aborted by running diag_captureFrame or another diag_captureSlowFrame usage","type_expr":"Number","since":"arma3 2.20","text":"continuousCounter: Number - (Optional, default 0) captures N slow frames. 0 or 1 will only capture one frame - do **not** set it to negative! Can be aborted by running diag_captureFrame or another diag_captureSlowFrame usage"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[section, threshold, frameSkip, toFile, continuousCounter]"}}],"examples":[{"code":["diag_captureSlowFrame [\"total\", 0.003];"]},{"code":["diag_captureSlowFrame [\"total\", \"0.003s\"];"]},{"code":["diag_captureSlowFrame [\"total\", \"3ms\"];"]},{"code":["diag_captureSlowFrame [\"total\", \"333fps\"];"]},{"code":["diag_captureSlowFrame [\"memAl\", 0.0001, 30];"]},{"code":["diag_captureSlowFrame [\"total\", 0, 0, false, 3]; // opens the capture UI three times"]}],"see_also":["Arma 3: Diagnostics Exe","Performance Profiling","Arma 3: Cheats","Multiplayer Server Commands","diag_captureFrameToFile","diag_captureFrame","diag logSlowFrame","logEntities","exportJIPMessages"]},{"name":"diag_codePerformance","title":"diag codePerformance","type":"command","url":"https://community.bistudio.com/wiki/diag_codePerformance","revid":377699,"updated":"2026-01-02T09:03:27Z","groups":["Diagnostic","Performance Profiling"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Attempts to run given code with given arguments given number of cycles in unscheduled environment and returns average time it took to run the code as well as actual number of executions performed.\nThe command will return as soon as possible if the tested code is slow and the duration of the command exceeds 1 second.\nEngine alternative to BIS_fnc_codePerformance.","syntaxes":[{"syntax":"diag_codePerformance [code, arguments, cycles]","params":[{"name":"code","type":"Code","description":"code to compare performance","type_expr":"Code"},{"name":"arguments","type":"Anything","optional":true,"default":"nil","description":"arguments to pass to the code in _this variable.","type_expr":"Anything","text":"arguments: Anything - (Optional, default nil) arguments to pass to the code in _this variable. Default: nil"},{"name":"cycles","type":"Number","optional":true,"default":"100000","description":"wanted number of cycles to run the given code. > 1000 is recommended","type_expr":"Number","text":"cycles: Number - (Optional, default 100000) wanted number of cycles to run the given code. > 1000 is recommended"},{"name":"ignoreTimeLimit","type":"Boolean","optional":true,"default":"false","description":"ignore the 1 second timelimit, and always run the provided number of cycles (except in multiplayer)","type_expr":"Boolean","since":"arma3 2.14","text":"ignoreTimeLimit: Boolean - (Optional, default false) - ignore the 1 second timelimit, and always run the provided number of cycles (except in multiplayer)"}],"returns":{"type":"Array","type_expr":"Array","description":"with [duration, cycles]\n- duration: Number - average duration of 1 execution in milliseconds - cycles: Number - actual number of cycles executed","text":"Array with [duration, cycles]\n\n- duration: Number - average duration of 1 execution in milliseconds\n- cycles: Number - actual number of cycles executed"},"form":"unary","right":{"text":"[code, arguments, cycles]"}}],"examples":[{"code":["private _result = diag_codePerformance [{ private _a = 123; }, 0, 10000];"]}],"multiplayer":"For security purposes, this command will only run for 1 cycle in multiplayer, unless in-game debug console is available via description.ext option or Eden attribute setting.","see_also":["diag_log","BIS_fnc_codePerformance","Code Optimisation"]},{"name":"diag_deltaTime","title":"diag deltaTime","type":"command","url":"https://community.bistudio.com/wiki/diag_deltaTime","revid":309147,"updated":"2022-05-03T14:08:33Z","groups":["Diagnostic","Time"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","description":"Returns the duration of the previous frame in seconds","syntaxes":[{"syntax":"diag_deltaTime","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["private _frameTime = diag_deltaTime;"]},{"code":["private _fps = 1 / diag_deltaTime;"]}],"see_also":["diag_tickTime","diag_fps","diag_fpsMin","diag_frameNo","diag_log","time"]},{"name":"diag_drawMode","title":"diag drawMode","type":"command","url":"https://community.bistudio.com/wiki/diag_drawMode","revid":336291,"updated":"2022-12-21T11:09:54Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.86"},"since":"arma3 1.86","arma3_since":"1.86","branch":["diag"],"description":"Activates a debug visualisation.","syntaxes":[{"syntax":"diag_drawMode type","params":[{"name":"type","type":"String","description":"type of visualisation. Can be one of:\n\n- \"Normal\"\n- \"Roadway\"\n- \"Geometry\"\n- \"ViewGeometry\"\n- \"FireGeometry\"\n- \"Paths\"\n- \"ShadowVolume\"\n- \"ShadowBuffer\"\n- \"Buoyancy\"\n- Arma 3 v2.10 \"Wire\" - can be used along other visualisation\n  - first mode: pure wireframe, no normal rendering\n  - second mode: normal rendering combined with wireframe\n  - third mode: back to normal","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"type"}}],"examples":[{"code":["diag_drawMode \"FireGeometry\";\nsleep 5;\ndiag_drawMode \"Normal\";"]},{"text":"\"Wire\" can be used along other modes:\n\n```sqf\ndiag_drawMode \"Wire\";            // switch to first Wire mode\ndiag_drawMode \"Roadway\";        // switch to Roadway like usual\n\ndiag_drawMode \"Wire\";            // switch to second Wire mode\ndiag_drawMode \"ViewGeometry\";    // switch to ViewGeometry, keeping the current Wire mode\n\ndiag_drawMode \"Wire\";            // disable Wire\n```","code":["diag_drawMode \"Wire\";\t\t\t// switch to first Wire mode\ndiag_drawMode \"Roadway\";\t\t// switch to Roadway like usual\n\ndiag_drawMode \"Wire\";\t\t\t// switch to second Wire mode\ndiag_drawMode \"ViewGeometry\";\t// switch to ViewGeometry, keeping the current Wire mode\n\ndiag_drawMode \"Wire\";\t\t\t// disable Wire"]}],"see_also":["diag_list"]},{"name":"diag_dumpCalltraceToLog","title":"diag dumpCalltraceToLog","type":"command","url":"https://community.bistudio.com/wiki/diag_dumpCalltraceToLog","revid":351629,"updated":"2023-12-11T19:47:26Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","branch":["diag"],"description":"Dumps current callstack/calltrace to RPT.","syntaxes":[{"syntax":"diag_dumpCalltraceToLog","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["diag_dumpCalltraceToLog;\n/* outputs:\nCallstack:\"\n14:17:06 \"    [] L1 ()\"\n14:17:06 \"    [] L25 (A3\\functions_f\\Debug\\fn_debugConsoleExec.sqf)\"\n14:17:06 \"        _this:[{st = 15 / 0;}]\"\n14:17:06 \"    [] L0 ()\"\n14:17:06 \"    [] L25 (A3\\functions_f\\Debug\\fn_debugConsoleExec.sqf)\"\n14:17:06 \"        _x:any\"\n14:17:06 \"    [] L1 ()\"\n14:17:06 \"        _this:[]\"\n14:17:06 \"CALLSTACK END;;;\n*/"]}],"see_also":["arma.RPT","diag_stacktrace","diag_log"]},{"name":"diag_dumpScriptAssembly","title":"diag dumpScriptAssembly","type":"command","url":"https://community.bistudio.com/wiki/diag_dumpScriptAssembly","revid":310216,"updated":"2022-05-05T13:10:44Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","branch":["diag"],"description":"Dump script assembly.","syntaxes":[{"syntax":"diag_dumpScriptAssembly code","params":[{"name":"code","type":"Code","type_expr":"Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"code"}}],"examples":[{"code":["diag_dumpScriptAssembly BIS_fnc_taskCreate;"]}],"see_also":["Arma 3: Diagnostics Exe"]},{"name":"diag_dumpTerrainSynth","title":"diag dumpTerrainSynth","type":"command","url":"https://community.bistudio.com/wiki/diag_dumpTerrainSynth","revid":310309,"updated":"2022-05-05T16:20:41Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","description":"Returns OutsideTerrain's current world's values.","syntaxes":[{"syntax":"diag_dumpTerrainSynth","params":[],"returns":{"type":"Array of Number, Array of Numbers: [analysisLength, [min1, max1], [min2, max2], ..., [min512, max512]]. There are 512 min/max pairs.","type_expr":"Array<Number>","description":"analysisLength: Number - altitude analysis distance from terrain's border towards its centre - min1..512: Number - minimum altitude - max1..512: Number - maximum altitude","text":"Array of Number, Array of Numbers: [analysisLength, [min1, max1], [min2, max2], ..., [min512, max512]]. There are 512 min/max pairs.\n\n- analysisLength: Number - altitude analysis distance from terrain's border towards its centre\n- min1..512: Number - minimum altitude\n- max1..512: Number - maximum altitude"},"form":"nullary"}],"examples":[{"code":["private _terrainSynth = diag_dumpTerrainSynth;"]}],"see_also":["diag_exportConfig","diag_exportTerrainSVG"]},{"name":"diag_dynamicSimulationEnd","title":"diag dynamicSimulationEnd","type":"command","url":"https://community.bistudio.com/wiki/diag_dynamicSimulationEnd","revid":347048,"updated":"2023-08-28T22:05:05Z","groups":["Diagnostic","Dynamic Simulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","branch":["diag"],"locality":{"effect":"local"},"description":"Ends dynamic simulation data gathering and writes collected data into given (txt) file. The file is saved in the Arma 3 installation folder.\n\n```cpp\n// Example output\nEnabled time (in % of collection time)       Subject name\n  1.$                                          O Bravo 1-5\n  1.$                                          O Bravo 1-6\n  1.$                                          extraction_bike (B_Quadbike_01_F) - [3151,9662,59]\n  .....                                          ..................................\n  -1.$                                         O Bravo 1-4\n  -1.$                                         target_1 (O_SAM_System_04_F) - [3571,9878,70]\n  -1.$                                         O Alpha 3-4\nCollection took 0.0s\n```","syntaxes":[{"syntax":"diag_dynamicSimulationEnd file","params":[{"name":"file","type":"String","description":"file name without extension","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"file"}}],"examples":[{"code":["diag_dynamicSimulationEnd \"dynSimDebugData\"; // creates a file called \"dynSimDebugData_runtimelog.txt\""]}],"see_also":["Arma 3: Dynamic Simulation","diag_dynamicSimulationStart"]},{"name":"diag_dynamicSimulationStart","title":"diag dynamicSimulationStart","type":"command","url":"https://community.bistudio.com/wiki/diag_dynamicSimulationStart","revid":349478,"updated":"2023-11-08T17:06:18Z","groups":["Dynamic Simulation","Diagnostic"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","branch":["diag"],"locality":{"effect":"local"},"description":"Starts gathering Arma 3: Dynamic Simulation diagnostic data.","syntaxes":[{"syntax":"diag_dynamicSimulationStart","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["diag_dynamicSimulationStart;"]}],"see_also":["diag_dynamicSimulationEnd","Arma 3: Dynamic Simulation"]},{"name":"diag_enable","title":"diag enable","type":"command","url":"https://community.bistudio.com/wiki/diag_enable","revid":349134,"updated":"2023-11-08T14:49:45Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","branch":["diag"],"description":"Toggles various diagnostics.","syntaxes":[{"syntax":"mode diag_enable state","params":[{"name":"mode","type":"String","description":"see Arma 3: Diagnostics Exe","type_expr":"String"},{"name":"state","type":"Boolean","description":"true to enable diag mode, false to disable it","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"mode"},"right":{"text":"state"}}],"examples":[{"code":["\"All\" diag_enable true;"]}],"see_also":["Arma 3: Diagnostics Exe","diag_toggle"]},{"name":"diag_enabled","title":"diag enabled","type":"command","url":"https://community.bistudio.com/wiki/diag_enabled","revid":369346,"updated":"2024-09-03T18:43:02Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","branch":["diag"],"description":"Checks whether specific diagnostic mode is activated.","syntaxes":[{"syntax":"diag_enabled mode","params":[{"name":"mode","type":"String","description":"see Arma 3: Diagnostics Exe","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when enabled, false when disabled"},"form":"unary","right":{"text":"mode"}}],"examples":[{"code":["\"Animation\" diag_enable true;\ndiag_enabled \"Animation\"; // returns true"]}],"see_also":["Arma 3: Diagnostics Exe","diag_toggle","diag_enable"]},{"name":"diag_exportConfig","title":"diag exportConfig","type":"command","url":"https://community.bistudio.com/wiki/diag_exportConfig","revid":349240,"updated":"2023-11-08T14:50:57Z","groups":["Diagnostic","Config"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","branch":["diag"],"description":"Exports given config into file of given path.","syntaxes":[{"syntax":"diag_exportConfig [path, config]","params":[{"name":"path","type":"String","description":"file path on disc","type_expr":"String"},{"name":"config","type":"Config","description":"the config you would like to export","type_expr":"Config"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[path, config]"}}],"examples":[{"text":"export an All-in-One config:\n\n```sqf\ndiag_exportConfig [\"O:/config.cpp\", configFile];\n```","code":["diag_exportConfig [\"O:/config.cpp\", configFile];"]}],"see_also":["configFile"]},{"name":"diag_exportTerrainSVG","title":"diag exportTerrainSVG","type":"command","url":"https://community.bistudio.com/wiki/diag_exportTerrainSVG","revid":349370,"updated":"2023-11-08T15:35:12Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","branch":["diag"],"description":"Like the old TOPOGRAPHY cheat code, exports terrain, but in modern SVG format instead of the proprietary EMF format.","syntaxes":[{"syntax":"diag_exportTerrainSVG [filePath, drawLocationNames, drawGrid, drawCountlines, drawTreeObjects, drawMountainHeightpoints, simpleRoads]","params":[{"name":"filePath","type":"String","description":"path on disk. File name and extension have to be included","type_expr":"String"},{"name":"drawLocationNames","type":"Boolean","description":"whether or not to draw location names","type_expr":"Boolean"},{"name":"drawGrid","type":"Boolean","description":"whether or not to draw grid","type_expr":"Boolean"},{"name":"drawCountlines","type":"Boolean","description":"whether or not to count lines","type_expr":"Boolean"},{"name":"drawTreeObjects","type":"Boolean","description":"whether or not to draw trees","type_expr":"Boolean"},{"name":"drawMountainHeightpoints","type":"Boolean","description":"whether or not to draw mountain height spots","type_expr":"Boolean"},{"name":"simpleRoads","type":"Boolean","description":"simplify roads. Draw roads as one long polyline instead of separate segments. Uses average road width as overall width","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[filePath, drawLocationNames, drawGrid, drawCountlines, drawTreeObjects, drawMountainHeightpoints, simpleRoads]"}}],"examples":[{"code":["diag_exportTerrainSVG [\"C:\\Users\\USERNAME\\Desktop\\Stratis_Map.svg\", true, true, true, true, true, false]; // replace USERNAME with your username!"]}],"see_also":["Arma 3: Diagnostics Exe"]},{"name":"diag_fps","title":"diag fps","type":"command","url":"https://community.bistudio.com/wiki/diag_fps","revid":379331,"updated":"2026-10-30T23:52:18Z","groups":["Diagnostic","Performance Profiling"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns average framerate calculated over last 16 frames.","syntaxes":[{"syntax":"diag_fps","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["diag_log diag_fps;"]}],"see_also":["diag_fpsMin","diag_frameNo","diag_log","diag_tickTime","diag_deltaTime"],"notes":[{"user":"DreadedEntity","date":"2014-11-19T23:56:00Z","text":"The engine will always calculate the last 16 frames without caring if they are frames in which the loading screen was drawn, or actual mission frames."}]},{"name":"diag_fpsMin","title":"diag fpsMin","type":"command","url":"https://community.bistudio.com/wiki/diag_fpsMin","revid":310884,"updated":"2022-05-07T20:28:57Z","groups":["Diagnostic","Performance Profiling"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns minimal framerate. Calculated from the longest frame over last 16 frames.","syntaxes":[{"syntax":"diag_fpsMin","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_minfps = diag_fpsMin;"]}],"see_also":["diag_fps","diag_frameNo","diag_log","diag_tickTime","diag_deltaTime"]},{"name":"diag_frameNo","title":"diag frameNo","type":"command","url":"https://community.bistudio.com/wiki/diag_frameNo","revid":379332,"updated":"2026-10-30T23:52:26Z","groups":["Diagnostic","Performance Profiling"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns number of frame currently displayed.","syntaxes":[{"syntax":"diag_frameNo","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_currFrameNo = diag_frameNo;"]}],"see_also":["diag_fps","diag_fpsMin","diag_log","diag_tickTime","diag_deltaTime"],"notes":[{"user":"DreadedEntity","date":"2014-11-19T23:51:00Z","text":"Avoid using hard-coded frame-specific events, the total amount of drawn frames is persistent across all missions. It does not get reset until the game is closed."}]},{"name":"diag_getTerrainGrid","title":"diag getTerrainGrid","type":"command","url":"https://community.bistudio.com/wiki/diag_getTerrainGrid","revid":322636,"updated":"2022-06-20T11:53:38Z","groups":["Diagnostic"],"status":"deprecated","replaced_by":["getTerrainInfo"],"games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","branch":["diag"],"description":"Returns terrain cell size (size of each grid cell in the Heightmap).\n\n> [!CAUTION]\n> This information is **obsolete** as of Arma 3 v2.10. Reason: This command is subject to be removed and replaced with: getTerrainInfo","syntaxes":[{"syntax":"diag_getTerrainGrid","params":[],"returns":{"type":"Number","type_expr":"Number","description":"terrain grid"},"form":"nullary"}],"examples":[{"code":["private _terrainGrid = diag_getTerrainGrid;"]}],"see_also":["diag_getTerrainSegmentOffset","getTerrainGrid"]},{"name":"diag_getTerrainHeight","title":"diag getTerrainHeight","type":"command","url":"https://community.bistudio.com/wiki/diag_getTerrainHeight","revid":348945,"updated":"2023-11-08T14:45:37Z","groups":["Diagnostic"],"status":"deprecated","replaced_by":["getTerrainHeight"],"games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","branch":["diag"],"description":"Returns terrain height at the specified location.\n\n> [!NOTE]\n> Unlike getTerrainHeightASL which returns the exact position's height, this commands returns the apex of the terrain polygon.\n\n> [!CAUTION]\n> This information is **obsolete** as of Arma 3 v2.10. Reason: This command is subject to be removed and replaced with: getTerrainHeight","syntaxes":[{"syntax":"diag_getTerrainHeight positionWorld","params":[{"name":"positionWorld","type":"Position2D or Position3D","description":"position in world coordinates either in Position2D or Position3D","type_expr":"Position2D | Position3D"}],"returns":{"type":"Number","type_expr":"Number","description":"terrain height"},"form":"unary","right":{"text":"positionWorld"}}],"examples":[{"code":["private _h = diag_getTerrainHeight position player;"]}],"see_also":["diag_setTerrainHeight"]},{"name":"diag_getTerrainSegmentOffset","title":"diag getTerrainSegmentOffset","type":"command","url":"https://community.bistudio.com/wiki/diag_getTerrainSegmentOffset","revid":377557,"updated":"2026-01-02T06:54:58Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","branch":["diag"],"description":"Returns the terrain segment. It is basically the same as:\n\n```sqf\n_worldPos params [\"_x\", \"_y\"];\n[floor (_x / diag_getTerrainGrid), floor (_y / diag_getTerrainGrid)];\n```","syntaxes":[{"syntax":"diag_getTerrainSegmentOffset worldPos","params":[{"name":"worldPos","type":"Position2D or Position3D","description":"world coordinates","type_expr":"Position2D | Position3D"}],"returns":{"type":"Position2D","type_expr":"Position2D","description":"[x,y] of terrain segment (integer, basically pixel coordinates in heightmap)"},"form":"unary","right":{"text":"worldPos"}}],"examples":[{"code":["private _segmentOffset = diag_getTerrainSegmentOffset getPosWorld player;"]}],"see_also":["diag_getTerrainHeight","diag_getTerrainGrid"]},{"name":"diag_lightNewLoad","title":"diag lightNewLoad","type":"command","url":"https://community.bistudio.com/wiki/diag_lightNewLoad","revid":309216,"updated":"2022-05-03T22:41:30Z","groups":["Lights","Diagnostic"],"status":"ok","games":{"arma3":"1.82"},"since":"arma3 1.82","arma3_since":"1.82","description":"Allows loading of lighting config during the gameplay (effectively changing the current scene lighting).\nFilename path can be either absolute or relative. The file must contain only the class LightingNew, which should contain lighting configuration.","syntaxes":[{"syntax":"diag_lightNewLoad path","params":[{"name":"path","type":"String","description":"the path to the config filename","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"path"}}],"examples":[{"code":["diag_lightNewLoad \"o:\\lighting.txt\";"]}],"see_also":["diag_setLightNew"]},{"name":"diag_list","title":"diag list","type":"command","url":"https://community.bistudio.com/wiki/diag_list","revid":348389,"updated":"2023-11-08T13:00:00Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","branch":["diag"],"description":"Returns an array of all diagnostic modes available in the game.","syntaxes":[{"syntax":"diag_list mode","params":[{"name":"mode","type":"String","description":"can be `\"toggle\"` or `\"drawMode\"`","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"[\"Force\", \"Animation\", \"Mines\", \"HitPoints\", \"AnimSrcUnit\", \"AnimSrcTarget\", \"Suspension\", \"EPEForce\", \"EPEVehicle\", \"ParticleNames\", \"Particles\", \"SurfaceUnder\", \"AISkill\", \"AIDriving\", \"AIAiming\", \"AIBrain\", \"AIDynamicError\", \"AISuppression\"] Arma 3 v1.66"},"form":"unary","right":{"text":"mode"}}],"examples":[{"code":["diag_list \"toggle\";"]},{"code":["diag_list \"drawMode\";"]}],"see_also":["diag_toggle","diag_enable"]},{"name":"diag_localized","title":"diag localized","type":"command","url":"https://community.bistudio.com/wiki/diag_localized","revid":379289,"updated":"2026-10-30T23:46:42Z","groups":["Strings","Localization"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","description":"Returns array with all localized keys from the given stringtable or the array of all stringtables names if empty string `\"\"` is given. Common stringtables are: `\"Global\"`, `\"Mission\"`, `\"Campaign\"`.","syntaxes":[{"syntax":"diag_localized stringtable","params":[{"name":"stringtable","type":"String","description":"stringtable name or \"\"","type_expr":"String"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"see description"},"form":"unary","right":{"text":"stringtable"}}],"examples":[{"code":["private _randomKey = selectRandom diag_localized \"Global\";\nhint format [\"Key: %1\\nValue: %2\", _randomKey, localize _randomKey];"]},{"code":["private _allTables = diag_localized \"\";"]},{"code":["diag_localized \"Global\" select 0; // \"$STR_A3_SHOWCASE_SLINGLOADING_15_AMMODROPPED_PIL_0\""]}],"see_also":["localize","isLocalized","getTextRaw","Stringtable.csv","Stringtable.xml","BIS_fnc_localize"]},{"name":"diag_log","title":"diag log","type":"command","url":"https://community.bistudio.com/wiki/diag_log","revid":379412,"updated":"2026-10-31T00:03:05Z","groups":["Diagnostic"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Dumps the argument's value to the report file. Each call creates a new line in the file.","syntaxes":[{"syntax":"diag_log output","params":[{"name":"output","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"output"}}],"examples":[{"code":["diag_log time;"]},{"code":["diag_log format [\"%1, %2\", player, time];"]},{"text":"```sqf\n_array = [1, \"foo\", player, \"bar\"];\n{\n    diag_log _x;\n} forEach _array ; // creates 4 entries on 4 lines\n```","code":["_array = [1, \"foo\", player, \"bar\"];\n{\n\tdiag_log _x;\n} forEach _array ; // creates 4 entries on 4 lines"]},{"code":["_array = [1, \"foo\", player, \"bar\"];\ndiag_log _array; // Creates one entry of e.g. [1,\"foo\",B Alpha 1-1:1 (Player Name),\"bar\"]"]}],"see_also":["arma.RPT","diag_dumpCalltraceToLog","diag_stacktrace","copyToClipboard","copyFromClipboard","diag_fps","diag_fpsMin","diag_frameNo","diag_tickTime","diag_deltaTime"],"notes":[{"user":"Master85","date":"2009-06-08T22:39:00Z","text":"To dump a string without \"\" use text."},{"user":"Demonized","date":"2011-04-19T23:35:00Z","text":"in patch 1.59 there is a limit of 1044 characters to be printed, no error or crash but diag_log line will simply end at character number 1044."}]},{"name":"diag_mergeConfigFile","title":"diag mergeConfigFile","type":"command","url":"https://community.bistudio.com/wiki/diag_mergeConfigFile","revid":364163,"updated":"2024-05-05T10:46:42Z","groups":["Diagnostic","Config"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","branch":["diag"],"description":"Updates config without restarting. Attributes and classes can not be deleted unless `delete` is used. Changes to the config are applied to all new entities, a mission restart is not necessarily required. Spawning the vehicle again or switching weapons works too. Since Arma 3 v1.70 CfgAmmo should be mergeable as well.\n\n> [!WARNING]\n> Merging a config with an include statement, that points to a non existing file, will crash the game.","syntaxes":[{"syntax":"diag_mergeConfigFile [path, userdir]","params":[{"name":"path","type":"String","description":"absolute or relative path","type_expr":"String"},{"name":"userdir","type":"Boolean","optional":true,"default":"false","description":"path is relative to the user directory, otherwise it is relative to the mission directory","type_expr":"Boolean","text":"userdir: Boolean - (Optional, default false) path is relative to the user directory, otherwise it is relative to the mission directory"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[path, userdir]"}}],"examples":[{"code":["diag_mergeConfigFile [\"O:\\Arma3\\A3\\Stuff_F\\config.cpp\"]"]}],"see_also":["Arma 3: Diagnostics Exe"]},{"name":"diag_recordTurretLimits","title":"diag recordTurretLimits","type":"command","url":"https://community.bistudio.com/wiki/diag_recordTurretLimits","revid":309925,"updated":"2022-05-05T12:16:58Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","branch":["diag"],"description":"Start recording tool for creating turret aiming limits.","syntaxes":[{"syntax":"diag_recordTurretLimits section","params":[{"name":"section","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"section"}}],"examples":[{"code":["diag_recordTurretLimits true;"]}]},{"name":"diag_remainsCollector","title":"diag remainsCollector","type":"command","url":"https://community.bistudio.com/wiki/diag_remainsCollector","revid":377638,"updated":"2026-01-02T08:52:35Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns current settings for the remains collector and the list of monitored units if any.","syntaxes":[{"syntax":"diag_remainsCollector option","params":[{"name":"option","type":"Number","description":"can be one of:\n\n- -1: Arma 3 v2.20 log remains collector entities into a file in the RPT directory - see also the REMAINS cheat and the `#logremains` server command.\n\n  > [!IMPORTANT]\n  > Only available in Diagnostic/Profiling branch.\n- 0: corpses - returns [disposalPeriod, managerMode, removeLimit, removeMinTime, removeMaxTime, minPlayerDistance, unit1, unit2...]\n- 1: wrecks - returns [disposalPeriod, managerMode, removeLimit, removeMinTime, removeMaxTime, minPlayerDistance, unit1, unit2...]\n- 2: weaponholders - returns [disposalPeriod, managerMode, removeLimit, removeMinTime, removeMaxTime, minPlayerDistance, unit1, unit2...]\n- 3: Arma 3 v2.20 overrideTimes - returns [overrideTimeCorpses, overrideTimeWrecks, overrideTimeWeaponholders]","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"with [disposalPeriod, managerMode, removeLimit, removeMinTime, removeMaxTime, minPlayerDistance, unit1, unit2...] or [overrideTimeCorpses, overrideTimeWrecks, overrideTimeWeaponholders]","text":"Array with [disposalPeriod, managerMode, removeLimit, removeMinTime, removeMaxTime, minPlayerDistance, unit1, unit2...] or [overrideTimeCorpses, overrideTimeWrecks, overrideTimeWeaponholders]"},"form":"unary","right":{"text":"option"}}],"examples":[{"code":["hintSilent str diag_remainsCollector 0;"]}],"see_also":["addToRemainsCollector","removeFromRemainsCollector","isInRemainsCollector"]},{"name":"diag_resetAnims","title":"diag resetAnims","type":"command","url":"https://community.bistudio.com/wiki/diag_resetAnims","revid":353741,"updated":"2024-03-22T13:45:12Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"2.16"},"since":"arma3 2.16","arma3_since":"2.16","branch":["diag"],"description":"Resets the animations system cache, so that animation makers can test their animations without restarting the game. A **mission restart** is required for the changes to be applied.","syntaxes":[{"syntax":"diag_resetAnims","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"see_also":["diag_resetShapes"]},{"name":"diag_resetShapes","title":"diag resetShapes","type":"command","url":"https://community.bistudio.com/wiki/diag_resetShapes","revid":310721,"updated":"2022-05-07T19:53:41Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","branch":["diag"],"description":"Reload models on-the-fly without the need of restarting the game.\nChanges applied by **diag_resetShapes** are applied to all new entities so restart of mission is not necessarily required - spawning vehicle again or changing back forth weapon should usually do the trick.\nIt works only with `-filePatching` in combination with local data. Command will reload **only** models present in local data.\n\n> [!NOTE]\n> Limitation: `CfgSkeletons` (inside `model.cfg`) cannot be reloaded.","syntaxes":[{"syntax":"diag_resetShapes","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["diag_resetShapes;"]}]},{"name":"diag_scope","title":"diag scope","type":"command","url":"https://community.bistudio.com/wiki/diag_scope","revid":369074,"updated":"2024-09-02T20:25:00Z","groups":["Diagnostic","Performance Profiling"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Returns script scope depth. When script is directly executed by the engine or a new script is added to the scheduler, the scope depth is 0.\nThe examples of such execution are event handlers, spawn, etc. isNil Code will also create a parent scope.\nAny use of call and such will stack execution creating child scopes and increasing scope depth.","syntaxes":[{"syntax":"diag_scope","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"text":"```sqf\n0 spawn\n{\n    systemChat str diag_scope; // 0\n    call\n    {\n        call\n        {\n            systemChat str diag_scope; // 2\n            isNil\n            {\n                systemChat str diag_scope; // 0\n                call\n                {\n                    systemChat str diag_scope; // 1\n                };\n            };\n        };\n    };\n};\n```","code":["0 spawn\n{ \n\tsystemChat str diag_scope; // 0\n\tcall \n\t{ \n\t\tcall\n\t\t{ \n\t\t\tsystemChat str diag_scope; // 2\n\t\t\tisNil \n\t\t\t{ \n\t\t\t\tsystemChat str diag_scope; // 0\n\t\t\t\tcall \n\t\t\t\t{\n\t\t\t\t\tsystemChat str diag_scope; // 1\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t};\n};"]}],"see_also":["exitWith","diag_fps","diag_fpsMin","diag_frameNo","diag_log","diag_tickTime","diag_deltaTime"]},{"name":"diag_setLightNew","title":"diag setLightNew","type":"command","url":"https://community.bistudio.com/wiki/diag_setLightNew","revid":348341,"updated":"2023-11-08T12:59:48Z","groups":["Lights","Diagnostic"],"status":"ok","games":{"arma3":"1.82"},"since":"arma3 1.82","arma3_since":"1.82","description":"Overrides currently used scene lighting. The operand is config that is placed as a string (not file).\nThe changes may not be applied immediately, but can be forced by the call of simulWeatherSync.","syntaxes":[{"syntax":"diag_setLightNew config","params":[{"name":"config","type":"String","description":"config in string form","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["diag_setLightNew \"sunOrMoon = 1; diffuse[] = { 0, 0, 0, 0 }; diffuseCloud[] = { 0, 0, 0, 0 }; ambient[] = { 0, 0, 0, 0 }; ... \";"]}],"see_also":["diag_lightNewLoad"],"notes":[{"user":"POLPOX","date":"2023-05-14T10:50:07Z","text":"The change is permanent (you can see the change even after you change the mission/terrain.) However, you can send an empty string to reset the lighting."}]},{"name":"diag_setTerrainHeight","title":"diag setTerrainHeight","type":"command","url":"https://community.bistudio.com/wiki/diag_setTerrainHeight","revid":377518,"updated":"2026-01-02T06:52:04Z","groups":["Diagnostic"],"status":"deprecated","replaced_by":["setTerrainHeight"],"games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","branch":["diag"],"description":"Changes the terrain height of the cell in which given position lies. This command is only available with Arma 3: Diagnostics Exe.\n\n> [!WARNING]\n> This causes an instant CTD when *position* is out of the map! (`< 0` and/or `> worldSize`)\n\n> [!CAUTION]\n> This information is **obsolete** as of Arma 3 v2.10. Reason: This command is subject to be removed and replaced with: setTerrainHeight","syntaxes":[{"syntax":"position diag_setTerrainHeight height","params":[{"name":"position","type":"Position","type_expr":"Position"},{"name":"height","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"position"},"right":{"text":"height"}}],"examples":[{"text":"```sqf\nprivate _fnc_flattenTerrain =\n{\n    params [\"_start\", \"_a\", \"_b\", \"_h\"];\n\n    for \"_xStep\" from 0 to _a do\n    {\n        for \"_yStep\" from 0 to _b do\n        {\n            _start vectorAdd [_xStep, _yStep, 0] diag_setTerrainHeight _h;\n        };\n    };\n};\n\nprivate _desiredTerrainHeight = 150;\n[getPosWorld player, 50, 50, _desiredTerrainHeight] spawn _fnc_flattenTerrain;\n```","code":["private _fnc_flattenTerrain =\n{\n\tparams [\"_start\", \"_a\", \"_b\", \"_h\"];\n\n\tfor \"_xStep\" from 0 to _a do\n\t{\n\t\tfor \"_yStep\" from 0 to _b do\n\t\t{\n\t\t\t_start vectorAdd [_xStep, _yStep, 0] diag_setTerrainHeight _h;\n\t\t};\n\t};\n};\n\nprivate _desiredTerrainHeight = 150;\n[getPosWorld player, 50, 50, _desiredTerrainHeight] spawn _fnc_flattenTerrain;"]}],"see_also":["diag_getTerrainHeight"]},{"name":"diag_SQFCDebugDump","title":"diag SQFCDebugDump","type":"command","url":"https://community.bistudio.com/wiki/diag_SQFCDebugDump","revid":364932,"updated":"2024-07-01T10:20:08Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","branch":["diag"],"description":"Dumps the bytecode as Arma 3 sees it, in a diff friendly way. Useful for testing custom SQFC compilers.","syntaxes":[{"syntax":"diag_SQFCDebugDump [sourcePath, targetPath]","params":[{"name":"sourcePath","type":"String","description":"Path to file on drive that should be read","type_expr":"String"},{"name":"targetPath","type":"String","description":"Path to file on drive to output to","type_expr":"String"}],"returns":{"type":"Code","type_expr":"Code","description":"compiled expression (If parsing was successful)"},"form":"unary","right":{"text":"[sourcePath, targetPath]"}}],"examples":[{"code":["diag_SQFCDebugDump [\"P:/test.sqfc\", \"P:/dump\"];"]}]},{"name":"diag_stacktrace","title":"diag stacktrace","type":"command","url":"https://community.bistudio.com/wiki/diag_stacktrace","revid":379209,"updated":"2026-10-30T21:14:48Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Returns an array containing the function name, line number, scope name and all local variables in form of a hashmap.","syntaxes":[{"syntax":"diag_stacktrace","params":[],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"in format:\n```sqf params [\"_functionName\", \"_lineNumber\", \"_scopeName\", \"_variablesHashmap\"]; ``` - _functionName: String - function name - _lineNumber: Number - line number - _scopeName: String - scope name - _variablesHashmap: HashMap - all local variables","text":"Array of Arrays, in format:\n\n```sqf\nparams [\"_functionName\", \"_lineNumber\", \"_scopeName\", \"_variablesHashmap\"];\n```\n\n- _functionName: String - function name\n- _lineNumber: Number - line number\n- _scopeName: String - scope name\n- _variablesHashmap: HashMap - all local variables"},"form":"nullary"}],"examples":[{"text":"```sqf\nprivate _testvar = 1;\nprivate _testother = 2;\ncall\n{\n    _testvar = 3;\n    if (_testvar == 3) then\n    {\n        _myVariable = 4;\n        hint str diag_stacktrace;\n    };\n};\n/*\n[\n    [\"\", 3, \"\", [[\"_this\", []], [\"_testother\", 2], [\"_testvar\", 3]]],\n    [\"\", 6, \"\", []],\n    [\"\", 8, \"\", [[\"_myvariable\", 4]]]\n]\n*/\n```","code":["private _testvar = 1;\nprivate _testother = 2;\ncall \n{\n\t_testvar = 3;\n\tif (_testvar == 3) then \n\t{\n\t\t_myVariable = 4;\n\t\thint str diag_stacktrace;\n\t};\n};\n/*\n[\n\t[\"\", 3, \"\", [[\"_this\", []], [\"_testother\", 2], [\"_testvar\", 3]]],\n\t[\"\", 6, \"\", []],\n\t[\"\", 8, \"\", [[\"_myvariable\", 4]]]\n]\n*/"]}],"see_also":["arma.RPT","diag_dumpCalltraceToLog","diag_log"]},{"name":"diag_testScriptSimpleVM","title":"diag testScriptSimpleVM","type":"command","url":"https://community.bistudio.com/wiki/diag_testScriptSimpleVM","revid":373686,"updated":"2025-06-12T19:27:16Z","groups":["Diagnostic","Performance Profiling"],"status":"ok","games":{"arma3":"2.16"},"since":"arma3 2.16","arma3_since":"2.16","branch":["diag","prof"],"description":"Outputs the provided SQF code's end code.","syntaxes":[{"syntax":"diag_testScriptSimpleVM code","params":[{"name":"code","type":"Code","description":"the code to process","type_expr":"Code"}],"returns":{"type":"Array","type_expr":"Array"},"form":"unary","right":{"text":"code"}}],"examples":[{"code":["private _result = diag_testScriptSimpleVM { leader _x == _x && { alive _x && { not captive _x } } };\nhint str _result;\n/*\n[\"Success\", 360, \"\n0000:const any\n0010:unary leader (variants 3)\n0060:const any\n0070:binary == (variants 2)\n00C8:jmpIfFalse 0160\n00D8:const any\n00E8:unary alive (variants 1)\n0108:jmpIfFalse 0160\n0118:const any\n0128:unary captive (variants 1)\n0148:unary not (variants 1)\n0160:ret(implicit)\n\"]\n*/"]}],"see_also":["Arma 3: Diagnostics Exe","Performance Profiling"]},{"name":"diag_tickTime","title":"diag tickTime","type":"command","url":"https://community.bistudio.com/wiki/diag_tickTime","revid":379413,"updated":"2026-10-31T00:03:13Z","groups":["Diagnostic","Time"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Real time in seconds spent from the start of the game. On Windows the command uses [timeGetTime](https://docs.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timegettime).","syntaxes":[{"syntax":"diag_tickTime","params":[],"returns":{"type":"Number","type_expr":"Number","description":"time in seconds from game start"},"form":"nullary"}],"examples":[{"code":["// Measure execution time of a script\n_start = diag_tickTime;\n// code\n_stop = diag_tickTime;\ndiag_log format [\"%1\",_stop - _start];"]}],"see_also":["diag_fps","diag_fpsMin","diag_frameNo","diag_log","diag_deltaTime","time","systemTime","systemTimeUTC"],"notes":[{"user":"Killzone_Kid","date":"2014-01-25T00:00:00Z","text":"This command will return time since last client restart as float. However because of Number format used in Arma, the more time has past since restart the less precise the returned value will be."},{"user":"DreadedEntity","date":"2022-04-13T23:20:29Z","text":"This command keeps incrementing if the player has paused the game, even in singleplayer. If time spent paused should not be considered, use time"}]},{"name":"diag_toggle","title":"diag toggle","type":"command","url":"https://community.bistudio.com/wiki/diag_toggle","revid":369317,"updated":"2024-09-03T18:42:56Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","branch":["diag"],"description":"Toggles various diagnostics.","syntaxes":[{"syntax":"diag_toggle mode","params":[{"name":"mode","type":"String","description":"see Arma 3: Diagnostics Exe","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"mode"}}],"examples":[{"code":["diag_toggle \"Animation\"; // enable\ndiag_toggle \"Animation\"; // disable"]}],"see_also":["Arma 3: Diagnostics Exe","diag_enable"]},{"name":"dialog","title":"dialog","type":"command","url":"https://community.bistudio.com/wiki/dialog","revid":318841,"updated":"2022-05-13T09:21:55Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.78","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.78","arma3_since":"0.50","description":"Tests whether any user dialog is open.","syntaxes":[{"syntax":"dialog","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if a dialog is open, false if not"},"form":"nullary"}],"examples":[{"code":["if (!dialog) then { createDialog \"Dialog1\"; };"]}],"see_also":["createDisplay","createDialog","closeDialog","Arma: GUI Configuration"]},{"name":"diaryRecordNull","title":"diaryRecordNull","type":"command","url":"https://community.bistudio.com/wiki/diaryRecordNull","revid":340843,"updated":"2023-05-10T14:37:02Z","groups":["Briefing","Variables"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"A non-existent Diary Record. To compare non-existent objects use isNull or isEqualTo:\n\n```sqf\ndiaryRecordNull == diaryRecordNull;        // false\nisNull diaryRecordNull;                        // true\ndiaryRecordNull isEqualTo diaryRecordNull;    // true\n```\n\n> [!NOTE]\n> Before Arma 3 v2.00, isNull did not work with the diary record type and diaryRecordNull did not exist.\n>\n> In order to verify a null record, it is possible to create a variable and compare against it:\n>\n> ```sqf\n> private _diaryRecordNull = objNull createDiaryRecord [];\n> private _createdRecord = player createDiaryRecord [\"Diary\", [\"Title\", \"Description\"]];\n> if (_createdRecord isEqualTo _diaryRecordNull) then { hint \"Failed\"; };\n> ```","syntaxes":[{"syntax":"diaryRecordNull","params":[],"returns":{"type":"Diary Record","type_expr":"Diary Record"},"form":"nullary"}],"examples":[{"code":["isNull diaryRecordNull; // true"]},{"code":["isNull (objNull createDiaryRecord [\"Diary\", [\"Title\", \"Text\"]]); // true - objNull cannot take diary records"]},{"code":["str diaryRecordNull; // \"No diary record\""]},{"text":"```sqf\nprivate _diaryRecord = diaryRecordNull;\nif (damage player > 0.5) then\n{\n    _diaryRecord = player createDiaryRecord [\"Diary\", [\"Heal yourself\", \"Ask a medic\"]];\n};\n\nif (not isNull _diaryRecord) then { hint \"Diary record added.\"; };\n```","code":["private _diaryRecord = diaryRecordNull;\nif (damage player > 0.5) then\n{\n\t_diaryRecord = player createDiaryRecord [\"Diary\", [\"Heal yourself\", \"Ask a medic\"]];\n};\n\nif (not isNull _diaryRecord) then { hint \"Diary record added.\"; };"]}],"see_also":["objNull","controlNull","displayNull","grpNull","locationNull","taskNull","teamMemberNull","scriptNull","configNull","typeName","isNull"]},{"name":"diarySubjectExists","title":"diarySubjectExists","type":"command","url":"https://community.bistudio.com/wiki/diarySubjectExists","revid":322992,"updated":"2022-06-28T21:42:59Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local"},"description":"Checks whether given subject is present in the Diary of given player.","syntaxes":[{"syntax":"player diarySubjectExists name","params":[{"name":"player","type":"Object","type_expr":"Object"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"player"},"right":{"text":"name"}}],"examples":[{"code":["_exists = player diarySubjectExists \"subjectName\";"]}],"see_also":["processDiaryLink","createDiaryLink","createDiaryRecord","createDiarySubject","allDiarySubjects"]},{"name":"didJIP","title":"didJIP","type":"command","url":"https://community.bistudio.com/wiki/didJIP","revid":376937,"updated":"2025-12-31T22:33:08Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","description":"Checks if the current client Joined In Progress.","syntaxes":[{"syntax":"didJIP","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (didJIP) then\n{\n    hint \"you're late to the party!\";\n};\n```","code":["if (didJIP) then\n{\n\thint \"you're late to the party!\";\n};"]}],"see_also":["didJIPOwner","exportJIPMessages"],"notes":[{"user":"Commy2","date":"2016-02-23T22:33:00Z","text":"reports false in `CfgFunctions` with `preInit = 1;` even when the client joined in progress."}]},{"name":"didJIPOwner","title":"didJIPOwner","type":"command","url":"https://community.bistudio.com/wiki/didJIPOwner","revid":318912,"updated":"2022-05-13T09:22:01Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","locality":{"server_exec":true},"description":"Checks if the current owner of supplied Object Joined In Progress. Returns false on clients.","syntaxes":[{"syntax":"didJIPOwner object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_ownerDidJip = didJIPOwner tank;"]}],"see_also":["didJIP","owner","setOwner","groupOwner","remoteExecutedOwner","exportJIPMessages"]},{"name":"difficulty","title":"difficulty","type":"command","url":"https://community.bistudio.com/wiki/difficulty","revid":353045,"updated":"2024-03-12T12:13:06Z","groups":["Difficulty"],"status":"ok","games":{"arma3":"0.56"},"since":"arma3 0.56","arma3_since":"0.56","description":"Returns high-level selected difficulty mode.","syntaxes":[{"syntax":"difficulty","params":[],"returns":{"type":"Number","type_expr":"Number","description":"Can be one of:\n- 0 (Recruit) - 1 (Regular) - 2 (Veteran) - 3 (Elite)","text":"Number - Can be one of:\n\n- 0 (Recruit)\n- 1 (Regular)\n- 2 (Veteran)\n- 3 (Elite)"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (difficulty == 0) then\n{\n    hint \"You will need to follow my lead - read the Field Manual!\";\n};\n```","code":["if (difficulty == 0) then\n{\n\thint \"You will need to follow my lead - read the Field Manual!\";\n};"]},{"text":"The command returns the index of selected difficulty as they appear in *CfgDifficulties*:\n\n```sqf\nhint str difficulty; //Result: 4\n```","code":["hint str difficulty; //Result: 4"]}],"see_also":["difficultyOption","Arma 3: Difficulty Settings","missionDifficulty"],"notes":[{"user":"POLPOX","date":"2023-08-22T06:31:21Z","text":"The return value can be overwritten by the forcedDifficulty by the server if it is a MP session."}]},{"name":"difficultyEnabled","title":"difficultyEnabled","type":"command","url":"https://community.bistudio.com/wiki/difficultyEnabled","revid":348496,"updated":"2023-11-08T13:01:31Z","groups":["Difficulty"],"status":"ok","games":{"arma1":"1.05","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.05","arma3_since":"0.50","description":"Checks specific difficulty settings of the current user. Difficulty flag names can be found in the ArmA profile file under class Difficulties/xxx/Flags (xxx being regular or veteran).","syntaxes":[{"syntax":"difficultyEnabled flagName","params":[{"name":"flagName","type":"String","description":"difficulty flag name. Following values are available:\n\n- 3rdPersonView\n- armor\n- autoAim\n- autoGuideAT\n- autoSpot\n- autoTrimEnabled\n- cameraShake\n- clockIndicator\n- deathMessages\n- enemyTag\n- extendetInfoType\n- friendlyTag\n- hud\n- hudGroupInfo\n- hudPerm\n- hudWp\n- hudWpPerm\n- map\n- mineTag\n- netStats\n- roughLanding\n- stanceIndicator\n- stressDamageEnabled\n- unlimitedSaves\n- vonID\n- weaponCursor\n- windEnabled\n\n- 3rdPersonView\n- armor\n- autoSpot\n- autoGuideAT\n- autoAim\n- allowSeagull\n- clockIndicator\n- deathMessages\n- enemyTag\n- friendlyTag\n- hud\n- hudPerm\n- hudWp\n- hudWpPerm\n- map\n- netStats\n- suppressPlayer\n- tracers\n- realisticFatigue\n- ultraAI\n- unlimitedSaves\n- weaponCursor","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"flagName"}}],"examples":[{"code":["hint str (difficultyEnabled \"armor\");"]},{"text":"List current difficulty settings:\n\n```sqf\ncall {\n    private [\"_diff\", \"_cfg\", \"_flags\", \"_res\"];\n    _diff = [];\n    _cfg = configFile >> \"CfgDifficulties\";\n    {\n        _flags = _cfg >> configName _x >> \"Flags\";\n        for \"_i\" from 0 to count _flags - 1 do {\n            _diff pushBack configName (_flags select _i);\n        };\n    } forEach (\"true\" configClasses _cfg);\n    _diff = _diff arrayIntersect _diff;\n    _diff sort true;\n    _res = text \"\";\n    {\n        _res = composeText [_res, parseText format [\n            \"<t align='left'>%1 - %2</t>\",\n            _x,\n            [0, 1] select difficultyEnabled _x\n        ], lineBreak];\n    } forEach _diff;\n    hint _res;\n};\n```","code":["call {\n\tprivate [\"_diff\", \"_cfg\", \"_flags\", \"_res\"];\n\t_diff = [];\n\t_cfg = configFile >> \"CfgDifficulties\";\n\t{\n\t\t_flags = _cfg >> configName _x >> \"Flags\";\n\t\tfor \"_i\" from 0 to count _flags - 1 do {\n\t\t\t_diff pushBack configName (_flags select _i);\n\t\t};\n\t} forEach (\"true\" configClasses _cfg);\n\t_diff = _diff arrayIntersect _diff;\n\t_diff sort true;\n\t_res = text \"\";\n\t{\n\t\t_res = composeText [_res, parseText format [\n\t\t\t\"<t align='left'>%1 - %2</t>\", \n\t\t\t_x, \n\t\t\t[0, 1] select difficultyEnabled _x\n\t\t], lineBreak];\n\t} forEach _diff;\n\thint _res;\n};"]}],"multiplayer":"This command checks the difficulty flags of the computer (client/server) where it is executed.\n\n> [!NOTE]\n> This command is **deprecated since Arma 3 v1.58**. Since this version it always returns false. Use difficultyOption instead.\n>\n> See Arma 3 Difficulty Overhaul for further details.\n>\n> - Stress damage is a separate difficulty setting. There are two dedicated commands for it:\n>   - enableStressDamage\n>   - isStressDamageEnabled\n> - Auto trim is also a separate difficulty setting. There are also two dedicated commands for it:\n>   - enableAutoTrimRTD\n>   - isAutoTrimOnRTD","see_also":["difficultyOption","difficulty","difficultyEnabledRTD","Arma 3: Difficulty Settings"]},{"name":"difficultyEnabledRTD","title":"difficultyEnabledRTD","type":"command","url":"https://community.bistudio.com/wiki/difficultyEnabledRTD","revid":339089,"updated":"2023-04-26T10:54:08Z","groups":["RTD","Difficulty"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns true if Advanced Flight Model is enabled.\nForcing of rotorlib simulation could be done with mission param forceRotorLibSimulation.","syntaxes":[{"syntax":"difficultyEnabledRTD","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_rtdOn = difficultyEnabledRTD;"]}],"see_also":["difficultyEnabled","isObjectRTD","Description.ext"]},{"name":"difficultyOption","title":"difficultyOption","type":"command","url":"https://community.bistudio.com/wiki/difficultyOption","revid":369140,"updated":"2024-09-03T10:34:36Z","groups":["Difficulty"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Checks specific difficulty settings of the current user.\nDifficulty flag names can be found in the `CfgDifficultyPresets` config class or in ArmA profile file under class `DifficultyPresets/xxx/Options` (xxx being Recruit, Regular or Veteran).\nThis command replaces difficultyEnabled as many options have multiple values and former command only provided Boolean return.","syntaxes":[{"syntax":"difficultyOption optionName","params":[{"name":"optionName","type":"String","description":"difficulty option name; one of:\n\n- reducedDamage\n- groupIndicators\n- friendlyTags\n- enemyTags\n- detectedMines\n- commands\n- waypoints\n- weaponInfo\n- stanceIndicator\n- staminaBar\n- weaponCrosshair\n- visionAid\n- thirdPersonView\n- cameraShake\n- scoreTable\n- deathMessages\n- vonID\n- mapContent\n- autoReport\n- multipleSaves","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"optionName"}},{"syntax":"difficultyOption array","since":"arma3 2.14","params":[{"name":"array","type":"Array","description":"any array, could be empty array []","type_expr":"Array"}],"returns":{"type":"Array","type_expr":"Array","description":"array of all options and current values in format [[\"Option1\", value1], ...[\"OptionN\", valueN]]"},"form":"unary","right":{"text":"array"}}],"examples":[{"code":["hint str (difficultyOption \"friendlyTags\");"]},{"text":"Remember last cameraView per vehicle:\n\n```sqf\nplayer addEventHandler [\"GetOutMan\", {\n    params [\"_unit\", \"\", \"_vehicle\"];\n    _unit setVariable [_vehicle call BIS_fnc_netId, cameraView];\n}];\nplayer addEventHandler [\"GetInMan\", {\n    if (difficultyOption \"thirdPersonView\" == 2) then {\n        params [\"_unit\", \"\", \"_vehicle\"];\n        _unit switchCamera (_unit getVariable [_vehicle call BIS_fnc_netId, \"INTERNAL\"]);\n    };\n}];\n```","code":["player addEventHandler [\"GetOutMan\", {\n\tparams [\"_unit\", \"\", \"_vehicle\"];\n\t_unit setVariable [_vehicle call BIS_fnc_netId, cameraView];\n}];\nplayer addEventHandler [\"GetInMan\", {\n\tif (difficultyOption \"thirdPersonView\" == 2) then {\n\t\tparams [\"_unit\", \"\", \"_vehicle\"];\n\t\t_unit switchCamera (_unit getVariable [_vehicle call BIS_fnc_netId, \"INTERNAL\"]);\n\t};\n}];"]}],"see_also":["difficulty","difficultyEnabledRTD","Arma 3: Difficulty Settings","missionDifficulty"]},{"name":"direction","title":"direction","type":"command","url":"https://community.bistudio.com/wiki/direction","revid":376966,"updated":"2026-01-01T05:58:04Z","groups":["Object Manipulation","Locations"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the direction an object or a location is facing (differs from getDir in that this also works with locations).","syntaxes":[{"syntax":"direction object","params":[{"name":"object","type":"Object or Location","type_expr":"Object | Location"}],"returns":{"type":"Number in range 0..360","type_expr":"Number","description":"Direction in degrees"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["player setDir 90;\n_d = direction player;//returns 90"]}],"see_also":["getDir","getDirVisual","setDir","setDirection"]},{"name":"directionStabilizationEnabled","title":"directionStabilizationEnabled","type":"command","url":"https://community.bistudio.com/wiki/directionStabilizationEnabled","revid":377493,"updated":"2026-01-02T06:49:17Z","groups":["Camera Control","Turrets"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Get state of direction stabilization. This command returns true if the current optic mode of the selected turret has direction stabilization configured in config (`directionStabilized`) and if it is also not disabled by enableDirectionStabilization.\nThis command can not be used to determine if the current optic of the turret has `directionStabilized` enabled in config.","syntaxes":[{"syntax":"vehicle directionStabilizationEnabled turretPath","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"whether direction stabilization is enabled"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}}],"examples":[{"code":["uav directionStabilizationEnabled [0];"]}],"see_also":["enableDirectionStabilization","lockCameraTo"]},{"name":"directSay","title":"directSay","type":"command","url":"https://community.bistudio.com/wiki/directSay","revid":376774,"updated":"2025-11-17T00:05:11Z","groups":["Radio and Chat","Sounds"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sends given audio message to the direct channel. Command operates just like xxxxRadio commands, but the sound is played over direct channel and is independent of fadeSound. The message is defined in CfgRadio in the description.ext file or config radio protocol or a kbAddTopic. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec). Use clearRadio to clear chat history\n\n> [!NOTE]\n> When transmitting unit gets killed, transmission will be interrupted. However when receiving unit gets killed, the transmission continues to play.","syntaxes":[{"syntax":"unit directSay radioName","params":[{"name":"unit","type":"Object","description":"unit to transmit","type_expr":"Object"},{"name":"radioName","type":"String","description":"class name from CfgRadio","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"radioName"}}],"examples":[{"code":["player directSay configName selectRandom (\"true\" configClasses (configFile >> \"CfgRadio\"));"]},{"text":"An equivalent of a ***directChat*** command:\n\n```sqf\n[player, \"Hello there\", 30] call {\n    params [\"_unit\", \"_text\", \"_distance\"];\n    [_unit, _text] remoteExec [\"globalChat\", call BIS_fnc_listPlayers select { _x distance _unit < _distance }];\n};\n```\n\nA function can be made for localisation purpose:\n\n```sqf\n/* TAG_fnc_globalChat */\nparams [\n    [\"_unit\", objNull, [objNull]],\n    [\"_text\", \"\", [\"\"]]\n];\n\n_unit globalChat (_text call BIS_fnc_localize);\n```\n\n```sqf\n// usage\n[player, \"STR_HelloThere\"] remoteExec [\"TAG_fnc_globalChat\", call BIS_fnc_listPlayers select { _x distance _unit < 30 }];\n```","code":["[player, \"Hello there\", 30] call {\n\tparams [\"_unit\", \"_text\", \"_distance\"];\n\t[_unit, _text] remoteExec [\"globalChat\", call BIS_fnc_listPlayers select { _x distance _unit < _distance }];\n};","/* TAG_fnc_globalChat */\nparams [\n\t[\"_unit\", objNull, [objNull]],\n\t[\"_text\", \"\", [\"\"]]\n];\n\n_unit globalChat (_text call BIS_fnc_localize);","// usage\n[player, \"STR_HelloThere\"] remoteExec [\"TAG_fnc_globalChat\", call BIS_fnc_listPlayers select { _x distance _unit < 30 }];"]}],"see_also":["sideRadio","groupRadio","customRadio","vehicleRadio","globalRadio","commandRadio"],"notes":[{"user":"Killzone_Kid","date":"2016-12-03T21:32:00Z","text":"To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial), prefix the full filename including file extension with #.\nFor example if there is a custom user sound file called `MySound.ogg`, to play it on the radio use:\n\n```sqf\nplayer directSay \"#MySound.ogg\";\n```"}]},{"name":"disableAI","title":"disableAI","type":"command","url":"https://community.bistudio.com/wiki/disableAI","revid":378871,"updated":"2026-07-31T15:22:58Z","groups":["AI Behaviour"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Disables parts of the AI behaviour to get a better control over the actions of a unit. If the unit changes locality, this command might need to be executed again at the new locality to maintain effect.\n\n> [!WARNING]\n> This command might cause unexpected behaviour when used on a player-controlled unit.","syntaxes":[{"syntax":"unit disableAI feature","params":[{"name":"unit","type":"Object","description":"AI unit","type_expr":"Object"},{"name":"feature","type":"String","description":"possible values are:\n\n- Arma 3 v1.66 \"ALL\"\n- \"AUTOTARGET\"\n- \"MOVE\"\n- \"TARGET\"\n- \"TEAMSWITCH\"\n- \"WEAPONAIM\"\n- Operation Flashpoint v1.99 \"ANIM\"\n- Arma 2: Operation Arrowhead v1.60 \"FSM\"\n- Arma 3 v1.42 \"AIMINGERROR\"\n- Arma 3 v1.42 \"SUPPRESSION\"\n- Arma 3 v1.54 \"CHECKVISIBLE\"\n- Arma 3 v1.56 \"AUTOCOMBAT\"\n- Arma 3 v1.56 \"COVER\"\n- Arma 3 v1.62 \"PATH\"\n- Arma 3 v1.76 \"MINEDETECTION\"\n- Arma 3 v1.92 \"LIGHTS\"\n- Arma 3 v1.92 \"NVG\"\n- Arma 3 v1.96 \"RADIOPROTOCOL\"\n- Arma 3 v2.18 \"FIREWEAPON\"\n- Arma 3 v2.22 \"COMMAND\"\n- Arma 3 v2.22 \"HEARING\"\n\n| Feature | Description | Since |\n|---|---|---|\n| \"ALL\" | Disables all features. | Arma 3 v1.66 |\n| \"AIMINGERROR\" | Prevents AI's aiming from being distracted by its shooting, moving, turning, reloading, hit, injury, fatigue, suppression or concealed / lost target. | Arma 3 v1.42 |\n| \"ANIM\" | Disables all animations of the unit. Completely freezes the unit, including breathing and blinking. No move command works until the unit is unfrozen. | Operation Flashpoint v1.99 |\n| \"AUTOCOMBAT\" | Disables autonomous switching to \"COMBAT\" AI Behaviour when in danger. | Arma 3 v1.56 |\n| \"AUTOTARGET\" | Essentially makes single units without a group \"deaf\". The unit still goes prone and combat ready if it hears gunfire. It will not turn around when gunfire comes from behind, but if an enemy walks in front of it it will target the enemy and fire as normal. **Does not work for grouped units as the leader will assign targets to the units, effectively reenabling this feature.** | - |\n| \"CHECKVISIBLE\" | Disables visibility raycasts. Useful in PvP missions where these raycasts are not needed. | Arma 3 v1.54 |\n| \"COMMAND\" | AI leaders will no longer issue commands. | Arma 3 v2.22 |\n| \"FSM\" | Disables the attached FSM scripts which are responsible for the AI behaviour. Enemies react slower to enemy fire and the enemy stops using hand signals. Disabling FSM can give the impression of untrained units as they react slower and are more disorganized compared to when FSM is enabled. | Arma 2: Operation Arrowhead v1.60 |\n| \"LIGHTS\" | Stops AI from operating vehicle headlights and collision lights. | Arma 3 v1.92 |\n| \"MINEDETECTION\" | Disable AI's mine detection. | Arma 3 v1.76 |\n| \"MOVE\" | This will stop units from turning and moving, including vehicles. Units will still change stance and fire at the enemy if the enemy happens to walk right in front of the barrel. Units will watch enemies that are in their line of sight, but will not turn their bodies to face the enemy, only their head. Works for grouped units as well. Good for staging units and holding them completely still. Movement can not be controlled via script either, this feature has to be reenabled for that. The unit will still be able to aim within its cone of fire. | - |\n| \"NVG\" | Stops AI from putting on NVGs (but not from taking them off). | Arma 3 v1.92 |\n| \"PATH\" | Stops the AI's movement but not the target alignment. | Arma 3 v1.62 |\n| \"RADIOPROTOCOL\" | Stops AI from talking and texting while still being able to issue orders. | Arma 3 v1.96 |\n| \"SUPPRESSION\" | Prevents AI from being suppressed. See Arma 3: Suppression. | Arma 3 v1.42 |\n| \"TARGET\" | Prevents units from engaging targets. Units still move around for cover, but will not hunt down enemies. Works in groups as well. Excellent for keeping units inside bases or other areas without having them flank or engage anyone. They will still seek good cover if something is close by. | - |\n| \"TEAMSWITCH\" | This will disable AI unit when teamswitching. When used on vehicles they might no longer follow waypoints and appear stuck. | - |\n| \"WEAPONAIM\" | Disables weapon aiming. | - |\n| \"FIREWEAPON\" | Disables weapon firing. | Arma 3 v2.18 |\n| \"HEARING\" | Disables AI's ability to hear. | Arma 3 v2.22 |","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"feature"}}],"examples":[{"code":["MyUnit disableAI \"AUTOTARGET\";"]}],"multiplayer":"> [!IMPORTANT]\n> The locality of this command is peculiar: the disabling will be stored *locally* and will apply **if** the AI is local or becomes local (e.g taking the lead, driving, etc).\n> If the AI changes locality again, that machine's AI setup will prevail.","see_also":["enableAI","checkAIFeature","enableAIFeature","getUnitState","disableRemoteSensors","vehicleMoveInfo"],"notes":[{"user":"Hardrock","date":"2006-08-03T14:31:00Z","text":"*Notes from before the conversion:*\n\nThe \"TARGET\" section of the AI is likely different than what you would think. Normally, when an AI group is standing still and sees an enemy, the group will break formation and start moving towards the enemy. If you disable the \"TARGET\" AI, then the AI units will stay where they are at. Even if you disable the \"MOVE\" AI, the units will still move out to attack the enemy, unless you disable the \"TARGET\" AI. Disabling both these AI sections is useful when placing units in defensive positions. This way, you can have them stay behind their cover, and not run out into the open.\n\nThis command has also a bug: after mission save or load the effect will be no longer active and you must set it again. It's also good way to detect number of saves and loads (loads can be recognized using time command)."},{"user":"GeneralCarver","date":"2009-02-07T14:31:00Z","text":"*Multiplayer Use as of ArmA v1.14:*\nContrary to the post above, using this command WILL disable A.I. movement ability if used with the \"MOVE\" parameter. Works even when the A.I. is grouped with other units. I use this command to set up stationary targets at objectives all the time. Works on a dedicated server."},{"user":"Kenoxite","date":"2015-09-19T09:00:00Z","text":"Beware that disabling \"TARGET\" AI to units in the player's group will disable the ability to execute engage orders issued by the player."},{"user":"James","date":"2016-09-26T19:34:00Z","text":"Command is buggy in version 1.64.138497 as it disables the ability to drive vehicles for players. Tested with `player disableAI \"move\"`. Entering a vehicle is possible, but not starting the engine. `player enableAI \"move\"` enables the player to drive again.\nFeedback Tracker ticket: https://feedback.bistudio.com/T120346"},{"user":"zwobot","date":"2018-06-05T19:29:00Z","text":"In **Operation Flashpoint/Cold War Assault**, the disabled units are reset after a saveGame is executed or the user manually saves the mission, i. e. the units will behave as if the disableAI command was never applied to them. Also in Operation Flashpoint there is no way to undo this command."},{"user":"Sa-Matra","date":"2023-04-30T10:12:56Z","text":"Disabled or enabled AI features have no synchronization over the network what so ever, you have to do everything yourself on each client, including JIP. This also applies to setAutonomous which is pretty much multi-call disableAI command for specific set of features."}]},{"name":"disableBrakes","title":"disableBrakes","type":"command","url":"https://community.bistudio.com/wiki/disableBrakes","revid":373894,"updated":"2025-06-26T11:02:28Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"argument":"local","effect":"global"},"description":"Disables autobrake, which is engaged when vehicle is stationary and stops wheels from rotating freely when vehicle is pushed.","syntaxes":[{"syntax":"transport disableBrakes disable","params":[{"name":"transport","type":"Object","description":"PhysX car or tank","type_expr":"Object"},{"name":"disable","type":"Boolean","description":"true to disable autobrake. The autobrake is re-enabled if the driver uses brakes","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"transport"},"right":{"text":"disable"}}],"examples":[{"code":["myCar disableBrakes true;"]}],"see_also":["brakesDisabled","awake","isAwake","addTorque","addForce","vectorModelToWorld","vectorModelToWorldVisual","selectionPosition","setVelocityTransformation","setVelocityModelSpace"]},{"name":"disableCollisionWith","title":"disableCollisionWith","type":"command","url":"https://community.bistudio.com/wiki/disableCollisionWith","revid":370442,"updated":"2024-12-09T20:57:09Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Disable collision between provided objects. The collision is always disabled for both objects in the arguments.\n\n> [!IMPORTANT]\n> - this command does not disable collision between PhysX objects\n> - this command has to be executed where objects are local, and as long as they do not change locality, the effect of this command will be global:\n>   - if the two objects are not local to the same computer, then it has to be executed on both computers to achieve the desired effect\n>   - if one or both objects change locality, the command needs to be executed again on the new owner's machine(s) to maintain the effect\n> - the feature works by having an object registering a reference to the other object; this command stores such reference on both objects - see Example 3","syntaxes":[{"syntax":"vehicle1 disableCollisionWith vehicle2","params":[{"name":"vehicle1","type":"Object","type_expr":"Object"},{"name":"vehicle2","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle1"},"right":{"text":"vehicle2"}}],"examples":[{"code":["player disableCollisionWith myWall;"]},{"code":["[_veh1, _veh2] remoteExecCall [\"disableCollisionWith\", 0, _veh1];"]},{"text":"```sqf\n// this command stores a reference to the other object on both arguments:\n_obj1 disableCollisionWith _obj2;    // _obj1 has a reference to _obj2, disabling collision with it\n                                    // _obj2 has a reference to _obj1, disabling collision with it\n\n// only one reference is required to disable collision, allowing more than one disabled collision\n_obj1 disableCollisionWith _obj3;    // _obj1 has a reference to _obj3, disabling collision with it\n                                    // _obj2 has a reference to _obj1, disabling collision with it\n                                    // _obj3 has a reference to _obj1, disabling collision with it\n                                    // factually, _obj1 has collisions disabled with _obj2 and _obj3\n\n// note that _obj1 collision can be changed without using the command on it directly\n_obj2 disableCollisionWith _obj3;    // _obj1 has no more reference to _obj3 and can collide with it\n                                    // _obj2 has a reference to _obj3, disabling collision with it\n                                    // _obj3 has a reference to _obj2, disabling collision with it\n```","code":["// this command stores a reference to the other object on both arguments:\n_obj1 disableCollisionWith _obj2;\t// _obj1 has a reference to _obj2, disabling collision with it\n\t\t\t\t\t\t\t\t\t// _obj2 has a reference to _obj1, disabling collision with it\n\n// only one reference is required to disable collision, allowing more than one disabled collision\n_obj1 disableCollisionWith _obj3;\t// _obj1 has a reference to _obj3, disabling collision with it\n\t\t\t\t\t\t\t\t\t// _obj2 has a reference to _obj1, disabling collision with it\n\t\t\t\t\t\t\t\t\t// _obj3 has a reference to _obj1, disabling collision with it\n\t\t\t\t\t\t\t\t\t// factually, _obj1 has collisions disabled with _obj2 and _obj3\n\n// note that _obj1 collision can be changed without using the command on it directly\n_obj2 disableCollisionWith _obj3;\t// _obj1 has no more reference to _obj3 and can collide with it\n\t\t\t\t\t\t\t\t\t// _obj2 has a reference to _obj3, disabling collision with it\n\t\t\t\t\t\t\t\t\t// _obj3 has a reference to _obj2, disabling collision with it"]}],"see_also":["collisionDisabledWith","enableCollisionWith","setPhysicsCollisionFlag"],"notes":[{"user":"Ranwer","date":"2015-04-04T12:03:00Z","text":"disableCollisionWith is basically a script that when you apply it to an object, and your unit can go through it like a ghost. However, if you wish the object to be solid again, you may wish to use enableCollisionWith.\n\nAn example for this is:\n\n```sqf\n// name of unit in editor such as player1\n// name of object in editor such as barrel1\nbarrel1 disableCollisionWith player1;\n\n// to make the barrel solid again, do this as vice versa if you know what you are doing!\nbarrel1 enableCollisionWith player1;\n```\n\nOn a side note: this can come in handy a lot if you want a unit to sit on the back of a car or on top of a container"},{"user":"bloodwyn1756","date":"2018-05-29T06:58:00Z","text":"This command does not disable the roadway LOD."}]},{"name":"disableConversation","title":"disableConversation","type":"command","url":"https://community.bistudio.com/wiki/disableConversation","revid":351998,"updated":"2024-02-01T23:23:59Z","groups":["Radio and Chat"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"In theory disables the ability to talk to other people. In actuality, if true is given, the command increases unit's kbTell *IsSpeaking* status by 1, thus stopping unit from having a conversation. If false is given, the command decreases unit's kbTell *IsSpeaking* status by 1. The unit \"is speaking\" if *IsSpeaking > 0*.\n\n> [!IMPORTANT]\n> kbTell *IsSpeaking* is a number that is increased or decreased by 1 internally. Default is 0, but it can be any positive or negative value. disableConversation allows to increase or decrease this number. When executed multiple times this can present an unexpected problem. Use conversationDisabled which returns true if this number > 0, to reset this number to 0 if necessary:\n>\n> ```sqf\n> while {!conversationDisabled _unit} do {_unit disableConversation true}; while {conversationDisabled _unit} do {_unit disableConversation false};\n> ```","syntaxes":[{"syntax":"unitName disableConversation disable","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"disable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"disable"}}],"examples":[{"code":["player disableConversation true;"]},{"code":["soldier1 disableConversation false;"]}],"see_also":["conversationDisabled","setSpeaker","enableRadio","enableSentences","showSubtitles"]},{"name":"disableDebriefingStats","title":"disableDebriefingStats","type":"command","url":"https://community.bistudio.com/wiki/disableDebriefingStats","revid":364532,"updated":"2024-05-16T20:46:25Z","groups":["Broken Commands","Briefing"],"status":"broken","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Disable debriefing score table.\n\n> [!WARNING]\n> This command is broken.","syntaxes":[{"syntax":"disableDebriefingStats","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["disableDebriefingStats;"]}],"see_also":["enableDebriefingStats"]},{"name":"disableMapIndicators","title":"disableMapIndicators","type":"command","url":"https://community.bistudio.com/wiki/disableMapIndicators","revid":364167,"updated":"2024-05-05T10:46:43Z","groups":["Difficulty"],"status":"ok","games":{"arma3":"1.82"},"since":"arma3 1.82","arma3_since":"1.82","locality":{"effect":"local"},"description":"Command allows suppressing visualization of FRIENDLY, ENEMY, MINES and/or PING map indicators from difficulty setting EXTENDED MAP CONTENT.","syntaxes":[{"syntax":"disableMapIndicators [disableFriendly, disableEnemy, disableMines, disablePing]","params":[{"name":"disableFriendly","type":"Boolean","description":"true to disable visualization of friendly units","type_expr":"Boolean"},{"name":"disableEnemy","type":"Boolean","description":"true to disable visualization of enemy units","type_expr":"Boolean"},{"name":"disableMines","type":"Boolean","description":"true to disable visualization of mines","type_expr":"Boolean"},{"name":"disablePing","type":"Boolean","description":"true to disable visualization of all tactical pings","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[disableFriendly, disableEnemy, disableMines, disablePing]"}}],"examples":[{"text":"Disable visualization of friendly and enemy units:\n\n```sqf\ndisableMapIndicators [true, true, false, false];\n```","code":["disableMapIndicators [true, true, false, false];"]}],"see_also":["difficultyOption"]},{"name":"disableNVGEquipment","title":"disableNVGEquipment","type":"command","url":"https://community.bistudio.com/wiki/disableNVGEquipment","revid":336380,"updated":"2022-12-31T19:13:15Z","groups":["Weapons"],"status":"ok","games":{"arma3":"1.52"},"since":"arma3 1.52","arma3_since":"1.52","locality":{"argument":"global","effect":"global"},"description":"Enables or disables transport NV (Night Vision). To disable TI (Thermal Imaging) use disableTIEquipment.","syntaxes":[{"syntax":"vehicle disableNVGEquipment state","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"state","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"state"}}],"examples":[{"code":["myTank disableNVGEquipment true;"]}],"see_also":["equipmentDisabled","disableTIEquipment"]},{"name":"disableRemoteSensors","title":"disableRemoteSensors","type":"command","url":"https://community.bistudio.com/wiki/disableRemoteSensors","revid":321256,"updated":"2022-05-13T19:00:39Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.52"},"since":"arma3 1.52","arma3_since":"1.52","locality":{"effect":"local"},"description":"This command will halt raycasting calculations (on the local machine only) for all groups which don't contain *any* local entities. Units, that are not in a group with at least one local member, will not check visibility of other units. This will cause, that remote units will not have updated knowsAbout and it will save some CPU time. If a group contains a single local entity then calculations will still be performed for the entire group.\n\nThese raycasts are used to determine what other entities an entity can see, and they take a lot of CPU time. This is of course a bit of a trick, because rather than a true optimization, it disables part of the simulation. However, there are certainly types of scenarios where these raycasts are not needed. An example is a fully Player-versus-Player scenario, where the visibility between every combination of player entity is not needed. So why not disable this by default? There are cases where you do require these raycasts, for example in stealth scenarios. Without them, commands like knowsAbout, nearTargets and targetKnowledge will only function for local units! The commands themselves are local, can be used on servers and clients, and the state is reset when the scenario ends. So, carefully consider whether your scenario can benefit from this method.","syntaxes":[{"syntax":"disableRemoteSensors state","params":[{"name":"state","type":"Boolean","description":"true to disable","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"state"}}],"examples":[{"code":["disableRemoteSensors true;"]}],"see_also":["getRemoteSensorsDisabled"]},{"name":"disableSerialization","title":"disableSerialization","type":"command","url":"https://community.bistudio.com/wiki/disableSerialization","revid":369064,"updated":"2024-09-02T20:24:56Z","groups":["Namespaces","GUI Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Disable saving of script containing this command. After this, the script can work with data types which do not support serialization (UI types).\n\n> [!NOTE]\n> See Namespace serialization for more information.\n\n> [!IMPORTANT]\n> **In Arma 2** and up to a certain version of Arma 3, giving a Display or Control to spawned code would raise an error due to the usage of the then non-serializable `_this` variable. Using disableSerialization or uiNamespace wouldn't help; the trick here is to pass the argument inside an array:\n>\n> ```sqf\n> _display = findDisplay 46;\n>  _display  spawn { hint str _this; };                // would raise a serialization error\n> [_display] spawn { hint str (_this select 0); };    // OK\n> ```","syntaxes":[{"syntax":"disableSerialization","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["disableSerialization;\nprivate _display = findDisplay 46;"]}],"see_also":["Display","displayAddEventHandler","displayRemoveAllEventHandlers","displayRemoveEventHandler","uiSleep"],"notes":[{"user":"Str","date":"2010-06-19T10:26:00Z","text":"Can be used to detecting load. Scope with disabled serialization is discontinued after load, even if there's endless loop inside.\n\n```sqf\n0 spawn { disableSerialization; waitUntil { false }; hint \"Game was loaded!\";};\n```\n\nWorks for all possible load types - loading user save, loading autosave and resuming mission from main menu.\n\nUse with caution, as it creates an infinite loop, having impact at overall scripting time."},{"user":"Killzone_Kid","date":"2013-10-23T02:57:00Z","text":"If you do not store UI elements (Display, Control) in variables, you do not need disableSerialization; UI elements are usually returned by scripting commands such as findDisplay or passed as params in UI event handler scripts (displayAddEventHandler, ctrlAddEventHandler).\n\nThis code will require disableSerialization:\n\n```sqf\ndisableSerialization;\n_display = findDisplay 123;\n_ctrl = _display displayCtrl -1;\n_ctrl ctrlSetText \"LOL\";\n```\n\nThis code will not:\n\n```sqf\nfindDisplay 123 displayCtrl -1 ctrlSetText \"LOL\";\n```"},{"user":"Nelis75733126","date":"2017-06-25T18:15:00Z","text":"In Arma 3 1.74, a scripted FSM is somehow incompatible with `disableSerialization`.\nAs a workaround, store a display inside an array. Example:\n\n```sqf\n_display = [findDisplay idd];\n```"}]},{"name":"disableTIEquipment","title":"disableTIEquipment","type":"command","url":"https://community.bistudio.com/wiki/disableTIEquipment","revid":353363,"updated":"2024-03-15T17:11:56Z","groups":["Weapons"],"status":"ok","games":{"arma2oa":"1.54","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.54","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Disables TI (Thermal Imaging) equipment for given vehicle.\n\n> [!NOTE]\n> In older versions of Arma this command would also disable NV (Night Vision), but since Arma 3 v1.54 this command disables only TI. Use disableNVGEquipment to disable NV.","syntaxes":[{"syntax":"vehicle disableTIEquipment state","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"state","type":"Boolean","description":"true to turn TI off, false to turn TI on","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"state"}}],"examples":[{"code":["vehicle player disableTIEquipment true;"]},{"code":["_tank disableTIEquipment true;"]}],"see_also":["equipmentDisabled","disableNVGEquipment","currentVisionMode","setCamUseTI","camUseNVG"]},{"name":"disableUAVConnectability","title":"disableUAVConnectability","type":"command","url":"https://community.bistudio.com/wiki/disableUAVConnectability","revid":379333,"updated":"2026-10-30T23:52:34Z","groups":["Remote Control"],"status":"ok","games":{"arma3":"1.24"},"since":"arma3 1.24","arma3_since":"1.24","locality":{"effect":"local"},"description":"Disables unit's AV terminal(s) connecting to UAV.","syntaxes":[{"syntax":"object disableUAVConnectability [uav, checkAllItems]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"uav","type":"Object","type_expr":"Object"},{"name":"checkAllItems","type":"Boolean","description":"true to disable all terminals in unit's inventory, false to only disable the currently assigned terminal.","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[uav, checkAllItems]"}}],"examples":[{"code":["myUnit disableUAVConnectability [myUav, true];"]}],"see_also":["isUAVConnectable","enableUAVConnectability"],"notes":[{"user":"PingWing","date":"2018-09-15T20:13:00Z","text":"This command has effect on a UAV terminal, not on whether a unit is able to connect to a UAV or not.\nWhen a unit gets a new UAV terminal, the unit will be able to connect to the UAV again, unless this command is executed again."}]},{"name":"disableUserInput","title":"disableUserInput","type":"command","url":"https://community.bistudio.com/wiki/disableUserInput","revid":373274,"updated":"2025-04-13T14:35:36Z","groups":["Interaction"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Disables or enables the keyboard and mouse input. Usually used during cutscenes.\n\n> [!WARNING]\n> Be careful and responsible with the usage of this command. Once the user input is disabled, the only option left is to restart the game. Make sure you provide scripted mechanics to resolve this, should you need to disable user input for any reason.","syntaxes":[{"syntax":"disableUserInput state","params":[{"name":"state","type":"Boolean","description":"true to disable, false to enable","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"state"}}],"examples":[{"code":["disableUserInput true;\n// cutscene\ndisableUserInput false;"]},{"text":"Reset user input if a key was pressed:\n\n```sqf\ndisableUserInput true;    // here e.g W was pressed\nsleep 2;                // the user releases keys\ndisableUserInput false;    // the game considers W is still pressed as it did not listen to a \"KeyUp\" event\n\ndisableUserInput true;\ndisableUserInput false;    // this resets released keys making the issue invisible\n\n// this workaround does not fix the mouse input that may get stuck on disableUserInput call\n```","code":["disableUserInput true;\t// here e.g W was pressed\nsleep 2;\t\t\t\t// the user releases keys\ndisableUserInput false;\t// the game considers W is still pressed as it did not listen to a \"KeyUp\" event\n\ndisableUserInput true;\ndisableUserInput false;\t// this resets released keys making the issue invisible\n\n// this workaround does not fix the mouse input that may get stuck on disableUserInput call"]}],"see_also":["userInputDisabled","enableSimulation","enableSimulationGlobal"]},{"name":"displayAddEventHandler","title":"displayAddEventHandler","type":"command","url":"https://community.bistudio.com/wiki/displayAddEventHandler","revid":369069,"updated":"2024-09-02T20:24:59Z","groups":["GUI Control - Event Handlers","Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Adds an event handler to the given display. See User Interface Event Handlers for the full list of event names.\nIf applicable, see DIK_KeyCodes for a list of key code constants, which are relevant to key related user interface events like: KeyDown & KeyUp.\n\n> [!IMPORTANT]\n> Display EHs are processed from last to first added; an input override should be set up in the first added EH.\n\n> [!NOTE]\n> The event handler ID can be accessed inside the event handler code using the `_thisEventHandler` magic variable.","syntaxes":[{"syntax":"display displayAddEventHandler [eventName, code]","params":[{"name":"display","type":"Display","type_expr":"Display"},{"name":"eventName","type":"String","description":"event name\n\n> [!IMPORTANT]\n> When using the event names listed here with the ctrlAddEventHandler, ctrlSetEventHandler, displayAddEventHandler or displaySetEventHandler commands, the prefix \"on\" in the event name must be removed (e.g. '**ButtonDown'** instead of '**onButtonDown'**).","type_expr":"String"},{"name":"code","type":"String or Arma 3 v1.06 Code","description":"the code which gets executed when event is triggered. Returning true in event handler code will override default engine handling for keyboard events.\nSeveral Magic Variables are available:\n\n- Event Handler parameters are accessible via `_this`\n- The Event Handler type is available as `_thisEvent`\n- The Event Handler index is available as `_thisEventHandler`","type_expr":"String | Code"}],"returns":{"type":"Number","type_expr":"Number","description":"index of the newly added event handler or `-1` if creation failed"},"form":"binary","left":{"text":"display"},"right":{"text":"[eventName, code]"}}],"examples":[{"code":["moduleName_keyDownEHId = findDisplay 46 displayAddEventHandler [\"KeyDown\", \"hint str _this;\"];"]},{"code":["moduleName_keyDownEHId = findDisplay 46 displayAddEventHandler [\"KeyDown\", { hint str _this }];"]}],"see_also":["disableSerialization","displayRemoveAllEventHandlers","displayRemoveEventHandler","displaySetEventHandler","ctrlAddEventHandler","User Interface Event Handlers","findDisplay","DIK KeyCodes","keyName"],"notes":[{"user":"Axyl","date":"2014-03-10T14:52:00Z","text":"From within an Addon, you must assign the events from a spawned script. e.g.\n\n```sqf\n0 spawn { findDisplay 46 displayAddEventHandler [\"KeyDown\", \"_this call my_KeyDownFunctionhandler\"]; };\n```"},{"user":"Pigneedle","date":"2016-01-22T08:15:00Z","text":"Be sure to wait until the main display is initialized before using this command by using:\n\n```sqf\nwaitUntil { !isNull (findDisplay 46) };\n```"},{"user":"Nelis75733126","date":"2017-05-28T11:32:00Z","text":"use (\n#define) if you want `displayAddEventHandler` to use data defined in the same script. You can then integrate that data either directly, or by applying format to the second parameter."},{"user":"DrSova","date":"2017-08-07T15:08:00Z","text":"Using **KeyUp** you can't override default engine action by returning **true**"},{"user":"R3vo","date":"2021-06-26T16:17:00Z","text":"To prevent a display from getting closed by pressing ESC, add the following event handler.\n\n```sqf\n#include \"\\a3\\ui_f\\hpp\\definedikcodes.inc\"\n_display displayAddEventHandler [\"KeyDown\",\n{\n    params [\"\", \"_key\"];\n    _key == DIK_ESC; // ESC pressed while dialog is open, overwrite default behaviour\n}];\n```"}]},{"name":"displayChild","title":"displayChild","type":"command","url":"https://community.bistudio.com/wiki/displayChild","revid":310334,"updated":"2022-05-05T16:57:20Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Returns child display of the given display.","syntaxes":[{"syntax":"displayChild display","params":[{"name":"display","type":"Display","type_expr":"Display"}],"returns":{"type":"Display","type_expr":"Display"},"form":"unary","right":{"text":"display"}}],"examples":[{"code":["_display = displayChild findDisplay 313; // display #46"]}],"see_also":["displayParent","findDisplay","displayCtrl","createDisplay","createDialog","dialog","displayNull","ctrlCreate","controlNull","ctrlParent","ctrlParentControlsGroup","focusedCtrl"]},{"name":"displayCtrl","title":"displayCtrl","type":"command","url":"https://community.bistudio.com/wiki/displayCtrl","revid":379334,"updated":"2026-10-30T23:52:42Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return child control with specified idc.","syntaxes":[{"syntax":"display displayCtrl idc","params":[{"name":"display","type":"Display","type_expr":"Display"},{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Control","type_expr":"Control"},"form":"binary","left":{"text":"display"},"right":{"text":"idc"}},{"syntax":"displayCtrl idc","since":"arma3 2.06","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Control","type_expr":"Control"},"form":"unary","right":{"text":"idc"}}],"examples":[{"code":["_displayControl = _ParentDisplay displayCtrl 101;"]},{"code":["_dialogControl = displayCtrl 101;"]}],"see_also":["findDisplay","ctrlCreate","ctrlDelete","ctrlModel","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlClassName","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp","displayParent"],"notes":[{"user":"Demellion","date":"2017-05-01T03:44:00Z","text":"Since **Arma 3 1.42** you can also return a control inside a controls group using controlsGroupCtrl (created with ctrlCreate or inside a controls[] of a control config). Example:\n\n```sqf\n((uiNamespace getVariable \"RscUnitInfo\") displayCtrl 2303) controlsGroupCtrl 154; // Display -> Controls Group -> Control\n```\n\nNote that control inside controls group having **-1 IDC** currently cannot be returned in any way."}]},{"name":"displayNull","title":"displayNull","type":"command","url":"https://community.bistudio.com/wiki/displayNull","revid":321054,"updated":"2022-05-13T12:16:25Z","groups":["GUI Control","Variables"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"A non-existing Display. To compare non-existent displays use isNull or isEqualTo:\n\n```sqf\ndisplayNull == displayNull;        // false\nisNull displayNull;                    // true\ndisplayNull isEqualTo displayNull;    // true\n```","syntaxes":[{"syntax":"displayNull","params":[],"returns":{"type":"Display","type_expr":"Display"},"form":"nullary"}],"examples":[{"code":["!isNull displayNull; // false"]},{"code":["str displayNull; // No display"]}],"see_also":["controlNull","grpNull","locationNull","objNull","taskNull","teamMemberNull","scriptNull","configNull","typeName","isNull","displayParent"],"notes":[{"user":"7erra","date":"2022-02-05T16:02:02Z","text":"When used in the debug console or as output in the chat or rpt it is displayed as \"No display\"."}]},{"name":"displayParent","title":"displayParent","type":"command","url":"https://community.bistudio.com/wiki/displayParent","revid":318897,"updated":"2022-05-13T09:22:00Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns parent display of the given display.","syntaxes":[{"syntax":"displayParent display","params":[{"name":"display","type":"Display","type_expr":"Display"}],"returns":{"type":"Display","type_expr":"Display"},"form":"unary","right":{"text":"display"}}],"examples":[{"code":["_display = displayParent findDisplay 49; // Display #46"]}],"see_also":["displayChild","findDisplay","displayCtrl","createDisplay","createDialog","dialog","displayNull","ctrlCreate","controlNull","ctrlParent","ctrlParentControlsGroup","focusedCtrl"]},{"name":"displayRemoveAllEventHandlers","title":"displayRemoveAllEventHandlers","type":"command","url":"https://community.bistudio.com/wiki/displayRemoveAllEventHandlers","revid":319041,"updated":"2022-05-13T09:22:14Z","groups":["GUI Control - Event Handlers","Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Remove all event handlers from the given display.","syntaxes":[{"syntax":"display displayRemoveAllEventHandlers eventName","params":[{"name":"display","type":"Display","type_expr":"Display"},{"name":"eventName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"display"},"right":{"text":"eventName"}}],"examples":[{"code":["findDisplay 46 displayRemoveAllEventHandlers \"KeyDown\";"]}],"see_also":["displayAddEventHandler","displayRemoveEventHandler"]},{"name":"displayRemoveEventHandler","title":"displayRemoveEventHandler","type":"command","url":"https://community.bistudio.com/wiki/displayRemoveEventHandler","revid":379335,"updated":"2026-10-30T23:52:50Z","groups":["GUI Control - Event Handlers","Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Remove a given event handler from the given display.","syntaxes":[{"syntax":"display displayRemoveEventHandler [handlerType, id]","params":[{"name":"display","type":"Display","type_expr":"Display"},{"name":"handlerType","type":"String","description":"type of the event handler","type_expr":"String"},{"name":"id","type":"Number","description":"index of the event handler","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"display"},"right":{"text":"[handlerType, id]"}}],"examples":[{"code":["findDisplay 46 displayRemoveEventHandler [\"keyDown\",5];"]}],"see_also":["disableSerialization","Display","displayAddEventHandler","displayRemoveAllEventHandlers"],"notes":[{"user":"Nelis75733126","date":"2015-04-19T21:25:00Z","text":"If you for example used this code to add the eventHandler:\n\n```sqf\n_myEH = findDisplay 46 displayAddEventHandler [\"KeyDown\", \"hint str _this\"];\n```\n\nThen later in that same script you can use the `_myEH` private variable to remove that same eventHandler again:\n\n```sqf\nfindDisplay 46 displayRemoveEventHandler [\"KeyDown\", _myEH];\n```\n\n( if obviously that private variable is known to the script environment you are referencing `_myEH` in )"}]},{"name":"displaySetEventHandler","title":"displaySetEventHandler","type":"command","url":"https://community.bistudio.com/wiki/displaySetEventHandler","revid":369398,"updated":"2024-09-03T18:43:19Z","groups":["GUI Control - Event Handlers","Event Handlers"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets given event handler of given display.\nThe return code of the provided function should indicate whether this event was handled correctly. This implies telling the engine whether it is default code should be executed.\nSee User Interface Event Handlers for the full list of handler names.\nIf applicable, see DIK KeyCodes for a list of key code constants, which are relevant to key related user interface events like onKeyDown and onKeyUp.\n\n> [!IMPORTANT]\n> When using the event names listed here with the ctrlAddEventHandler, ctrlSetEventHandler, displayAddEventHandler or displaySetEventHandler commands, the prefix \"on\" in the event name must be removed (e.g. '**ButtonDown'** instead of '**onButtonDown'**).","syntaxes":[{"syntax":"display displaySetEventHandler [handlerName, function]","params":[{"name":"display","type":"Display","type_expr":"Display"},{"name":"handlerName","type":"String","type_expr":"String"},{"name":"function","type":"String","description":"code","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"display"},"right":{"text":"[handlerName, function]"}}],"examples":[{"code":["_control displaySetEventHandler [\"KeyDown\", \"\"];"]},{"text":"`init.sqf`:\n\n```sqf\nKeysPressed = compile preprocessFile \"keysPressed.sqf\";\nprivate _display = findDisplay 46;\n_display displaySetEventHandler [\"KeyDown\", \"_this call KeysPressed\"];\n```\n\n`keysPressed.sqf`:\n\n```sqf\nprivate _handled = false;\nswitch (_this select 1) do {\n    // F key\n    case 33: {\n        // code here\n        _handled = true;\n    };\n};\n_handled;\n```","code":["KeysPressed = compile preprocessFile \"keysPressed.sqf\";\nprivate _display = findDisplay 46;\n_display displaySetEventHandler [\"KeyDown\", \"_this call KeysPressed\"];","private _handled = false;\nswitch (_this select 1) do {\n\t// F key\n\tcase 33: {\n\t\t// code here\n\t\t_handled = true;\n\t};\n};\n_handled;"]}],"see_also":["ListOfKeyCodes","displayAddEventHandler","displayRemoveEventHandler","displayRemoveAllEventHandlers","ctrlSetEventHandler","User Interface Event Handlers","DIK KeyCodes","keyName"],"notes":[{"user":"WGL.Q","date":"2009-11-25T18:02:00Z","text":"Always use displayAddEventHandler instead, as displaySetEventHandler **overwrites** other (peoples') DEH."}]},{"name":"displayUniqueName","title":"displayUniqueName","type":"command","url":"https://community.bistudio.com/wiki/displayUniqueName","revid":338365,"updated":"2023-03-01T10:17:02Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Get the provided display's UI On Texture unique name.\n\n> [!NOTE]\n> See findDisplay to get a Display by its unique name.","syntaxes":[{"syntax":"displayUniqueName display","params":[{"name":"display","type":"Display","type_expr":"Display"}],"returns":{"type":"String","type_expr":"String","description":"the unique display identifier"},"form":"unary","right":{"text":"display"}}],"examples":[{"code":["private _displayName = displayUniqueName _myDisplay;"]}],"see_also":["findDisplay","displayUpdate"]},{"name":"displayUpdate","title":"displayUpdate","type":"command","url":"https://community.bistudio.com/wiki/displayUpdate","revid":338339,"updated":"2023-02-28T14:38:10Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Set the provided display to update its UI On Texture render.","syntaxes":[{"syntax":"displayUpdate display","params":[{"name":"display","type":"Display","description":"the display to update","type_expr":"Display"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"display"}}],"examples":[{"code":["displayUpdate _myDisplay;"]}],"see_also":["displayUniqueName"]},{"name":"dissolveTeam","title":"dissolveTeam","type":"command","url":"https://community.bistudio.com/wiki/dissolveTeam","revid":322979,"updated":"2022-06-28T21:42:55Z","groups":["Groups"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local"},"description":"Dissolves the given team. All members become members of the main team.","syntaxes":[{"syntax":"dissolveTeam teamColor","params":[{"name":"teamColor","type":"String","description":"can be one of:\n\n- \"RED\"\n- \"GREEN\"\n- \"BLUE\"\n- \"YELLOW\"","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"teamColor"}}],"examples":[{"code":["dissolveTeam \"RED\";"]}],"see_also":["assignTeam","unassignTeam"]},{"name":"distance","title":"distance","type":"command","url":"https://community.bistudio.com/wiki/distance","revid":377523,"updated":"2026-01-02T06:52:13Z","groups":["Math - Geometry"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns a distance in meters between Objects, Positions or Locations.\n\n> [!IMPORTANT]\n> If positions are supplied as arguments, the coordinates are treated as PositionAGL. If Position2D is supplied, z is assumed 0. If you need distance between two Position3D coordinates, use vectorDistance.","syntaxes":[{"syntax":"param1 distance param2","params":[{"name":"param1","type":"Object or PositionAGL or Position2D","type_expr":"Object | PositionAGL | Position2D"},{"name":"param2","type":"Object or PositionAGL or Position2D","type_expr":"Object | PositionAGL | Position2D"}],"returns":{"type":"Number","type_expr":"Number","description":"distance in meters or 1e10 if distance cannot be calculated"},"form":"binary","left":{"text":"param1"},"right":{"text":"param2"}},{"syntax":"location1 distance location2","params":[{"name":"location1","type":"Location or Position or Position2D","type_expr":"Location | Position | Position2D"},{"name":"location2","type":"Location or Position or Position2D","type_expr":"Location | Position | Position2D"}],"returns":{"type":"Number","type_expr":"Number","description":"distance in meters or 1e10 if distance cannot be calculated"},"form":"binary","left":{"text":"location1"},"right":{"text":"location2"}},{"syntax":"a distance b","since":"arma3 2.18","params":[{"name":"a","type":"Number","type_expr":"Number"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"distance c calculated as c = sqrt(a * a + b * b);"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"code":["_meters = player distance _object;"]},{"code":["_meters = player distance [1,2,3];"]},{"code":["_meters = [1,2,3] distance [4,5,6];"]},{"code":["_meters = position player distance nearestLocation [position player, \"hill\"];"]}],"see_also":["distanceSqr","vectorDistance","distance2D"],"notes":[{"user":"Sudden Death","date":"2007-02-14T16:47:00Z","text":"Distance to position3D (array) does not work with Operation Flashpoint, only objects\n\nArmed Assault:\nposition3D (array) and object works"},{"user":"Rommel","date":"2010-03-10T07:54:00Z","text":"This returns the map distance, not the vector distance, [0,0,0] distance [0,0,1] can be >1 or <1, not exactly 1; unlike the vector math."},{"user":"Igneous01","date":"2012-08-03T10:15:00Z","text":"If a position in format [x, y, z] is provided for both arguments, distance also checks the z dimension as well. Ie:\nplayer distance [0,0,200]\nwill return 200, if the player is at this position at ground/sea level."},{"user":"AgentRev01","date":"2014-03-23T02:52:00Z","text":"When objects are supplied as arguments, distance is calculated from their model center (object modelToWorld [0,0,0]), and not the position returned by getPos/ATL/ASL.\nHowever, this is not relevant for units, as their model center matches their world position."}]},{"name":"distance2D","title":"distance2D","type":"command","url":"https://community.bistudio.com/wiki/distance2D","revid":363614,"updated":"2024-04-08T11:45:05Z","groups":["Math - Geometry"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","locality":{"argument":"global"},"description":"Returns a 2D distance (distance projected to X,Y plane) in meters between Objects and/or Positions.","syntaxes":[{"syntax":"from distance2D to","params":[{"name":"from","type":"Object, Position2D or Position3D","type_expr":"Object | Position2D | Position3D"},{"name":"to","type":"Object, Position2D or Position3D","type_expr":"Object | Position2D | Position3D"}],"returns":{"type":"Number","type_expr":"Number","description":"distance in meters or 1e10 if distance cannot be calculated"},"form":"binary","left":{"text":"from"},"right":{"text":"to"}}],"examples":[{"code":["_meters = player distance2D heli;"]}],"see_also":["distance","distanceSqr","vectorDistance"]},{"name":"distanceSqr","title":"distanceSqr","type":"command","url":"https://community.bistudio.com/wiki/distanceSqr","revid":379216,"updated":"2026-10-30T22:25:34Z","groups":["Math - Geometry"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Computes the [squared distance](https://en.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance) between two objects or positions.\nThis command is faster than distance by saving a square root operation, useful for mass-checking distance without the need of the distance value itself.","syntaxes":[{"syntax":"var1 distanceSqr var2","params":[{"name":"var1","type":"Object or Position","type_expr":"Object | Position"},{"name":"var2","type":"Object or Position","type_expr":"Object | Position"}],"returns":{"type":"Number","type_expr":"Number","description":"squared distance in square meters or 1e10 if distance cannot be calculated"},"form":"binary","left":{"text":"var1"},"right":{"text":"var2"}},{"syntax":"location1 distanceSqr location2","params":[{"name":"location1","type":"Location or Position","type_expr":"Location | Position"},{"name":"location2","type":"Location or Position","type_expr":"Location | Position"}],"returns":{"type":"Number","type_expr":"Number","description":"squared distance in square meters or 1e10 if distance cannot be calculated"},"form":"binary","left":{"text":"location1"},"right":{"text":"location2"}},{"syntax":"a distanceSqr b","since":"arma3 2.18","params":[{"name":"a","type":"Number","type_expr":"Number"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"distance c calculated as `c = a * a + b * b`"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"text":"```sqf\nprivate _distanceSquared = 5 * 5;\nif (player distanceSqr leader player < _distanceSquared) then // similar to player distance leader player < 5\n{\n    hint \"You are less than 5m from the leader!\";\n};\n```","code":["private _distanceSquared = 5 * 5;\nif (player distanceSqr leader player < _distanceSquared) then // similar to player distance leader player < 5\n{\n\thint \"You are less than 5m from the leader!\";\n};"]},{"code":["private _distance = sqrt ((x2 - x1) ^ 2 + (y2 - y1) ^ 2 + (z2 - z1) ^ 2);\nprivate _distanceSqr = (x2 - x1) ^ 2 + (y2 - y1) ^ 2 + (z2 - z1) ^ 2;\n_distance = [x1, y1, z1] distance [x2, y2, z2];\n_distanceSqr = [x1, y1, z1] distanceSqr [x2, y2, z2];\n_distance = sqrt ([x1, y1, z1] distanceSqr [x2, y2, z2]);\n_distanceSqr = ([x1, y1, z1] distance [x2, y2, z2]) ^ 2;"]}],"see_also":["distance","vectorDistanceSqr","distance2D"]},{"name":"distributionRegion","title":"distributionRegion","type":"command","url":"https://community.bistudio.com/wiki/distributionRegion","revid":318977,"updated":"2022-05-13T09:22:07Z","groups":["System"],"status":"ok","games":{"arma1":"1.05","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.05","arma3_since":"0.50","description":"Returns the numerical index for the distribution region of this copy of Armed Assault.\n\n1. USA\n1. Rest of the world","syntaxes":[{"syntax":"distributionRegion","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["if (distributionRegion == 1) then { hint \"miles\"; } else { hint \"kilometres\"; };"]}],"see_also":["productVersion"]},{"name":"do","title":"do","type":"command","url":"https://community.bistudio.com/wiki/do","revid":311159,"updated":"2022-05-11T13:17:42Z","groups":["Program Flow"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Executes *code*. Used as part of a construct, such as while, with, for and switch. The *code* is always executed in missionNamespace unless do is used with with as an argument.","syntaxes":[{"syntax":"construct do code","params":[{"name":"construct","type":"While Type (while), With Type (with), For Type (for), Switch Type (switch)","type_expr":"While Type | With Type | For Type | Switch Type"},{"name":"code","type":"Code","type_expr":"Code"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"construct"},"right":{"text":"code"}}],"examples":[{"text":"```sqf\nwhile { b > a } do\n{\n    a = a + 1;\n};\n```","code":["while { b > a } do\n{\n\ta = a + 1;\n};"]},{"text":"```sqf\nwith uiNamespace do\n{\n    MyUIVar = MyUIVar + 5;\n};\n```","code":["with uiNamespace do\n{\n\tMyUIVar = MyUIVar + 5;\n};"]},{"text":"```sqf\nfor \"_i\" from 1 to 10 do\n{\n    systemChat str _i;\n    sleep 0.5;\n};\n```","code":["for \"_i\" from 1 to 10 do\n{\n\tsystemChat str _i;\n\tsleep 0.5;\n};"]},{"text":"```sqf\nswitch (50) do\n{\n    case 25: { hint \"25\" };\n    case 50: { hint \"50\" }; // hints \"50\"\n    case 75: { hint \"75\" };\n    default { hint \"nope\" };\n};\n```","code":["switch (50) do\n{\n\tcase 25: { hint \"25\" };\n\tcase 50: { hint \"50\" }; // hints \"50\"\n\tcase 75: { hint \"75\" };\n\tdefault { hint \"nope\" };\n};"]}],"see_also":["Control Structures"]},{"name":"do3DENAction","title":"do3DENAction","type":"command","url":"https://community.bistudio.com/wiki/do3DENAction","revid":378238,"updated":"2026-03-20T14:10:01Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Performs given Eden Editor action.\n\n> [!WARNING]\n> Prior to Arma 3 v2.12 it was possible to use this command outside of Eden Editor.\n> For example `do3DENAction \"MissionSave\";` would wipe the mission.sqm without a way to restore it when executed accidentally during preview.","syntaxes":[{"syntax":"do3DENAction action","params":[{"name":"action","type":"String","description":"see Eden Editor: Actions","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"action"}},{"syntax":"do3DENAction [action, argument]","since":"arma3 2.22","params":[{"name":"action","type":"String","description":"see Eden Editor: Actions","type_expr":"String"},{"name":"argument","type":"Anything","description":"depends on the used action","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[action, argument]"}}],"examples":[{"code":["do3DENAction \"MissionSave\";"]},{"code":["// Since 2.22\nprivate _par = createHashMap;\n_par set [\"name\", \"testfile\"];\n_par set [\"folder\", \"subfolder\"];\n_par set [\"content\", \"R3voing\"];\n\ndo3DENAction [\"CreateTextFile\", _par];"]}],"see_also":["get3DENActionState"]},{"name":"doArtilleryFire","title":"doArtilleryFire","type":"command","url":"https://community.bistudio.com/wiki/doArtilleryFire","revid":379217,"updated":"2026-10-30T22:26:55Z","groups":["Artillery"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local"},"description":"Orders an artillery unit to fire a burst on the given position (silently).","syntaxes":[{"syntax":"unit doArtilleryFire [position, type, rounds]","params":[{"name":"unit","type":"Object or Array of Objects","description":"if an array is given, only its first element is used","type_expr":"Object | Array<Object>"},{"name":"position","type":"PositionAGL","type_expr":"PositionAGL"},{"name":"type","type":"String","description":"magazine class name from CfgMagazines (case sensitive).","type_expr":"String"},{"name":"rounds","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[position, type, rounds]"}}],"examples":[{"code":["Mortar doArtilleryFire [[3000, 120, 1000], \"8Rnd_82mm_Mo_shells\", 3];"]}],"problems":"The unit will fire a burst even if the **rounds** parameter is 0 or a negative number.","see_also":["commandArtilleryFire","getArtilleryAmmo","getArtilleryETA","enableEngineArtillery","getArtilleryComputerSettings","shownArtilleryComputer","inRangeOfArtillery","fire","doFire","commandFire","canFire","fireAtTarget","forceWeaponFire","commandSuppressiveFire","doSuppressiveFire","isManualFire"],"notes":[{"user":"ansin11","date":"2020-04-18T14:26:00Z","text":"This command can not fire bursts consisting of more rounds than the given magazine type holds, even if there are several magazines of the same type available. The fire mission issued by this command ends once the artillery unit has to reload.\n\n**Example:**\n\nThe Mk6 Mortar comes with four \"8Rnd_82mm_Mo_shells\" magazines, giving it a total of 32 HE shells. However, `_mortar doArtilleryFire [_somePos, \"8Rnd_82mm_Mo_shells\", 10];` will only fire 8 rounds instead of 10.\n\nSimilarly, ...\n\n```sqf\n_mortar doArtilleryFire [_somePos, \"8Rnd_82mm_Mo_shells\", 7]; // First burst\nsleep 20; // Wait until first burst has been fired\n_mortar doArtilleryFire [_somePos, \"8Rnd_82mm_Mo_shells\", 2]; // Second burst\n```\n\n... will only fire 8 rounds total instead of 9; the second round of the second burst is never fired because the artillery unit has to reload after the first round of the second burst."},{"user":"Leopard20","date":"2022-08-25T21:05:17Z","text":"After using this command, use unitReady to see if the unit is done firing all rounds:\n\n```sqf\n_mortar doArtilleryFire [[3000, 120, 1000], \"8Rnd_82mm_Mo_shells\", 3];\nwaitUntil {sleep 1; unitReady _mortar}; // Note: make sure you run this in scheduled environment\n_mortar sideChat \"Rounds fired!\";\n```"}]},{"name":"doFire","title":"doFire","type":"command","url":"https://community.bistudio.com/wiki/doFire","revid":378648,"updated":"2026-05-17T15:10:41Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Order the given unit(s) to fire on the given target (without radio messages).\n\nThe target is set with doTarget or commandTarget.\n\nThe target can be a unit or a vehicle, but not an object.","syntaxes":[{"syntax":"unit doFire target","params":[{"name":"unit","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"target"}}],"examples":[{"code":["_ESoldier1 doFire _WSoldier1;"]}],"see_also":["fire","commandFire","canFire","fireAtTarget","forceWeaponFire","commandArtilleryFire","commandSuppressiveFire","doArtilleryFire","doSuppressiveFire","isManualFire"],"notes":[{"user":"Hardrock","date":"2006-08-03T14:31:00Z","text":"*Notes from before the conversion:*\n\nIt is often helpful to use doTarget first."},{"user":"Hurricane","date":"2007-03-25T23:17:00Z","text":"A unit will not execute this command when his behaviour is set to \"careless\"."},{"user":"Sakura_chan","date":"2012-06-07T14:05:00Z","text":"`unitName doFire objNull` does not work like it does in `commandFire`.\nTarget var has to be real (Arma 2:OA) might be different in other versions."}]},{"name":"doFollow","title":"doFollow","type":"command","url":"https://community.bistudio.com/wiki/doFollow","revid":353189,"updated":"2024-03-12T13:35:21Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Order the given unit(s) to follow another from his own group as his formation leader (without radio messages).\nIt is also used to order the unit to **return to formation** after e.g doStop even if it is the leader himself that should return to formation (see Example 2).","syntaxes":[{"syntax":"unit doFollow unitLead","params":[{"name":"unit","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"unitLead","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"unitLead"}}],"examples":[{"code":["_soldier1 doFollow _soldier2;"]},{"code":["units _group doFollow leader _group; // returns all the units to formation"]}],"see_also":["doStop","doMove","commandFollow","formationLeader","formLeader","isFormationLeader","leader","selectLeader","setLeader"],"notes":[{"user":"Mojito69","date":"2010-10-11T18:00:00Z","text":"These commands (doFollow or commandFollow) work only if the two units are in the same group."},{"user":"BaerMitUmlaut","date":"2016-08-29T23:48:00Z","text":"The name of this command is a bit misleading, it is used to make a unit return to the formation of its group or subformation."},{"user":"Leopard20","date":"2022-02-17T12:25:29Z","text":"doFollow doesn't work with player-issued commands (those issued via the commanding menus). As a workaround, it is possible to use joinSilent instead, and join the unit into its current group:\n\n```sqf\n[_unit] joinSilent group _unit; // return to formation\n```\n\nNote that the group must have **at least 2 units**, and not all units should be joined at once, otherwise the group will temporarily become empty and all its waypoints **will be lost**!"}]},{"name":"doFSM","title":"doFSM","type":"command","url":"https://community.bistudio.com/wiki/doFSM","revid":379414,"updated":"2026-10-31T00:03:21Z","groups":["Unit Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Orders a unit to process command defined by FSM file (silently).\n\nUnlike with execFSM where *_this* is passed to the FSM, the following parameters are passed when using doFSM/commandFSM:\n\n_leader: leader of subgroup with this command\n_destination: command destination/position\n_target: command target\n_units: list of all persons in subgroup","syntaxes":[{"syntax":"unit doFSM [fsmName, position, target]","params":[{"name":"unit","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"fsmName","type":"String","type_expr":"String"},{"name":"position","type":"Position","type_expr":"Position"},{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[fsmName, position, target]"}}],"examples":[{"code":["_soldierOne doFSM [\"move.fsm\", position player, player];"]},{"code":["units player doFSM [\"move.fsm\", position player, player];"]}],"see_also":["FSM","FSM Editor Manual","commandFSM","completedFSM","execFSM","getFSMVariable","setFSMVariable","unitReady"],"notes":[{"user":"Rübe","date":"2010-08-04T16:09:00Z","text":"Do not *doStop* a unit in a FSM called with *doFSM* or *commandFSM*. Doing so nevertheless will halt your FSM, since no links are followed anymore (doing so in an end state should be fine though). Also this may crash your game in certain mysterious circumstances.\n\nYou may design your FSM so that they may be called with doFSM/commandFSM and execFSM likewise by checking if *_units* or *_this* is nil and then init the variables accordingly. Just remember that you should use the low level *moveTo* (together with *moveToCompleted*, *moveToFailed*) if do-/commandFSM'd, and *doMove* or *commandMove* (together with *unitReady*) if execFSM'd. A *moveTo* in an FSM started with *execFSM* won't do anything, likewise *doMove* in a FSM started with *doFSM* or *commandFSM* wont work either. Think about it for a minute and you will see why. (hint: a unit running a FSM called with *doFSM* or *commandFSM* will _never_ return true for *(unitReady _unit)*)\n\nAnyway, if you want to be able to call your FSM either way, a \"ready\" condition might look light this: *(moveToCompleted _unit) || (moveToFailed _unit) || (unitReady _unit)*, assuming you have a *moveTo* or a *doMove* (depending on how the fsm is called) in the prior state."},{"user":"Katulobotomia","date":"2015-02-14T13:36:00Z","text":"Adding to Rübe's note, doFSM can be checked if it has finished by *unitReady* as of 2015 and it will return *true* when your FSM has completed."}]},{"name":"doGetOut","title":"doGetOut","type":"command","url":"https://community.bistudio.com/wiki/doGetOut","revid":310022,"updated":"2022-05-05T12:20:49Z","groups":["Unit Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Orders one or multiple units to get out from the vehicle (silently). Same as commandGetOut with latter being shown via radio chat.\n\nNotes:\n\n- Works for both AI and player entities\n- AI unit gets back in - unless is under player command or combined with other sqf commands (orderGetIn false, allowGetIn false or leaveVehicle)\n- Ignores vehicle's lock state - unlike action \"Eject\" and moveOut\n- AI waits for execution until vehicle has stopped/is no longer flying (unclear if any timeout exists for order to be discarded) - unlike action \"Eject\" and moveOut\n- Plays the vehicle's position's get out animation (same as action \"Eject\") - unlike moveOut\n- When execute for multiple units, it waits till the action is completed, before the next to take his turn (same as action \"Eject\") - unlike moveOut\n- AI gets back into formation afterwards\n- Works only on alive units - unlike action \"Eject\" (one after another) or moveOut (instantly)\n- Does not work on unconscious - unless the AI is under player command. Unlike moveOut or action \"Eject\" (but one after another))","syntaxes":[{"syntax":"doGetOut units","params":[{"name":"units","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"units"}}],"examples":[{"code":["doGetOut _unitOne;"]},{"code":["doGetOut [_unitOne,_unitTwo];"]}],"multiplayer":"This command is only effective when used on local units. When used on a remote unit, this command will create radio dialogue on the machine the unit is local to, but the unit will not leave the vehicle.","see_also":["commandGetOut","moveOut","leaveVehicle"]},{"name":"doMove","title":"doMove","type":"command","url":"https://community.bistudio.com/wiki/doMove","revid":379415,"updated":"2026-10-31T00:03:29Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Order the given unit(s) to move to the given position (without radio messages). Upon reaching its destination, if it is the group leader it will order the group to form around it's new position. If it is not the leader, it will immediately be ordered to return to formation by the group leader and begin moving back to the group. Use doStop to stop units returning to formation. moveToCompleted will return true when a unit issued this command reaches its destination.","syntaxes":[{"syntax":"unit(s) doMove position","params":[{"name":"unit(s)","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"position","type":"Position","type_expr":"Position"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit(s)"},"right":{"text":"position"}}],"examples":[{"code":["_soldier1 doMove (position _officer);"]},{"code":["this doMove (getMarkerPos \"Marker1\");"]}],"see_also":["commandMove","setDestination","moveTo","move","addWaypoint"],"notes":[{"user":"Kronzky","date":"2008-02-09T00:00:00Z","text":"If doMove is to be used in conjunction with waypoint behavior commands (e.g. setSpeedMode), then those have to be issued *after* the move command to have an effect. Otherwise the move will be done with the default settings."},{"user":"General_Barron","date":"2009-02-03T00:00:00Z","text":"If a unit is part of a group, and is not the leader, the unit will fall back into formation soon after the domove is completed. This does not happen for units that are in a group alone (because they are their own leader).\nThere is no single command to get a unit to move to a position and stay there. The best way to do this is to issue a domove, then wait for the unit to reach his destination, then disable his movement AI."},{"user":"DreadedEntity","date":"2022-04-02T15:22:26Z","text":"The above note is only true of units which group leader is not the player. Player-squad will remain in position until given another order (A3 v2.08.149102)"},{"user":"DreadedEntity","date":"2022-04-02T20:35:58Z","text":"If you need your script to halt until the unit has reached it's destination, waitUntil and moveToCompleted will come in handy:\n\n```sqf\n_unit doMove _pos;\nwaitUntil {moveToCompleted _unit};\n```\n\nThis also works with commandMove"},{"user":"Waffle SS.","date":"2022-07-25T06:25:19Z","text":"Seems to use PositionATL, which may be important if the destination is above a building's 1st floor."}]},{"name":"doorPhase","title":"doorPhase","type":"command","url":"https://community.bistudio.com/wiki/doorPhase","revid":318909,"updated":"2022-05-13T09:22:01Z","groups":["Animations"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Return animation phase of door on vehicle.","syntaxes":[{"syntax":"object doorPhase door","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"door","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"object"},"right":{"text":"door"}}],"examples":[{"code":["_phase = heli doorPhase \"door_L\";"]}],"see_also":["animateDoor","setFaceAnimation","animate","animationPhase","animateSource","animationSourcePhase","animationNames"]},{"name":"doStop","title":"doStop","type":"command","url":"https://community.bistudio.com/wiki/doStop","revid":336220,"updated":"2022-12-14T20:43:09Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Order the given unit(s) to stop (without radio messages). The units stopped in this way will leave the groups formation. It will prevent them from moving around with their group (or formation leader), while still being able to turn around and even move to a new position if they see fit.\n\nThe units will still respond to orders from their group leader (like engage, rearm, board a vehicle), but all of their actions will be separate from the group formation. To resume group default behaviour, use doFollow command. For example: `units _group doFollow leader _group;`","syntaxes":[{"syntax":"doStop unit(s)","params":[{"name":"unit(s)","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit(s)"}}],"examples":[{"code":["doStop _soldier1;"]},{"code":["doStop [_soldier1, _soldier2];"]},{"code":["doStop (units player);"]}],"see_also":["commandStop","stop","stopped","doMove","doFollow"],"notes":[{"user":"Hardrock","date":"2006-08-03T14:32:00Z","text":"*Notes from before the conversion:*\n\nThis command will make the unit stop where he is until the unit's group engages the enemy. At that time, the unit will move and fight the enemy. One good use for this is to place a bunch of units in the same group around a campfire or in some other place \"for looks\", and make them sit down or have their weapon on their back. When the enemy is spotted, they will get up and attack. Note that you cannot do something like place somebody behind sandbags and keep him there during a fight with this command. For that you will need disableAI \"move\"."},{"user":"Ceeeb","date":"2009-02-21T00:13:00Z","text":"In **ArmA 1.14**, this command will not stop a unit that has been given a move order by selecting the unit, then clicking on the in game map (or ground)."},{"user":"Katulobotomia","date":"2013-09-26T12:30:00Z","text":"doStop'ed units WILL return to formation if their leader's behaviour isn't set to \"COMBAT\". The squad leader will also order everyone to return to formation if there are no enemies nearby in a set period of time, overwriting the doStop command. doStop can be best used to simply stop the unit from doing whatever he is currently doing without radio messages."},{"user":"Killzone_Kid","date":"2016-12-23T21:22:00Z","text":"When a unit reaches position given with doMove, unitReady becomes true. If doStop command is not executed, unit will start wondering on its own soon after, especially if unit is under fire. doStop will keep unit at the given position, but watch out for unitReady as it will become false since unit is holding position indefinitely."},{"user":"Killzone_Kid","date":"2016-12-27T00:30:00Z","text":"Although it is possible to resume group default behaviour by joining units into own group like this `units _group joinSilent _group` there is a risk that the leader will change. Instead use doFollow command as explained in the description."}]},{"name":"doSuppressiveFire","title":"doSuppressiveFire","type":"command","url":"https://community.bistudio.com/wiki/doSuppressiveFire","revid":377829,"updated":"2026-01-03T04:28:58Z","groups":["Unit Control"],"status":"ok","games":{"arma3":"1.60"},"since":"arma3 1.60","arma3_since":"1.60","locality":{"argument":"local","effect":"global"},"description":"Orders the given unit or a group of units to suppress the given position or target (without radio messages, see commandSuppressiveFire is you need messages).\n\n- When an Array of units is passed as param, only units from the same Group as the first unit in array are considered.\n- The unit (units) starts firing at the given target or position random amount of shots (exact formula unknown, but seems to depend on amount of ammo unit has) after which it stops.\n- currentCommand shows `\"Suppress\"` and there is no way of stopping unit before it completes random amount of rounds.\n- If position is passed as target param, it stays fixed.\n- If object is passed as target param, it depends on what kind of object. If it is considered a proper target by the unit, it is tracked by the unit dynamically. If it is not, the position gets obtained via getPosWorld, which could be different from PositionASL of the object, and it is fixed even if the target is able to change position later.","syntaxes":[{"syntax":"unit doSuppressiveFire target","params":[{"name":"unit","type":"Object or Array of Objects","description":"a single unit or array of units","type_expr":"Object | Array<Object>"},{"name":"target","type":"Object or PositionASL","description":"actual target or position of the target","type_expr":"Object | PositionASL"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"target"}}],"examples":[{"code":["_soldier doSuppressiveFire [1869.508,5760.962,0.000];"]},{"code":["units player doSuppressiveFire cursorTarget;"]}],"see_also":["suppressFor","fire","doFire","commandFire","canFire","fireAtTarget","forceWeaponFire","commandArtilleryFire","commandSuppressiveFire","doArtilleryFire","isManualFire"]},{"name":"doTarget","title":"doTarget","type":"command","url":"https://community.bistudio.com/wiki/doTarget","revid":379336,"updated":"2026-10-30T23:52:58Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Order the given unit(s) to target the given target (without radio messages).\nTargeting can be stopped by\n\n```sqf\n_unit doWatch objNull;\n```\n\nor\n\n```sqf\n_unit commandWatch objNull;\n```","syntaxes":[{"syntax":"unit doTarget target","params":[{"name":"unit","type":"Object or Array of Objects","description":"a single unit or array of units","type_expr":"Object | Array<Object>"},{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"target"}}],"examples":[{"code":["_ESoldier1 doTarget _WSoldier1;"]}],"see_also":["assignedTarget","commandTarget","doWatch","doFire"],"notes":[{"user":"Joris","date":"2017-03-28T08:18:00Z","text":"Targeting may not work as expected when trying to target a unit on the same side (friendly)."}]},{"name":"doWatch","title":"doWatch","type":"command","url":"https://community.bistudio.com/wiki/doWatch","revid":379337,"updated":"2026-10-30T23:53:06Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Order the given unit(s) to watch the given position or target (without radio messages). Use objNull as the target to order a unit to stop watching a position/target.","syntaxes":[{"syntax":"unit(s) doWatch position","params":[{"name":"unit(s)","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"position","type":"Position","type_expr":"Position"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit(s)"},"right":{"text":"position"}},{"syntax":"unit(s) doWatch target","params":[{"name":"unit(s)","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit(s)"},"right":{"text":"target"}}],"examples":[{"text":"```sqf\n_soldierOne doWatch markerPos \"MarkerMoveOne\";\n```\n\nThe unit named \"soldierOne\" will watch the position where the marker \"MarkerMoveOne\" is placed.","code":["_soldierOne doWatch markerPos \"MarkerMoveOne\";"]},{"text":"```sqf\n_soldierOne doWatch _eastSoldier;\n```\n\nThe unit named \"soldierOne\" will watch the unit named \"eastSoldier\".","code":["_soldierOne doWatch _eastSoldier;"]}],"see_also":["commandWatch","lookAt","glanceAt"],"notes":[{"user":"Waffle SS.","date":"2015-04-18T07:50:00Z","text":"Also controls where a vehicle gunner aims."}]},{"name":"drawArrow","title":"drawArrow","type":"command","url":"https://community.bistudio.com/wiki/drawArrow","revid":377545,"updated":"2026-01-02T06:54:38Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Draws a single line arrow on the map.\nAs this command needs to be called every frame, it is preferable using the onDraw UI Event Handler.\nTo draw a color filled arrow of custom shape see BIS_fnc_drawArrow.","syntaxes":[{"syntax":"map drawArrow [from, to, color]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"from","type":"Object or Position2D or Position3D","description":"arrow start position","type_expr":"Object | Position2D | Position3D"},{"name":"to","type":"Object or Position2D or Position3D","description":"arrow end position","type_expr":"Object | Position2D | Position3D"},{"name":"color","type":"Array","description":"arrow color in format [r,g,b,a]","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[from, to, color]"}}],"examples":[{"text":"```sqf\nfindDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\",\n{\n    _this select 0 drawArrow [\n        player,\n        player getRelPos [100, 0],\n        [1,0,0,1]\n    ];\n}];\n```","code":["findDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\", \n{\n\t_this select 0 drawArrow [\n\t\tplayer,\n\t\tplayer getRelPos [100, 0],\n\t\t[1,0,0,1]\n\t];\n}];"]}],"see_also":["drawEllipse","drawIcon","drawLine","drawRectangle","drawPolygon","drawTriangle","drawXPolygon","BIS_fnc_drawArrow"],"notes":[{"user":"Waffle SS.","date":"2015-07-07T21:28:00Z","text":"Be careful when using this command. Unlike map markers, the draw commands can decrease your framerate."}]},{"name":"drawEllipse","title":"drawEllipse","type":"command","url":"https://community.bistudio.com/wiki/drawEllipse","revid":377551,"updated":"2026-01-02T06:54:48Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Draws an ellipse on the map. Just like with marker or trigger area, negative *a* and *b* will result in hexagon.","syntaxes":[{"syntax":"map drawEllipse [centre, a, b, angle, color, fill, alignWithMap]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"centre","type":"Object or Position2D, Position3D","description":"ellipse's centre","type_expr":"Object | Position2D | Position3D"},{"name":"a","type":"Number","description":"horizontal (x) radius","type_expr":"Number"},{"name":"b","type":"Number","description":"vertical (y) radius","type_expr":"Number"},{"name":"angle","type":"Number","description":"angle of rotation in degrees","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","description":"line color","type_expr":"Color"},{"name":"fill","type":"String","description":"fill texture file or Procedural Textures. Note that the file texture will not rotate with rectangle, use drawIcon for that. If fill texture is not empty, set line color to white [1,1,1,1]","type_expr":"String"},{"name":"alignWithMap","type":"Boolean","optional":true,"default":"true","description":"when false the shape will not follow map rotation.","type_expr":"Boolean","since":"arma3 2.18","text":"alignWithMap: Boolean - (Optional, default true) - when false the shape will not follow map rotation."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[centre, a, b, angle, color, fill, alignWithMap]"}}],"examples":[{"text":"```sqf\nfindDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\",\n{\n    _this select 0 drawEllipse [\n        player, 10, 10, 0, [1, 0, 0, 1], \"\"\n    ];\n    _this select 0 drawEllipse [\n        player, -10, -10, 0, [1, 1, 1, 1], \"#(rgb,8,8,3)color(1,0.6,0,1)\"\n    ];\n    _this select 0 drawEllipse [\n        player, -10, -10, 90, [0, 0, 1, 1], \"\"\n    ];\n}];\n```","code":["findDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\", \n{\n\t_this select 0 drawEllipse [\n\t\tplayer, 10, 10, 0, [1, 0, 0, 1], \"\"\n\t];\n\t_this select 0 drawEllipse [\n\t\tplayer, -10, -10, 0, [1, 1, 1, 1], \"#(rgb,8,8,3)color(1,0.6,0,1)\"\n\t];\n\t_this select 0 drawEllipse [\n\t\tplayer, -10, -10, 90, [0, 0, 1, 1], \"\"\n\t];\n}];"]}],"see_also":["drawArrow","drawIcon","drawLine","drawRectangle","drawPolygon","drawTriangle","drawXPolygon"],"notes":[{"user":"Waffle SS.","date":"2015-07-07T21:28:00Z","text":"Be careful when using this command. Unlike map markers, the draw commands can decrease your framerate."}]},{"name":"drawIcon","title":"drawIcon","type":"command","url":"https://community.bistudio.com/wiki/drawIcon","revid":378474,"updated":"2026-04-24T11:03:12Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Draws an icon on the map.\nAs this command needs to be called every frame, it is preferable using the onDraw UI Event Handler.\n\n> [!NOTE]\n> Some useful icons can be found in `configFile >> \"CfgVehicleIcons\"`.","syntaxes":[{"syntax":"map drawIcon [texture, color, position, width, height, angle, text, shadow, textSize, font, align]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"texture","type":"String","description":"icon texture","type_expr":"String"},{"name":"color","type":"Color (RGBA)","description":"text and icon color","type_expr":"Color"},{"name":"position","type":"Object, Position2D or Position3D","type_expr":"Object | Position2D | Position3D"},{"name":"width","type":"Number","description":"width of the icon (but not the text)","type_expr":"Number"},{"name":"height","type":"Number","description":"height of the icon (but not the text)","type_expr":"Number"},{"name":"angle","type":"Number","description":"rotation angle of the icon not the text (add to it ctrlMapDir to show correctly on rotating minimap)","type_expr":"Number"},{"name":"text","type":"String","optional":true,"default":"\"\"","type_expr":"String","text":"text: String - (Optional, default \"\")"},{"name":"shadow","type":"Number or Boolean","optional":true,"default":"false","description":"can be one of:\n\n- 0 (false): no shadow\n- 1: shadow (for text)\n- 2 (true): outline (works for text and for icon only if icon angle is 0)","type_expr":"Number | Boolean","text":"shadow: Number or Boolean - (Optional, default false) can be one of:\n\n- 0 (false): no shadow\n- 1: shadow (for text)\n- 2 (true): outline (works for text and for icon only if icon angle is 0)"},{"name":"textSize","type":"Number","optional":true,"default":"-1","description":"size of the text in UI units","type_expr":"Number","since":"arma3 0.72","text":"textSize: Number - (Optional, default -1) size of the text in UI units"},{"name":"font","type":"String","optional":true,"default":"\"\"","description":"text's font","type_expr":"String","since":"arma3 0.72","text":"font: String - (Optional, default \"\") text's font"},{"name":"align","type":"String","optional":true,"default":"\"right\"","description":"text alignment. Can be:\n\n- \"left\"\n- \"right\"\n- \"center\"","type_expr":"String","since":"arma3 0.72","text":"align: String - (Optional, default \"right\") text alignment. Can be:\n\n- \"left\"\n- \"right\"\n- \"center\""}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[texture, color, position, width, height, angle, text, shadow, textSize, font, align]"}}],"examples":[{"text":"Red icon with text:\n\n```sqf\nfindDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\", {\n    _this select 0 drawIcon [\n        \"iconStaticMG\", // custom images can also be used: getMissionPath \"\\myFolder\\myIcon.paa\"\n        [1,0,0,1],\n        getPosASLVisual player,\n        24,\n        24,\n        getDirVisual player,\n        \"Player Vehicle\",\n        1,\n        0.03,\n        \"TahomaB\",\n        \"right\"\n    ]\n}];\n```","code":["findDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\", {\n\t_this select 0 drawIcon [\n\t\t\"iconStaticMG\", // custom images can also be used: getMissionPath \"\\myFolder\\myIcon.paa\"\n\t\t[1,0,0,1],\n\t\tgetPosASLVisual player,\n\t\t24,\n\t\t24,\n\t\tgetDirVisual player,\n\t\t\"Player Vehicle\",\n\t\t1,\n\t\t0.03,\n\t\t\"TahomaB\",\n\t\t\"right\"\n\t]\n}];"]},{"text":"Green text only:\n\n```sqf\nfindDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\", {\n    _this select 0 drawIcon [\n        \"#(rgb,1,1,1)color(1,1,1,1)\",\n        [0,1,0,1],\n        player,\n        0,\n        0,\n        0,\n        name player\n    ]\n}];\n```","code":["findDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\", {\n\t_this select 0 drawIcon [\n\t\t\"#(rgb,1,1,1)color(1,1,1,1)\",\n\t\t[0,1,0,1],\n\t\tplayer,\n\t\t0,\n\t\t0,\n\t\t0,\n\t\tname player\n\t]\n}];"]}],"see_also":["drawArrow","drawEllipse","drawLine","drawRectangle","drawPolygon","drawTriangle","drawXPolygon"],"notes":[{"user":"Benargee","date":"2016-01-04T05:41:00Z","text":"Arma 3 1.54\nThis command does not seem to play nice with onEachFrame. It seems to draw on the main screen while maintaing position relative to the map position\nExample:\n\n```sqf\nonEachFrame {\n    findDisplay 12 displayCtrl 51 drawIcon ['iconStaticMG', [1,0,0,1], getPosASL player, 24, 24, getDir player, 'Player Vehicle', 1, 0.03, 'TahomaB', 'right'];\n};\n```"},{"user":"Leopard20","date":"2022-05-09T19:34:07Z","text":"The icon size always stays the same, even after zooming in/out. To make the icon get bigger with map zoom, use this for width and height size:\n\n```sqf\nprivate _scale = 6.4 * worldSize / 8192 * ctrlMapScale _map;\nprivate _size = _sizeInMeters / _scale;\n```\n\nFor example, the following icon has an exact size of 50 meters on the map, even after zooming in/out:\n\n```sqf\nprivate _scale = 6.4 * worldSize / 8192 * ctrlMapScale _map;\nprivate _size = 50 / _scale;\n_map drawIcon [\"iconStaticMG\", [1,0,0,1], getPosASLVisual player, _size, _size, 0]\n```"}]},{"name":"drawIcon3D","title":"drawIcon3D","type":"command","url":"https://community.bistudio.com/wiki/drawIcon3D","revid":379290,"updated":"2026-10-30T23:46:50Z","groups":["Interaction"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Draws an icon at the given position in the game world. This command has to be executed every frame. Use the Draw3D Mission Event Handler (which is executed every frame if the user can see the icon).\nIn order for the results of this command to be visible through a custom camera, enable HUD with cameraEffectEnableHUD.\n`showHUD false` will hide the icon drawn by this command.\nIn order for arrows to appear, the icon texture should exist. The arrow size is proportionate to the icon size.\n\n> [!NOTE]\n> - To avoid flickering and ensure visual fidelity, always use the visual (render time scope) variant of position commands, such as getPosASLVisual.\n> - The *width* and *height* parameters are multipliers for `activeWidth` and `activeHeight` set in config. So for example, if one needs to create an icon half the screen wide (`safeZoneW / 2`) and half the screen tall (`safeZoneH / 2`), divide these by the according config values:\n>\n>   ```sqf\n>   private _iconWidth = (safeZoneW / 2) / getNumber (configFile >> \"CfgInGameUI\" >> \"Cursor\" >> \"activeWidth\");\n>   private _iconHeight = (safeZoneH / 2) / getNumber (configFile >> \"CfgInGameUI\" >> \"Cursor\" >> \"activeHeight\");\n>   ```","syntaxes":[{"syntax":"drawIcon3D [texture, color, position, width, height, angle, text, shadow, textSize, font, textAlign, drawSideArrows, offsetX, offsetY]","params":[{"name":"texture","type":"String","description":"icon texture","type_expr":"String"},{"name":"color","type":"Color (RGBA) or Array of two Color (RGBA)","description":"- Color (RGBA) - icon color\n- Arma 3 v2.04 Array of two Arrays format Color (RGBA) - Icon and text color","type_expr":"Color | Array<Color>","text":"color: Color (RGBA) or Array of two Color (RGBA)\n\n- Color (RGBA) - icon color\n- Arma 3 v2.04 Array of two Arrays format Color (RGBA) - Icon and text color"},{"name":"position","type":"PositionAGL","description":"icon position","type_expr":"PositionAGL"},{"name":"width","type":"Number","description":"icon width","type_expr":"Number"},{"name":"height","type":"Number","description":"icon height","type_expr":"Number"},{"name":"angle","type":"Number","description":"icon rotation angle","type_expr":"Number"},{"name":"text","type":"String","optional":true,"default":"\"\"","description":"text label to display next to the icon","type_expr":"String","text":"text: String - (Optional, default \"\") text label to display next to the icon"},{"name":"shadow","type":"Number or Boolean","optional":true,"default":"0","description":"Number:\n  - **0:** no shadow\n  - **1:** shadow (not used in this context, used in UI context)\n  - **2:** outline\n- Boolean:\n  - true - outline\n  - false - no shadow","type_expr":"Number | Boolean","text":"shadow: Number or Boolean - (Optional, default 0)\n\n- Number:\n  - **0:** no shadow\n  - **1:** shadow (not used in this context, used in UI context)\n  - **2:** outline\n- Boolean:\n  - true - outline\n  - false - no shadow"},{"name":"textSize","type":"Number","optional":true,"default":"size of system","description":"text size","type_expr":"Number","text":"textSize: Number - (Optional, default size of system) text size"},{"name":"font","type":"String","optional":true,"default":"\"RobotoCondensedBold\"","description":"font class name from `CfgFontFamilies` (see FXY File Format - Available Fonts)","type_expr":"String","text":"font: String - (Optional, default \"RobotoCondensedBold\") font class name from `CfgFontFamilies` (see FXY File Format - Available Fonts)"},{"name":"textAlign","type":"String","optional":true,"default":"\"center\"","description":"text alignment, can be one of:\n\n- \"left\" - aligns the end of text line with the given position (text appears to the left of the position)\n- \"right\" - aligns the beginning of text line with the given position (text appears to the right of the position)\n- \"center\" - aligns the middle of text line with the given position (text appears central to the position)","type_expr":"String","text":"textAlign: String - (Optional, default \"center\") text alignment, can be one of:\n\n- \"left\" - aligns the end of text line with the given position (text appears to the left of the position)\n- \"right\" - aligns the beginning of text line with the given position (text appears to the right of the position)\n- \"center\" - aligns the middle of text line with the given position (text appears central to the position)"},{"name":"drawSideArrows","type":"Boolean","optional":true,"default":"false","description":"true to draw arrows and the text label at edge of screen when the icon moves off the screen","type_expr":"Boolean","text":"drawSideArrows: Boolean - (Optional, default false) true to draw arrows and the text label at edge of screen when the icon moves off the screen"},{"name":"offsetX","type":"Number","optional":true,"default":"0","description":"X offset for the icon text","type_expr":"Number","since":"arma3 2.04","text":"offsetX: Number - (Optional, default 0) X offset for the icon text"},{"name":"offsetY","type":"Number","optional":true,"default":"0","description":"Y offset for the icon text","type_expr":"Number","since":"arma3 2.04","text":"offsetY: Number - (Optional, default 0) Y offset for the icon text"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[texture, color, position, width, height, angle, text, shadow, textSize, font, textAlign, drawSideArrows, offsetX, offsetY]"}},{"syntax":"drawIcon3D icon","since":"arma3 2.22","params":[{"name":"icon","type":"HashMap","description":"hashmap structure in the following **case-sensitive**, @-prefixed format:\n\n- @position: Array - the only mandatory parameter, can be one of the following formats:\n  - [x, y, (z:0)] - Position2D or PositionAGL\n  - [object, offsetZ]\n    - object: Object\n    - offsetZ: Number vertical offset\n  - [object, selection, offsetZ, lodIndex]\n    - object: Object\n    - selection: String - model selection, see animationNames, selectionNames\n    - offsetZ: Number - (Optional, default 0) vertical offset\n    - lodIndex: Number - (Optional, default Memory LOD index, see allLODs)\n- @texture: String - (Optional, default \"\") icon image\n- @size: Number - (Optional) texture sizeH, the sizeW is automatic, based on original texture dimensions (To find texture width use getTextureInfo)\n- @font: String - (Optional) global font name. Default current system font.\n- @color: Color - (Optional, default White) icon color\n- @shadow: Number - (Optional, default 0) could be one of the following:\n  - 0 - no shadow\n  - 1 - normal shadow (slight offset to the right and bottom)\n  - 2 - outline ('@shadowColor' does not work here, this outline is always black)\n  - 3 - thicker shadow (offset to the right and bottom, dynamic, approx 1.5% of the icon (w+h)/2)\n  - 4 - thicker outline (dynamic, approx 1.5% of the icon (w+h)/2)\n- @shadowColor: Color - (Optional, default [0,0,0,0]) '@shadow' color (see above)\n- @fade: Array - (Optional, default [-1, -1]) in format [distMin, distMax] start and end distance of icon fade\n- @dynamic: Boolean - (Optional, default false) true to change icon size dynamically with percieved view distance false static size\n- @offsetX: Number - (Optional, default 0) x offset in screen units. > 0 offset right, < 0 offset left (always 0 if @drawArrows true)\n- @offsetY: Number - (Optional, default 0) y offset in screen units. > 0 offset down, < 0 offset up (always 0 if @drawArrows true)\n- @hardAlpha: Number - (Optional, default -1) 0..1 global alpha override for entire icon\n- @checkVisibility: Boolean - (Optional, default false) true the icon will be obstructed by objects, smoke and vegetation\n- @drawArrows: Boolean - (Optional, default false) true to draw side out of view arrows and text for static icons only. Always false if @dynamic true\n- @arrowTexture: String - (Optional, default \"\\a3\\Ui_f\\data\\IGUI\\Cfg\\Cursors\\outArrow_ca.paa\") arrow texture\n- @arrowSize: Number - (Optional, default @size) arrow size, capped if smaller than @arrowText size\n- @arrowColor: Color - (Optional, default @color) arrow color\n- @arrowText: Array - (Optional, default []) text to draw next to side arrows for static icons only in format [text, size, offsetXCoef, offsetYCoef, color, shadow]:\n  - text: String - text to show next to arrow\n  - size: Number - (Optional, default current system font size) text height in screen units (To find text width use getTextWidth)\n  - offsetXCoef: Number - (Optional, default 1) X-spacing coefficient between arrows and text\n  - offsetYCoef: Number - (Optional, default 1) Y-spacing coefficient between arrows and text\n  - color: Color (Optional, default White) text color\n  - shadow: Boolean (Optional, default false) true to outline, false no shadow\n- @texts: Array of Arrays - (Optional, default []) multiple visible texts in format [[text, size, offsetX, offsetY, color, shadow], ...]:\n  - text: String - text to show\n  - size: Number - (Optional, default current system font size) text height in screen units (To find text width use getTextWidth)\n  - offsetX: Number - (Optional, default 0) x offset in screen units. > 0 offset right, < 0 offset left\n  - offsetY: Number - (Optional, default 0) y offset in screen units. > 0 offset down, < 0 offset up\n  - color: Color (Optional, default White) text color\n  - shadow: Boolean (Optional, default false) true to outline, false no shadow\n- @progress: Array - (Optional, default []) progress bar in format [width, height, offsetX, offsetY, colorFG, colorBG]:\n  - width: Number - width of the progress bar in screen units (width < height - vertical bar)\n  - height: Number - height of the progress bar in screen units (height <= width - horizontal bar)\n  - offsetX: Number - (Optional, default 0) x offset\n  - offsetY: Number - (Optional, default 0) y offset\n  - colorFG: Color - (Optional, default White) forground color\n  - colorBG: Color - (Optional, default Grey) background color\n- @progressValue: Number - (Optional, default -1) progress bar progress in 0...1 range. -1 - progress bar is not drawn","type_expr":"HashMap"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"icon"}}],"examples":[{"text":"Icon and text:\n\n```sqf\naddMissionEventHandler [\"Draw3D\", {\n    drawIcon3D [\"targetIcon.paa\", [1, 1, 1, 1], ASLToAGL getPosASLVisual cursorTarget, 1, 1, 45, \"Target\", 1, 0.05, \"TahomaB\"];\n}];\n```","code":["addMissionEventHandler [\"Draw3D\", {\n\tdrawIcon3D [\"targetIcon.paa\", [1, 1, 1, 1], ASLToAGL getPosASLVisual cursorTarget, 1, 1, 45, \"Target\", 1, 0.05, \"TahomaB\"];\n}];"]},{"text":"Just text:\n\n```sqf\naddMissionEventHandler [\"Draw3D\", {\n    drawIcon3D [\"\", [1, 0, 0, 1], ASLToAGL getPosASLVisual cursorTarget, 0, 0, 0, \"Target\", 1, 0.05, \"PuristaMedium\"];\n}];\n```","code":["addMissionEventHandler [\"Draw3D\", {\n\tdrawIcon3D [\"\", [1, 0, 0, 1], ASLToAGL getPosASLVisual cursorTarget, 0, 0, 0, \"Target\", 1, 0.05, \"PuristaMedium\"];\n}];"]},{"text":"```sqf\niconPos = player getPos [10, 0] vectorAdd [0,0,2];\naddMissionEventHandler [\"draw3D\",\n{\n    drawIcon3D\n    [\n        \"\\a3\\ui_f\\data\\IGUI\\Cfg\\Radar\\radar_ca.paa\",\n        [0, 0, 1, 1],\n        iconPos,\n        5,\n        5,\n        getDirVisual player,\n        \"COMPASS\",\n        0,\n        0.3,\n        \"PuristaMedium\",\n        \"center\",\n        true\n    ];\n}];\n```","code":["iconPos = player getPos [10, 0] vectorAdd [0,0,2];\naddMissionEventHandler [\"draw3D\",\n{\n\tdrawIcon3D\n\t[\n\t\t\"\\a3\\ui_f\\data\\IGUI\\Cfg\\Radar\\radar_ca.paa\",\n\t\t[0, 0, 1, 1],\n\t\ticonPos,\n\t\t5,\n\t\t5,\n\t\tgetDirVisual player,\n\t\t\"COMPASS\",\n\t\t0,\n\t\t0.3,\n\t\t\"PuristaMedium\",\n\t\t\"center\",\n\t\ttrue\n\t];\n}];"]},{"text":"Since Arma 3 v2.04\n\n```sqf\npos = player getPos [10, 0] vectorAdd [0,0,2];\naddMissionEventHandler [\"draw3D\",\n{\n    _k = 10 / (player distance pos);\n    drawIcon3D\n    [\n        \"\\a3\\ui_f\\data\\IGUI\\Cfg\\Radar\\radar_ca.paa\",\n        [1, 0, 0, 1],\n        pos,\n        1 * _k,\n        1 * _k,\n        0,\n        name player,\n        0,\n        0.04 * _k,\n        \"RobotoCondensed\",\n        \"right\",\n        true,\n        0.005 * _k,\n        -0.035 * _k\n    ];\n}];\n```","code":["pos = player getPos [10, 0] vectorAdd [0,0,2];\naddMissionEventHandler [\"draw3D\",\n{\n\t_k = 10 / (player distance pos);\n\tdrawIcon3D\n\t[\n\t\t\"\\a3\\ui_f\\data\\IGUI\\Cfg\\Radar\\radar_ca.paa\",\n\t\t[1, 0, 0, 1],\n\t\tpos,\n\t\t1 * _k,\n\t\t1 * _k,\n\t\t0,\n\t\tname player,\n\t\t0,\n\t\t0.04 * _k,\n\t\t\"RobotoCondensed\",\n\t\t\"right\",\n\t\ttrue,\n\t\t0.005 * _k,\n\t\t-0.035 * _k\n\t];\n}];"]},{"text":"Since Arma 3 v2.22\n\n```sqf\nremoveAllMissionEventHandlers \"Draw3D\";\ndeleteVehicle flagA;\nflagA = createVehicle [\"Flag_AAF_F\", position player, [], 0, \"NONE\"];\nicon = createHashMapFromArray\n[\n    [\"@position\", [flagA, 5]],\n    [\"@texture\", \"\\A3\\Data_F\\Flags\\Flag_AAF_CO.paa\"],\n    [\"@texts\", [[\"Sector Alpha\", 0.025, 0, 0.05, [1,1,0,1]]]],\n    [\"@size\", 0.05],\n    [\"@drawArrows\", true],\n    [\"@arrowText\", [\"A\", 0.04, 0.5, 0.3, [1,1,0,1]]],\n    [\"@arrowSize\", 0.06],\n    [\"@fade\", [10, 100]],\n    [\"@arrowColor\", [0,1,0,1]],\n    [\"@progress\", [0.005, 0.05, -0.01, 0, [0.8,0.8,0,1], [0,0.6,0,0.6]]],\n    [\"@progressValue\", 0.67]\n];\naddMissionEventHandler [\"Draw3D\", {drawIcon3D icon}];\n```","code":["removeAllMissionEventHandlers \"Draw3D\"; \ndeleteVehicle flagA; \nflagA = createVehicle [\"Flag_AAF_F\", position player, [], 0, \"NONE\"]; \nicon = createHashMapFromArray \n[ \n\t[\"@position\", [flagA, 5]], \n\t[\"@texture\", \"\\A3\\Data_F\\Flags\\Flag_AAF_CO.paa\"], \n\t[\"@texts\", [[\"Sector Alpha\", 0.025, 0, 0.05, [1,1,0,1]]]], \n\t[\"@size\", 0.05], \n\t[\"@drawArrows\", true], \n\t[\"@arrowText\", [\"A\", 0.04, 0.5, 0.3, [1,1,0,1]]],\n\t[\"@arrowSize\", 0.06], \n\t[\"@fade\", [10, 100]], \n\t[\"@arrowColor\", [0,1,0,1]], \n\t[\"@progress\", [0.005, 0.05, -0.01, 0, [0.8,0.8,0,1], [0,0.6,0,0.6]]], \n\t[\"@progressValue\", 0.67] \n]; \naddMissionEventHandler [\"Draw3D\", {drawIcon3D icon}];"]}],"see_also":["drawLine3D","getMissionPath","showHUD","cameraEffectEnableHUD"],"notes":[{"user":"Killzone_Kid","date":"2013-08-31T09:51:00Z","text":"As command syntax indicates, this command expects icon position in format PositionAGL meaning that over the land it expects PositionATL and over the sea PositionASLW.\nThis command works well with addon textures, however getting it to display mission textures is a bit tricky. Follow [this guide](http://killzonekid.com/arma-scripting-tutorials-mission-root/)."},{"user":"AgentRev","date":"2014-04-19T22:35:00Z","text":"You should rely exclusively on modelToWorldVisual for a moving object's icon position if you want it to accurately stay at the correct height over the sea. It computes faster than ASLToAGL.\nWidth, height, and textSize are proportional to the user's interface size, which can optionally be compensated against via `size / (getResolution select 5)`\nAdditionally, width and height are inversely proportional to the `fovLeft` and `fovTop` parameters from the user's ArmaProfile, and AFAIK those parameters are not retrievable via scripting.\nFor example, a `fovTop` higher than the default value of 0.75 will make all 3D icons smaller vertically. I'm not sure if this is a bug or by design, however it is definitely annoying to take into account."},{"user":"DreadedEntity","date":"2014-10-23T02:42:00Z","text":"drawIcon3D and BIS_fnc_addStackedEventHandler work well together.\nUsing formatting commands with drawIcon3D will not work, instead, they will be added to the string.\n\n```sqf\n[\"uniqueID\", \"onEachFrame\",\n{\n    drawIcon3D [\"myIcon.jpg\", [1,1,1,0.5], getPos player, 1, 1, 0, format [\"%1\\n%2\", \"Dreaded\", \"Entity\"]];\n}] call BIS_fnc_addStackedEventHandler;\n```\n\nShown text will be **Dreaded\\nEntity**. **(A3 1.32.127785)**\n\nThe \"text\" parameter must be a string. You cannot use Structured_Text.\n\n```sqf\n[\"uniqueID\", \"onEachFrame\",\n{\n    drawIcon3D\n    [\n        \"myIcon.jpg\",\n        [1,1,1,0.5],\n        getPos player,\n        1,\n        1,\n        0,\n        parseText format [\"<t size='1.25' font='PuristaLight' color='#ff0000'>%1%2</t>\", Dreaded, Entity]\n    ];\n}] call BIS_fnc_addStackedEventHandler;\n```\n\n**(A3 1.32.127785)**\n\n> [!CAUTION]\n> This information is **obsolete**."},{"user":"PierreMGI","date":"2016-03-22T20:38:00Z","text":"If you want to use this command, on each frame, with plenty of objects or entities to mark, you can manage conditions in order to reduce the number of CPU operations.\nOne of the most demanding CPU resource is probably a DrawIcon3D treatment for these objects/entities because even if not displayed (like for objects behind player), the CPU calculates the icons in the defined radius of your nearEntities / nearestObjects command.\nDon't stay with a simple radius condition (disk selecting entities or nearestObjects) which calculates all, then useless (not displayed), icons!\n\nHere is a way to restrict this command to your screen display:\nin a onEachFramed context:\n\n```sqf\nunitsToDisplay = allUnits;\naddMissionEventHandler [\"EachFrame\", {\n    private _offset = [0,0,0];\n    {\n        private _screenPosition = worldToScreen (_x modelToWorldVisual _offset);\n        if (_screenPosition isEqualTo []) then { continue };\n        // < your drawIcon3D treatment here >\n    } foreach unitsToDisplay\n}];\n```\n\nTested with +100 units, equally spread on a disk. (Note: FPS depend also on environment in map. Choose a \"desert\" for that)."}]},{"name":"drawLaser","title":"drawLaser","type":"command","url":"https://community.bistudio.com/wiki/drawLaser","revid":377735,"updated":"2026-01-03T00:22:18Z","groups":["Interaction","Lights"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"effect":"local"},"description":"Draws a laserbeam and a lightpoint at the impact location of the laser.\nThis command has to be executed every frame - see Arma 3: Mission Event Handlers - Draw3D.\nLasers drawn with this command are subject to the same limitations as weapon attachment lasers. These limitations are defined in the `CfgIRLaserSettings` config class.","syntaxes":[{"syntax":"drawLaser [position, direction, beamColor, dotColor, dotSize, beamThickness, beamMaxLength, isIR]","params":[{"name":"position","type":"PositionASL","description":"the laser's origin position","type_expr":"PositionASL"},{"name":"direction","type":"Array of Vector3D","description":"the laser's direction vector","type_expr":"Array<Vector3D>"},{"name":"beamColor","type":"Color (RGB)","description":"laser beam color. The values can go way above the usual 0..1 range as they also act as emissivity brightness","type_expr":"Color"},{"name":"dotColor","type":"Color (RGB) or Empty Array","description":"impact dot color. Set to `[]` to use the same value as *beamColor*.","type_expr":"Color | Array"},{"name":"dotSize","type":"Number","description":"impact dot size; if set to 0 the impact dot will not render","type_expr":"Number"},{"name":"beamThickness","type":"Number","description":"laser beam's thickness scale; if set to 0, the beam will not render","type_expr":"Number"},{"name":"beamMaxLength","type":"Number","optional":true,"default":"-1","description":"laser beam's maximum length. `-1` means maximum length (defined in `CfgIRLaserSettings`), `0` means no length at all and the command is ignored","type_expr":"Number","text":"beamMaxLength: Number - (Optional, default -1) laser beam's maximum length. `-1` means maximum length (defined in `CfgIRLaserSettings`), `0` means no length at all and the command is ignored"},{"name":"isIR","type":"Boolean","optional":true,"default":"true","description":"whether the laser and impact dot are only visible with Night Vision / Thermal Imaging","type_expr":"Boolean","text":"isIR: Boolean - (Optional, default true) whether the laser and impact dot are only visible with Night Vision / Thermal Imaging"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[position, direction, beamColor, dotColor, dotSize, beamThickness, beamMaxLength, isIR]"}}],"examples":[{"text":"Give the player a laser eye:\n\n```sqf\naddMissionEventHandler [\"Draw3D\", {\n    drawLaser [\n        eyePos player vectorAdd [0, 0, 0.1],\n        getCameraViewDirection player,\n        [1000, 0, 0], // Bright red\n        [],\n        5,\n        20,\n        -1,\n        false\n    ];\n}];\n```","code":["addMissionEventHandler [\"Draw3D\", {\n\tdrawLaser [\n\t\teyePos player vectorAdd [0, 0, 0.1],\n\t\tgetCameraViewDirection player,\n\t\t[1000, 0, 0], // Bright red\n\t\t[],\n\t\t5,\n\t\t20,\n\t\t-1,\n\t\tfalse\n\t];\n}];"]}],"see_also":["drawIcon3D","drawLine3D"]},{"name":"drawLine","title":"drawLine","type":"command","url":"https://community.bistudio.com/wiki/drawLine","revid":377558,"updated":"2026-01-02T06:55:00Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Draw a line on the map. Can decrease framerate!","syntaxes":[{"syntax":"map drawLine [from, to, color, width]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"from","type":"Object or Position2D or Position3D","type_expr":"Object | Position2D | Position3D"},{"name":"to","type":"Object or Position2D or Position3D","type_expr":"Object | Position2D | Position3D"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"},{"name":"width","type":"Number","optional":true,"default":"3","type_expr":"Number","since":"arma3 2.18","text":"width: Number - (Optional, default 3)"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[from, to, color, width]"}}],"examples":[{"text":"```sqf\n(findDisplay 12 displayCtrl 51) ctrlAddEventHandler [\"Draw\",\n    \"(_this select 0) drawLine [\n        player,\n        [0,0,0],\n        [0,0,1,1]\n    ];\"\n];\n```\n\nArma 3 v2.02 toString version:\n\n```sqf\n(findDisplay 12 displayCtrl 51) ctrlAddEventHandler [\"Draw\", toString {\n    (_this select 0) drawLine [\n        player,\n        [0,0,0],\n        [0,0,1,1] // blue\n    ];\n}];\n```","code":["(findDisplay 12 displayCtrl 51) ctrlAddEventHandler [\"Draw\",\n\t\"(_this select 0) drawLine [\n\t\tplayer,\n\t\t[0,0,0],\n\t\t[0,0,1,1]\n\t];\"\n];","(findDisplay 12 displayCtrl 51) ctrlAddEventHandler [\"Draw\", toString {\n\t(_this select 0) drawLine [\n\t\tplayer,\n\t\t[0,0,0],\n\t\t[0,0,1,1] // blue\n\t];\n}];"]}],"see_also":["drawArrow","drawEllipse","drawIcon","drawRectangle","drawPolygon","drawTriangle","drawXPolygon"]},{"name":"drawLine3D","title":"drawLine3D","type":"command","url":"https://community.bistudio.com/wiki/drawLine3D","revid":377395,"updated":"2026-01-02T06:44:42Z","groups":["Interaction"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Draws a line of a given colour between two 3D positions in the current frame. To be used mostly in a \"Draw3D\" mission event handler.","syntaxes":[{"syntax":"drawLine3D [start, end, color, width]","params":[{"name":"start","type":"PositionAGL","type_expr":"PositionAGL"},{"name":"end","type":"PositionAGL","type_expr":"PositionAGL"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"},{"name":"width","type":"Number","optional":true,"default":"3","type_expr":"Number","since":"arma3 2.18","text":"width: Number - (Optional, default 3)"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[start, end, color, width]"}}],"examples":[{"text":"```sqf\nonEachFrame {\n    drawLine3D [getPos player, getPos cursorTarget, [1,1,1,1]];\n};\n```","code":["onEachFrame {\n\tdrawLine3D [getPos player, getPos cursorTarget, [1,1,1,1]];\n};"]}],"see_also":["drawIcon3D","ASLToAGL"],"notes":[{"user":"Killzone_Kid","date":"2013-08-31T09:27:00Z","text":"As the command syntax indicates, this command expects starting and ending position in format PositionAGL meaning that over the land it expects PositionATL and over the sea PositionASLW. Use additional ASLToAGL and AGLToASL commands wherever is necessary.\n\n```sqf\naddMissionEventHandler [\"Draw3D\", {\n    drawLine3D [ASLToAGL eyePos soldier1, ASLToAGL eyePos soldier2, [1,0,0,1]];\n}];\n```"},{"user":"Waffle SS.","date":"2015-02-18T02:10:00Z","text":"Visible through fog and past draw distance."},{"user":"fusselwurm","date":"2021-11-25T21:37:10Z","text":"Caveat: lines invisible through MH-9 helicopter windows, see https://feedback.bistudio.com/T66225"}]},{"name":"drawLink","title":"drawLink","type":"command","url":"https://community.bistudio.com/wiki/drawLink","revid":363261,"updated":"2024-03-26T10:51:33Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"The editor will draw a line between the two specified editor objects. Line type can be LINE or ARROW.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map drawLink [from,to,param type,line type,color]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"[from,to,param type,line type,color]","type":"Array","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[from,to,param type,line type,color]"}}],"examples":[{"text":"-"}]},{"name":"drawLocation","title":"drawLocation","type":"command","url":"https://community.bistudio.com/wiki/drawLocation","revid":282090,"updated":"2021-06-16T21:33:04Z","groups":["GUI Control - Map","Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Used to draw locations in 2D Editor.","syntaxes":[{"syntax":"control drawLocation location","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"location"}}],"examples":[{"text":"-"}]},{"name":"drawPolygon","title":"drawPolygon","type":"command","url":"https://community.bistudio.com/wiki/drawPolygon","revid":377843,"updated":"2026-01-03T04:35:45Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Draws given polygon on the given map control with given color. The polygon must consist of at least 3 points. Unlike with other `draw*` commands and due to complexity, this command does not support filling of the polygon with color. Use drawTriangle command to construct and fill polygon shape as a workaround.","syntaxes":[{"syntax":"map drawPolygon [polygon, color]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"polygon","type":"Array of Position3D","type_expr":"Array<Position3D>"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[polygon, color]"}}],"examples":[{"text":"```sqf\ntest_polygon = [];\nfor \"_i\" from 1 to 12 do\n{\n    test_polygon pushBack (player getPos [10 + random 100, 360 / _i]);\n};\n\nfindDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\",\n{\n    params [\"_control\"];\n    _control drawPolygon [test_polygon, [0,0,1,1]];\n}];\n```","code":["test_polygon = [];\nfor \"_i\" from 1 to 12 do \n{\n\ttest_polygon pushBack (player getPos [10 + random 100, 360 / _i]);\n};\n\nfindDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\", \n{\n\tparams [\"_control\"];\n\t_control drawPolygon [test_polygon, [0,0,1,1]];\n}];"]},{"text":"Draw a polygon by adjusting the `_radius` and `_numVertices`\n\n```sqf\nvertices = [];\nprivate _numVertices = 2;\nprivate _numVertices = _numVertices max 3;\nprivate _radius = 100;\n\nfor \"_i\" from 1 to _numVertices do\n{\n    vertices pushBack (player getRelPos [_radius, 360 / _numVertices * _i]);\n};\n\nfindDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\",\n{\n    params [\"_control\"];\n    _control drawPolygon [vertices, [0,0,1,1]];\n}];\n```","code":["vertices = [];\nprivate _numVertices = 2;\nprivate _numVertices = _numVertices max 3;\nprivate _radius = 100;\n\nfor \"_i\" from 1 to _numVertices do\n{\n\tvertices pushBack (player getRelPos [_radius, 360 / _numVertices * _i]);\n};\n\nfindDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\",\n{\n\tparams [\"_control\"];\n\t_control drawPolygon [vertices, [0,0,1,1]];\n}];"]}],"see_also":["drawEllipse","drawIcon","drawLine","drawRectangle","drawArrow","drawTriangle","inPolygon","drawXPolygon"]},{"name":"drawRectangle","title":"drawRectangle","type":"command","url":"https://community.bistudio.com/wiki/drawRectangle","revid":377559,"updated":"2026-01-02T06:55:02Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Draws a rectangle on the map.","syntaxes":[{"syntax":"map drawRectangle [centre, halfWidth, halfHeight, angle, color, fill, alignWithMap]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"centre","type":"Object or Position2D or Position3D","description":"rectangle's centre","type_expr":"Object | Position2D | Position3D"},{"name":"halfWidth","type":"Number","description":"1/2 width of rectangle in meters","type_expr":"Number"},{"name":"halfHeight","type":"Number","description":"1/2 height of rectangle in meters","type_expr":"Number"},{"name":"angle","type":"Number","description":"angle of rotation in degrees","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","description":"line color","type_expr":"Color"},{"name":"fill","type":"String","description":"fill texture file or Procedural Textures. Note that the file texture will not rotate with rectangle, use drawIcon for that. If fill texture is not empty, set line color to white `[1,1,1,1]`","type_expr":"String"},{"name":"alignWithMap","type":"Boolean","optional":true,"default":"true","description":"when false the shape will not follow map rotation.","type_expr":"Boolean","since":"arma3 2.18","text":"alignWithMap: Boolean - (Optional, default true) - when false the shape will not follow map rotation."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[centre, halfWidth, halfHeight, angle, color, fill, alignWithMap]"}}],"examples":[{"text":"```sqf\n_ctrl drawRectangle [\n    getPos player,\n    20,\n    20,\n    getDir player,\n    [0,0,1,1],\n    \"\"\n];\n```","code":["_ctrl drawRectangle [\n\tgetPos player,\n\t20,\n\t20,\n\tgetDir player,\n\t[0,0,1,1],\n\t\"\"\n];"]},{"text":"```sqf\n_ctrl drawRectangle [\n    player,\n    10,\n    20,\n    getDir player,\n    [1,1,1,1],\n    \"#(rgb,8,8,3)color(1,0,0,1)\"\n];\n```","code":["_ctrl drawRectangle [\n\tplayer,\n\t10,\n\t20,\n\tgetDir player,\n\t[1,1,1,1],\n\t\"#(rgb,8,8,3)color(1,0,0,1)\"\n];"]}],"see_also":["drawArrow","drawEllipse","drawIcon","drawLine","drawPolygon","drawTriangle","drawXPolygon"],"notes":[{"user":"Waffle SS.","date":"2014-03-23T00:21:00Z","text":"Map example:\n\n```sqf\n(findDisplay 12 displayCtrl 51) ctrlAddEventHandler [\"Draw\",{\n    (_this select 0) drawRectangle [\n        getPos player,\n        20,\n        20,\n        getDir player,\n        [0,0,1,1],\n        \"\"\n    ];\n}];\n```\n\nBe careful when using this command. Unlike map markers, the draw commands can decrease your framerate."}]},{"name":"drawTriangle","title":"drawTriangle","type":"command","url":"https://community.bistudio.com/wiki/drawTriangle","revid":377356,"updated":"2026-01-02T06:40:21Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma3":"1.76"},"since":"arma3 1.76","arma3_since":"1.76","description":"Draws one to multiple triangles on the map.\n\n> [!NOTE]\n> When `fill` param is absent or is an empty string \"\", the triangle is drawn with lines of the color set in `color` param.\n> In order to draw color-filled triangle of the same color as `color` param, set `fill` param to opaque white procedural texture`\"#(rgb,1,1,1)color(1,1,1,1)\"`.","syntaxes":[{"syntax":"map drawTriangle [vertices, color, fill]","params":[{"name":"map","type":"Control","description":"map control","type_expr":"Control"},{"name":"vertices","type":"Array of Positions","description":"triangle(s) vertices in multiple of 3, see Example 1 - if Position3D is provided for a vertex, its z value is ignored","type_expr":"Array<Position>"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"},{"name":"fill","type":"String","optional":true,"default":"`\"\"`","description":"fill texture file or Procedural Textures. See note in description for more info.","type_expr":"String","text":"fill: String - (Optional, default `\"\"`) fill texture file or Procedural Textures. See note in description for more info."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[vertices, color, fill]"}}],"examples":[{"text":"```sqf\nfindDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\",\n{\n    _this select 0 drawTriangle\n    [\n        [\n            // triangle 1 start\n            player getRelPos [100, 0],\n            player getRelPos [100, -135],\n            player getRelPos [100, 135]\n            // triangle 1 end\n        ],\n        [1,0,0,0.5],\n        \"#(rgb,1,1,1)color(1,1,1,1)\"\n    ];\n}];\n```","code":["findDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\", \n{\n\t_this select 0 drawTriangle \n\t[\n\t\t[\n\t\t\t// triangle 1 start\n\t\t\tplayer getRelPos [100, 0],\n\t\t\tplayer getRelPos [100, -135],\n\t\t\tplayer getRelPos [100, 135]\n\t\t\t// triangle 1 end\n\t\t],\n\t\t[1,0,0,0.5],\n\t\t\"#(rgb,1,1,1)color(1,1,1,1)\"\t\t\n\t];\n}];"]}],"see_also":["drawArrow","drawEllipse","drawIcon","drawLine","drawPolygon","drawRectangle","drawXPolygon"],"notes":[{"user":"Killzone_Kid","date":"2017-07-16T15:36:00Z","text":"Example [YouTube video](https://www.youtube.com/watch?v=gSiuLdUeq0M)\n\n```sqf\nctrl = findDisplay 12 displayCtrl 51;\n_ctrl setVariable [\"data\", [1, \"#(rgb,1,1,1)color(1,1,1,1)\", 1000, position player,\n{\n    params [\"_p\", \"_r\", \"_a\", \"_sr\", \"_ba\"];\n    _sr = _r * 0.382;\n    _pb = _p getPos [_sr, _a + 180];\n    [\n        _p getPos [_r, _a], _p getPos [_sr, _a + 36], _p getPos [_sr, _a - 36],\n        _pb, _p getPos [_r, _a - 72], _p getPos [_r, _a + 72],\n        _p getPos [_r, _a - 144], _p getPos [_sr, _a - 108], _pb,\n        _p getPos [_r, _a + 144], _p getPos [_sr, _a + 108], _pb\n    ]\n}]];\n\n_ctrl ctrlRemoveAllEventHandlers \"Draw\";\n_ctrl ctrlAddEventHandler [\"Draw\",\n{\n    _map = _this select 0;\n    _data = _map getVariable \"data\";\n    _data params [\"_i\", \"_fill\", \"_dist\", \"_pos\", \"_fn\"];\n    _data set [0, _i + 1];\n    _size = _i % _dist;\n    if (_size == 0) then\n    {\n        _data set [0, 1];\n        _data set [1, [\"#(rgb,1,1,1)color(1,1,1,1)\", \"\"] select (random 1 < 0.3)];\n        _data set [2, 250 + round random 750];\n    };\n    _alpha = linearConversion [_dist, 0, _dist - _size, 1, 0];\n    _map drawEllipse [_pos, _size * 2, _size * 2, 0, [0,0,1,_alpha], _fill];\n    _map drawTriangle [[_pos getPos [_size, -_size], _size, _size] call _fn, [1,0,0,_alpha], _fill];\n    _map drawTriangle [[_pos getPos [_size, -_size + 120], _size, _size] call _fn, [0,1,0,_alpha], _fill];\n    _map drawTriangle [[_pos getPos [_size, -_size - 120], _size, _size] call _fn, [1,1,0,_alpha], _fill];\n}];\n\nopenMap true;\n```"},{"user":"Killzone_Kid","date":"2018-11-13T21:05:00Z","text":"Drawing holes ([video](https://www.youtube.com/watch?v=XZRtXsBFLAg)):\n\n```sqf\nt = time;\ni = 0;\ntex = \"#(rgb,1,1,1)color(1,1,1,0.5)\";\ncol = [1,1,1,1];\n\nfindDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\",\n{\n    if (time > t) then\n    {\n        col = [random 1, random 1, random 1, 1];\n        tex = [\n            \"\\A3\\ui_f\\data\\map\\markerbrushes\\vertical_ca.paa\",\n            \"\\A3\\ui_f\\data\\map\\markerbrushes\\bdiagonal_ca.paa\",\n            \"\\A3\\ui_f\\data\\map\\markerbrushes\\cross_ca.paa\",\n            \"\\A3\\ui_f\\data\\map\\markerbrushes\\diaggrid_ca.paa\",\n            \"\\A3\\ui_f\\data\\map\\markerbrushes\\fdiagonal_ca.paa\",\n            \"\\A3\\ui_f\\data\\map\\markerbrushes\\grid_ca.paa\",\n            \"\\A3\\ui_f\\data\\map\\markerbrushes\\horizontal_ca.paa\",\n            \"#(rgb,1,1,1)color(1,1,1,0.5)\"\n        ]\n        select (i % 8);\n\n        t = time + 0.5;\n        i = i + 1;\n    };\n\n    _this select 0 drawTriangle\n    [\n        [\n            [0,0],[100,500],[400,400],\n            [0,0],[400,400],[500,100],\n            [0,0],[500,100],[1000,0],\n            [1000,0],[500,100],[600,400],\n            [1000,0],[600,400],[900,500],\n            [1000,0],[900,500],[1000,1000],\n            [1000,1000],[900,500],[600,600],\n            [1000,1000],[600,600],[500,900],\n            [1000,1000],[500,900],[0,1000],\n            [0,1000],[500,900],[400,600],\n            [0,1000],[400,600],[100,500],\n            [0,1000],[100,500],[0,0]\n        ],\n        col,\n        tex\n    ];\n\n    _this select 0 drawPolygon [[[0,0,0],[0,1000,0],[1000,1000,0],[1000,0,0]], col];\n    _this select 0 drawPolygon [[[100,500,0],[400,600,0],[500,900,0],[600,600,0],[900,500,0],[600,400,0],[500,100,0],[400,400,0]], col];\n}];\n\nopenMap true;\nmapAnimAdd [0, 0.15, [500,500,0]];\nmapAnimCommit;\n```"}]},{"name":"drawXPolygon","title":"drawXPolygon","type":"command","url":"https://community.bistudio.com/wiki/drawXPolygon","revid":377556,"updated":"2026-01-02T06:54:57Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma3":"2.20"},"since":"arma3 2.20","arma3_since":"2.20","description":"Draws an N sided polygon on the map.","syntaxes":[{"syntax":"map drawXPolygon [n, centre, a, b, angle, color, fill, alignWithMap]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"n","type":"Number","description":"number of sides 3..720","type_expr":"Number"},{"name":"centre","type":"Object or Position2D, Position3D","description":"ellipse's centre","type_expr":"Object | Position2D | Position3D"},{"name":"a","type":"Number","description":"horizontal (x) radius","type_expr":"Number"},{"name":"b","type":"Number","description":"vertical (y) radius","type_expr":"Number"},{"name":"angle","type":"Number","description":"angle of rotation in degrees","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","description":"line color","type_expr":"Color"},{"name":"fill","type":"String","description":"fill texture file or Procedural Textures. Note that the file texture will not rotate with polygon, use drawIcon for that. If fill texture is not empty, set line color to white [1,1,1,1]","type_expr":"String"},{"name":"alignWithMap","type":"Boolean","optional":true,"default":"true","description":"when false the shape will not follow map rotation.","type_expr":"Boolean","text":"alignWithMap: Boolean - (Optional, default true) - when false the shape will not follow map rotation."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[n, centre, a, b, angle, color, fill, alignWithMap]"}}],"examples":[{"text":"```sqf\nfindDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\",\n{\n    _this select 0 drawXPolygon [\n        5, player, 50, 10, 0, [1, 0, 0, 1], \"\"\n    ];\n    _this select 0 drawXPolygon [\n        3, player, 10, 50, 0, [1, 1, 1, 1], \"#(rgb,8,8,3)color(1,0.6,0,1)\"\n    ];\n    _this select 0 drawXPolygon [\n        12, player, 10, 10, 90, [0, 0, 1, 1], \"\"\n    ];\n}];\n```","code":["findDisplay 12 displayCtrl 51 ctrlAddEventHandler [\"Draw\", \n{\n\t_this select 0 drawXPolygon [\n\t\t5, player, 50, 10, 0, [1, 0, 0, 1], \"\"\n\t];\n\t_this select 0 drawXPolygon [\n\t\t3, player, 10, 50, 0, [1, 1, 1, 1], \"#(rgb,8,8,3)color(1,0.6,0,1)\"\n\t];\n\t_this select 0 drawXPolygon [\n\t\t12, player, 10, 10, 90, [0, 0, 1, 1], \"\"\n\t];\n}];"]}],"see_also":["drawArrow","drawIcon","drawLine","drawRectangle","drawPolygon","drawTriangle","drawEllipse"]},{"name":"driver","title":"driver","type":"command","url":"https://community.bistudio.com/wiki/driver","revid":308923,"updated":"2022-04-18T18:03:59Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the driver of a vehicle.","syntaxes":[{"syntax":"driver vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"-\nThe unit sitting in the driver place is returned. If vehicle is not a vehicle but a person, the person is returned.","text":"Object -\nThe unit sitting in the driver place is returned. If vehicle is not a vehicle but a person, the person is returned."},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["(driver _tank) action [\"getout\", _tank];"]},{"code":["driver vehicle player isEqualTo player // check if player is driver of current vehicle"]}],"see_also":["commander","gunner","crew","currentPilot"],"notes":[{"user":"Hardrock","date":"2006-08-03T14:32:00Z","text":"*Notes from before the conversion:*\n\nIt is also possible to find the driver of a vehicle by placing a **D** after the name of the vehicle so *Tank1D* and ***driver** Tank1* both refer to the same unit, providing the original driver has not got out of the tank.\n\nThe difference between the two is *Tank1D* is always the unit that was driver of the tank when the mission started, whilst ***driver** Tank1* is the driver which is now there."}]},{"name":"drop","title":"drop","type":"command","url":"https://community.bistudio.com/wiki/drop","revid":377588,"updated":"2026-01-02T06:57:08Z","groups":["Particles"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Creates a particle effect.\nThis command is used to create smoke, fire and similar effects.\nThe particles are single polygons with single textures that always face the player.\nThey can be set to dynamically change their position, size, direction, can be set to different weights and to be more or less dependent on the wind.","syntaxes":[{"syntax":"drop parameters","params":[{"name":"parameters","type":"ParticleArray","type_expr":"ParticleArray"}],"returns":{"type":"Nothing","type_expr":"Nothing | Object","description":"since Arma 3 v2.20 Object","text":"Nothing, since Arma 3 v2.20 Object"},"form":"unary","right":{"text":"parameters"}}],"examples":[{"text":"```sqf\ndrop [\"cl_basic\", \"\", \"Billboard\", 1, 1,\n    [-3.5 * (sin (direction xural)), -3.5 * (cos (direction xural)), 0],\n    [random 0.1, random 0.1, random 0.5],\n    1, 0.005, 0.0042, 0.7, [0.3,3],\n    [[0.5,0.5,0.5,0], [0.7,0.7,0.7,0.5], [0.9,0.9,0.9,0]],\n    [0,1,0,1,0,1],\n    0.2, 0.2, \"\", \"\", xural];\n```","code":["drop [\"cl_basic\", \"\", \"Billboard\", 1, 1,\n\t[-3.5 * (sin (direction xural)), -3.5 * (cos (direction xural)), 0],\n\t[random 0.1, random 0.1, random 0.5],\n\t1, 0.005, 0.0042, 0.7, [0.3,3],\n\t[[0.5,0.5,0.5,0], [0.7,0.7,0.7,0.5], [0.9,0.9,0.9,0]],\n\t[0,1,0,1,0,1],\n\t0.2, 0.2, \"\", \"\", xural];"]}],"see_also":["ParticleArray","setParticleCircle","setParticleParams","setParticleRandom","ParticleTemplates","setParticleClass","particlesQuality","setParticleFire"]},{"name":"dynamicSimulationDistance","title":"dynamicSimulationDistance","type":"command","url":"https://community.bistudio.com/wiki/dynamicSimulationDistance","revid":348424,"updated":"2023-11-08T13:00:09Z","groups":["Dynamic Simulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"A getter for setDynamicSimulationDistance.","syntaxes":[{"syntax":"dynamicSimulationDistance category","params":[{"name":"category","type":"String","description":"can be:\n\n- `\"Group\"` - Infantry units and groups\n- `\"Vehicle\"` - Vehicles with crew\n- `\"EmptyVehicle\"` - All vehicles without crew\n- `\"Prop\"` - Static objects","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"activation distance"},"form":"unary","right":{"text":"category"}}],"examples":[{"code":["hint str dynamicSimulationDistance \"Prop\";"]}],"see_also":["Arma 3: Dynamic Simulation","setDynamicSimulationDistance","setDynamicSimulationDistanceCoef","dynamicSimulationDistanceCoef"]},{"name":"dynamicSimulationDistanceCoef","title":"dynamicSimulationDistanceCoef","type":"command","url":"https://community.bistudio.com/wiki/dynamicSimulationDistanceCoef","revid":319026,"updated":"2022-05-13T09:22:12Z","groups":["Dynamic Simulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"A getter for setDynamicSimulationDistanceCoef","syntaxes":[{"syntax":"dynamicSimulationDistanceCoef class","params":[{"name":"class","type":"String","description":"see setDynamicSimulationDistanceCoef","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"class"}}],"examples":[{"code":["hint str dynamicSimulationDistanceCoef \"IsMoving\";"]}],"see_also":["enableDynamicSimulationSystem","dynamicSimulationSystemEnabled","enableDynamicSimulation","dynamicSimulationEnabled","setDynamicSimulationDistance","dynamicSimulationDistance","setDynamicSimulationDistanceCoef","triggerDynamicSimulation","canTriggerDynamicSimulation","enableSimulation","simulationEnabled","enableSimulationGlobal","Arma 3: Dynamic Simulation"]},{"name":"dynamicSimulationEnabled","title":"dynamicSimulationEnabled","type":"command","url":"https://community.bistudio.com/wiki/dynamicSimulationEnabled","revid":318879,"updated":"2022-05-13T09:21:58Z","groups":["Dynamic Simulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"A getter for enableDynamicSimulation.","syntaxes":[{"syntax":"dynamicSimulationEnabled object","params":[{"name":"object","type":"Object or Group","type_expr":"Object | Group"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["hint str dynamicSimulationEnabled _myObject;"]}],"see_also":["enableDynamicSimulationSystem","dynamicSimulationSystemEnabled","enableDynamicSimulation","setDynamicSimulationDistance","dynamicSimulationDistance","setDynamicSimulationDistanceCoef","dynamicSimulationDistanceCoef","triggerDynamicSimulation","canTriggerDynamicSimulation","enableSimulation","simulationEnabled","enableSimulationGlobal","Arma 3: Dynamic Simulation"]},{"name":"dynamicSimulationSystemEnabled","title":"dynamicSimulationSystemEnabled","type":"command","url":"https://community.bistudio.com/wiki/dynamicSimulationSystemEnabled","revid":373714,"updated":"2025-06-21T11:20:59Z","groups":["Dynamic Simulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","locality":{"server_exec":true},"description":"A getter for enableDynamicSimulationSystem","syntaxes":[{"syntax":"dynamicSimulationSystemEnabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["hint str dynamicSimulationSystemEnabled;"]}],"see_also":["enableDynamicSimulationSystem","enableDynamicSimulation","dynamicSimulationEnabled","setDynamicSimulationDistance","dynamicSimulationDistance","setDynamicSimulationDistanceCoef","dynamicSimulationDistanceCoef","triggerDynamicSimulation","canTriggerDynamicSimulation","enableSimulation","simulationEnabled","enableSimulationGlobal","Arma 3: Dynamic Simulation"]},{"name":"east","title":"east","type":"command","url":"https://community.bistudio.com/wiki/east","revid":329500,"updated":"2022-07-29T13:31:38Z","groups":["Sides"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Pre-defined variable for the eastern side.","syntaxes":[{"syntax":"east","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"text":"SQS:\n\n```sqs\n? side _unit == east : hint \"This is an eastern unit!\"\n```","code":["? side _unit == east : hint \"This is an eastern unit!\""]},{"text":"SQF:\n\n```sqf\nif (side _unit == east) then\n{\n    hint \"This is an eastern unit!\";\n};\n```","code":["if (side _unit == east) then\n{\n\thint \"This is an eastern unit!\";\n};"]}],"aliases":["opfor"],"see_also":["side","west","resistance","civilian","sideEmpty","sideAmbientLife"],"notes":[{"user":"Maruk","date":"2007-04-17T10:45:00Z","text":"In Armed Assault the terms OPFOR, BLUFOR, Independents and Civilians are used in the front end UI."}]},{"name":"echo","title":"echo","type":"command","url":"https://community.bistudio.com/wiki/echo","revid":321915,"updated":"2022-05-22T12:29:47Z","groups":["Diagnostic","Broken Commands"],"status":"broken","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sends any text into the debugger console or the logfile. This command is only **present in internal version** not in the retail version. Use diag_log instead!","syntaxes":[{"syntax":"echo text","params":[{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"text"}}],"examples":[{"code":["echo \"Text in logfile\";"]}],"see_also":["diag_log"]},{"name":"edit3DENMissionAttributes","title":"edit3DENMissionAttributes","type":"command","url":"https://community.bistudio.com/wiki/edit3DENMissionAttributes","revid":363773,"updated":"2024-04-19T09:32:17Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Open a window with scenario attribute in given section.","syntaxes":[{"syntax":"edit3DENMissionAttributes section","params":[{"name":"section","type":"String","description":"attribute section from `configFile >> \"Cfg3DEN\" >> \"Mission\"`","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"section"}}],"examples":[{"code":["edit3DENMissionAttributes \"Multiplayer\";"]}],"see_also":["get3DENAttribute","set3DENAttributes"]},{"name":"editObject","title":"editObject","type":"command","url":"https://community.bistudio.com/wiki/editObject","revid":363246,"updated":"2024-03-26T10:51:21Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Show the edit object dialog for the given object.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map editObject object","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"object","type":"String","type_expr":"String"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"map"},"right":{"text":"object"}}],"examples":[{"text":"-"}]},{"name":"editorSetEventHandler","title":"editorSetEventHandler","type":"command","url":"https://community.bistudio.com/wiki/editorSetEventHandler","revid":363579,"updated":"2024-04-07T14:46:04Z","groups":["Game 2 Editor","Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets given event handler of given editor.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map editorSetEventHandler [handler name, function]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"handler name","type":"String","type_expr":"String"},{"name":"function","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[handler name, function]"}}],"examples":[{"code":["_map editorSetEventHandler [\"SelectObject\", \"\"];"]}]},{"name":"effectiveCommander","title":"effectiveCommander","type":"command","url":"https://community.bistudio.com/wiki/effectiveCommander","revid":369524,"updated":"2024-09-15T17:56:50Z","groups":["Unit Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the effective commander of the vehicle. Effective commander is the player whom driver AI will listen to.\nSo if in a tank there is a gunner and a commander and AI driver, if the effectiveCommander is gunner, then gunner pressing <kbd>W</kbd> <kbd>A</kbd> <kbd>S</kbd> <kbd>D</kbd> will give AI orders to move.\nIf gunner jumps out and then enters a tank again, the effectiveCommander role most likely has changed to commander that remained in tank. Also the assignment seems to work on first come first served basis.","syntaxes":[{"syntax":"effectiveCommander vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"commander unit"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"text":"```sqf\n_unit = driver tank;\n_effectiveCommander = effectiveCommander _unit;                // returns the tank driver itself\n_effectiveCommander = effectiveCommander tank;                // returns the effective commander (commander or gunner or driver)\n_effectiveCommander = effectiveCommander vehicle _unit;        // identical to the one above - use vehicle if only the unit is known\n```","code":["_unit = driver tank;\n_effectiveCommander = effectiveCommander _unit;\t\t\t\t// returns the tank driver itself\n_effectiveCommander = effectiveCommander tank;\t\t\t\t// returns the effective commander (commander or gunner or driver)\n_effectiveCommander = effectiveCommander vehicle _unit;\t\t// identical to the one above - use vehicle if only the unit is known"]}],"see_also":["setEffectiveCommander","commander","driver","gunner","currentPilot","vehicleMoveInfo"]},{"name":"elevatePeriscope","title":"elevatePeriscope","type":"command","url":"https://community.bistudio.com/wiki/elevatePeriscope","revid":377904,"updated":"2026-01-05T18:01:10Z","groups":["Object Manipulation","Animations"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Elevates periscope of a vehicle. Vehicles in Arma 3 which are compatible with this tech are Strider, remote laser designators, the robot arm on Eddie, etc.\nPlease note that SDV submarine has a different periscope, which is just an animated selection and could be raised and lowered with animate command.\n\n> [!NOTE]\n> - a user can immediately override any elevation in progress by using assigned keyboard keys. To block user input see the *blockUserInput* parameter.\n> - a PeriscopeElevationChanged entity event handler is also provided.","syntaxes":[{"syntax":"vehicle elevatePeriscope [turret, elevation, speed, blockUserInput]","params":[{"name":"vehicle","type":"Object","description":"vehicle with periscope tech","type_expr":"Object"},{"name":"turret","type":"Turret Path","description":"turret on which periscope is located","type_expr":"Turret Path"},{"name":"elevation","type":"Number","description":"elevation range 0..1","type_expr":"Number"},{"name":"speed","type":"Number or Boolean","optional":true,"default":"-1","description":"config anim speed multiplier, 2 - twice as fast, 0.5 - twice as slow, etc. -1 - default config speed. If true is used as param, the change in elevation is almost instant","type_expr":"Number | Boolean","text":"speed: Number or Boolean - (Optional, default -1) config anim speed multiplier, 2 - twice as fast, 0.5 - twice as slow, etc. -1 - default config speed. If true is used as param, the change in elevation is almost instant"},{"name":"blockUserInput","type":"Boolean","optional":true,"default":"false","description":"true to disable user ability to control periscope with keyboard. The change is persistent unless set to false again","type_expr":"Boolean","text":"blockUserInput: Boolean - (Optional, default false) true to disable user ability to control periscope with keyboard. The change is persistent unless set to false again"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[turret, elevation, speed, blockUserInput]"}}],"examples":[{"code":["_eddie elevatePeriscope [[0], 0.75, 0.1];"]}],"see_also":["periscopeElevation","animate","Arma 3: Event Handlers"]},{"name":"else","title":"else","type":"command","url":"https://community.bistudio.com/wiki/else","revid":364827,"updated":"2024-06-16T09:33:24Z","groups":["Program Flow"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Executes else code when if condition returns false.","syntaxes":[{"syntax":"thenCode else elseCode","params":[{"name":"thenCode","type":"Code","type_expr":"Code"},{"name":"elseCode","type":"Code","type_expr":"Code"}],"returns":{"type":"Array","type_expr":"Array","description":"with [thenCode, elseCode]\n- thenCode: Code - elseCode: Code","text":"Array with [thenCode, elseCode]\n\n- thenCode: Code\n- elseCode: Code"},"form":"binary","left":{"text":"thenCode"},"right":{"text":"elseCode"}}],"examples":[{"code":["if (a > b) then { c = 0 } else { c = 1 };"]},{"text":"```sqf\nif (a < b) then {\n    hint \"B is greater than A\";\n} else {\n    hint \"A is greater than B\";\n};\n```","code":["if (a < b) then {\n\thint \"B is greater than A\";\n} else {\n\thint \"A is greater than B\";\n};"]}],"see_also":["Control Structures","if","then"]},{"name":"emptyPositions","title":"emptyPositions","type":"command","url":"https://community.bistudio.com/wiki/emptyPositions","revid":378582,"updated":"2026-05-11T11:45:50Z","groups":["Object Manipulation","Unit Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the number of given empty positions in the vehicle.\n\n> [!NOTE]\n> To return the actual units in the vehicle use fullCrew. However if only the number is desired, use emptyPositions because it is faster.","syntaxes":[{"syntax":"vehicle emptyPositions position","params":[{"name":"vehicle","type":"Object","description":"transport","type_expr":"Object"},{"name":"position","type":"String","description":"can be one of:\n\n- `\"Commander\"`\n- `\"Driver\"`\n- `\"Gunner\"`\n- `\"Cargo\"` - all cargo positions, FFV or not\n- Arma 3 v2.10 `\"\"` - all empty positions\n- Arma 3 v2.10 `\"CargoNoFFV\"` - non-FFV cargo\n- Arma 3 v2.10 `\"CargoFFV\"` - FFV cargo\n- Arma 3 v2.14 `\"Turret\"` - empty turrets (no FFV turrets, they are included in \"CargoFFV\")","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"the number of available positions ignoring locked positions"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"position"}},{"syntax":"vehicle emptyPositions [position, ignoreLocked]","since":"arma3 2.22","params":[{"name":"vehicle","type":"Object","description":"transport","type_expr":"Object"},{"name":"position","type":"String","description":"see moveInAny. Empty string \"\" returns number of all free positions","type_expr":"String"},{"name":"ignoreLocked","type":"Boolean","optional":true,"default":"false","description":"true to ignore locked positions.","type_expr":"Boolean","text":"ignoreLocked (Optional): Boolean - true to ignore locked positions. Default: false"}],"returns":{"type":"Number","type_expr":"Number","description":"the number of available positions ignoring locked positions"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[position, ignoreLocked]"}}],"examples":[{"code":["_freeCargoAndFFVPositions = vehicle player emptyPositions \"Cargo\";"]},{"code":["_freeCargoOnlyPositions = vehicle player emptyPositions \"CargoNoFFV\";"]}],"see_also":["moveInDriver","moveInTurret","moveInCommander","moveInGunner","moveInCargo","getCargoIndex","moveInAny"],"notes":[{"user":"DreadedEntity","date":"2022-03-20T00:08:54Z","text":"**emptyPositions** combines both turret and cargo in its output. If you must know the true count of either, you will have to use fullCrew (tested on several vehicles)\n\nI have not found a way to test for copilot in helicopters"}]},{"name":"enableAI","title":"enableAI","type":"command","url":"https://community.bistudio.com/wiki/enableAI","revid":369964,"updated":"2024-10-22T12:39:51Z","groups":["AI Behaviour"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Enables parts of the AI behavior that was disabled by disableAI.\n\n> [!IMPORTANT]\n> When player switches and leaves behind AI unit, you need to enable \"TeamSwitch\" AI on it `_unit enableAI \"TeamSwitch\";` so that the unit continues with waypoints.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.96 it is possible to return the state of the given AI flag via checkAIFeature or set it using alias command enableAIFeature.","syntaxes":[{"syntax":"unit enableAI skilltype","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"skilltype","type":"String","description":"see disableAI for possible values.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"skilltype"}}],"examples":[{"code":["_soldierOne enableAI \"Move\";"]}],"see_also":["disableAI","checkAIFeature","enableAIFeature","vehicleMoveInfo","getUnitState"]},{"name":"enableAIFeature","title":"enableAIFeature","type":"command","url":"https://community.bistudio.com/wiki/enableAIFeature","revid":369972,"updated":"2024-10-22T12:51:41Z","groups":["AI Behaviour"],"status":"ok","games":{"arma2":"1.05","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.05","arma3_since":"0.50","description":"Enables/disables given AI feature.","syntaxes":[{"syntax":"feature enableAIFeature enable","params":[{"name":"feature","type":"String","description":"can be:\n\n- `\"AwareFormationSoft\"`\n- `\"CombatFormationSoft\"`","type_expr":"String"},{"name":"enable","type":"Boolean","description":"true to enable, false to disable","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"feature"},"right":{"text":"enable"}},{"syntax":"unit enableAIFeature [feature, enable]","since":"arma3 1.96","params":[{"name":"unit","type":"Object","description":"unit to test AI feature for","type_expr":"Object"},{"name":"feature","type":"String","description":"see disableAI / enableAI for possible values","type_expr":"String"},{"name":"enable","type":"Boolean","description":"true to enable, false to disable","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[feature, enable]"}}],"examples":[{"code":["\"AwareFormationSoft\" enableAIFeature true;"]},{"code":["bob enableAIFeature [\"AUTOTARGET\", false];"]}],"see_also":["checkAIFeature","enableAI","disableAI","getUnitState","disableRemoteSensors","vehicleMoveInfo"]},{"name":"enableAimPrecision","title":"enableAimPrecision","type":"command","url":"https://community.bistudio.com/wiki/enableAimPrecision","revid":351309,"updated":"2023-11-27T04:50:52Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Set whether animation's aim precision affects weapon sway.","syntaxes":[{"syntax":"unit enableAimPrecision enable","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"enable","type":"Boolean","description":"true enable, false, disabled","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"enable"}}],"examples":[{"code":["player enableAimPrecision false;"]}],"see_also":["Arma 3: Stamina"]},{"name":"enableAttack","title":"enableAttack","type":"command","url":"https://community.bistudio.com/wiki/enableAttack","revid":321173,"updated":"2022-05-13T15:15:34Z","groups":["Groups","Unit Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Set if leader can issue attack commands to the soldiers in his group.","syntaxes":[{"syntax":"group enableAttack enable","params":[{"name":"group","type":"Object or Group","type_expr":"Object | Group"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"enable"}}],"examples":[{"code":["_group1 enableAttack true;"]}],"see_also":["attackEnabled"]},{"name":"enableAudioFeature","title":"enableAudioFeature","type":"command","url":"https://community.bistudio.com/wiki/enableAudioFeature","revid":363491,"updated":"2024-04-01T10:41:02Z","groups":["Sounds"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","locality":{"argument":"global","effect":"local"},"description":"Get the state of **or** enable/disable an audio feature. Available features are `\"lowpass\"` and `\"building_interior\"`.\n\n- Arma 3 v2.14 it is possible to enable `\"building_interior\"` on an object placed in a building.\n- Arma 3 v2.14 if 'enable' argument is omitted, the command returns the current state of the feature.","syntaxes":[{"syntax":"enableAudioFeature [feature, enable]","params":[{"name":"feature","type":"String","description":"`\"lowpass\"` or `\"building_interior\"`","type_expr":"String"},{"name":"enable","type":"Boolean","optional":true,"description":"true enable, false, disable","type_expr":"Boolean","text":"enable: Boolean - (Optional, getter if not provided) true enable, false, disable"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"previous state"},"form":"unary","right":{"text":"[feature, enable]"}},{"syntax":"object enableAudioFeature [feature, enable]","since":"arma3 2.14","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"feature","type":"String","description":"`\"building_interior\"` or `\"building_exterior\"` only (mutually exclusive)","type_expr":"String"},{"name":"enable","type":"Boolean","optional":true,"description":"true enable, false, disable","type_expr":"Boolean","text":"enable: Boolean - (Optional, getter if not provided) true enable, false, disable"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"previous state"},"form":"binary","left":{"text":"object"},"right":{"text":"[feature, enable]"}}],"examples":[{"code":["private _prevState = enableAudioFeature [\"lowpass\", true];"]},{"code":["private _prevState = pallet enableAudioFeature [\"building_interior\", true];"]},{"code":["private _currState = pallet enableAudioFeature [\"building_interior\"];\nprivate _prevState = pallet enableAudioFeature [\"building_interior\", !_currState];\nhint str (_currState == _prevState); // true\n\nprivate _currState = pallet enableAudioFeature [\"building_interior\"];\nhint str (_currState == _prevState); // false"]}],"multiplayer":"To use this command on objects in multiplayer, remoteExec it globally with JIP queue enabled:\n\n```sqf\n[_obj, [\"building_interior\", true]] remoteExec [\"enableAudioFeature\", 0, _obj];\n```","see_also":["insideBuilding"]},{"name":"enableAutoStartUpRTD","title":"enableAutoStartUpRTD","type":"command","url":"https://community.bistudio.com/wiki/enableAutoStartUpRTD","revid":377778,"updated":"2026-01-03T01:32:32Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Toggle availability of the automated helicopter start-up and shutdown sequences.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"helicopterRTD enableAutoStartUpRTD enable","params":[{"name":"helicopterRTD","type":"ObjectRTD","description":"helicopter","type_expr":"Object"},{"name":"enable","type":"Boolean","description":"enable or disable","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"helicopterRTD"},"right":{"text":"enable"}}],"examples":[{"code":["myHelicopterRTD enableAutoStartUpRTD true;"]}],"see_also":["isAutoStartUpEnabledRTD"]},{"name":"enableAutoTrimRTD","title":"enableAutoTrimRTD","type":"command","url":"https://community.bistudio.com/wiki/enableAutoTrimRTD","revid":377767,"updated":"2026-01-03T01:32:12Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Toggle auto-trim for RTD helicopters.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"helicopterRTD enableAutoTrimRTD enable","params":[{"name":"helicopterRTD","type":"ObjectRTD","description":"helicopter","type_expr":"Object"},{"name":"enable","type":"Boolean","description":"enable or disable","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"helicopterRTD"},"right":{"text":"enable"}}],"examples":[{"code":["myHelicopterRTD enableAutoTrimRTD true;"]}],"see_also":["isAutoTrimOnRTD"]},{"name":"enableCamShake","title":"enableCamShake","type":"command","url":"https://community.bistudio.com/wiki/enableCamShake","revid":348800,"updated":"2023-11-08T14:33:20Z","groups":["Camera Control"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Allows camera shake effects via addCamShake. If set to false, then a currently active shake effect will stop immediately.\nBy default, shake effects are enabled, but once they have been disabled by this command, they will have to be enabled first, in order to be visible.","syntaxes":[{"syntax":"enableCamShake value","params":[{"name":"value","type":"Boolean","description":"if true, shake effects are visible","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"value"}}],"examples":[{"code":["enableCamShake false;"]}],"see_also":["addCamShake","setCamShakeDefParams","setCamShakeParams","resetCamShake"]},{"name":"enableCaustics","title":"enableCaustics","type":"command","url":"https://community.bistudio.com/wiki/enableCaustics","revid":379338,"updated":"2026-10-30T23:53:14Z","groups":["System"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Enable/disable caustics drawing.","syntaxes":[{"syntax":"enableCaustics bool","params":[{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"bool"}}],"examples":[{"code":["enableCaustics true;"]}],"notes":[{"user":"Demellion","date":"2017-10-23T16:22:00Z","text":"Setting this to false will disable a light refraction on \"liquid\" objects like sea water. This has no effect on solid (static) objects."}]},{"name":"enableChannel","title":"enableChannel","type":"command","url":"https://community.bistudio.com/wiki/enableChannel","revid":378455,"updated":"2026-04-19T11:32:44Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","locality":{"effect":"local"},"description":"Enables/disables UI functionality which is responsible for sending text or voice chat to the given chat channel.\n\n> [!NOTE]\n> This command:\n>\n> - can override Description.ext or server config's channel setting\n> - cannot disable Global channel for the admin or server host, because Global channel is always available for the admin\n> - does not disable *incoming* text or voice\n> - actively interrupts (since Arma 3 v2.02) the current communication in progress\n> - does not affect chat related scripting commands such as vehicleChat, globalRadio etc.\n\n| Channel ID number correspondence |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| Default Channels |  |  |  |  |  | Custom Channels |  |  |  |  |  |  |  |  |  |\n| Global | Side | Command | Group | Vehicle | Direct | CC 1 | CC 2 | CC 3 | CC 4 | CC 5 | CC 6 | CC 7 | CC 8 | CC 9 | CC 10 |\n| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |","syntaxes":[{"syntax":"channelID enableChannel enable","params":[{"name":"channelID","type":"Number","description":"channel ID","type_expr":"Number"},{"name":"enable","type":"Boolean","description":"true to enable, false to disable (both VoN and chat)","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"channelID"},"right":{"text":"enable"}},{"syntax":"channelID enableChannel [chat, VoN]","since":"arma3 1.60","params":[{"name":"channelID","type":"Number","description":"channel ID","type_expr":"Number"},{"name":"chat","type":"Boolean","description":"true to enable text chat","type_expr":"Boolean"},{"name":"VoN","type":"Boolean","description":"true to enable voice chat","type_expr":"Boolean"},{"name":"enableMapMarkers","type":"Boolean","optional":true,"default":"true","description":"true to enable map marker placement","type_expr":"Boolean","since":"arma3 2.22","text":"enableMapMarkers: Boolean - (Optional, default true) true to enable map marker placement"},{"name":"enableMapDrawing","type":"Boolean","optional":true,"default":"true","description":"true to enable drawing on the map","type_expr":"Boolean","since":"arma3 2.22","text":"enableMapDrawing: Boolean - (Optional, default true) true to enable drawing on the map"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"channelID"},"right":{"text":"[chat, VoN]"}}],"examples":[{"code":["0 enableChannel false; // disable user ability to send voice and text on global channel"]},{"code":["0 enableChannel [true, false]; // enable user ability to send text but disable voice on global channel"]}],"see_also":["currentChannel","setCurrentChannel","getPlayerChannel","channelEnabled","radioChannelCreate"]},{"name":"enableCollisionWith","title":"enableCollisionWith","type":"command","url":"https://community.bistudio.com/wiki/enableCollisionWith","revid":379339,"updated":"2026-10-30T23:53:22Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Cancels the effects of disableCollisionWith. The collision is always enabled for both objects in the arguments, i.e. vehicle1 with vehicle2 and vehicle2 with vehicle1\n\n> [!WARNING]\n> Each object can contain only 1 reference to the object it disabled collision with. This command sets this reference to null. Therefore the command might not work as expected when trying to enable collisions with some objects but not other.","syntaxes":[{"syntax":"vehicle1 enableCollisionWith vehicle2","params":[{"name":"vehicle1","type":"Object","type_expr":"Object"},{"name":"vehicle2","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle1"},"right":{"text":"vehicle2"}}],"examples":[{"code":["[_veh1, _veh2] remoteExecCall [\"enableCollisionWith\", 0, _veh1];"]}],"see_also":["collisionDisabledWith","disableCollisionWith"],"notes":[{"user":"Ranwer","date":"2015-04-05T00:13:00Z","text":"**enableCollisionWith** is a script that when you apply it to an object, it will be solid and the player will not be able to go through it. However, if you want your unit to go through it, you may want to use the **disableCollisionWith** command. An example for this is:\n\n```sqf\n//name of unit in editor such as player1\n//name of object in editor such as car1\n\ncar1 enableCollisionWith player1;\n\n//to make your unit go through the car, use the below and make sure you know what your doing!\n\ncar1 disableCollisionWith player1;\n```\n\nBoth commands **enableCollisionWith** and **disableCollisionWith**, are very handy codes and could be used for example: map testing, mission editing and even animation cutscenes."}]},{"name":"enableCopilot","title":"enableCopilot","type":"command","url":"https://community.bistudio.com/wiki/enableCopilot","revid":379416,"updated":"2026-10-31T00:03:37Z","groups":["Object Manipulation"],"status":"ok","games":{"tkoh":"1.01","arma3":"0.50"},"since":"tkoh 1.01","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Enables copilot actions, toggles availability of the actions related to copilots, such as taking over controls, suspending controls, etc. This command triggers the `\"ControlsShifted\"` event handler.","syntaxes":[{"syntax":"vehicle enableCopilot enable","params":[{"name":"vehicle","type":"Object","description":"vehicle on which to toggle copilot actions","type_expr":"Object"},{"name":"enable","type":"Boolean","description":"enable or disable","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"enable"}}],"examples":[{"text":"```sqf\nif (!isCopilotEnabled myHeli) then\n{\n    myHeli enableCopilot true;\n};\n```","code":["if (!isCopilotEnabled myHeli) then\n{\n\tmyHeli enableCopilot true;\n};"]}],"multiplayer":"Execute this command globally (e.g with remoteExec) to have it synced on all clients.","see_also":["isCopilotEnabled","currentPilot"],"notes":[{"user":"Strangepete","date":"2014-02-17T00:00:00Z","text":"Only enables the user actions, not who is in control - pilot can lock or unlock co-pilot controls in multiplayer while still true.\n\n- Actions: LockVehicleControl, UnlockVehicleControl, SuspendVehicleControl and TakeVehicleControl\n- You can use the Arma 3 Event Handler - ControlsShifted to detect Take and Release actions."}]},{"name":"enableDebriefingStats","title":"enableDebriefingStats","type":"command","url":"https://community.bistudio.com/wiki/enableDebriefingStats","revid":318957,"updated":"2022-05-13T09:22:06Z","groups":["Briefing"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Enable debriefing score table.","syntaxes":[{"syntax":"enableDebriefingStats [left, top, width, height]","params":[{"name":"left","type":"Number","type_expr":"Number"},{"name":"top","type":"Number","type_expr":"Number"},{"name":"width","type":"Number","type_expr":"Number"},{"name":"height","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[left, top, width, height]"}}],"examples":[{"code":["enableDebriefingStats [0.1, 0.1, 0.8, 0.8];"]}],"see_also":["disableDebriefingStats"]},{"name":"enableDiagLegend","title":"enableDiagLegend","type":"command","url":"https://community.bistudio.com/wiki/enableDiagLegend","revid":310210,"updated":"2022-05-05T13:10:42Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","description":"Enable or disable the legend for diagnostics. **Internal dev only!**","syntaxes":[{"syntax":"enableDiagLegend enable","params":[{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enable"}}],"examples":[{"code":["enableDiagLegend false;"]}],"see_also":["diag_fpsMin","diag_frameNo","diag_log","diag_tickTime"]},{"name":"enableDirectionStabilization","title":"enableDirectionStabilization","type":"command","url":"https://community.bistudio.com/wiki/enableDirectionStabilization","revid":378546,"updated":"2026-05-05T10:57:24Z","groups":["Camera Control","Turrets"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Enables / disables direction stabilization of turrets. This command only has an effect if the current optic mode of the selected turret has `directionStabilized` configured in config.","syntaxes":[{"syntax":"vehicle enableDirectionStabilization [enabled, turretPath]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"enabled","type":"Boolean","description":"enable or disable turret stabilization","type_expr":"Boolean"},{"name":"turretPath","type":"Turret Path","optional":true,"type_expr":"Turret Path","text":"turretPath: Turret Path - (Optional)"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[enabled, turretPath]"}}],"examples":[{"code":["uav enableDirectionStabilization [false, [0]]; // Disable direction stabilization for the first turret"]},{"code":["uav enableDirectionStabilization [true, [0]];"]},{"code":["uav enableDirectionStabilization [false]; // Disable direction stabilization for the primary turret"]}],"see_also":["directionStabilizationEnabled","lockCameraTo","enableGunStabilization"]},{"name":"enableDynamicSimulation","title":"enableDynamicSimulation","type":"command","url":"https://community.bistudio.com/wiki/enableDynamicSimulation","revid":378012,"updated":"2026-01-21T18:54:03Z","groups":["Dynamic Simulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","locality":{"argument":"global","effect":"local","server_exec":true},"description":"Enables or disables Arma 3: Dynamic Simulation for an object or group.\n\n> [!IMPORTANT]\n> Dynamic simulation for AI units operates on Groups:\n>\n> ```sqf\n> _unit enableDynamicSimulation true; // Does not work\n> group _unit enableDynamicSimulation true; // Works\n> ```\n>\n> It is not possible to enable dynamic simulation for groups that contain a player unit.\n\n> [!NOTE]\n> This command has no effect on *mines*!","syntaxes":[{"syntax":"target enableDynamicSimulation enable","params":[{"name":"target","type":"Object or Group","type_expr":"Object | Group"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"target"},"right":{"text":"enable"}}],"examples":[{"code":["_myObject enableDynamicSimulation true;"]}],"see_also":["enableDynamicSimulationSystem","dynamicSimulationSystemEnabled","dynamicSimulationEnabled","setDynamicSimulationDistance","dynamicSimulationDistance","setDynamicSimulationDistanceCoef","dynamicSimulationDistanceCoef","triggerDynamicSimulation","canTriggerDynamicSimulation","enableSimulation","simulationEnabled","enableSimulationGlobal","Arma 3: Dynamic Simulation"],"notes":[{"user":"ansin11","date":"2026-01-21T18:41:00Z","text":"According to Discord user Marko, dynamic simulation for vehicles has to be enabled before the vehicle is crewed. Calling `_vehicle enableDynamicSimulation true` on a vehicle that already has a crew does not enable dynamic simulation for the vehicle (even if dynamic simulation for the crew is already enabled).\n\nThe following example illustrates how a crewed vehicle with working dynamic simulation is created:\n\n```sqf\nprivate _vehicle = createVehicle [\"B_APC_Wheeled_01_cannon_F\", [0,0,0], [], 0, \"NONE\"];\n_vehicle enableDynamicSimulation true;\n\nprivate _group = createGroup west;\n[_vehicle, _group] call BIS_fnc_spawnCrew;\n_group enableDynamicSimulation true;\n```"}]},{"name":"enableDynamicSimulationSystem","title":"enableDynamicSimulationSystem","type":"command","url":"https://community.bistudio.com/wiki/enableDynamicSimulationSystem","revid":373713,"updated":"2025-06-21T11:20:46Z","groups":["Dynamic Simulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","locality":{"effect":"global","server_exec":true},"description":"Enables or disables the whole Arma 3: Dynamic Simulation system","syntaxes":[{"syntax":"enableDynamicSimulationSystem enable","params":[{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enable"}}],"examples":[{"code":["enableDynamicSimulationSystem true;"]}],"see_also":["dynamicSimulationSystemEnabled","enableDynamicSimulation","dynamicSimulationEnabled","setDynamicSimulationDistance","dynamicSimulationDistance","setDynamicSimulationDistanceCoef","dynamicSimulationDistanceCoef","triggerDynamicSimulation","canTriggerDynamicSimulation","enableSimulation","simulationEnabled","enableSimulationGlobal","Arma 3: Dynamic Simulation"]},{"name":"enableEndDialog","title":"enableEndDialog","type":"command","url":"https://community.bistudio.com/wiki/enableEndDialog","revid":325303,"updated":"2022-07-10T22:52:51Z","groups":["Camera Control","Mission Information"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Enables the execution of a custom camera sequence after the players death, coded in onPlayerKilled.sqs.","syntaxes":[{"syntax":"enableEndDialog","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["enableEndDialog;"]}],"see_also":["forceEnd"]},{"name":"enableEngineArtillery","title":"enableEngineArtillery","type":"command","url":"https://community.bistudio.com/wiki/enableEngineArtillery","revid":310205,"updated":"2022-05-05T13:10:41Z","groups":["Artillery"],"status":"ok","games":{"arma2oa":"1.54","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.54","arma3_since":"0.50","locality":{"effect":"local"},"description":"Enable/disable the artillery engine. This allows the user to use the artillery computer on mortar/artillery, and for AI to use it for indirect fire.","syntaxes":[{"syntax":"enableEngineArtillery enabled","params":[{"name":"enabled","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enabled"}}],"examples":[{"code":["enableEngineArtillery false;"]}],"see_also":["shownArtilleryComputer","getArtilleryAmmo","commandArtilleryFire","doArtilleryFire","getArtilleryComputerSettings","getArtilleryETA","inRangeOfArtillery"]},{"name":"enableEnvironment","title":"enableEnvironment","type":"command","url":"https://community.bistudio.com/wiki/enableEnvironment","revid":349663,"updated":"2023-11-18T17:02:32Z","groups":["Environment","Sounds"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Enable/disable environmental effects: ambient life and/or ambient sound.\n\n> [!NOTE]\n> This command has to be executed after mission start: be sure to use e.g `sleep 0.1;` for it to take effect.\n\nInfluenced sounds among others are:\n\n- bird sounds\n- insect sounds\n- waves\n- wind\n- rain\n- sounds produced by air conditioners and similar\n\n- Arma 3 v2.06 thunder (an already started sound will not be cut but future ones will be prevented)","syntaxes":[{"syntax":"enableEnvironment enable","params":[{"name":"enable","type":"Boolean","description":"false to disable ambient life and ambient sounds, true to re-enable it","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enable"}},{"syntax":"enableEnvironment [ambientLife, ambientSound, windyCoef]","since":"arma3 1.68","params":[{"name":"ambientLife","type":"Boolean","description":"enable/disable ambient life (bees, rabbits, birds, snakes, fish)","type_expr":"Boolean"},{"name":"ambientSound","type":"Boolean","description":"enable/disable ambient sounds (cicadas, owls, etc)","type_expr":"Boolean"},{"name":"windyCoef","type":"Number","optional":true,"default":"1","description":"howling wind at heights, range 0..1","type_expr":"Number","since":"arma3 2.12","text":"windyCoef: Number - (Optional, default 1) howling wind at heights, range 0..1"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[ambientLife, ambientSound, windyCoef]"}}],"examples":[{"code":["enableEnvironment false; // identical to enableEnvironment [false, false]"]},{"code":["enableEnvironment [false, true];\nenableEnvironment [false, true, 0.5]; // since Arma 3 v2.12"]}],"see_also":["environmentEnabled","fadeEnvironment","environmentVolume","initAmbientLife","sideAmbientLife","getAllEnvSoundControllers","getEnvSoundController","setSoundEffect","Arma 3: Animals: Ambient System"]},{"name":"enableFatigue","title":"enableFatigue","type":"command","url":"https://community.bistudio.com/wiki/enableFatigue","revid":379340,"updated":"2026-10-30T23:53:30Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Enables/Disables the person's fatigue.","syntaxes":[{"syntax":"unit enableFatigue enable","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"enable"}}],"examples":[{"code":["player enableFatigue false;"]},{"code":["{ _x enableFatigue false; } forEach (units group player);"]}],"see_also":["getFatigue","setFatigue"],"notes":[{"user":"Harmdhast","date":"2015-03-24T16:30:00Z","text":"When the player dies enableFatigue is set to true after the respawn"},{"user":"Pierre MGI","date":"2016-01-27T19:17:00Z","text":"To precise the note of Harmdhast, this command is not persistent (after respawn). So, in MP, you'll have to enableFatigue false, also in onPlayerRespawn.sqf or through the MP eventHandler MPRespawn."}]},{"name":"enableFreeLook","title":"enableFreeLook","type":"command","url":"https://community.bistudio.com/wiki/enableFreeLook","revid":379078,"updated":"2026-09-27T07:30:52Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","description":"Enables or disables the freelook toggle (2x Alt)","syntaxes":[{"syntax":"enableFreeLook enable","params":[{"name":"enable","type":"Boolean","description":"enable or disable the toggle","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"Previous state"},"form":"unary","right":{"text":"enable"}}],"examples":[{"code":["enableFreeLook true;"]},{"text":"```sqf\n// a function to get the current state without making changes\nprivate _fnc_isFreeLookToggled =\n{\n  private _oldState = enableFreeLook true; // enable temporarily; get state\n  enableFreeLook _oldState;\n  _oldState; // return the state\n};\n\nprivate _isFreeLookToggled = call _fnc_isFreeLookToggled;\n\n// a function to toggle the state\nprivate _fnc_toggleFreeLook =\n{\n  enableFreeLook !enableFreeLook false;\n};\n\ncall _fnc_toggleFreeLook; // toggle it (if enabled->disable it, and vice versa)\n```","code":["// a function to get the current state without making changes\nprivate _fnc_isFreeLookToggled = \n{\n  private _oldState = enableFreeLook true; // enable temporarily; get state\n  enableFreeLook _oldState;\n  _oldState; // return the state\n};\n\nprivate _isFreeLookToggled = call _fnc_isFreeLookToggled;\n\n// a function to toggle the state\nprivate _fnc_toggleFreeLook = \n{\n  enableFreeLook !enableFreeLook false;\n};\n\ncall _fnc_toggleFreeLook; // toggle it (if enabled->disable it, and vice versa)"]}],"see_also":["freeLook"]},{"name":"enableGunLights","title":"enableGunLights","type":"command","url":"https://community.bistudio.com/wiki/enableGunLights","revid":351992,"updated":"2024-02-01T23:23:57Z","groups":["Lights","Weapons"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Toggles the target group's gun lights. disableAI \"LIGHTS\" will disable the use of gun lights.\n\n> [!IMPORTANT]\n> This command acts on each unit of the provided group or provided unit's group; there is no need to apply it on each unit.","syntaxes":[{"syntax":"target enableGunLights mode","params":[{"name":"target","type":"Group or Object","description":"the group forced to use gun lights. If unit is supplied as argument, unit's group is used","type_expr":"Group | Object"},{"name":"mode","type":"String","description":"can be:\n\n- `\"Auto\"` - Depends on combat mode\n- `\"ForceOn\"` - Always on\n- `\"ForceOff\"` - Always off","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"target"},"right":{"text":"mode"}}],"examples":[{"code":["_groupA enableGunLights \"Auto\";"]},{"code":["_unit1 enableGunLights \"ForceOff\"; // sets _unit1's GROUP behaviour to not use gun lights"]}],"see_also":["isFlashlightOn","enableIRLasers"],"categories_extra":["Arma 2: Operation Arrowhead: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Introduced with Arma 2: Operation Arrowhead version 1.50","Take On Helicopters: Scripting Commands"]},{"name":"enableGunStabilization","title":"enableGunStabilization","type":"command","url":"https://community.bistudio.com/wiki/enableGunStabilization","revid":378545,"updated":"2026-05-05T10:44:45Z","groups":["Camera Control","Turrets"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","description":"Enables/disables turret gun stabilisation.","syntaxes":[{"syntax":"vehicle enableGunStabilization [mode, turretPath]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"mode","type":"Number","description":"can be one of:\n\n- -1 - clear override\n- 0 - no stabilisation\n- 1 - elevation stabilisation\n- 2 - traverse stabilisation\n- 3 - both","type_expr":"Number"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Number","type_expr":"Number","description":"the previous mode, also returns -1 on error"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[mode, turretPath]"}}],"examples":[{"code":["vehicle player enableGunStabilization [3, [0]];"]}],"see_also":["enableDirectionStabilization","directionStabilizationEnabled","lockCameraTo"]},{"name":"enableInfoPanelComponent","title":"enableInfoPanelComponent","type":"command","url":"https://community.bistudio.com/wiki/enableInfoPanelComponent","revid":378366,"updated":"2026-04-03T16:46:18Z","groups":["Custom Panels"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Controls availability of component to given object info panel.","syntaxes":[{"syntax":"unit enableInfoPanelComponent [panelID, componentClassOrType, enable]","params":[{"name":"unit","type":"Object","description":"the concerned vehicle","type_expr":"Object"},{"name":"panelID","type":"String","description":"\"left\" or \"right\" can be used as panel names","type_expr":"String"},{"name":"componentClassOrType","type":"String","type_expr":"String"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if component was successfully enabled on the panel, false otherwise (e.g. component is not available for the object)"},"form":"binary","left":{"text":"unit"},"right":{"text":"[panelID, componentClassOrType, enable]"}},{"syntax":"[unit, turretPath] enableInfoPanelComponent [panelID, componentClassOrType, enable]","params":[{"name":"unit","type":"Object","description":"the concerned vehicle","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","description":"turret index","type_expr":"Turret Path"},{"name":"panelID","type":"String","description":"\"left\" or \"right\" can be used as panel names","type_expr":"String"},{"name":"componentClassOrType","type":"String","type_expr":"String"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if component was successfully enabled on the panel, false otherwise (e.g. component is not available for the object)"},"form":"binary","left":{"text":"[unit, turretPath]"},"right":{"text":"[panelID, componentClassOrType, enable]"}}],"examples":[{"code":["// enables slingload assistant on player's vehicle right panel at driver position\n[vehicle player, [-1]] enableInfoPanelComponent [\"VehicleSystemsDisplayManagerComponentRight\", \"SlingLoadDisplay\", true];"]}],"see_also":["Arma 3: Custom Info","infoPanel","infoPanels","setInfoPanel","infoPanelComponents","infoPanelComponentEnabled"]},{"name":"enableIRLasers","title":"enableIRLasers","type":"command","url":"https://community.bistudio.com/wiki/enableIRLasers","revid":310272,"updated":"2022-05-05T13:11:21Z","groups":["Weapons"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Allows the AI to use IR lasers. Units should be in \"Combat\" behaviour.","syntaxes":[{"syntax":"unitOrGroup enableIRLasers value","params":[{"name":"unitOrGroup","type":"Object or Group","description":"the unit or the group allowed to use IR lasers","type_expr":"Object | Group"},{"name":"value","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitOrGroup"},"right":{"text":"value"}}],"examples":[{"code":["group player enableIRLasers true;"]}],"see_also":["isIRLaserOn","enableGunLights","isLightOn","isCollisionLightOn","setPilotLight","setCollisionLight"]},{"name":"enableMimics","title":"enableMimics","type":"command","url":"https://community.bistudio.com/wiki/enableMimics","revid":310253,"updated":"2022-05-05T13:11:11Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Enables/disables mimics on a given unit.","syntaxes":[{"syntax":"unit enableMimics enabled","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"enabled","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"enabled"}}],"examples":[{"code":["cursorTarget enableMimics false;"]}],"see_also":["setMimic"]},{"name":"enablePersonTurret","title":"enablePersonTurret","type":"command","url":"https://community.bistudio.com/wiki/enablePersonTurret","revid":377479,"updated":"2026-01-02T06:48:53Z","groups":["Turrets"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Enables or disables firing from a vehicle cargo position. To get the turret path use assignedVehicleRole or getCargoIndex command.","syntaxes":[{"syntax":"vehicle enablePersonTurret [turretPath, enable]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[turretPath, enable]"}}],"examples":[{"code":["heli enablePersonTurret [[1], true];"]}],"see_also":["assignedVehicleRole","allTurrets","moveInTurret","turretUnit","assignAsTurret","getCargoIndex","moveInCargo","assignAsCargoIndex","emptyPositions"]},{"name":"enableRadio","title":"enableRadio","type":"command","url":"https://community.bistudio.com/wiki/enableRadio","revid":370858,"updated":"2025-02-19T17:36:45Z","groups":["Radio and Chat","Sounds"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Enable and disable radio messages to be heard and shown in the left lower corner of the screen - the order-giving unit can still be heard direct-talking when in its vicinity. The AI will still follow orders.\nThis command can be helpful during cutscenes.","syntaxes":[{"syntax":"enableRadio state","params":[{"name":"state","type":"Boolean","description":"true to enable the radio, false to disable it","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"state"}}],"examples":[{"code":["enableRadio false;\nclearRadio;"]}],"see_also":["radioEnabled","setSpeaker","disableConversation","enableSentences","showSubtitles"],"notes":[{"user":"Lou Montana","date":"2008-08-07T14:50:00Z","text":"This command doesn't disable text-chat in multiplayer."},{"user":"Beita","date":"2008-09-11T23:43:00Z","text":"Does not affect VoN."}]},{"name":"enableReload","title":"enableReload","type":"command","url":"https://community.bistudio.com/wiki/enableReload","revid":370150,"updated":"2024-11-02T14:23:00Z","groups":["Weapons"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Enable / disable auto-reload (including AI) when magazine is empty. Default - enabled.","syntaxes":[{"syntax":"object enableReload enable","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"enable"}}],"examples":[{"code":["_vehicle enableReload false;"]}],"see_also":["reloadEnabled","reload","needReload"]},{"name":"enableRopeAttach","title":"enableRopeAttach","type":"command","url":"https://community.bistudio.com/wiki/enableRopeAttach","revid":379417,"updated":"2026-10-31T00:03:45Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","locality":{"argument":"local","effect":"global"},"description":"Enables or disables the ability to be attached to a rope end for the given entity.","syntaxes":[{"syntax":"entity enableRopeAttach enable","params":[{"name":"entity","type":"Object","description":"given entity","type_expr":"Object"},{"name":"enable","type":"Boolean","description":"false to disable rope attachment","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"entity"},"right":{"text":"enable"}}],"examples":[{"code":["vehicle player enableRopeAttach false;"]}],"see_also":["ropes","canSlingLoad","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeLength","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind","setSlingLoad","slingLoadAssistantShown"],"notes":[{"user":"Waffle SS.","date":"2014-04-05T00:00:00Z","text":"Attachable nearby vehicles may not update on Sling Load Assistant until re-opened."}]},{"name":"enableSatNormalOnDetail","title":"enableSatNormalOnDetail","type":"command","url":"https://community.bistudio.com/wiki/enableSatNormalOnDetail","revid":310242,"updated":"2022-05-05T13:11:02Z","groups":["System"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Enables/Disables satellite normal map or detail maps.","syntaxes":[{"syntax":"enableSatNormalOnDetail state","params":[{"name":"state","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"state"}}],"examples":[{"code":["enableSatNormalOnDetail true;"]}]},{"name":"enableSaving","title":"enableSaving","type":"command","url":"https://community.bistudio.com/wiki/enableSaving","revid":340305,"updated":"2023-04-28T23:04:59Z","groups":["Mission Information"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Enable / disable saving of the game with an optional autosave.","syntaxes":[{"syntax":"enableSaving enable","params":[{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enable"}},{"syntax":"enableSaving [enable, save]","params":[{"name":"enable","type":"Boolean","description":"allow saveGame command usage and manual saving","type_expr":"Boolean"},{"name":"save","type":"Boolean","description":"create an autosave on command execution","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[enable, save]"}}],"examples":[{"text":"```sqf\nenableSaving false;        // saving disabled, does autosave - same as [false, true]\nenableSaving true;        // saving enabled, does not autosave - same as [true, false]\n\nenableSaving [false, false];    // saving disabled, does not autosave\nenableSaving [false, true];        // saving disabled, does autosave\nenableSaving [true, false];        // saving enabled, doesn't autosave\nenableSaving [true, true];        // saving enabled, does autosave\n```","code":["enableSaving false;\t\t// saving disabled, does autosave - same as [false, true]\nenableSaving true;\t\t// saving enabled, does not autosave - same as [true, false]\n\nenableSaving [false, false];\t// saving disabled, does not autosave\nenableSaving [false, true];\t\t// saving disabled, does autosave\nenableSaving [true, false];\t\t// saving enabled, doesn't autosave\nenableSaving [true, true];\t\t// saving enabled, does autosave"]}],"see_also":["loadGame","saveGame","savingEnabled","isSaving","BIS_fnc_enableSaving"],"notes":[{"user":"POLPOX","date":"2023-01-02T11:48:55Z","text":"Also possible to disable Save and Exit button from pause menu and replaces it with Abort. (confirmed in Arma 3 2.12)"}]},{"name":"enableSentences","title":"enableSentences","type":"command","url":"https://community.bistudio.com/wiki/enableSentences","revid":310190,"updated":"2022-05-05T13:10:32Z","groups":["Radio and Chat","Sounds"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Enables radio transmissions to be heard and seen on screen. It does not affect KBTell conversations.","syntaxes":[{"syntax":"enableSentences enable","params":[{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enable"}}],"examples":[{"code":["enableSentences false;"]}],"see_also":["sentencesEnabled","setSpeaker","disableConversation","enableRadio","showSubtitles"]},{"name":"enableSimulation","title":"enableSimulation","type":"command","url":"https://community.bistudio.com/wiki/enableSimulation","revid":376579,"updated":"2025-10-28T15:58:20Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Enables / disables simulation for the given entity, e.g its animation and physics; it will still be able to take damage and report enemies.\nThis command will affect entity simulation only locally.\nFor a global and JIP enabled alternative, see enableSimulationGlobal.","syntaxes":[{"syntax":"entity enableSimulation state","params":[{"name":"entity","type":"Object","type_expr":"Object"},{"name":"state","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"entity"},"right":{"text":"state"}}],"examples":[{"code":["player enableSimulation false;"]}],"see_also":["enableSimulationGlobal","simulationEnabled","enableDynamicSimulationSystem","dynamicSimulationSystemEnabled","enableDynamicSimulation","dynamicSimulationEnabled","setDynamicSimulationDistance","dynamicSimulationDistance","setDynamicSimulationDistanceCoef","dynamicSimulationDistanceCoef","triggerDynamicSimulation","canTriggerDynamicSimulation"],"notes":[{"user":"Tyrspawn","date":"2011-07-20T04:39:00Z","text":"> [!NOTE]\n> The following only applies to Arma 2 before a certain patch, in which such changes have been integrated in the game code.\n\nNou/Jaynus have discovered something quite important about the Arma 2 engine:\n\nOrient yourself to the enableSimulation command in Arma 2:\n\nIf simulation is disabled on objects (this enablesimulation false), they do not send updates across the network, drastically reducing traffic across the network by an order of magnitude. What this means in practicality is that it is possible to have huge mission maker created cities with no or negligible impact on mission performance. Mission placed objects is the most common cause of performance woes - so this is huge news, and was previously undocumented, both on the BIS wiki and elsewhere.\n\nThere are some quirks.\n\nWhile an object which has enableSimulation false set on it will take damage, it will not display any animations or damage states until enableSimulation is enabled back onto it. If you want to disable simulation on a unit and then show it as dieing once it is hit or damaged, add an eventhandler onto it which enables simulation on the object when it is hit or killed. Hit handler for best visual, killed handler for best performance.\n\nThis discovery will be the basis of a new unit caching script by Jaynus.\n\nThis also has importance in a technical sense: bandwith is the most significant factor in mission performance. The lower the server bandwith, the better the performance."},{"user":"Rocket","date":"2011-09-08T14:20:00Z","text":"Objects with disabled simulation are not calculated for lightsources beyond the global light (moon/sun), so any light sources you create will not light them."},{"user":"Killzone_Kid","date":"2014-10-21T15:33:00Z","text":"Units that have been previously subjected to enableSimulation false; or enableSimulationGlobal false; may stay unrecognised for a long time even after simulation was re-enabled, returning objNull as cursorTarget. Force revealing units with reveal command usually solves the problem. For example:\n\n```sqf\n{ player reveal _x } forEach allUnits;\n```"},{"user":"Waffle SS.","date":"2015-05-23T16:28:00Z","text":"After using **enableSimulation** false or enableSimulationGlobal false on an object, setPos will still update its position across the network in MP."},{"user":"Pierre MGI","date":"2015-12-02T18:55:00Z","text":"After using enableSimulation false or enableSimulationGlobal false on a vehicle (car, helo), don't forget to re-enable simulation on this vehicle before a player jumps into it. Otherwise, he will be stuck in it, with a black screen and no way to escape!"},{"user":"Demellion","date":"2016-09-01T16:52:00Z","text":"Since **Arma 3 1.56** the object can also be returned with cursorObject even if the simulation is not enabled."}]},{"name":"enableSimulationGlobal","title":"enableSimulationGlobal","type":"command","url":"https://community.bistudio.com/wiki/enableSimulationGlobal","revid":329206,"updated":"2022-07-25T16:01:42Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","locality":{"argument":"global","effect":"global","server_exec":true},"description":"Enable or disable simulation for given entity, globally. Has the same effect as enableSimulation when used in singleplayer.","syntaxes":[{"syntax":"entity enableSimulationGlobal enable","params":[{"name":"entity","type":"Object","type_expr":"Object"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"entity"},"right":{"text":"enable"}}],"examples":[{"code":["_myObject enableSimulationGlobal false;"]},{"code":["[_object, false] remoteExec [\"enableSimulationGlobal\", 2];"]}],"multiplayer":"> [!NOTE]\n> Since Arma 3 v2.06 the command can also be executed client-side, with a local argument.","see_also":["enableSimulation","simulationEnabled","enableDynamicSimulationSystem","dynamicSimulationSystemEnabled","enableDynamicSimulation","dynamicSimulationEnabled","setDynamicSimulationDistance","dynamicSimulationDistance","setDynamicSimulationDistanceCoef","dynamicSimulationDistanceCoef","triggerDynamicSimulation","canTriggerDynamicSimulation"],"notes":[{"user":"Killzone_Kid","date":"2014-10-21T15:33:00Z","text":"Units that have been previously subjected to `enableSimulation false` or `enableSimulationGlobal false` may stay unrecognised for a long time even after simulation was re-enabled, returning objNull as cursorTarget. Force revealing units with reveal command usually solves the problem. For example:\n\n```sqf\nplayer reveal previouslySimDisabledUnit;\n```"}]},{"name":"enableStamina","title":"enableStamina","type":"command","url":"https://community.bistudio.com/wiki/enableStamina","revid":321174,"updated":"2022-05-13T15:15:54Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","locality":{"argument":"local","effect":"global"},"description":"Enable/disable stamina system","syntaxes":[{"syntax":"unit enableStamina enabled","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"enabled","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"enabled"}}],"examples":[{"code":["player enableStamina true;"]}],"see_also":["Arma 3: Stamina"]},{"name":"enableStressDamage","title":"enableStressDamage","type":"command","url":"https://community.bistudio.com/wiki/enableStressDamage","revid":319014,"updated":"2022-05-13T09:22:11Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","locality":{"argument":"local","effect":"local"},"description":"Toggles stress damage in Advanced Flight Model, which otherwise could be manually toggles in game setting: `Options > Game > Helicopter Flight Model > Advanced > Stress Damage`.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"enableStressDamage state","params":[{"name":"state","type":"Boolean","description":"true to enable stress damage, false to disable it","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"state"}}],"examples":[{"code":["if (difficultyEnabledRTD) then { enableStressDamage true };"]}],"see_also":["Description.ext","difficultyEnabledRTD","isStressDamageEnabled"]},{"name":"enableTeamSwitch","title":"enableTeamSwitch","type":"command","url":"https://community.bistudio.com/wiki/enableTeamSwitch","revid":310209,"updated":"2022-05-05T13:10:42Z","groups":["Team Switch"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Enable / disable Team Switch. The default setting is enabled.","syntaxes":[{"syntax":"enableTeamSwitch enable","params":[{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enable"}}],"examples":[{"code":["enableTeamSwitch true;"]}],"see_also":["Team Switch","onBriefingTeamSwitch","onTeamSwitch","teamSwitch","teamSwitchEnabled","selectPlayer"]},{"name":"enableTraffic","title":"enableTraffic","type":"command","url":"https://community.bistudio.com/wiki/enableTraffic","revid":309946,"updated":"2022-05-05T12:17:00Z","groups":["Environment"],"status":"ok","games":{"tkoh":"1.01","arma3":"0.50"},"since":"tkoh 1.01","arma3_since":"0.50","description":"Enable ambient traffic.\n\n> [!NOTE]\n> This command does nothing in Arma 3.","syntaxes":[{"syntax":"enableTraffic enable","params":[{"name":"enable","type":"Boolean","description":"enable or disable","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enable"}}],"examples":[{"code":["enableTraffic true;"]}],"see_also":["setTrafficDensity","setTrafficDistance","setTrafficGap","setTrafficSpeed"]},{"name":"enableUAVConnectability","title":"enableUAVConnectability","type":"command","url":"https://community.bistudio.com/wiki/enableUAVConnectability","revid":349591,"updated":"2023-11-11T23:17:57Z","groups":["Remote Control"],"status":"ok","games":{"arma3":"1.24"},"since":"arma3 1.24","arma3_since":"1.24","locality":{"effect":"local"},"description":"Enables unit's AV terminal(s) connecting to UAV.","syntaxes":[{"syntax":"object enableUAVConnectability [uav, checkAllItems]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"uav","type":"Object","type_expr":"Object"},{"name":"checkAllItems","type":"Boolean","description":"true for enabling of all terminals in unit's inventory, false for enabling of terminal assigned to proper slot only.","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[uav, checkAllItems]"}}],"examples":[{"code":["unit enableUAVConnectability [uav, true];"]}],"see_also":["disableUAVConnectability","isUAVConnectable"]},{"name":"enableUAVWaypoints","title":"enableUAVWaypoints","type":"command","url":"https://community.bistudio.com/wiki/enableUAVWaypoints","revid":369357,"updated":"2024-09-03T18:43:05Z","groups":["Waypoints","Remote Control"],"status":"ok","games":{"arma3":"1.40"},"since":"arma3 1.40","arma3_since":"1.40","description":"Enables/disables the option for player to set waypoints for UAV in AV terminal.","syntaxes":[{"syntax":"uav enableUAVWaypoints enable","params":[{"name":"uav","type":"Object","type_expr":"Object"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"uav"},"right":{"text":"enable"}}],"examples":[{"code":["_uav enableUAVWaypoints false;\nhint str waypointsEnabledUAV _uav; // returns false"]}],"see_also":["waypointsEnabledUAV","enableUAVConnectability","disableUAVConnectability","isUAVConnected","isUAVConnectable","allUnitsUAV","getConnectedUAV","connectTerminalToUAV"]},{"name":"enableVehicleCargo","title":"enableVehicleCargo","type":"command","url":"https://community.bistudio.com/wiki/enableVehicleCargo","revid":379341,"updated":"2026-10-30T23:53:38Z","groups":["Vehicle in Vehicle Transport"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Enable/disable option to transport other vehicles (if configured) or be transported.","syntaxes":[{"syntax":"vehicle enableVehicleCargo enable","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"enable"}}],"examples":[{"code":["_vehicle enableVehicleCargo true;"]}],"see_also":["Arma 3: Vehicle in Vehicle Transport","canVehicleCargo","setVehicleCargo","getVehicleCargo","isVehicleCargo","vehicleCargoEnabled"],"notes":[{"user":"Pennyworth","date":"2016-06-20T06:11:00Z","text":"Setting enableVehicleCargo to true does not mean a vehicle can now load vehicles as cargo. They are still required to be correctly setup as shown on the Vehicle in Vehicle Transport page."}]},{"name":"enableVehicleSensor","title":"enableVehicleSensor","type":"command","url":"https://community.bistudio.com/wiki/enableVehicleSensor","revid":349214,"updated":"2023-11-08T14:50:48Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","locality":{"argument":"global","effect":"local"},"description":"Enable/disable given sensor","syntaxes":[{"syntax":"vehicle enableVehicleSensor [componentName, enabled]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"componentName","type":"String","description":"the component's name (can either be its \"real name\" or its className)","type_expr":"String","text":"componentName : String - the component's name (can either be its \"real name\" or its className)"},{"name":"enabled","type":"Boolean","description":"component status","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[componentName, enabled]"}}],"examples":[{"code":["vehicle player enableVehicleSensor [\"PassiveRadarSensorComponent\", false]; // disables passive radar"]}],"see_also":["listVehicleSensors","isVehicleSensorEnabled"]},{"name":"enableWeaponDisassembly","title":"enableWeaponDisassembly","type":"command","url":"https://community.bistudio.com/wiki/enableWeaponDisassembly","revid":338953,"updated":"2023-04-18T16:08:55Z","groups":["Weapons"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","locality":{"argument":"global","effect":"global"},"description":"Enables or disables disassembly of static weapons. Could be applied to local player, to another unit or to static weapon directly.","syntaxes":[{"syntax":"enableWeaponDisassembly enable","params":[{"name":"enable","type":"Boolean","description":"false to prevent local player from being able to disassemble static weapons","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enable"}},{"syntax":"entity enableWeaponDisassembly enable","params":[{"name":"entity","type":"Object","description":"unit or static weapon","type_expr":"Object"},{"name":"enable","type":"Boolean","description":"false to prevent a unit from being able to disassemble static weapons, or to prevent a static weapon from being disassembled by anyone","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"entity"},"right":{"text":"enable"}}],"examples":[{"code":["enableWeaponDisassembly false;"]},{"code":["soldier1 enableWeaponDisassembly false;"]},{"code":["mortar1 enableWeaponDisassembly false;"]}],"see_also":["weaponDisassemblyEnabled","weapons","action","inGameUISetEventHandler"]},{"name":"endl","title":"endl","type":"command","url":"https://community.bistudio.com/wiki/endl","revid":325316,"updated":"2022-07-11T14:52:06Z","groups":["Strings"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Creates a string containing a line break, similar to lineBreak for text. The name is inspired by c++ std::endl (**end** **l**ine).\nThe command returns `\"\\r\\n\"`, which contains control characters rather than printable characters:\n\n```sqf\nhint str count \"\\r\\n\";    // 4\nhint str count endl;    // 2\n```\n\nThe line break works for diag_log and ctrlSetText.\nIt does not work with the hint because hint interprets printable \"\\n\" as line break instead.\nAlternatively one can use toString command to get other characters.","syntaxes":[{"syntax":"endl","params":[],"returns":{"type":"String","type_expr":"String","description":"line break"},"form":"nullary"}],"examples":[{"code":["diag_log (\"line1\" + endl + \"line2\");"]},{"code":["_ctrl = findDisplay 46 ctrlCreate [\"RscTextMulti\", -1];\n_ctrl ctrlSetPosition [0,0,1,1];\n_ctrl ctrlCommit 0;\n_ctrl ctrlSetText format [\"line1%1line2%1line3\", endl];"]}],"see_also":["lineBreak","str","format","toString","joinString","splitString","toArray"],"notes":[{"user":"7erra","date":"2020-07-15T11:50:00Z","text":"`toArray endl` results in `[13, 10]`. `toString [13, 10]` is therefore equivalent (or at least very similar) to endl."}]},{"name":"endLoadingScreen","title":"endLoadingScreen","type":"command","url":"https://community.bistudio.com/wiki/endLoadingScreen","revid":376713,"updated":"2025-11-10T18:45:49Z","groups":["System"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Finishes loading screen started by startLoadingScreen.\n\n> [!NOTE]\n> **Arma 3:**\n>\n> - Use BIS_fnc_endLoadingScreen to prevent potential usage conflicts.\n> - Arma 3 v2.18 The loading screen can be force-ended with the ENDLOAD cheat code.","syntaxes":[{"syntax":"endLoadingScreen","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["startLoadingScreen [\"Loading My Mission\"];\n// code\nprogressLoadingScreen 0.5;\n// code\nendLoadingScreen;"]},{"text":"```sqf\n// this structure prevents error-prone or lengthy code to miss endLoadingScreen.\nprivate _maxTime = diag_tickTime + 30; // max 30s of loading\n\nstartLoadingScreen [\"Loading\"];\nprivate _handle = 0 spawn {\n    // code that may crash or take too long\n};\n\nwaitUntil { sleep .01; scriptDone _handle || diag_tickTime > _maxTime };\nendLoadingScreen;\n```","code":["// this structure prevents error-prone or lengthy code to miss endLoadingScreen.\nprivate _maxTime = diag_tickTime + 30; // max 30s of loading\n\nstartLoadingScreen [\"Loading\"];\nprivate _handle = 0 spawn {\n\t// code that may crash or take too long\n};\n\nwaitUntil { sleep .01; scriptDone _handle || diag_tickTime > _maxTime };\nendLoadingScreen;"]}],"see_also":["startLoadingScreen","progressLoadingScreen","BIS_fnc_endLoadingScreen"]},{"name":"endMission","title":"endMission","type":"command","url":"https://community.bistudio.com/wiki/endMission","revid":338926,"updated":"2023-04-17T15:26:24Z","groups":["Mission Information"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Finish the mission.\n**Mission saves are deleted**. Use failMission if they should not be.\n\n> [!NOTE]\n> **Arma 3:** To maintain Arma 3 visual style, it is recommended to use BIS_fnc_endMission instead.","syntaxes":[{"syntax":"endMission endType","params":[{"name":"endType","type":"String","description":"can be a custom one Arma 3 v1.00, or one of:\n\n- \"CONTINUE\" (does nothing)\n- \"KILLED\"\n- \"LOSER\"\n- \"END1\"\n- \"END2\"\n- \"END3\"\n- \"END4\"\n- \"END5\"\n- \"END6\"","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"endType"}}],"examples":[{"code":["endMission \"END1\";"]},{"code":["[\"END1\"] remoteExec [\"endMission\", 0, true]; // Arma 3"]}],"multiplayer":"To end mission properly so that everyone goes to debriefing at the same time, this command should be executed on every machine (see Example 2).","see_also":["missionEnd","failMission","forceEnd"]},{"name":"engineOn","title":"engineOn","type":"command","url":"https://community.bistudio.com/wiki/engineOn","revid":337565,"updated":"2023-02-10T01:12:53Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.90","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.90","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Activates and deactivates the engine of a vehicle.","syntaxes":[{"syntax":"vehicle engineOn state","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"state","type":"Boolean","description":"true to turn the engine on, false to turn it off","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"state"}}],"examples":[{"code":["if (!isEngineOn _jeep) then { _jeep engineOn true; };"]},{"code":["waitUntil { player == driver _jeep; };\nvehicle player engineOn true;"]}],"multiplayer":"Executed on a remote vehicle this command may turn the engine on but then it will get turned off by itself after a short while.","see_also":["isEngineOn"],"notes":[{"user":"Benargee","date":"2014-08-25T22:27:00Z","text":"To switch engine off can also use setFuel and fuel:\n\n```sqf\nprivate \"_gas\";\n_gas = fuel heli;\nheli setFuel 0;\nsleep 0.01;\nheli setFuel _gas;\n```\n\nAlso sets helicopter fuel back to original quantity. Works on every other vehicle."}]},{"name":"enginesIsOnRTD","title":"enginesIsOnRTD","type":"command","url":"https://community.bistudio.com/wiki/enginesIsOnRTD","revid":330055,"updated":"2022-08-15T16:03:50Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns which engines are producing some work.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"enginesIsOnRTD RTD_helicopter","params":[{"name":"RTD_helicopter","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Booleans","type_expr":"Array<Boolean>","description":"value for each engine"},"form":"unary","right":{"text":"RTD_helicopter"}}],"examples":[{"code":["_enginesTaru = enginesIsOnRTD _taru; // returns [true, true]"]}],"see_also":["isObjectRTD","enginesRpmRTD","enginesTorqueRTD","wingsForcesRTD","engineOn"]},{"name":"enginesPowerRTD","title":"enginesPowerRTD","type":"command","url":"https://community.bistudio.com/wiki/enginesPowerRTD","revid":349357,"updated":"2023-11-08T15:35:08Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns power produced by engines in Watts.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"enginesPowerRTD RTD_helicopter","params":[{"name":"RTD_helicopter","type":"Object","description":"helicopter with advanced flight model enabled","type_expr":"Object"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"watts produced by the engines, to format [engine1, engine2]. Returns an empty array if Advanced Flight Model is disabled."},"form":"unary","right":{"text":"RTD_helicopter"}}],"examples":[{"code":["_array = enginesPowerRTD vehicle player;"]}]},{"name":"enginesRpmRTD","title":"enginesRpmRTD","type":"command","url":"https://community.bistudio.com/wiki/enginesRpmRTD","revid":377781,"updated":"2026-01-03T01:32:37Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns all engines RPM.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"enginesRpmRTD RTD_helicopter","params":[{"name":"RTD_helicopter","type":"ObjectRTD","type_expr":"Object"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"unary","right":{"text":"RTD_helicopter"}}],"examples":[{"code":["enginesRpmRTD RTD_helicopter params [\"_RPMEngine1\",\"_RPMEngine2\"];"]}],"see_also":["isObjectRTD","enginesTorqueRTD","enginesIsOnRTD","airDensityRTD","weightRTD","wingsForcesRTD"]},{"name":"enginesTorqueRTD","title":"enginesTorqueRTD","type":"command","url":"https://community.bistudio.com/wiki/enginesTorqueRTD","revid":369605,"updated":"2024-09-26T20:38:08Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Torque produced by engines in **N·m** (Newton × meter).\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"enginesTorqueRTD RTD_helicopter","params":[{"name":"RTD_helicopter","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"torque per engine"},"form":"unary","right":{"text":"RTD_helicopter"}}],"examples":[{"code":["_UH80_E1 = (enginesTorqueRTD _UH80) select 0; // engine 1 Torque\n_UH80_E2 = (enginesTorqueRTD _UH80) select 1; // engine 2 Torque"]}],"see_also":["isObjectRTD","enginesIsOnRTD","enginesRpmRTD","weightRTD","airDensityRTD","wingsForcesRTD"]},{"name":"entities","title":"entities","type":"command","url":"https://community.bistudio.com/wiki/entities","revid":377164,"updated":"2026-01-01T10:42:33Z","groups":["Object Detection"],"status":"ok","games":{"arma2oa":"1.60","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.60","arma3_since":"0.50","description":"Returns a list of all alive and dead entities of the given type or deriving from the given type. Units in vehicles are ignored with the primary syntax.\n\n> [!NOTE]\n> **Optimisation tip**: Keep number of types in both *includeTypes* and *excludeTypes* arrays to a minimum by possibly using parent/base classes.\n> If you have to use several types, arrange them in order so that the more common types go at the beginning of the array.","syntaxes":[{"syntax":"entities type","params":[{"name":"type","type":"String","description":"if an empty string `\"\"` is provided, all entities are returned","type_expr":"String"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"type"}},{"syntax":"entities [typesInclude, typesExclude, includeCrews, excludeDead]","since":"arma3 1.66","params":[{"name":"typesInclude","type":"Array","description":"in format [type1, type2, ...typeN], where type is a String. Empty array [] means include every entity. Method used for filtering - isKindOf","type_expr":"Array"},{"name":"typesExclude","type":"Array","description":"in format [type1, type2, ...typeN], where type is a String. Empty array [] means exclude no entity. Method used for filtering - isKindOf","type_expr":"Array"},{"name":"includeCrews","type":"Boolean","optional":true,"default":"false","description":"include crews currently in vehicles","type_expr":"Boolean","text":"includeCrews: Boolean - (Optional, default false) include crews currently in vehicles"},{"name":"excludeDead","type":"Boolean","optional":true,"default":"false","description":"exclude dead entities","type_expr":"Boolean","text":"excludeDead: Boolean - (Optional, default false) exclude dead entities"}],"returns":{"type":"Array","type_expr":"Array"},"form":"unary","right":{"text":"[typesInclude, typesExclude, includeCrews, excludeDead]"}}],"examples":[{"code":["_allCars = entities \"Car\";"]},{"text":"Return all alive entities on the map:\n\n```sqf\n_allAlive = entities [[], [], true, true];\n```","code":["_allAlive = entities [[], [], true, true];"]},{"text":"Return dead and alive entities but logic:\n\n```sqf\n_notLogic = entities [[], [\"Logic\"], true];\n```","code":["_notLogic = entities [[], [\"Logic\"], true];"]},{"text":"Return all alive west soldiers on foot:\n\n```sqf\n_footSoldiers = entities [[\"SoldierWB\"], [], false, true];\n```","code":["_footSoldiers = entities [[\"SoldierWB\"], [], false, true];"]}],"see_also":["nearEntities","allGroups","allUnits","units","vehicles","agents","playableUnits","switchableUnits","allPlayers","allDead","allDeadMen","allUnitsUAV","allCurators","allObjects","allMissionObjects","allSimpleObjects","allMines"]},{"name":"environmentEnabled","title":"environmentEnabled","type":"command","url":"https://community.bistudio.com/wiki/environmentEnabled","revid":377680,"updated":"2026-01-02T09:02:45Z","groups":["Environment","Sounds"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"Returns status of enableEnvironment command","syntaxes":[{"syntax":"environmentEnabled","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [ambientLife, ambientSound, windyCoef]\n- ambientLife: Boolean - ambientSound: Boolean - Arma 3 v2.12 windyCoef: Number - see enableEnvironment","text":"Array with [ambientLife, ambientSound, windyCoef]\n\n- ambientLife: Boolean\n- ambientSound: Boolean\n- Arma 3 v2.12 windyCoef: Number - see enableEnvironment"},"form":"nullary"}],"examples":[{"code":["private _enabled = environmentEnabled;"]}],"see_also":["enableEnvironment","fadeEnvironment","environmentVolume","initAmbientLife","sideAmbientLife","getAllEnvSoundControllers","getEnvSoundController","setSoundEffect"]},{"name":"environmentVolume","title":"environmentVolume","type":"command","url":"https://community.bistudio.com/wiki/environmentVolume","revid":310239,"updated":"2022-05-05T13:11:01Z","groups":["Sounds"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","description":"Returns the current environment volume (set by fadeEnvironment)","syntaxes":[{"syntax":"environmentVolume","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["hint str environmentVolume;"]}],"see_also":["fadeEnvironment","musicVolume","soundVolume","radioVolume","speechVolume","getAudioOptionVolumes","environmentEnabled"]},{"name":"equipmentDisabled","title":"equipmentDisabled","type":"command","url":"https://community.bistudio.com/wiki/equipmentDisabled","revid":377613,"updated":"2026-01-02T08:51:39Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","locality":{"argument":"global"},"description":"Returns current state for NVG and TI equipment availability.","syntaxes":[{"syntax":"equipmentDisabled vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [NVG, TI]","text":"Array with [NVG, TI]"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["equipmentDisabled tank1 params [\"_nvg\", \"_ti\"];"]}],"see_also":["disableNVGEquipment","disableTIEquipment"]},{"name":"estimatedEndServerTime","title":"estimatedEndServerTime","type":"command","url":"https://community.bistudio.com/wiki/estimatedEndServerTime","revid":370564,"updated":"2025-01-08T22:11:23Z","groups":["Time","Mission Information","Multiplayer"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Estimated end of MP game in seconds converted to serverTime.","syntaxes":[{"syntax":"estimatedEndServerTime","params":[],"returns":{"type":"Number","type_expr":"Number","description":"seconds left"},"form":"nullary"}],"examples":[{"text":"Estimated minutes left:\n\n```sqf\n_min = ceil (estimatedEndServerTime - serverTime) / 60;\n```","code":["_min = ceil (estimatedEndServerTime - serverTime) / 60;"]}],"see_also":["estimatedTimeLeft","serverTime"]},{"name":"estimatedTimeLeft","title":"estimatedTimeLeft","type":"command","url":"https://community.bistudio.com/wiki/estimatedTimeLeft","revid":370869,"updated":"2025-02-21T10:43:59Z","groups":["Time","Mission Information","Multiplayer"],"status":"ok","games":{"ofp":"1.35","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.35","arma3_since":"0.50","locality":{"effect":"global","server_exec":true},"description":"Sets the estimated time left in the game that is shown in the \"Game in progress\" screen or in the master browser.\n\n> [!NOTE]\n> This command will force the server to broadcast serverTime to all clients without waiting for the next broadcast window (usually every 5 minutes).","syntaxes":[{"syntax":"estimatedTimeLeft seconds","params":[{"name":"seconds","type":"Number","description":"estimated time in seconds, max 36000 (10 hours), 7200 (2 hours) before Arma 3 v1.70","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"seconds"}}],"examples":[{"code":["estimatedTimeLeft 600; // 10 min"]},{"text":"**Operation Flashpoint:** for missions with a hard set limit adjusted via param1, the following example can be used in the init.sqs file:\n\n```sqs\nestimatedTimeLeft param1\n```","code":["estimatedTimeLeft param1"]}],"see_also":["estimatedEndServerTime","serverTime"]},{"name":"evalObjectArgument","title":"evalObjectArgument","type":"command","url":"https://community.bistudio.com/wiki/evalObjectArgument","revid":376410,"updated":"2025-10-11T01:02:41Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return argument in mission editor of a given object.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map evalObjectArgument [object, argument]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"object","type":"String","type_expr":"String"},{"name":"argument","type":"String","type_expr":"String"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"map"},"right":{"text":"[object, argument]"}}],"examples":[{"code":["// returns string \"[1009.0351, 1319.4928]\"\n(findDisplay 128 displayCtrl 51) getObjectArgument [\"_unit_1\", \"POSITION\"];\n\n// returns array [1009.0351, 1319.4928]\n(findDisplay 128 displayCtrl 51) evalObjectArgument [\"_unit_1\", \"POSITION\"];"]}],"see_also":["setObjectArguments"]},{"name":"everyBackpack","title":"everyBackpack","type":"command","url":"https://community.bistudio.com/wiki/everyBackpack","revid":376077,"updated":"2025-07-28T13:01:43Z","groups":["Containers"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Returns array of backpacks stored in given crate or vehicle. Used for accessing backpack content of a backpack on ground.","syntaxes":[{"syntax":"everyBackpack box","params":[{"name":"box","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"box"}}],"examples":[{"code":["everyBackpack cursorTarget;"]},{"code":["_vehicleBackpacks = everyBackpack vehicle player;"]}],"see_also":["firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","backpackContainer","everyContainer","backpacks"],"notes":[{"user":"ffur2007slx2_5","date":"2014-04-29T17:09:00Z","text":"(Arma 3 ver 1.16), here's a quick reference to backpack command family.\n\n| Command | Operand type | Return | Example |\n|---|---|---|---|\n| firstBackpack | Object (WeaponHolder, AmmoCrate, VehicleCrate) | Object (e.g 2bba9d00# 163957: backpack_compact.p3d) | `firstBackpack (getPos player nearestObject \"weaponholder\");` |\n| backpackContainer | Unit(Object) | Object (e.g 2bba9d00# 163957: backpack_compact.p3d) | `backpackContainer player // currently same as unitBackpack` |\n| unitBackpack | Unit(Object) | Object (e.g 2bba9d00# 163957: backpack_compact.p3d) | `unitBackpack player // currently same as backpackContainer` |\n| backpack | Unit(Object) | String (e.g 2bba9d00# 163957: backpack_compact.p3d) | `backpack player // see also (typeOf backpackContainer player) or (typeOf unitBackpack player)` |\n| backpackCargo | Object (WeaponHolder, AmmoCrate, VehicleCrate) | Array of String (e.g [\"Backpack0\", \"Backpack1\"]) | `backpackCargo _ammoCrate` |\n| getBackpackCargo | Object (WeaponHolder, AmmoCrate, VehicleCrate) | Array of Array (e.g [[\"Backpack0\", \"Backpack1\"], [1, 1]]) | `getBackpackCargo _ammoCrate` |\n| everyBackpack | Object (WeaponHolder, AmmoCrate, VehicleCrate) | Array of Object (e.g [22504f00# 163960: backpack_fast.p3d...]) | `everyBackpack _ammoCrate` |"}]},{"name":"everyContainer","title":"everyContainer","type":"command","url":"https://community.bistudio.com/wiki/everyContainer","revid":378321,"updated":"2026-04-02T16:20:45Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Returns array of all containers (uniforms, vests, backpacks) stored in given crate or vehicle. Used for accessing containers content stored in ammo box or ground holder.","syntaxes":[{"syntax":"everyContainer object","params":[{"name":"object","type":"Object","description":"vehicle or ammo box","type_expr":"Object"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [class, container]\n- class: String - class name of the container - container: Object - container object","text":"Array of Arrays with [class, container]\n\n- class: String - class name of the container\n- container: Object - container object"},"form":"unary","right":{"text":"object"}}],"examples":[{"text":"```sqf\neveryContainer cursorTarget;\n/*\n    returns e.g\n    [\n        [\"V_PlateCarrier1_rgr\",2bc06b00# 163955: dummyweapon.p3d],\n        [\"U_B_CombatUniform_mcam\",2bc07900# 163954: dummyweapon.p3d]\n    ]\n*/\n```","code":["everyContainer cursorTarget;\n/*\n\treturns e.g\n\t[\n\t\t[\"V_PlateCarrier1_rgr\",2bc06b00# 163955: dummyweapon.p3d],\n\t\t[\"U_B_CombatUniform_mcam\",2bc07900# 163954: dummyweapon.p3d]\n\t]\n*/"]}],"see_also":["everyBackpack","uniformContainer","vestContainer","backpackContainer"],"notes":[{"user":"Yuval","date":"2017-07-20T12:07:00Z","text":"The returned array is in the following format:\n\n```sqf\n[\n    [containerClassname1, containerObject1],\n    [containerClassname2, containerObject2],\n    // ...\n    [containerClassnameN, containerObjectN]\n]\n```\n\nPlease do note that typeOf containerObjectN **does not** return containerClassnameN but rather the containerClass configured in config (usually \"supplyN\")"}]},{"name":"exec","title":"exec","type":"command","url":"https://community.bistudio.com/wiki/exec","revid":325305,"updated":"2022-07-10T22:55:34Z","groups":["Program Flow"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Execute a script using (the deprecated but still available) SQS Syntax. SQF Syntax (and execVM) is the most recent scripting language.\nThe magic variable _time used within the script contains the elapsed time in seconds since the script started.\n\n> [!NOTE]\n> To see the active SQS scripts currently in the scheduler, use diag_activeSQSScripts command.","syntaxes":[{"syntax":"argument exec script","params":[{"name":"argument","type":"Anything","description":"the argument passed to the script through the _this variable. To pass multiple arguments, use an Array.","type_expr":"Anything"},{"name":"script","type":"String","description":"the file path to the script. It should be given relatively to the mission folder, campaign scripts subfolder or global scripts folder and is searched there in the same order.\nIf you refer to a script packed together with an addon, the path should look like this: \"\\ADDON_PBO_NAME\\script.sqs\" where ADDON_PBO_NAME is the name of the addon's PBO file without extension.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"argument"},"right":{"text":"script"}}],"examples":[{"text":"```sqs\n[player, _jeep] exec \"getin.sqs\";\n```","code":["[player, _jeep] exec \"getin.sqs\";"]}],"see_also":["execVM","call","spawn","execFSM"]},{"name":"execEditorScript","title":"execEditorScript","type":"command","url":"https://community.bistudio.com/wiki/execEditorScript","revid":363286,"updated":"2024-03-26T10:51:56Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Execute an editor script for the specified object.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map execEditorScript [object,script]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"[object,script]","type":"Array","type_expr":"Array"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"map"},"right":{"text":"[object,script]"}}],"examples":[{"code":["_map execEditorScript [\"_team_1\",\"create\"];"]}]},{"name":"execFSM","title":"execFSM","type":"command","url":"https://community.bistudio.com/wiki/execFSM","revid":363581,"updated":"2024-04-07T14:49:31Z","groups":["Program Flow"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Execute scripted FSM and return the FSM handle or 0 when failed. The FSM file is first searched in the mission folder, then in the campaign scripts folder and finally in the global scripts folder. Argument (if any) are available in `_this` variable inside FSM. Variables set inside FSMs can be read/modified externally, using setFSMVariable and getFSMVariable commands.\n\nThe return value is the FSM handle; it can be used to determine (via completedFSM) when the FSM has finished.\n\n> [!NOTE]\n> **Arma 3:** In Arma 3, the FSM handle is also available within the FSM through the `_thisFSM` variable.\n\nScripted FSMs are added into the scheduler just like exec scripts, execVM scripts and spawn scripts.\nTo see what FSMs are currently in the scheduler, use diag_activeMissionFSMs command.\n\n> [!IMPORTANT]\n> While the code placed into any of the sections of FSM cannot be suspended (canSuspend is false), the FSM itself is suspended every simulation between the state's `init` and `precondition` (exception is the **init state**). This is the only place where scripted FSM is suspended/resumed.\n> The usual difference between the state's `init` and `precondition` is 1 frame but if the scheduler is busy it can take longer. See FSM for more information about FSM's structure.","syntaxes":[{"syntax":"arguments execFSM fsmFilePath","params":[{"name":"arguments","type":"Anything","description":"arguments accessible as `_this` in the FSM","type_expr":"Anything"},{"name":"fsmFilePath","type":"String","description":"file with FSM code","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"FSM handle (also available as `_thisFSM` in the FSM)"},"form":"binary","left":{"text":"arguments"},"right":{"text":"fsmFilePath"}},{"syntax":"execFSM fsmFilePath","params":[{"name":"fsmFilePath","type":"String","description":"file with FSM code","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"FSM handle (also available as `_thisFSM` in the FSM)"},"form":"unary","right":{"text":"fsmFilePath"}},{"syntax":"arguments execFSM [fsmFilePath, allowTermination]","since":"arma3 2.18","params":[{"name":"arguments","type":"Anything","description":"arguments accessible as `_this` in the FSM","type_expr":"Anything"},{"name":"fsmFilePath","type":"String","description":"file with FSM code","type_expr":"String"},{"name":"allowTermination","type":"Boolean","description":"true to allow FSM termination with terminate command. Optional, default false","type_expr":"Boolean"}],"returns":{"type":"Number","type_expr":"Number","description":"FSM handle (also available as `_thisFSM` in the FSM)"},"form":"binary","left":{"text":"arguments"},"right":{"text":"[fsmFilePath, allowTermination]"}},{"syntax":"execFSM [fsmFilePath, allowTermination]","since":"arma3 2.18","params":[{"name":"fsmFilePath","type":"String","description":"file with FSM code","type_expr":"String"},{"name":"allowTermination","type":"Boolean","description":"true to allow FSM termination with terminate command. Optional, default false","type_expr":"Boolean"}],"returns":{"type":"Number","type_expr":"Number","description":"FSM handle (also available as `_thisFSM` in the FSM)"},"form":"unary","right":{"text":"[fsmFilePath, allowTermination]"}}],"examples":[{"code":["_id = player execFSM \"test.fsm\";"]},{"code":["_handle = [_a, _b, _c] execFSM \"test.fsm\";"]},{"code":["_handle = execFSM \"test.fsm\";"]}],"see_also":["FSM","FSM Editor Manual","execVM","call","spawn","exec","commandFSM","completedFSM","doFSM","getFSMVariable","setFSMVariable"]},{"name":"execVM","title":"execVM","type":"command","url":"https://community.bistudio.com/wiki/execVM","revid":336954,"updated":"2023-01-04T16:44:15Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Compiles and adds an SQF script to the scheduler queue and returns script handle (see also Example 4).\nThe script does not execute immediately upon running execVM command but with some delay depending on the VM's scripts queue and engine load.\n\n> [!NOTE]\n> - If the same script is to be executed more than one time, declaring it as a Function is recommended to avoid recompiling and wasting performance with every execution.\n> - The script is searched for in the following directories in that order:\n>   - mission directory\n>   - campaign scripts directory\n>   - global scripts directory.\n> - To see what VM scripts are currently in the scheduler, use diag_activeSQFScripts command.\n\n> [!IMPORTANT]\n> - The `.sqf` file extension is not mandatory but is strongly recommended as using non-standard extensions may cause problems during binarisation\n> - If the script file is not prepared using UTF-8 encoding and contains some characters with codes > 127, they might convert incorrectly.","syntaxes":[{"syntax":"arguments execVM filename","params":[{"name":"arguments","type":"Anything","description":"arguments accessible as `_this` in the script","type_expr":"Anything"},{"name":"filename","type":"String","description":"path to the SQF script file","type_expr":"String"}],"returns":{"type":"Script Handle","type_expr":"Script Handle"},"form":"binary","left":{"text":"arguments"},"right":{"text":"filename"}},{"syntax":"execVM filename","params":[{"name":"filename","type":"String","description":"path to the SQF script file","type_expr":"String"}],"returns":{"type":"Script Handle","type_expr":"Script Handle"},"form":"unary","right":{"text":"filename"}}],"examples":[{"code":["execVM \"test.sqf\";"]},{"text":"```sqf\n_handle = player execVM \"test.sqf\";\nwaitUntil { scriptDone _handle };\n```\n\nThe following is also possible in Arma 3:\n\n```sqf\nprivate _handle = execVM \"123.sqf\";\nwaitUntil { isNull _handle };\n```","code":["_handle = player execVM \"test.sqf\";\nwaitUntil { scriptDone _handle };","private _handle = execVM \"123.sqf\";\nwaitUntil { isNull _handle };"]},{"text":"```sqf\n[player, 0.75] execVM \"setDamage.sqf\";\n```\n\nsetDamage.sqf:\n\n```sqf\nparams [\"_unit\", \"_damage\"];\n_unit setDamage _damage;\n```","code":["[player, 0.75] execVM \"setDamage.sqf\";","params [\"_unit\", \"_damage\"];\n_unit setDamage _damage;"]},{"text":"execVM equivalence:\n\n```sqf\nprivate _handle = _args execVM \"someFile.sqf\";\n// is practically identical to\nprivate _handle = _args spawn compile preprocessFileLineNumbers \"someFile.sqf\";\n```","code":["private _handle = _args execVM \"someFile.sqf\";\n// is practically identical to\nprivate _handle = _args spawn compile preprocessFileLineNumbers \"someFile.sqf\";"]}],"see_also":["call","spawn","exec","execFSM","scriptDone","scriptNull","terminate","sleep","uiSleep","waitUntil","canSuspend","diag_activeScripts","diag_activeSQFScripts","SQF Syntax","Control Structures"]},{"name":"exit","title":"exit","type":"command","url":"https://community.bistudio.com/wiki/exit","revid":329489,"updated":"2022-07-29T12:29:43Z","groups":["Program Flow"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Stops the execution of a SQS script.\n\nIt is ignored in SQF Scripts.","syntaxes":[{"syntax":"exit","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"text":"SQS Syntax:\n\n```sqs\n? not alive player : exit\n```","code":["? not alive player : exit"]}],"see_also":["exitWith","Control Structures"]},{"name":"exitWith","title":"exitWith","type":"command","url":"https://community.bistudio.com/wiki/exitWith","revid":379418,"updated":"2026-10-31T00:03:53Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Exits the **current** code scope. Often used for exiting do, for, count, forEach or the whole script.\n\n> [!NOTE]\n> See Variables - Local Variables Scope for more information.","syntaxes":[{"syntax":"ifType exitWith code","params":[{"name":"ifType","type":"If Type","type_expr":"If Type"},{"name":"code","type":"Code","type_expr":"Code"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"ifType"},"right":{"text":"code"}}],"examples":[{"text":"```sqf\nsystemChat \"start\";\nprivate _condition = true;\n\nif (_condition) then\n{\n    if (true) exitWith\n    {\n        systemChat \"exiting if _condition scope\";\n    };\n    systemChat \"never shown\";\n};\n\nsystemChat \"exiting #1 worked\";\n\nif (true) exitWith\n{\n    systemChat \"exiting the main scope = leaving the whole script\";\n};\n\nsystemChat \"never shown - the script has already ended\";\n```","code":["systemChat \"start\";\nprivate _condition = true;\n\nif (_condition) then\n{\n\tif (true) exitWith\n\t{\n\t\tsystemChat \"exiting if _condition scope\";\n\t};\n\tsystemChat \"never shown\";\n};\n\nsystemChat \"exiting #1 worked\";\n\nif (true) exitWith\n{\n\tsystemChat \"exiting the main scope = leaving the whole script\";\n};\n\nsystemChat \"never shown - the script has already ended\";"]},{"text":"```sqf\nfor \"_j\" from 1 to 10 do\n{\n    systemChat format [\"%1\", _j];\n\n    // the for loop will cease and code execution will continue after the end of the loop\n    if (_j == 5) exitWith\n    {\n        systemChat \"5 is enough\";\n    };\n};\nsystemChat \"Complete\";\n```","code":["for \"_j\" from 1 to 10 do\n{\n\tsystemChat format [\"%1\", _j];\n\n\t// the for loop will cease and code execution will continue after the end of the loop\n\tif (_j == 5) exitWith\n\t{\n\t\tsystemChat \"5 is enough\";\n\t};\n};\nsystemChat \"Complete\";"]},{"text":"Most loops will also terminate when their scope is exited. To exit and terminate scopes which are called every frame such as onEachFrame and waitUntil use the following examples:\n\n```sqf\nonEachFrame {\n    if (!alive player) exitWith\n    {\n        onEachFrame {};\n    };\n};\n```\n\n```sqf\n_time = time + 10;\nwaitUntil\n{\n    if (time > _time) exitWith { true };\n    false\n};\n```","code":["onEachFrame {\n\tif (!alive player) exitWith\n\t{\n\t\tonEachFrame {};\n\t};\n};","_time = time + 10;\nwaitUntil \n{\n\tif (time > _time) exitWith { true };\n\tfalse\n};"]},{"text":"```sqf\nwhile { true } do\n{\n    if (alive player) then\n    {\n        if (time > 300) exitWith // [wrong] - it will only leave the \"if alive player\" scope, remaining in the \"while true\" loop forever\n        {\n            hint \"exiting\";\n        };\n    };\n};\n```","code":["while { true } do\n{\n\tif (alive player) then\n\t{\n\t\tif (time > 300) exitWith // [wrong] - it will only leave the \"if alive player\" scope, remaining in the \"while true\" loop forever\n\t\t{\n\t\t\thint \"exiting\";\n\t\t};\n\t};\n};"]},{"text":"```sqf\nif (_condition) exitWith\n{\n    hint \"reached\";\n};\n// else { hint \"not reached\" }; // [wrong] - using else does not work and makes no sense here\n```\n\n```sqf\nif (_condition) exitWith\n{\n    hint \"reached\";\n};\nhint \"not reached\"; // [correct] - if _condition is met, the scope has already been exited by now\n```","code":["if (_condition) exitWith\n{\n\thint \"reached\";\n};\n// else { hint \"not reached\" }; // [wrong] - using else does not work and makes no sense here","if (_condition) exitWith\n{\n\thint \"reached\";\n};\nhint \"not reached\"; // [correct] - if _condition is met, the scope has already been exited by now"]}],"see_also":["scopeName","breakOut","breakTo","else","Control Structures","then","assert","try","catch","throw"],"notes":[{"user":"RoehrenRadio","date":"2010-05-28T22:15:00Z","text":"Since Arma 2 uses Blocks in FSM as any ordinary Handle like while, for etc. in Scripts, **ExitWith** also only closes the Block in the FSM."},{"user":"Killzone_Kid","date":"2013-08-04T12:20:00Z","text":"The command will exit the current scope - no ifs no buts. If the current scope is a loop, it will exit the loop. If the current scope is the main body of a script, it will exit the script. For more understanding of scopes and exitWith have a look at [this resource](http://killzonekid.com/arma-scripting-tutorials-scopes/)."},{"user":"Killzone_Kid","date":"2016-03-10T08:31:00Z","text":"exitWith cannot be used in event handlers with override ability to simply exit with override value. The following is incorrect:\n\n```sqf\n// INCORRECT USAGE\nonMapSingleClick { if (!isServer) exitWith { true } };\n```\n\nThe override value must be returned in the main scope of EH, but since it is exited with exitWith, it never happens. The correct way in this case would be:\n\n```sqf\n// CORRECT USAGE\nonMapSingleClick { call { if (!isServer) exitWith { true } } };\n```\n\nexitWith will exit current call scope only and override value therefore will appear in the main scope of the EH, right where we want it."}]},{"name":"exp","title":"exp","type":"command","url":"https://community.bistudio.com/wiki/exp","revid":338163,"updated":"2023-02-23T23:48:34Z","groups":["Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Exponential function with the base [e](https://en.wikipedia.org/wiki/E_(mathematical_constant)). Equal to `e^x`.","syntaxes":[{"syntax":"exp x","params":[{"name":"x","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"x"}}],"examples":[{"code":["_e = exp 1; // Returns e (2.7182...)"]},{"code":["ln exp 1; // Returns 1"]}],"see_also":["Math Commands"],"notes":[{"user":"Franze","date":"2009-03-03T22:04:00Z","text":"Note that you cannot exponent a value greater than 88.72283554077147726999 (999 repeating), as this is beyond what the game can calculate."}]},{"name":"expectedDestination","title":"expectedDestination","type":"command","url":"https://community.bistudio.com/wiki/expectedDestination","revid":377689,"updated":"2026-01-02T09:03:08Z","groups":["Unit Control","AI Behaviour"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local"},"description":"Return expected destination of unit as an array.","syntaxes":[{"syntax":"expectedDestination person","params":[{"name":"person","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [destination, planningMode, forceReplan]\n- destination: PositionAGL - planningMode: String - can be one of: - \"DoNotPlan\" - used when not moving - \"DoNotPlanFormation\" - used in formation when simple path testing is used - \"LEADER PLANNED\" - used for formation leader (full path finding used) - \"LEADER DIRECT\" - used for DirectGo (like getin, supply) - \"FORMATION PLANNED\" - used in formation when full path finding is used - \"VEHICLE PLANNED\" - used for vehicle driver - forceReplan: Boolean - specifies if path replanning was forced (through setDestination)","text":"Array with [destination, planningMode, forceReplan]\n\n- destination: PositionAGL\n- planningMode: String - can be one of:\n  - \"DoNotPlan\" - used when not moving\n  - \"DoNotPlanFormation\" - used in formation when simple path testing is used\n  - \"LEADER PLANNED\" - used for formation leader (full path finding used)\n  - \"LEADER DIRECT\" - used for DirectGo (like getin, supply)\n  - \"FORMATION PLANNED\" - used in formation when full path finding is used\n  - \"VEHICLE PLANNED\" - used for vehicle driver\n- forceReplan: Boolean - specifies if path replanning was forced (through setDestination)"},"form":"unary","right":{"text":"person"}}],"examples":[{"code":["_data = expectedDestination player;"]}],"see_also":["setDestination","getUnitState"],"notes":[{"user":"Donnervogel","date":"2007-03-03T16:24:00Z","text":"For AI units I have found the following values: *planningMode* is \"LEADER PLANNED\" when the unit is ordered by the group leader to go somewhere or if the unit is the group leader and it follows a waypoint. Otherwise *planningMode* it is \"DoNotPlan\". Units moving in formation have \"DoNotPlan\" as long as they don't receive orders by the group leader. Units also have \"DoNotPlan\" when they don't move. Units executing special formation tasks like engaging or return to formation have \"FORMATION PLANNED\" as long they have not fulfilled the task."}]},{"name":"exportJIPMessages","title":"exportJIPMessages","type":"command","url":"https://community.bistudio.com/wiki/exportJIPMessages","revid":370220,"updated":"2024-11-10T18:07:35Z","groups":["Diagnostic","Multiplayer"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Creates a log file containing an overview on all JIP (network) messages currently in the JIP queue.\nThe file is created in the same directory as .rpt file.\n\n> [!NOTE]\n> BattlEye's RCON variant of this command is `#exportJIPqueue` (see also Multiplayer Server Commands).\n\nFile name examples:\n\n- `jipqueue_12024_2024-10-25_11-31-11.log` (using `#exportJIPqueue` chat command)\n- `jipqueue-12024-2024-10-25_11-31-11.fileNameParameter.log` (using exportJIPMessages sqf command)\n\nFile content example:\n\n```\ntime = 78814.063\n\n==================================================================================================\nObjects:\n---------------------------------------------------------------------------------------------\n    Type_96 creator:2 networkId:ID - owner __SERVER__ (2)\n---------------------------------------------------------------------------------------------\n    Type_107 creator:2 networkId:ID - owner __SERVER__ (2)\n---------------------------------------------------------------------------------------------\n    Type_109 creator:2 networkId:ID - owner __SERVER__ (2)\n---------------------------------------------------------------------------------------------\n    Type_113 creator:2 networkId:ID - owner __SERVER__ (2)\n---------------------------------------------------------------------------------------------\n    Type_118 creator:2 networkId:ID - owner __SERVER__ (2)\n---------------------------------------------------------------------------------------------\n    Type_99 creator:2 networkId:ID - owner __SERVER__ (2)\n---------------------------------------------------------------------------------------------\n    Unknown creator:2 networkId:ID - owner __SERVER__ (2)\n---------------------------------------------------------------------------------------------\n    Type_332 creator:2 networkId:ID - owner __SERVER__ (2)\n---------------------------------------------------------------------------------------------\n    Type_334 creator:2 networkId:ID - owner __SERVER__ (2)\n---------------------------------------------------------------------------------------------\n    Type_198 creator:2 networkId:ID - owner __SERVER__ (2)\n---------------------------------------------------------------------------------------------\n    Unknown creator:4 networkId:0 - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_332 creator:4 networkId:1 - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_334 creator:4 networkId:2 - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_96 creator:2 networkId:ID - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_109 creator:2 networkId:ID - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_113 creator:2 networkId:ID - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_118 creator:2 networkId:ID - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_195 creator:2 networkId:ID - owner __SERVER__ (2)\n---------------------------------------------------------------------------------------------\n    Type_99 creator:4 networkId:3 - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_99 creator:4 networkId:4 - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_99 creator:4 networkId:5 - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_99 creator:4 networkId:6 - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_99 creator:4 networkId:7 - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_99 creator:4 networkId:8 - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_96 creator:4 networkId:12 - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_96 creator:4 networkId:13 - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_96 creator:4 networkId:15 - owner NAME (1c7f3773)\n---------------------------------------------------------------------------------------------\n    Type_96 creator:4 networkId:49 - owner NAME (1c7f3773)\n\n==================================================================================================\n_initMessages - Total: 7601\n                Type_330 :     4\n                 Type_60 :     6\n                Type_272 :    31\n                Type_273 :    31\n                Type_274 :  4481\n                 Type_64 :   435\n                Type_291 :   147\n                Type_292 :     1\n                Type_187 :    50\n                Type_248 :  1846\n                 Type_53 :    70\n                 Type_54 :   341\n                Type_294 :     3\n                 Type_10 :    69\n                Type_385 :     1\n                Type_295 :     1\n                Type_296 :    16\n                Type_328 :     4\n                Type_329 :     4\n                 Type_59 :    60\n\n==================================================================================================\n_initMessagesRE - Total: 0\n\n==================================================================================================\n_jipMarkerInfos - Total: 0\n```","syntaxes":[{"syntax":"exportJIPMessages fileName","params":[{"name":"fileName","type":"String","description":"file where to store the list","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"fileName"}}],"examples":[{"code":["exportJIPMessages \"myFileNameWithoutExtension\";"]}],"see_also":["didJIP","didJIPOwner","logEntities","diag_captureFrame"],"notes":[{"user":"Demellion","date":"2019-10-16T19:31:00Z","text":"*Note: this may have only applied to earlier versions of the game; as of Arma 3 v2.18 no such problems are reported.*\nExporting JIP might crash a populated server. This doesn't seem to be exactly related to amount of data to export, since results don't vary much against unpopulated server."}]},{"name":"exportLandscapeXYZ","title":"exportLandscapeXYZ","type":"command","url":"https://community.bistudio.com/wiki/exportLandscapeXYZ","revid":352124,"updated":"2024-02-01T23:25:06Z","groups":["System"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Exports landscape as XYZ file.\n\n> [!WARNING]\n> Not available in Retail Version!","syntaxes":[{"syntax":"exportLandscapeXYZ filename","params":[{"name":"filename","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"filename"}}],"examples":[{"code":["exportLandscapeXYZ \"myLandscape.txt\";"]}]},{"name":"eyeDirection","title":"eyeDirection","type":"command","url":"https://community.bistudio.com/wiki/eyeDirection","revid":377870,"updated":"2026-01-04T11:39:04Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the direction object is watching (eyes, or a vehicle's primary observer).","syntaxes":[{"syntax":"eyeDirection unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Vector3D","type_expr":"Vector3D"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"Keep a can in front of the player's *face*:\n\n```sqf\nCan = \"Land_Can_V3_F\" createVehicle getPosATL player;\nonEachFrame {\n    _eyePos = eyePos player;\n    _eyeDir = eyeDirection player;\n    Can setPosASL [\n        _eyePos select 0 + (_eyeDir select 0),\n        _eyePos select 1 + (_eyeDir select 1),\n        _eyePos select 2 + (_eyeDir select 2)\n    ]\n};\n```","code":["Can = \"Land_Can_V3_F\" createVehicle getPosATL player;\nonEachFrame {\n\t_eyePos = eyePos player;\n\t_eyeDir = eyeDirection player;\n\tCan setPosASL [\n\t\t_eyePos select 0 + (_eyeDir select 0),\n\t\t_eyePos select 1 + (_eyeDir select 1),\n\t\t_eyePos select 2 + (_eyeDir select 2)\n\t]\n};"]},{"text":"Draw AI eye direction (green) and weapon direction (red) in 3D:\n\n```sqf\nBob = createGroup east createUnit [\"O_Soldier_F\", [0,0,0], [], 0, \"NONE\"];\nBob setVehiclePosition [player modelToWorld [0,100,0], [], 0, \"NONE\"];\nonEachFrame {\n    _beg = ASLToAGL eyePos Bob;\n\n    _endE = _beg vectorAdd (eyeDirection Bob vectorMultiply 100);\n    drawLine3D [_beg, _endE, [0,1,0,1]];\n\n    _endW = _beg vectorAdd (Bob weaponDirection currentWeapon Bob vectorMultiply 100);\n    drawLine3D [_beg, _endW, [1,0,0,1]];\n};\n```","code":["Bob = createGroup east createUnit [\"O_Soldier_F\", [0,0,0], [], 0, \"NONE\"];\nBob setVehiclePosition [player modelToWorld [0,100,0], [], 0, \"NONE\"];\nonEachFrame {\n\t_beg = ASLToAGL eyePos Bob;\n\n\t_endE = _beg vectorAdd (eyeDirection Bob vectorMultiply 100);\n\tdrawLine3D [_beg, _endE, [0,1,0,1]];\n\n\t_endW = _beg vectorAdd (Bob weaponDirection currentWeapon Bob vectorMultiply 100);\n\tdrawLine3D [_beg, _endW, [1,0,0,1]];\n};"]}],"see_also":["positionCameraToWorld","weaponDirection","getCameraViewDirection","vectorDir","vectorDirVisual"],"notes":[{"user":"Killzone_Kid","date":"2014-05-26T19:10:00Z","text":"This command should have really been named *headDirection* instead of eyeDirection as one could mistakenly think that eyes direction of your avatar correspond to the direction of the centre of your screen.\nPlay with the script in Example 1 to find out limitations. If you need centre of screen direction, use positionCameraToWorld instead."}]},{"name":"eyePos","title":"eyePos","type":"command","url":"https://community.bistudio.com/wiki/eyePos","revid":377435,"updated":"2026-01-02T06:46:41Z","groups":["Positions"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the object's eyes / main turret position.","syntaxes":[{"syntax":"eyePos object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionASL","type_expr":"PositionASL"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_eyesPos = eyePos player;"]}],"see_also":["eyeDirection","getPosASL","setPosASL","setPosASL2","getCameraViewDirection","positionCameraToWorld"]},{"name":"face","title":"face","type":"command","url":"https://community.bistudio.com/wiki/face","revid":364911,"updated":"2024-06-30T09:08:15Z","groups":["Unit Identity"],"status":"ok","games":{"arma3":"1.02"},"since":"arma3 1.02","arma3_since":"1.02","description":"Returns the face class of a person as it is written in 'CfgFaces'.","syntaxes":[{"syntax":"face person","params":[{"name":"person","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"person"}}],"examples":[{"code":["face player;"]}],"see_also":["setFace","setIdentity","setSpeaker","hasCustomFace"]},{"name":"faction","title":"faction","type":"command","url":"https://community.bistudio.com/wiki/faction","revid":370764,"updated":"2025-02-10T08:05:51Z","groups":["Object Manipulation","Sides"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Gets unit faction. Factions were introduced in Arma 2 and are defined under *CfgFactionClasses*.\n\n| Side | Arma 2 v1.00 | Arma 2: Operation Arrowhead v1.50 | Arma 3 v1.96 |\n|---|---|---|---|\n| west/blufor | - `USMC`<br>- `CDF` | - `BIS_US`<br>- `BIS_CZ`<br>- `BIS_GER`<br>- `BIS_BAF` (BAF DLC) | - `BLU_F` (NATO)<br>- `BLU_G_F` (FIA)<br>- `BLU_T_F` (Pacific NATO, Apex Expansion)<br>- `BLU_CTRG_F` (Pacific CTRG, Apex Expansion)<br>- `BLU_GEN_F` (Gendarmerie, Apex Expansion)<br>- `BLU_W_F` (Woodland NATO, Contact Expansion) |\n| east/opfor | - `INS` (ChDKZ)<br>- `RU` (Russia) | - `BIS_TK` (Takistan army)<br>- `BIS_TK_INS` (TK insurgents) | - `OPF_F` (Iranian CSAT)<br>- `OPF_G_F` (FIA)<br>- `OPF_T_F` (Chinese CSAT, Apex Expansion)<br>- `OPF_R_F` (Spetznatz, Contact Expansion) |\n| resistance/<br>independent | - `GUE` (Guerilla) | - `BIS_TK_GUE`<br>- `BIS_UN` (United Nations)<br>- `PMC_BAF` (PMC DLC) | - `IND_F` (AAF)<br>- `IND_G_F` (FIA)<br>- `IND_C_F` (Syndikat, Apex Expansion)<br>- `IND_E_F` (LDF, Contact Expansion)<br>- `IND_L_F` (Looters, Contact Expansion) |\n| civilian | - `CIV`<br>- `CIV_RU` | - `BIS_TK_CIV`<br>- `BIS_CIV_special` | - `CIV_F`<br>- `CIV_IDAP_F` (Laws of War DLC) |\n\n> [!NOTE]\n> If a unit's faction is not defined in its config, an empty string is returned.","syntaxes":[{"syntax":"faction unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["private _playerFaction = faction player;"]}],"see_also":["side","Side"],"notes":[{"user":"Tankbuster","date":"2010-03-19T16:56:00Z","text":"Faction behaves slightly differently to side. Side can refer to the pilot or commander of a vehicle, but faction never changes. It always returns the 'country of manufacture'."}]},{"name":"fadeEnvironment","title":"fadeEnvironment","type":"command","url":"https://community.bistudio.com/wiki/fadeEnvironment","revid":338929,"updated":"2023-04-17T15:30:39Z","groups":["Sounds"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","locality":{"effect":"local"},"description":"Changes the master environment volume smoothly within the given time and is different from enableEnvironment global mute option. The default volume is 1.\nInfluenced sounds, among others, are:\n\n- forest sounds (birds, crickets, ...)\n- waves\n- wind\n- rain\n- object sounds (air conditioners, ...)\n- Arma 3 v2.06 thunder","syntaxes":[{"syntax":"time fadeEnvironment volume","params":[{"name":"time","type":"Number","description":"fade interval in seconds","type_expr":"Number"},{"name":"volume","type":"Number","description":"speech volume in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"volume"}}],"examples":[{"code":["5 fadeEnvironment 0.1;"]}],"see_also":["environmentVolume","fadeSpeech","fadeRadio","fadeSound","fadeMusic","soundVolume","musicVolume","radioVolume","speechVolume","enableEnvironment","environmentEnabled"]},{"name":"fadeMusic","title":"fadeMusic","type":"command","url":"https://community.bistudio.com/wiki/fadeMusic","revid":376977,"updated":"2026-01-01T06:06:52Z","groups":["Sounds"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Changes the current music volume to the given value smoothly within the given time.\n\n> [!NOTE]\n> The player's in-game setting is not changed by this command: `Final Volume = Client Setting * Scripted Volume`.","syntaxes":[{"syntax":"time fadeMusic volume","params":[{"name":"time","type":"Number","description":"fade interval in seconds","type_expr":"Number"},{"name":"volume","type":"Number in range 0..5","description":"music volume","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"volume"}}],"examples":[{"code":["5 fadeMusic 0; // fade current music volume to 0 in 5 sec"]}],"see_also":["fadeSound","fadeRadio","fadeSpeech","fadeEnvironment","environmentVolume","musicVolume","soundVolume","radioVolume"]},{"name":"fadeRadio","title":"fadeRadio","type":"command","url":"https://community.bistudio.com/wiki/fadeRadio","revid":376968,"updated":"2026-01-01T05:59:29Z","groups":["Sounds"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Changes the radio volume smoothly within the given time.\n\n> [!NOTE]\n> The player's in-game setting is not changed by this command: `Final Volume = Client Setting * Scripted Volume`.","syntaxes":[{"syntax":"time fadeRadio volume","params":[{"name":"time","type":"Number","description":"fade interval in seconds","type_expr":"Number"},{"name":"volume","type":"Number in range 0..2","description":"radio volume","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"volume"}}],"examples":[{"code":["5 fadeRadio 0.1;"]}],"see_also":["fadeSound","fadeMusic","fadeSpeech","fadeEnvironment","environmentVolume","radioVolume","soundVolume","musicVolume"],"notes":[{"user":"Beita","date":"2008-09-11T17:17:00Z","text":"Does not affect VoN."},{"user":"Fusselwurm","date":"2016-09-13T15:52:00Z","text":"Also influences audibility of the missile warning in helicopters."}]},{"name":"fadeSound","title":"fadeSound","type":"command","url":"https://community.bistudio.com/wiki/fadeSound","revid":376964,"updated":"2026-01-01T05:56:16Z","groups":["Sounds"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Changes the sound volume smoothly within the given time.\n\n> [!NOTE]\n> The player's in-game setting is not changed by this command: `Final Volume = Client Setting * Scripted Volume`.","syntaxes":[{"syntax":"time fadeSound volume","params":[{"name":"time","type":"Number","description":"fade interval in seconds","type_expr":"Number"},{"name":"volume","type":"Number in range 0..1","description":"sound volume","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"volume"}}],"examples":[{"code":["5 fadeSound 0;"]}],"see_also":["fadeRadio","fadeSpeech","fadeMusic","fadeEnvironment","environmentVolume","soundVolume","musicVolume","radioVolume"],"notes":[{"user":"Lou Montana","date":"2010-01-19T13:16:00Z","text":"This command doesn't work, in **Arma 2 1.05**."}]},{"name":"fadeSpeech","title":"fadeSpeech","type":"command","url":"https://community.bistudio.com/wiki/fadeSpeech","revid":376969,"updated":"2026-01-01T05:59:43Z","groups":["Sounds"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Changes the master speech volume smoothly within the given time. The default volume is 1.0. Some of the sounds that play through speech channel are:\n\n- Tactical Ping sound\n- playSound when *isSpeech* argument is true\n- say3D when *isSpeech* argument is true","syntaxes":[{"syntax":"time fadeSpeech volume","params":[{"name":"time","type":"Number","description":"fade interval in seconds","type_expr":"Number"},{"name":"volume","type":"Number in range 0..2","description":"speech volume","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"volume"}}],"examples":[{"code":["5 fadeSpeech 0.1;"]}],"see_also":["speechVolume","fadeRadio","fadeSound","fadeMusic","fadeEnvironment","environmentVolume","soundVolume","musicVolume","radioVolume"]},{"name":"failMission","title":"failMission","type":"command","url":"https://community.bistudio.com/wiki/failMission","revid":363258,"updated":"2024-03-26T10:51:31Z","groups":["Mission Information"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Finish the mission. If the server is set to run persistent mission, failMission will not end the mission when last player gets kicked to the lobby. Use endMission to end the mission.\n\nThe end type can be:\n\n- \"CONTINUE\" - this is default type, basically an alias to do nothing\n- \"KILLED\"\n- \"LOSER\"\n- \"END1\"\n- \"END2\"\n- \"END3\"\n- \"END4\"\n- \"END5\"\n- \"END6\"\n\n**Mission saves won't be deleted**.\n\n> [!NOTE]\n> **Arma 3:** To maintain Arma 3 visual style, it is recommended to use BIS_fnc_endMission instead.","syntaxes":[{"syntax":"failMission endtype","params":[{"name":"endtype","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"endtype"}}],"examples":[{"code":["failMission \"LOSER\";"]}],"see_also":["missionEnd","endMission","forceEnd"]},{"name":"false","title":"false","type":"command","url":"https://community.bistudio.com/wiki/false","revid":321031,"updated":"2022-05-13T11:41:32Z","groups":["Math","Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Always false.","syntaxes":[{"syntax":"false","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_var = false;\nsystemChat str _var; // false"]}],"see_also":["true"]},{"name":"fileExists","title":"fileExists","type":"command","url":"https://community.bistudio.com/wiki/fileExists","revid":352073,"updated":"2024-02-01T23:24:41Z","groups":["Program Flow"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Checks if file on given path exists. Uses same path resolve code as loadFile.\n\n> [!NOTE]\n> Absolute paths are not supported, such as those generated using getMissionPath. Attempting to check an absolute path will result in this error in RPT logs:\n> `Invalid path (only relative paths supported): 'C:\\...'`","syntaxes":[{"syntax":"fileExists path","params":[{"name":"path","type":"String","description":"path to file","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if it exists, otherwise false"},"form":"unary","right":{"text":"path"}}],"examples":[{"code":["fileExists \"\\a3\\mySuperPath\\bestFileEver.paa\"; // returns false"]},{"code":["private _path = \"a3\\functions_f_mp_mark\\revive\\_addaction_revive.inc\";\nif (fileExists _path) then { loadFile _path } else { diag_log format [\"File (%1) does not exist!\", _path] };"]},{"code":["// Sometimes it might be better to check if a file exists instead of checking if path is empty (\"\")\nprivate _class = \"ModuleObjectiveRaceFinish_F\";\nprivate _picture = getText (configFile >> \"CfgVehicles\" >> _class >> \"editorPreview\");\nif !(fileExists _picture) then { _picture = getText (configFile >> \"CfgVehicles\" >> _class >> \"portrait\") };\nif !(fileExists _picture) then { _picture = getText (configFile >> \"CfgVehicles\" >> _class >> \"icon\") };\nif !(fileExists _picture) then { _picture = getText (configFile >> \"CfgVehicles\" >> _class >> \"picture\") };\nif !(fileExists _picture) then { systemChat \"No valid picture found!\" } else { systemChat _picture };"]}],"see_also":["loadFile","preprocessFile","preprocessFileLineNumbers"],"notes":[{"user":"Leopard20","date":"2022-01-01T16:29:30Z","text":"Returns true for empty strings: `fileExists \"\"; // true`"}]},{"name":"fillWeaponsFromPool","title":"fillWeaponsFromPool","type":"command","url":"https://community.bistudio.com/wiki/fillWeaponsFromPool","revid":309937,"updated":"2022-05-05T12:16:59Z","groups":["Weapon Pool"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Adds magazines from the campaign pool to the given unit, depending on his weapons. Available in campaigns only.","syntaxes":[{"syntax":"fillWeaponsFromPool unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["fillWeaponsFromPool _soldier;"]}],"see_also":["addWeaponPool"]},{"name":"find","title":"find","type":"command","url":"https://community.bistudio.com/wiki/find","revid":376413,"updated":"2025-10-11T01:04:47Z","groups":["Strings","Arrays"],"status":"ok","games":{"ofpe":"1.00","ofp":"1.99","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Searches for an array element within an array or an ANSI string within an ANSI string.\n\n> [!NOTE]\n> **Arma 3:** If Unicode support is desired, see forceUnicode.\n\n> [!IMPORTANT]\n> Search is cASe-seNsItiVE!","syntaxes":[{"syntax":"array find element","params":[{"name":"array","type":"Array","description":"array to search in","type_expr":"Array"},{"name":"element","type":"Anything","description":"array element to find","type_expr":"Anything"}],"returns":{"type":"Number","type_expr":"Number","description":"zero-based position of the first array element that matches x, -1 if not found"},"form":"binary","left":{"text":"array"},"right":{"text":"element"}},{"syntax":"string find substring","since":"arma3 1.28","params":[{"name":"string","type":"String","description":"string to search in","type_expr":"String"},{"name":"substring","type":"String","description":"substring to find","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"zero-based position of the first sequence of characters that matches substring, -1 if not found"},"form":"binary","left":{"text":"string"},"right":{"text":"substring"}},{"syntax":"string find [substring, indexStart]","since":"arma3 2.02","params":[{"name":"string","type":"String","description":"string to search in","type_expr":"String"},{"name":"substring","type":"String","description":"substring to find","type_expr":"String"},{"name":"indexStart","type":"Number","description":"zero-based index which defines where find starts from","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"zero-based position of the first sequence of characters that matches substring, -1 if not found"},"form":"binary","left":{"text":"string"},"right":{"text":"[substring, indexStart]"}}],"examples":[{"code":["[\"Apples\", \"Oranges\", \"Pears\"] find \"Oranges\"; // returns 1"]},{"code":["[1, [2], [[3]]] find [[3]]; // returns 2 - does not work in OFP, returns -1"]},{"code":["if (magazines player find \"Strela\" != -1) then { hint \"You've got Strela!\"; };"]},{"code":["hint str (\"japa is the man!\" find \"the man!\"); // returns 8"]},{"code":["\"abc\" find \"\"; // returns 0"]},{"code":["\"abcdefghijklmnopqrstuvxyz\" find \"z\"; // returns 24\n\"abcdefghijklmnopqrstuvxyz\" find [\"z\", 20]; // returns 24, better performance"]},{"code":["\"abcßdef\" find \"c\"; // 2\n\"abcßdef\" find \"ß\"; // 3\n\"abcßdef\" find \"d\"; // 5 - before forceUnicode\n\nforceUnicode 0; // since Arma 3 v2.02\n\"abcßdef\" find \"d\"; // 4"]}],"see_also":["in","findIf","forceUnicode"],"notes":[{"user":"Heeeere's Johnny!","date":"2015-01-04T09:38:00Z","text":"Using **nil** on either side of **find** will make the whole statement return Nothing:\n\n```sqf\n_array = [1, 2, nil, 4, 5];\n_result = _array find nil;\nhintSilent str (isNil \"_result\"); // true\n\n_result = nil find 1;\nhintSilent str (isNil \"_result\"); // true\n```"},{"user":"R3vo","date":"2020-07-16T07:33:00Z","text":"If you want to return all occurences of a given string in a string use the following code. Thanks to *sharp.* for providing the code.\n\n```sqf\nprivate _fnc_findStringsInString =\n{\n    params [\"_string\", \"_search\"];\n    if (_string == \"\") exitWith { [] };\n    private _searchLength = count _search;\n    private _return = [];\n    private _i = 0;\n    private _index = 0;\n    while { _index = _string find _search; _index != -1 } do\n    {\n        _string = _string select [_index + _searchLength];\n        _i = _i + _index + _searchLength;\n        _return pushBack _i - _searchLength;\n    };\n    _return;\n};\n[\"Test,123,123,Test\", \"Test\"] call _fnc_findStringsInString; // returns [0, 13]\n```"}]},{"name":"findAny","title":"findAny","type":"command","url":"https://community.bistudio.com/wiki/findAny","revid":377163,"updated":"2026-01-01T10:41:43Z","groups":["Arrays"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns the zero-based index of the first element in array A that also exists in array B. If no common elements exist it returns -1.\nSimilar in functionality as find's first syntax, but the second parameter is an array of elements to find.","syntaxes":[{"syntax":"searchIn findAny toFind","params":[{"name":"searchIn","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"toFind","type":"Array of Anything","type_expr":"Array<Anything>"}],"returns":{"type":"Number","type_expr":"Number","description":"the index of the first found item"},"form":"binary","left":{"text":"searchIn"},"right":{"text":"toFind"}}],"examples":[{"code":["[0,1,2,3,4] findAny [2,4,6,8]; // returns 2"]},{"code":["[0,1,2,3,4] findAny [8,6,4,2]; // returns 2"]},{"code":["[0,1,2,3,4] findAny [5,7,9]; // returns -1"]}],"see_also":["find","findIf"]},{"name":"findCover","title":"findCover","type":"command","url":"https://community.bistudio.com/wiki/findCover","revid":377600,"updated":"2026-01-02T07:01:58Z","groups":["Broken Commands"],"status":"broken","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the object around where the unit finds cover. The minDist, visibilityPosition and ignoreObject parameters are optional.\n\n> [!IMPORTANT]\n> Not implemented in Arma 2 and later titles (always returns objNull).","syntaxes":[{"syntax":"object findCover [position, hidePosition, maxDist, minDist, visibilityPosition, ignoreObject]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"position","type":"Position","type_expr":"Position"},{"name":"hidePosition","type":"PositionATL","description":"getHideFrom-like position from which the unit should hide","type_expr":"PositionATL"},{"name":"maxDist","type":"Number","type_expr":"Number"},{"name":"minDist","type":"Number","optional":true,"type_expr":"Number","text":"minDist: Number - (Optional)"},{"name":"visibilityPosition","type":"Position","optional":true,"description":"used to select cover that unit can see in that direction from","type_expr":"Position","text":"visibilityPosition: Position - (Optional) used to select cover that unit can see in that direction from"},{"name":"ignoreObject","type":"Object","optional":true,"description":"ignore this object in visibility check","type_expr":"Object","text":"ignoreObject: Object - (Optional) ignore this object in visibility check"}],"returns":{"type":"Object","type_expr":"Object","description":"always objNull"},"form":"binary","left":{"text":"object"},"right":{"text":"[position, hidePosition, maxDist, minDist, visibilityPosition, ignoreObject]"}}],"examples":[{"code":["unit1 findCover [ASLToATL aimPos unit2, 30];"]}],"see_also":["getHideFrom","setHideBehind","isHidden"],"notes":[{"user":"SnowSky","date":"2015-07-04T22:01:00Z","text":"An alternative function in Arma 3 might be BIS_fnc_findSafePos."}]},{"name":"findDisplay","title":"findDisplay","type":"command","url":"https://community.bistudio.com/wiki/findDisplay","revid":369048,"updated":"2024-09-02T20:24:49Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Finds a display by its IDD which can either be defined in missionConfigFile (description.ext) or configFile (config.cpp) or by its UI On Texture's unique name (see displayUniqueName).\nIf the specified display cannot be found, displayNull is returned.\n\n> [!IMPORTANT]\n> Dedicated servers and headless clients do not have a primary display (e.g `findDisplay 46` will return displayNull).\n> Detect both with the hasInterface command.\n\n> [!NOTE]\n> For a list of (almost) all Arma 3's IDDs, see Arma 3: IDD List.","syntaxes":[{"syntax":"findDisplay idd","params":[{"name":"idd","type":"Number","type_expr":"Number"}],"returns":{"type":"Display","type_expr":"Display"},"form":"unary","right":{"text":"idd"}},{"syntax":"findDisplay displayName","since":"arma3 2.12","params":[{"name":"displayName","type":"String","type_expr":"String"}],"returns":{"type":"Display","type_expr":"Display"},"form":"unary","right":{"text":"displayName"}}],"examples":[{"text":"```sqf\n0 spawn\n{\n    waitUntil { !isNull findDisplay 46 };\n    hint \"Mission Display is now available!\";\n};\n```","code":["0 spawn\n{\n\twaitUntil { !isNull findDisplay 46 };\n\thint \"Mission Display is now available!\";\n};"]},{"code":["_display = findDisplay 1;"]},{"code":["private _display = findDisplay \"RscDisplayRenderTest\";"]}],"see_also":["allDisplays","displayCtrl","createDisplay","createDialog","dialog","displayNull","controlNull","isNull","ctrlCreate","displayParent","displayUniqueName"],"notes":[{"user":"Lou Montana","date":"2019-07-07T12:20:00Z","text":"Common IDDs:\n\n- 46: Mission display\n- 312: Zeus display\n- 49: Pause menu\n- 602: Inventory\n- 24: Chat box\n- 300: Weapon state\n- 12: Map\n- 160: UAV Terminal"},{"user":"Kronzky","date":"2009-06-15T19:10:00Z","text":"findDisplay does *not* find displays defined under RscTitles (even when they are visible).\nTo access those types of displays, either assign the resource to a global variable, or pass its this value to a script, during the onLoad event:\n\ne.g.\n\n```cpp\nclass RscTitles\n{\n    class MyRsc\n    {\n        onLoad = \"myDisplay = (_this select 0)\";\n        // or\n        // onLoad = \"_this execVM 'myDialog.sqf'\";\n        // ...\n    };\n};\n```\n\nYou can then use the stored value as you would for regular dialogs:\n\n```sqf\n(myDisplay displayCtrl 1111) ctrlSetText \"hello there\");\n```"},{"user":"Nelis75733126","date":"2017-06-25T09:32:00Z","text":"I have tested the behavior of this command and I found out that `findDisplay` appears to only return the display AFTER any onLoad event handler of that display is done.\nMeaning: using findDisplay inside the code of an onLoad event handler is useless."},{"user":"Demellion","date":"2017-08-14T12:22:00Z","text":"There are some specific cases, where findDisplay will not be able to find an existing display. Here's the cases and how to act on them:\n\n```cpp\n// Your display has IDD= -1.\nclass RscDisplayNew\n{\n    idd = -1;\n    scriptName = \"RscDisplayNew\";\n    // ...\n};\n```\n\n```cpp\n// Your display doesn't have IDD\nclass RscDisplayNew\n{\n    scriptName = \"RscDisplayNew\";\n    // ...\n};\n```\n\n```cpp\n// Your display doesn't have scriptname with IDD = -1\nclass RscDisplayNew\n{\n    idd = -1;\n    // ...\n};\n```\n\n```cpp\n// Your display doesn't have scriptname, neither IDD\nclass RscDisplayNew\n{\n    // ...\n};\n```\n\n1. You actually can find a -1 display, but this means finding a display with this IDD might be a problem, when there are a few displays marked as -1.So as you can see, theres an entry called **scriptName**. You can get a reference to this display by using uiNamespace:\n\n   ```sqf\n   (uiNamespace getVariable \"RscDisplayNew\")\n   ```\n\n   **NOTE**: Variables are overwritten with a reference of the last declared display under the same scriptName entry. Take a look at case 3 for solution.\n1. Displays without IDDs can actually exist. They can be manipulated only in a way described in the first case using uiNamespace.\n1. You can really have this display seeking it manually in a allDisplays return. This is experimental, but working option.\n1. You will have a problem finding this display, since this display doesn't exist even in allDisplays(?) return. Behaviour unknown."},{"user":"AVespade","date":"2023-05-07T02:55:58Z","text":"Since findDisplay is case-sensitive, and any UI On Texture unique names defined inside a p3d file will always be forced to lowercase, the unique name you search for with findDisplay will need to be lowercase.\n\n```sqf\nprivate _display = findDisplay \"rscdisplayrendertest\";\n```\n\nUse of toLower may be useful to improve legibility or flow, especially in cases where a UI On Texture's unique name is the same as the class name.\n\n```sqf\nprivate _display = findDisplay (toLower \"RscDisplayRenderTest\");\n```"}]},{"name":"findEditorObject","title":"findEditorObject","type":"command","url":"https://community.bistudio.com/wiki/findEditorObject","revid":363271,"updated":"2024-03-26T10:51:40Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return object that matches the provided reference.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map findEditorObject value","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"value","type":"Anything","type_expr":"Anything"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"map"},"right":{"text":"value"}}],"examples":[{"text":"-"}]},{"name":"findEmptyPosition","title":"findEmptyPosition","type":"command","url":"https://community.bistudio.com/wiki/findEmptyPosition","revid":377837,"updated":"2026-01-03T04:32:18Z","groups":["Positions"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Searches for an empty area around the specified position, starting from the *center* looking for an empty *areaRadius* and looks as far away as *areaRadius* + *maxDistance*.\nThis command ignores moving objects present within the search area. The search area can be preloaded with findEmptyPositionReady command.\n\n> [!NOTE]\n> This command does not work outside of world dimensions and will always return the provided *center*.\n> Objects outside the world dimensions will not be considered in the detection either.","syntaxes":[{"syntax":"center findEmptyPosition [areaRadius, maxDistance, vehicleType]","params":[{"name":"center","type":"Position2D or Position3D","description":"search area center position in format [x,y] or [x,y,z] in which case z is ignored","type_expr":"Position2D | Position3D"},{"name":"areaRadius","type":"Number","description":"wanted area radius","type_expr":"Number"},{"name":"maxDistance","type":"Number","description":"stop searching no further than `areaRadius + maxDistance` from the center","type_expr":"Number"},{"name":"vehicleType","type":"String","optional":true,"description":"classname of a vehicle to accommodate","type_expr":"String","text":"vehicleType: String - (Optional) classname of a vehicle to accommodate"}],"returns":{"type":"Position3D","type_expr":"Position3D","description":"a suitable empty position or empty array `[]` if not found"},"form":"binary","left":{"text":"center"},"right":{"text":"[areaRadius, maxDistance, vehicleType]"}}],"examples":[{"code":["_position = getPosASL player findEmptyPosition [0, 100];"]},{"code":["_position = _center findEmptyPosition [10,100,\"UH60M_EP1\"];"]},{"text":"Check if exact position is empty:\n\n```sqf\n_position = _center findEmptyPosition [0, 0, \"B_Boat_Armed_01_minigun_F\"];\n```","code":["_position = _center findEmptyPosition [0, 0, \"B_Boat_Armed_01_minigun_F\"];"]}],"see_also":["findEmptyPositionReady","selectBestPlaces","isFlatEmpty","BIS_fnc_findSafePos"],"notes":[{"user":"Killzone_Kid","date":"2013-11-06T18:10:00Z","text":"Keep search radius short and sweet, under 50 metres maybe. Searching big area takes long time and will result in your game stop responding until the search is over. isFlatEmpty is probably more suitable for a larger area search."},{"user":"old_man_auz","date":"2012-03-06T00:50:00Z","text":"I think the **radius** parameter should be treated as a 'minimum distance' from the **centre** position. I found that the parameter name **radius** was not very clear. Also, if **radius** is greater than **max distance** then the function will always return an empty array.\n\nHere is an snippet of code I use to find a safe landing zone for an extraction helicopter. It may be useful for someone.\n\n```sqf\n_centre = [getMarkerPos \"marker\", random 150, random 360] call BIS_fnc_relPos;\n_extraction_point = [];\n_max_distance = 100;\nwhile { count _extraction_point < 1 } do\n{\n    _extraction_point = _centre findEmptyPosition [30, _max_distance, \"UH60M_EP1\"];\n    _max_distance = _max_distance + 50;\n};\n```\n\nIn the above example, make sure that \"_max_distance\" is greater than 30, otherwise the while loop will go forever."}]},{"name":"findEmptyPositionReady","title":"findEmptyPositionReady","type":"command","url":"https://community.bistudio.com/wiki/findEmptyPositionReady","revid":377552,"updated":"2026-01-02T06:54:51Z","groups":["Positions"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Preloads area to be used with findEmptyPosition command and returns true when area is ready.\nThe size of the area preloaded is from `center - radius - maxDistance` to `center + radius + maxDistance`\n\n> [!IMPORTANT]\n> Preloading large areas may take a long time, we are talking minutes. However once preloaded, it stays preloaded even after mission restart.","syntaxes":[{"syntax":"center findEmptyPositionReady [radius, maxDistance]","params":[{"name":"center","type":"Position2D or Position3D","description":"search area center position in format [x,y] or [x,y,z] in which case z is ignored","type_expr":"Position2D | Position3D"},{"name":"radius","type":"Number","description":"distance from the center","type_expr":"Number"},{"name":"maxDistance","type":"Number","description":"distance from the end of radius","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when ready"},"form":"binary","left":{"text":"center"},"right":{"text":"[radius, maxDistance]"}}],"examples":[{"text":"Preload aread within 500m:\n\n```sqf\n_ready = _center findEmptyPositionReady [0, 500];\n```","code":["_ready = _center findEmptyPositionReady [0, 500];"]}],"see_also":["findEmptyPosition"]},{"name":"findIf","title":"findIf","type":"command","url":"https://community.bistudio.com/wiki/findIf","revid":376518,"updated":"2025-10-22T23:13:13Z","groups":["Arrays"],"status":"ok","games":{"arma3":"1.82"},"since":"arma3 1.82","arma3_since":"1.82","description":"Searches for an element within array for which the code evaluates to true. Returns the zero-based index on success or -1 if not found.\nCode on the right side of the command is evaluated for each element of the array, processed element can be referenced in code as _x.\n\n> [!NOTE]\n> findIf terminates as soon as it finds an element that fulfills the condition, thus it is more efficient than count in scenarios where a check for presence / absence of at least one element should be done (See Example 2).","syntaxes":[{"syntax":"array findIf code","params":[{"name":"array","type":"Array","description":"array to search in","type_expr":"Array"},{"name":"code","type":"Code","description":"code defining an element to find, processed element can be referenced within the code as _x","type_expr":"Code"}],"returns":{"type":"Number","type_expr":"Number","description":"zero-based position of the first array element for which the code evaluate to true, -1 if not found"},"form":"binary","left":{"text":"array"},"right":{"text":"code"}}],"examples":[{"code":["private _firstDead = [unit1, unit2, unit3] findIf { not alive _x }; // return index of the first dead unit"]},{"text":"```sqf\n// two ways how to 'wait for all units to be dead':\nwaitUntil { [unit1, unit2, unit3] findIf { alive _x } == -1 };    // fast, terminates as soon as it finds a living unit\nwaitUntil { { alive _x } count [unit1, unit2, unit3] == 0 };    // slow, always goes through all array elements\n```","code":["// two ways how to 'wait for all units to be dead':\nwaitUntil { [unit1, unit2, unit3] findIf { alive _x } == -1 };\t// fast, terminates as soon as it finds a living unit\nwaitUntil { { alive _x } count [unit1, unit2, unit3] == 0 };\t// slow, always goes through all array elements"]}],"see_also":["find","count"]},{"name":"findNearestEnemy","title":"findNearestEnemy","type":"command","url":"https://community.bistudio.com/wiki/findNearestEnemy","revid":377414,"updated":"2026-01-02T06:45:18Z","groups":["Object Detection"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Finds the nearest enemy to the specified position. Returns a null object if the object's group does not know about any enemies. This command will return nearest object that is known to the unit and is considered enemy. An empty vehicle that is part of enemy group assets (see addVehicle) can be returned as valid nearest target.","syntaxes":[{"syntax":"object findNearestEnemy position","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"position","type":"Object or PositionAGL or Position2D","type_expr":"Object | PositionAGL | Position2D"}],"returns":{"type":"Object","type_expr":"Object"},"form":"binary","left":{"text":"object"},"right":{"text":"position"}}],"examples":[{"code":["_myNearestEnemy = (units _myGroup select 0) findNearestEnemy player;"]},{"code":["_myNearestEnemy = player findNearestEnemy player;"]}],"see_also":["targets","targetsQuery","nearTargets","targetsAggregate","targetKnowledge","knowsAbout","reveal","forgetTarget","setTargetAge","getHideFrom","nearestBuilding","nearestObject","nearestObjects","nearObjects","nearestLocation","nearEntities","nearSupplies","nearestLocationWithDubbing","nearObjectsReady","nearRoads","nearestMines"]},{"name":"finishMissionInit","title":"finishMissionInit","type":"command","url":"https://community.bistudio.com/wiki/finishMissionInit","revid":378152,"updated":"2026-02-25T23:18:14Z","groups":["System"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Finish world initialisation before mission is launched.","syntaxes":[{"syntax":"finishMissionInit","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"text":"finishMissionInit"}],"see_also":["startLoadingScreen","endLoadingScreen"]},{"name":"finite","title":"finite","type":"command","url":"https://community.bistudio.com/wiki/finite","revid":379419,"updated":"2026-10-31T00:04:01Z","groups":["Math"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns true if the provided number is finite (not infinite and a valid number).\n\n> [!NOTE]\n> - Maximum finite Number : 3.40282e+38\n> - Minimum finite Number : -3.40282e+38","syntaxes":[{"syntax":"finite number","params":[{"name":"number","type":"Number","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"number"}}],"examples":[{"code":["finite 123; // returns true"]},{"code":["finite log -1; // returns false"]},{"code":["if (not finite log -1) then { hint \"Infinite\" };"]}],"see_also":["a / b"],"notes":[{"user":"Killzone_Kid","date":"2013-09-27T00:00:00Z","text":"Don't get high hopes with this command thinking what a great way of catching divisions by zero, the command is pretty useless in this respect:\n\n```sqf\n// Arma 2\nhint str finite (10/0);    // true ... O_o Huh????\nhint str (10/0);        // 0 ... Weird, but that explains it.\n\n// Arma 3\nhint str finite (10/0);    // true + Error Zero Divisor\nhint str finite 10;        // true\nhint str finite 1000000000000000000000000000000000000000; // false\n```"}]},{"name":"fire","title":"fire","type":"command","url":"https://community.bistudio.com/wiki/fire","revid":379420,"updated":"2026-10-31T00:04:09Z","groups":["Unit Control","Weapons"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Forces a unit to fire the given weapon.\n\n> [!NOTE]\n> Just like with forceWeaponFire it is possible to pass remote unit as argument, but this could be unreliable. Considering this command might need to be used in combination with selectWeapon, which takes only local arguments, it would make sense to execute the fire command where the unit is local as well.","syntaxes":[{"syntax":"unit fire muzzle","params":[{"name":"unit","type":"Object","description":"unit that is supposed to fire","type_expr":"Object"},{"name":"muzzle","type":"String","description":"name of the muzzle to be fired","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"muzzle"}},{"syntax":"unit fire [muzzle, mode, magazine]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"muzzle","type":"String","type_expr":"String"},{"name":"mode","type":"String","type_expr":"String"},{"name":"magazine","type":"String","optional":true,"type_expr":"String","text":"magazine: String - (Optional)"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[muzzle, mode, magazine]"}}],"examples":[{"code":["_soldier fire \"M16\";"]},{"code":["_soldier fire \"SmokeShellMuzzle\";"]},{"code":["_soldier fire [\"SmokeShellMuzzle\", \"SmokeShellMuzzle\", \"SmokeShellRed\"];"]},{"code":["player playActionNow \"PutDown\";\nplayer selectWeapon \"DemoChargeMuzzle\";\nplayer fire [\"DemoChargeMuzzle\", \"DemoChargeMuzzle\", \"DemoCharge_Remote_Mag\"];\nplayer setWeaponReloadingTime [player, \"DemoChargeMuzzle\", 0];"]}],"see_also":["BIS_fnc_fire","doFire","commandFire","canFire","fireAtTarget","forceWeaponFire","commandArtilleryFire","commandSuppressiveFire","doArtilleryFire","doSuppressiveFire","isManualFire","selectWeapon","ArmA: Actions"],"notes":[{"user":"Str","date":"2006-08-17T00:00:00Z","text":"Sometimes AI won't shoot when you use this command. It can be fixed by placing selectWeapon command before it."},{"user":"Ceeeb","date":"2007-02-02T00:00:00Z","text":"In **OFP v1.96**, when a man class unit is given this command, he will aim up in the air before firing his weapon. This makes it rather useless if you want to make him shoot a target. It does work with vehicles, when the vehicle is first given a doWatch or doTarget command."},{"user":"Bdfy","date":"2007-01-20T00:00:00Z","text":"In **ArmA v1.02**, this command is not working with weapons in the secondary turrets (like \"DSHKM\" in T-72)"},{"user":"Kronzky","date":"2008-01-15T00:00:00Z","text":"To place a satchel (pipebomb) the syntax is:\n**OFP**: unitname Fire [\"put\", \"pipebomb\"]\n**ArmA**: unitname Fire [\"pipebombmuzzle\", \"pipebombmuzzle\", \"pipebomb\"];\n*The triggering is done via a \"TOUCHOFF\" action.*"},{"user":"Mr.g-c","date":"2010-03-18T00:00:00Z","text":"In Arma 2, AI will automatically shoot straight up. Command seems to be broken."},{"user":"Mikhail","date":"2010-11-24T00:00:00Z","text":"Command is broken - confirmed. Use action \"USEWEAPON\" instead.\nPlace a game logic in the editor. Name it **MyGameLogic**.\nUse this code to make **unit1** fire his primaryweapon:\n\n```sqf\nMyGameLogic action [\"useWeapon\", primaryWeapon unit1, unit1, 0];\n```"},{"user":".kju","date":"2011-02-25T00:00:00Z","text":"Command works just fine in A2/OA. Make sure to execute it on **local** AI."},{"user":"Max Power","date":"2012-04-06T00:00:00Z","text":"If it did work at one time, it does no longer. The AI (or player) is forced to look upwards or reacts to a massive recoil force before getting his shot off."},{"user":"hcpookie","date":"2013-02-16T00:00:00Z","text":"Command did not work with Arma 2:ACR v1.62. Use fireAtTarget instead."},{"user":"Killzone_Kid","date":"2014-06-04T21:14:00Z","text":"In Arma 3 in order for AI to place Claymore, for example, it is necessary to execute 3 statements - an animation, weapon select and the actual fire command. Animation is most likely for forcing unit to leave rest state, weapon select and fire kinda both go together anyway:\n\n```sqf\n_unit playActionNow \"PutDown\";\n_unit selectWeapon \"DirectionalMineRemoteMuzzle\";\n_unit fire [\n    \"DirectionalMineRemoteMuzzle\",\n    \"DirectionalMineRemoteMuzzle\",\n    \"ClaymoreDirectionalMine_Remote_Mag\"\n];\n```"},{"user":"SteveStevenson","date":"2017-11-25T00:00:00Z","text":"In Arma 3, as of version 1.76, examples 2 and 3 in the section above for smoke grenades are no longer working.\nAs a workaround (throwing green smoke grenades for example), you can use:\n\n```sqf\n[_soldier, \"SmokeShellGreenMuzzle\"] call BIS_fnc_fire;\n```"}]},{"name":"fireAtTarget","title":"fireAtTarget","type":"command","url":"https://community.bistudio.com/wiki/fireAtTarget","revid":369417,"updated":"2024-09-03T18:48:49Z","groups":["Unit Control","Weapons"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Remotely forces a unit to fire the given weapon. See also BIS_fnc_fire.","syntaxes":[{"syntax":"sourceVehicle fireAtTarget [targetVehicle, weaponMuzzleName]","params":[{"name":"sourceVehicle","type":"Object","description":"source vehicle to fire from","type_expr":"Object"},{"name":"targetVehicle","type":"Object","description":"target vehicle to fire at","type_expr":"Object"},{"name":"weaponMuzzleName","type":"String","optional":true,"description":"weapon muzzle classname, optional parameter","type_expr":"String","text":"weaponMuzzleName: String - (Optional) weapon muzzle classname, optional parameter"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if fired, false if not"},"form":"binary","left":{"text":"sourceVehicle"},"right":{"text":"[targetVehicle, weaponMuzzleName]"}}],"examples":[{"code":["_handle = this fireAtTarget [groundtarget1, \"HellfireLauncher\"];"]},{"code":["_handle = Igla_AA_pod_TK_EP1 fireAtTarget [_helicopter, currentWeapon Igla_AA_pod_TK_EP1];"]},{"code":["_handle = Igla_AA_pod_TK_EP1 fireAtTarget [helicopter];"]}],"see_also":["fire","doFire","commandFire","canFire","forceWeaponFire","commandArtilleryFire","commandSuppressiveFire","doArtilleryFire","doSuppressiveFire","isManualFire","aimedAtTarget","BIS_fnc_fire"],"notes":[{"user":"Dwarden","date":"2010-09-16T08:17:00Z","text":"Most likely only for missiles and for interaction with player only."},{"user":"ffur2007slx2_5","date":"2014-04-08T16:50:00Z","text":"(Arma 3 1.14) Source vehicle is only limited to manned vehicle while any other types won’t be able to active fireAtTarget handle, e.g.\n\n```sqf\n_handle = _infantryUnit fireAtTarget [_infantryTarget, weapons _infantryUnit select 0];\n// false & no bullet shoot\n```\n\nTarget has no limitation and can be any object:\n\n```sqf\n_handle = (vehicle _veh) fireAtTarget [objNull, weapons (vehicle _veh) select 0];\n// true & a bullet shoot\n```\n\nHandle returns false if weapon class name is inaccurate, e.g.\n\n```sqf\n_handle = (vehicle _veh) fireAtTarget [ObjNull, \"UnknownWeapon\"];\n// false & no bullet shoot\n```\n\nHandle still returns true even though the vehicle is unavailable to shoot any bullet:\n\n```sqf\n_weapon = weapons (vehicle _veh) select 0;\n(vehicle _veh) setAmmo [_weapon, 0];\n_handle = (vehicle _veh) fireAtTarget [objNull, _weapon];\n// true & no bullet shoot\n```\n\n#### Difference\n\n| command | Source | Target | Behavior | Workaround templets |\n|---|---|---|---|---|\n| fire | Either unit or manned vehicle | N/A | Fired aiming at air for infantry rifle | Together with selectWeapon,<br>suggested to work with \"throw\",\"put\" weapon type<br>for infantry, or vehicle entity indeed. |\n| fireAtTarget | Manned vehicle only | Any object | Normal shoot, won’t aim at target automatically | ```sqf<br>_veh doWatch _target;<br>waitUntil { _veh aimedAtTarget [_target] > 0 };<br>_veh fireAtTarget [_target];<br>``` |\n| forceWeaponFire | Either unit or manned aircraft (weapon operator) | N/A | Normal shoot, can change fire mode | ```sqf<br>// e.g. unit won't shoot until he is facing the target<br>_unit doWatch _tar;<br>waitUntil {<br>    _dir = direction _unit;<br>    _relative = [_unit,_tar] call BIS_fnc_relativeDirTo;<br>    if (_dir == _relative) exitWith {<br>        _unit forceWeaponFire [currentWeapon _unit, \"single\"];<br>    };<br>    false<br>};<br>``` |\n| doFire | Unit only | Either unit or vehicle | automatic aiming and shooting | No special example. |\n| commandFire | Unit only | Either unit or vehicle | automatic aiming and shooting | No special example. |\n| action [\"UseWeapon\"] | Either unit or manned vehicle | N/A | unexpected behavior | N/A |"}]},{"name":"firstBackpack","title":"firstBackpack","type":"command","url":"https://community.bistudio.com/wiki/firstBackpack","revid":318966,"updated":"2022-05-13T09:22:07Z","groups":["Containers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns the first stored backpack.","syntaxes":[{"syntax":"firstBackpack box","params":[{"name":"box","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"box"}}],"examples":[{"code":["myVariable = firstBackpack myBox;"]}],"see_also":["backpackContainer","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack"]},{"name":"flag","title":"flag","type":"command","url":"https://community.bistudio.com/wiki/flag","revid":353769,"updated":"2024-03-23T14:27:22Z","groups":["Flags"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the original flag pole of the flag the unit is carrying.","syntaxes":[{"syntax":"flag unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"flag pole object the flag belongs to. If the unit carries no flag, objNull is returned."},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_flag = flag _soldier;"]}],"see_also":["flagOwner","setFlagOwner","setFlagSide","setFlagTexture","flagSide","flagTexture","setFlagAnimationPhase","flagAnimationPhase","forceFlagTexture","getForcedFlagTexture"]},{"name":"flagAnimationPhase","title":"flagAnimationPhase","type":"command","url":"https://community.bistudio.com/wiki/flagAnimationPhase","revid":376970,"updated":"2026-01-01T06:01:24Z","groups":["Flags"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","locality":{"argument":"global"},"description":"Returns flag position on the flag pole.","syntaxes":[{"syntax":"flagAnimationPhase flag","params":[{"name":"flag","type":"Object","description":"flag pole of the type `\"FlagCarrier\"`","type_expr":"Object"}],"returns":{"type":"Number in range 0..1","type_expr":"Number","description":"flag position, where 0 is bottom of the flag pole, 1 is the top of the flag pole"},"form":"unary","right":{"text":"flag"}}],"examples":[{"code":["flagAnimationPhase _flag1;"]}],"multiplayer":"The result is local to the PC on which command is executed.","see_also":["setFlagAnimationPhase","Arma 3: Flag Textures"]},{"name":"flagOwner","title":"flagOwner","type":"command","url":"https://community.bistudio.com/wiki/flagOwner","revid":353770,"updated":"2024-03-23T14:27:22Z","groups":["Flags"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Returns the global owner of a flag. A getter for setFlagOwner. Note that owner of a flag is Object rather than Number, as how it is usually with other owner commands","syntaxes":[{"syntax":"flagOwner flag","params":[{"name":"flag","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"the person or vehicle that owns the flag is returned. If used on anything else than a flag, the returned value is objNull. If the flag is on its pole, the return value is NULL. If the flagowner is dead, the return value is the name of the soldier model"},"form":"unary","right":{"text":"flag"}}],"examples":[{"code":["_person = flagOwner _flagOne;"]}],"see_also":["setFlagOwner"]},{"name":"flagSide","title":"flagSide","type":"command","url":"https://community.bistudio.com/wiki/flagSide","revid":376347,"updated":"2025-10-07T17:04:44Z","groups":["Flags"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","locality":{"argument":"global","effect":"local"},"description":"Returns Side of the local instance of the flag. A getter for setFlagSide.","syntaxes":[{"syntax":"flagSide flag","params":[{"name":"flag","type":"Object","description":"flag","type_expr":"Object"}],"returns":{"type":"Side","type_expr":"Side"},"form":"unary","right":{"text":"flag"}}],"examples":[{"code":["_flagSide =  flagSide aFlag;"]}],"see_also":["setFlagSide","Arma 3: Flag Textures"]},{"name":"flagTexture","title":"flagTexture","type":"command","url":"https://community.bistudio.com/wiki/flagTexture","revid":349339,"updated":"2023-11-08T14:53:29Z","groups":["Flags"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","locality":{"argument":"global","effect":"local"},"description":"Returns texture of the local instance of the flag. A getter for setFlagTexture. It will not return flag textures applied using forceFlagTexture, use getForcedFlagTexture for that.","syntaxes":[{"syntax":"flagTexture flagCarrier","params":[{"name":"flagCarrier","type":"Object","description":"vehicle, unit or flag pole","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"flagCarrier"}}],"examples":[{"code":["_flagTexture = flagTexture _flag1;"]}],"see_also":["setFlagTexture","Arma 3: Flag Textures"]},{"name":"flatten","title":"flatten","type":"command","url":"https://community.bistudio.com/wiki/flatten","revid":377162,"updated":"2026-01-01T10:41:18Z","groups":["Arrays"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Flattens an array.","syntaxes":[{"syntax":"flatten array","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"}],"returns":{"type":"Array of Anything","type_expr":"Array<Anything>","description":"flattened array"},"form":"unary","right":{"text":"array"}}],"examples":[{"code":["flatten [1, [2], [[3]], [[[4]]]]; // returns [1, 2, 3, 4]"]},{"code":["flatten getUnitLoadout player;"]}],"see_also":["arrayIntersect"]},{"name":"fleeing","title":"fleeing","type":"command","url":"https://community.bistudio.com/wiki/fleeing","revid":349082,"updated":"2023-11-08T14:47:23Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks if a unit is fleeing.\n\nNotes:\n\n- Fleeing only affects AI led groups.\n- Only the group as a whole can flee (or not).\n- The courage of the AI group is based on the group's leader courage subskill.\n- Each group has a max strength (summed \"armor\" of all infantry units - plus armor when inside vehicles).\n- If the group losses by injury/damage or death/destruction are higher than the max strength, multiplied by leader's courage or allowFleeing level , then the group will start fleeing.\n- As result primarily the AI flees to a nearby \"supply point\" (some friendly units - preferably with medic or engineer, or a vehicle with repair/ammo/fuel cargo). Alternatively it will try to find a safe position within a 600m radius from the initial waypoint (danger, distance, amount of cover positions are taken into account).\n- After the fleeing has been finished the group's initial strength is reset.\n- Fleeing units in combatMode red, will be set to yellow when fleeing to avoid engaging enemies while doing so.\n- While fleeing, the group leader will be set to green, to avoid giving engage or fire orders, unless in combatMode blue already. Also speedMode is set to full.\n- When reaching their flee point/destination, they will change to combatMode yellow and speedMode normal.\n- With allowFleeing one can make unit's flee earlier (or essentially never flee). Apply it, overrides the courage subskill influence.","syntaxes":[{"syntax":"fleeing unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if a unit is fleeing, false if not. Dead or empty units return false.","text":"Boolean - returns true if a unit is fleeing, false if not. **Dead** or **empty** units return false."},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["if (fleeing soldier_1) then {player sideChat \"We have won!\"} else {player sideChat \"Keep fighting!\"};"]}],"see_also":["allowFleeing"]},{"name":"floor","title":"floor","type":"command","url":"https://community.bistudio.com/wiki/floor","revid":369333,"updated":"2024-09-03T18:43:00Z","groups":["Math"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the next **lowest** integer in relation to the provided number.","syntaxes":[{"syntax":"floor num","params":[{"name":"num","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"num"}}],"examples":[{"text":"```sqf\nfloor 5.1;        // result is  5\nfloor 5.999;    // result is  5\nfloor -2.01;    // result is -3\nfloor -2.99;    // result is -3\n```","code":["floor 5.1;\t\t// result is  5\nfloor 5.999;\t// result is  5\nfloor -2.01;\t// result is -3\nfloor -2.99;\t// result is -3"]}],"see_also":["ceil","round","linearConversion"]},{"name":"flyInHeight","title":"flyInHeight","type":"command","url":"https://community.bistudio.com/wiki/flyInHeight","revid":376081,"updated":"2025-08-01T17:11:58Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets the flying altitude for aircraft relatively to the ground surface. Avoid too low altitudes, as helicopters and planes won't evade trees and obstacles on the ground. The default flying altitude is 100 meters. The minimum height is 20 meters.\n\n> [!NOTE]\n> Height measurement is relative to the pilot and can be approximated with `ASLToAGL eyePos driver _aircraft;`.","syntaxes":[{"syntax":"aircraft flyInHeight altitude","params":[{"name":"aircraft","type":"Object","type_expr":"Object"},{"name":"altitude","type":"Number","description":"flying altitude in meters","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"aircraft"},"right":{"text":"altitude"}},{"syntax":"aircraft flyInHeight [altitude, forced]","since":"arma3 2.14","params":[{"name":"aircraft","type":"Object","type_expr":"Object"},{"name":"altitude","type":"Number","description":"flying altitude in meters","type_expr":"Number"},{"name":"forced","type":"Boolean","description":"true to force altitude in all cases, false to behave like main syntax","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"aircraft"},"right":{"text":"[altitude, forced]"}}],"examples":[{"code":["_helicopter flyInHeight 40;"]},{"text":"```sqf\n// for altitudes below 10m\n_helicopter flyInHeight 5;            // helicopter will land\n_helicopter flyInHeight [5, true];    // helicopter will hover at 5m altitude\n\n// on a landed helicopter\n_helicopter flyInHeight 50;            // helicopter will not move until a waypoint is added\n_helicopter flyInHeight [50, true];    // helicopter will start to rise immediately\n```","code":["// for altitudes below 10m\n_helicopter flyInHeight 5;\t\t\t// helicopter will land\n_helicopter flyInHeight [5, true];\t// helicopter will hover at 5m altitude\n\n// on a landed helicopter\n_helicopter flyInHeight 50;\t\t\t// helicopter will not move until a waypoint is added\n_helicopter flyInHeight [50, true];\t// helicopter will start to rise immediately"]}],"see_also":["flyInHeightASL"],"notes":[{"user":"Hardrock","date":"2006-08-04T12:50:00Z","text":"*Notes from before the conversion:*\nFrom Operation Flashpoint v1.80 - flyInHeight now affects not only helicopters, but also planes."},{"user":"Kronzky","date":"2008-12-16T01:34:00Z","text":"A flyInHeight of 0 will keep the chopper pinned to the ground, even when the engines have been started."},{"user":"Jtgibson","date":"2009-04-11T00:53:00Z","text":"If a helo has no waypoints, it will assume a low hover without regard to this setting.\n\n> [!IMPORTANT]\n> This comment does not apply to the alternative syntax."},{"user":"OverlordZorn","date":"2025-08-01T17:11:58Z","text":"As of 2.20:\n\n- when altitude is greater or equal 10, collision avoidance will maintain priority and the rotary airframe stays around 20~35 meters ATL, depending on nearby objects.\n\n- when altitude is lower then 10, for example, 9.99999, it seems that collision avoidance is disabled and the airframe will maintain the desired ATL."}]},{"name":"flyInHeightASL","title":"flyInHeightASL","type":"command","url":"https://community.bistudio.com/wiki/flyInHeightASL","revid":329162,"updated":"2022-07-25T12:35:13Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Sets the minimal ASL height. Final height is `flyInHeight max flyInHeightASL` - the higher altitude has priority.","syntaxes":[{"syntax":"aircraft flyInHeightASL [standardAltitude, combatAltitude, stealthAltitude]","params":[{"name":"aircraft","type":"Object","description":"helicopter, airplane","type_expr":"Object"},{"name":"standardAltitude","type":"Number","description":"base altitude used when behaviour is neither \"COMBAT\" or \"STEALTH\"","type_expr":"Number"},{"name":"combatAltitude","type":"Number","description":"altitude used when behaviour is \"COMBAT\"","type_expr":"Number"},{"name":"stealthAltitude","type":"Number","description":"altitude used when behaviour is \"STEALTH\"","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"aircraft"},"right":{"text":"[standardAltitude, combatAltitude, stealthAltitude]"}}],"examples":[{"code":["cobraOne flyInHeightASL [200, 100, 400];"]}],"see_also":["flyInHeight"]},{"name":"focusedCtrl","title":"focusedCtrl","type":"command","url":"https://community.bistudio.com/wiki/focusedCtrl","revid":348589,"updated":"2023-11-08T13:42:42Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","description":"Returns display's focused control.","syntaxes":[{"syntax":"focusedCtrl display","params":[{"name":"display","type":"Display","description":"parent display","type_expr":"Display"}],"returns":{"type":"Control","type_expr":"Control","description":"control which has focus"},"form":"unary","right":{"text":"display"}}],"examples":[{"code":["private _focusedCtrl = focusedCtrl findDisplay 12;"]},{"code":["private _isFocused = focusedCtrl _display == _ctrl;"]},{"code":["private _isFocused = focusedCtrl (ctrlParent _ctrl) == _ctrl;"]}],"see_also":["ctrlSetFocus","displayParent","ctrlParent"]},{"name":"focusOn","title":"focusOn","type":"command","url":"https://community.bistudio.com/wiki/focusOn","revid":363319,"updated":"2024-03-26T16:41:39Z","groups":["Camera Control","Remote Control"],"status":"ok","games":{"arma3":"2.16"},"since":"arma3 2.16","arma3_since":"2.16","description":"Returns the person the camera is focused on. If you need the vehicle, see cameraOn.","syntaxes":[{"syntax":"focusOn","params":[],"returns":{"type":"Object","type_expr":"Object","description":"controlled person or objNull if no unit is controlled"},"form":"nullary"}],"examples":[{"code":["private _currentlyControlledUnit = focusOn;"]},{"text":"```sqf\nif (isNull player) exitWith { /* no player */ };\n\nif (player == focusOn) then\n{\n    hint \"You are controlling your player unit\";\n}\nelse\n{\n    hint \"You are remote-controlling a unit\";\n};\n```","code":["if (isNull player) exitWith { /* no player */ };\n\nif (player == focusOn) then\n{\n\thint \"You are controlling your player unit\";\n}\nelse\n{\n\thint \"You are remote-controlling a unit\";\n};"]}],"see_also":["switchCamera","cameraView","cameraEffect","cameraOn","remoteControl"]},{"name":"fog","title":"fog","type":"command","url":"https://community.bistudio.com/wiki/fog","revid":310796,"updated":"2022-05-07T20:21:54Z","groups":["Environment"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"A getter for setFog. Returns the current value of the fog in range 0..1.","syntaxes":[{"syntax":"fog","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_foglevel = fog;"]}],"multiplayer":"Before Arma 3, each client and the server could have different values. In Arma 3 the value is synced across network.","see_also":["fogParams","fogForecast","setFog","nextWeatherChange"]},{"name":"fogForecast","title":"fogForecast","type":"command","url":"https://community.bistudio.com/wiki/fogForecast","revid":310773,"updated":"2022-05-07T20:21:44Z","groups":["Environment"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the forecast fog value. A value of 0 means no fog, 1 means maximum fog.","syntaxes":[{"syntax":"fogForecast","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_level = fogForecast;"]}],"multiplayer":"This command returns the local forcast fog value. Each client and the server can have differing values.","see_also":["fogParams","fog","setFog","nextWeatherChange"]},{"name":"fogParams","title":"fogParams","type":"command","url":"https://community.bistudio.com/wiki/fogParams","revid":353028,"updated":"2024-03-12T11:39:48Z","groups":["Environment"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"A getter for setFog (Alt Syntax). Returns extended params for the fog","syntaxes":[{"syntax":"fogParams","params":[],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"in setFog format: [fogValue, fogDecay, fogBase]"},"form":"nullary"}],"examples":[{"code":["private _fog = fogParams;"]}],"see_also":["setFog","fog","fogForecast","rainParams"],"notes":[{"user":"POLPOX","date":"2023-09-23T06:51:53Z","text":"To return a position (ASL Height)'s approx. fog level\n\n```sqf\nprivate _getFogPowerASL = {\n    fogParams params [\"_fogPower\",\"_fogDecay\",\"_fogHeight\"] ;\n    private _height = _this - _fogHeight;\n    (_fogPower * 0.5 ^ (_height * _fogDecay / 2.45) max 0)\n};\n\n(AGLToASL (positionCameraToWorld [0,0,0]) # 2) call _getFogPowerASL;\n```\n\nNote that, this could return >1 value if fogDecay is not 0."}]},{"name":"for","title":"for","type":"command","url":"https://community.bistudio.com/wiki/for","revid":353544,"updated":"2024-03-19T12:01:33Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"This operator creates a For Type which is used in the for-constructs.\n\n> [!WARNING]\n> The alternative syntax `for _array do _code` is slower than the first syntax because the condition is checked in every iteration, and it has a few bugs.\n> It is only kept for backward compatibility; always use the first syntax `for \"_i\" from 0 to _end do _code`.","syntaxes":[{"syntax":"for arguments","params":[{"name":"arguments","type":"String","description":"declares the index variable name like \"_myVar\". from and to are required, step is optional.","type_expr":"String"}],"returns":{"type":"For Type","type_expr":"For Type"},"form":"unary","right":{"text":"arguments"}},{"syntax":"for [init, condition, codeToExecute]","params":[{"name":"init","type":"Code","description":"loop variable definition","type_expr":"Code"},{"name":"condition","type":"Code","description":"called code returns false, leave the for-loop","type_expr":"Code"},{"name":"codeToExecute","type":"Code","description":"code to be run on each loop","type_expr":"Code"}],"returns":{"type":"For Type","type_expr":"For Type"},"form":"unary","right":{"text":"[init, condition, codeToExecute]"}}],"examples":[{"code":["// will output 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 (the to value being inclusive)\nfor \"_i\" from 1 to 10 do { systemChat str _i; };"]},{"code":["// will output 9, 7, 5, 3, 1\nfor \"_i\" from 9 to 1 step -2 do { systemChat str _i; };"]},{"code":["// will output 0, 1, 2, 3, 4, 5, 6, 7, 8, 9\nfor [{ _i = 0 }, { _i < 10 }, { _i = _i + 1 }] do { systemChat str _i };"]},{"code":["// BAD CODE\n_i = 100;\nfor [{ _i = 0 }, { _i < 5 }, { _i = _i + 1 }] do { /* code */ };\nhint str _i; // 5\n\n// GOOD CODE (private keyword is recommended)\n_i = 100;\nfor [{ private _i = 0 }, { _i < 5 }, { _i = _i + 1 }] do { /* code */ };\nhint str _i; // 100\n\n// BEST CODE (primary syntax, fastest)\n_i = 100;\nfor \"_i\" from 0 to 4 do { /* code */ };\nhint str _i; // 100"]}],"problems":"> [!NOTE]\n> **Arma 2:** There is an Arma 2 issue (not present in Arma 2:OA nor in Arma 3) where having a capital letter in the variable name **will** throw an error:\n>\n> ```sqf\n> for \"_i\" from 0 to 2 do { hintSilent str _i; }; // works\n> for \"_I\" from 0 to 2 do { hintSilent str _I; }; // \"variable _i is not defined\" error\n> ```","see_also":["Control Structures","while","do"],"notes":[{"user":"Alef","date":"2010-04-29T16:06:00Z","text":"```sqf\nfor \"_i\" from 0 to  0 do {}; // will do once, with _i = 0\nfor \"_i\" from 0 to -1 do {}; // will not do\n```"},{"user":"ffur2007slx2_5","date":"2014-04-15T12:54:00Z","text":"- Arma 3 v1.16 Please note the difference between the two syntaxes; `for arguments` detects Boolean in each scope while `for array` doesn’t. e.g.\n\n| command | Structure | Summary |\n|---|---|---|\n| for *array* | ```sqf<br>a = 0; b = true;<br>for [{ _i = 0 }, { _i < 10 && b }, { _i = _i + 1 }] do<br>{<br>    a = a + 1;<br>    if (a >= 7) then {b = false}<br>};<br>``` | loop can be exited via Boolean control, possible workaround can be e.g BIS_fnc_areEqual |\n| for *arguments* | ```sqf<br>a = 0;<br>for \"_i\" from 0 to 10 do<br>{<br>    a = a + 1;<br>    if (a >= 7) exitwith {};<br>};<br>``` | has to be exited via exitWith |\n\n- Never try to tell a decimal number via binary number in a loop; otherwise the loop will be infinite:\n\n```sqf\nfor [{_a = 0},{_a != 1},{_a = _a + 0.1}] do {}; // an infinite loop; _a will never be 1 so the scope will always be true\n```\n\nAny binary number behind the decimal point is always the sum of 1/2, 1/4, 1/8, 1/16 etc. so decimal number with odd denominator like 1/3 or 1/10 cannot be exactly equal to each other.\n\n- Avoid too large factorial multiply which may loose the leading indicator in result. And 12 is the biggest accessable factor in this example.\n\n```sqf\nfor [{_a = 2; _b = 1;},{_a < 100},{_a = _a + 1}] do {_b = _b * _a}; // _b =  1.#INF\n```"},{"user":"Killzone_Kid","date":"2015-06-04T19:27:00Z","text":"Variable name doesn't have to start with _. could be:\n\n```sqf\nfor \"LAlala\" from 0 to 0 do { hint str LAlala }; // 0\n```\n\nThe variable *LAlala* will exist only inside do {} scope and will not overwrite any variable of the same name that existed before."},{"user":"Nickorr","date":"2015-06-04T19:45:00Z","text":"Dont use this notation if you plan to change the cycle ranges dynamically. The range values are checked only before the cycle started. Use `for array` instead.\n\nExample, that won't work correctly:\n\n```sqf\n_xy = [1,2,3,4,5,6,7,8,9,10];\nfor \"_i\" from 0 to (count _xy - 1) do\n{\n    if ( _xy select _i == 3 ) then\n    {\n        _xy deleteAt _i;\n        _i = _i - 1;\n    };\n};\n```\n\n(Here the `_i = 9` step will still be checked by the cycle, which will lead to \"out of the array range\" error.)\nThis code will work correctly:\n\n```sqf\n_xy = [1,2,3,4,5,6,7,8,9,10];\nfor [{_i = 1},{_i<=(count _xy - 1)},{_i=_i+1}] do\n{\n    if ( _xy select _i == 3 ) then\n    {\n        _xy deleteAt _i;\n        _i = _i - 1;\n    };\n};\n```\n\n(The last step here will be `_i = 8` with array looking like this: `[1,2,4,5,6,7,8,9,10]`)"},{"user":"DreadedEntity","date":"2016-01-29T05:18:00Z","text":"For loops can be safely nested. This means that there should not be any problems with recursion.\n\n```sqf\n_array = [];\nfor \"_i\" from 0 to 3 do\n{\n    for \"_i\" from 0 to 3 do\n    {\n        _array pushBack _i;\n    };\n    _array pushBack _i;\n};\nhint str _array;\n```"}]},{"name":"forceAddUniform","title":"forceAddUniform","type":"command","url":"https://community.bistudio.com/wiki/forceAddUniform","revid":318837,"updated":"2022-05-13T09:21:54Z","groups":["Containers","Unit Inventory"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","locality":{"argument":"global","effect":"global"},"description":"Create a new uniform and hard link it into slot (without any restrictions).","syntaxes":[{"syntax":"unit forceAddUniform type","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"type","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"type"}}],"examples":[{"code":["_unit forceAddUniform \"U_B_CombatUniform_mcam\";"]}],"see_also":["addUniform","isUniformAllowed","removeUniform","uniform"]},{"name":"forceAtPositionRTD","title":"forceAtPositionRTD","type":"command","url":"https://community.bistudio.com/wiki/forceAtPositionRTD","revid":379527,"updated":"2026-10-31T00:50:42Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Adds force generator to world.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"forceAtPositionRTD position","params":[{"name":"position","type":"Array","description":"position where to force generator is created.","type_expr":"Array"}],"returns":{"type":"Array","type_expr":"Array"},"form":"unary","right":{"text":"position"}}],"examples":[{"code":["forceAtPositionRTD [0,0,0];"]}],"see_also":["clearForcesRTD"]},{"name":"forceCadetDifficulty","title":"forceCadetDifficulty","type":"command","url":"https://community.bistudio.com/wiki/forceCadetDifficulty","revid":310147,"updated":"2022-05-05T12:46:27Z","groups":["Difficulty"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Forces `showCadetHints` and `showCadetWP` global Cadet Arma 3 difficulty, returns previous settings.","syntaxes":[{"syntax":"forceCadetDifficulty [showCadetHints, showCadetWP]","params":[{"name":"showCadetHints","type":"Boolean","description":"`showCadetHints` difficulty","type_expr":"Boolean"},{"name":"showCadetWP","type":"Boolean","description":"`showCadetWP` difficulty","type_expr":"Boolean"}],"returns":{"type":"Array of Booleans","type_expr":"Array<Boolean>","description":"[prev_showCadetHints, prev_showCadetWP]"},"form":"unary","right":{"text":"[showCadetHints, showCadetWP]"}}],"examples":[{"code":["private _previousSettings = forceCadetDifficulty [true, false];"]},{"text":"```sqf\nprivate _fnc_forceCadetDifficulty =\n{\n    params [\"_OKButtonPressed\"];\n    if (_OKButtonPressed) then\n    {\n        forceCadetDifficulty (switch (toLowerANSI configName ((configFile >> \"CfgDifficultyPresets\") select difficulty)) do\n        {\n            case \"recruit\";\n            case \"regular\":\n            {\n                // showCadetHints = 1;\n                // showCadetWP = 1;\n                [true, true]\n            };\n            case \"veteran\":\n            {\n                // showCadetHints = 0;\n                // showCadetWP = 1;\n                [false, true]\n            };\n            default\n            {\n                // showCadetHints = 0;\n                // showCadetWP = 0;\n                [false, false]\n            };\n        });\n    };\n};\n[true] call _fnc_forceCadetDifficulty;\n[missionNamespace, \"OnGameOptionsExited\", _fnc_forceCadetDifficulty] call BIS_fnc_addScriptedEventHandler;\n```","code":["private _fnc_forceCadetDifficulty = \n{\n\tparams [\"_OKButtonPressed\"];\n\tif (_OKButtonPressed) then\n\t{\n\t\tforceCadetDifficulty (switch (toLowerANSI configName ((configFile >> \"CfgDifficultyPresets\") select difficulty)) do\n\t\t{\n\t\t\tcase \"recruit\";\n\t\t\tcase \"regular\":\n\t\t\t{\n\t\t\t\t// showCadetHints = 1;\n\t\t\t\t// showCadetWP = 1;\n\t\t\t\t[true, true]\n\t\t\t};\n\t\t\tcase \"veteran\":\n\t\t\t{\n\t\t\t\t// showCadetHints = 0;\n\t\t\t\t// showCadetWP = 1;\n\t\t\t\t[false, true]\n\t\t\t};\n\t\t\tdefault\n\t\t\t{\n\t\t\t\t// showCadetHints = 0;\n\t\t\t\t// showCadetWP = 0;\n\t\t\t\t[false, false]\n\t\t\t};\n\t\t});\n\t};\n};\n[true] call _fnc_forceCadetDifficulty;\n[missionNamespace, \"OnGameOptionsExited\", _fnc_forceCadetDifficulty] call BIS_fnc_addScriptedEventHandler;"]}],"see_also":["difficulty","cadetMode","hintCadet","Arma 3: Scripted Event Handlers"]},{"name":"forcedMap","title":"forcedMap","type":"command","url":"https://community.bistudio.com/wiki/forcedMap","revid":377695,"updated":"2026-01-02T09:03:18Z","groups":["Map","Interaction"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Returns if map was forced by using forceMap command or openMap command with force option","syntaxes":[{"syntax":"forcedMap","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [forceMapForced, openMapForced]\n- forceMapForced: Boolean - true if map was forced with forceMap command - openMapForced: Boolean - true if map was forced with openMap command.","text":"Array with [forceMapForced, openMapForced]\n\n- forceMapForced: Boolean - true if map was forced with forceMap command\n- openMapForced: Boolean - true if map was forced with openMap command."},"form":"nullary"}],"examples":[{"code":["_forceMapForced = forcedMap select 0;\n_openMapForced = forcedMap select 1;"]}],"see_also":["openMap","forceMap","showMap","visibleMap","shownMap"]},{"name":"forceEnd","title":"forceEnd","type":"command","url":"https://community.bistudio.com/wiki/forceEnd","revid":318934,"updated":"2022-05-13T09:22:03Z","groups":["Mission Information"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Forces mission ending (set with endMission) even if a camera effect or any another condition delays the endMission (mostly in Operation Flashpoint).","syntaxes":[{"syntax":"forceEnd","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["forceEnd;// in an ending trigger to ensure no camera is delaying mission ending"]}],"see_also":["missionEnd","failMission","endMission","enableEndDialog"]},{"name":"forceFlagTexture","title":"forceFlagTexture","type":"command","url":"https://community.bistudio.com/wiki/forceFlagTexture","revid":348626,"updated":"2023-11-08T13:46:04Z","groups":["Flags"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"global","effect":"global"},"description":"Forces a flag texture onto a flag carrier (unit, vehicle or flag pole).\nNo flag holder is required. If `\"\"` is used as texture, the texture is removed.\nThis will override regularly owned flags.\nThis type of flag texture cannot be retrieved using flagTexture, but getForcedFlagTexture.\n\n> [!IMPORTANT]\n> Forced flag texture is an additional flag texture, which visually overrides original flag texture and therefore is very expensive to simulate, so use the functionality sparingly.","syntaxes":[{"syntax":"object forceFlagTexture texture","params":[{"name":"object","type":"Object","description":"vehicle, unit or flag pole","type_expr":"Object"},{"name":"texture","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"texture"}}],"examples":[{"code":["player forceFlagTexture \"\\A3\\Data_F\\Flags\\Flag_red_CO.paa\";"]}],"see_also":["getForcedFlagTexture","Arma 3: Flag Textures"]},{"name":"forceFollowRoad","title":"forceFollowRoad","type":"command","url":"https://community.bistudio.com/wiki/forceFollowRoad","revid":346816,"updated":"2023-08-05T12:44:00Z","groups":["Unit Control"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","description":"Forces the vehicle to stay on road.","syntaxes":[{"syntax":"vehicle forceFollowRoad state","params":[{"name":"vehicle","type":"Object","description":"vehicle","type_expr":"Object"},{"name":"state","type":"Boolean","description":"true: Force on road, false: default behaviour","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"state"}}],"examples":[{"code":["car forceFollowRoad true;"]}],"see_also":["setConvoySeparation","limitSpeed","setDriveOnPath","useAISteeringComponent"]},{"name":"forceGeneratorRTD","title":"forceGeneratorRTD","type":"command","url":"https://community.bistudio.com/wiki/forceGeneratorRTD","revid":379528,"updated":"2026-10-31T00:50:50Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Adds force generator to world.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"forceGeneratorRTD index","params":[{"name":"index","type":"Number","description":"index","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array"},"form":"unary","right":{"text":"index"}}],"examples":[{"code":["forceGeneratorRTD 2;"]}],"see_also":["clearForcesRTD","forceAtPositionRTD"]},{"name":"forceHitPointsDamageSync","title":"forceHitPointsDamageSync","type":"command","url":"https://community.bistudio.com/wiki/forceHitPointsDamageSync","revid":370215,"updated":"2024-11-09T23:07:51Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"local","effect":"global"},"description":"Synchronises hitpoints values and total damage across current network clients as well as JIP.\nPossible uses after executing script commands such as setHit, setHitIndex, setHitPointDamage or in conjunction with HandleDamage event handler (see Example 2).","syntaxes":[{"syntax":"forceHitPointsDamageSync entity","params":[{"name":"entity","type":"Object","description":"entity","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if sync was attempted"},"form":"unary","right":{"text":"entity"}}],"examples":[{"code":["forceHitPointsDamageSync house1;"]},{"text":"```sqf\nhouse1 addEventHandler [\"HandleDamage\",\n{\n    if (isServer && { _this select 9 == 2 }) then { (_this select 0) spawn { forceHitPointsDamageSync _this; } };\n    if (_this select 7 find \"glass\" >= 0) then { _this select 2 } else { 0 };\n}];\n```","code":["house1 addEventHandler [\"HandleDamage\", \n{\n\tif (isServer && { _this select 9 == 2 }) then { (_this select 0) spawn { forceHitPointsDamageSync _this; } };\n\tif (_this select 7 find \"glass\" >= 0) then { _this select 2 } else { 0 };\n}];"]}],"multiplayer":"Static buildings synchronisation should be executed on the server as the server is the authority in building damage and you would want every client in MP to have the same level of damage as the server has.","see_also":["getHit","getHitPointDamage","setHitPointDamage","damage","setDamage","setFuel","setAmmo","getHitIndex","setHitIndex"]},{"name":"forceMap","title":"forceMap","type":"command","url":"https://community.bistudio.com/wiki/forceMap","revid":363365,"updated":"2024-03-27T23:45:43Z","groups":["Map","Interaction"],"status":"ok","games":{"ofp":"1.27","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.27","arma3_since":"0.50","locality":{"effect":"local"},"description":"Opens non-interactive main map in background that overrides user screen. To force open interactive map use openMap command.\n\n> [!WARNING]\n> When the map is forced open with this command, the user is still able to fire but cannot see the world, just the map.\n> The map cannot be closed manually and the user can get stuck requiring a game restart. Make sure you provide scripted mechanics to de-force the map at a later stage.","syntaxes":[{"syntax":"forceMap show","params":[{"name":"show","type":"Boolean","description":"true to force, false to go back to normal map behaviour","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"show"}}],"examples":[{"code":["forceMap true;"]}],"see_also":["forcedMap","showMap","shownMap","openMap","visibleMap"],"notes":[{"user":"Ceeeb","date":"2007-02-02T05:28:00Z","text":"In **OFP v1.96**, the mapAnim series of commands, together with forceMap can only be used in the intro and mission, as it is not possible to access the map from the outro.\n*(not checked, sourced from an old copy of the OFPEC comref)*"},{"user":"Manny","date":"2007-05-05T15:43:00Z","text":"Manually opening the map afterwards won't close the map.\nActually it will open the \"real\" map on top of the forced map, and closing the (top) map with the <kbd>M</kbd> key again will still show the forcefully opened map."}]},{"name":"forceRespawn","title":"forceRespawn","type":"command","url":"https://community.bistudio.com/wiki/forceRespawn","revid":320952,"updated":"2022-05-13T10:04:47Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","locality":{"argument":"local","effect":"global"},"description":"Forces the unit to respawn. The effect is as if the player pressed the RESPAWN button in the game pause menu; the unit is killed but there is no \"X was killed\" message and no score adjustment.","syntaxes":[{"syntax":"forceRespawn unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["forceRespawn player;"]}],"see_also":["playerRespawnTime","setPlayerRespawnTime"]},{"name":"forceSpeed","title":"forceSpeed","type":"command","url":"https://community.bistudio.com/wiki/forceSpeed","revid":379421,"updated":"2026-10-31T00:04:17Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Force the speed limit on given object (object will never attempt to move faster than given by forceSpeed). Use negative value to return to default behaviour.\n\n> [!IMPORTANT]\n> This has no effect on players.","syntaxes":[{"syntax":"object forceSpeed speed","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"speed","type":"Number","description":"in metre per second","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"speed"}}],"examples":[{"code":["_helicopter forceSpeed 150;"]},{"text":"```sqf\n_vtol forceSpeed 0; // vtol stop and hover\n```","code":["_vtol forceSpeed 0; // vtol stop and hover "]},{"text":"```sqf\n_vtol forceSpeed -1; // vtol resume\n```","code":["_vtol forceSpeed -1; // vtol resume "]}],"see_also":["getForcedSpeed","forceWalk","isWalking","isForcedWalk","getSpeed","limitSpeed"],"notes":[{"user":"Donnervogel","date":"2007-03-02T16:02:00Z","text":"Setting forceSpeed to -1 will make the unit move according to the group speed mode (often specified by the waypoint) again. Setting forceSpeed to 0 will halt the unit ignoring waypoints or orders."},{"user":"Kronzky","date":"2008-02-09T00:00:00Z","text":"Does not seem to do *anything* at the current time (V1.08.5163)"},{"user":"Igneous01","date":"2011-12-14T00:00:00Z","text":"If a unit (man) has forceSpeed set to anything under jogging (walking only) the unit will refuse to get into vehicles. He will automatically be unassigned from a vehicle everytime he is ordered to get in (via scripts or direct action)"},{"user":"TMZulu","date":"2020-05-01T03:21:00Z","text":"This command must be executed on the client to which the object/unit is local and will only take effect where the unit is local. If locality changes, the command must be reapplied."},{"user":"Leopard20","date":"2021-11-17T06:49:26Z","text":"In the case of infantry units, it is recommended to use getSpeed for better and more accurate results:\n\n```sqf\n_unit forceSpeed (_unit getSpeed \"NORMAL\"); // force the unit to run\n```"}]},{"name":"forceUnicode","title":"forceUnicode","type":"command","url":"https://community.bistudio.com/wiki/forceUnicode","revid":377708,"updated":"2026-01-02T09:03:46Z","groups":["Strings"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"List of the commands that work with forceUnicode\n\n- copyFromClipboard\n- copyToClipboard\n- count\n- find\n- in\n- insert\n- reverse\n- select\n- splitString\n- trim\n- regexFind\n- regexMatch\n- regexReplace\n\nSets the Unicode flag which forces some of the string manipulation commands to switch to [Unicode](https://en.wikipedia.org/wiki/Unicode).\nThe Unicode flag is always set right after forceUnicode command execution, but is reset depending on the command mode (see *mode*).\n\nWhen the flag is set it will also affect all scopes within the script including child scopes (see diag_scope).\nThere are many other string manipulation commands like ctrlSetText, getTextWidth, etc. that support Unicode by design so no additional forcing is needed.","syntaxes":[{"syntax":"forceUnicode mode","params":[{"name":"mode","type":"Number","description":"mode of operation, can be:\n\n- -1 - resets previously set Unicode flag\n-  0 - sets Unicode flag until the end of script\n-  1 - sets Unicode flag until after next supported command or until the end of script, whichever comes earlier","type_expr":"Number"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"unary","right":{"text":"mode"}}],"examples":[{"code":["copyToClipboard \"д\"; // copies \"Ð´\" to clipboard\nforceUnicode 1;\ncopyToClipboard \"д\"; // copies \"д\" to clipboard"]},{"text":"```sqf\nprivate _string = \"привет\";            // a string that uses Unicode characters\nsystemChat str count _string;        // 12 - the character count is wrong without forceUnicode\n\ncall {\n    systemChat str count _string;    // 12 - identical result\n    forceUnicode 0;\n    systemChat str count _string;    // 6 - correct result\n};\n\nsystemChat str count _string;        // 6 - outer scope is affected by forceUnicode as well, because the command mode is 0\n\nforceUnicode -1; // cancelled\n\ncall {\n    systemChat str count _string;    // 12 - wrong count\n    forceUnicode 1;\n    systemChat str count _string;    // 6 - correct result, but Unicode it reset after this operation, because command mode is 1\n};\n\nsystemChat str count _string;        // 12 - outer scope is not affected as it was reset right after count\n```","code":["private _string = \"привет\";\t\t\t// a string that uses Unicode characters\nsystemChat str count _string;\t\t// 12 - the character count is wrong without forceUnicode\n\ncall {\n\tsystemChat str count _string;\t// 12 - identical result\n\tforceUnicode 0;\n\tsystemChat str count _string;\t// 6 - correct result\n};\n\nsystemChat str count _string;\t\t// 6 - outer scope is affected by forceUnicode as well, because the command mode is 0\n\nforceUnicode -1; // cancelled\n\ncall {\n\tsystemChat str count _string;\t// 12 - wrong count\n\tforceUnicode 1;\n\tsystemChat str count _string;\t// 6 - correct result, but Unicode it reset after this operation, because command mode is 1\n};\n\nsystemChat str count _string;\t\t// 12 - outer scope is not affected as it was reset right after count"]}],"see_also":["copyToClipboard","copyFromClipboard","select","count","in","insert","find","splitString","reverse"]},{"name":"forceWalk","title":"forceWalk","type":"command","url":"https://community.bistudio.com/wiki/forceWalk","revid":310282,"updated":"2022-05-05T13:11:25Z","groups":["Stamina System"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"argument":"local"},"description":"Forces unit to walk even if run or sprint is selected.","syntaxes":[{"syntax":"unit forceWalk value","params":[{"name":"unit","type":"Object","description":"the unit forced to walk","type_expr":"Object"},{"name":"value","type":"Boolean","description":"true/false","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"value"}}],"examples":[{"code":["player forceWalk true;"]}],"see_also":["isForcedWalk","isWalking","forceSpeed","getSpeed"]},{"name":"forceWeaponFire","title":"forceWeaponFire","type":"command","url":"https://community.bistudio.com/wiki/forceWeaponFire","revid":379422,"updated":"2026-10-31T00:04:25Z","groups":["Unit Control","Weapons"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"The unit will be forced to fire weapon from the given muzzle. The weapon will not fire if firemode passed as parameter is not supported by the given muzzle. The muzzle could belong to a vehicle weapon and unit in this case will be the unit operating this weapon. Doesnt't seem to work for units in FFV positions. Works on player. See also: BIS_fnc_fire","syntaxes":[{"syntax":"unit forceWeaponFire [muzzle, firemode]","params":[{"name":"unit","type":"Object","description":"unit alone or in vehicle","type_expr":"Object"},{"name":"muzzle","type":"String","type_expr":"String"},{"name":"firemode","type":"String","description":"common options are \"Single\", \"Burst\", \"FullAuto\". For the full list of a weapon firemodes:\n\n```sqf\nhint str (getArray (configFile >> \"CfgWeapons\" >> currentWeapon player >> \"modes\"));\n```\n\nIf *modes[]* param in config for the weapon says *{\"this\"}*, then the same classname as for the weapon param (currentWeapon player) should be used as firemode param.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[muzzle, firemode]"}}],"examples":[{"code":["_unit forceWeaponFire [\"arifle_MX_F\", \"Single\"];\n_unit forceWeaponFire [\"hgun_ACPC2_F\", \"hgun_ACPC2_F\"];\n_unit forceWeaponFire [\"HandGrenadeMuzzle\",\"HandGrenadeMuzzle\"];\n_unit forceWeaponFire [\"MiniGrenadeMuzzle\",\"MiniGrenadeMuzzle\"];\n_unit forceWeaponFire [\"HandGrenade_Stone\",\"HandGrenade_Stone\"];\n_unit forceWeaponFire [\"SmokeShellMuzzle\",\"SmokeShellMuzzle\"];\n_unit forceWeaponFire [\"ChemlightGreenMuzzle\",\"ChemlightGreenMuzzle\"];\n_unit forceWeaponFire [\"IRGrenade\",\"IRGrenade\"];\n_unit forceWeaponFire [\"Laserdesignator\",\"Laserdesignator\"];"]},{"code":["gunner blackfoot forceWeaponFire [\"gatling_20mm\", \"close\"];"]}],"see_also":["currentWeapon","currentWeaponMode","setWeaponReloadingTime","selectWeapon","fire","doFire","commandFire","canFire","fireAtTarget","commandArtilleryFire","commandSuppressiveFire","doArtilleryFire","doSuppressiveFire","isManualFire","BIS_fnc_fire"],"notes":[{"user":"Killzone_Kid","date":"2013-08-25T00:00:00Z","text":"Here is a neat workaround trick for firemode change from a script:\n\n```sqf\n_weapon = currentWeapon player;\n_ammo = player ammo _weapon;\nplayer setAmmo [_weapon, 0];\nplayer forceWeaponFire [_weapon, \"FullAuto\"];\nplayer setAmmo [_weapon, _ammo];\n```"},{"user":"ffur2007slx2_5","date":"2014-04-14T00:00:00Z","text":"(A3 1.16) forceWeaponFire is no longer only limited to units, but can remote aircrafts weapon firing as well. Passed source unit should be the correct one who controls the weapon, if passed mode is \"this\", use the weapon name instead:\n\n```sqf\n_weapon = (weapons _veh) select 3;\n_mode = (getArray (configFile >> \"cfgweapons\" >> _weapon >> \"modes\")) select 0;\nif (_mode == \"this\") then {_mode = _weapon;};\n(driver _veh) forceWeaponFire [_weapon, _mode];\n//Force a CAS fire a rocket.\n```\n\nCurrently this command is not available for land vehicle remote fire."},{"user":"Benargee","date":"2014-09-02T00:00:00Z","text":"Similar to Killzone_Kid's note, This fires the units current weapon in its current firemode.\n\n```sqf\n_unit forceWeaponFire [weaponState _unit select 1, weaponState _unit select 2];\n```"},{"user":"Killzone_Kid","date":"2015-01-03T14:55:00Z","text":"fireAtTarget command can be used to force fire gunner weapon in vehicles. A gunner must be present.\n\n```sqf\n_veh fireAtTarget [objNull];\n```\n\nWill fire one shot even if player is gunner.\nfire command can also be used to fire vehicle weapon, like smoke launcher for example:\n\n```sqf\nvehicle player fire \"SmokeLauncher\";\n```\n\nAnd if this doesn't work, it is possible to force fire via action\n\n```sqf\ntank action [\"UseWeapon\", tank, commander tank, 0];\n```"}]},{"name":"forceWeatherChange","title":"forceWeatherChange","type":"command","url":"https://community.bistudio.com/wiki/forceWeatherChange","revid":369386,"updated":"2024-09-03T18:43:16Z","groups":["Environment"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Forcibly applies previously set weather settings. Skips smooth transitions. This might cause lag.\n\n> [!NOTE]\n> To prevent the engine from overwriting custom weather settings, enable the *Manual Control* settings in Eden Editor's intel section.","syntaxes":[{"syntax":"forceWeatherChange","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["0 setOvercast 1;\n0 setRain 1;\nforceWeatherChange; // Force immediate change overriding smooth transitions"]}],"see_also":["fog","fogForecast","setFog","overcast","setOvercast","overcastForecast","nextWeatherChange","rain","setRain","setWind","simulWeatherSync"]},{"name":"forEach","title":"forEach","type":"command","url":"https://community.bistudio.com/wiki/forEach","revid":378167,"updated":"2026-03-02T16:49:17Z","groups":["Program Flow","Arrays","HashMap"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Executes the given command(s) on every item of an Array or a HashMap.\n\n> [!NOTE]\n> **Arma 2:** Since Arma 2, the variable _x is always private to the forEach block so it is safe to nest them (see Example 8).","syntaxes":[{"syntax":"code forEach array","params":[{"name":"code","type":"String only in Operation Flashpoint until v1.85 or Arma: Cold War Assault v1.85 Code","description":"available variables:\n\n- `_x`: iterated item\n- Arma 2: Operation Arrowhead v1.55 `_forEachIndex`: item's index\n\n|  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|\n| Game | Operation Flashpoint v1.00 | Operation Flashpoint v1.85 | Armed Assault v1.00 | Arma 2 v1.00 | Arma 2: Operation Arrowhead v1.50 | Arma 3 v1.00 | Take On Helicopters v1.00 |\n| String support | ✓ |  |  | ✗ |  |  |  |\n| Code support | ✗ | ✓ |  |  |  |  |  |","type_expr":"String | Code"},{"name":"array","type":"Array","description":"the array to iterate over","type_expr":"Array"}],"returns":{"type":"Anything","type_expr":"Anything","description":"will return the value of last executed statement"},"form":"binary","left":{"text":"code"},"right":{"text":"array"}},{"syntax":"code forEach hashMap","since":"arma3 2.02","params":[{"name":"code","type":"Code","description":"code applied to each key-value pair - available variables:\n\n- `_x`: key\n- `_y`: value\n- `_forEachIndex`: iteration number","type_expr":"Code"},{"name":"hashMap","type":"HashMap","description":"the HashMap to iterate over","type_expr":"HashMap","text":"hashMap : HashMap - the HashMap to iterate over"}],"returns":{"type":"Anything","type_expr":"Anything","description":"will return the value of last executed statement"},"form":"binary","left":{"text":"code"},"right":{"text":"hashMap"}}],"examples":[{"text":"```sqf\n// SQF\n{ _x setDamage 1 } forEach units player;\n```\n\n```sqs\n; SQS\n\"_x setDammage 1\" forEach units player\n```","code":["// SQF\n{ _x setDamage 1 } forEach units player;","; SQS\n\"_x setDammage 1\" forEach units player"]},{"text":"This command can also easily be used to execute a single command multiple times without respect to the array items - see also for\n\n```sqf\n{ player addMagazine \"30Rnd_556x45_Stanag\" } forEach [1, 2, 3, 4];\n// equivalent to\nfor \"_i\" from 1 to 4 do { player addMagazine \"30Rnd_556x45_Stanag\" };\n```","code":["{ player addMagazine \"30Rnd_556x45_Stanag\" } forEach [1, 2, 3, 4];\n// equivalent to\nfor \"_i\" from 1 to 4 do { player addMagazine \"30Rnd_556x45_Stanag\" };"]},{"text":"You can also use multiple commands in the same block:\n\n```sqf\n{\n    _x setCaptive true;\n    removeAllWeapons _x;\n    doStop _x;\n} forEach units group this;\n```","code":["{\n\t_x setCaptive true;\n\tremoveAllWeapons _x;\n\tdoStop _x;\n} forEach units group this;"]},{"text":"To get the index of a forEach loop, use _forEachIndex:\n\n```sqf\n{ systemChat str _forEachIndex; } forEach [\"a\", \"b\", \"c\"]; // will return: \"0\", \"1\", \"2\" in systemChat messages\n```","code":["{ systemChat str _forEachIndex; } forEach [\"a\", \"b\", \"c\"]; // will return: \"0\", \"1\", \"2\" in systemChat messages"]},{"text":"Iterating a HashMap's _forEachIndex:\n\n```sqf\n// shows \"0, k1, v1\", \"1, k2, v2\" in systemChat messages\n{\n    systemChat format [\"%1, %2, %3\", _forEachIndex, _x, _y];\n} forEach createHashMapFromArray [\n    [\"k1\", \"v1\"],\n    [\"k2\", \"v2\"]\n];\n```","code":["// shows \"0, k1, v1\", \"1, k2, v2\" in systemChat messages\n{\n\tsystemChat format [\"%1, %2, %3\", _forEachIndex, _x, _y];\n} forEach createHashMapFromArray [\n\t[\"k1\", \"v1\"],\n\t[\"k2\", \"v2\"]\n];"]},{"text":"findIf equivalent for HashMap:\n\n```sqf\nprivate _resultKey = {\n    if (_y isEqualTo \"wantedValue\") exitWith { _x };\n    \"\"\n} forEach _hashmap;\n```","code":["private _resultKey = {\n\tif (_y isEqualTo \"wantedValue\") exitWith { _x };\n\t\"\"\n} forEach _hashmap;"]},{"text":"Array is edited by reference:\n\n```sqf\n_arr1 = [1,2,3];\n_arr2 = [6,7,8];\n_arr3 = [0];\n{ _x set [1, \"changed\"] } forEach [_arr1, _arr2, _arr3];\n// _arr1 = [1, \"changed\", 3]\n// _arr2 = [6, \"changed\", 8]\n// _arr3 = [0, \"changed\"]\n```","code":["_arr1 = [1,2,3];\n_arr2 = [6,7,8];\n_arr3 = [0];\n{ _x set [1, \"changed\"] } forEach [_arr1, _arr2, _arr3];\n// _arr1 = [1, \"changed\", 3]\n// _arr2 = [6, \"changed\", 8]\n// _arr3 = [0, \"changed\"]"]},{"text":"```sqf\n{\n    private _verticalValue = _x; // needed, otherwise _horizontalValues' _x made this one inaccessible\n    {\n        [_x, _verticalValue] call TAG_fnc_doSomething;\n    } forEach _horizontalValues;\n} forEach _verticalValues;\n```","code":["{\n\tprivate _verticalValue = _x; // needed, otherwise _horizontalValues' _x made this one inaccessible\n\t{\n\t\t[_x, _verticalValue] call TAG_fnc_doSomething;\n\t} forEach _horizontalValues;\n} forEach _verticalValues;"]}],"see_also":["Control Structures","for","apply","while","select","findIf","count","forEachReversed"],"notes":[{"user":"Dedmen","date":"2017-11-28T13:46:00Z","text":"Be careful when deleting (deleteAt) elements from an Array while you iterate over it.\n_forEachIndex will not move to reflect your change.\n\nThe forEach code is doing the same as\n\n```sqf\nprivate _forEachIndex = 0;\nwhile { _forEachIndex < count _array } do\n{\n    (_array select _forEachIndex) call code;\n    _forEachIndex = _forEachIndex + 1;\n};\n```\n\nSo if you delete your current element from the array the other elements will shift forward. Meaning you skip one element.\nExample:\n\n```sqf\n_array = [1,2,3,4,5,6];\n{ _array deleteAt _forEachIndex } forEach _array;\n```\n\nAfter the first iteration your Array will be [2,3,4,5,6] and the _forEachIndex will be 1.\nSo on next iteration you get the element at index 1 which will be 3. So you've just skipped the 2.\nSo in the end you will only iterate over 1, 3 and 6."},{"user":"Sa-Matra","date":"2023-04-02T09:04:28Z","text":"Use new forEachReversed command for deleting array items with deleteAt. Check its examples for details."}]},{"name":"forEachMember","title":"forEachMember","type":"command","url":"https://community.bistudio.com/wiki/forEachMember","revid":330644,"updated":"2022-10-03T11:04:22Z","groups":["Program Flow"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Executes the given command recursively for both teams and agents that are members of the given team. For teams only use forEachMemberTeam. For agents only use forEachMemberAgent.","syntaxes":[{"syntax":"command forEachMember team","params":[{"name":"command","type":"Code","type_expr":"Code"},{"name":"team","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"command"},"right":{"text":"team"}}],"see_also":["addTeamMember","createTeam","deleteTeam","forEachMemberTeam","removeTeamMember","teamMember","teamName","teams","teamType","forEachMemberAgent"]},{"name":"forEachMemberAgent","title":"forEachMemberAgent","type":"command","url":"https://community.bistudio.com/wiki/forEachMemberAgent","revid":330640,"updated":"2022-10-03T11:04:22Z","groups":["Program Flow"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Executes the given command recursively for each agent that is a member of the given team. For just teams use forEachMemberTeam. For both teams and agents use forEachMember.","syntaxes":[{"syntax":"command forEachMemberAgent team","params":[{"name":"command","type":"Code","type_expr":"Code"},{"name":"team","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"command"},"right":{"text":"team"}}],"see_also":["agent","agents","createAgent","isAgent","addTeamMember","createTeam","deleteTeam","forEachMemberTeam","removeTeamMember","teamMember","teamName","teams","teamType","forEachMember"]},{"name":"forEachMemberTeam","title":"forEachMemberTeam","type":"command","url":"https://community.bistudio.com/wiki/forEachMemberTeam","revid":330646,"updated":"2022-10-03T11:04:22Z","groups":["Program Flow"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Executes the given command recursively for each team that is a member of the given team. For just agents use forEachMemberAgent. For both teams and agents use forEachMember.","syntaxes":[{"syntax":"command forEachMemberTeam team","params":[{"name":"command","type":"Code","type_expr":"Code"},{"name":"team","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"command"},"right":{"text":"team"}}],"see_also":["addTeamMember","createTeam","deleteTeam","removeTeamMember","teamMember","teamName","teams","teamType","forEachMember","forEachMemberAgent"]},{"name":"forEachReversed","title":"forEachReversed","type":"command","url":"https://community.bistudio.com/wiki/forEachReversed","revid":353029,"updated":"2024-03-12T11:42:13Z","groups":["Program Flow","Arrays"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","description":"Executes the given command(s) on every item of an Array in reversed order, compared to forEach.","syntaxes":[{"syntax":"code forEachReversed array","params":[{"name":"code","type":"Code to execute on each array item","description":"available variables:\n\n- `_x`: iterated item\n- `_forEachIndex`: item's index","type_expr":"Code"},{"name":"array","type":"Array","description":"the array to iterate over","type_expr":"Array"}],"returns":{"type":"Anything","type_expr":"Anything","description":"will return the value of last executed statement"},"form":"binary","left":{"text":"code"},"right":{"text":"array"}}],"examples":[{"text":"This command lets you easily iterate through an array from last to first element without modifying the array itself with reverse or using for loop with negative step.\n\n```sqf\n// Will show numbers from 5 to 1 in the chat\n{ systemChat str _x } forEachReversed [1, 2, 3, 4, 5];\n```","code":["// Will show numbers from 5 to 1 in the chat\n{ systemChat str _x } forEachReversed [1, 2, 3, 4, 5];"]},{"text":"Can be useful to walk through array while also deleting items from it, which you couldn't do with forEach as easily:\n\n```sqf\nprivate _array = [1, 1, 2, 2, 1, 1, 2, 2];\n{\n    if (_x == 2) then { _array deleteAt _forEachIndex };\n} forEachReversed _array;\n// _array will be [1,1,1,1] here\n```\n\nWill not work with forEach as you might expect it:\n\n```sqf\nprivate _array = [1, 1, 2, 2, 1, 1, 2, 2];\n{\n    if (_x == 2) then { _array deleteAt _forEachIndex };\n} forEach _array;\n// _array will be [1, 1, 2, 1, 1, 2] here\n```","code":["private _array = [1, 1, 2, 2, 1, 1, 2, 2];\n{\n\tif (_x == 2) then { _array deleteAt _forEachIndex };\n} forEachReversed _array;\n// _array will be [1,1,1,1] here","private _array = [1, 1, 2, 2, 1, 1, 2, 2];\n{\n\tif (_x == 2) then { _array deleteAt _forEachIndex };\n} forEach _array;\n// _array will be [1, 1, 2, 1, 1, 2] here"]},{"text":"Deleting items from array with more complex condition than just comparison.\n\n```sqf\n{\n    if (!alive _x) then { _vehicles deleteAt _forEachIndex };\n} forEachReversed _vehicles;\n```","code":["{\n\tif (!alive _x) then { _vehicles deleteAt _forEachIndex };\n} forEachReversed _vehicles;"]}],"see_also":["Control Structures","forEach","for","apply","while","select","findIf","count","deleteAt","reverse"]},{"name":"forgetTarget","title":"forgetTarget","type":"command","url":"https://community.bistudio.com/wiki/forgetTarget","revid":332529,"updated":"2022-12-01T12:21:06Z","groups":["Unit Control","Groups"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"global"},"description":"Resets the info a group has about a target, forcing knowsAbout value to 0.","syntaxes":[{"syntax":"group forgetTarget target","params":[{"name":"group","type":"Group or Object","description":"group itself or unit in a group","type_expr":"Group | Object"},{"name":"target","type":"Object","description":"group target","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"target"}}],"examples":[{"code":["soldier1 forgetTarget soldier2;"]},{"text":"Give enemyBob some amnesia:\n\n```sqf\nonEachFrame { enemyBob forgetTarget player };\n```","code":["onEachFrame { enemyBob forgetTarget player };"]}],"see_also":["knowsAbout","targetsQuery","targetsAggregate","nearTargets","reveal","getHideFrom","targetKnowledge"]},{"name":"format","title":"format","type":"command","url":"https://community.bistudio.com/wiki/format","revid":378210,"updated":"2026-03-13T14:09:11Z","groups":["Strings"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Composes a string containing other variables or other variable types. Converts any variable type to a string.\n\n> [!IMPORTANT]\n> - To convert a string back to a number, see parseNumber.\n> - joinString can be a bit faster, without string length limitation.\n\n> [!NOTE]\n> - the maximum length of the string is 8,388,608 characters (was *8191* before)\n> - two consecutive percent symbols will be formatted to a single percent symbol in the final string (see Example 3)\n>\n> Since Arma 3 v2.18","syntaxes":[{"syntax":"format [formatString, var1, var2, ...]","params":[{"name":"formatString","type":"String","description":"a string containing text and/or references to the variables listed below in the array. The references appear in the form of %1, %2 etc.","type_expr":"String"},{"name":"varN","type":"Anything","description":"variable referenced by %N","type_expr":"Anything"}],"returns":{"type":"String","type_expr":"String","description":"the full string (up to 8kb, see above) is returned."},"form":"unary","right":{"text":"[formatString, var1, var2, ...]"}}],"examples":[{"code":["format [\"Player:%1, player's side:%2\", player, side player]; // returns \"Player:WEST 1-1-A:1 (Username), player's side:WEST\""]},{"text":"```sqf\nplayer addEventHandler [\"HandleDamage\", {\n    hint format [\"You just sustained %1%2 damage!\", ceil ((_this select 2) * 100), \"%\"];\n}]; // Shows \"You just sustained 20% damage!\"\n```","code":["player addEventHandler [\"HandleDamage\", {\n\thint format [\"You just sustained %1%2 damage!\", ceil ((_this select 2) * 100), \"%\"];\n}]; // Shows \"You just sustained 20% damage!\""]},{"text":"```sqf\n// Since Arma 3 v2.18 two consecutive percent symbols will be formatted to a single percent symbol in the final string (%% -> %)\nplayer addEventHandler [\"HandleDamage\", {\n    hint format [\"You just sustained %1%% damage!\", ceil ((_this select 2) * 100)];\n}]; // Shows \"You just sustained 20% damage!\"\n```","code":["// Since Arma 3 v2.18 two consecutive percent symbols will be formatted to a single percent symbol in the final string (%% -> %)\nplayer addEventHandler [\"HandleDamage\", {\n\thint format [\"You just sustained %1%% damage!\", ceil ((_this select 2) * 100)];\n}]; // Shows \"You just sustained 20% damage!\""]}],"see_also":["formatText","endl","str","toString","joinString"],"notes":[{"user":"Worldeater","date":"2009-03-02T15:12:00Z","text":"The maximum number of characters returned by the *format* command seems to depend on the total byte count. For plain ASCII strings the limit is 2048 characters."},{"user":"Heeeere's Johnny!","date":"2015-03-28T09:22:00Z","text":"In addition to the note above, formatTexted strings are Structured Text, hence cannot be used like formatted strings (with most scripting commands). A workaround to get strings of type String with more than 8191 characters is:\n\n```sqf\nstr formatText [\"%1\", _string]\n```"}]},{"name":"formation","title":"formation","type":"command","url":"https://community.bistudio.com/wiki/formation","revid":379218,"updated":"2026-10-30T22:28:40Z","groups":["Groups"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the current formation of a group.","syntaxes":[{"syntax":"formation target","params":[{"name":"target","type":"Object, Group or Team Member","type_expr":"Object | Group | Team Member"}],"returns":{"type":"String","type_expr":"String","description":"can return:\n- \"COLUMN\" - \"STAG COLUMN\" - \"WEDGE\" - \"ECH LEFT\" - \"ECH RIGHT\" - \"VEE\" - \"LINE\" - \"FILE\" - \"DIAMOND\"","text":"String - can return:\n\n- \"COLUMN\"\n- \"STAG COLUMN\"\n- \"WEDGE\"\n- \"ECH LEFT\"\n- \"ECH RIGHT\"\n- \"VEE\"\n- \"LINE\"\n- \"FILE\"\n- \"DIAMOND\""},"form":"unary","right":{"text":"target"}}],"examples":[{"code":["if (formation group player == \"wedge\") then { hint \"this is the default formation\" };"]}],"see_also":["2D Editor: Waypoints","formLeader","setFormation"]},{"name":"formationDirection","title":"formationDirection","type":"command","url":"https://community.bistudio.com/wiki/formationDirection","revid":310863,"updated":"2022-05-07T20:24:09Z","groups":["Groups"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local"},"description":"Return the direction in degrees of the 'unit' watching in formation.","syntaxes":[{"syntax":"formationDirection unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["_degrees = formationDirection _unit;"]}],"see_also":["setFormDir","formation","setFormation"]},{"name":"formationLeader","title":"formationLeader","type":"command","url":"https://community.bistudio.com/wiki/formationLeader","revid":379423,"updated":"2026-10-31T00:04:33Z","groups":["Unit Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return leader of the formation.","syntaxes":[{"syntax":"formationLeader unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"text":"```sqf\nif (formationLeader player != leader player) then\n{\n    hint \"Formation leader is not the group leader.\";\n};\n```","code":["if (formationLeader player != leader player) then\n{\n\thint \"Formation leader is not the group leader.\";\n};"]}],"see_also":["commandFollow","doFollow","formLeader","isFormationLeader","leader","selectLeader","setLeader"],"notes":[{"user":"Kronzky","date":"2006-12-02T00:46:00Z","text":"Return value is <NULL-OBJECT> if no group members exist."}]},{"name":"formationMembers","title":"formationMembers","type":"command","url":"https://community.bistudio.com/wiki/formationMembers","revid":377161,"updated":"2026-01-01T10:40:57Z","groups":["Groups"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return list of units (drivers) in the formation.","syntaxes":[{"syntax":"formationMembers person","params":[{"name":"person","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"person"}}],"examples":[{"code":["_drivers = formationMembers _person;"]}],"see_also":["formation","setFormation","driver"]},{"name":"formationPosition","title":"formationPosition","type":"command","url":"https://community.bistudio.com/wiki/formationPosition","revid":309288,"updated":"2022-05-05T01:47:09Z","groups":["Positions"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return position of unit in the formation.","syntaxes":[{"syntax":"formationPosition unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Position","type_expr":"Position"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_pos = formationPosition _unit;"]},{"text":"```sqf\n// Reposition entire group to a new position (ground level)\nprivate _group = group player;\nprivate _leader = leader _group;\n\n// Set the leader to the spawn position\n_leader setPosATL markerPos \"spawn_position\";\n\n// Reposition all units of the group except the leader\n{\n    private _formationPos = formationPosition _x;\n    _formationPos set [2, 0];\n    _x setPosATL _formationPos;\n} forEach (units _group - [_leader]);\n```","code":["// Reposition entire group to a new position (ground level)\nprivate _group = group player;\nprivate _leader = leader _group;\n\n// Set the leader to the spawn position\n_leader setPosATL markerPos \"spawn_position\";\n\n// Reposition all units of the group except the leader\n{\n\tprivate _formationPos = formationPosition _x;\n\t_formationPos set [2, 0];\n\t_x setPosATL _formationPos;\n} forEach (units _group - [_leader]);"]}],"see_also":["formation"]},{"name":"formationTask","title":"formationTask","type":"command","url":"https://community.bistudio.com/wiki/formationTask","revid":379516,"updated":"2026-10-31T00:29:09Z","groups":["Groups"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return the current task of the unit in the formation.","syntaxes":[{"syntax":"formationTask unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"\"EXCLUDED\", \"MOVE\", \"COVER\", \"LEADER\", \"NOTHING\""},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_currentTask = formationTask _unit;"]}],"see_also":["setFormationTask"]},{"name":"formatText","title":"formatText","type":"command","url":"https://community.bistudio.com/wiki/formatText","revid":351276,"updated":"2023-11-27T02:21:39Z","groups":["Strings","Structured Text"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Creates a Structured Text similar to format command.","syntaxes":[{"syntax":"formatText [format, argument1, argument2, ...]","params":[{"name":"format","type":"String","description":"a string containing text and/or references to the variables listed below in the array. The references appear in the form of %1, %2 etc.","type_expr":"String"},{"name":"argumentN","type":"Anything","description":"use Structured Text where necessary (see Example 2)","type_expr":"Anything"}],"returns":{"type":"Structured Text","type_expr":"Structured Text"},"form":"unary","right":{"text":"[format, argument1, argument2, ...]"}}],"examples":[{"code":["hint formatText [\"Image: %1\", image \"\\a3\\Data_f\\Flags\\flag_Altis_co.paa\"];"]},{"text":"```sqf\nhint formatText [\"%1%2%3\", \"line1\", \"<br/>\", \"line2\"];        // result displayed in one line\nhint formatText [\"%1%2%3\", \"line1\", lineBreak, \"line2\"];    // result displayed in two lines\n```","code":["hint formatText [\"%1%2%3\", \"line1\", \"<br/>\", \"line2\"];\t\t// result displayed in one line\nhint formatText [\"%1%2%3\", \"line1\", lineBreak, \"line2\"];\t// result displayed in two lines"]}],"see_also":["Structured Text","format","composeText","text","parseText"]},{"name":"formLeader","title":"formLeader","type":"command","url":"https://community.bistudio.com/wiki/formLeader","revid":369162,"updated":"2024-09-03T10:34:40Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the formation leader of a given unit.\nThis is often the same as the group leader, but not always, for example in cases when a unit is ordered to follow another unit.","syntaxes":[{"syntax":"formLeader unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"the leader of the formation is returned. If used on a dead unit, the returned value is objNull"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"text":"```sqf\nif (formLeader player != leader player) then\n{\n    hint \"The formation leader is different to the group leader!\";\n};\n```","code":["if (formLeader player != leader player) then\n{\n\thint \"The formation leader is different to the group leader!\";\n};"]}],"see_also":["commandFollow","doFollow","formationLeader","isFormationLeader","leader","selectLeader","setLeader"]},{"name":"freeExtension","title":"freeExtension","type":"command","url":"https://community.bistudio.com/wiki/freeExtension","revid":370269,"updated":"2024-11-19T18:00:17Z","groups":["System"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Unloads given extension loaded previously with callExtension so that extension developer could rapidly tweak developed extension without restarting the game.\n\n> [!IMPORTANT]\n> This command was introduced in Arma 3 dev v2.11.149751 and for security reasons is only effective in DevBranch; it does nothing in stable branch.","syntaxes":[{"syntax":"freeExtension extension","params":[{"name":"extension","type":"String","description":"extension name (see callExtension)","type_expr":"String"}],"returns":{"type":"Boolean or Nothing","type_expr":"Boolean | Nothing","description":"- false if extension unloading attempt failed, true otherwise - Nothing if not dev branch","text":"Boolean or Nothing\n\n- false if extension unloading attempt failed, true otherwise\n- Nothing if not dev branch"},"form":"unary","right":{"text":"extension"}}],"examples":[{"code":["freeExtension \"myExt\";"]}],"see_also":["callExtension"]},{"name":"freeLook","title":"freeLook","type":"command","url":"https://community.bistudio.com/wiki/freeLook","revid":369220,"updated":"2024-09-03T10:34:54Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns if freelook is active on the current machine's controlled character.","syntaxes":[{"syntax":"freeLook","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if freelook is active, false otherwise"},"form":"nullary"}],"examples":[{"text":"```sqf\nif freeLook then\n{\n    systemChat \"Quit looking around, soldier!\";\n};\n```","code":["if freeLook then\n{\n\tsystemChat \"Quit looking around, soldier!\";\n};"]}],"see_also":["lookAt"]},{"name":"from","title":"from","type":"command","url":"https://community.bistudio.com/wiki/from","revid":311162,"updated":"2022-05-12T09:47:42Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Continue sequence of for construct. It sets the start value of the index variable.","syntaxes":[{"syntax":"for from b","params":[{"name":"for","type":"For Type","type_expr":"For Type"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"For Type","type_expr":"For Type"},"form":"binary","left":{"text":"for"},"right":{"text":"b"}}],"examples":[{"text":"```sqf\nfor \"_i\" from 10 to 20 do\n{\n    hint str _i; // will hint from 10 to 20, spaced by 1 second\n    sleep 1;\n};\n```","code":["for \"_i\" from 10 to 20 do\n{\n\thint str _i; // will hint from 10 to 20, spaced by 1 second\n\tsleep 1;\n};"]}],"see_also":["Control Structures"]},{"name":"fromEditor","title":"fromEditor","type":"command","url":"https://community.bistudio.com/wiki/fromEditor","revid":323010,"updated":"2022-06-28T21:43:06Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return if given team was inserted directly from mission editor.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"fromEditor teamMember","params":[{"name":"teamMember","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"teamMember"}}],"examples":[{"code":["_fromEditor = fromEditor _member;"]}]},{"name":"fromJSON","title":"fromJSON","type":"command","url":"https://community.bistudio.com/wiki/fromJSON","revid":373363,"updated":"2025-04-29T02:36:28Z","groups":["Strings"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Obtain the game value from the provided [JSON](https://en.wikipedia.org/wiki/JSON)-formatted string.","syntaxes":[{"syntax":"fromJSON jsonValue","params":[{"name":"jsonValue","type":"String","description":"JSON data","type_expr":"String"}],"returns":{"type_expr":"HashMap | Array | Number | String | Boolean | Nothing","description":"- HashMap - Array - Number - String - Boolean - nil","text":"Can be one of:\n\n- HashMap\n- Array\n- Number\n- String\n- Boolean\n- nil"},"form":"unary","right":{"text":"jsonValue"}}],"examples":[{"text":"```sqf\nprivate _myNumber = fromJSON \"42\";                                            // _myNumber is 42\nprivate _myString = fromJSON \"\"\"Hello there\"\"\";                                // _myString is \"Hello there\"\nprivate _myArray = fromJSON \"[42, \"\"Hello there\"\", true]\";                    // _myArray is [42, \"Hello there\", true]\nprivate _myHash = fromJSON \"{\"\"key1\"\": \"\"value1\"\", \"\"key2\"\": \"\"value2\"\"}\"    // _myHash is [[\"key2\", \"value2\"], [\"key1\", \"value1\"]]\n\n// Important: [] indicates array, {} and : indicates hash\n```","code":["private _myNumber = fromJSON \"42\";\t\t\t\t\t\t\t\t\t\t\t// _myNumber is 42\nprivate _myString = fromJSON \"\"\"Hello there\"\"\";\t\t\t\t\t\t\t\t// _myString is \"Hello there\"\nprivate _myArray = fromJSON \"[42, \"\"Hello there\"\", true]\";\t\t\t\t\t// _myArray is [42, \"Hello there\", true]\nprivate _myHash = fromJSON \"{\"\"key1\"\": \"\"value1\"\", \"\"key2\"\": \"\"value2\"\"}\"\t// _myHash is [[\"key2\", \"value2\"], [\"key1\", \"value1\"]]\n\n// Important: [] indicates array, {} and : indicates hash"]}],"see_also":["toJSON","parseSimpleArray"]},{"name":"fuel","title":"fuel","type":"command","url":"https://community.bistudio.com/wiki/fuel","revid":376958,"updated":"2026-01-01T05:49:41Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks how much fuel is left in the gas tank of a vehicle.","syntaxes":[{"syntax":"fuel vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Number in range 0..1","type_expr":"Number","description":"0 (empty tank) to 1 (full tank)."},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["if (fuel vehicle player == 0) then { hint \"The vehicle is out of fuel!\" };"]}],"see_also":["setFuel","setFuelCargo","getFuelCargo"],"notes":[{"user":"UNN","date":"2006-08-13T12:36:00Z","text":"Vehicles refuelled in game with the Fuel trucks e.t.c never get completely refuelled. After refuelling, rather than returning a value of 1 when the fuel command is called.\nThey return a value greater than 0.98 and less than 1."},{"user":"fusselwurm","date":"2020-12-19T19:10:00Z","text":"returns\n\n- *1* for units (dead or alive)\n- *0* for *objNull*"}]},{"name":"fullCrew","title":"fullCrew","type":"command","url":"https://community.bistudio.com/wiki/fullCrew","revid":377160,"updated":"2026-01-01T10:40:32Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","locality":{"argument":"global"},"description":"Returns an array with all crew inside given vehicle, with or without empty seats.\n\n> [!IMPORTANT]\n> With the introduction of person turrets (FFV), the returned *cargoIndex* works with moveInCargo but does not with actions such as \"GetInCargo\" and \"MoveToCargo\".\n> To find out indexes for actions, use the \"cargo\" filter (See Example 3).","syntaxes":[{"syntax":"fullCrew vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"list of arrays in format [unit, role, cargoIndex, turretPath, personTurret, assignedUnit, positionName]:\n- unit: Object - role: String - not always lowercase before Arma 3 v2.04 - cargoIndex: Number - turretPath: Turret Path - personTurret: Boolean - Arma 3 v2.12 assignedUnit: Object - see assignAsXXX commands, assignAsDriver for example - Arma 3 v2.12 positionName: String - unlocalized entry for turret's `gunnerName`, for example \"$STR_A3_TURRETS_CARGOTURRET_R2\"","text":"Array - list of arrays in format [unit, role, cargoIndex, turretPath, personTurret, assignedUnit, positionName]:\n\n- unit: Object\n- role: String - not always lowercase before Arma 3 v2.04\n- cargoIndex: Number\n- turretPath: Turret Path\n- personTurret: Boolean\n- Arma 3 v2.12 assignedUnit: Object - see *assignAsXXX* commands, assignAsDriver for example\n- Arma 3 v2.12 positionName: String - unlocalized entry for turret's `gunnerName`, for example \"$STR_A3_TURRETS_CARGOTURRET_R2\""},"form":"unary","right":{"text":"vehicle"}},{"syntax":"fullCrew [vehicle, type, includeEmpty]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"type","type":"String","description":"role filter (case-insensitive). An invalid value (e.g \"\") will return all positions. Available values:\n\n- \"driver\"\n- \"commander\"\n- \"gunner\"\n- \"turret\"\n- \"cargo\"","type_expr":"String"},{"name":"includeEmpty","type":"Boolean","optional":true,"default":"false","description":"include empty crew seats","type_expr":"Boolean","since":"arma3 1.56","text":"includeEmpty: Boolean - (Optional, default false) include empty crew seats"}],"returns":{"type":"Array","type_expr":"Array","description":"list of arrays in format [unit, role, cargoIndex, turretPath, personTurret, assignedUnit, positionName]:\n- unit: Object - role: String - not always lowercase before Arma 3 v2.04 - cargoIndex: Number - turretPath: Turret Path - personTurret: Boolean - Arma 3 v2.12 assignedUnit: Object - see assignAsXXX commands, assignAsDriver for example - Arma 3 v2.12 positionName: String - unlocalized entry for turret's `gunnerName`, for example \"$STR_A3_TURRETS_CARGOTURRET_R2\"","text":"Array - list of arrays in format [unit, role, cargoIndex, turretPath, personTurret, assignedUnit, positionName]:\n\n- unit: Object\n- role: String - not always lowercase before Arma 3 v2.04\n- cargoIndex: Number\n- turretPath: Turret Path\n- personTurret: Boolean\n- Arma 3 v2.12 assignedUnit: Object - see *assignAsXXX* commands, assignAsDriver for example\n- Arma 3 v2.12 positionName: String - unlocalized entry for turret's `gunnerName`, for example \"$STR_A3_TURRETS_CARGOTURRET_R2\""},"form":"unary","right":{"text":"[vehicle, type, includeEmpty]"}}],"examples":[{"text":"```sqf\n_list = fullCrew vehicle player;\n/*\n    returns for example (on an armed WY-55 Hellcat):\n    [\n        [R Alpha 1-1:1, \"driver\", -1, [], false, R Alpha 1-1:1, \"$STR_POSITION_DRIVER\"],\n        [R Alpha 1-1:2, \"turret\", -1, [0], false, R Alpha 1-1:2, \"$STR_A3_COPILOT\"]\n    ]\n*/\n```","code":["_list = fullCrew vehicle player;\n/*\n\treturns for example (on an armed WY-55 Hellcat):\n\t[\n\t\t[R Alpha 1-1:1, \"driver\", -1, [], false, R Alpha 1-1:1, \"$STR_POSITION_DRIVER\"],\n\t\t[R Alpha 1-1:2, \"turret\", -1, [0], false, R Alpha 1-1:2, \"$STR_A3_COPILOT\"]\n\t]\n*/"]},{"text":"```sqf\n_list = fullCrew [vehicle player, \"turret\"];\n/*\n    returns for example (on an armed WY-55 Hellcat):\n    [\n        [R Alpha 1-1:2, \"turret\", -1, [0], false, R Alpha 1-1:2, \"$STR_A3_COPILOT\"]\n    ]\n*/\n```","code":["_list = fullCrew [vehicle player, \"turret\"];\n/*\n\treturns for example (on an armed WY-55 Hellcat):\n\t[\n\t\t[R Alpha 1-1:2, \"turret\", -1, [0], false, R Alpha 1-1:2, \"$STR_A3_COPILOT\"]\n\t]\n*/"]},{"text":"```sqf\nprivate _actionCompatibleCargoIndexes = fullCrew [heli, \"cargo\", true];\n/*\n    returns for example (on an empty armed WY-55 Hellcat):\n    [\n        [objNull, \"cargo\", 2, [], false, objNull, \"$STR_GETIN_POS_PASSENGER\"],\n        [objNull, \"cargo\", 3, [], false, objNull, \"$STR_GETIN_POS_PASSENGER\"],\n        [objNull, \"cargo\", 4, [], false, objNull, \"$STR_GETIN_POS_PASSENGER\"],\n        [objNull, \"cargo\", 5, [], false, objNull, \"$STR_GETIN_POS_PASSENGER\"]\n    ]\n    using the element's index is compatible with action cargo commands - see below\n*/\n\n// the following commands will put the player in the same seat:\nplayer moveInCargo [heli, 2];\nplayer action [\"GetInCargo\", heli, 0];\n```","code":["private _actionCompatibleCargoIndexes = fullCrew [heli, \"cargo\", true];\n/*\n\treturns for example (on an empty armed WY-55 Hellcat):\n\t[\n\t\t[objNull, \"cargo\", 2, [], false, objNull, \"$STR_GETIN_POS_PASSENGER\"],\n\t\t[objNull, \"cargo\", 3, [], false, objNull, \"$STR_GETIN_POS_PASSENGER\"],\n\t\t[objNull, \"cargo\", 4, [], false, objNull, \"$STR_GETIN_POS_PASSENGER\"],\n\t\t[objNull, \"cargo\", 5, [], false, objNull, \"$STR_GETIN_POS_PASSENGER\"]\n\t]\n\tusing the element's index is compatible with action cargo commands - see below\n*/\n\n// the following commands will put the player in the same seat:\nplayer moveInCargo [heli, 2];\nplayer action [\"GetInCargo\", heli, 0];"]}],"see_also":["crew","createVehicleCrew","assignedVehicleRole","allTurrets","emptyPositions"]},{"name":"gearIDCAmmoCount","title":"gearIDCAmmoCount","type":"command","url":"https://community.bistudio.com/wiki/gearIDCAmmoCount","revid":363874,"updated":"2024-04-23T21:04:42Z","groups":["Unit Inventory","GUI Control"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Returns ammo count of assigned magazine.","syntaxes":[{"syntax":"gearIDCAmmoCount idc","params":[{"name":"idc","type":"Number","description":"idc of control type CT_ITEMSLOT 103","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"idc"}}],"examples":[{"code":["_ammoCount = gearIDCAmmoCount _control;"]}],"see_also":["gearSlotData","gearSlotAmmoCount"]},{"name":"gearSlotAmmoCount","title":"gearSlotAmmoCount","type":"command","url":"https://community.bistudio.com/wiki/gearSlotAmmoCount","revid":376113,"updated":"2025-08-26T21:33:41Z","groups":["Unit Inventory","GUI Control"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Returns ammo count of assigned magazine.","syntaxes":[{"syntax":"gearSlotAmmoCount control","params":[{"name":"control","type":"Control","description":"`CT_ITEMSLOT 103`","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["private _ammoCount = gearSlotAmmoCount _control;"]}],"see_also":["gearSlotData","gearIDCAmmoCount"]},{"name":"gearSlotData","title":"gearSlotData","type":"command","url":"https://community.bistudio.com/wiki/gearSlotData","revid":347667,"updated":"2023-10-09T11:05:57Z","groups":["Unit Inventory","GUI Control"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Returns gear slot item name.","syntaxes":[{"syntax":"gearSlotData control","params":[{"name":"control","type":"Control","description":"CT_ITEMSLOT 103","type_expr":"Control"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["gearSlotData _myControl;"]},{"text":"Open any ammobox and click by any gear slots:\n\n```sqf\nprivate \"_display\";\ndisableSerialization;\n\nwaitUntil {\n    _display = findDisplay 106;\n    ! isNull _display;\n};\n\nuiNamespace setVariable [\"/TAG/RscDisplayGear/SlotDataEH\", {\n    _weaponName = gearSlotData (_this select 0);\n    _conf = configFile >> _confSection >> _weaponName;\n    _name = getText (_conf >> \"displayName\");\n    _desc = getText (_conf >> \"Library\" >> \"libTextDesc\");\n    _image = getText (_conf >> \"picture\");\n    hint parseText format [\n        \"<t size='1.3' align='center' shadow='true' shadowColor='#000000'>%1</t><br><img image='%2' size='6' align='center' /><br>%3<br>%4\",\n        _name, _image, _desc\n    ];\n}];\n\nfor \"_i\" from 107 to 145 do {\n    _display displayCtrl _i ctrlAddEventHandler [\"ButtonClick\",\n        format [\n            \"_confSection = '%1'; _this call (uiNamespace getVariable '/TAG/RscDisplayGear/SlotDataEH');\",\n            if (_i >= 109 && _i <= 129) then { \"CfgMagazines\" } else { \"CfgWeapons\" }\n        ]\n    ];\n};\n```","code":["private \"_display\";\ndisableSerialization;\n\nwaitUntil {\n\t_display = findDisplay 106;\n\t! isNull _display;\n};\n\nuiNamespace setVariable [\"/TAG/RscDisplayGear/SlotDataEH\", {\n\t_weaponName = gearSlotData (_this select 0);\n\t_conf = configFile >> _confSection >> _weaponName;\n\t_name = getText (_conf >> \"displayName\");\n\t_desc = getText (_conf >> \"Library\" >> \"libTextDesc\");\n\t_image = getText (_conf >> \"picture\");\n\thint parseText format [\n\t\t\"<t size='1.3' align='center' shadow='true' shadowColor='#000000'>%1</t><br><img image='%2' size='6' align='center' /><br>%3<br>%4\",\n\t\t_name, _image, _desc\n\t];\n}];\n\nfor \"_i\" from 107 to 145 do {\n\t_display displayCtrl _i ctrlAddEventHandler [\"ButtonClick\",\n\t\tformat [\n\t\t\t\"_confSection = '%1'; _this call (uiNamespace getVariable '/TAG/RscDisplayGear/SlotDataEH');\",\n\t\t\tif (_i >= 109 && _i <= 129) then { \"CfgMagazines\" } else { \"CfgWeapons\" }\n\t\t]\n\t];\n};"]}],"see_also":["gearSlotAmmoCount","gearIDCAmmoCount"]},{"name":"gestureState","title":"gestureState","type":"command","url":"https://community.bistudio.com/wiki/gestureState","revid":352842,"updated":"2024-02-26T11:36:18Z","groups":["Animations"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"argument":"global"},"description":"Returns the name of a unit's current gesture. Seems to be forced to lower case in Arma 3.\n\n> [!NOTE]\n> This command is only for a man unit, other units such as animals cannot use this command.","syntaxes":[{"syntax":"gestureState unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"empty string if not available"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["private _state = gestureState player;"]}],"multiplayer":"When executed on a client, this command only returns accurate results when the target unit is within sight of the client. When executed on a dedicated server, the returned value is accurate.","see_also":["switchAction","playAction","BIS_fnc_ambientAnimGetParams","animationState","getUnitMovesInfo"]},{"name":"get","title":"get","type":"command","url":"https://community.bistudio.com/wiki/get","revid":348437,"updated":"2023-11-08T13:00:13Z","groups":["HashMap"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Retrieves a value out of a HashMap after looking it up by its key.","syntaxes":[{"syntax":"hashMap get key","params":[{"name":"hashMap","type":"HashMap","type_expr":"HashMap"},{"name":"key","type":"HashMapKey","description":"case sensitive key","type_expr":"HashMapKey"}],"returns":{"type":"Anything, or Nothing","type_expr":"Anything | Nothing","description":"if key is not found","text":"Anything, or Nothing if *key* is not found"},"form":"binary","left":{"text":"hashMap"},"right":{"text":"key"}}],"examples":[{"code":["private _myValue = _myHashMap get \"a\";"]}],"see_also":["HashMap","getOrDefault"]},{"name":"get3DENActionState","title":"get3DENActionState","type":"command","url":"https://community.bistudio.com/wiki/get3DENActionState","revid":349130,"updated":"2023-11-08T14:49:44Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns state of given Eden Editor action.","syntaxes":[{"syntax":"get3DENActionState action","params":[{"name":"action","type":"String","description":"see Eden Editor: Actions","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"action"}}],"examples":[{"code":["if (get3DENActionState \"ToggleMap\" == 1) then {systemChat \"Editor map is open!\"};"]}],"see_also":["do3DENAction"]},{"name":"get3DENAttribute","title":"get3DENAttribute","type":"command","url":"https://community.bistudio.com/wiki/get3DENAttribute","revid":379086,"updated":"2026-09-27T08:41:51Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns the value of the given entity's attribute in Eden Editor.\n\nAn attribute is identified by its `property` (`data` when it is engine-drive attribute) value in config. For the list of all attributes with their properties, see Setting Attributes.\n\n> [!IMPORTANT]\n> Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!","syntaxes":[{"syntax":"entity get3DENAttribute attribute","params":[{"name":"entity","type":"Eden Entity or Eden ID","type_expr":"Eden Entity | Eden ID"},{"name":"attribute","type":"String","description":"attribute property","type_expr":"String"}],"returns":{"type":"Array of Anything","type_expr":"Array<Anything>"},"form":"binary","left":{"text":"entity"},"right":{"text":"attribute"}}],"examples":[{"code":["// returns variable name of the object under cursor\nsystemChat str ((get3DENMouseOver select 1) get3DENAttribute \"name\");"]}],"see_also":["set3DENAttribute","set3DENAttributes","set3DENMissionAttributes","get3DENMissionAttribute","clear3DENAttribute"]},{"name":"get3DENAttributes","title":"get3DENAttributes","type":"command","url":"https://community.bistudio.com/wiki/get3DENAttributes","revid":379219,"updated":"2026-10-30T22:29:28Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Retrieve all attributes and their values of the specified (optional) category.","syntaxes":[{"syntax":"entity get3DENAttributes category","params":[{"name":"entity","type":"Eden Entity","type_expr":"Eden Entity"},{"name":"category","type":"String (\"\" to get all attributes, typeOf to get Object Specific attributes)","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array"},"form":"binary","left":{"text":"entity"},"right":{"text":"category"}}],"see_also":["set3DENAttributes","set3DENAttribute","get3DENMissionAttributes"]},{"name":"get3DENCamera","title":"get3DENCamera","type":"command","url":"https://community.bistudio.com/wiki/get3DENCamera","revid":369318,"updated":"2024-09-03T18:42:56Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns the camera Object used by the Eden Editor.","syntaxes":[{"syntax":"get3DENCamera","params":[],"returns":{"type":"Object","type_expr":"Object","description":"Eden Editor camera"},"form":"nullary"}],"examples":[{"text":"```sqf\n// set exact yaw, pitch, and roll\n_y = 45; _p = -80; _r = 0;\nget3DENCamera setVectorDirAndUp [\n    [sin _y * cos _p,cos _y * cos _p,sin _p],\n    [[sin _r,-sin _p,cos _r * cos _p],-_y] call BIS_fnc_rotateVector2D\n];\n```","code":["// set exact yaw, pitch, and roll\n_y = 45; _p = -80; _r = 0;\nget3DENCamera setVectorDirAndUp [\n\t[sin _y * cos _p,cos _y * cos _p,sin _p],\n\t[[sin _r,-sin _p,cos _r * cos _p],-_y] call BIS_fnc_rotateVector2D\n];"]},{"text":"```sqf\n//Look at player\n_a = positionCameraToWorld [0,0,0] vectorFromTo (getPosATL player);\n_y = asin(_a select 0);\n_b = [_a,_y] call BIS_fnc_rotateVector2D;\n_z = _b select 2;\n_p = asin(_z / sqrt((_b select 1)^2 + _z^2));\nget3DENCamera setVectorDirAndUp [\n    _a,\n    [[0,-sin _p,cos _p],-_y] call BIS_fnc_rotateVector2D\n];\n```","code":["//Look at player\n_a = positionCameraToWorld [0,0,0] vectorFromTo (getPosATL player);\n_y = asin(_a select 0);\n_b = [_a,_y] call BIS_fnc_rotateVector2D;\n_z = _b select 2;\n_p = asin(_z / sqrt((_b select 1)^2 + _z^2));\nget3DENCamera setVectorDirAndUp [\n\t_a,\n\t[[0,-sin _p,cos _p],-_y] call BIS_fnc_rotateVector2D\n];"]}],"see_also":["move3DENCamera","set3DENAttributes"]},{"name":"get3DENConnections","title":"get3DENConnections","type":"command","url":"https://community.bistudio.com/wiki/get3DENConnections","revid":379087,"updated":"2026-09-27T08:45:35Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns all connections currently present on an entity.","syntaxes":[{"syntax":"get3DENConnections entity","params":[{"name":"entity","type":"Eden Entity or Eden ID","type_expr":"Eden Entity | Eden ID"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [type, to]\n- type: String - connection class from Cfg3DEN >> Connections - to: Eden Entity: Entitiy the connection leads to","text":"Array of Arrays with [type, to]\n\n- type: String - connection class from *Cfg3DEN >> Connections*\n- to: Eden Entity: Entitiy the connection leads to"},"form":"unary","right":{"text":"entity"}}],"examples":[{"code":["get3DENConnections _trigger; // Can return [[\"WaypointActivation\",[B Alpha 4-5,0]]]"]}],"see_also":["add3DENConnection","remove3DENConnection"]},{"name":"get3DENEntity","title":"get3DENEntity","type":"command","url":"https://community.bistudio.com/wiki/get3DENEntity","revid":378362,"updated":"2026-04-03T16:26:44Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns Eden Entity based on its Eden ID.","syntaxes":[{"syntax":"get3DENEntity ID","params":[{"name":"ID","type":"Number","description":"Eden ID","type_expr":"Number"}],"returns":{"type":"Eden Entity or Number","type_expr":"Eden Entity | Number","description":"- If the ID points to an Eden Entity the entity is returned - If it points to a Eden Editor: Layer or Eden Editor: Comment the ID is returned - If no entity with given ID exists `-1` is returned","text":"Eden Entity or Number\n\n- If the *ID* points to an Eden Entity the entity is returned\n- If it points to a Eden Editor: Layer or Eden Editor: Comment the *ID* is returned\n- If no entity with given *ID* exists `-1` is returned"},"form":"unary","right":{"text":"ID"}}],"examples":[{"code":["myEntity = get3DENEntity 1;"]}],"see_also":["get3DENEntityID"]},{"name":"get3DENEntityID","title":"get3DENEntityID","type":"command","url":"https://community.bistudio.com/wiki/get3DENEntityID","revid":378236,"updated":"2026-03-20T13:50:55Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns unique index of an Eden Entity. This number remains the same even after saving and loading the scenario. ´\n\n> [!NOTE]\n> Since Arma 3 v2.22 this command also returns the IDs of Eden Entities of type Object, Trigger, Group and Logic during preview.","syntaxes":[{"syntax":"get3DENEntityID entity","params":[{"name":"entity","type":"Eden Entity or Eden ID","type_expr":"Eden Entity | Eden ID"}],"returns":{"type":"Number","type_expr":"Number","description":"Eden ID If ID is not available, -1 is returned"},"form":"unary","right":{"text":"entity"}}],"examples":[{"code":["myID = get3DENEntityID player;"]}],"see_also":["get3DENEntity"]},{"name":"get3DENGrid","title":"get3DENGrid","type":"command","url":"https://community.bistudio.com/wiki/get3DENGrid","revid":348872,"updated":"2023-11-08T14:39:45Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns the grid increment for the given transformation type.","syntaxes":[{"syntax":"get3DENGrid type","params":[{"name":"type","type":"String","description":"name of transformation type. Can be:\n\n- `\"r\"` - Rotation\n- `\"t\"` - Translation\n- `\"s\"` - Scale","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"type"}}],"examples":[{"code":["_currentIncrement = get3DENGrid \"t\";"]}],"see_also":["set3DENGrid"]},{"name":"get3DENIconsVisible","title":"get3DENIconsVisible","type":"command","url":"https://community.bistudio.com/wiki/get3DENIconsVisible","revid":378129,"updated":"2026-02-22T20:20:11Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Gets visibility state of Eden Editor icons.","syntaxes":[{"syntax":"get3DENIconsVisible","params":[],"returns":{"type":"Array of Booleans","type_expr":"Array<Boolean>","description":"format [shownInMap, shownInScene]:\n- shownInMap: Boolean - icons's map visibility - shownInScene: Boolean - icons's scene visibility","text":"Array of Booleans format [shownInMap, shownInScene]:\n\n- shownInMap: Boolean - icons's map visibility\n- shownInScene: Boolean - icons's scene visibility"},"form":"nullary"}],"examples":[{"code":["if (get3DENIconsVisible select 0) then { hint \"Icons are visible on the map.\" };"]},{"code":["get3DENIconsVisible params [\"_shownInMap\", \"_shownInScene\"];"]}],"see_also":["set3DENIconsVisible","set3DENLinesVisible","get3DENLinesVisible"]},{"name":"get3DENLayer","title":"get3DENLayer","type":"command","url":"https://community.bistudio.com/wiki/get3DENLayer","revid":379220,"updated":"2026-10-30T22:29:57Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns the provided entity's layer ID.","syntaxes":[{"syntax":"get3DENLayer edenEntity","params":[{"name":"edenEntity","type":"Eden Entity","type_expr":"Eden Entity"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"edenEntity"}}],"examples":[{"code":["hint format [\"Entity %1 is in layer %2\", typeOf _entity, get3DENLayer _entity];"]}],"see_also":["create3DENEntity","getMissionLayerEntities","set3DENLayer"]},{"name":"get3DENLayerEntities","title":"get3DENLayerEntities","type":"command","url":"https://community.bistudio.com/wiki/get3DENLayerEntities","revid":369163,"updated":"2024-09-03T10:34:40Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Return all entities and sub-layer in Eden Entity layer. In order to get all layer entities during a scenario use getMissionLayerEntities.","syntaxes":[{"syntax":"get3DENLayerEntities layerID","params":[{"name":"layerID","type":"Number","description":"layer ID as returned by add3DENLayer command","type_expr":"Number"}],"returns":{"type":"Array of Eden Entities","type_expr":"Array<Eden Entity>"},"form":"unary","right":{"text":"layerID"}}],"examples":[{"code":["_myLayer = -1 add3DENLayer \"CTRG\";\nplayer set3DENLayer _myLayer;\n_entities = get3DENLayerEntities _myLayer;"]}],"see_also":["add3DENLayer","remove3DENLayer","set3DENLayer","getMissionLayerEntities","getMissionLayers"]},{"name":"get3DENLinesVisible","title":"get3DENLinesVisible","type":"command","url":"https://community.bistudio.com/wiki/get3DENLinesVisible","revid":377632,"updated":"2026-01-02T08:52:24Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Get visibility state of Eden Editor lines.","syntaxes":[{"syntax":"get3DENLinesVisible","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [showMap, showScene]\n- showScene: Boolean - visibility in the scene - showMap : Boolean - visibility in the map","text":"Array with [showMap, showScene]\n\n- showScene: Boolean - visibility in the scene\n- showMap : Boolean - visibility in the map"},"form":"nullary"}],"examples":[{"code":["if (get3DENLinesVisible select 0) then { hint \"Lines are visible in the map.\"; };"]}],"see_also":["set3DENLinesVisible","set3DENIconsVisible","get3DENIconsVisible","set3DENModelsVisible"]},{"name":"get3DENMissionAttribute","title":"get3DENMissionAttribute","type":"command","url":"https://community.bistudio.com/wiki/get3DENMissionAttribute","revid":379342,"updated":"2026-10-30T23:53:46Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Return value of scenario attribute. For a list of all available mission attributes see Mission Attributes.\n\n> [!IMPORTANT]\n> Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!","syntaxes":[{"syntax":"section get3DENMissionAttribute class","params":[{"name":"section","type":"String","description":"attribute section. See Sections & Properties","type_expr":"String"},{"name":"class","type":"String","description":"attribute name","type_expr":"String"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"section"},"right":{"text":"class"}}],"examples":[{"code":["systemChat str (\"Multiplayer\" get3DENMissionAttribute \"respawn\");"]}],"see_also":["set3DENMissionAttributes"],"notes":[{"user":"R3vo","date":"2016-02-26T16:54:00Z","text":"The class names of the vanilla sections are:\n\n| Display Name | Class Name (section) |\n|---|---|\n| Environment | Intel |\n| Multiplayer | Multiplayer |\n| Performance | GarbageCollection |\n| Preferences | Preferences |"},{"user":"R3vo","date":"2020-11-02T16:57:00Z","text":"It seems that Preferences can be returned just fine during preview."}]},{"name":"get3DENMissionAttributes","title":"get3DENMissionAttributes","type":"command","url":"https://community.bistudio.com/wiki/get3DENMissionAttributes","revid":373745,"updated":"2025-06-24T21:49:17Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Retrieve all attributes and their values from the specified section/category (category is optional).","syntaxes":[{"syntax":"section get3DENMissionAttributes category","params":[{"name":"section","type":"String","type_expr":"String"},{"name":"category","type":"String Category name or `\"\"` to return all attributes","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array"},"form":"binary","left":{"text":"section"},"right":{"text":"category"}}],"examples":[{"code":["private _result = \"Multiplayer\" get3DENMissionAttributes \"\";"]}],"see_also":["set3DENMissionAttributes","get3DENMissionAttribute","get3DENAttributes"]},{"name":"get3DENMouseOver","title":"get3DENMouseOver","type":"command","url":"https://community.bistudio.com/wiki/get3DENMouseOver","revid":377713,"updated":"2026-01-02T09:03:54Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns the Eden Entity the mouse is hovering over in Eden Editor.","syntaxes":[{"syntax":"get3DENMouseOver","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [type, entity]\n- type: String - can be one of: - \"Object\" - \"Group\" - \"Trigger\" - \"Logic\" - \"Waypoint\" - \"Marker\" - entity: Eden Entity","text":"Array with [type, entity]\n\n- type: String - can be one of:\n  - \"Object\"\n  - \"Group\"\n  - \"Trigger\"\n  - \"Logic\"\n  - \"Waypoint\"\n  - \"Marker\"\n- entity: Eden Entity"},"form":"nullary"}],"examples":[{"code":["systemChat str get3DENMouseOver; // returns e.g [\"Object\", B Alpha 1-1:1]"]}],"see_also":["add3DENConnection","add3DENEventHandler","all3DENEntities","collect3DENHistory","create3DENComposition","create3DENEntity","current3DENOperation","delete3DENEntities","do3DENAction","get3DENActionState","get3DENAttribute","get3DENCamera","get3DENConnections","get3DENEntityID","get3DENGrid","get3DENIconsVisible","get3DENLinesVisible","get3DENSelected","is3DEN","is3DENMultiplayer","move3DENCamera","remove3DENConnection","remove3DENEventHandler","removeAll3DENEventHandlers","set3DENAttributes","set3DENGrid","set3DENIconsVisible","set3DENLinesVisible","set3DENObjectType"]},{"name":"get3DENParent","title":"get3DENParent","type":"command","url":"https://community.bistudio.com/wiki/get3DENParent","revid":370441,"updated":"2024-12-09T16:33:11Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Obtains the provided entity's parent.","syntaxes":[{"syntax":"get3DENParent entity","params":[{"name":"entity","type":"Object, Group, Array, Number, String","description":"Eden Entity","type_expr":"Object | Group | Array | Number | String"}],"returns":{"type":"Object, Array, Number","type_expr":"Object | Array | Number","description":"Returns Eden Entity or the Eden ID representing it. -1 for system layers such as BLUFOR, OPFOR etc.","text":"Object, Array, Number - Returns Eden Entity or the Eden ID representing it. -1 for system layers such as *BLUFOR*, *OPFOR* etc."},"form":"unary","right":{"text":"entity"}}],"examples":[{"code":["private _parent = get3DENParent _myObject;"]}],"see_also":["create3DENEntity","delete3DENEntities"]},{"name":"get3DENSelected","title":"get3DENSelected","type":"command","url":"https://community.bistudio.com/wiki/get3DENSelected","revid":377086,"updated":"2026-01-01T09:45:11Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns an array of all selected Eden Editor Entities of the given type.\nIf a wrong type is provided, `[[], [], [], [], [], []]` is returned and an error message is shown.","syntaxes":[{"syntax":"get3DENSelected type","params":[{"name":"type","type":"String","description":"entity type, can be one of:\n\n- `\"object\"`\n- `\"group\"`\n- `\"trigger\"`\n- `\"logic\"`\n- `\"waypoint\"`\n- `\"marker\"`\n- `\"layer\"`\n- `\"comment\"`\n- `\"\"` - everything but \"layer\" and \"comment\"","type_expr":"String"}],"returns":{"type":"Array of Eden Entity","type_expr":"Array<Eden Entity>"},"form":"unary","right":{"text":"type"}}],"examples":[{"text":"```sqf\nget3DENSelected \"\";\n\n/*\n[\n    [B Alpha 2-1:1],                // objects\n    [B Alpha 2-1],                    // groups\n    [164494: <no shape>],            // triggers\n    [<No center> Charlie 1-2:4],    // logic\n    [[B Alpha 2-1,0]],                // waypoints\n    [\"Hotel_Whiskey\"]                // markers\n]\n*/\n```","code":["get3DENSelected \"\";\n\n/*\n[\n\t[B Alpha 2-1:1],\t\t\t\t// objects\n\t[B Alpha 2-1],\t\t\t\t\t// groups\n\t[164494: <no shape>],\t\t\t// triggers\n\t[<No center> Charlie 1-2:4],\t// logic\n\t[[B Alpha 2-1,0]],\t\t\t\t// waypoints\n\t[\"Hotel_Whiskey\"]\t\t\t\t// markers\n]\n*/"]},{"code":["get3DENSelected \"object\"; // [B Alpha 2-1:1]"]}],"see_also":["all3DENEntities","get3DENMouseOver","delete3DENEntities"]},{"name":"getAimDirectionAndUp","title":"getAimDirectionAndUp","type":"command","url":"https://community.bistudio.com/wiki/getAimDirectionAndUp","revid":378285,"updated":"2026-03-31T10:14:52Z","groups":["Object Manipulation","Render Time Scope"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"global"},"description":"Returns the aim direction and up vectors of a soldier in model space. It returns where the weapon aim is wanted from the eyePos, not the actual weapon direction. For actual weapon direction, see weaponDirection.","syntaxes":[{"syntax":"getAimDirectionAndUp [soldier, isRenderScope]","params":[{"name":"soldier","type":"Object","description":"The soldier entity. The soldier must either be on foot or in a turret.","type_expr":"Object"},{"name":"isRenderScope","type":"Boolean","optional":true,"default":"false","description":"Whether to use render scope to get the vector. (render scope is smoother for visualizing the vector in 3D)","type_expr":"Boolean","text":"isRenderScope: Boolean - (Optional, default false) Whether to use render scope to get the vector. (render scope is smoother for visualizing the vector in 3D)"}],"returns":{"type":"Array","type_expr":"Array","description":"in format [directionForward, directionUp] in soldier's model space"},"form":"unary","right":{"text":"[soldier, isRenderScope]"}}],"examples":[{"code":["onEachFrame\n{\n    getAimDirectionAndUp [player] params [\"_dir\", \"_up\"];\n    private _dirWS = player vectorModelToWorld _dir;\n    private _upWS = player vectorModelToWorld _up;\n    private _eyePos = eyePos player;\n    drawLine3D [ASLtoAGL _eyePos, ASLtoAGL (_eyePos vectorAdd _dirWS), [1,0,0,1]];\n}"]}],"see_also":["weaponDirection","eyeDirection","positionCameraToWorld","eyePos"]},{"name":"getAimingCoef","title":"getAimingCoef","type":"command","url":"https://community.bistudio.com/wiki/getAimingCoef","revid":351281,"updated":"2023-11-27T02:47:48Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Get current aiming coefficient (higher ~ less precise, default is 1)","syntaxes":[{"syntax":"getAimingCoef unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"_coef = getAimingCoef player"}],"see_also":["getCustomAimingCoef"]},{"name":"getAllEnv3DSoundControllers","title":"getAllEnv3DSoundControllers","type":"command","url":"https://community.bistudio.com/wiki/getAllEnv3DSoundControllers","revid":377625,"updated":"2026-01-02T08:52:04Z","groups":["Sounds"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","description":"Returns an array containing the names and values of environmental 3D sound controllers, variables that can be used in simple expressions when configuring sounds.\n\n> [!IMPORTANT]\n> - Controller names are case sensitive\n> - Wind param difference:\n>   - `wind` is for **3D** controller\n>   - `windy` is for **2D** controller (getAllEnvSoundControllers)","syntaxes":[{"syntax":"getAllEnv3DSoundControllers object","params":[{"name":"object","type":"Object","description":"environmental sound source like a tree or a house, see allEnv3DSoundSources","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [[\"controllerA\", valueA], [\"controllerB\", valueB], ...], controllers being, in order:\n- `\"rain\"` - `\"night\"` - `\"wind\"` - `\"daytime\"` - `\"distance\"` - `\"shooting\"` - `\"meadows\"` - `\"trees\"` - `\"houses\"` - `\"forest\"` - `\"sea\"` - `\"altitudeSea\"` - `\"altitudeGround\"` - `\"rainDrops\"` - `\"yearTime\"` - `\"ambientTemp\"` - `\"snow\"`","text":"Array with [[\"controllerA\", valueA], [\"controllerB\", valueB], ...], controllers being, in order:\n\n- `\"rain\"`\n- `\"night\"`\n- `\"wind\"`\n- `\"daytime\"`\n- `\"distance\"`\n- `\"shooting\"`\n- `\"meadows\"`\n- `\"trees\"`\n- `\"houses\"`\n- `\"forest\"`\n- `\"sea\"`\n- `\"altitudeSea\"`\n- `\"altitudeGround\"`\n- `\"rainDrops\"`\n- `\"yearTime\"`\n- `\"ambientTemp\"`\n- `\"snow\"`"},"form":"unary","right":{"text":"object"}}],"examples":[{"text":"```sqf\ngetAllEnv3DSoundControllers _thatTreeOverThere;\n/*\n    returns e.g\n    [\n        [\"rain\",0],\n        [\"night\",0],\n        [\"wind\",0.161588],\n        ...\n    ]\n*/\n```","code":["getAllEnv3DSoundControllers _thatTreeOverThere;\n/*\n\treturns e.g\n\t[\n\t\t[\"rain\",0],\n\t\t[\"night\",0],\n\t\t[\"wind\",0.161588],\n\t\t...\n\t]\n*/"]}],"see_also":["getAllEnvSoundControllers","getEnv3DSoundController","allEnv3DSoundSources","selectBestPlaces","getSoundController","getSoundControllerResult","getEnvSoundController","getAllSoundControllers","getCustomSoundController","setCustomSoundController","getCustomSoundControllerCount","Arma 3: Sound"]},{"name":"getAllEnvSoundControllers","title":"getAllEnvSoundControllers","type":"command","url":"https://community.bistudio.com/wiki/getAllEnvSoundControllers","revid":377626,"updated":"2026-01-02T08:52:06Z","groups":["Sounds"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","description":"Returns an array containing the names and values of environmental 2D sound controllers, variables that can be used in simple expressions when configuring sounds.\n\n> [!IMPORTANT]\n> - Controller names are case sensitive\n> - Please note that the name for the wind param for **2D** controller is 'windy', 'wind' being the name for the **3D** controller getAllEnv3DSoundControllers.","syntaxes":[{"syntax":"getAllEnvSoundControllers position","params":[{"name":"position","type":"Position","type_expr":"Position"}],"returns":{"type":"Array","type_expr":"Array","description":"with [[\"controllerA\", valueA], [\"controllerB\", valueB], ...], controllers being, in order:\n- `\"rain\"` - `\"night\"` - `\"windy\"` - `\"daytime\"` - `\"meadows\"` - `\"trees\"` - `\"houses\"` - `\"forest\"` - `\"sea\"` - `\"coast\"` - `\"altitudeGround\"` - `\"altitudeSea\"` - `\"shooting\"` - `\"deadbody\"` - `\"fog\"` - Arma 3 v2.08 `\"yearTime\"` - Arma 3 v2.08 `\"ambientTemp\"` - Arma 3 v2.08 `\"snow\"`","text":"Array with [[\"controllerA\", valueA], [\"controllerB\", valueB], ...], controllers being, in order:\n\n- `\"rain\"`\n- `\"night\"`\n- `\"windy\"`\n- `\"daytime\"`\n- `\"meadows\"`\n- `\"trees\"`\n- `\"houses\"`\n- `\"forest\"`\n- `\"sea\"`\n- `\"coast\"`\n- `\"altitudeGround\"`\n- `\"altitudeSea\"`\n- `\"shooting\"`\n- `\"deadbody\"`\n- `\"fog\"`\n- Arma 3 v2.08 `\"yearTime\"`\n- Arma 3 v2.08 `\"ambientTemp\"`\n- Arma 3 v2.08 `\"snow\"`"},"form":"unary","right":{"text":"position"}}],"examples":[{"text":"```sqf\ngetAllEnvSoundControllers position player;\n/*\n    returns e.g\n    [\n        [\"rain\",0],\n        [\"night\",0],\n        [\"windy\",0.161588],\n        ...\n    ]\n*/\n```","code":["getAllEnvSoundControllers position player;\n/*\n\treturns e.g\n\t[\n\t\t[\"rain\",0],\n\t\t[\"night\",0],\n\t\t[\"windy\",0.161588],\n\t\t...\n\t]\n*/"]}],"see_also":["getAllEnv3DSoundControllers","getEnv3DSoundController","allEnv3DSoundSources","selectBestPlaces","getSoundController","getSoundControllerResult","getEnvSoundController","getAllSoundControllers","getCustomSoundController","setCustomSoundController","getCustomSoundControllerCount","Arma 3: Sound"]},{"name":"getAllHitPointsDamage","title":"getAllHitPointsDamage","type":"command","url":"https://community.bistudio.com/wiki/getAllHitPointsDamage","revid":376957,"updated":"2026-01-01T05:46:28Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","locality":{"argument":"global"},"description":"Get provided object's hit points damage.","syntaxes":[{"syntax":"getAllHitPointsDamage entity","params":[{"name":"entity","type":"Object","description":"object to be queried","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"[] if entity is null or has no shape, otherwise [hitpointNames, selectionNames, damageValues]:\n- hitpointNames: Array of Strings - selectionNames: Array of Strings - damageValues: Array of Numbers in range 0..1 - where 0 = no damage, 1 = full damage All values in all arrays are ordered accordingly to hit part index for convenience and for use in setHitIndex and getHitIndex.","text":"Array - [] if entity is null or has no shape, otherwise [hitpointNames, selectionNames, damageValues]:\n\n- hitpointNames: Array of Strings\n- selectionNames: Array of Strings\n- damageValues: Array of Numbers in range 0..1 - where 0 = no damage, 1 = full damage\n\nAll values in all arrays are ordered accordingly to hit part index for convenience and for use in setHitIndex and getHitIndex."},"form":"unary","right":{"text":"entity"}}],"examples":[{"text":"```sqf\nhint str getAllHitPointsDamage player;\n/*\n[\n    [\"hitface\",\"hitneck\",\"hithead\",\"hitpelvis\",\"hitabdomen\",\"hitdiaphragm\",\"hitchest\",\"hitbody\",\"hitarms\",\"hithands\",\"hitlegs\",\"incapacitated\"],\n    [\"face_hub\",\"neck\",\"head\",\"pelvis\",\"spine1\",\"spine2\",\"spine3\",\"body\",\"arms\",\"hands\",\"legs\",\"body\"],\n    [0,0,0,0,0,0,0,0,0,0,0,0]\n]\n*/\n```","code":["hint str getAllHitPointsDamage player;\n/*\n[\n\t[\"hitface\",\"hitneck\",\"hithead\",\"hitpelvis\",\"hitabdomen\",\"hitdiaphragm\",\"hitchest\",\"hitbody\",\"hitarms\",\"hithands\",\"hitlegs\",\"incapacitated\"],\n\t[\"face_hub\",\"neck\",\"head\",\"pelvis\",\"spine1\",\"spine2\",\"spine3\",\"body\",\"arms\",\"hands\",\"legs\",\"body\"],\n\t[0,0,0,0,0,0,0,0,0,0,0,0]\n]\n*/"]},{"text":"```sqf\nhint str getAllHitPointsDamage vehicle player;\n/*\n[\n    [\"hithull\",\"hitengine\",\"hitengine2\",\"hitavionics\",\"hitfuel\",\"hitfuel2\",\"hitglass1\",\"hitlaileron\",\"hitraileron\",\"hitlcrudder\",\"hitrrudder\",\"hitlcelevator\",\"hitrelevator\",\"#gear_f_lights\"],\n    [\"hithull\",\"hitengine\",\"hitengine2\",\"hitavionics\",\"hitfuel\",\"hitfuel2\",\"hitglass1\",\"hitlaileron\",\"hitraileron\",\"hitlcrudder\",\"hitrrudder\",\"hitlcelevator\",\"hitrelevator\",\" \"],\n    [0,0,0,0,0,0,0,0,0,0,0,0,0,0]\n]\n*/\n```","code":["hint str getAllHitPointsDamage vehicle player;\n/*\n[\n\t[\"hithull\",\"hitengine\",\"hitengine2\",\"hitavionics\",\"hitfuel\",\"hitfuel2\",\"hitglass1\",\"hitlaileron\",\"hitraileron\",\"hitlcrudder\",\"hitrrudder\",\"hitlcelevator\",\"hitrelevator\",\"#gear_f_lights\"],\n\t[\"hithull\",\"hitengine\",\"hitengine2\",\"hitavionics\",\"hitfuel\",\"hitfuel2\",\"hitglass1\",\"hitlaileron\",\"hitraileron\",\"hitlcrudder\",\"hitrrudder\",\"hitlcelevator\",\"hitrelevator\",\" \"],\n\t[0,0,0,0,0,0,0,0,0,0,0,0,0,0]\n]\n*/"]}],"see_also":["setHitPointDamage","getHitPointDamage","setHitIndex","getHitIndex","setHit","getHit","setDamage","damage"]},{"name":"getAllOwnedMines","title":"getAllOwnedMines","type":"command","url":"https://community.bistudio.com/wiki/getAllOwnedMines","revid":347576,"updated":"2023-09-28T10:10:09Z","groups":["Mines"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Gets all mine objects this unit has ownership over.","syntaxes":[{"syntax":"getAllOwnedMines unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_mines = getAllOwnedMines player;"]}],"see_also":["allMines","createMine","detectedMines","mineActive","removeOwnedMine","addOwnedMine","removeAllOwnedMines"]},{"name":"getAllPylonsInfo","title":"getAllPylonsInfo","type":"command","url":"https://community.bistudio.com/wiki/getAllPylonsInfo","revid":378172,"updated":"2026-03-03T11:43:19Z","groups":["Vehicle Loadouts"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Return an array with the vehicle's all pylons info.\nNote that the podObject can only be used for very few operations. It is not a real Entity.\nNote until Arma 3 v2.22 the relativeDir orientation was inverted.","syntaxes":[{"syntax":"getAllPylonsInfo vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"in format [Pylon index, Pylon name, Assigned turret, Magazine className, Magazine ammo count, Magazine detail, Arma 3 v2.20 [relativePos, relativeDir, relativeUp], Arma 3 v2.22 podObject]","text":"Array of Arrays in format [Pylon index, Pylon name, Assigned turret, Magazine className, Magazine ammo count, Magazine detail, Arma 3 v2.20 [relativePos, relativeDir, relativeUp], Arma 3 v2.22 podObject]"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"text":"```sqf\ngetAllPylonsInfo vehicle player;\n/*\n    Executed on an Mi-48 Kajman:\n    [\n        [1, \"PylonLeft1\", [0], \"PylonRack_4Rnd_LG_scalpel\", 4, \"0:10000048\", [[2.50423, -0.214772, -1.37952], [0, 0.997732, 0.0673187], [-0, -0.0673187, 0.997732]], NOID pylonpod_4x_missile_lg_scalpel_f.p3d],\n        [2, \"PylonLeft2\", [0], \"PylonRack_19Rnd_Rocket_Skyfire\", 19, \"0:10000050\", [[1.8108, -0.15553, -1.32298], [0, 0.997732, 0.0673187], [-0, -0.0673187, 0.997732]], NOID pylonpod_rocket_skyfire_f.p3d],\n        [3, \"PylonRight2\", [0], \"PylonRack_19Rnd_Rocket_Skyfire\", 19, \"0:10000051\", [[-1.81321, -0.15553, -1.32298], [0, 0.997732, 0.0673187], [-0, -0.0673187, 0.997732]], NOID pylonpod_rocket_skyfire_f.p3d],\n        [4, \"PylonRight1\", [0], \"PylonRack_4Rnd_LG_scalpel\", 4, \"0:10000052\", [[-2.50664, -0.214772, -1.37952], [0, 0.997732, 0.0673187], [-0, -0.0673187, 0.997732]], NOID pylonpod_4x_missile_lg_scalpel_f.p3d]\n    ]\n*/\n```","code":["getAllPylonsInfo vehicle player;\n/*\n\tExecuted on an Mi-48 Kajman:\n\t[\n\t\t[1, \"PylonLeft1\", [0], \"PylonRack_4Rnd_LG_scalpel\", 4, \"0:10000048\", [[2.50423, -0.214772, -1.37952], [0, 0.997732, 0.0673187], [-0, -0.0673187, 0.997732]], NOID pylonpod_4x_missile_lg_scalpel_f.p3d],\n\t\t[2, \"PylonLeft2\", [0], \"PylonRack_19Rnd_Rocket_Skyfire\", 19, \"0:10000050\", [[1.8108, -0.15553, -1.32298], [0, 0.997732, 0.0673187], [-0, -0.0673187, 0.997732]], NOID pylonpod_rocket_skyfire_f.p3d],\n\t\t[3, \"PylonRight2\", [0], \"PylonRack_19Rnd_Rocket_Skyfire\", 19, \"0:10000051\", [[-1.81321, -0.15553, -1.32298], [0, 0.997732, 0.0673187], [-0, -0.0673187, 0.997732]], NOID pylonpod_rocket_skyfire_f.p3d],\n\t\t[4, \"PylonRight1\", [0], \"PylonRack_4Rnd_LG_scalpel\", 4, \"0:10000052\", [[-2.50664, -0.214772, -1.37952], [0, 0.997732, 0.0673187], [-0, -0.0673187, 0.997732]], NOID pylonpod_4x_missile_lg_scalpel_f.p3d]\n\t]\n*/"]}],"see_also":["ammoOnPylon","getCompatiblePylonMagazines","getPylonMagazines","setAmmoOnPylon","setPylonLoadout","setPylonsPriority"]},{"name":"getAllSoundControllers","title":"getAllSoundControllers","type":"command","url":"https://community.bistudio.com/wiki/getAllSoundControllers","revid":377631,"updated":"2026-01-02T08:52:23Z","groups":["Sounds"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","description":"Returns an array containing names and values of the sound controllers that can be used in simple expressions when configuring sounds.","syntaxes":[{"syntax":"getAllSoundControllers vehicle","params":[{"name":"vehicle","type":"Object","description":"a **vehicle** - this does not work on humans","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [[\"controllerA\", valueA], [\"controllerB\", valueB], ...], controllers being, in order:\n- `\"rpm\"` - `\"randomizer\"` - `\"speed\"` - `\"thrust\"` - `\"campos\"` - `\"engineon\"` - `\"rotorspeed\"` - `\"rotorthrust\"` - `\"angvelocity\"` - `\"gmeterz\"` - `\"roughness\"` - `\"dustness\"` - `\"damper0\"` - `\"damper1\"` - `\"damper2\"` - `\"damper3\"` - `\"rock\"` - `\"sand\"` - `\"grass\"` - `\"mud\"` - `\"gravel\"` - `\"asphalt\"` - `\"gear\"` - `\"flaps\"` - `\"rotpos\"` - `\"water\"` - `\"apu\"` - `\"batteries\"` - `\"rpmstarter\"` - `\"rpm1\"` - `\"rpmstarter1\"` - `\"motordamage\"` - `\"transmissiondamage\"` - `\"rotorbrake\"` - `\"slingloadactive\"` - `\"latslip\"` - `\"latslipdrive\"` - `\"longslip\"` - `\"longslipdrive\"` - `\"scrubland\"` - `\"scrubobject\"` - `\"scrubtree\"` - `\"scrubbuilding\"` - `\"scrubarmor\"` - `\"engineeffectivity\"` - `\"rain\"` - `\"wind\"` - `\"lateralmovement\"` - `\"playerpos\"` - `\"rotordamage\"` - `\"distance\"` - `\"machcone\"` - `\"camint\"` - `\"camext\"` - `\"houses\"` - `\"meadow\"` - `\"forest\"` - `\"trees\"` - `\"altRadar\"` - `\"acceleration\"` - `\"CustomSoundController1\"` - `\"CustomSoundController2\"` - `\"CustomSoundController3\"` - `\"CustomSoundController4\"` - `\"CustomSoundController5\"` - `\"CustomSoundController6\"` - `\"CustomSoundController7\"` - `\"CustomSoundController8\"` - `\"CustomSoundController9\"` - `\"CustomSoundController10\"` - `\"CustomSoundController11\"` - `\"CustomSoundController12\"` - `\"CustomSoundController13\"` - `\"CustomSoundController14\"` - `\"CustomSoundController15\"` - `\"CustomSoundController16\"` - `\"CustomSoundController17\"` - `\"CustomSoundController18\"` - `\"CustomSoundController19\"` - `\"CustomSoundController20\"` - `\"CustomSoundController21\"` - `\"CustomSoundController22\"` - `\"CustomSoundController23\"` - `\"CustomSoundController24\"` - `\"CustomSoundController25\"` - `\"CustomSoundController26\"` - `\"CustomSoundController27\"` - `\"CustomSoundController28\"` - `\"CustomSoundController29\"` - `\"CustomSoundController30\"` - `\"CustomSoundController31\"` - `\"CustomSoundController32\"`","text":"Array with [[\"controllerA\", valueA], [\"controllerB\", valueB], ...], controllers being, in order:\n\n- `\"rpm\"`\n- `\"randomizer\"`\n- `\"speed\"`\n- `\"thrust\"`\n- `\"campos\"`\n- `\"engineon\"`\n- `\"rotorspeed\"`\n- `\"rotorthrust\"`\n- `\"angvelocity\"`\n- `\"gmeterz\"`\n- `\"roughness\"`\n- `\"dustness\"`\n- `\"damper0\"`\n- `\"damper1\"`\n- `\"damper2\"`\n- `\"damper3\"`\n- `\"rock\"`\n- `\"sand\"`\n- `\"grass\"`\n- `\"mud\"`\n- `\"gravel\"`\n- `\"asphalt\"`\n- `\"gear\"`\n- `\"flaps\"`\n- `\"rotpos\"`\n- `\"water\"`\n- `\"apu\"`\n- `\"batteries\"`\n- `\"rpmstarter\"`\n- `\"rpm1\"`\n- `\"rpmstarter1\"`\n- `\"motordamage\"`\n- `\"transmissiondamage\"`\n- `\"rotorbrake\"`\n- `\"slingloadactive\"`\n- `\"latslip\"`\n- `\"latslipdrive\"`\n- `\"longslip\"`\n- `\"longslipdrive\"`\n- `\"scrubland\"`\n- `\"scrubobject\"`\n- `\"scrubtree\"`\n- `\"scrubbuilding\"`\n- `\"scrubarmor\"`\n- `\"engineeffectivity\"`\n- `\"rain\"`\n- `\"wind\"`\n- `\"lateralmovement\"`\n- `\"playerpos\"`\n- `\"rotordamage\"`\n- `\"distance\"`\n- `\"machcone\"`\n- `\"camint\"`\n- `\"camext\"`\n- `\"houses\"`\n- `\"meadow\"`\n- `\"forest\"`\n- `\"trees\"`\n- `\"altRadar\"`\n- `\"acceleration\"`\n- `\"CustomSoundController1\"`\n- `\"CustomSoundController2\"`\n- `\"CustomSoundController3\"`\n- `\"CustomSoundController4\"`\n- `\"CustomSoundController5\"`\n- `\"CustomSoundController6\"`\n- `\"CustomSoundController7\"`\n- `\"CustomSoundController8\"`\n- `\"CustomSoundController9\"`\n- `\"CustomSoundController10\"`\n- `\"CustomSoundController11\"`\n- `\"CustomSoundController12\"`\n- `\"CustomSoundController13\"`\n- `\"CustomSoundController14\"`\n- `\"CustomSoundController15\"`\n- `\"CustomSoundController16\"`\n- `\"CustomSoundController17\"`\n- `\"CustomSoundController18\"`\n- `\"CustomSoundController19\"`\n- `\"CustomSoundController20\"`\n- `\"CustomSoundController21\"`\n- `\"CustomSoundController22\"`\n- `\"CustomSoundController23\"`\n- `\"CustomSoundController24\"`\n- `\"CustomSoundController25\"`\n- `\"CustomSoundController26\"`\n- `\"CustomSoundController27\"`\n- `\"CustomSoundController28\"`\n- `\"CustomSoundController29\"`\n- `\"CustomSoundController30\"`\n- `\"CustomSoundController31\"`\n- `\"CustomSoundController32\"`"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"text":"```sqf\ngetAllSoundControllers vehicle player;\n/*\n    returns e.g\n    [\n        [\"rpm\",0],\n        [\"randomizer\",0.874332],\n        [\"speed\",0],\n        [\"thrust\",0],\n        ...\n    ]\n*/\n```","code":["getAllSoundControllers vehicle player;\n/*\n\treturns e.g\n\t[\n\t\t[\"rpm\",0],\n\t\t[\"randomizer\",0.874332],\n\t\t[\"speed\",0],\n\t\t[\"thrust\",0],\n\t\t...\n\t]\n*/"]}],"see_also":["Arma 3: Sound","getSoundController","getSoundControllerResult","getEnvSoundController","getAllEnvSoundControllers","getCustomSoundController","setCustomSoundController","getCustomSoundControllerCount"]},{"name":"getAllUnitTraits","title":"getAllUnitTraits","type":"command","url":"https://community.bistudio.com/wiki/getAllUnitTraits","revid":379083,"updated":"2026-09-27T08:11:53Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns unit traits (native or set by setUnitTrait).","syntaxes":[{"syntax":"getAllUnitTraits unit","params":[{"name":"unit","type":"Object or Arma 3 v2.18 String","description":"a unit or a class name","type_expr":"Object | String"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [name, value]\n- name: String - trait's name - value: String or Boolean - trait's value","text":"Array of Arrays with [name, value]\n\n- name: String - trait's name\n- value: String or Boolean - trait's value"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"```sqf\nprivate _playerTraits = getAllUnitTraits player;\n/*\nCould return something like this:\n[\n    [\"Medic\", false],\n    [\"Engineer\", false],\n    [\"ExplosiveSpecialist\", false],\n    [\"UavHacker\", false],\n    [\"CamouflageCoef\", 1],\n    [\"AudibleCoef\", 1],\n    [\"LoadCoef\", 1],\n    [\"test\", \"custom\"]\n]\n*/\n```","code":["private _playerTraits = getAllUnitTraits player;\n/*\nCould return something like this:\n[\n\t[\"Medic\", false],\n\t[\"Engineer\", false],\n\t[\"ExplosiveSpecialist\", false],\n\t[\"UavHacker\", false],\n\t[\"CamouflageCoef\", 1],\n\t[\"AudibleCoef\", 1],\n\t[\"LoadCoef\", 1],\n\t[\"test\", \"custom\"]\n]\n*/"]},{"code":["private _unitTraits = getAllUnitTraits _unit;\nprivate _indexes = [_unitTraits, \"Medic\"] call BIS_fnc_findNestedElement;\nprivate _unitCanHeal = _unitTraits select (_indexes select 0) select 1;"]},{"text":"Since Arma 3 v2.18:\n\n```sqf\nhint str getAllUnitTraits \"O_Engineer_F\";\n/*\n[\n    [\"Medic\", false],\n    [\"Engineer\", true],\n    [\"ExplosiveSpecialist\", true],\n    [\"UavHacker\", false],\n    [\"CamouflageCoef\", 1],\n    [\"AudibleCoef\", 1],\n    [\"LoadCoef\", 1]\n]\n*/\n```","code":["hint str getAllUnitTraits \"O_Engineer_F\";\n/*\n[\n\t[\"Medic\", false],\n\t[\"Engineer\", true],\n\t[\"ExplosiveSpecialist\", true],\n\t[\"UavHacker\", false],\n\t[\"CamouflageCoef\", 1],\n\t[\"AudibleCoef\", 1],\n\t[\"LoadCoef\", 1]\n]\n*/"]}],"see_also":["getUnitTrait","setUnitTrait"],"notes":[{"user":"BrettMayson","date":"2023-11-27T02:54:00Z","text":"Local argument assumed, needs confirmation"}]},{"name":"getAmmoCargo","title":"getAmmoCargo","type":"command","url":"https://community.bistudio.com/wiki/getAmmoCargo","revid":370851,"updated":"2025-02-18T00:20:05Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"0.56"},"since":"arma3 0.56","arma3_since":"0.56","locality":{"argument":"global"},"description":"Returns the amount (1 is full) of ammo resources in the cargo space of a rearm vehicle.","syntaxes":[{"syntax":"getAmmoCargo vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"ammo cargo value between 0 (empty, destroyed or null Object) and 1 (full), -1 if ammo cargo is not supported\nbefore Arma 3 v1.96 -inf was be returned if vehicle did not support ammo cargo before Arma 3 v1.94 Nothing was be returned if vehicle was not alive","text":"Number - ammo cargo value between 0 (empty, destroyed or null Object) and 1 (full), -1 if ammo cargo is not supported\nbefore Arma 3 v1.96 -inf was be returned if *vehicle* did not support ammo cargo\nbefore Arma 3 v1.94 Nothing was be returned if *vehicle* was not alive"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["value = getAmmoCargo myVehicleName;"]}],"see_also":["setAmmoCargo","getFuelCargo","getRepairCargo"]},{"name":"getAnimAimPrecision","title":"getAnimAimPrecision","type":"command","url":"https://community.bistudio.com/wiki/getAnimAimPrecision","revid":321924,"updated":"2022-05-22T12:44:17Z","groups":["Animations","Stamina System"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","description":"Returns aim precision for current animation","syntaxes":[{"syntax":"getAnimAimPrecision unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _aimPrecision = getAnimAimPrecision player;"]}],"see_also":["Arma 3: Stamina"]},{"name":"getAnimationsQueue","title":"getAnimationsQueue","type":"command","url":"https://community.bistudio.com/wiki/getAnimationsQueue","revid":378279,"updated":"2026-03-31T10:03:56Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"global"},"description":"Returns the primary and secondary animations queue of the entity. The primary queue contains the full motion path from current animation (animationState) to a target animation, while the secondary queue contains animations that are queued to be played after the target animation in primaryQueue is reached, e.g. due to using playMove or playAction.","syntaxes":[{"syntax":"getAnimationsQueue entity","params":[{"name":"entity","type":"Object","description":"Man or animal object.","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"in format [primaryQueue, secondaryQueue] where each queue is an Array of Strings, the animation state names (all lower case)."},"form":"unary","right":{"text":"entity"}}],"examples":[{"text":"```sqf\ngetAnimationsQueue player params [\"_primaryQueue\", \"_secondaryQueue\"];\nif (_secondaryQueue isNotEqualTo []) then {\n    private _targetAnim = _primaryQueue param [count _primaryQueue - 1, animationState player];\n    private _nextAnim = _secondaryQueue#0;\n    systemChat format [\"Will play '%1' after completing '%2'\", _nextAnim, _targetAnim];\n};\n```","code":["getAnimationsQueue player params [\"_primaryQueue\", \"_secondaryQueue\"];\nif (_secondaryQueue isNotEqualTo []) then { \n    private _targetAnim = _primaryQueue param [count _primaryQueue - 1, animationState player];\n    private _nextAnim = _secondaryQueue#0;\n    systemChat format [\"Will play '%1' after completing '%2'\", _nextAnim, _targetAnim]; \n};"]},{"code":["player playMove _myMove; // push an animation state to the secondary queue\nplayer playAction \"WalkF\"; // an action that gets mapped to an animation state and pushed to queue\ngetAnimationsQueue player params [\"_primaryQueue\", \"_secondaryQueue\"];\n// _secondaryQueue will contain _myMove and the animation that the \"WalkF\" action maps to"]}],"see_also":["animationState","getUnitMovesInfo"]},{"name":"getAnimSpeedCoef","title":"getAnimSpeedCoef","type":"command","url":"https://community.bistudio.com/wiki/getAnimSpeedCoef","revid":321925,"updated":"2022-05-22T12:45:16Z","groups":["Animations","Stamina System"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","description":"Get coefficient for animation speed.","syntaxes":[{"syntax":"getAnimSpeedCoef unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["if (getAnimSpeedCoef player > 1) then { hint \"Speedy Gonzales!\" };"]}],"see_also":["Arma 3: Stamina","setAnimSpeedCoef"]},{"name":"getArray","title":"getArray","type":"command","url":"https://community.bistudio.com/wiki/getArray","revid":377159,"updated":"2026-01-01T10:40:02Z","groups":["Config"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Extract array from config entry.","syntaxes":[{"syntax":"getArray config","params":[{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Array of Anything","type_expr":"Array<Anything>"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["_array = getArray (configFile >> \"CfgVehicles\" >> \"Thing\" >> \"threat\");"]}],"see_also":["configFile","a / b","configName","count","getText","getNumber","inheritsFrom","isArray","isClass","isNumber","isText","select"],"notes":[{"user":"ffur2007slx2_5","date":"2014-03-28T07:52:00Z","text":"(Arma 3 1.14) It's recommended to use BIS_fnc_getCfgData or BIS_fnc_returnConfigEntry to get variable cfg data rather than conditioning via isNumber, isText, isArray, getNumber, getText and getArray combination.\nTraditional workaround:\n\n```sqf\n_cfg = configFile >> \"CfgVehicles\" >> _SomeAddonClassName >> \"DestructionEffects\" >> \"Smoke1\" >> \"type\";\nswitch ( true ) do\n{\n    case (isNumber _cfg): {getNumber _cfg};\n    case (isText _cfg): {getText _cfg};\n    case (isArray _cfg): {getArray _cfg;};\n    default { nil };\n};\n```\n\n**Recommended workaround:**\n\n```sqf\n(configFile >> \"CfgVehicles\" >> _SomeAddonClassName >> \"DestructionEffects\" >> \"Smoke1\" >> \"type\") call BIS_fnc_getCfgData;\n```\n\nTo return default value once entry was not found, we can use BIS_fnc_returnConfigEntry instead of BIS_fnc_getCfgData.\n\n```sqf\n[(configFile >> \"CannonFire\" >> \"LightExp\"),\"lifeTime\",0] call BIS_fnc_returnConfigEntry; // 0.5\n```"},{"user":"demellion","date":"2018-01-12T19:48:00Z","text":"There is special behaviour if you try to read a description.ext config entry Array that contains a Boolean.\nGetting array in **MP** will result in Number, while **SP** will return String.\n\n```sqf\n// SP with false in array\ngetArray (missionConfigFile >> \"someClass\" >> \"someArray\") // -> \"false\"\n\n// MP with false in array\ngetArray (missionConfigFile >> \"someClass\" >> \"someArray\") // -> 0\n```"}]},{"name":"getArtilleryAmmo","title":"getArtilleryAmmo","type":"command","url":"https://community.bistudio.com/wiki/getArtilleryAmmo","revid":369189,"updated":"2024-09-03T10:34:46Z","groups":["Artillery"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Get list of all available magazines of artillery units on the list. Command returns only unique magazine types and doesn't contain any information about which unit has which magazine.","syntaxes":[{"syntax":"getArtilleryAmmo artilleryList","params":[{"name":"artilleryList","type":"Array of Objects","type_expr":"Array<Object>"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"artilleryList"}}],"examples":[{"text":"```sqf\nif (\"8Rnd_82mm_Mo_Flare_white\" in getArtilleryAmmo [\n    _mortar1,\n    _mortar2,\n    _mortar3,\n    _mortar4\n]) then\n{\n    hint \"Sir, we have white flares, Sir!\";\n};\n```","code":["if (\"8Rnd_82mm_Mo_Flare_white\" in getArtilleryAmmo [\n\t_mortar1,\n\t_mortar2,\n\t_mortar3, \n\t_mortar4\n]) then\n{\n\thint \"Sir, we have white flares, Sir!\";\n};"]}],"see_also":["getArtilleryETA","commandArtilleryFire","doArtilleryFire","enableEngineArtillery","getArtilleryComputerSettings","shownArtilleryComputer","inRangeOfArtillery"]},{"name":"getArtilleryComputerSettings","title":"getArtilleryComputerSettings","type":"command","url":"https://community.bistudio.com/wiki/getArtilleryComputerSettings","revid":377650,"updated":"2026-01-02T09:01:56Z","groups":["Artillery"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns settings from current vehicle weapon manned by player.","syntaxes":[{"syntax":"getArtilleryComputerSettings","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [fireMode, ammo, zero]\n- fireMode: String - fire mode's display name - ammo: String - used ammo display name (not class name) - zero: Number - always 0","text":"Array with [fireMode, ammo, zero]\n\n- fireMode: String - fire mode's display name\n- ammo: String - used ammo display name (**not** class name)\n- zero: Number - always 0"},"form":"nullary"}],"examples":[{"code":["hint str getArtilleryComputerSettings; // [\"Semi (medium)\", \"HE Mortar Shells\", 0]"]}],"see_also":["shownArtilleryComputer","enableEngineArtillery","commandArtilleryFire","doArtilleryFire","getArtilleryETA","inRangeOfArtillery","getArtilleryAmmo"]},{"name":"getArtilleryETA","title":"getArtilleryETA","type":"command","url":"https://community.bistudio.com/wiki/getArtilleryETA","revid":377528,"updated":"2026-01-02T06:52:51Z","groups":["Artillery"],"status":"ok","games":{"arma3":"0.56"},"since":"arma3 0.56","arma3_since":"0.56","locality":{"argument":"global"},"description":"Returns ETA to the target in seconds for given artillery unit based on target position and used magazine, -1 if target can't be hit.","syntaxes":[{"syntax":"unit getArtilleryETA [targetPosition, magazineType]","params":[{"name":"unit","type":"Object","description":"artillery unit","type_expr":"Object"},{"name":"targetPosition","type":"PositionAGLS","description":"position of the target","type_expr":"PositionAGLS"},{"name":"magazineType","type":"String","description":"type of magazine used","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"unit"},"right":{"text":"[targetPosition, magazineType]"}}],"examples":[{"code":["_mortar getArtilleryETA [getPos _target, getArtilleryAmmo [_mortar] select 0];"]},{"code":["_mortar getArtilleryETA [position _target, currentMagazine _mortar];"]}],"see_also":["getArtilleryAmmo","commandArtilleryFire","doArtilleryFire","enableEngineArtillery","getArtilleryComputerSettings","shownArtilleryComputer","inRangeOfArtillery"],"notes":[{"user":"Killzone_Kid","date":"2013-08-26T01:00:00Z","text":"To avoid wrong ETA readings, position of the target should only be obtained via position or getPos"}]},{"name":"getAssetDLCInfo","title":"getAssetDLCInfo","type":"command","url":"https://community.bistudio.com/wiki/getAssetDLCInfo","revid":379195,"updated":"2026-10-26T11:24:51Z","groups":["DLC"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns DLC information about given object or model. The alt syntax quieries config and finds config defined model.","syntaxes":[{"syntax":"getAssetDLCInfo asset","params":[{"name":"asset","type":"Object or String","description":"object reference or path to the model","type_expr":"Object | String"}],"returns":{"type":"Array","type_expr":"Array","description":"with [isDlc, isOwned, isInstalled, isAvailable, appID, DLCName]\n- isDlc: Boolean - the asset belongs to a DLC - isOwned: Boolean - isInstalled: Boolean - isAvailable: Boolean - appID: String - actual steam item ID or \"0\" for none or \"-1\" for unknown - DLCName: String - actual DLC name or \"\"","text":"Array with [isDlc, isOwned, isInstalled, isAvailable, appID, DLCName]\n\n- isDlc: Boolean - the asset belongs to a DLC\n- isOwned: Boolean\n- isInstalled: Boolean\n- isAvailable: Boolean\n- appID: String - actual steam item ID or \"0\" for none or \"-1\" for unknown\n- DLCName: String - actual DLC name or \"\""},"form":"unary","right":{"text":"asset"}},{"syntax":"getAssetDLCInfo [class, config]","params":[{"name":"class","type":"String","description":"class name of the asset","type_expr":"String"},{"name":"config","type":"Config","optional":true,"default":"`configFile >> \"CfgVehicles\"`","description":"config in which to search","type_expr":"Config","text":"config: Config - (Optional, default `configFile >> \"CfgVehicles\"`) config in which to search"}],"returns":{"type":"Array","type_expr":"Array","description":"with [isDlc, isOwned, isInstalled, isAvailable, appID, DLCName]\n- isDlc: Boolean - the asset belongs to a DLC - isOwned: Boolean - isInstalled: Boolean - isAvailable: Boolean - appID: String - actual steam item ID or \"0\" for none or \"-1\" for unknown - DLCName: String - actual DLC name or \"\"","text":"Array with [isDlc, isOwned, isInstalled, isAvailable, appID, DLCName]\n\n- isDlc: Boolean - the asset belongs to a DLC\n- isOwned: Boolean\n- isInstalled: Boolean\n- isAvailable: Boolean\n- appID: String - actual steam item ID or \"0\" for none or \"-1\" for unknown\n- DLCName: String - actual DLC name or \"\""},"form":"unary","right":{"text":"[class, config]"}}],"examples":[{"code":["getAssetDLCInfo player;"]},{"code":["getAssetDLCInfo \"a3\\Weapons_F_Enoch\\Rifles\\MSBS\\MSBS65_F\";"]},{"code":["getAssetDLCInfo [\"C_Van_01_transport_F\"];"]},{"code":["getAssetDLCInfo [\"arifle_AK12_F\", configFile >> \"CfgWeapons\"];"]}],"see_also":["getDLCs","getObjectDLC","getPersonUsedDLCs","getMissionDLCs","getDLCAssetsUsageByName","getDLCAssetsUsage"]},{"name":"getAssignedCuratorLogic","title":"getAssignedCuratorLogic","type":"command","url":"https://community.bistudio.com/wiki/getAssignedCuratorLogic","revid":379343,"updated":"2026-10-30T23:53:54Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"argument":"global"},"description":"Returns curator logic to which given player has access.","syntaxes":[{"syntax":"getAssignedCuratorLogic player","params":[{"name":"player","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"player"}}],"examples":[{"code":["(getAssignedCuratorLogic player) removeCuratorEditableObjects [allDead, true];"]}],"see_also":["allCurators","getAssignedCuratorUnit"],"notes":[{"user":"SilentSpike","date":"2014-08-17T17:04:00Z","text":"This command will return objNull if used immediately after the curator logic is assigned to the unit in question (this includes at mission time 0). To avoid problems use the following beforehand:\n\n```sqf\nwaitUntil {!isNull (getAssignedCuratorLogic unit)};\n```"}]},{"name":"getAssignedCuratorUnit","title":"getAssignedCuratorUnit","type":"command","url":"https://community.bistudio.com/wiki/getAssignedCuratorUnit","revid":379344,"updated":"2026-10-30T23:54:02Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns unit assigned to curator logic.","syntaxes":[{"syntax":"getAssignedCuratorUnit curatorObj","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"curatorObj"}}],"examples":[{"code":["_curatorUnit = getAssignedCuratorUnit (allCurators select 0);\n_curatorUnit joinAs [createGroup civilian, 0];"]}],"see_also":["getAssignedCuratorLogic"],"notes":[{"user":"SilentSpike","date":"2014-08-17T17:06:00Z","text":"This command will return objNull if used immediately after the curator unit is assigned to the logic in question (this includes at mission time 0). To avoid problems use the following beforehand:\n\n```sqf\nwaitUntil {!isNull (getAssignedCuratorUnit logic)};\n```"}]},{"name":"getAttackTarget","title":"getAttackTarget","type":"command","url":"https://community.bistudio.com/wiki/getAttackTarget","revid":309248,"updated":"2022-05-04T10:46:28Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns the target given unit is engaging.","syntaxes":[{"syntax":"getAttackTarget unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _unitsTarget = getAttackTarget _unit;"]}],"see_also":["assignedTarget"]},{"name":"getAudioOptionVolumes","title":"getAudioOptionVolumes","type":"command","url":"https://community.bistudio.com/wiki/getAudioOptionVolumes","revid":377864,"updated":"2026-01-04T11:30:15Z","groups":["Sounds"],"status":"ok","games":{"arma3":"1.94"},"since":"arma3 1.94","arma3_since":"1.94","description":"Returns profile audio volumes.","syntaxes":[{"syntax":"getAudioOptionVolumes","params":[],"returns":{"type":"Array","type_expr":"Array","description":"[effects, music, radio, von, UI, map]\n- effects: Number - fx volume factor - music: Number - music volume factor - radio: Number - speech volume factor - von: Number - Voice over Network (VoN) volume factor - Arma 3 v2.10 UI: Number - UI volume factor - Arma 3 v2.12 map: Number - map volume factor","text":"Array - [effects, music, radio, von, UI, map]\n\n- effects: Number - fx volume factor\n- music: Number - music volume factor\n- radio: Number - speech volume factor\n- von: Number - Voice over Network (VoN) volume factor\n- Arma 3 v2.10 UI: Number - UI volume factor\n- Arma 3 v2.12 map: Number - map volume factor"},"form":"nullary"}],"examples":[{"code":["getAudioOptionVolumes params [\"_effects\", \"_music\", \"_radio\", \"_von\", \"_ui\", \"_map\"];"]}],"see_also":["getSubtitleOptions","soundVolume","musicVolume","radioVolume","setPlayerVoNVolume","getPlayerVoNVolume"]},{"name":"getBackpackCargo","title":"getBackpackCargo","type":"command","url":"https://community.bistudio.com/wiki/getBackpackCargo","revid":378356,"updated":"2026-04-02T16:38:51Z","groups":["Containers"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","description":"Returns all backpack types and count from the cargo space.","syntaxes":[{"syntax":"getBackpackCargo object","params":[{"name":"object","type":"Object","description":"object to check","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [classes, counts]\n- classes: Array of Strings - Backpack class names - counts: Array of Numbers - Backpack counts","text":"Array with [classes, counts]\n\n- classes: Array of Strings - Backpack class names\n- counts: Array of Numbers - Backpack counts"},"form":"unary","right":{"text":"object"}}],"examples":[{"text":"```sqf\ngetBackpackCargo cursorTarget;\n/*\n    returns e.g\n    [\n        [\"5BackpackA\", \"10BackpackB\"]\n        [5, 10]\n    ]\n*/\n```","code":["getBackpackCargo cursorTarget;\n/*\n\treturns e.g\n\t[\n        [\"5BackpackA\", \"10BackpackB\"]\n        [5, 10]\n\t]\n*/"]},{"code":["_content = getBackpackCargo carName;"]},{"code":["_content = getBackpackCargo ammoBoxName;"]}],"see_also":["backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack"]},{"name":"getBleedingRemaining","title":"getBleedingRemaining","type":"command","url":"https://community.bistudio.com/wiki/getBleedingRemaining","revid":320933,"updated":"2022-05-13T10:04:40Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns how many seconds injured unit will continue leaving blood trail. If unit damage is < 0.1, the return value is 0 and unit doesn't leave any blood trail. Use setBleedingRemaining to set different remaining time.","syntaxes":[{"syntax":"getBleedingRemaining unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_bleedingRemaining = getBleedingRemaining _unit;"]}],"see_also":["isBurning","setBleedingRemaining","isBleeding"]},{"name":"getBoneNames","title":"getBoneNames","type":"command","url":"https://community.bistudio.com/wiki/getBoneNames","revid":369763,"updated":"2024-10-08T15:08:57Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns an array of bone names and their parents.","syntaxes":[{"syntax":"getBoneNames object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"bone names and bone parents in separate arrays, in format: [[bone1, bone2,...], [parent1, parent2, ....]]"},"form":"unary","right":{"text":"object"}}],"see_also":["selectionPosition","selectionNames","getSelectionBones"]},{"name":"getBurningValue","title":"getBurningValue","type":"command","url":"https://community.bistudio.com/wiki/getBurningValue","revid":319274,"updated":"2022-05-13T09:23:29Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns how much the unit is exposed to fire damage.","syntaxes":[{"syntax":"getBurningValue unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _fireDamage = getBurningValue player;"]}],"see_also":["inflame","inflamed","damage"]},{"name":"getCalculatePlayerVisibilityByFriendly","title":"getCalculatePlayerVisibilityByFriendly","type":"command","url":"https://community.bistudio.com/wiki/getCalculatePlayerVisibilityByFriendly","revid":309211,"updated":"2022-05-03T22:25:32Z","groups":["System"],"status":"ok","games":{"arma3":"1.84"},"since":"arma3 1.84","arma3_since":"1.84","description":"Returns true if visibility of player by friendly units is calculated.","syntaxes":[{"syntax":"getCalculatePlayerVisibilityByFriendly","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if visibility is calculated, false if not"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (!getCalculatePlayerVisibilityByFriendly) then\n{\n    calculatePlayerVisibilityByFriendly true;\n};\n```","code":["if (!getCalculatePlayerVisibilityByFriendly) then\n{\n\tcalculatePlayerVisibilityByFriendly true;\n};"]}],"see_also":["calculatePlayerVisibilityByFriendly","knowsAbout"]},{"name":"getCameraViewDirection","title":"getCameraViewDirection","type":"command","url":"https://community.bistudio.com/wiki/getCameraViewDirection","revid":349460,"updated":"2023-11-08T16:48:37Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","locality":{"argument":"global"},"description":"Returns the direction unit is looking in render time scope. While for AI the origin for the view direction vector can be taken from `eyePos unit`, for human player the origin should be taken from player camera position `positionCameraToWorld [0,0,0]`","syntaxes":[{"syntax":"getCameraViewDirection unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"3D Vector"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"Draw AI eye direction (green), weapon direction (red) and camera direction (blue) in 3D:\n\n```sqf\nBob = createGroup east createUnit [\"O_Soldier_F\", [0,0,0], [], 0, \"NONE\"];\nBob setVehiclePosition [player modelToWorld [0,100,0], [], 0, \"NONE\"];\nonEachFrame {\n    _beg = ASLToAGL eyePos Bob;\n    _endE = (_beg vectorAdd (eyeDirection Bob vectorMultiply 100));\n    drawLine3D [_beg, _endE, [0,1,0,1]];\n    _endW = (_beg vectorAdd (Bob weaponDirection currentWeapon Bob vectorMultiply 100));\n    drawLine3D [_beg, _endW, [1,0,0,1]];\n    _endV = (_beg vectorAdd (getCameraViewDirection Bob vectorMultiply 100));\n    drawLine3D [_beg, _endV, [0,0,1,1]];\n};\n```","code":["Bob = createGroup east createUnit [\"O_Soldier_F\", [0,0,0], [], 0, \"NONE\"];\nBob setVehiclePosition [player modelToWorld [0,100,0], [], 0, \"NONE\"];\nonEachFrame {\n\t_beg = ASLToAGL eyePos Bob;\n\t_endE = (_beg vectorAdd (eyeDirection Bob vectorMultiply 100));\n\tdrawLine3D [_beg, _endE, [0,1,0,1]];\n\t_endW = (_beg vectorAdd (Bob weaponDirection currentWeapon Bob vectorMultiply 100));\n\tdrawLine3D [_beg, _endW, [1,0,0,1]];\n\t_endV = (_beg vectorAdd (getCameraViewDirection Bob vectorMultiply 100));\n\tdrawLine3D [_beg, _endV, [0,0,1,1]];\n};"]}],"see_also":["positionCameraToWorld","weaponDirection","eyeDirection","vectorDir","vectorDirVisual"]},{"name":"getCargoIndex","title":"getCargoIndex","type":"command","url":"https://community.bistudio.com/wiki/getCargoIndex","revid":369168,"updated":"2024-09-03T10:34:42Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","locality":{"argument":"global"},"description":"Returns index of the unit in cargo. -1 if not in cargo.","syntaxes":[{"syntax":"vehicle getCargoIndex unit","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"unit"}}],"examples":[{"code":["player moveInCargo heli;\nhint str (heli getCargoIndex player);"]}],"see_also":["moveInCargo","assignAsCargoIndex","emptyPositions"]},{"name":"getCenterOfMass","title":"getCenterOfMass","type":"command","url":"https://community.bistudio.com/wiki/getCenterOfMass","revid":377796,"updated":"2026-01-03T03:53:42Z","groups":["PhysX"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","locality":{"argument":"global"},"description":"Returns center of mass of an object.","syntaxes":[{"syntax":"getCenterOfMass object","params":[{"name":"object","type":"Object","description":"PhysX object","type_expr":"Object"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative","description":"relative to the model centre"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_com = getCenterOfMass _myCar;"]}],"see_also":["getMass","setCenterOfMass","setMass","addTorque","addForce"]},{"name":"getClientState","title":"getClientState","type":"command","url":"https://community.bistudio.com/wiki/getClientState","revid":348401,"updated":"2023-11-08T13:00:04Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.08"},"since":"arma3 1.08","arma3_since":"1.08","description":"Returns client state in network game. Works on both, client and dedicated server. The following states are possible:\n\n| getClientStateNumber | getClientState | Description |\n|---|---|---|\n| 0 | \"NONE\" | No client (or singleplayer) |\n| 1 | \"CREATED\" | Client is created |\n| 2 | \"CONNECTED\" | Client is connected to server, message formats are registered |\n| 3 | \"LOGGED IN\" | Identity is created |\n| 4 | \"MISSION SELECTED\" | Mission is selected |\n| 5 | \"MISSION ASKED\" | Server was asked to send / not send mission |\n| 6 | \"ROLE ASSIGNED\" | Role was assigned (and confirmed) |\n| 7 | \"MISSION RECEIVED\" | Mission received |\n| 8 | \"GAME LOADED\" | Island loaded, vehicles received |\n| 9 | \"BRIEFING SHOWN\" | Briefing was displayed |\n| 10 | \"BRIEFING READ\" | Ready to play mission |\n| 11 | \"GAME FINISHED\" | Game was finished |\n| 12 | \"DEBRIEFING READ\" | Debriefing read, ready to continue with next mission |","syntaxes":[{"syntax":"getClientState","params":[],"returns":{"type":"String","type_expr":"String","description":"client state (see table above)"},"form":"nullary"}],"examples":[{"code":["_state = getClientState;"]},{"code":["if (getClientState == \"BRIEFING READ\") then { hint \"Let the show begin!\" };"]}],"see_also":["getClientStateNumber","getPlayerUID"]},{"name":"getClientStateNumber","title":"getClientStateNumber","type":"command","url":"https://community.bistudio.com/wiki/getClientStateNumber","revid":348456,"updated":"2023-11-08T13:00:18Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns client state in network game. Works on both, client and dedicated server. The following states are possible:\n\n| getClientStateNumber | getClientState | Description |\n|---|---|---|\n| 0 | \"NONE\" | No client (or singleplayer) |\n| 1 | \"CREATED\" | Client is created |\n| 2 | \"CONNECTED\" | Client is connected to server, message formats are registered |\n| 3 | \"LOGGED IN\" | Identity is created |\n| 4 | \"MISSION SELECTED\" | Mission is selected |\n| 5 | \"MISSION ASKED\" | Server was asked to send / not send mission |\n| 6 | \"ROLE ASSIGNED\" | Role was assigned (and confirmed) |\n| 7 | \"MISSION RECEIVED\" | Mission received |\n| 8 | \"GAME LOADED\" | Island loaded, vehicles received |\n| 9 | \"BRIEFING SHOWN\" | Briefing was displayed |\n| 10 | \"BRIEFING READ\" | Ready to play mission |\n| 11 | \"GAME FINISHED\" | Game was finished |\n| 12 | \"DEBRIEFING READ\" | Debriefing read, ready to continue with next mission |","syntaxes":[{"syntax":"getClientStateNumber","params":[],"returns":{"type":"Number","type_expr":"Number","description":"client state (see table above)"},"form":"nullary"}],"examples":[{"code":["_state = getClientStateNumber;"]},{"code":["_inGame = getClientStateNumber > 8;"]}],"see_also":["getClientState","getPlayerUID"]},{"name":"getCompatiblePylonMagazines","title":"getCompatiblePylonMagazines","type":"command","url":"https://community.bistudio.com/wiki/getCompatiblePylonMagazines","revid":310717,"updated":"2022-05-07T19:43:40Z","groups":["Vehicle Loadouts"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Get array of compatible pylon magazines","syntaxes":[{"syntax":"vehicle getCompatiblePylonMagazines pylon","params":[{"name":"vehicle","type":"Object or String","description":"aircraft object or config class","type_expr":"Object | String"},{"name":"pylon","type":"Number or String","description":"Number or String\n\n- If String - pylon class name from `TransportPylonsComponent >> pylons` class\n- If Number - pylon ID\n- If an invalid pylon ID or class name is provided, such as 0 or \"\", all compatible magazines from all pylons are returned.","type_expr":"Number | String","text":"pylon: Number or String\n\n- If String - pylon class name from `TransportPylonsComponent >> pylons` class\n- If Number - pylon ID\n- If an invalid pylon ID or class name is provided, such as 0 or \"\", all compatible magazines from all pylons are returned."}],"returns":{"type":"Array of Strings, or Array of Array of Strings","type_expr":"Array<String> | Array<Array<String>>"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"pylon"}}],"examples":[{"code":["// returns array of arrays containing all compatible magazines\nvehicle player getCompatiblePylonMagazines 0;"]},{"code":["// returns array of compatible magazines for the 3rd pylon if it exists; otherwise returns array of arrays (see above)\njet1 getCompatiblePylonMagazines 3;"]},{"code":["// returns array of compatible magazines for \"pylon1\" class, defined in\n// configFile >> \"CfgVehicles\" >> \"B_Plane_CAS_01_dynamicLoadout_F\" >> \"Components\" >> \"TransportPylonsComponent\" >> \"Pylons\"\n\"B_Plane_CAS_01_dynamicLoadout_F\" getCompatiblePylonMagazines \"pylon1\";"]}],"see_also":["Arma 3: Vehicle Loadouts","getPylonMagazines","setAmmoOnPylon","ammoOnPylon","animatePylon","animateBay","setPylonsPriority","setPylonLoadout"]},{"name":"getConnectedUAV","title":"getConnectedUAV","type":"command","url":"https://community.bistudio.com/wiki/getConnectedUAV","revid":363203,"updated":"2024-03-25T20:22:07Z","groups":["Remote Control"],"status":"ok","games":{"arma3":"0.76"},"since":"arma3 0.76","arma3_since":"0.76","locality":{"argument":"local"},"description":"Returns UAV/UGV vehicle if person has connection to some UAV. To return the AI unit which player controls, see getConnectedUAVUnit.","syntaxes":[{"syntax":"getConnectedUAV person","params":[{"name":"person","type":"Object","description":"player controlling UAV/UGV","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"the UAV/UGV object or objNull if no UAV is connected or if the connected unit is remote."},"form":"unary","right":{"text":"person"}}],"examples":[{"code":["getConnectedUAV player;"]}],"see_also":["getConnectedUAVUnit","showUAVFeed","shownUAVFeed","allUnitsUAV","UAVControl","connectTerminalToUAV","isUAVConnected"]},{"name":"getConnectedUAVUnit","title":"getConnectedUAVUnit","type":"command","url":"https://community.bistudio.com/wiki/getConnectedUAVUnit","revid":363204,"updated":"2024-03-25T20:23:08Z","groups":["Remote Control"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"argument":"local"},"description":"Returns UAV/UGV AI unit, which player is controlling. To return UAV vehicle, see getConnectedUAV","syntaxes":[{"syntax":"getConnectedUAVUnit person","params":[{"name":"person","type":"Object","description":"unit controlling the UAV/UGV","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"UAV unit (AI driver or AI gunner) or objNull otherwise including if the connected person is remote"},"form":"unary","right":{"text":"person"}}],"examples":[{"code":["private _playersDrone = getConnectedUAVUnit player;"]}],"see_also":["getConnectedUAV","isUAVConnected"]},{"name":"getContainerMaxLoad","title":"getContainerMaxLoad","type":"command","url":"https://community.bistudio.com/wiki/getContainerMaxLoad","revid":376219,"updated":"2025-09-19T07:31:28Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Returns max load value of given uniform, vest or backpack container. For other types of containers, use maxLoad command","syntaxes":[{"syntax":"getContainerMaxLoad containerClass","params":[{"name":"containerClass","type":"String","description":"uniform, vest or backpack class","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"load value, -1 if not available."},"form":"unary","right":{"text":"containerClass"}}],"examples":[{"text":"```sqf\nprivate _maxLoadUniform        = getContainerMaxLoad uniform player;\nprivate _maxLoadVest        = getContainerMaxLoad vest player;\nprivate _maxLoadBackpack    = getContainerMaxLoad backpack player;\n```","code":["private _maxLoadUniform\t\t= getContainerMaxLoad uniform player;\nprivate _maxLoadVest\t\t= getContainerMaxLoad vest player;\nprivate _maxLoadBackpack\t= getContainerMaxLoad backpack player;"]}],"see_also":["load","loadAbs","loadUniform","loadBackpack","loadVest","getMass","weightRTD"]},{"name":"getCorpse","title":"getCorpse","type":"command","url":"https://community.bistudio.com/wiki/getCorpse","revid":352960,"updated":"2024-03-07T14:49:08Z","groups":["Unit Inventory","Object Manipulation"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Returns the corpse associated with given weaponholder. When unit is killed and had a weapon, the weapon is placed inside \"WeaponHolderSimulated\" and dropped together with the unit. This command returns the dead body associated with this weaponholder.","syntaxes":[{"syntax":"getCorpse weaponholder","params":[{"name":"weaponholder","type":"Object","description":"weaponholder dropped by the dead unit","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"dead unit"},"form":"unary","right":{"text":"weaponholder"}}],"examples":[{"code":["systemChat str getCorpse cursorObject;"]}],"see_also":["getCorpseWeaponholders","nearSupplies","allDeadMen"]},{"name":"getCorpseWeaponholders","title":"getCorpseWeaponholders","type":"command","url":"https://community.bistudio.com/wiki/getCorpseWeaponholders","revid":369742,"updated":"2024-10-08T15:06:00Z","groups":["Unit Inventory","Object Manipulation"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns primary and secondary weapon holders of a dead unit. If a unit had weapons at the moment of death, primary weapon is dropped into primary weaponholder and secondary weapon is dropped into secondary.","syntaxes":[{"syntax":"getCorpseWeaponholders corpse","params":[{"name":"corpse","type":"Object","description":"dead unit","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"in format [primaryWeaponHolder, secondaryWeaponHolder]","text":"Array of Objects in format [primaryWeaponHolder, secondaryWeaponHolder]"},"form":"unary","right":{"text":"corpse"}}],"examples":[{"code":["systemChat str getCorpseWeaponholders cursorObject;"]}],"see_also":["getCorpse","nearSupplies","allDeadMen"]},{"name":"getCruiseControl","title":"getCruiseControl","type":"command","url":"https://community.bistudio.com/wiki/getCruiseControl","revid":377878,"updated":"2026-01-04T15:56:01Z","groups":["Unit Control","Object Manipulation"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"argument":"local","effect":"local"},"description":"Returns cruise control settings set with setCruiseControl command.","syntaxes":[{"syntax":"getCruiseControl vehicle","params":[{"name":"vehicle","type":"Object","description":"the vehicle","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [speedLimit, cruiseControlActive]\n- speedLimit: Number - defined speed limit - cruiseControlActive: Boolean - true if cruise control is enabled, false if only speed was limited","text":"Array with [speedLimit, cruiseControlActive]\n\n- speedLimit: Number - defined speed limit\n- cruiseControlActive: Boolean - true if cruise control is enabled, false if only speed was limited"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["getCruiseControl vehicle player params [\"_speedLimit\", \"_cruiseControlActive\"];"]}],"see_also":["setCruiseControl","limitSpeed","forceSpeed","setAirplaneThrottle"]},{"name":"getCursorObjectParams","title":"getCursorObjectParams","type":"command","url":"https://community.bistudio.com/wiki/getCursorObjectParams","revid":364830,"updated":"2024-06-16T09:59:43Z","groups":["Object Detection"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Returns object and named selections under cursor and distance to object's surface (to the point cursor points at). If object surface is further away than 50 meters, selections are always an empty array and distance is 1e10 (10^10).","syntaxes":[{"syntax":"getCursorObjectParams","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [cursorObject, selections, distance]\n- cursorObject: Object - selections: Array of Strings - distance: Number - distance to object's surface (to the point cursor points at)","text":"Array with [cursorObject, selections, distance]\n\n- cursorObject: Object\n- selections: Array of Strings\n- distance: Number - distance to object's surface (to the point cursor points at)"},"form":"nullary"}],"examples":[{"code":["hint str getCursorObjectParams;"]}],"see_also":["cursorObject","cursorTarget"]},{"name":"getCustomAimCoef","title":"getCustomAimCoef","type":"command","url":"https://community.bistudio.com/wiki/getCustomAimCoef","revid":338293,"updated":"2023-02-26T18:30:34Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","locality":{"argument":"global"},"description":"Returns aimPrecision from animation state with custom value that will directly affects weapon sway size and speed.","syntaxes":[{"syntax":"getCustomAimCoef unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_coef = getCustomAimCoef player;"]}],"see_also":["Arma 3: Stamina","setCustomAimCoef"]},{"name":"getCustomSoundController","title":"getCustomSoundController","type":"command","url":"https://community.bistudio.com/wiki/getCustomSoundController","revid":364165,"updated":"2024-05-05T10:46:42Z","groups":["Sounds"],"status":"ok","games":{"arma3":"1.86"},"since":"arma3 1.86","arma3_since":"1.86","description":"Returns current value set to the controller (see setCustomSoundController).","syntaxes":[{"syntax":"getCustomSoundController [vehicle, controller]","params":[{"name":"vehicle","type":"Object","description":"a transport type vehicle. Does not work on characters or buildings","type_expr":"Object"},{"name":"controller","type":"String","description":"name of custom sound controller - needs to be full string e.g \"CustomSoundController1\". It goes from \"CustomSoundController1\" to \"CustomSoundController32\"","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"[vehicle, controller]"}}],"examples":[{"code":["getCustomSoundController [vehicle player, \"CustomSoundController1\"];"]},{"text":"```sqf\nprivate _allCustomSoundControllers = [];\nfor \"_i\" from 1 to (getCustomSoundControllerCount vehicle player) do\n{\n    _allCustomSoundControllers pushBack getCustomSoundController [vehicle player, format [\"CustomSoundController%1\", _i]];\n};\n```","code":["private _allCustomSoundControllers = [];\nfor \"_i\" from 1 to (getCustomSoundControllerCount vehicle player) do\n{\n\t_allCustomSoundControllers pushBack getCustomSoundController [vehicle player, format [\"CustomSoundController%1\", _i]];\n};"]}],"see_also":["Arma 3: Sound","setCustomSoundController","getCustomSoundControllerCount","getSoundController","getSoundControllerResult","getAllSoundControllers","getEnvSoundController","getAllEnvSoundControllers"]},{"name":"getCustomSoundControllerCount","title":"getCustomSoundControllerCount","type":"command","url":"https://community.bistudio.com/wiki/getCustomSoundControllerCount","revid":309206,"updated":"2022-05-03T18:49:18Z","groups":["Sounds"],"status":"ok","games":{"arma3":"1.86"},"since":"arma3 1.86","arma3_since":"1.86","description":"Returns current number of custom sound controllers supported by the engine for the given vehicle (currently 32)","syntaxes":[{"syntax":"getCustomSoundControllerCount vehicle","params":[{"name":"vehicle","type":"Object","description":"a transport type vehicle. Does not work on characters or buildings","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"number of custom controllers"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["getCustomSoundControllerCount vehicle player;"]}],"see_also":["Arma 3: Sound","setCustomSoundController","getCustomSoundController","getSoundController","getSoundControllerResult","getAllSoundControllers","getEnvSoundController","getAllEnvSoundControllers"]},{"name":"getDammage","title":"getDammage","type":"command","url":"https://community.bistudio.com/wiki/getDammage","revid":376971,"updated":"2026-01-01T06:02:13Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the object damage.","syntaxes":[{"syntax":"getDammage object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"in range 0..1","text":"Number in range 0..1"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["private _damage = getDammage player;"]}],"aliases":["damage"],"see_also":["damage","setDamage","setDammage","setHit","getHit","getHitIndex","setHitIndex","getHitPointDamage","setHitPointDamage"],"notes":[{"user":"Demonized","date":"2011-05-09","text":"getDammage and damage work fine when used on damaged vehicles after a repair from a repair truck when used in Arma 2: Operation Arrowhead patch 1.59."},{"user":"Ceeeb","date":"2007-01-31","text":"In **Operation Flashpoint 1.96**, it is possible for a unit to be dead and still return a getDammage value well below 1. Use !alive to check if a unit is dead."},{"user":"UNN","date":"2006-08-13","text":"**In Operation Flashpoint** vehicles repaired in game with the Repair trucks e.t.c never get completely repaired. After being repaired, rather than returning 0 when the damage command is called. They return a value equal to or less than 0.09.\n\nConsequently any vehicle flagged as immobile (as indicated by the canMove command), remains so. At least as far as the AI are concerned. The AI will refuse to board an immobile vehicle or eject straight after boarding. Players remain unaffected and can drive the vehicle as normal. To circumvent this, use setDamage 0 on the vehicle in question, to allow the AI to board."}]},{"name":"getDebriefingText","title":"getDebriefingText","type":"command","url":"https://community.bistudio.com/wiki/getDebriefingText","revid":377320,"updated":"2026-01-02T06:38:51Z","groups":["Briefing"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"A getter for setDebriefingText.","syntaxes":[{"syntax":"getDebriefingText end","params":[{"name":"end","type":"String","description":"end type","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"format:\n- [text, title] if old syntax of setDebriefingText was used) - [text, title, subtitle, picture, background] if setDebriefingText's alternative syntax was used - empty array if setDebriefingText was not used","text":"Array format:\n\n- [text, title] if old syntax of setDebriefingText was used)\n- [text, title, subtitle, picture, background] if setDebriefingText's alternative syntax was used\n- empty array if setDebriefingText was not used"},"form":"unary","right":{"text":"end"}}],"examples":[{"code":["private _debriefingTextDeath = getDebriefingText \"endDeath\";"]}],"see_also":["setDebriefingText","disableDebriefingStats","enableDebriefingStats","endMission","failMission","missionEnd"]},{"name":"getDescription","title":"getDescription","type":"command","url":"https://community.bistudio.com/wiki/getDescription","revid":340864,"updated":"2023-05-12T17:13:00Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns the string representation of unit as an four slots array.","syntaxes":[{"syntax":"getDescription unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"format `[unitClass, uniformName, vestName, backpackClass]`","text":"Array of Strings format `[unitClass, uniformName, vestName, backpackClass]`"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["getDescription player; // UAV Operator\n// returns [\"B_soldier_UAV_F\", \"Combat Fatigues (MTP)\", \"Carrier Special Rig (Green)\", \"B_UAV_01_backpack_F\"]"]},{"code":["getDescription objNull; // returns [\"ERROR\", \"ERROR\", \"ERROR\", \"ERROR\"]"]}],"see_also":["roleDescription","vehicleVarName"],"notes":[{"user":"Druid","date":"2013-03-19T15:54:00Z","text":"Return value fixed in revision 0.51.103185."}]},{"name":"getDir","title":"getDir","type":"command","url":"https://community.bistudio.com/wiki/getDir","revid":364132,"updated":"2024-05-04T22:14:16Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the object heading in the range 0..360.\n\n> [!NOTE]\n> **Arma 3:** The alternative syntax gets heading from one object or position to another object or position, and should be used instead of BIS_fnc_dirTo.","syntaxes":[{"syntax":"getDir object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"object"}},{"syntax":"pos1 getDir pos2","since":"arma3 1.56","params":[{"name":"pos1","type":"Object, Position2D or Position3D","description":"from where","type_expr":"Object | Position2D | Position3D"},{"name":"pos2","type":"Object, Position2D or Position3D","description":"to where","type_expr":"Object | Position2D | Position3D"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"pos1"},"right":{"text":"pos2"}}],"examples":[{"code":["_azimuth = getDir player;"]},{"code":["_azimuth = player getDir tank;"]}],"see_also":["getDirVisual","direction","getRelDir"],"notes":[{"user":"AgentRev01","date":"2013-10-23T10:31:00Z","text":"Be careful when using this command in conjunction with BIS_fnc_rotateVector2D, which rotates vectors counterclockwise as per trigonometric conventions, while getDir returns a clockwise angle.\nTo counter this, simply negate the output of getDir:\n\n```sqf\n[[0,1,0], -(getDir _object)] call BIS_fnc_rotateVector2D;\n```"}]},{"name":"getDirVisual","title":"getDirVisual","type":"command","url":"https://community.bistudio.com/wiki/getDirVisual","revid":330392,"updated":"2022-09-06T17:01:40Z","groups":["Object Manipulation","Render Time Scope"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global"},"description":"Returns object's heading in the range from 0 to 360 in render time scope.\n\n> [!NOTE]\n> **Arma 3:** The alternative syntax gets heading from one object or position to another object or position in render time scope, and should be used instead of BIS_fnc_dirTo.","syntaxes":[{"syntax":"getDirVisual object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"object"}},{"syntax":"pos1 getDirVisual pos2","since":"arma3 2.12","params":[{"name":"pos1","type":"Object, Position2D or Position3D","description":"from where","type_expr":"Object | Position2D | Position3D"},{"name":"pos2","type":"Object, Position2D or Position3D","description":"to where","type_expr":"Object | Position2D | Position3D"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"pos1"},"right":{"text":"pos2"}}],"examples":[{"code":["_dir = getDirVisual player;"]},{"code":["_azimuth = player getDirVisual tank;"]}],"see_also":["getDir","direction"]},{"name":"getDiverState","title":"getDiverState","type":"command","url":"https://community.bistudio.com/wiki/getDiverState","revid":309148,"updated":"2022-05-03T14:10:04Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","description":"Returns true when object is in diver state - e.g when the unit would put diving goggles on.\n\n> [!NOTE]\n> Diving goggles remove blurriness underwater, however when assigned, they do not appear on the face of the unit until the unit steps into the water.\n>\n> This command allows to detect the moment when the goggles are visible.\n>\n> If the unit doesn't have diving goggles assigned, this command would still return true at appropriate time if the unit steps into the water.","syntaxes":[{"syntax":"getDiverState unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when diving goggles are visible"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _gogglesOn = getDiverState player;"]}],"see_also":["goggles","removeGoggles","addGoggles"]},{"name":"getDLCAssetsUsage","title":"getDLCAssetsUsage","type":"command","url":"https://community.bistudio.com/wiki/getDLCAssetsUsage","revid":310760,"updated":"2022-05-07T20:21:35Z","groups":["DLC"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns an array of the DLC usage times.","syntaxes":[{"syntax":"getDLCAssetsUsage","params":[],"returns":{"type":"Array","type_expr":"Array","description":"array of DLC usage information, containing DLC items in format:\n[[name, dlcAppId, sessionTime, totalTime], [name, dlcAppId, sessionTime, totalTime], (…)] NOTE: unused assets won't appear in the result (usage time = 0).","text":"Array - array of DLC usage information, containing DLC items in format:\n[[name, dlcAppId, sessionTime, totalTime], [name, dlcAppId, sessionTime, totalTime], (…)]\n**NOTE:** unused assets won't appear in the result (usage time = 0)."},"form":"nullary"}],"examples":[{"code":["_dlcAssetsUsageInfo = getDLCAssetsUsage;"]}],"see_also":["getDLCs","getObjectDLC","getPersonUsedDLCs","getMissionDLCs","getDLCAssetsUsageByName","getAssetDLCInfo"]},{"name":"getDLCAssetsUsageByName","title":"getDLCAssetsUsageByName","type":"command","url":"https://community.bistudio.com/wiki/getDLCAssetsUsageByName","revid":319132,"updated":"2022-05-13T09:23:14Z","groups":["DLC"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns an array with the session and global time the asset has been used.","syntaxes":[{"syntax":"getDLCAssetsUsageByName assetName","params":[{"name":"assetName","type":"String","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"array in format: [sessionTime, totalTime]."},"form":"unary","right":{"text":"assetName"}}],"examples":[{"code":["_dlcAssetUsage = getDLCAssetsUsageByName \"C_IDAP_Heli_Transport_02_F\";"]}],"see_also":["getDLCs","getObjectDLC","getPersonUsedDLCs","getMissionDLCs","getDLCAssetsUsage","getAssetDLCInfo"]},{"name":"getDLCs","title":"getDLCs","type":"command","url":"https://community.bistudio.com/wiki/getDLCs","revid":377087,"updated":"2026-01-01T09:46:01Z","groups":["DLC"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns array of app IDs of DLCs.","syntaxes":[{"syntax":"getDLCs filter","params":[{"name":"filter","type":"Number one of:","description":"Number one of:\n\n- 0 - all\n- 1 - owned\n- 2 - not owned","type_expr":"Number","text":"filter: Number one of:\n\n- 0 - all\n- 1 - owned\n- 2 - not owned"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"App IDs"},"form":"unary","right":{"text":"filter"}}],"examples":[{"code":["_ownedDLCs = getDLCs 1;"]},{"code":["_hasKarts = (288520 in (getDLCs 1));"]}],"see_also":["getObjectDLC","getPersonUsedDLCs","getMissionDLCs","getDLCAssetsUsageByName","getDLCAssetsUsage","getAssetDLCInfo"],"notes":[{"user":"Benargee","date":"2015-04-07T20:27:00Z","text":"App ID can be found in CfgMods. Here is an example path from zeus using the Splendid Config Viewer:\n\n```sqf\nconfigFile >> \"CfgMods\" >> \"Curator\" >> \"appId\"\n```\n\nThis method can be used to find app IDs without having to find a list like the one above.\nI am also pretty sure you are able to define your own app ID for your own mods using this method."}]},{"name":"getDLCUsageTime","title":"getDLCUsageTime","type":"command","url":"https://community.bistudio.com/wiki/getDLCUsageTime","revid":319195,"updated":"2022-05-13T09:23:21Z","groups":["DLC"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Returns total time the assets of the given DLC have been used. See Arma 3 DLCs & Expansions for a list of DLCs and ids.","syntaxes":[{"syntax":"getDLCUsageTime appId","params":[{"name":"appId","type":"Number","description":"DLC's Steam appId","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"DLC assets usage time in seconds"},"form":"unary","right":{"text":"appId"}}],"examples":[{"code":["private _kartsUsage = getDLCUsageTime 288520;"]}],"see_also":["getDLCs","getObjectDLC","getPersonUsedDLCs","getMissionDLCs","getDLCAssetsUsageByName","getDLCAssetsUsage","getAssetDLCInfo"]},{"name":"getEditorCamera","title":"getEditorCamera","type":"command","url":"https://community.bistudio.com/wiki/getEditorCamera","revid":363288,"updated":"2024-03-26T10:51:57Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Fetches a reference to the mission editor camera.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"getEditorCamera map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"map"}}],"examples":[{"text":"-"}]},{"name":"getEditorMode","title":"getEditorMode","type":"command","url":"https://community.bistudio.com/wiki/getEditorMode","revid":363233,"updated":"2024-03-26T10:51:08Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the current mode of the editor.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"getEditorMode map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"map"}}],"examples":[{"text":"-"}]},{"name":"getEditorObjectScope","title":"getEditorObjectScope","type":"command","url":"https://community.bistudio.com/wiki/getEditorObjectScope","revid":363276,"updated":"2024-03-26T10:51:48Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the editor object scope of the specified editor object.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map getEditorObjectScope object","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"object","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"map"},"right":{"text":"object"}}],"examples":[{"text":"-"}]},{"name":"getElevationOffset","title":"getElevationOffset","type":"command","url":"https://community.bistudio.com/wiki/getElevationOffset","revid":310776,"updated":"2022-05-07T20:21:45Z","groups":["Map"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Returns the map elevation offset from [map]/config.cpp.\n\nReturns 0 if there is no elevationOffset defined in the config of the current world.","syntaxes":[{"syntax":"getElevationOffset","params":[],"returns":{"type":"Number","type_expr":"Number","description":"elevation offset of the map"},"form":"nullary"}],"examples":[{"code":["_offset = getElevationOffset;"]}],"see_also":["getTerrainHeightASL"]},{"name":"getEngineTargetRPMRTD","title":"getEngineTargetRPMRTD","type":"command","url":"https://community.bistudio.com/wiki/getEngineTargetRPMRTD","revid":348667,"updated":"2023-11-08T13:51:28Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Returns RPM of all engines.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"getEngineTargetRPMRTD helicopter","params":[{"name":"helicopter","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"with the RPM of each engine","text":"Array of Numbers with the RPM of each engine"},"form":"unary","right":{"text":"helicopter"}}],"examples":[{"code":["private _rpm = getEngineTargetRPMRTD _helicopter;"]}],"see_also":["setWantedRPMRTD","rotorsRpmRTD","enginesRpmRTD"]},{"name":"getEntityInfo","title":"getEntityInfo","type":"command","url":"https://community.bistudio.com/wiki/getEntityInfo","revid":379155,"updated":"2026-10-19T12:42:23Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns various properties for the given entity. Most properties should be checked where entity is local","syntaxes":[{"syntax":"getEntityInfo entity","params":[{"name":"entity","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [isMan, isAnimal, isDeadSet, deadSetTime, lastEntityCausingDamage, lastDamageTime, isUpsideDown, upsideDownTime, isStopped, canFloat, hasTerminalOpened, isWeaponholder, isWreck, isSmoking, isSetForDeletion]\n- 0 - isMan: Boolean - true if the entity is a man - 1 - isAnimal: Boolean - true if the entity is an animal - 2 - isDeadSet: Boolean - true if the entity has dead flag set. Often has the same value as !alive, but is not the same, as alive checks the total damage. - 3 - deadSetTime: Number - for how long the entity was dead - 4 - lastEntityCausingDamage: Object - objNull or the entity that last caused damage to this entity. Is not the same as the killer but could be the same. Killed entity might not have this set either. The entity does not have to be dead in order to have last entity that caused damage assigned. - 5 - lastDamageTime: Number - how long ago was lastEntityCausingDamage assigned - 6 - isUpsideDown: Boolean - true if the entity is upside down. The engine considers this to be `vectorUp ent select 2 < 0.3` - 7 - upsideDownTime: Number - how long the entity was upside down. - 8 - isStopped: Boolean - true when the entity does not need to be actively simulated. - 9 - canFloat: Boolean - true if the entity is able to float on water. - 10 - hasTerminalOpened: Boolean - true if the UAV terminal is opened for the given entity. - 11 - isWeaponholder: Boolean - true if the entity is weaponholder. - 12 - isWreck: Boolean - true if the entity is wreck. - 13 - isSmoking: Boolean - true if the entity has smoke and fire destruction effect active. - 14 - isSetForDeletion: Boolean - true if the entity was set for deletion, but is not yet removed from the simulation. Simple Object is supported. - 15 - Arma 3 v2.24 isParachute: Boolean - true if the entity is either Steerable or Non-Steerable parachute. Parachutes available in game: `\"Steerable_Parachute_F\", \"NonSteerable_Parachute_F\", \"B_Parachute_02_F\", \"O_Parachute_02_F\", \"I_Parachute_02_F\", \"SpaceshipCapsule_01_parachute_F\"` > [!NOTE] > In multiplayer, following values update properly only when entity is local: > > - lastEntityCausingDamage > - lastDamageTime > - isStopped > > Other values are either static or update depending on how your client sees the entity right now. > > Timer values are never exact between clients and vary slightly depending on latency, JIP clients end up with large timer values close to game's time but get normal once associated value changes again: > > - `deadSetTime` > - `lastDamageTime` > - `upsideDownTime`","text":"Array with [isMan, isAnimal, isDeadSet, deadSetTime, lastEntityCausingDamage, lastDamageTime, isUpsideDown, upsideDownTime, isStopped, canFloat, hasTerminalOpened, isWeaponholder, isWreck, isSmoking, isSetForDeletion]\n\n- 0 - isMan: Boolean - true if the entity is a man\n- 1 - isAnimal: Boolean - true if the entity is an animal\n- 2 - isDeadSet: Boolean - true if the entity has dead flag set. Often has the same value as !alive, but is not the same, as alive checks the total damage.\n- 3 - deadSetTime: Number - for how long the entity was dead\n- 4 - lastEntityCausingDamage: Object - objNull or the entity that last caused damage to this entity. Is not the same as the killer but could be the same. Killed entity might not have this set either. The entity does not have to be dead in order to have last entity that caused damage assigned.\n- 5 - lastDamageTime: Number - how long ago was *lastEntityCausingDamage* assigned\n- 6 - isUpsideDown: Boolean - true if the entity is upside down. The engine considers this to be `vectorUp ent select 2 < 0.3`\n- 7 - upsideDownTime: Number - how long the entity was upside down.\n- 8 - isStopped: Boolean - true when the entity does not need to be actively simulated.\n- 9 - canFloat: Boolean - true if the entity is able to float on water.\n- 10 - hasTerminalOpened: Boolean - true if the UAV terminal is opened for the given entity.\n- 11 - isWeaponholder: Boolean - true if the entity is weaponholder.\n- 12 - isWreck: Boolean - true if the entity is wreck.\n- 13 - isSmoking: Boolean - true if the entity has smoke and fire destruction effect active.\n- 14 - isSetForDeletion: Boolean - true if the entity was set for deletion, but is not yet removed from the simulation. Simple Object is supported.\n- 15 - Arma 3 v2.24 isParachute: Boolean - true if the entity is either Steerable or Non-Steerable parachute. Parachutes available in game: `\"Steerable_Parachute_F\", \"NonSteerable_Parachute_F\", \"B_Parachute_02_F\", \"O_Parachute_02_F\", \"I_Parachute_02_F\", \"SpaceshipCapsule_01_parachute_F\"`\n\n> [!NOTE]\n> In multiplayer, following values update properly only when entity is local:\n>\n> - lastEntityCausingDamage\n> - lastDamageTime\n> - isStopped\n>\n> Other values are either static or update depending on how your client sees the entity right now.\n>\n> Timer values are never exact between clients and vary slightly depending on latency, JIP clients end up with large timer values close to game's time but get normal once associated value changes again:\n>\n> - `deadSetTime`\n> - `lastDamageTime`\n> - `upsideDownTime`"},"form":"unary","right":{"text":"entity"}},{"syntax":"entity getEntityInfo index","params":[{"name":"entity","type":"Object","type_expr":"Object"},{"name":"index","type":"Number","description":"property index (see main syntax)","type_expr":"Number"}],"returns":{"type":"Anything","type_expr":"Anything","description":"depends on the requested property, or Nothing"},"form":"binary","left":{"text":"entity"},"right":{"text":"index"}}],"examples":[{"text":"```sqf\nprivate _entityInfo = getEntityInfo ent1;\n_entityInfo params [\n    \"_isMan\",\n    \"_isAnimal\",\n    \"_isDeadSet\",\n    \"_deadSetTime\",\n    \"_lastEntityCausingDamage\",\n    \"_lastDamageTime\",\n    \"_isUpsideDown\",\n    \"_upsideDownTime\",\n    \"_isStopped\",\n    \"_canFloat\",\n    \"_hasTerminalOpened\",\n    \"_isWeaponholder\",\n    \"_isWreck\",\n    \"_isSmoking\",\n    \"_isSetForDeletion\",\n    \"_isParachute\"\n];\n```","code":["private _entityInfo = getEntityInfo ent1;\n_entityInfo params [\n\t\"_isMan\",\n\t\"_isAnimal\",\n\t\"_isDeadSet\",\n\t\"_deadSetTime\",\n\t\"_lastEntityCausingDamage\",\n\t\"_lastDamageTime\",\n\t\"_isUpsideDown\",\n\t\"_upsideDownTime\",\n\t\"_isStopped\",\n\t\"_canFloat\",\n\t\"_hasTerminalOpened\",\n\t\"_isWeaponholder\",\n\t\"_isWreck\",\n\t\"_isSmoking\",\n\t\"_isSetForDeletion\",\n\t\"_isParachute\"\n];"]},{"code":["private _isMan = ent1 getEntityInfo 0;"]}],"see_also":["cursorObject","cursorTarget","createSimpleObject","getObjectType","getObjectTextures","objectParent","setVelocityTransformation","getUnitFreefallInfo","getModelInfo","getShotInfo","getRespawnVehicleInfo"]},{"name":"getEnv3DSoundController","title":"getEnv3DSoundController","type":"command","url":"https://community.bistudio.com/wiki/getEnv3DSoundController","revid":309132,"updated":"2022-05-03T11:42:40Z","groups":["Sounds"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","description":"Returns value of the specified 3D controller, see getAllEnv3DSoundControllers.","syntaxes":[{"syntax":"object getEnv3DSoundController controller","params":[{"name":"object","type":"Object","description":"environmental sound source like a tree or a house - see allEnv3DSoundSources","type_expr":"Object"},{"name":"controller","type":"String","description":"name of environmental variable like \"trees\" or \"houses\"","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"object"},"right":{"text":"controller"}}],"examples":[{"code":["_thatTreeOverThere getEnv3DSoundController \"rainDrops\"; // returns 1"]}],"see_also":["getEnvSoundController","getAllEnv3DSoundControllers","allEnv3DSoundSources","selectBestPlaces","getSoundController","getSoundControllerResult","getAllEnvSoundControllers","getAllSoundControllers","getCustomSoundController","setCustomSoundController","getCustomSoundControllerCount","Arma 3: Sound"]},{"name":"getEnvSoundController","title":"getEnvSoundController","type":"command","url":"https://community.bistudio.com/wiki/getEnvSoundController","revid":319197,"updated":"2022-05-13T09:23:21Z","groups":["Sounds"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","description":"Returns value of the specified controller, see getAllEnvSoundControllers","syntaxes":[{"syntax":"position getEnvSoundController controller","params":[{"name":"position","type":"Position","type_expr":"Position"},{"name":"controller","type":"String","description":"name of environmental variable like \"trees\" or \"houses\"","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"position"},"right":{"text":"controller"}}],"examples":[{"code":["position player getEnvSoundController \"trees\"; //0.3333"]}],"see_also":["getAllEnv3DSoundControllers","getEnv3DSoundController","allEnv3DSoundSources","selectBestPlaces","getSoundController","getSoundControllerResult","getAllEnvSoundControllers","getAllSoundControllers","getCustomSoundController","setCustomSoundController","getCustomSoundControllerCount","Arma 3: Sound"]},{"name":"getEventHandlerInfo","title":"getEventHandlerInfo","type":"command","url":"https://community.bistudio.com/wiki/getEventHandlerInfo","revid":377682,"updated":"2026-01-02T09:02:48Z","groups":["Event Handlers"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Queries given event handler's information.","syntaxes":[{"syntax":"oper getEventHandlerInfo [type, id]","params":[{"name":"oper","type":"Object, Group, Control or Display","description":"subject to which event handler is assigned","type_expr":"Object | Group | Control | Display"},{"name":"type","type":"String","description":"event handler name","type_expr":"String"},{"name":"id","type":"Number","description":"event handler id returned by addEventHandler, ctrlAddEventHandler, displayAddEventHandler, or addMPEventHandler - **not** any other EH system (e.g add3DENEventHandler or addUserActionEventHandler)","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"with [exists, isLast, total] or empty array []\n- exists: Boolean - event handler exists - isLast: Boolean - will be executed last (relevant if last event handler modifies default engine behaviour) - total: Number - total number of event handlers added to the same event","text":"Array with [exists, isLast, total] or empty array []\n\n- exists: Boolean - event handler exists\n- isLast: Boolean - will be executed last (relevant if last event handler modifies default engine behaviour)\n- total: Number - total number of event handlers added to the same event"},"form":"binary","left":{"text":"oper"},"right":{"text":"[type, id]"}},{"syntax":"getEventHandlerInfo [type, id]","params":[{"name":"type","type":"String","description":"event handler name","type_expr":"String"},{"name":"id","type":"Number","description":"event handler id returned by addMissionEventHandler or addMusicEventHandler **only**","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"with [exists, isLast, total] or empty array []\n- exists: Boolean - event handler exists - isLast: Boolean - will be executed last (relevant if last event handler modifies default engine behaviour) - total: Number - total number of event handlers added to the same event","text":"Array with [exists, isLast, total] or empty array []\n\n- exists: Boolean - event handler exists\n- isLast: Boolean - will be executed last (relevant if last event handler modifies default engine behaviour)\n- total: Number - total number of event handlers added to the same event"},"form":"unary","right":{"text":"[type, id]"}}],"examples":[{"text":"```sqf\nprivate _info = player getEventHandlerInfo [\"MPKilled\", 1];            // object EH\n```","code":["private _info = player getEventHandlerInfo [\"MPKilled\", 1];\t\t\t// object EH"]},{"text":"```sqf\nprivate _info = getEventHandlerInfo [\"EachFrame\", 0];                // mission EH\n```","code":["private _info = getEventHandlerInfo [\"EachFrame\", 0];\t\t\t\t// mission EH"]},{"text":"```sqf\nprivate _info = _bullet getEventHandlerInfo [\"Deflected\", 0];        // projectile EH\n```","code":["private _info = _bullet getEventHandlerInfo [\"Deflected\", 0];\t\t// projectile EH"]},{"text":"```sqf\nprivate _info = _group getEventHandlerInfo [\"EnemyDetected\", 1];    // group EH\n```","code":["private _info = _group getEventHandlerInfo [\"EnemyDetected\", 1];\t// group EH"]},{"text":"```sqf\nprivate _info = _control getEventHandlerInfo [\"ButtonClick\", 1];    // control (UI) EH\n```","code":["private _info = _control getEventHandlerInfo [\"ButtonClick\", 1];\t// control (UI) EH"]}],"see_also":["addEventHandler","ctrlAddEventHandler","displayAddEventHandler","addMPEventHandler","addMissionEventHandler","addMusicEventHandler"]},{"name":"getFatigue","title":"getFatigue","type":"command","url":"https://community.bistudio.com/wiki/getFatigue","revid":363589,"updated":"2024-04-07T18:18:03Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns fatigue of given unit.","syntaxes":[{"syntax":"getFatigue unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["if (getFatigue player < 0.5) then { player sideChat \"I'm good to go!\" };"]}],"see_also":["setFatigue","enableFatigue","getStamina"],"notes":[{"user":"Killzone_Kid","date":"2014-04-05T09:30:00Z","text":"getFatigue can be applied to remote unit however it will not read the changes made to unit's fatigue with setFatigue command. Only natural changes resulting from unit moving will be counted.\nWhen applied to local unit, it will read resulting value of natural fatigue combined with artificial changes added locally by setFatigue.\nIn short, the server wouldn't know the correct value of remote unit's fatigue if you used setFatigue on the unit prior."}]},{"name":"getFieldManualStartPage","title":"getFieldManualStartPage","type":"command","url":"https://community.bistudio.com/wiki/getFieldManualStartPage","revid":377874,"updated":"2026-01-04T13:13:54Z","groups":["System"],"status":"ok","games":{"arma3":"1.18"},"since":"arma3 1.18","arma3_since":"1.18","description":"Returns array of the starting topic and hint the given field manual should display.","syntaxes":[{"syntax":"getFieldManualStartPage display","params":[{"name":"display","type":"Display","type_expr":"Display"}],"returns":{"type":"Array","type_expr":"Array","description":"with [startingTopic, hint]\n- startingTopic: String - hint: String","text":"Array with [startingTopic, hint]\n\n- startingTopic: String\n- hint: String"},"form":"unary","right":{"text":"display"}}],"examples":[{"code":["getFieldManualStartPage (findDisplay 46); // returns [\"\", \"\"]"]}]},{"name":"getForcedFlagTexture","title":"getForcedFlagTexture","type":"command","url":"https://community.bistudio.com/wiki/getForcedFlagTexture","revid":348629,"updated":"2023-11-08T13:46:06Z","groups":["Flags"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"A getter for forceFlagTexture. Forced texture is different from your normal flag texture, which can be retrieved with flagTexture","syntaxes":[{"syntax":"getForcedFlagTexture object","params":[{"name":"object","type":"Object","description":"vehicle, unit or flag pole","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["getForcedFlagTexture player;"]}],"see_also":["forceFlagTexture","Arma 3: Flag Textures"]},{"name":"getForcedSpeed","title":"getForcedSpeed","type":"command","url":"https://community.bistudio.com/wiki/getForcedSpeed","revid":338349,"updated":"2023-02-28T14:44:10Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Returns forced speed set with forceSpeed or -1 if not set.","syntaxes":[{"syntax":"getForcedSpeed entity","params":[{"name":"entity","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"entity"}}],"examples":[{"code":["_spd = getForcedSpeed _heli;"]}],"see_also":["forceSpeed","getSpeed","forceWalk"]},{"name":"getFriend","title":"getFriend","type":"command","url":"https://community.bistudio.com/wiki/getFriend","revid":348505,"updated":"2023-11-08T13:01:33Z","groups":["Sides"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns if sides are friendly or hostile. For a value smaller than 0.6 it results in being enemy, otherwise it is friendly. See also Side Relations.","syntaxes":[{"syntax":"side1 getFriend side2","params":[{"name":"side1","type":"Side","type_expr":"Side"},{"name":"side2","type":"Side","type_expr":"Side"}],"returns":{"type":"Number","type_expr":"Number","description":"decimal value between 0.0 to 1.0"},"form":"binary","left":{"text":"side1"},"right":{"text":"side2"}}],"examples":[{"code":["value = west getFriend east;"]},{"code":["_isEnemy = side _killer getFriend side _victim < 0.6;"]}],"see_also":["setFriend","BIS_fnc_sideIsFriendly","BIS_fnc_sideIsEnemy","Side Relations"]},{"name":"getFSMVariable","title":"getFSMVariable","type":"command","url":"https://community.bistudio.com/wiki/getFSMVariable","revid":330370,"updated":"2022-09-04T20:25:49Z","groups":["Variables"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return the value of variable in the variable space of given FSM. The FSM handle is the number returned by the execFSM command.","syntaxes":[{"syntax":"FSMhandle getFSMVariable name","params":[{"name":"FSMhandle","type":"Number","type_expr":"Number"},{"name":"name","type":"String","description":"name of the variable","type_expr":"String"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"FSMhandle"},"right":{"text":"name"}},{"syntax":"FSMhandle getFSMVariable [name, defaultValue]","since":"arma3 1.68","params":[{"name":"FSMhandle","type":"Number","type_expr":"Number"},{"name":"name","type":"String","description":"name of the variable","type_expr":"String"},{"name":"defaultValue","type":"Anything","description":"value to return if variable is nil","type_expr":"Anything"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"FSMhandle"},"right":{"text":"[name, defaultValue]"}}],"examples":[{"code":["_handle getFSMVariable \"_foo\";"]},{"code":["_handle getFSMVariable [\"_foo\", 123];"]}],"see_also":["FSM","commandFSM","completedFSM","doFSM","execFSM","setFSMVariable"]},{"name":"getFuelCargo","title":"getFuelCargo","type":"command","url":"https://community.bistudio.com/wiki/getFuelCargo","revid":379345,"updated":"2026-10-30T23:54:10Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"0.56"},"since":"arma3 0.56","arma3_since":"0.56","locality":{"argument":"global"},"description":"Returns the fuel amount (1 is full) in the cargo space of a refueling vehicle.\n\n> [!NOTE]\n> Since Arma 3 v1.96 the return value for vehicles that are not configured to have ability to refuel other vehicles is -1. (Prior to that the value was negative infinity)","syntaxes":[{"syntax":"getFuelCargo vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"fuel cargo value, -1 if fuel cargo is not supported, 0 if the vehicle is !alive or isNull"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["value = getFuelCargo myVehicleName;"]}],"see_also":["setFuelCargo","getAmmoCargo","getRepairCargo"],"notes":[{"user":"AgentRev","date":"2014-12-22T17:16:00Z","text":"**Prior to Arma 3 v1.94** If the vehicle is not alive, it always returns Nothing, which you should check for using isNil.\nIf the vehicle is unable to carry that type of cargo, it returns -1.#IND, which you should check for using finite or < 0."},{"user":"Killzone_Kid","date":"2019-09-06T07:19:00Z","text":"If you have ACE mod installed, note that it removes fuel cargo from vehicles so it could appear that the command always returns 0"}]},{"name":"getFuelConsumptionCoef","title":"getFuelConsumptionCoef","type":"command","url":"https://community.bistudio.com/wiki/getFuelConsumptionCoef","revid":363320,"updated":"2024-03-26T16:41:39Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.16"},"since":"arma3 2.16","arma3_since":"2.16","locality":{"argument":"global"},"description":"Returns the fuel consumption coefficient, which is a multiplier of the fuel consumption rate in config.","syntaxes":[{"syntax":"getFuelConsumptionCoef vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object","text":"vehicle : Object"}],"returns":{"type":"Number","type_expr":"Number","description":"fuel consumption coefficient"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["if (getFuelConsumptionCoef myCar > 1) then { hint \"You should have a mechanic look at your engine!\" }"]}],"see_also":["setFuelConsumptionCoef"]},{"name":"getGraphValues","title":"getGraphValues","type":"command","url":"https://community.bistudio.com/wiki/getGraphValues","revid":351320,"updated":"2023-11-27T05:02:35Z","groups":["Math"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Generate graph y - coordinates of all input values within specific x and y range.","syntaxes":[{"syntax":"getGraphValues [[graphMinX, graphMaxX, graphMinY, graphMaxY, valueCount, randomOffset], x1, y1, x2, y2, ...]","params":[{"name":"graphMinX","type":"Number","description":"minimum x-axis value","type_expr":"Number"},{"name":"graphMaxX","type":"Number","description":"maximum x-axis value","type_expr":"Number"},{"name":"graphMinY","type":"Number","description":"minimum y-axis value","type_expr":"Number"},{"name":"graphMaxY","type":"Number","description":"maximum y-axis value","type_expr":"Number"},{"name":"valueCount","type":"Number","description":"number of values the returned array should have","type_expr":"Number"},{"name":"randomOffset","type":"Number","description":"random range for returned y value","type_expr":"Number"},{"name":"xN","type":"Number","description":"nth x value","type_expr":"Number"},{"name":"yN","type":"Number","description":"nth y value","type_expr":"Number"}],"returns":{"type":"Array of Array of Numbers","type_expr":"Array<Array<Number>>","description":"to format [arrayOfYvalues, arrayOfXvalues]"},"form":"unary","right":{"text":"[[graphMinX, graphMaxX, graphMinY, graphMaxY, valueCount, randomOffset], x1, y1, x2, y2, ...]"}}],"examples":[{"text":"```sqf\nprivate _minX = 0;\nprivate _maxX = 10;\nprivate _minY = 0;\nprivate _maxY = 100;\nprivate _count = 11;\nprivate _random = 0;\n\ngetGraphValues [\n    [_minX, _maxX, _minY, _maxY, _count, _random],\n    0, 5,\n    1, 10,\n    2, 100,\n    3, 50,\n    4, 30,\n    5, 100,\n    6, 10,\n    7, 50,\n    8, 75,\n    9, 100,\n    10, 100\n];\n/*\n    returns [[0.05, 0.1, 1, 0.5, 0.3, 1, 0.1, 0.5, 0.75, 1, 1], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]\n    supposedly [array of 1-based Y values, array of X values]\n*/\n```","code":["private _minX = 0;\nprivate _maxX = 10;\nprivate _minY = 0;\nprivate _maxY = 100;\nprivate _count = 11;\nprivate _random = 0;\n\ngetGraphValues [\n\t[_minX, _maxX, _minY, _maxY, _count, _random],\n\t0, 5,\n\t1, 10,\n\t2, 100,\n\t3, 50,\n\t4, 30,\n\t5, 100,\n\t6, 10,\n\t7, 50,\n\t8, 75,\n\t9, 100,\n\t10, 100\n];\n/*\n\treturns [[0.05, 0.1, 1, 0.5, 0.3, 1, 0.1, 0.5, 0.75, 1, 1], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]\n\tsupposedly [array of 1-based Y values, array of X values]\n*/"]}],"see_also":["decayGraphValues"]},{"name":"getGroupIcon","title":"getGroupIcon","type":"command","url":"https://community.bistudio.com/wiki/getGroupIcon","revid":376589,"updated":"2025-10-29T23:17:41Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Get group icon properties. Since Arma 3 v2.22 command also returns 3d offsets.","syntaxes":[{"syntax":"group getGroupIcon id","params":[{"name":"group","type":"Group","type_expr":"Group"},{"name":"id","type":"Number","description":"icon id","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"[icon,[offsetx,offsety,offsetX3d,offsetY3d]]"},"form":"binary","left":{"text":"group"},"right":{"text":"id"}}],"examples":[{"code":["_grpIconId = _group getVariable \"BIS_MARTA_ICON_TYPE\";\n_grpIcon = _group getGroupIcon _grpIconId;"]}],"see_also":["addGroupIcon","clearGroupIcons","getGroupIcons","getGroupIconParams","groupIconSelectable","groupIconsVisible","onGroupIconClick","removeGroupIcon","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible"]},{"name":"getGroupIconParams","title":"getGroupIconParams","type":"command","url":"https://community.bistudio.com/wiki/getGroupIconParams","revid":377868,"updated":"2026-01-04T11:36:22Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns group icons params used for command bar drawing such as color, text, scale, visibility, waypoint visibility, waypoint color.","syntaxes":[{"syntax":"getGroupIconParams group","params":[{"name":"group","type":"Group","type_expr":"Group"}],"returns":{"type":"Array","type_expr":"Array","description":"with [color, text, scale, visibility, WPvisibility, WPcolor]\n- color: Color (RGB) - icon color - text: String - icon text - scale: Number - icon scale - visibility: Boolean - icon visibility - WPvisibility: Boolean - waypoint visibility - WPcolor: Color (RGB) - waypoint color","text":"Array with [color, text, scale, visibility, WPvisibility, WPcolor]\n\n- color: Color (RGB) - icon color\n- text: String - icon text\n- scale: Number - icon scale\n- visibility: Boolean - icon visibility\n- WPvisibility: Boolean - waypoint visibility\n- WPcolor: Color (RGB) - waypoint color"},"form":"unary","right":{"text":"group"}}],"examples":[{"code":["_iconParams = getGroupIconParams group player;"]},{"code":["getGroupIconParams group player params [\"_color\", \"_text\", \"_scale\", \"_visibility\", \"_WPVisibility\", \"_WPColor\"];"]}],"see_also":["addGroupIcon","clearGroupIcons","getGroupIcon","groupIconSelectable","groupIconsVisible","onGroupIconClick","removeGroupIcon","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible"]},{"name":"getGroupIcons","title":"getGroupIcons","type":"command","url":"https://community.bistudio.com/wiki/getGroupIcons","revid":376588,"updated":"2025-10-29T23:16:41Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns all group icons. Since Arma 3 v2.22 command also returns 3d offsets.","syntaxes":[{"syntax":"getGroupIcons group","params":[{"name":"group","type":"Group","type_expr":"Group"}],"returns":{"type":"Array","type_expr":"Array","description":"[[id,icon,[offsetx,offsety,offsetX3d,offsetY3d]],..]"},"form":"unary","right":{"text":"group"}}],"see_also":["addGroupIcon","clearGroupIcons","getGroupIcon","getGroupIconParams","groupIconSelectable","groupIconsVisible","onGroupIconClick","removeGroupIcon","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible"]},{"name":"getHideFrom","title":"getHideFrom","type":"command","url":"https://community.bistudio.com/wiki/getHideFrom","revid":379210,"updated":"2026-10-30T21:16:05Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the Position where object believes the enemy to be.\nIf there is no direct line of sight between the object and the enemy, this position is extrapolated based on the last known position and speed of the enemy.\nA returned position of [0,0,0] implies that object does not know about enemy.\nIf enemy is null it is some position in front of the object or enemy position.","syntaxes":[{"syntax":"object getHideFrom enemy","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"enemy","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"ASLToATL representation of the believed aimPos of the enemy object"},"form":"binary","left":{"text":"object"},"right":{"text":"enemy"}}],"examples":[{"code":["_pos = player getHideFrom _enemy;"]}],"see_also":["findCover","setHideBehind","isHidden","knowsAbout","forgetTarget"],"notes":[{"user":"Benargee","date":"2015-04-25T07:15:00Z","text":"This command is definitely not broken, at least not in A3 1.42. It functions exactly as the description says it does.\nThe reason why the Z value is elevated is because it represents the units torso. When the unit is prone and spotted, the Z value is much less.\nHere you can see a perfectly working example of this command Talk:getHideFrom#Operation Script Sample."}]},{"name":"getHit","title":"getHit","type":"command","url":"https://community.bistudio.com/wiki/getHit","revid":340840,"updated":"2023-05-10T13:56:15Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.32","arma2oa":"1.64"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global"},"description":"Returns selection damage. Same as getHitPointDamage, only the argument is selection part instead of hit point.\n\n> [!NOTE]\n> Some part names are in Czech; see the translation table.","syntaxes":[{"syntax":"vehicle getHit selection","params":[{"name":"vehicle","type":"Object","description":"vehicle to be queried","type_expr":"Object","text":"vehicle : Object - vehicle to be queried"},{"name":"selection","type":"String","description":"selection part name","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"before Arma 3 v1.94, Nothing was returned when an invalid selection was provided (now returns `0`)","text":"Number - before Arma 3 v1.94, Nothing was returned when an invalid *selection* was provided (now returns `0`)"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"selection"}}],"examples":[{"code":["hint str (player getHit \"head\");"]},{"code":["private _engineDamage = _car getHit \"motor\";"]}],"see_also":["setHit","getHitPointDamage","setHitPointDamage","setDamage","damage","getHitIndex","setHitIndex"]},{"name":"getHitIndex","title":"getHitIndex","type":"command","url":"https://community.bistudio.com/wiki/getHitIndex","revid":340842,"updated":"2023-05-10T13:57:50Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","locality":{"argument":"global"},"description":"Return current level of damage for a specific Hit Point (specified by its hit part index). All hit points can be obtained with getAllHitPointsDamage command.\n\n- 0: no damage\n- 1: full damage","syntaxes":[{"syntax":"vehicle getHitIndex hitPartIndex","params":[{"name":"vehicle","type":"Object","description":"vehicle to be queried","type_expr":"Object","text":"vehicle : Object - vehicle to be queried"},{"name":"hitPartIndex","type":"Number","description":"hit part index of the Hit Point","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"before Arma 3 v1.94, Nothing was returned when an invalid selection was provided (now returns `0`)","text":"Number - before Arma 3 v1.94, Nothing was returned when an invalid *selection* was provided (now returns `0`)"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"hitPartIndex"}}],"examples":[{"code":["vehicle player getHitIndex 3;"]}],"see_also":["getAllHitPointsDamage","setHitIndex","setHitPointDamage","getHitPointDamage","setHit","getHit","setDamage","damage"]},{"name":"getHitPointDamage","title":"getHitPointDamage","type":"command","url":"https://community.bistudio.com/wiki/getHitPointDamage","revid":377769,"updated":"2026-01-03T01:32:16Z","groups":["Object Manipulation"],"status":"ok","games":{"tkoh":"1.00","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Return current level of damage in range 0..1 for a specific Hit Point (specified by its config class).\nIf you need to get damage of a selection instead of hit point, use getHit.","syntaxes":[{"syntax":"vehicle getHitPointDamage hitPointName","params":[{"name":"vehicle","type":"Object","description":"vehicle to be queried","type_expr":"Object","text":"vehicle : Object - vehicle to be queried"},{"name":"hitPointName","type":"String","description":"name of the Hit Point class","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"before Arma 3 v1.94, Nothing was returned when an invalid selection was provided (now returns `0`)","text":"Number - before Arma 3 v1.94, Nothing was returned when an invalid *selection* was provided (now returns `0`)"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"hitPointName"}}],"examples":[{"code":["vehicle player getHitPointDamage \"hitEngine\";"]}],"see_also":["setHitPointDamage","getAllHitPointsDamage","setHit","getHit","setDamage","damage","getHitIndex","setHitIndex"],"notes":[{"user":"Joris","date":"2011-11-25T15:06:00Z","text":"Common ObjectRTD Take On Helicopters Hit Points:\n\n- HitEngine (engine #1)\n- HitEngine2 (engine #2)\n- HitEngine3 (engine #3)\n- HitHRotor (main rotor)\n- HitVRotor (tail rotor)\n- HitBatteries (electrical systems)\n- HitLight (landing light)\n- HitHydraulics (entire hydraulics system)\n- HitTransmission (engine transmission)\n- HitGear (landing gear)\n- HitFuel (all fuel tanks)\n- HitHStabilizerL1 (first left horizontal stabilizer)\n- HitHStabilizerR1 (first right horizontal stabilizer)\n- HitVStabilizer1 (first vertical stabilizer)\n- HitTail (tail boom)\n- HitPitotTube (all pitot tubes)\n- HitStaticPort (all static ports)\n- HitStarter1 (starter for engine #1)\n- HitStarter2 (starter for engine #2)\n- HitStarter3 (starter for engine #3)\n- HitAvionics\n- HitHull\n- HitMissiles\n- HitRGlass\n- HitLGlass\n- HitGlass1\n- HitGlass2\n- HitGlass3\n- HitGlass4\n- HitGlass5\n- HitGlass6"},{"user":"K.J.","date":"2017-03-04T01:29:00Z","text":"Note that vehicles with multiple turrets have multiple HitTurret and HitGun classes that can't be distinguished based on the Hitpoint class name. They can only be distinguished by their selection names.\nThe selection names do not necessarily correspond to a common nomenclature, especially for mod vehicles. There can also be multiple empty Hitpoint Class names on a vehicle or infantry unit.\nThey can be hitpoints for vehicle headlights or be the result of a bad config/model, as hitpoints that have an undefined named selection in their config class or are missing their named selection in the model will result in an empty HitPoint class name."},{"user":"X3KJ","date":"2018-10-05T23:12:00Z","text":"Note: Since Arma 3 Tanks DLC, Turrets of vanilla vehicles no longer have identical Hitpoint Classes for multiple Turrets.\nMod vehicles may still have the old issue, but they produces error messages in RPT if they still do (and thus should be enough motivation to fix them)."}]},{"name":"getItemCargo","title":"getItemCargo","type":"command","url":"https://community.bistudio.com/wiki/getItemCargo","revid":378322,"updated":"2026-04-02T16:23:27Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns all items names and count from ammo box (or any general weapon holder container).","syntaxes":[{"syntax":"getItemCargo box","params":[{"name":"box","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [classes, counts]\n- classes: Array of Strings - Item class names - counts: Array of Numbers - Item counts","text":"Array with [classes, counts]\n\n- classes: Array of Strings - Item class names\n- counts: Array of Numbers - Item counts"},"form":"unary","right":{"text":"box"}}],"examples":[{"text":"```sqf\ngetItemCargo cursorTarget;\n/*\n    returns e.g\n    [\n        [\"5ItemA\", \"10ItemB\"]\n        [5, 10]\n    ]\n*/\n```","code":["getItemCargo cursorTarget;\n/*\n\treturns e.g\n\t[\n        [\"5ItemA\", \"10ItemB\"]\n        [5, 10]\n\t]\n*/"]}],"see_also":["itemCargo","addItemCargo","addItemCargoGlobal","clearItemCargo","clearItemCargoGlobal"]},{"name":"getLeaning","title":"getLeaning","type":"command","url":"https://community.bistudio.com/wiki/getLeaning","revid":369757,"updated":"2024-10-08T15:08:56Z","groups":["Unit Control"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"global"},"description":"Returns the leaning factor of the given unit.","syntaxes":[{"syntax":"getLeaning unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"leaning factor from -1 to 1"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["if (getLeaning player < 0) then { systemChat \"player is leaning left\" };"]}],"see_also":["animationState","unitPos","stance","pose"]},{"name":"getLightInfo","title":"getLightInfo","type":"command","url":"https://community.bistudio.com/wiki/getLightInfo","revid":378895,"updated":"2026-08-11T14:56:31Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","description":"Returns various properties for the given `#lightpoint` or `#lightreflector`. ConePars and VolumeShapePars are exclusive properties of `#lightreflector` only.","syntaxes":[{"syntax":"getLightInfo light","params":[{"name":"light","type":"Object","description":"`#lightpoint` or `#lightreflector`","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [intensity, diffuseColor, ambientColor, dayLight, IR, useFlare, flareSize, flareMaxDistance, attenuationPars, attachedToPars, conePars, volumeShapePars]\n- 0 - intensity: Number - getter for setLightIntensity (setLightBrightness also sets intensity in a weird way, but it is also obsolete) - 1 - diffuseColor: Color - getter for setLightColor - 2 - ambientColor: Color - getter for setLightAmbient - 3 - dayLight: Boolean - getter for setLightDayLight - 4 - IR: Boolean - getter for setLightIR - 5 - useFlare: Boolean - getter for setLightUseFlare - 6 - flareSize: Number - getter for setLightFlareSize - 7 - flareMaxDistance: Number - getter for setLightFlareMaxDistance - 8 - attenuationPars: Array - getter for setLightAttenuation - 9 - attachedToPars: Array - getter for lightAttachObject, lightDetachObject - 10 - conePars: Array - getter for setLightConePars - 11 - volumeShapePars: Array - getter for setLightVolumeShape","text":"Array with [intensity, diffuseColor, ambientColor, dayLight, IR, useFlare, flareSize, flareMaxDistance, attenuationPars, attachedToPars, conePars, volumeShapePars]\n\n- 0 - intensity: Number - getter for setLightIntensity (setLightBrightness also sets intensity in a weird way, but it is also obsolete)\n- 1 - diffuseColor: Color - getter for setLightColor\n- 2 - ambientColor: Color - getter for setLightAmbient\n- 3 - dayLight: Boolean - getter for setLightDayLight\n- 4 - IR: Boolean - getter for setLightIR\n- 5 - useFlare: Boolean - getter for setLightUseFlare\n- 6 - flareSize: Number - getter for setLightFlareSize\n- 7 - flareMaxDistance: Number - getter for setLightFlareMaxDistance\n- 8 - attenuationPars: Array - getter for setLightAttenuation\n- 9 - attachedToPars: Array - getter for lightAttachObject, lightDetachObject\n- 10 - conePars: Array - getter for setLightConePars\n- 11 - volumeShapePars: Array - getter for setLightVolumeShape"},"form":"unary","right":{"text":"light"}},{"syntax":"light getLightInfo index","params":[{"name":"light","type":"Object","description":"`#lightpoint` or `#lightreflector`","type_expr":"Object"},{"name":"index","type":"Number","description":"property index (see main syntax, for example 0 for light intensity)","type_expr":"Number"}],"returns":{"type":"Anything","type_expr":"Anything","description":"depends on the requested property, or Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"index"}}],"examples":[{"code":["private _lightInfo = getLightInfo light1;"]},{"code":["private _lightIntensity = light1 getLightInfo 0;"]}],"see_also":["setLightIntensity","setLightColor","setLightAmbient","setLightDayLight","setLightIR","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightAttenuation","lightAttachObject","lightDetachObject","setLightConePars","getUnitFreefallInfo","getEntityInfo","getModelInfo"]},{"name":"getLighting","title":"getLighting","type":"command","url":"https://community.bistudio.com/wiki/getLighting","revid":377678,"updated":"2026-01-02T09:02:42Z","groups":["Lights"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Gets general environment's light settings.","syntaxes":[{"syntax":"getLighting","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [ambientLightColor, ambientLightBrightness, lightDirection, starsVisibility]\n- ambientLightColor: Color (RGB) - ambientLightBrightness: Number - lightDirection: Vector3D - starsVisibility: Number","text":"Array with [ambientLightColor, ambientLightBrightness, lightDirection, starsVisibility]\n\n- ambientLightColor: Color (RGB)\n- ambientLightBrightness: Number\n- lightDirection: Vector3D\n- starsVisibility: Number"},"form":"nullary"}],"examples":[{"code":["getLighting; // returns [[0.646753,0.781818,1],28526.2,[-0.0167152,0.211598,-0.977214],0]"]},{"code":["getLighting params [\"_ambientLightColour\", \"_ambientLightBrightness\", \"_lightDirection\", \"_starsVisibility\"];"]}],"see_also":["getLightingAt","moonPhase","Light Source Tutorial"],"notes":[{"user":"POLPOX","date":"2023-09-18T13:20:29Z","text":"Possible to check if a position is in a shadow.\n\n```sqf\n[player,\"VIEW\"] checkVisibility [eyePos player,eyePos player vectorDiff ((getLighting#2) vectorMultiply 200)]\n```"}]},{"name":"getLightingAt","title":"getLightingAt","type":"command","url":"https://community.bistudio.com/wiki/getLightingAt","revid":377785,"updated":"2026-01-03T01:33:52Z","groups":["Lights"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Gets provided object's lighting information.\n\n> [!NOTE]\n> The command will use local player's night vision state to determine whether to include IR lights in the result or not.\n> On a dedicated server, headless client or if the player is null, the night vision state will always be off.","syntaxes":[{"syntax":"getLightingAt obj","params":[{"name":"obj","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [ambientLightColor, ambientLightBrightness, dynamicLightColor, dynamicLightBrightness]\n- ambientLightColor: Color (RGB) - ambientLightBrightness: Number - dynamicLightColor: Color (RGB) - dynamicLightBrightness: Number","text":"Array with [ambientLightColor, ambientLightBrightness, dynamicLightColor, dynamicLightBrightness]\n\n- ambientLightColor: Color (RGB)\n- ambientLightBrightness: Number\n- dynamicLightColor: Color (RGB)\n- dynamicLightBrightness: Number"},"form":"unary","right":{"text":"obj"}}],"examples":[{"code":["getLightingAt player; // returns [[1,1,1], 0.5, [0,0,0], 0]"]},{"code":["getLightingAt player params [\"_ambientLightColour\", \"_ambientLightBrightness\", \"_dynamicLightColour\", \"_dynamicLightBrightness\"];"]}],"see_also":["getLighting","Light Source Tutorial"]},{"name":"getLoadedModsInfo","title":"getLoadedModsInfo","type":"command","url":"https://community.bistudio.com/wiki/getLoadedModsInfo","revid":373357,"updated":"2025-04-23T11:27:20Z","groups":["Mods and Addons"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns information about all loaded modifications.\n\n> [!NOTE]\n> The first 7 values are equal to what is printed in RPT on game startup in the `======== mods =======` category.","syntaxes":[{"syntax":"getLoadedModsInfo","params":[],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"in format [modName, modDir, isDefault, isOfficial, origin, hash, hashShort, itemID]:\n- modName: String - user-friendly mod name - modDir: String - mod directory name - isDefault: Boolean - true for base DLC, false for optional - isOfficial: Boolean - true for official content, false for user-generated content - origin: String - either \"GAME DIR\" or \"NOT FOUND\" (for the base game or on error) - hash: String - hashShort: String - itemID: String - either DLC appId or Steam Workshop itemID, \"0\" for the base game","text":"Array of Arrays in format [modName, modDir, isDefault, isOfficial, origin, hash, hashShort, itemID]:\n\n- modName: String - user-friendly mod name\n- modDir: String - mod directory name\n- isDefault: Boolean - true for base DLC, false for optional\n- isOfficial: Boolean - true for official content, false for user-generated content\n- origin: String - either \"GAME DIR\" or \"NOT FOUND\" (for the base game or on error)\n- hash: String\n- hashShort: String\n- itemID: String - either DLC appId or Steam Workshop itemID, \"0\" for the base game"},"form":"nullary"}],"examples":[{"text":"```sqf\nprivate _loadedMods = getLoadedModsInfo;\n/*\n    [\n        [\"Community Base Addons v3.18.1\",\"@cba_a3\",false,false,\"GAME DIR\",\"b256a972cc3a9bde93988e243ad5db85887dece0\",\"7de4bd5c\",\"450814997\"],\n        [\"Arma 3 Art of War\",\"aow\",true,true,\"GAME DIR\",\"c6afb04056f1cea283c60e13b6d5ac8049140341\",\"2ed2ccad\",\"1325500\"],\n        [\"Arma 3 Contact (Platform)\",\"enoch\",true,true,\"GAME DIR\",\"72172fe806a8cd128d5dd5f224dbf754b69af881\",\"32ed0446\",\"1021790\"],\n        [\"Arma 3 Tanks\",\"tank\",true,true,\"GAME DIR\",\"35ef3b19b5ebd31d7da21565717f6d5c768edd59\",\"9c4a0882\",\"798390\"],\n        [\"Arma 3 Tac-Ops\",\"tacops\",true,true,\"GAME DIR\",\"e03d923a8391d527d34c3a2d311e6f2554df18c8\",\"e6729774\",\"744950\"],\n        [\"Arma 3 Laws of War\",\"orange\",true,true,\"GAME DIR\",\"71940c7021e27b4ae72cd6a527ff56784725850a\",\"d27bf111\",\"571710\"],\n        [\"Arma 3 Malden\",\"argo\",true,true,\"GAME DIR\",\"230aad2992427ef22b803e177bdedda7b3f1727d\",\"2e502f53\",\"639600\"],\n        [\"Arma 3 Jets\",\"jets\",true,true,\"GAME DIR\",\"d58526aaa24a73aa53d11b82f00cf49dc3ef3216\",\"d39b144d\",\"601670\"],\n        [\"Arma 3 Apex\",\"expansion\",true,true,\"GAME DIR\",\"dded307173ad9bb62fe09a5084bb7d70c81639d3\",\"57f2ccad\",\"395180\"],\n        [\"Arma 3 Marksmen\",\"mark\",true,true,\"GAME DIR\",\"eb956eb99f1a33cef4f825f8d52bc9ca9ef3d4cd\",\"d605b72\",\"332350\"],\n        [\"Arma 3 Helicopters\",\"heli\",true,true,\"GAME DIR\",\"0e14ac1e91df7c56725b1dc9a939c50c5d93fd4c\",\"a6e7077f\",\"304380\"],\n        [\"Arma 3 Karts\",\"kart\",true,true,\"GAME DIR\",\"f9bac1340520fc3a25c3c4c7b6c48efdba32d535\",\"9b1d75e8\",\"288520\"],\n        [\"Arma 3 Zeus\",\"curator\",true,true,\"GAME DIR\",\"5cfb449d86e7b7e8529909ec1c0656d70e2cfda0\",\"4ccdcca0\",\"275700\"],\n        [\"Arma 3\",\"A3\",true,true,\"GAME DIR\",\"\",\"\",\"0\"]]\n    ]\n*/\n```","code":["private _loadedMods = getLoadedModsInfo;\n/*\n\t[\n\t\t[\"Community Base Addons v3.18.1\",\"@cba_a3\",false,false,\"GAME DIR\",\"b256a972cc3a9bde93988e243ad5db85887dece0\",\"7de4bd5c\",\"450814997\"],\n\t\t[\"Arma 3 Art of War\",\"aow\",true,true,\"GAME DIR\",\"c6afb04056f1cea283c60e13b6d5ac8049140341\",\"2ed2ccad\",\"1325500\"],\n\t\t[\"Arma 3 Contact (Platform)\",\"enoch\",true,true,\"GAME DIR\",\"72172fe806a8cd128d5dd5f224dbf754b69af881\",\"32ed0446\",\"1021790\"],\n\t\t[\"Arma 3 Tanks\",\"tank\",true,true,\"GAME DIR\",\"35ef3b19b5ebd31d7da21565717f6d5c768edd59\",\"9c4a0882\",\"798390\"],\n\t\t[\"Arma 3 Tac-Ops\",\"tacops\",true,true,\"GAME DIR\",\"e03d923a8391d527d34c3a2d311e6f2554df18c8\",\"e6729774\",\"744950\"],\n\t\t[\"Arma 3 Laws of War\",\"orange\",true,true,\"GAME DIR\",\"71940c7021e27b4ae72cd6a527ff56784725850a\",\"d27bf111\",\"571710\"],\n\t\t[\"Arma 3 Malden\",\"argo\",true,true,\"GAME DIR\",\"230aad2992427ef22b803e177bdedda7b3f1727d\",\"2e502f53\",\"639600\"],\n\t\t[\"Arma 3 Jets\",\"jets\",true,true,\"GAME DIR\",\"d58526aaa24a73aa53d11b82f00cf49dc3ef3216\",\"d39b144d\",\"601670\"],\n\t\t[\"Arma 3 Apex\",\"expansion\",true,true,\"GAME DIR\",\"dded307173ad9bb62fe09a5084bb7d70c81639d3\",\"57f2ccad\",\"395180\"],\n\t\t[\"Arma 3 Marksmen\",\"mark\",true,true,\"GAME DIR\",\"eb956eb99f1a33cef4f825f8d52bc9ca9ef3d4cd\",\"d605b72\",\"332350\"],\n\t\t[\"Arma 3 Helicopters\",\"heli\",true,true,\"GAME DIR\",\"0e14ac1e91df7c56725b1dc9a939c50c5d93fd4c\",\"a6e7077f\",\"304380\"],\n\t\t[\"Arma 3 Karts\",\"kart\",true,true,\"GAME DIR\",\"f9bac1340520fc3a25c3c4c7b6c48efdba32d535\",\"9b1d75e8\",\"288520\"],\n\t\t[\"Arma 3 Zeus\",\"curator\",true,true,\"GAME DIR\",\"5cfb449d86e7b7e8529909ec1c0656d70e2cfda0\",\"4ccdcca0\",\"275700\"],\n\t\t[\"Arma 3\",\"A3\",true,true,\"GAME DIR\",\"\",\"\",\"0\"]]\n\t]\n*/"]},{"code":["private _modInfo = getLoadedModsInfo select 0;\n_modInfo params [\"_modname\", \"_modDir\", \"_isDefault\", \"_isOfficial\", \"_origin\", \"_hash\", \"_hashShort\", \"_itemID\"];"]}],"see_also":["allAddonsInfo"]},{"name":"getMagazineCargo","title":"getMagazineCargo","type":"command","url":"https://community.bistudio.com/wiki/getMagazineCargo","revid":379517,"updated":"2026-10-31T00:29:17Z","groups":["Vehicle Inventory","Containers"],"status":"ok","games":{"arma2oa":"1.54","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.54","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns all magazines types and count from the cargo space","syntaxes":[{"syntax":"getMagazineCargo object","params":[{"name":"object","type":"Object","description":"vehicle or ammo box","type_expr":"Object"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"[[\"5MagsType1\",\"10MagsType2\"],[5,10]]"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_content = getMagazineCargo carName;"]},{"code":["_content = getMagazineCargo ammoBoxName;"]},{"code":["hint str getMagazineCargo unitBackpack cursorTarget;"]}],"see_also":["magazinesAmmoCargo","magazineCargo","addMagazineCargo","addMagazineCargoGlobal","clearMagazineCargo","clearMagazineCargoGlobal"]},{"name":"getMarkerColor","title":"getMarkerColor","type":"command","url":"https://community.bistudio.com/wiki/getMarkerColor","revid":369401,"updated":"2024-09-03T18:43:21Z","groups":["Markers"],"status":"ok","games":{"ofp":"1.21","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.21","arma3_since":"0.50","description":"Returns marker color for given marker.\n\n> [!NOTE]\n> This command is identical to markerColor.","syntaxes":[{"syntax":"getMarkerColor markerName","params":[{"name":"markerName","type":"String","description":"marker name","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"markerName"}}],"examples":[{"code":["\"MarkerOne\" setMarkerColor \"ColorBlack\";\n_color = getMarkerColor \"MarkerOne\"; // returns \"ColorBlack\""]}],"see_also":["setMarkerColor","setMarkerColorLocal"]},{"name":"getMarkerPos","title":"getMarkerPos","type":"command","url":"https://community.bistudio.com/wiki/getMarkerPos","revid":377402,"updated":"2026-01-02T06:44:58Z","groups":["Markers"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Returns marker position.","syntaxes":[{"syntax":"getMarkerPos markerName","params":[{"name":"markerName","type":"String","type_expr":"String"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"format [x,y,0]"},"form":"unary","right":{"text":"markerName"}},{"syntax":"getMarkerPos [markerName, preserveElevation]","since":"arma3 1.94","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"preserveElevation","type":"Boolean","optional":true,"default":"false","type_expr":"Boolean","text":"preserveElevation: Boolean - (Optional, default false)"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"if preserveElevation is true or [x,y,0] if preserveElevation is false","text":"PositionAGL - if *preserveElevation* is true or [x,y,0] if *preserveElevation* is false"},"form":"unary","right":{"text":"[markerName, preserveElevation]"}}],"examples":[{"code":["_mPos1 = getMarkerPos \"markerOne\";"]},{"code":["_mPos2 = getMarkerPos [\"markerTwo\", true];"]}],"aliases":["markerPos"],"see_also":["setMarkerPos","setMarkerPosLocal"]},{"name":"getMarkerSize","title":"getMarkerSize","type":"command","url":"https://community.bistudio.com/wiki/getMarkerSize","revid":377676,"updated":"2026-01-02T09:02:39Z","groups":["Markers"],"status":"ok","games":{"ofp":"1.21","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.21","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the size of the given marker. A getter for setMarkerSize and an alias of markerSize.","syntaxes":[{"syntax":"getMarkerSize markerName","params":[{"name":"markerName","type":"String","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"with [a_axis, b_axis]\n- a_axis: Number - 1/2 width of marker - b_axis: Number - 1/2 height of marker","text":"Array with [a_axis, b_axis]\n\n- a_axis: Number - 1/2 width of marker\n- b_axis: Number - 1/2 height of marker"},"form":"unary","right":{"text":"markerName"}}],"examples":[{"code":["\"MarkerOne\" setMarkerSize [100,200];\n_size = getMarkerSize \"MarkerOne\"; //returns [100,200]"]}],"see_also":["setMarkerSize","setMarkerBrush","setMarkerColor","setMarkerDir","setMarkerPos","setMarkerShape","createMarker","setMarkerText","setMarkerType","setMarkerAlpha"]},{"name":"getMarkerType","title":"getMarkerType","type":"command","url":"https://community.bistudio.com/wiki/getMarkerType","revid":348864,"updated":"2023-11-08T14:39:13Z","groups":["Markers"],"status":"ok","games":{"ofp":"1.21","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.21","arma3_since":"0.50","locality":{"argument":"global"},"description":"Gets type of marker. See CfgMarkers for a list of standard markers.","syntaxes":[{"syntax":"getMarkerType markerName","params":[{"name":"markerName","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"marker class name. See CfgMarkers."},"form":"unary","right":{"text":"markerName"}}],"examples":[{"code":["if (getMarkerType \"Marker1\" == \"\") then { hint \"Marker1 is not an icon!\" };"]}],"aliases":["markerType"],"see_also":["setMarkerType","setMarkerTypeLocal","markerType"]},{"name":"getMass","title":"getMass","type":"command","url":"https://community.bistudio.com/wiki/getMass","revid":379346,"updated":"2026-10-30T23:54:18Z","groups":["PhysX"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","locality":{"argument":"global"},"description":"Returns mass of a PhysX object.","syntaxes":[{"syntax":"getMass object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_mass = getMass _myCar;"]}],"see_also":["getCenterOfMass","setCenterOfMass","setMass","load","weightRTD","getModelInfo"],"notes":[{"user":"Pierre MGI","date":"2015-04-15T20:15:00Z","text":"This function will return 0 for infantry AI units. That means a manned Blufor Hunter has the same mass than an empty one (8306.63).\nCrates return their initial mass, but if you empty them or load items, magazines and weapons, the mass remains the same. In fact, none of these (non-physx) objects has a mass."}]},{"name":"getMissionConfig","title":"getMissionConfig","type":"command","url":"https://community.bistudio.com/wiki/getMissionConfig","revid":341696,"updated":"2023-06-18T12:18:00Z","groups":["Config","Mission Information"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns Config entry for the given scenario attribute from the 1st tier. The attribute can be config class or config property. If it is defined in multiple places, the command checks them in the following order:\n\n1. External *Description.ext* file\n1. Eden Editor scenario attribute\n\nSo if attribute exists in both places, attribute from description.ext is used. Previously, scenario attributes were extracted from *Description.ext* using missionConfigFile. That still works, but it ignores attributes set directly in the editor and it should not be used anymore.","syntaxes":[{"syntax":"getMissionConfig attribute","params":[{"name":"attribute","type":"String","description":"attribute name","type_expr":"String"}],"returns":{"type":"Config","type_expr":"Config"},"form":"unary","right":{"text":"attribute"}}],"examples":[{"text":"```sqf\n_header = getMissionConfig \"Header\";\n```\n\nReturns scenario header config. Replaces the previous approach which would scan only the external *Description.ext* file, but ignore the value set in the Eden Editor:\n\n```sqf\n_header = missionConfigFile >> \"Header\"; // Old approach\n```","code":["_header = getMissionConfig \"Header\";","_header = missionConfigFile >> \"Header\"; // Old approach"]}],"see_also":["getMissionConfigValue","missionConfigFile","BIS_fnc_getParamValue","Mission Parameters"]},{"name":"getMissionConfigValue","title":"getMissionConfigValue","type":"command","url":"https://community.bistudio.com/wiki/getMissionConfigValue","revid":352827,"updated":"2024-02-22T21:48:04Z","groups":["Config","Mission Information"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns value of the given scenario attribute from the 1st tier. Since only config properties have values, the attribute should be config property.\nIf it is not found or config class is given, the return is nil. If the attribute defined in multiple places, the command checks them in the following order:\n\n1. Description.ext entry\n1. Eden Editor scenario attribute\n\nSo if an attribute exists in both places, the Description.ext value is used.\nPreviously, scenario attributes were extracted from Description.ext using missionConfigFile.\nThat still works, but it ignores attributes set directly in the editor and should not be used anymore.\n\n> [!IMPORTANT]\n> This command cannot force return type, it will return the value of the type given in config. Use isEqualType to additionally reaffirm the correct type if necessary to account for human error.","syntaxes":[{"syntax":"getMissionConfigValue attribute","params":[{"name":"attribute","type":"String","description":"attribute name","type_expr":"String"}],"returns":{"type":"Number, String, Boolean or Array","type_expr":"Number | String | Boolean | Array","description":"depending on the attribute value type. Nil when the attribute is undefined.","text":"Number, String, Boolean or Array, depending on the attribute value type. Nil when the attribute is undefined."},"form":"unary","right":{"text":"attribute"}},{"syntax":"getMissionConfigValue [attribute, defaultValue]","params":[{"name":"attribute","type":"String","description":"attribute name","type_expr":"String"},{"name":"defaultValue","type":"Anything","description":"value used when the attribute is undefined","type_expr":"Anything"}],"returns":{"type":"Number, String, Boolean or Array","type_expr":"Number | String | Boolean | Array","description":"depending on the attribute value type. Default value when the attribute is undefined.","text":"Number, String, Boolean or Array, depending on the attribute value type. Default value when the attribute is undefined."},"form":"unary","right":{"text":"[attribute, defaultValue]"}}],"examples":[{"text":"```sqf\nprivate _respawnDelay = getMissionConfigValue [\"respawnDelay\", 0];            // returns the real, defined respawn delay value\nprivate _respawnDelay = getNumber (missionConfigFile >> \"respawnDelay\");    // old approach, ignoring the Eden Editor-set value\n```","code":["private _respawnDelay = getMissionConfigValue [\"respawnDelay\", 0];\t\t\t// returns the real, defined respawn delay value\nprivate _respawnDelay = getNumber (missionConfigFile >> \"respawnDelay\");\t// old approach, ignoring the Eden Editor-set value"]}],"see_also":["getMissionConfig","missionConfigFile","BIS_fnc_getParamValue","Mission Parameters"]},{"name":"getMissionDLCs","title":"getMissionDLCs","type":"command","url":"https://community.bistudio.com/wiki/getMissionDLCs","revid":379079,"updated":"2026-09-27T07:33:06Z","groups":["Mission Information","DLC"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Returns list of DLCs that are used in the mission.\n\n> [!IMPORTANT]\n> The list is created from units listed in mission.sqm and does **not** detect units later created by scripts.","syntaxes":[{"syntax":"getMissionDLCs","params":[],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"list of DLCs detected for the mission"},"form":"nullary"}],"examples":[{"code":["_usedDLCs = getMissionDLCs; // returns e.g [\"Orange\",\"Enoch\",\"Expansion\",\"Heli\",\"Contact\",\"Mark\",\"Argo\",\"Jets\"]"]}],"see_also":["getDLCs","getObjectDLC","getPersonUsedDLCs","getDLCAssetsUsageByName","getDLCAssetsUsage","getAssetDLCInfo"]},{"name":"getMissionLayerEntities","title":"getMissionLayerEntities","type":"command","url":"https://community.bistudio.com/wiki/getMissionLayerEntities","revid":379518,"updated":"2026-10-31T00:29:25Z","groups":["Eden Editor","Mission Information"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","locality":{"server_exec":true},"description":"Returns all entities within the specific Eden Editor layer and its sub-layers.\nTo be used when the scenario is running, not in the editor workspace.\nUseful to disable/enable whole parts of the scenario if layers are used during mission design.\n\n> [!NOTE]\n> Default layers are not returned.","syntaxes":[{"syntax":"getMissionLayerEntities layerName","params":[{"name":"layerName","type":"String or Number","description":"String or Number\n\n- String - case-insensitive; layer name in the editor. If multiple layers with the same name are present in the scenario, the first found one is used\n- Number - layer ID in the editor","type_expr":"String | Number","text":"layerName: String or Number\n\n- String - case-insensitive; layer name in the editor. If multiple layers with the same name are present in the scenario, the first found one is used\n- Number - layer ID in the editor"}],"returns":{"type":"Array","type_expr":"Array","description":"with [objects, markers, Arma 3 v2.14 groups] (or empty array if the layer does not exist)","text":"Array with [objects, markers, Arma 3 v2.14 groups] (or empty array if the layer does not exist)"},"form":"unary","right":{"text":"layerName"}}],"examples":[{"code":["private _base = getMissionLayerEntities \"Base\";"]},{"text":"delete all objects within that layer after the player is over 800m away from _someObject:\n\n```sqf\nwaitUntil { sleep 1; (player distance _someObject) > 800 };\nprivate _simpleObjects = (getMissionLayerEntities \"Simple Objects\") select 0;\n{\n    deleteVehicle _x;\n} forEach _simpleObjects;\n```","code":["waitUntil { sleep 1; (player distance _someObject) > 800 };\nprivate _simpleObjects = (getMissionLayerEntities \"Simple Objects\") select 0;\n{\n\tdeleteVehicle _x;\n} forEach _simpleObjects;"]},{"code":["private _layer1337Entities = getMissionLayerEntities 1337;"]},{"code":["getMissionLayerEntities 42 params [[\"_objects\", []], [\"_markers\", []], [\"_groups\", []]];"]}],"see_also":["get3DENLayerEntities"],"notes":[{"user":"R3vo","date":"2016-10-26T15:27:00Z","text":"After an object was deleted from a layer, getMissionLayerEntities will return `<NULL-object>` for the deleted object."}]},{"name":"getMissionLayers","title":"getMissionLayers","type":"command","url":"https://community.bistudio.com/wiki/getMissionLayers","revid":377088,"updated":"2026-01-01T09:46:21Z","groups":["Mission Information"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns a list of all layers created in Eden Editor. Designed to be used during a scenario. Default layers (BLUFOR, OPFOR...) are not returned.","syntaxes":[{"syntax":"getMissionLayers","params":[],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"names of layers"},"form":"nullary"}],"examples":[{"code":["getMissionLayers; // [\"Electronics\",\"Camp Endurance\",\"UGV Workstation\",\"Comments\",\"Extraction Air\",\"Comments\",\"Extraction Ground\",\"Extraction\",\"test\"]"]}],"see_also":["getMissionLayerEntities"]},{"name":"getMissionOptions","title":"getMissionOptions","type":"command","url":"https://community.bistudio.com/wiki/getMissionOptions","revid":369753,"updated":"2024-10-08T15:08:55Z","groups":["System"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns various mission options","syntaxes":[{"syntax":"getMissionOptions","params":[],"returns":{"type":"HashMap","type_expr":"HashMap","description":"Containing the names and values of all options (see setMissionOptions)"},"form":"nullary"}],"examples":[{"code":["private _missionOptions = getMissionOptions;"]}],"see_also":["setMissionOptions","getResolution","getAudioOptionVolumes","getSubtitleOptions"]},{"name":"getMissionPath","title":"getMissionPath","type":"command","url":"https://community.bistudio.com/wiki/getMissionPath","revid":339107,"updated":"2023-04-26T10:54:34Z","groups":["System","Mission Information"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","description":"Returns mission root plus the filename in a form of filepath to be used with commands requiring absolute path such as playSound3D, drawIcon3D, createSimpleObject, etc.\nAny leading \"\\\" in the filename will be stripped as the mission root includes one already.","syntaxes":[{"syntax":"getMissionPath filename","params":[{"name":"filename","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"absolute path"},"form":"unary","right":{"text":"filename"}}],"examples":[{"code":["// returns e.g \"C:\\Users\\Username\\Documents\\Arma 3\\missions\\MissionName.Altis\\icons\\myIcon.paa\"\nprivate _path = getMissionPath \"icons\\myIcon.paa\";\nprivate _path = getMissionPath \"\\icons\\myIcon.paa\"; // leading \\ is also fine"]},{"code":["// returns e.g \"C:\\Users\\Username\\Documents\\Arma 3\\missions\\MissionName.Altis\\\" with the trailing \\\nprivate _root = getMissionPath \"\";"]}],"see_also":["missionConfigFile","playSound3D","drawIcon3D","createSimpleObject","Description.ext","playSoundUI"],"notes":[{"user":"Lou Montana","date":"2023-04-18T20:54:40Z","text":"Before the introduction of getMissionPath, absolute mission directory could be obtained as follow in config:\n\n```cpp\n__EXEC(MISSION_DIRECTORY = __FILE__ select [0, count __FILE__ - 15])\n// ...\ntexture = __EVAL(MISSION_DIRECTORY + \"subDirectory\\texture.paa\");\n```"}]},{"name":"getModelInfo","title":"getModelInfo","type":"command","url":"https://community.bistudio.com/wiki/getModelInfo","revid":352365,"updated":"2024-02-08T14:09:28Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","description":"Returns object's model info. Model path is suitable for use with createSimpleObject command.","syntaxes":[{"syntax":"getModelInfo object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"array in format [modelName, modelPath, hasSkeleton, placingPoint, mass]\n- modelName: String - For example \"car.p3d\" - modelPath: String - Full path to model. For example: \"a3\\data\\models\\car.p3d\" - hasSkeleton: Boolean - Returns whether the model has a skeleton (which usually means it's also animated) - Arma 3 v2.08 placingPoint: Vector3D - Placing point of the model in model coordinates. Placing point is always in format [0,0,z]. - Arma 3 v2.18 mass: Number - Mass defined in the p3d model","text":"Array - array in format [modelName, modelPath, hasSkeleton, placingPoint, mass]\n\n- modelName: String - For example \"car.p3d\"\n- modelPath: String - Full path to model. For example: \"a3\\data\\models\\car.p3d\"\n- hasSkeleton: Boolean - Returns whether the model has a skeleton (which usually means it's also animated)\n- Arma 3 v2.08 placingPoint: Vector3D - Placing point of the model in model coordinates. Placing point is always in format [0,0,z].\n- Arma 3 v2.18 mass: Number - Mass defined in the p3d model"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_modelInfo = getModelInfo player; // [\"b_soldier_03.p3d\", \"a3\\characters_f\\blufor\\b_soldier_03.p3d\", true, [0,0,0]]"]},{"code":["_modelInfo = getModelInfo cursorObject;"]},{"text":"Get Z ASL using placing point:\n\n```sqf\n_zASL = (heli modelToWorldWorld (getModelInfo heli select 3)) select 2;\n```","code":["_zASL = (heli modelToWorldWorld (getModelInfo heli select 3)) select 2;"]}],"see_also":["cursorObject","cursorTarget","createSimpleObject","getObjectType","getObjectTextures","objectParent","setVelocityTransformation","getUnitFreefallInfo","getEntityInfo","getMass"]},{"name":"getMousePosition","title":"getMousePosition","type":"command","url":"https://community.bistudio.com/wiki/getMousePosition","revid":378523,"updated":"2026-05-04T01:55:30Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","description":"Returns mouse position in UI coordinates.","syntaxes":[{"syntax":"getMousePosition","params":[],"returns":{"type":"Position2D","type_expr":"Position2D","description":"x and y UI coordinates of the mouse position"},"form":"nullary"}],"examples":[{"code":["getMousePosition params [\"_mouseX\", \"_mouseY\"];"]}],"see_also":["setMousePosition","ctrlSetMousePosition","ctrlMousePosition","ctrlMapCursor","reversedMouseY"]},{"name":"getMusicPlayedTime","title":"getMusicPlayedTime","type":"command","url":"https://community.bistudio.com/wiki/getMusicPlayedTime","revid":309232,"updated":"2022-05-04T10:20:06Z","groups":["Sounds"],"status":"ok","games":{"arma3":"1.78"},"since":"arma3 1.78","arma3_since":"1.78","description":"Returns elapsed time in seconds for currently playing music track.","syntaxes":[{"syntax":"getMusicPlayedTime","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["playMusic [\"LeadTrack06_F_Tank\", 0];\nonEachFrame {hintSilent str getMusicPlayedTime};"]}],"see_also":["addMusicEventHandler","playMusic"]},{"name":"getNumber","title":"getNumber","type":"command","url":"https://community.bistudio.com/wiki/getNumber","revid":322306,"updated":"2022-05-30T13:22:38Z","groups":["Config"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Extract number from config entry.","syntaxes":[{"syntax":"getNumber config","params":[{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["_value = getNumber (configFile >> \"CfgVehicles\" >> \"Thing\" >> \"maxSpeed\");"]}],"see_also":["configFile","a / b","configName","count","getArray","getText","inheritsFrom","isArray","isClass","isNumber","isText","select"],"notes":[{"user":"Donnervogel","date":"2007-03-03T04:45:00Z","text":"Use getNumber to get boolean values from a config entry. 1 equals true, 0 equals false."},{"user":"Loki","date":"2011-09-13T00:44:00Z","text":"With an not existing entry, getNumber returns 0."},{"user":"ffur2007slx2_5","date":"2014-03-28T07:53:00Z","text":"(Arma 3 1.14), It's recommended to use BIS_fnc_getCfgData or BIS_fnc_returnConfigEntry to get variable cfg data rather than conditioning via isNumber, isText, isArray, getNumber, getText and getArray combination.\nTraditional workaround:\n\n```sqf\nprivate _cfg = configFile >> \"CfgVehicles\" >> _SomeAddonClassName >> \"DestructionEffects\" >> \"Smoke1\" >> \"type\";\nswitch (true) do\n{\n    case (isNumber _cfg):    { getNumber _cfg };\n    case (isText _cfg):        { getText _cfg };\n    case (isArray _cfg):    { getArray _cfg };\n    default                    { nil };\n};\n```\n\n**Recommended workaround:**\n\n```sqf\n(configFile >> \"CfgVehicles\" >> _SomeAddonClassName >> \"DestructionEffects\" >> \"Smoke1\" >> \"type\") call BIS_fnc_getCfgData;\n```\n\nTo return default value once entry was not found, we can use BIS_fnc_returnConfigEntry instead of BIS_fnc_getCfgData.\n\n```sqf\n[(configFile >> \"CannonFire\" >> \"LightExp\"),\"lifeTime\",0] call BIS_fnc_returnConfigEntry; // 0.5\n```\n\nTo compose collected Number into Array, use BIS_fnc_getCfgDataArray instead.\n\n```sqf\n(configFile >> \"CfgVehicles\" >> _SomeAddonClassName >> \"DestructionEffects\" >> \"Smoke1\" >> \"type\") call BIS_fnc_getCfgDataArray;\n```\n\nTo retype collected Number into Boolean, use BIS_fnc_getCfgDataBool. Anything bigger than 0 is true, otherwise false.\n\n```sqf\n(configFile >> \"CfgVehicles\" >> _SomeAddonClassName >> \"DestructionEffects\" >> \"Smoke1\" >> \"type\") call BIS_fnc_getCfgDataBool;\n```"}]},{"name":"getObjectArgument","title":"getObjectArgument","type":"command","url":"https://community.bistudio.com/wiki/getObjectArgument","revid":376411,"updated":"2025-10-11T01:03:00Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return name of object argument in mission editor.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map getObjectArgument [object, argument]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"object","type":"Object","type_expr":"Object"},{"name":"argument","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"map"},"right":{"text":"[object, argument]"}}],"examples":[{"code":["// returns string \"[1009.0351, 1319.4928]\"\n(findDisplay 128 displayCtrl 51) getObjectArgument [\"_unit_1\", \"POSITION\"];\n\n// returns array [1009.0351, 1319.4928]\n(findDisplay 128 displayCtrl 51) evalObjectArgument [\"_unit_1\", \"POSITION\"];"]}]},{"name":"getObjectChildren","title":"getObjectChildren","type":"command","url":"https://community.bistudio.com/wiki/getObjectChildren","revid":363237,"updated":"2024-03-26T10:51:15Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return a list of all the children of the specified object.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map getObjectChildren object","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"object","type":"String","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array"},"form":"binary","left":{"text":"map"},"right":{"text":"object"}}],"examples":[{"text":"-"}]},{"name":"getObjectDLC","title":"getObjectDLC","type":"command","url":"https://community.bistudio.com/wiki/getObjectDLC","revid":369364,"updated":"2024-09-03T18:43:08Z","groups":["DLC"],"status":"ok","games":{"arma3":"1.36"},"since":"arma3 1.36","arma3_since":"1.36","locality":{"argument":"global"},"description":"Returns appID of the DLC the object belongs to or nil if object is vanilla.","syntaxes":[{"syntax":"getObjectDLC obj","params":[{"name":"obj","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number | Nothing","description":"(or Nothing if vanilla item)","text":"Number (or Nothing if vanilla item)"},"form":"unary","right":{"text":"obj"}}],"examples":[{"text":"```sqf\n_appID = getObjectDLC cursorTarget;\nif (!isNil \"_appID\") then {\n    hint format [\"This object belongs to DLC with id: %1\", _appID];\n} else {\n    hint \"This object is vanilla\";\n};\n```","code":["_appID = getObjectDLC cursorTarget;\nif (!isNil \"_appID\") then {\n\thint format [\"This object belongs to DLC with id: %1\", _appID];\n} else {\n\thint \"This object is vanilla\";\n};"]},{"text":"```sqf\n_akm = createSimpleObject [\"A3\\Weapons_F_Exp\\Rifles\\AKM\\AKM_F.p3d\",getPosASL player];\ngetObjectDLC _akm;    // 395180\n```","code":["_akm = createSimpleObject [\"A3\\Weapons_F_Exp\\Rifles\\AKM\\AKM_F.p3d\",getPosASL player];\ngetObjectDLC _akm;\t// 395180"]}],"see_also":["getDLCs","getPersonUsedDLCs","getMissionDLCs","getDLCAssetsUsageByName","getDLCAssetsUsage","getAssetDLCInfo"]},{"name":"getObjectFOV","title":"getObjectFOV","type":"command","url":"https://community.bistudio.com/wiki/getObjectFOV","revid":309149,"updated":"2022-05-03T14:11:55Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","description":"Returns Field of View of the given object in radians. Static objects return default value, which is 1.\nFOV of objNull is 0.\nObject FOV is indirectly connected with optics magnification or player view zoom, the narrower the angle the greater the zoom.\n\n> [!NOTE]\n> The FOV returned by this command doesn't change if user has custom FOV set in profile. Use it in combination with getResolution to adjust for the difference if required.","syntaxes":[{"syntax":"getObjectFOV object","params":[{"name":"object","type":"Object","description":"for units it queries unit weapon optics/zoom, for vehicles - vehicle optics/zoom","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"FOV in radians"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["private _objFOV = getObjectFOV player;"]},{"code":["private _objFOVinDegrees = deg getObjectFOV cursorObject;"]},{"text":"Perceived distance to an object:\n\n```sqf\nprivate _vdist = (player distance _obj) * (getObjectFOV player / 0.75);\n```","code":["private _vdist = (player distance _obj) * (getObjectFOV player / 0.75);"]}],"see_also":["getObjectType","getResolution"]},{"name":"getObjectID","title":"getObjectID","type":"command","url":"https://community.bistudio.com/wiki/getObjectID","revid":365078,"updated":"2024-07-19T18:20:06Z","groups":["Map"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns Visitor ID of the given object. Visitor IDs of static map objects can change if map is in development and updated with new static objects.","syntaxes":[{"syntax":"getObjectID object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"Visitor ID"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["getObjectID _tree;"]}],"see_also":["allUsers","getUserInfo","createMarker","createMarkerLocal","getPlayerID","nearestObject"]},{"name":"getObjectMaterials","title":"getObjectMaterials","type":"command","url":"https://community.bistudio.com/wiki/getObjectMaterials","revid":370528,"updated":"2025-01-01T23:24:06Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.38"},"since":"arma3 1.38","arma3_since":"1.38","locality":{"argument":"global"},"description":"Gets all custom materials associated with the object.","syntaxes":[{"syntax":"getObjectMaterials obj","params":[{"name":"obj","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"array of materials"},"form":"unary","right":{"text":"obj"}},{"syntax":"obj getObjectMaterials sels","since":"arma3 2.20","params":[{"name":"obj","type":"Object","description":"entity","type_expr":"Object"},{"name":"sels","type":"Array","description":"array of index(es) and/or selection(s). If array is empty [] - default object materials are returned (see example 3)","type_expr":"Array"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"array of materials in order of 'sels'. Non existing materials filled with nils."},"form":"binary","left":{"text":"obj"},"right":{"text":"sels"}}],"examples":[{"code":["_materials = getObjectMaterials car;"]},{"text":"```sqf\nplayer setObjectMaterial [\"insignia\", \"A3\\Structures_F\\Data\\Windows\\window_set.rvmat\"];\nplayer getObjectMaterials [\"insignia\", 0, 1, player, \"dskjhkjhsad\"];\n// [\"a3\\structures_f\\data\\windows\\window_set.rvmat\",\"\",\"a3\\structures_f\\data\\windows\\window_set.rvmat\",<null>,<null>]\n```","code":["player setObjectMaterial [\"insignia\", \"A3\\Structures_F\\Data\\Windows\\window_set.rvmat\"];\nplayer getObjectMaterials [\"insignia\", 0, 1, player, \"dskjhkjhsad\"]; \n// [\"a3\\structures_f\\data\\windows\\window_set.rvmat\",\"\",\"a3\\structures_f\\data\\windows\\window_set.rvmat\",<null>,<null>]"]},{"code":["player setObjectMaterial [0, \"a3\\structures_f\\data\\windows\\window_set.rvmat\"];\ngetObjectMaterials player; // [\"a3\\structures_f\\data\\windows\\window_set.rvmat\",\"\"]\nplayer getObjectMaterials []; // [\"\",\"\"]"]}],"see_also":["setObjectMaterial","setObjectTextureGlobal","getObjectTextures","setObjectTexture","setObjectMaterialGlobal"]},{"name":"getObjectProxy","title":"getObjectProxy","type":"command","url":"https://community.bistudio.com/wiki/getObjectProxy","revid":369337,"updated":"2024-09-03T18:43:00Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return the proxy object associated with the given editor object.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map getObjectProxy object","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"object","type":"String","type_expr":"String"}],"returns":{"type":"Object","type_expr":"Object"},"form":"binary","left":{"text":"map"},"right":{"text":"object"}}],"examples":[{"code":["(findDisplay 128 displayCtrl 51) getObjectProxy \"_unit_1\"\n// returns the object 'B 1-1-A:1 (Sean Johnson)'"]}],"see_also":["setObjectProxy"],"notes":[{"user":"Unknown","text":"classWorks in BIS RTE only?"}]},{"name":"getObjectScale","title":"getObjectScale","type":"command","url":"https://community.bistudio.com/wiki/getObjectScale","revid":364985,"updated":"2024-07-04T19:58:04Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Returns the render scale of an object relative to the original model.","syntaxes":[{"syntax":"getObjectScale object","params":[{"name":"object","type":"Object","description":"object to return scale of. Can also be a terrain object.","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"scale relative to the original model"},"form":"unary","right":{"text":"object"}}],"examples":[{"text":"```sqf\nprivate _objectScale = getObjectScale MyObject;\n\nif (_objectScale == 1) exitWith { systemChat \"Original scale\"; };\n\nif (_objectScale > 1) then\n{\n    systemChat \"Scaled up\";\n}\nelse\n{\n    systemChat \"Scaled down\";\n};\n```","code":["private _objectScale = getObjectScale MyObject;\n\nif (_objectScale == 1) exitWith { systemChat \"Original scale\"; };\n\nif (_objectScale > 1) then\n{\n\tsystemChat \"Scaled up\";\n}\nelse\n{\n\tsystemChat \"Scaled down\";\n};"]}],"see_also":["setObjectScale"],"notes":[{"user":"Sa-Matra","date":"2024-06-10T12:26:52Z","text":"Some objects can be scaled by XYZ individually by the engine. Rope segments are one example, they only scale by Z and this command returns average of all dimensions giving no real picture of the scale. You can get real scale of each dimension with:\n\n```sqf\n[vectorMagnitude vectorSideVisual _seg, vectorMagnitude vectorDirVisual _seg, vectorMagnitude vectorUpVisual _seg]\n```\n\nfor rope segment it will be something like `[1,1,1.54066]`"}]},{"name":"getObjectTextures","title":"getObjectTextures","type":"command","url":"https://community.bistudio.com/wiki/getObjectTextures","revid":370025,"updated":"2024-10-27T20:33:06Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.38"},"since":"arma3 1.38","arma3_since":"1.38","locality":{"argument":"global"},"description":"Gets all custom textures (hiddenSelectionsTextures) associated with the object.\n\n> [!IMPORTANT]\n> Prior to Arma 3 v2.20 it will return an empty Array when executed on simple objects.","syntaxes":[{"syntax":"getObjectTextures obj","params":[{"name":"obj","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"array of textures"},"form":"unary","right":{"text":"obj"}},{"syntax":"obj getObjectTextures sels","since":"arma3 2.20","params":[{"name":"obj","type":"Object","description":"entity","type_expr":"Object"},{"name":"sels","type":"Array","description":"array of index(es) and/or selection(s). If array is empty [] - default object textures are returned (see example 3)","type_expr":"Array"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"array of textures in order of 'sels'. Non existing textures filled with nils."},"form":"binary","left":{"text":"obj"},"right":{"text":"sels"}}],"examples":[{"code":["_textures = getObjectTextures player;"]},{"text":"```sqf\nplayer setObjectTexture [\"clan\", \"\\a3\\missions_f_epa\\data\\img\\orbat\\b_111_texture_ca.paa\"];\nplayer getObjectTextures [\"clan\", 1, 0, player, \"dskjhkjhsad\"];\n// [\"a3\\missions_f_epa\\data\\img\\orbat\\b_111_texture_ca.paa\",\"\",\"a3\\characters_f\\blufor\\data\\clothing1_co.paa\",<null>,<null>]\n```","code":["player setObjectTexture [\"clan\", \"\\a3\\missions_f_epa\\data\\img\\orbat\\b_111_texture_ca.paa\"];\nplayer getObjectTextures [\"clan\", 1, 0, player, \"dskjhkjhsad\"]; \n// [\"a3\\missions_f_epa\\data\\img\\orbat\\b_111_texture_ca.paa\",\"\",\"a3\\characters_f\\blufor\\data\\clothing1_co.paa\",<null>,<null>]"]},{"code":["player setObjectTexture [0, \"\"];\nplayer getObjectTextures []; // [\"a3\\characters_f\\blufor\\data\\clothing1_co.paa\",\"\"]"]}],"see_also":["setObjectTexture","setObjectTextureGlobal","getObjectMaterials","setObjectMaterial","setObjectMaterialGlobal","getModelInfo"]},{"name":"getObjectType","title":"getObjectType","type":"command","url":"https://community.bistudio.com/wiki/getObjectType","revid":348931,"updated":"2023-11-08T14:44:06Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","description":"Returns object type as a number:\n\n- 1 - Primary - Normal object placed in Visitor, part of landscape\n- 2 - Network - Road placed in Visitor, part of landscape\n- 4 - Temporary - Temporary object (like tracks)\n- 8 - TypeVehicle - Some entity added by game\n- 16 - TypeTempVehicle - Temporary entity\n- 32 - LandDecal - Land decal","syntaxes":[{"syntax":"getObjectType object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"object type"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_objType = getObjectType player;"]},{"code":["_objType = getObjectType cursorObject;"]}],"see_also":["allObjects","getObjectFOV","cursorObject","cursorTarget","createSimpleObject","allMissionObjects","setObjectViewDistance","getObjectViewDistance","objectParent","object"]},{"name":"getObjectViewDistance","title":"getObjectViewDistance","type":"command","url":"https://community.bistudio.com/wiki/getObjectViewDistance","revid":310797,"updated":"2022-05-07T20:21:54Z","groups":["System","Environment"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","description":"Gets the values of rendering distances of objects and shadows.","syntaxes":[{"syntax":"getObjectViewDistance","params":[],"returns":{"type":"Array","type_expr":"Array","description":"in format [objectDistance, shadowDistance]"},"form":"nullary"}],"examples":[{"code":["_arr = getObjectViewDistance;"]}],"see_also":["setObjectViewDistance","setViewDistance","viewDistance","setDetailMapBlendPars","setTerrainGrid"]},{"name":"getOpticsMode","title":"getOpticsMode","type":"command","url":"https://community.bistudio.com/wiki/getOpticsMode","revid":348464,"updated":"2023-11-08T13:00:19Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns the class name of the current optic mode of the current weapon.","syntaxes":[{"syntax":"unit getOpticsMode slot","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"slot","type":"Number","description":"can be one of:\n\n- 0 - Current weapon\n- 1 - Primary weapon\n- 2 - Secondary weapon\n- 3 - Handgun","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String","description":"class name of the current optic mode of the current weapon"},"form":"binary","left":{"text":"unit"},"right":{"text":"slot"}}],"examples":[{"code":["player getOpticsMode 0; // get current weapon's optic mode\nplayer getOpticsMode 1; // get primary weapon's optic mode\nplayer getOpticsMode 2; // get launcher's optic mode\nplayer getOpticsMode 3; // get handgun's optic mode"]}],"see_also":["setOpticsMode"]},{"name":"getOrDefault","title":"getOrDefault","type":"command","url":"https://community.bistudio.com/wiki/getOrDefault","revid":348340,"updated":"2023-11-08T12:59:48Z","groups":["HashMap"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Retrieves a value out of a HashMap after looking it up by its key. When the HashMap doesn't contain the key, the default value is returned","syntaxes":[{"syntax":"hashMap getOrDefault [key, defaultValue, setDefault]","params":[{"name":"hashMap","type":"HashMap","type_expr":"HashMap"},{"name":"key","type":"HashMapKey","description":"case sensitive key","type_expr":"HashMapKey"},{"name":"defaultValue","type":"Anything","optional":true,"default":"nil","type_expr":"Anything","text":"defaultValue: Anything - (Optional, default nil)"},{"name":"setDefault","type":"Boolean","optional":true,"default":"false","description":"if set to true and value does not exist in provided hash map, *defaultValue* will be added to the hash map","type_expr":"Boolean","since":"arma3 2.04","text":"setDefault: Boolean - (Optional, default false) if set to true and value does not exist in provided hash map, *defaultValue* will be added to the hash map"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"hashMap"},"right":{"text":"[key, defaultValue, setDefault]"}}],"examples":[{"code":["private _myValue = _myHashMap getOrDefault [\"a\", \"Not Found!\"];"]},{"code":["private _myValue = _hashMap getOrDefault [\"a\", \"Not Found!\", true]; // will add default value to the hash map if it does not exist"]},{"code":["private _array = _hashmap getOrDefault [_key, [], true]; // a new array will be created if it doesn't exist\n_array pushBack _item; // _item will be added to the array (the one in the hashmap is updated by reference)"]}],"see_also":["getOrDefaultCall","HashMap","get"]},{"name":"getOrDefaultCall","title":"getOrDefaultCall","type":"command","url":"https://community.bistudio.com/wiki/getOrDefaultCall","revid":378259,"updated":"2026-03-26T00:21:49Z","groups":["HashMap"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Retrieves a value from the HashMap for the given 'key', executes given 'code' if key was not found and returns result.\nAdditionally sets key to the code result value if *set* is true.","syntaxes":[{"syntax":"hashMap getOrDefaultCall [key, code, set]","params":[{"name":"hashMap","type":"HashMap","type_expr":"HashMap"},{"name":"key","type":"HashMapKey","description":"case-sensitive key","type_expr":"HashMapKey"},{"name":"code","type":"Code","optional":true,"default":"nil","description":"code to execute if the key does not exist","type_expr":"Code","text":"code: Code - (Optional, default nil) code to execute if the key does not exist"},{"name":"set","type":"Boolean","optional":true,"default":"false","description":"if true and value does not exist in the provided hash map, the result of the *code* execution is added to the hash map","type_expr":"Boolean","text":"set: Boolean - (Optional, default false) if true and value does not exist in the provided hash map, the result of the *code* execution is added to the hash map"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"hashMap"},"right":{"text":"[key, code, set]"}}],"examples":[{"code":["_hashmap getOrDefaultCall [123, { systemChat \"The key 123 does not exist and will be created and assigned 345\"; 345 }, true];"]}],"see_also":["getOrDefault","HashMap","get"]},{"name":"getOxygenRemaining","title":"getOxygenRemaining","type":"command","url":"https://community.bistudio.com/wiki/getOxygenRemaining","revid":379347,"updated":"2026-10-30T23:54:26Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns amount of remaining oxygen.","syntaxes":[{"syntax":"getOxygenRemaining unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_oxygen = getOxygenRemaining player;"]}],"see_also":["setOxygenRemaining"],"notes":[{"user":"Benargee","date":"2014-10-24T23:43:00Z","text":"Unit will die instantly at 0 oxygen unlike some other games that permit a certain amount of time after oxygen is depleted."}]},{"name":"getPersonUsedDLCs","title":"getPersonUsedDLCs","type":"command","url":"https://community.bistudio.com/wiki/getPersonUsedDLCs","revid":352086,"updated":"2024-02-01T23:24:46Z","groups":["Broken Commands","DLC"],"status":"broken","games":{"arma3":"1.36"},"since":"arma3 1.36","arma3_since":"1.36","locality":{"argument":"global"},"description":"Returns a list of all DLCs objects the unit is currently using. For example if a unit is inside a vehicle from DLC, it will return the code of that DLC.","syntaxes":[{"syntax":"getPersonUsedDLCs unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_objects = getPersonUsedDLCs player;"]}],"problems":"> [!WARNING]\n> This command does not work on a dedicated server.","see_also":["getDLCs","getObjectDLC","getMissionDLCs","getDLCAssetsUsageByName","getDLCAssetsUsage","getAssetDLCInfo"]},{"name":"getPhysicsCollisionFlag","title":"getPhysicsCollisionFlag","type":"command","url":"https://community.bistudio.com/wiki/getPhysicsCollisionFlag","revid":373902,"updated":"2025-06-26T12:11:11Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"global"},"description":"Returns the currently set physics collision flags.","syntaxes":[{"syntax":"getPhysicsCollisionFlag object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Booleans","type_expr":"Array<Boolean>","description":"array of collision flags (only one value is returned for now)"},"form":"unary","right":{"text":"object"}}],"see_also":["hideObject","isObjectHidden","setPhysicsCollisionFlag","disableCollisionWith","enableCollisionWith"]},{"name":"getPilotCameraDirection","title":"getPilotCameraDirection","type":"command","url":"https://community.bistudio.com/wiki/getPilotCameraDirection","revid":377256,"updated":"2026-01-02T06:32:48Z","groups":["Pilot Camera"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","locality":{"argument":"local"},"description":"Returns model space vector of the object airplane or helicopter pilotCamera .","syntaxes":[{"syntax":"getPilotCameraDirection object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Vector3D","type_expr":"Vector3D","description":"relative to the model centre (In a similar fashion to PositionRelative). Returns [0,0,0] if object has no pilotCamera."},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_pilotCamVector = getPilotCameraDirection vehicle player;"]}],"see_also":["hasPilotCamera","getPilotCameraPosition","getPilotCameraRotation","getPilotCameraTarget","setPilotCameraDirection","setPilotCameraRotation","setPilotCameraTarget"]},{"name":"getPilotCameraOpticsMode","title":"getPilotCameraOpticsMode","type":"command","url":"https://community.bistudio.com/wiki/getPilotCameraOpticsMode","revid":349193,"updated":"2023-11-08T14:50:40Z","groups":["Pilot Camera"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","locality":{"argument":"local"},"description":"Returns the optics mode index (zoom) for the pilotCamera","syntaxes":[{"syntax":"getPilotCameraOpticsMode object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"the index of the optic mode"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["getPilotCameraOpticsMode vehicle player"]}],"see_also":["setPilotCameraOpticsMode","hasPilotCamera","getPilotCameraPosition","getPilotCameraDirection","getPilotCameraRotation","setPilotCameraDirection","setPilotCameraRotation","setPilotCameraTarget","getPilotCameraTarget","getTurretOpticsMode","setTurretOpticsMode"]},{"name":"getPilotCameraPosition","title":"getPilotCameraPosition","type":"command","url":"https://community.bistudio.com/wiki/getPilotCameraPosition","revid":377379,"updated":"2026-01-02T06:43:43Z","groups":["Pilot Camera"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","locality":{"argument":"global"},"description":"Returns model space coordinates of the object airplane or helicopter pilotCamera.","syntaxes":[{"syntax":"getPilotCameraPosition object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative","description":"offset relative to the model centre. Returns [0,0,0] if object has no pilotCamera."},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_pilotCamPos = getPilotCameraPosition vehicle player;"]}],"see_also":["hasPilotCamera","getPilotCameraDirection","getPilotCameraRotation","getPilotCameraTarget","setPilotCameraDirection","setPilotCameraRotation","setPilotCameraTarget"]},{"name":"getPilotCameraRotation","title":"getPilotCameraRotation","type":"command","url":"https://community.bistudio.com/wiki/getPilotCameraRotation","revid":348962,"updated":"2023-11-08T14:45:40Z","groups":["Pilot Camera"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","locality":{"argument":"local"},"description":"Returns rotation (relative to the centered camera position) of the object airplane or helicopter pilotCamera .","syntaxes":[{"syntax":"getPilotCameraRotation object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"in format [yaw (turn), pitch (elevation)] - positive values are left yaw and down pitch from the center. Returns [0,0] when camera is centered but also if object has no pilotCamera.","text":"Array of Numbers in format [yaw (turn), pitch (elevation)] - positive values are left yaw and down pitch from the center. Returns [0,0] when camera is centered but also if object has no pilotCamera."},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_pilotCamRot = getPilotCameraRotation vehicle player;"]}],"see_also":["hasPilotCamera","getPilotCameraPosition","getPilotCameraDirection","getPilotCameraTarget","setPilotCameraDirection","setPilotCameraRotation","setPilotCameraTarget"]},{"name":"getPilotCameraTarget","title":"getPilotCameraTarget","type":"command","url":"https://community.bistudio.com/wiki/getPilotCameraTarget","revid":378360,"updated":"2026-04-03T16:01:12Z","groups":["Pilot Camera"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","locality":{"argument":"local"},"description":"Returns the target of the object airplane or helicopter pilotCamera tracking. Returns `[false, [0,0,0], objNull]` if camera is not in a tracking mode or if object has no pilotCamera.","syntaxes":[{"syntax":"getPilotCameraTarget object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [isTracking, targetPosition, targetObject]\n- isTracking: Boolean - returns whether the camera is in a tracking mode - targetPosition: PositionASL - returns the position of the tracked area or object - targetObject: Object - returns the tracked object, objNull if camera is only tracking an area","text":"Array with [isTracking, targetPosition, targetObject]\n\n- isTracking: Boolean - returns whether the camera is in a tracking mode\n- targetPosition: PositionASL - returns the position of the tracked area or object\n- targetObject: Object - returns the tracked object, objNull if camera is only tracking an area"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["getPilotCameraTarget vehicle player params [\"_pilotCamTracking\", \"_pilotCamTargetPos\", \"_pilotCamTarget\"];"]}],"see_also":["hasPilotCamera","getPilotCameraPosition","getPilotCameraDirection","getPilotCameraRotation","setPilotCameraDirection","setPilotCameraRotation","setPilotCameraTarget"]},{"name":"getPiPViewDistance","title":"getPiPViewDistance","type":"command","url":"https://community.bistudio.com/wiki/getPiPViewDistance","revid":309130,"updated":"2022-05-03T11:41:51Z","groups":["System"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"effect":"local"},"description":"Get the set PiP (Picture-in-Picture) view distance (that can be set by setPiPViewDistance).","syntaxes":[{"syntax":"getPiPViewDistance","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["private _pipViewDistance = getPiPViewDistance;"]},{"code":["private _pipViewDistanceRatio = getPiPViewDistance / viewDistance;"]}],"see_also":["setPiPViewDistance","setViewDistance","setObjectViewDistance","viewDistance","getObjectViewDistance"]},{"name":"getPlateNumber","title":"getPlateNumber","type":"command","url":"https://community.bistudio.com/wiki/getPlateNumber","revid":309220,"updated":"2022-05-03T22:51:33Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.82"},"since":"arma3 1.82","arma3_since":"1.82","description":"Get the license plates from any vehicle which has plates configured.","syntaxes":[{"syntax":"getPlateNumber vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["if (getPlateNumber vehicle player != \"H4X0RZ\") then { hint \"u no 1337 bro\" };"]}],"see_also":["setPlateNumber"]},{"name":"getPlayerChannel","title":"getPlayerChannel","type":"command","url":"https://community.bistudio.com/wiki/getPlayerChannel","revid":376827,"updated":"2025-11-23T01:44:27Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","locality":{"argument":"global"},"description":"Returns channel number for given player, **provided that player is SPEAKING**, otherwise -1. Having mic on is not enough, player has to make a sound. There are several limitations to this command:\n\n- It does not work on dedicated server, the return is always -1, only client can detect other client talking.\n- Prior to Arma 3 v2.01.146856 did not detect when someone talked on direct chat at all anywhere.\n- The client on which command is executed has to able to receive transmission before the transmission channel can be detected. For example if a player is not in the same group as a speaker and the speaker speaks on Group Channel, the player cannot hear the speaker and therefore cannot detect what channel the speaker is on.\n\nIn short, this command mimics the speaking icon from the UI. Correspondence between channel and number:\n\n| channel ID number correspondence |  |  |  |  |  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| N/A | Global | Side | Command | Group | Vehicle | Direct | Custom1 | .. | Custom10 | Arma 3 v2.22 Custom11 | .. | Custom50 |\n| -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | .. | 15 | 26 | .. | 65 |","syntaxes":[{"syntax":"getPlayerChannel player","params":[{"name":"player","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"channel ID"},"form":"unary","right":{"text":"player"}}],"examples":[{"code":["private _channelID = getPlayerChannel player;"]}],"see_also":["setCurrentChannel","currentChannel","enableChannel","channelEnabled","radioChannelCreate","radioChannelInfo"]},{"name":"getPlayerID","title":"getPlayerID","type":"command","url":"https://community.bistudio.com/wiki/getPlayerID","revid":310153,"updated":"2022-05-05T12:55:18Z","groups":["Multiplayer","Markers"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Returns user DirectPlay ID, which can be used with getUserInfo, and is found in allMapMarkers results and in some mission event handlers such as PlayerConnected.","syntaxes":[{"syntax":"getPlayerID unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"\"-1\" if object is not a player"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["getPlayerID player;"]}],"see_also":["allUsers","getUserInfo","createMarker","createMarkerLocal","getObjectID"]},{"name":"getPlayerScores","title":"getPlayerScores","type":"command","url":"https://community.bistudio.com/wiki/getPlayerScores","revid":376996,"updated":"2026-01-01T08:04:57Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns the unit's table of scores (infantry kills, soft vehicle kills, armor kills, air kills, deaths, total score) **in multiplayer** or an empty array in singleplayer.\n\n> [!IMPORTANT]\n> This command does not work (returns empty array) if the unit's side has been changed (e.g `[player] joinSilent createGroup east`).","syntaxes":[{"syntax":"getPlayerScores unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [killsInfantry, killsSoft, killsArmor, killsAir, score]\n- killsInfantry: Number - number of infantry units killed - killsSoft: Number - number of soft vehicles killed - killsArmor: Number - number of armored vehicles killed - killsAir: Number - number of air vehicles killed - score: Number - total score","text":"Array with [killsInfantry, killsSoft, killsArmor, killsAir, score]\n\n- killsInfantry: Number - number of infantry units killed\n- killsSoft: Number - number of soft vehicles killed\n- killsArmor: Number - number of armored vehicles killed\n- killsAir: Number - number of air vehicles killed\n- score: Number - total score"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"text":"```sqf\ngetPlayerScores BIS_player1;    // e.g [4, 0, 3, 1, 2, 16]\n                                // or in SP: []\n```","code":["getPlayerScores BIS_player1;\t// e.g [4, 0, 3, 1, 2, 16]\n\t\t\t\t\t\t\t\t// or in SP: []"]}],"see_also":["score","addScore","scoreSide","addScoreSide","addPlayerScores"]},{"name":"getPlayerUID","title":"getPlayerUID","type":"command","url":"https://community.bistudio.com/wiki/getPlayerUID","revid":353295,"updated":"2024-03-15T17:11:43Z","groups":["Multiplayer"],"status":"ok","games":{"arma2":"1.02","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.02","arma3_since":"0.50","locality":{"argument":"global"},"description":"Return a UniqueID of the given unit (player).\n\n> [!NOTE]\n> **Arma 3:** The returned string is the player's steamID64: `private _steamProfileUrl = \"http://steamcommunity.com/profiles/\" + (getPlayerUID player);`\n\n> [!IMPORTANT]\n> Prior to Arma 2: Operation Arrowhead v1.60, the result always consisted of a stringified number (see getPlayerUIDOld), but always had to be considered and processed as a String. Converting it to a Number could cause precision problems, as Number cannot accurately represent integers above 16777216 (224). Moreover, games since Arma 2: Operation Arrowhead v1.61 provide a value that is not all-numeric.\n\n> [!NOTE]\n> Prior to Arma 3 v2.02, in some cases the identity of certain player units could fail to propagate to other clients and the server, which caused isPlayer and getPlayerUID to incorrectly return `false` and `\"\"` respectively, where the affected units were not local. See [this bug report (GitHub)](https://github.com/michail-nikolaev/task-force-arma-3-radio/issues/1096) for more info. This was supposedly fixed, but you should remain vigilant toward false negatives nonetheless.","syntaxes":[{"syntax":"getPlayerUID unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"can be \"_SP_AI_\" or \"_SP_PLAYER_\" in SP, \"\" or UID in MP\n- The unique ID may be up to 100 characters long and may contain numbers, uppercase letters and underscores - The value can be used to construct a valid variable name by appending to another valid variable name, e.g `missionNamespace setVariable [\"TAG_player\" + _uid, _unit];`","text":"String - can be \"_SP_AI_\" or \"_SP_PLAYER_\" in SP, \"\" or UID in MP\n\n- The unique ID may be up to 100 characters long and may contain numbers, uppercase letters and underscores\n- The value can be used to construct a valid variable name by appending to another valid variable name, e.g `missionNamespace setVariable [\"TAG_player\" + _uid, _unit];`"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _uid = getPlayerUID player;"]}],"see_also":["BIS_fnc_getUnitByUID","getPlayerUIDOld","getClientState","getClientStateNumber"]},{"name":"getPlayerVoNVolume","title":"getPlayerVoNVolume","type":"command","url":"https://community.bistudio.com/wiki/getPlayerVoNVolume","revid":309253,"updated":"2022-05-04T10:54:22Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","locality":{"argument":"global"},"description":"Gets provided player's Voice over Network (VoN) volume.","syntaxes":[{"syntax":"getPlayerVoNVolume unit","params":[{"name":"unit","type":"Object","description":"the other player's unit","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"in range 0..1, -1 in case of error (e.g provided a non-human)","text":"Number in range 0..1, -1 in case of error (e.g provided a non-human)"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _volume = getPlayerVoNVolume (units player select 1);"]}],"see_also":["setPlayerVoNVolume","soundVolume","radioVolume","musicVolume"]},{"name":"getPos","title":"getPos","type":"command","url":"https://community.bistudio.com/wiki/getPos","revid":377527,"updated":"2026-01-02T06:52:50Z","groups":["Positions"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns object or location position. If the argument is an object, the return value is in format PositionAGLS.\nThe alternative syntax gets the position given distance and heading away from provided object or position - the command equivalent of BIS_fnc_relPos.\n\n> [!IMPORTANT]\n> Do **not** use this command's first syntax to get an object's position in 3D format:\n>\n> - the Z value from this command is **relative** to the surface underneath, and there is no compatible setter command to use it with;\n>   the commonly misused code: `_obj1 setPos getPos _obj2` is **absolutely wrong**\n> - this command is significantly **slower** than other position commands because it has to calculate the surface below a position from objects in the (2D) area; its performance therefore suffers from areas with a high density of objects such as cities, and can easily be ~20x slower than other, simpler position commands - see this benchmark.\n>\n> The **only** correct usage of this command is to determine the altitude of an object **from the surface below it** (see Example 4).","syntaxes":[{"syntax":"getPos object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionAGLS","type_expr":"PositionAGLS","description":"where Z is the height over the surface underneath"},"form":"unary","right":{"text":"object"}},{"syntax":"getPos location","params":[{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"see locationPosition"},"form":"unary","right":{"text":"location"}},{"syntax":"origin getPos [distance, heading]","since":"arma3 1.56","params":[{"name":"origin","type":"Object, Position2D or Position3D","type_expr":"Object | Position2D | Position3D"},{"name":"distance","type":"Number","description":"distance from position","type_expr":"Number"},{"name":"heading","type":"Number","description":"in which compass direction","type_expr":"Number"}],"returns":{"type":"PositionAGLS","type_expr":"PositionAGLS","description":"the Z value is terrain level Above Ground Level, either 0 over land or getTerrainHeightASL (negative value) over water","text":"PositionAGLS - the Z value is **terrain level Above Ground Level**, either 0 over land or getTerrainHeightASL (negative value) over water"},"form":"binary","left":{"text":"origin"},"right":{"text":"[distance, heading]"}}],"examples":[{"code":["hintSilent str getPos player;"]},{"text":"getPos vs. other methods (over sea). Pay attention to Z values:\n\n```sqf\ngetPos ship;                // [2412.01, 6036.33, -0.839965]\ngetPosATL ship;                // [2412.01, 6036.33, 19.4266]\ngetPosASL ship;                // [2412.01, 6036.33, -0.920066]\ngetPosASLW ship;            // [2412.01, 6036.33, -0.865981]\nvisiblePosition ship;        // [2412.02, 6036.33, -0.837952]\nvisiblePositionASL ship;    // [2412.02, 6036.33, -0.91798]\nposition ship;                // [2412.01, 6036.33, -0.839965]\n```","code":["getPos ship;\t\t\t\t// [2412.01, 6036.33, -0.839965]\ngetPosATL ship;\t\t\t\t// [2412.01, 6036.33, 19.4266]\ngetPosASL ship;\t\t\t\t// [2412.01, 6036.33, -0.920066]\ngetPosASLW ship;\t\t\t// [2412.01, 6036.33, -0.865981]\nvisiblePosition ship;\t\t// [2412.02, 6036.33, -0.837952]\nvisiblePositionASL ship;\t// [2412.02, 6036.33, -0.91798]\nposition ship;\t\t\t\t// [2412.01, 6036.33, -0.839965]"]},{"text":"getPos vs. other methods (over land, on top of a 100m high building). Pay attention to Z values:\n\n```sqf\ngetPos car;                    // [2508.64, 5681.47, 0.0609589]\ngetPosATL car;                // [2508.64, 5681.47, 100.0356369]\ngetPosASL car;                // [2508.64, 5681.47, 171.718]\ngetPosASLW car;                // [2508.64, 5681.47, 171.718]\nvisiblePosition car;        // [2508.64, 5681.47, 0.0609512]\nvisiblePositionASL car;        // [2508.64, 5681.47, 171.718]\nposition car;                // [2508.64, 5681.47, 0.0609589]\n```","code":["getPos car;\t\t\t\t\t// [2508.64, 5681.47, 0.0609589]\ngetPosATL car;\t\t\t\t// [2508.64, 5681.47, 100.0356369]\ngetPosASL car;\t\t\t\t// [2508.64, 5681.47, 171.718]\ngetPosASLW car;\t\t\t\t// [2508.64, 5681.47, 171.718]\nvisiblePosition car;\t\t// [2508.64, 5681.47, 0.0609512]\nvisiblePositionASL car;\t\t// [2508.64, 5681.47, 171.718]\nposition car;\t\t\t\t// [2508.64, 5681.47, 0.0609589]"]},{"text":"Determine if a free-falling unit is close enough to the surface (including buildings, aircraft carriers etc) below to deploy the parachute:\n\n```sqf\nwaitUntil { sleep 1; getPos player select 2 < 200 };\nhint \"Deploying a parachute might be a good idea\";\n```","code":["waitUntil { sleep 1; getPos player select 2 < 200 };\nhint \"Deploying a parachute might be a good idea\";"]},{"text":"Find position 100 metres and 45 degrees from player position:\n\n```sqf\nplayer getPos [100, 45];    // e.g [1834, 2230, 0] if resulting pos is over land\n                            // or [120, 256, -271] if resulting pos is over water\n```","code":["player getPos [100, 45];\t// e.g [1834, 2230, 0] if resulting pos is over land\n\t\t\t\t\t\t\t// or [120, 256, -271] if resulting pos is over water"]}],"see_also":["getPosVisual","getRelPos","setPos","Position","position","getPosATL","getPosASL","getPosASLW","visiblePosition","visiblePositionASL","getMarkerPos"],"notes":[{"user":"Dr_Eyeball","date":"2007-02-17T13:43:00Z","text":"`getPos obj select 2` might return the vertical position above ground level, but for a stacked object, it returns the vertical position above the object beneath it. The same problem existed for getPosASL (**pre-Arma 2 games only**). There was a *discussion* (dead link) thread in the BIS forums which suggested the use of the command modelToWorld instead to get around this issue where an absolute vertical position is required. ArmA Ver **1.02**."}]},{"name":"getPosASL","title":"getPosASL","type":"command","url":"https://community.bistudio.com/wiki/getPosASL","revid":377441,"updated":"2026-01-02T06:46:51Z","groups":["Positions"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50","ofp":"1.99"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the object position height above sea level.","syntaxes":[{"syntax":"getPosASL object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionASL","type_expr":"PositionASL"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_aslPos = getPosASL player;"]},{"code":["hint format [\"position above sea level: %1\", (getPosASL player) select 2];"]}],"see_also":["getPosASLVisual","setPosASL","setPosASL2","position","getPos","getPosATL","getPosASLW","visiblePosition","visiblePositionASL","getTerrainHeightASL","setUnitFreefallHeight"],"notes":[{"user":"Dr Eyeball","date":"2007-02-23T07:38:00Z","text":"`getPosASL _obj select 2;` might sometimes return the vertical position above sea level, but over land for stacked objects, it returns the vertical position above the object beneath it or at least affected by this offset.\nThe same problem exists for getPos. There was a *discussion* (dead link) thread in the BIS forums which suggested the use of the command modelToWorld instead to get around this issue where an absolute vertical position is required. ArmA Ver **1.02**."},{"user":"SilentKiller","date":"2014-03-27T19:19:00Z","text":"According to Code Optimisation, this command is among the fastest (2x) and should be used (or getPosATL or, best performance-wise, getPosWorld) instead of getPos/position."}]},{"name":"getPosASLVisual","title":"getPosASLVisual","type":"command","url":"https://community.bistudio.com/wiki/getPosASLVisual","revid":377445,"updated":"2026-01-02T06:46:58Z","groups":["Object Manipulation","Render Time Scope"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global"},"description":"Returns an object's rendered ASL position (z value above sea level) in render time scope.","syntaxes":[{"syntax":"getPosASLVisual object","params":[{"name":"object","type":"Object","description":"name of the object","type_expr":"Object"}],"returns":{"type":"PositionASL","type_expr":"PositionASL"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["private _playerRenderedPosASL = getPosASLVisual player;"]}],"aliases":["visiblePositionASL"],"see_also":["getPosVisual","getPosATLVisual","getPosWorldVisual","visiblePositionASL","visiblePosition","position","getPos","getPosATL","getPosASL","getPosASLW"]},{"name":"getPosASLW","title":"getPosASLW","type":"command","url":"https://community.bistudio.com/wiki/getPosASLW","revid":377793,"updated":"2026-01-03T01:42:08Z","groups":["Positions"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the object position height above water surface (waves and pond objects included).","syntaxes":[{"syntax":"getPosASLW obj","params":[{"name":"obj","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionASLW","type_expr":"PositionASLW"},"form":"unary","right":{"text":"obj"}}],"examples":[{"code":["_pos = getPosASLW _diver;"]}],"see_also":["setPosASLW","position","getPos","getPosATL","getPosASL","visiblePosition","visiblePositionASL"]},{"name":"getPosATL","title":"getPosATL","type":"command","url":"https://community.bistudio.com/wiki/getPosATL","revid":377531,"updated":"2026-01-02T06:53:14Z","groups":["Positions"],"status":"ok","games":{"arma2":"1.03","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.03","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the position of an object relative to the terrain.","syntaxes":[{"syntax":"getPosATL object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionATL","type_expr":"PositionATL"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_objPosition = getPosATL player;"]}],"see_also":["getPosATLVisual","setPosATL","position","getPos","getPosASL","getPosASLW","visiblePosition","visiblePositionASL"]},{"name":"getPosATLVisual","title":"getPosATLVisual","type":"command","url":"https://community.bistudio.com/wiki/getPosATLVisual","revid":377529,"updated":"2026-01-02T06:53:11Z","groups":["Object Manipulation","Render Time Scope"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global"},"description":"Returns an object's rendered ATL position (z value above ground) in render time scope.","syntaxes":[{"syntax":"getPosATLVisual object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionATL","type_expr":"PositionATL"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_playerRenderedPosATL = getPosATLVisual player;"]}],"see_also":["getPosVisual","getPosASLVisual","getPosWorldVisual","visiblePositionASL","visiblePosition","position","getPos","getPosATL","getPosASL","getPosASLW"]},{"name":"getPosVisual","title":"getPosVisual","type":"command","url":"https://community.bistudio.com/wiki/getPosVisual","revid":377526,"updated":"2026-01-02T06:52:47Z","groups":["Object Manipulation","Render Time Scope"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global"},"description":"Returns an object's AGLS position in render time scope. Alias of visiblePosition.\n\n> [!IMPORTANT]\n> This command must **not** be used for actual 3D calculations. See getPos for more details.","syntaxes":[{"syntax":"getPosVisual object","params":[{"name":"object","type":"Object","description":"name of the object","type_expr":"Object"}],"returns":{"type":"PositionAGLS","type_expr":"PositionAGLS"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_playerRenderedPos = getPosVisual player;"]}],"see_also":["getPosASLVisual","getPosATLVisual","visiblePositionASL","visiblePosition","position","getPos","getPosATL","getPosASL","getPosASLW"]},{"name":"getPosWorld","title":"getPosWorld","type":"command","url":"https://community.bistudio.com/wiki/getPosWorld","revid":377455,"updated":"2026-01-02T06:47:19Z","groups":["Positions"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global"},"description":"Returns the provided object's model centre position ([0,0,0]) in PositionASL, rather than the transformed boundingCenter or LandContact vertices.","syntaxes":[{"syntax":"getPosWorld object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionASL","type_expr":"PositionASL","description":"the model's centre","text":"PositionASL - **the model's centre**"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_obj setPosWorld getPosWorld _obj;"]},{"code":["ATLToASL (_groundObj modelToWorld [0,0,0]) isEqualTo getPosWorld _groundObj; // true"]},{"text":"Wave height under a boat:\n\n```sqf\nprivate _h = ((boat modelToWorld [0,0,0]) vectorDiff getPosWorld boat) select 2;\n```","code":["private _h = ((boat modelToWorld [0,0,0]) vectorDiff getPosWorld boat) select 2;"]}],"see_also":["getPosWorldVisual","setPosWorld","position","getPosATL","getPosASL","getPosASLW","visiblePosition","visiblePositionASL","getMarkerPos","modelToWorld"]},{"name":"getPosWorldVisual","title":"getPosWorldVisual","type":"command","url":"https://community.bistudio.com/wiki/getPosWorldVisual","revid":377439,"updated":"2026-01-02T06:46:47Z","groups":["Object Manipulation","Render Time Scope"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","locality":{"argument":"global"},"description":"Returns the provided object's, model centre position in render version in format PositionASL, rather than transformed boundingCenter or LandContact vertices.","syntaxes":[{"syntax":"getPosWorldVisual object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionASL","type_expr":"PositionASL","description":"the model centre's position (see getPosWorld) in render scope","text":"PositionASL - **the model centre**'s position (see getPosWorld) in render scope"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_obj setPosWorld getPosWorldVisual _obj;"]},{"code":["_groundObj modelToWorldVisualWorld [0,0,0] isEqualTo getPosWorldVisual _groundObj; // true"]},{"code":["private _waveHeight = ((boat modelToWorldVisual [0,0,0]) vectorDiff getPosWorldVisual boat) select 2;"]}],"see_also":["getPosWorld","setPosWorld","visiblePosition","getPosATLVisual","getPosASLVisual","visiblePositionASL","modelToWorldVisual","modelToWorldVisualWorld"]},{"name":"getPylonMagazines","title":"getPylonMagazines","type":"command","url":"https://community.bistudio.com/wiki/getPylonMagazines","revid":379348,"updated":"2026-10-30T23:54:34Z","groups":["Vehicle Loadouts"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Return array of magazines on pylons.","syntaxes":[{"syntax":"getPylonMagazines vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"magazine names"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["getPylonMagazines vehicle player;"]}],"see_also":["Arma 3: Vehicle Loadouts","getCompatiblePylonMagazines","setAmmoOnPylon","ammoOnPylon","animatePylon","animateBay","setPylonsPriority","setPylonLoadout","magazinesAllTurrets"],"notes":[{"user":"AgentRev","date":"2017-05-12T19:58:00Z","text":"The indexes of the returned array's elements are relative to the pylon indexes, such that element 0 is pylon 1, element 1 is pylon 2, etc."},{"user":"Sa-Matra","date":"2024-05-04T05:13:58Z","text":"Just like getAllPylonsInfo this command returns last pylon state which can include non-existent magazine that was deleted with removeMagazineTurret"}]},{"name":"getRelDir","title":"getRelDir","type":"command","url":"https://community.bistudio.com/wiki/getRelDir","revid":379349,"updated":"2026-10-30T23:54:42Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","locality":{"argument":"global"},"description":"Returns direction, which is relative to object's current direction, from given object to another object or position in the range from 0 to 360, the equivalent of BIS_fnc_relativeDirTo.\nTaking the current direction of the object into account.","syntaxes":[{"syntax":"object getRelDir position","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"position","type":"Object, Position2D or Position3D","type_expr":"Object | Position2D | Position3D"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"object"},"right":{"text":"position"}}],"examples":[{"code":["_reldir = player getRelDir tank;"]},{"code":["// Set object's direction towards any given position\n_object setDir (getDir _object + (_object getRelDir [_x, _y, _z]))"]}],"see_also":["getDir","direction","getDirVisual"],"notes":[{"user":"Tankbuster","date":"2018-08-07T21:50:00Z","text":"To clarify, this returns a relative direction, so objects directly in front are said to be at zero degrees. So, taking example 1 above, if the tank is in front of the player, this function will return 0. If the tank is to the right of the player, it will return 90."}]},{"name":"getRelPos","title":"getRelPos","type":"command","url":"https://community.bistudio.com/wiki/getRelPos","revid":377397,"updated":"2026-01-02T06:44:48Z","groups":["Positions"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","locality":{"argument":"global"},"description":"Returns position that is given distance and relative direction away from original object. The alternative syntax available from Arma 3 v 2.14, returns the position offset of the attached object. If the animated memory point is used for attachment, the offset is calculated in render scope.","syntaxes":[{"syntax":"object getRelPos [distance, direction]","params":[{"name":"object","type":"Object","description":"object","type_expr":"Object"},{"name":"distance","type":"Number","description":"distance from object","type_expr":"Number"},{"name":"direction","type":"Number","description":"direction relative to object's current direction","type_expr":"Number"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL"},"form":"binary","left":{"text":"object"},"right":{"text":"[distance, direction]"}},{"syntax":"obj1 getRelPos obj2","since":"arma3 2.14","params":[{"name":"obj1","type":"Object","description":"parent object","type_expr":"Object"},{"name":"obj2","type":"Object","description":"attached object","type_expr":"Object"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative"},"form":"binary","left":{"text":"obj1"},"right":{"text":"obj2"}}],"examples":[{"text":"Find position 100 metres away at player's 3 o'clock:\n\n```sqf\n_relpos = player getRelPos [100, 90];\n```","code":["_relpos = player getRelPos [100, 90];"]}],"see_also":["getPos","getPosASLVisual","getPosATLVisual","visiblePositionASL","visiblePosition","position","getPosATL","getPosASL","getPosASLW"],"notes":[{"user":"talkingtoaj","date":"2016-03-03T15:53:00Z","text":"getPos vs getRelPos: getRelPos operates similarly to getPos except in getRelPos the direction is calculated 'relative' to the current object direction whereas getPos's direction is from North. Thus while getPos can take a position array as it is starting point, getRelPos requires an object with its own azimut heading."}]},{"name":"getRemoteSensorsDisabled","title":"getRemoteSensorsDisabled","type":"command","url":"https://community.bistudio.com/wiki/getRemoteSensorsDisabled","revid":310752,"updated":"2022-05-07T20:21:31Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.52"},"since":"arma3 1.52","arma3_since":"1.52","description":"Get status of disabled raycasts for remote entities. See disableRemoteSensors for detailed description.","syntaxes":[{"syntax":"getRemoteSensorsDisabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_status = getRemoteSensorsDisabled;"]}],"see_also":["disableRemoteSensors"]},{"name":"getRepairCargo","title":"getRepairCargo","type":"command","url":"https://community.bistudio.com/wiki/getRepairCargo","revid":379350,"updated":"2026-10-30T23:54:50Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"0.56"},"since":"arma3 0.56","arma3_since":"0.56","locality":{"argument":"global"},"description":"Returns the amount (1 is full) of repair resources in the cargo space of a repair vehicle.\n\n> [!NOTE]\n> Since Arma 3 v1.96 the return value for vehicles that are not configured to have ability to repair other vehicles is -1. (Prior to that the value was negative infinity)","syntaxes":[{"syntax":"getRepairCargo vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"repair cargo value, -1 if repair cargo is not supported, 0 if the vehicle is !alive or isNull"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["value = getRepairCargo vehicleName;"]}],"see_also":["setRepairCargo","getAmmoCargo","getFuelCargo"],"notes":[{"user":"AgentRev","date":"2014-12-22T17:17:00Z","text":"**Prior to Arma 3 v1.94** If the vehicle is not alive, it always returns Nothing, which you should check for using isNil.\nIf the vehicle is unable to carry that type of cargo, it returns -1.#IND, which you should check for using finite or < 0."},{"user":"DreadedEntity","date":"2022-04-24T06:13:18Z","text":"The repair cargo does actually reduce when a repair truck repairs something, however, the default cargo amount of 1 is so high it is functionally infinite. It's inconceivable that you would drain the pool. You would need to set the cargo to 10^-5 or 10^-6 (0.000001 or 0.0000001) before it is low enough to \"realistically\" run out given how physically large the storage pods on the trucks are"}]},{"name":"getResolution","title":"getResolution","type":"command","url":"https://community.bistudio.com/wiki/getResolution","revid":378509,"updated":"2026-05-03T17:11:30Z","groups":["System","GUI Control - Positioning"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","description":"Returns an array containing all information about current client screen resolution.\n\n> [!NOTE]\n> **Arma 3:** **Render resolution** is not returned by this command.\n> A sampling setting of **50%** means half of native width *and* half of native height, resulting in a render resolution of ***25%*** the original resolution.\n\n> [!IMPORTANT]\n> The engine default value for `fovTop` is **0.75** in case it is needed to calculate difference with custom FOV.\n\n> [!NOTE]\n> The `aspectRatio` is calculated as `fovLeft / fovTop` and should be the same as `screenW / screenH` for undistorted image if the FOV is custom. Some of the common values:\n>\n> | 16/9 | 16/10 | 5/4 | 4/3 | 16/9 triple screen |\n> |---|---|---|---|---|\n> | 1.777777(…) | 1.6 | 1.25 | 1.333333(…) | 5.333333(…) |","syntaxes":[{"syntax":"getResolution","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [screenW, screenH, viewPortW, viewPortH, aspectRatio, uiScale, fovTop, fovLeft, tripleHead, textureQuality]\n- screenW: Number - width of the screen in pixels - screenH: Number - height of the screen in pixels - viewPortW: Number - width of the 4:3 view port in pixels - viewPortH: Number - height of the 4:3 view port in pixels - aspectRatio: Number - screen aspect ratio - uiScale: Number - the scale of the UI, which affects view port size: Arma 3 | Very Small | Small | Normal | Large | Very Large | |---|---|---|---|---| | 0.47 | 0.55 | 0.7 | 0.85 | 1 | - Arma 3 v1.94 fovTop: Number - vertical FOV in radians, the same as `fovTop` value from the user profile - Arma 3 v1.94 fovLeft: Number - horizontal FOV in radians, the same as`fovLeft` value from the user profile - Arma 3 v1.94 tripleHead: Boolean - true if user has triple head screen (see also safeZoneXAbs, safeZoneWAbs) - Arma 3 v2.10 textureQuality: Number - current texture quality set in user preferences in 0..1 range, where 0 is lowest, 1 is highest","text":"Array with [screenW, screenH, viewPortW, viewPortH, aspectRatio, uiScale, fovTop, fovLeft, tripleHead, textureQuality]\n\n- screenW: Number - width of the screen in pixels\n- screenH: Number - height of the screen in pixels\n- viewPortW: Number - width of the **4:3** view port in pixels\n- viewPortH: Number - height of the **4:3** view port in pixels\n- aspectRatio: Number - screen aspect ratio\n- uiScale: Number - the scale of the UI, which affects view port size:\n\n**Arma 3**\n\n| Very Small | Small | Normal | Large | Very Large |\n|---|---|---|---|---|\n| 0.47 | 0.55 | 0.7 | 0.85 | 1 |\n\n- Arma 3 v1.94 fovTop: Number - vertical FOV in radians, the same as `fovTop` value from the user profile\n- Arma 3 v1.94 fovLeft: Number - horizontal FOV in radians, the same as`fovLeft` value from the user profile\n- Arma 3 v1.94 tripleHead: Boolean - true if user has triple head screen (see also safeZoneXAbs, safeZoneWAbs)\n- Arma 3 v2.10 textureQuality: Number - current texture quality set in user preferences in 0..1 range, where 0 is lowest, 1 is highest"},"form":"nullary"}],"examples":[{"text":"```sqf\nprivate _res = getResolution;\n```\n\nExample result with a single 16:9 monitor:\n\n```sqf\n[\n    1920,        // width\n    1080,        // height\n    792,        // 2D viewport width\n    594,        // 2D viewport height\n    1.77778,    // aspect ratio\n    0.55,        // UI scale\n    0.75,        // fovTop\n    1.33333,    // fovLeft\n    false        // tripleHead\n]\n```\n\nExample result with a triple 16:9 monitor setup:\n\n```sqf\n[\n    5760,        // width\n    1080,        // height\n    792,        // 2D viewport width\n    594,        // 2D viewport height\n    5.33333,    // aspect ratio\n    0.55        // UI scale\n]\n```\n\nExample result on a dedicated server:\n\n```sqf\n[\n    160,        // width\n    120,        // height\n    136,        // 2D viewport width\n    102,        // 2D viewport height\n    1.33333,    // aspect ratio\n    0.85        // UI scale\n]\n```","code":["private _res = getResolution;","[\n\t1920,\t\t// width\n\t1080,\t\t// height\n\t792,\t\t// 2D viewport width\n\t594,\t\t// 2D viewport height\n\t1.77778,\t// aspect ratio\n\t0.55,\t\t// UI scale\n\t0.75,\t\t// fovTop\n\t1.33333,\t// fovLeft\n\tfalse\t\t// tripleHead\n]","[\n\t5760,\t\t// width\n\t1080,\t\t// height\n\t792,\t\t// 2D viewport width\n\t594,\t\t// 2D viewport height\n\t5.33333,\t// aspect ratio\n\t0.55\t\t// UI scale\n]","[\n\t160,\t\t// width\n\t120,\t\t// height\n\t136,\t\t// 2D viewport width\n\t102,\t\t// 2D viewport height\n\t1.33333,\t// aspect ratio\n\t0.85\t\t// UI scale\n]"]}],"see_also":["getObjectFOV","worldToScreen","screenToWorld","safeZoneX","safeZoneY","safeZoneW","safeZoneH"],"notes":[{"user":"Tom_48_97","date":"2010-12-20T05:38:00Z","text":"This command can be useful to play a video (see this function BIS_fnc_playVideo) in the given format if you have compiled it for different UI scale."}]},{"name":"getRespawnVehicleInfo","title":"getRespawnVehicleInfo","type":"command","url":"https://community.bistudio.com/wiki/getRespawnVehicleInfo","revid":377795,"updated":"2026-01-03T03:52:04Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"global"},"description":"Returns various properties for the respawning vehicle (see Vehicle Respawn). All properties are synched over the network and should be the same on every client including JIP.","syntaxes":[{"syntax":"getRespawnVehicleInfo vehicle","params":[{"name":"vehicle","type":"Object","description":"transport","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [respawnDelay, respawnCount, deleteOldWreck, respawnOnServer, respawnFlying, respawnUnit, respawnMode, respawnSide, useRespawnMarkerDir, canRespawn, isRespawning, respawnMarkerName, respawnTimeRemaining, missionRespawnDelay, missionRespawnMode]\n- respawnDelay: Number - how long the vehicle will be in respawn queue after death. -1 - 'missionRespawnDelay' value is used. - respawnCount: Number - how many times left for the vehicle to respawn. -1 - indefinite, 0 - no more respawns - deleteOldWreck: Boolean - if true then the old wreck will be deleted when vehicle respawns. - respawnOnServer: Boolean - if true the wreck will be transfered to the server and vehicle will respawn on server. - respawnFlying: Boolean - if true vehicle will not be forced to the ground and if can fly and has pilot will be spawned flying. - respawnUnit: Object - pilot/driver unit that will be placed into the new vehicle. - respawnMode: Number - individual respawn mode for this vehicle. Any mode other than 2,3 or -1 means disabled respawn. -1 - use 'missionRespawnMode' - respawnSide: Side - what side markers to use for respawn. For example if 'respawnSide' set to east the markers with names 'respawn_vehicle_eastXXX' and 'respawn_eastXXX' will be used. - useRespawnMarkerDir: Boolean - align respawned vehicle with respawn marker direction or with wreck direction if no marker found or \"INSTANT\" mode is used. Otherwise, direction is random. - canRespawn: Boolean - true if vehicle is respawnable (all conditions for respawn are ok) - isRespawning: Boolean - true if vehicle is currently in the respawn queue awaiting respawn. - respawnMarkerName: String - Chosen vehicle respawn marker, when vehicle respawns it will use the marker params. The respawn marker is processed instantly uppon vehicle's death. - respawnTimeRemaining: Number - how long left before the respawn. -1 after vehicle has respawned or has respawn disabled. - missionRespawnDelay: Number - global mission vehicle respawn delay. script command > mission param > 3DEN param - missionRespawnMode: Number - global mission vehicle respawn mode. script command > mission param > 3DEN param","text":"Array with [respawnDelay, respawnCount, deleteOldWreck, respawnOnServer, respawnFlying, respawnUnit, respawnMode, respawnSide, useRespawnMarkerDir, canRespawn, isRespawning, respawnMarkerName, respawnTimeRemaining, missionRespawnDelay, missionRespawnMode]\n\n- respawnDelay: Number - how long the vehicle will be in respawn queue after death. -1 - 'missionRespawnDelay' value is used.\n- respawnCount: Number - how many times left for the vehicle to respawn. -1 - indefinite, 0 - no more respawns\n- deleteOldWreck: Boolean - if true then the old wreck will be deleted when vehicle respawns.\n- respawnOnServer: Boolean - if true the wreck will be transfered to the server and vehicle will respawn on server.\n- respawnFlying: Boolean - if true vehicle will not be forced to the ground and if can fly and has pilot will be spawned flying.\n- respawnUnit: Object - pilot/driver unit that will be placed into the new vehicle.\n- respawnMode: Number - individual respawn mode for this vehicle. Any mode other than 2,3 or -1 means disabled respawn. -1 - use 'missionRespawnMode'\n- respawnSide: Side - what side markers to use for respawn. For example if 'respawnSide' set to east the markers with names 'respawn_vehicle_eastXXX' and 'respawn_eastXXX' will be used.\n- useRespawnMarkerDir: Boolean - align respawned vehicle with respawn marker direction or with wreck direction if no marker found or \"INSTANT\" mode is used. Otherwise, direction is random.\n- canRespawn: Boolean - true if vehicle is respawnable (all conditions for respawn are ok)\n- isRespawning: Boolean - true if vehicle is currently in the respawn queue awaiting respawn.\n- respawnMarkerName: String - Chosen vehicle respawn marker, when vehicle respawns it will use the marker params. The respawn marker is processed instantly uppon vehicle's death.\n- respawnTimeRemaining: Number - how long left before the respawn. -1 after vehicle has respawned or has respawn disabled.\n- missionRespawnDelay: Number - global mission vehicle respawn delay. script command > mission param > 3DEN param\n- missionRespawnMode: Number - global mission vehicle respawn mode. script command > mission param > 3DEN param"},"form":"unary","right":{"text":"vehicle"}},{"syntax":"vehicle getRespawnVehicleInfo index","params":[{"name":"vehicle","type":"Object","description":"transport","type_expr":"Object"},{"name":"index","type":"Number","description":"property index (see main syntax, for example 10 for isRespawning)","type_expr":"Number"}],"returns":{"type":"Anything","type_expr":"Anything","description":"depends on the requested property, or Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"index"}}],"examples":[{"code":["private _vehInfo = getRespawnVehicleInfo veh1;"]},{"code":["private _isRespawning = veh1 getRespawnVehicleInfo 10;"]}],"see_also":["Vehicle Respawn","respawnVehicle","playerRespawnTime","getEntityInfo"]},{"name":"getRoadInfo","title":"getRoadInfo","type":"command","url":"https://community.bistudio.com/wiki/getRoadInfo","revid":377688,"updated":"2026-01-02T09:03:05Z","groups":["Roads and Airports"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns road piece information.\n\n> [!NOTE]\n> - Bridges are special case. Only large bridges are part of Road Net. Small pedestrian bridges are not recognized as roads. Bridge \"mapType\" is `\"ROAD\"` so the best way to detect bridges is to check \"isBridge\" value. Bridges are not part of new roads and don't have the same info as other new roads, so only \"mapType\", \"texture\" (maybe \"textureEnd\"), \"begPos\", \"endPos\" and \"isBridge\" are updated.\n> - Pedestrian roads \"mapType\" is usually `\"TRAIL\"`. They are part of Road Net but excluded from path finding. Use roadsConnectedTo with alternative flag to find the connections between pedestrian roads.","syntaxes":[{"syntax":"getRoadInfo road","params":[{"name":"road","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [mapType, width, isPedestrian, texture, textureEnd, material, begPos, endPos, isBridge, AIpathOffset]\n- mapType: String - road segment type, could be `\"HIDE\"`, `\"ROAD\"`, `\"MAIN ROAD\"`, `\"TRACK\"`, `\"TRAIL\"` (see nearestTerrainObjects) - width: Number - road segment width - isPedestrian: Boolean - when true road is for pedestrian use only - texture: String - road segment surface texture - textureEnd: String - road segment surface texture - material: String - road segment surface material - begPos: PositionASL - start of the road segment - endPos: PositionASL - finish of the road segment - isBridge: Boolean - when true road segment is a bridge - Arma 3 v2.12 AIpathOffset: Number - config value of `AIpathOffset`","text":"Array with [mapType, width, isPedestrian, texture, textureEnd, material, begPos, endPos, isBridge, AIpathOffset]\n\n- mapType: String - road segment type, could be `\"HIDE\"`, `\"ROAD\"`, `\"MAIN ROAD\"`, `\"TRACK\"`, `\"TRAIL\"` (see nearestTerrainObjects)\n- width: Number - road segment width\n- isPedestrian: Boolean - when true road is for pedestrian use only\n- texture: String - road segment surface texture\n- textureEnd: String - road segment surface texture\n- material: String - road segment surface material\n- begPos: PositionASL - start of the road segment\n- endPos: PositionASL - finish of the road segment\n- isBridge: Boolean - when true road segment is a bridge\n- Arma 3 v2.12 AIpathOffset: Number - config value of `AIpathOffset`"},"form":"unary","right":{"text":"road"}}],"examples":[{"code":["private _info = getRoadInfo _road;\n_info params [\"_mapType\", \"_width\", \"_isPedestrian\", \"_texture\", \"_textureEnd\", \"_material\", \"_begPos\", \"_endPos\", \"_isBridge\"];\nprivate _roadDirection = _begPos getDir _endPos;"]}],"see_also":["nearRoads","roadsConnectedTo","isOnRoad","roadAt","nearestTerrainObjects"]},{"name":"getRotorBrakeRTD","title":"getRotorBrakeRTD","type":"command","url":"https://community.bistudio.com/wiki/getRotorBrakeRTD","revid":379529,"updated":"2026-10-31T00:50:58Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Returns the state of the rotor brake.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"getRotorBrakeRTD helicopter","params":[{"name":"helicopter","type":"Object","type_expr":"Object","text":"helicopter : Object"}],"returns":{"type":"Number","type_expr":"Number","description":"rotor brake state, see setRotorBrakeRTD"},"form":"unary","right":{"text":"helicopter"}}],"examples":[{"code":["_brakeState = getRotorBrakeRTD _heli;"]}],"see_also":["setRotorBrakeRTD"]},{"name":"getSelectionBones","title":"getSelectionBones","type":"command","url":"https://community.bistudio.com/wiki/getSelectionBones","revid":369782,"updated":"2024-10-08T15:09:02Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns an array of bone names to which the specified selection is attached.\n\n> [!IMPORTANT]\n> This command is relatively slow because it searches in all vertices of every bone.","syntaxes":[{"syntax":"object getSelectionBones [selectionName, LOD]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"selectionName","type":"String","type_expr":"String"},{"name":"LOD","type":"String or Number","description":"can be one of:\n\n- `\"Memory\"`\n- `\"Geometry\"`\n- `\"FireGeometry\"`\n- `\"LandContact\"`\n- `\"HitPoints\"`\n- `\"ViewGeometry\"`\n\nWhen Number is used, command searches for a LOD with the same LOD resolution","type_expr":"String | Number"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"array of bone names"},"form":"binary","left":{"text":"object"},"right":{"text":"[selectionName, LOD]"}}],"see_also":["selectionPosition","selectionNames","getBoneNames"]},{"name":"getSensorTargets","title":"getSensorTargets","type":"command","url":"https://community.bistudio.com/wiki/getSensorTargets","revid":310341,"updated":"2022-05-05T17:07:32Z","groups":["Sensors"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"argument":"local"},"description":"Returns vehicle sensors' potential targets.","syntaxes":[{"syntax":"getSensorTargets vehicle","params":[{"name":"vehicle","type":"Object","description":"the sensors-equipped vehicle","type_expr":"Object"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"format [[target, type, relationship, sensor], ...]:\n- target: Object - type: String - can be one of: - \"unknown\" - \"footmobile\" - \"air\" - \"ground\" - \"laserTarget\" - \"irTarget\" - \"radarTarget\" - relationship: String - can be one of: - \"friendly\" - \"enemy\" - \"destroyed\" - \"unknown\" - sensor: Array of Strings - among the following values: - \"ir\" - \"nv\" - \"laser\" - \"activeradar\" - \"passiveradar\" - \"man\" - \"visual\" - \"datalink\"","text":"Array of Arrays format [[target, type, relationship, sensor], ...]:\n\n- target: Object\n- type: String - can be one of:\n  - \"unknown\"\n  - \"footmobile\"\n  - \"air\"\n  - \"ground\"\n  - \"laserTarget\"\n  - \"irTarget\"\n  - \"radarTarget\"\n- relationship: String - can be one of:\n  - \"friendly\"\n  - \"enemy\"\n  - \"destroyed\"\n  - \"unknown\"\n- sensor: Array of Strings - among the following values:\n  - \"ir\"\n  - \"nv\"\n  - \"laser\"\n  - \"activeradar\"\n  - \"passiveradar\"\n  - \"man\"\n  - \"visual\"\n  - \"datalink\""},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"text":"```sqf\nprivate _radarTargets = getSensorTargets vehicle player;\n/*\n    returns e.g\n    [\n        [O Alpha 1-3:1, \"air\", \"unknown\", [\"ir\", \"activeradar\", \"visual\"]],\n        [17750112040# 163957: apc_tracked_01_aa_f.p3d, \"ground\", \"unknown\", [\"datalink\"]]\n    ]\n*/\n```","code":["private _radarTargets = getSensorTargets vehicle player;\n/*\n\treturns e.g\n\t[\n\t\t[O Alpha 1-3:1, \"air\", \"unknown\", [\"ir\", \"activeradar\", \"visual\"]],\n\t\t[17750112040# 163957: apc_tracked_01_aa_f.p3d, \"ground\", \"unknown\", [\"datalink\"]]\n\t]\n*/"]}],"see_also":["getSensorThreats","listVehicleSensors","listRemoteTargets"]},{"name":"getSensorThreats","title":"getSensorThreats","type":"command","url":"https://community.bistudio.com/wiki/getSensorThreats","revid":373682,"updated":"2025-06-12T15:41:21Z","groups":["Sensors"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"argument":"local"},"description":"Returns vehicle sensors' threats.","syntaxes":[{"syntax":"getSensorThreats vehicle","params":[{"name":"vehicle","type":"Object","description":"the sensors-equipped vehicle","type_expr":"Object"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"format [[object, type, sensor], ...]:\n- object: Object - type: String - can be one of: - \"missile\" - \"marked\" - \"locked\" - sensors: Array of Strings - values can be: - \"ir\" - \"laser\" - \"missile\" - \"radar\" (not \"activeradar\"/\"passiveradar\") - \"visual\"","text":"Array of Arrays - format [[object, type, sensor], ...]:\n\n- object: Object\n- type: String - can be one of:\n  - \"missile\"\n  - \"marked\"\n  - \"locked\"\n- sensors: Array of Strings - values can be:\n  - \"ir\"\n  - \"laser\"\n  - \"missile\"\n  - \"radar\" (**not** \"activeradar\"/\"passiveradar\")\n  - \"visual\""},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"text":"```sqf\nprivate _dangers = getSensorThreats vehicle player;\n/*\n    returns e.g\n    [\n        [164230: titan_missile_atl_fly.p3d, \"missile\", [\"visual\"]],\n        [164233: titan_missile_atl_fly.p3d, \"threatmissile\", [\"radar\"]]\n    ]\n*/\n```","code":["private _dangers = getSensorThreats vehicle player;\n/*\n\treturns e.g\n\t[\n\t\t[164230: titan_missile_atl_fly.p3d, \"missile\", [\"visual\"]],\n\t\t[164233: titan_missile_atl_fly.p3d, \"threatmissile\", [\"radar\"]]\n\t]\n*/"]}],"see_also":["getSensorTargets","listVehicleSensors","listRemoteTargets"]},{"name":"getServerInfo","title":"getServerInfo","type":"command","url":"https://community.bistudio.com/wiki/getServerInfo","revid":373696,"updated":"2025-06-17T13:55:14Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"2.20"},"since":"arma3 2.20","arma3_since":"2.20","locality":{"server_exec":true},"description":"Get the current server instance's settings from server config.\n\n> [!NOTE]\n> Player-hosted (non-dedicated) servers have fewer entries as they do not use a server config file.","syntaxes":[{"syntax":"getServerInfo","params":[],"returns":{"type":"HashMap","type_expr":"HashMap"},"form":"nullary"}],"examples":[{"text":"```sqf\nprivate _serverInfo = getServerInfo;\n\n// example result:\n/*\n[\n    [\"admins\", [\"01234\", \"56789\"]],\n    [\"autoSelectMission\", false],\n    [\"battlEye\", false],\n    [\"disconnectTimeout\", 0],\n    [\"estimateTimeLeft\", 15],\n    [\"forcedDifficulty\", \"Wolf\"],\n    [\"hasPasswordAdmin\", true],\n    [\"hostname\", \"Test Server\"],\n    [\"isLocked\", false],\n    [\"maxDesync\", 90000],\n    [\"maxPacketLoss\", 2000],\n    [\"maxPing\", 8000],\n    [\"maxPlayers\", 64],\n    [\"missionHeader\", [[\"fileName\", \"DbgZeus4P.VR\"], [\"name\", \"DbgConsole4PZeus\"], [\"description\", \"\"], [\"fileSize\", \"7461\"], [\"steamId\", \"0\"], [\"fileCRC\", \"99816a4\"]]],\n    [\"motd\", []],\n    [\"overrideHazeQuality\", 0],\n    [\"password\", \"\"],\n    [\"persistent\", true],\n    [\"randomMissionOrder\", false],\n    [\"requiredBuild\", 0],\n    [\"verifySignatures\", 0],\n    [\"zeusCompositionScriptLevel\", 2]\n]\n*/\n```","code":["private _serverInfo = getServerInfo;\n\n// example result:\n/*\n[\n\t[\"admins\", [\"01234\", \"56789\"]],\n\t[\"autoSelectMission\", false],\n\t[\"battlEye\", false],\n\t[\"disconnectTimeout\", 0],\n\t[\"estimateTimeLeft\", 15],\n\t[\"forcedDifficulty\", \"Wolf\"],\n\t[\"hasPasswordAdmin\", true],\n\t[\"hostname\", \"Test Server\"],\n\t[\"isLocked\", false],\n\t[\"maxDesync\", 90000],\n\t[\"maxPacketLoss\", 2000],\n\t[\"maxPing\", 8000],\n\t[\"maxPlayers\", 64],\n\t[\"missionHeader\", [[\"fileName\", \"DbgZeus4P.VR\"], [\"name\", \"DbgConsole4PZeus\"], [\"description\", \"\"], [\"fileSize\", \"7461\"], [\"steamId\", \"0\"], [\"fileCRC\", \"99816a4\"]]],\n\t[\"motd\", []],\n\t[\"overrideHazeQuality\", 0],\n\t[\"password\", \"\"],\n\t[\"persistent\", true],\n\t[\"randomMissionOrder\", false],\n\t[\"requiredBuild\", 0],\n\t[\"verifySignatures\", 0],\n\t[\"zeusCompositionScriptLevel\", 2]\n]\n*/"]},{"text":"```sqf\nif (!isServer) exitWith {};\n\nif (getServerInfo get \"password\" != \"\") then\n{\n    [\"Welcome, I see you had the password ready!\"] remoteExec [\"hint\"];\n};\n```","code":["if (!isServer) exitWith {};\n\nif (getServerInfo get \"password\" != \"\") then\n{\n\t[\"Welcome, I see you had the password ready!\"] remoteExec [\"hint\"];\n};"]}],"see_also":["admin","allUsers","estimatedTimeLeft"]},{"name":"getShadowDistance","title":"getShadowDistance","type":"command","url":"https://community.bistudio.com/wiki/getShadowDistance","revid":319175,"updated":"2022-05-13T09:23:19Z","groups":["System","Environment"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Gets the shadows rendering distance.","syntaxes":[{"syntax":"getShadowDistance","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_value = getShadowDistance;"]}],"see_also":["setShadowDistance","isPipEnabled"]},{"name":"getShotInfo","title":"getShotInfo","type":"command","url":"https://community.bistudio.com/wiki/getShotInfo","revid":377707,"updated":"2026-01-02T09:03:44Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns various properties for the given shot.","syntaxes":[{"syntax":"getShotInfo shot","params":[{"name":"shot","type":"Object","description":"shot projectile","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [effectiveTimeToLive, fuseDistanceLeft, timeToExplosion, triggerIsForced, shownTracer, isReal, isSubmunitionTriggered, isSetForDeletion, shotParent, shotInstigator]\n- 0 - effectiveTimeToLive: Number - how much more shot has to live. - 1 - fuseDistanceLeft: Number - how long shot has to travel more to get fused (undebarrel grenade for example). - 2 - timeToExplosion: Number - how long before shot fuse explodes (hand grenade for example) Arma 3 v2.20 works on mines too. - 3 - triggerIsForced: Boolean - true if shot ammo was triggered with triggerAmmo. - 4 - shownTracer: Boolean - true if the shot shown as tracer. - 5 - isReal: Boolean - true if the shot is considered in damage events. - 6 - isSubmunitionTriggered: Boolean - true if the shot contains submunition and it is triggered. - 7 - isSetForDeletion: Boolean - true if the shot is already set for deletion but not yet removed from the scene. - 8 - Arma 3 v2.22 shotParent: Object - the vehicle that produced shot. - 9 - Arma 3 v2.22 shotInstigator: Object - the person who pulled the trigger.","text":"Array with [effectiveTimeToLive, fuseDistanceLeft, timeToExplosion, triggerIsForced, shownTracer, isReal, isSubmunitionTriggered, isSetForDeletion, shotParent, shotInstigator]\n\n- 0 - effectiveTimeToLive: Number - how much more shot has to live.\n- 1 - fuseDistanceLeft: Number - how long shot has to travel more to get fused (undebarrel grenade for example).\n- 2 - timeToExplosion: Number - how long before shot fuse explodes (hand grenade for example) Arma 3 v2.20 works on mines too.\n- 3 - triggerIsForced: Boolean - true if shot ammo was triggered with triggerAmmo.\n- 4 - shownTracer: Boolean - true if the shot shown as tracer.\n- 5 - isReal: Boolean - true if the shot is considered in damage events.\n- 6 - isSubmunitionTriggered: Boolean - true if the shot contains submunition and it is triggered.\n- 7 - isSetForDeletion: Boolean - true if the shot is already set for deletion but not yet removed from the scene.\n- 8 - Arma 3 v2.22 shotParent: Object - the vehicle that produced shot.\n- 9 - Arma 3 v2.22 shotInstigator: Object - the person who pulled the trigger."},"form":"unary","right":{"text":"shot"}},{"syntax":"shot getShotInfo index","params":[{"name":"shot","type":"Object","description":"shot projectile","type_expr":"Object"},{"name":"index","type":"Number","description":"property index (see main syntax, for example 1 for fuseDistanceLeft)","type_expr":"Number"}],"returns":{"type":"Anything","type_expr":"Anything","description":"depends on the requested property, or Nothing"},"form":"binary","left":{"text":"shot"},"right":{"text":"index"}}],"examples":[{"code":["private _shotInfo = getShotInfo shot1;"]},{"code":["private _fuseDistanceLeft = shot1 getShotInfo 1;"]}],"see_also":["getShotParents","missileTarget","triggerAmmo","getObjectType","getObjectTextures","objectParent","setVelocityTransformation","getUnitFreefallInfo","getEntityInfo","getModelInfo"]},{"name":"getShotParents","title":"getShotParents","type":"command","url":"https://community.bistudio.com/wiki/getShotParents","revid":378943,"updated":"2026-08-27T16:27:34Z","groups":["Weapons"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Returns shot information for the given projectile.\nIf shot was fired by a soldier on foot or in FFV position in vehicle, the soldier is returned for the vehicle.","syntaxes":[{"syntax":"getShotParents projectile","params":[{"name":"projectile","type":"Object","description":"the actual projectile shot","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"[vehicle, instigator] - Where vehicle is the vehicle the shot was fired from, and the instigator is the person who pulled the trigger"},"form":"unary","right":{"text":"projectile"}}],"examples":[{"code":["_shotParents = getShotParents myProjectile;"]},{"code":["batmobile addEventHandler [\"Fired\", { systemChat str getShotParents (_this select 6) }];"]}],"see_also":["setShotParents"]},{"name":"getSlingLoad","title":"getSlingLoad","type":"command","url":"https://community.bistudio.com/wiki/getSlingLoad","revid":319143,"updated":"2022-05-13T09:23:15Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Return object which is sling loaded by vehicle","syntaxes":[{"syntax":"getSlingLoad vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"the sling loaded vehicle. objNull if nothing is sling loaded."},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_cargo = getSlingLoad heli1;"]}],"see_also":["ropes","canSlingLoad","enableRopeAttach","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeLength","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind","setSlingLoad","slingLoadAssistantShown"]},{"name":"getSlotItemName","title":"getSlotItemName","type":"command","url":"https://community.bistudio.com/wiki/getSlotItemName","revid":353032,"updated":"2024-03-12T11:47:36Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","description":"Returns the name of assigned item in given slot or the empty string.","syntaxes":[{"syntax":"unit getSlotItemName slot","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"slot","type":"Number","description":"can be one of:\n\n- 603 - Goggles\n- 605 - Headgear\n- 608 - Map\n- 609 - Compass\n- 610 - Watch\n- 611 - Radio\n- 612 - GPS\n- 616 - HMD\n- 617 - Binoculars\n- 701 - Vest\n- 801 - Uniform\n- 901 - Backpack","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String","description":"item name"},"form":"binary","left":{"text":"unit"},"right":{"text":"slot"}}],"examples":[{"code":["hint (player getSlotItemName 610);"]}],"see_also":["assignedItems","assignItem","unassignItem","linkItem","unlinkItem","addItem","removeItem","removeAllAssignedItems","items","itemsWithMagazines","backpacks"]},{"name":"getSoundController","title":"getSoundController","type":"command","url":"https://community.bistudio.com/wiki/getSoundController","revid":319094,"updated":"2022-05-13T09:23:11Z","groups":["Sounds"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","description":"Returns value of the given sound controller.","syntaxes":[{"syntax":"vehicle getSoundController controller","params":[{"name":"vehicle","type":"Object","description":"must be a vehicle (does not work on soldiers)","type_expr":"Object"},{"name":"controller","type":"String","description":"name of sound controller, for example \"rpm\" or \"thrust\".","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"controller"}}],"examples":[{"code":["vehicle player getSoundController \"rpm\"; //600"]}],"see_also":["Arma 3: Sound","getAllSoundControllers","getSoundControllerResult","getEnvSoundController","getAllEnvSoundControllers","getCustomSoundController","setCustomSoundController","getCustomSoundControllerCount"]},{"name":"getSoundControllerResult","title":"getSoundControllerResult","type":"command","url":"https://community.bistudio.com/wiki/getSoundControllerResult","revid":323118,"updated":"2022-06-29T22:09:10Z","groups":["Sounds"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","description":"Returns the calculated value of simple expression defined in config. Config could be any config entry, even mission config entry. It is more important that the vehicle is a transport and not any object. If the expression contains sound controllers, the controller values will be taken from the given vehicle.","syntaxes":[{"syntax":"vehicle getSoundControllerResult config","params":[{"name":"vehicle","type":"Object","description":"transport vehicle","type_expr":"Object"},{"name":"config","type":"Config","description":"path to config entry containing the expression","type_expr":"Config"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"config"}}],"examples":[{"code":["_result = (vehicle player) getSoundControllerResult (configFile >> \"cfgVehicles\" >> typeOf (vehicle player) >> \"sounds\" >> \"idle_ext\" >> \"volume\");"]},{"code":["// mission config entry to reverse rain strength:\n// myExpression = \"rain factor [1,0]\";\n_result = \"PaperCar\" createVehicleLocal position player getSoundControllerResult (missionConfigFile >> \"myExpression\");"]}],"see_also":["Arma 3: Sound","getSoundController","getEnvSoundController","getAllEnvSoundControllers","getAllSoundControllers","getCustomSoundController","setCustomSoundController","getCustomSoundControllerCount"]},{"name":"getSpeed","title":"getSpeed","type":"command","url":"https://community.bistudio.com/wiki/getSpeed","revid":347558,"updated":"2023-09-28T09:45:46Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Get the speed for the given speed mode.\n\nSpeedMode can be:\n\n- \"AUTO\"\n- \"SLOW\"\n- \"NORMAL\"\n- \"FAST\"","syntaxes":[{"syntax":"object getSpeed speedMode","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"speedMode","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"m/s"},"form":"binary","left":{"text":"object"},"right":{"text":"speedMode"}}],"examples":[{"code":["_spd = player getSpeed \"FAST\";"]}],"see_also":["forceWalk","isWalking","forceSpeed","isForcedWalk"]},{"name":"getStamina","title":"getStamina","type":"command","url":"https://community.bistudio.com/wiki/getStamina","revid":363462,"updated":"2024-03-31T00:52:30Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","description":"Get current stamina (~ seconds until depletion)","syntaxes":[{"syntax":"getStamina unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["getStamina player;"]}],"see_also":["Arma 3: Stamina","setStamina","setFatigue","getFatigue"],"notes":[{"user":"Hypoxic125","date":"2024-03-31T00:52:30Z","text":"A naked player unit has 60 seconds of stamina."}]},{"name":"getStatValue","title":"getStatValue","type":"command","url":"https://community.bistudio.com/wiki/getStatValue","revid":347571,"updated":"2023-09-28T10:03:14Z","groups":["System"],"status":"ok","games":{"arma3":"1.18"},"since":"arma3 1.18","arma3_since":"1.18","description":"Returns value of the given stat.\nA list of possible StatNames can be found here: Arma 3: Stat Names","syntaxes":[{"syntax":"getStatValue name","params":[{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"(can return Nothing)"},"form":"unary","right":{"text":"name"}}],"examples":[{"code":["getStatValue \"ExpWarlockDown\"; // Checks if the \"Warlock Down\" Achivement was already aquired"]}],"see_also":["setStatValue","Arma 3: Stat Names"]},{"name":"getSteamFriendsServers","title":"getSteamFriendsServers","type":"command","url":"https://community.bistudio.com/wiki/getSteamFriendsServers","revid":309225,"updated":"2022-05-04T10:08:28Z","groups":["System"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns servers information of Steam friends currently playing the game.","syntaxes":[{"syntax":"getSteamFriendsServers","params":[],"returns":{"type":"Array of Array of Strings","type_expr":"Array<Array<String>>","description":"in format [ipAndPort, steamFriendName]","text":"Array of Array of Strings in format [ipAndPort, steamFriendName]"},"form":"nullary"}],"examples":[{"code":["getSteamFriendsServers; // returns e.g [[\"127.42.33.8:2302\", \"MyFriend\"], [\"127.84.66.16:4604\", \"My Best Friend\"]]"]}],"multiplayer":"> [!IMPORTANT]\n> Does **not** work in multiplayer - returns an empty array.","see_also":["isMultiplayer","connectToServer"]},{"name":"getSubtitleOptions","title":"getSubtitleOptions","type":"command","url":"https://community.bistudio.com/wiki/getSubtitleOptions","revid":309170,"updated":"2022-05-03T14:55:20Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"1.94"},"since":"arma3 1.94","arma3_since":"1.94","description":"Returns subtitles settings.","syntaxes":[{"syntax":"getSubtitleOptions","params":[],"returns":{"type":"Array of Booleans","type_expr":"Array<Boolean>","description":"options in format [subtitlesEnabled, radioSubtitlesEnabled]"},"form":"nullary"}],"examples":[{"code":["private _subtitleSettings = getSubtitleOptions;"]}],"see_also":["getAudioOptionVolumes","soundVolume","musicVolume","radioVolume","radioEnabled","shownSubtitles"]},{"name":"getSuppression","title":"getSuppression","type":"command","url":"https://community.bistudio.com/wiki/getSuppression","revid":320943,"updated":"2022-05-13T10:04:43Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","locality":{"argument":"local"},"description":"Gets the suppression value for the given unit. Returns varying Number between 0 and 1, or -1 if suppression is disabled (`disableAI \"SUPPRESSION\"`) or the suppression value is not available. Suppression is not calculated for player entities and is always 0, unless it is set with setSuppression. In this case the return value is the set value. Before Arma 3 v1.92 this command could return nil.\n\n> [!IMPORTANT]\n> The unit must not be objNull, must be local and alive","syntaxes":[{"syntax":"getSuppression unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"from 0 to 1, or -1 if suppression is not available."},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["getSuppression AI_unit_1;"]}],"see_also":["setSuppression","suppressFor","disableAI","enableAI"]},{"name":"getTerrainGrid","title":"getTerrainGrid","type":"command","url":"https://community.bistudio.com/wiki/getTerrainGrid","revid":353047,"updated":"2024-03-12T12:19:53Z","groups":["System","Environment"],"status":"ok","games":{"arma3":"1.60"},"since":"arma3 1.60","arma3_since":"1.60","description":"A getter for setTerrainGrid, returns the current terrain grid.","syntaxes":[{"syntax":"getTerrainGrid","params":[],"returns":{"type":"Number","type_expr":"Number","description":"terrain grid value"},"form":"nullary"}],"examples":[{"code":["_terrainGrid = getTerrainGrid;"]},{"text":"```sqf\nif (getTerrainGrid < 50) then\n{\n    hint \"Grass is enabled\";\n};\n```","code":["if (getTerrainGrid < 50) then\n{\n\thint \"Grass is enabled\";\n};"]}],"see_also":["setTerrainGrid","viewDistance","diag_getTerrainGrid"]},{"name":"getTerrainHeight","title":"getTerrainHeight","type":"command","url":"https://community.bistudio.com/wiki/getTerrainHeight","revid":377555,"updated":"2026-01-02T06:54:55Z","groups":["Positions"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns terrain height at the specified location.\n\n> [!NOTE]\n> Unlike getTerrainHeightASL which returns the exact position's height, this command returns the height at the closest terrain grid pixel to the provided position:\n>\n> ```sqf\n> private _cellWidth = getTerrainInfo # 2;\n> getTerrainHeightASL (_pos apply { _cellWidth * round (_x / _cellWidth) });\n> ```","syntaxes":[{"syntax":"getTerrainHeight positionWorld","params":[{"name":"positionWorld","type":"Position2D or Position3D","description":"world coordinates","type_expr":"Position2D | Position3D"}],"returns":{"type":"Number","type_expr":"Number","description":"terrain height"},"form":"unary","right":{"text":"positionWorld"}}],"examples":[{"code":["private _gridCellHeight = getTerrainHeight getPosWorld player;"]}],"see_also":["setTerrainHeight","getTerrainHeightASL","getTerrainInfo"]},{"name":"getTerrainHeightASL","title":"getTerrainHeightASL","type":"command","url":"https://community.bistudio.com/wiki/getTerrainHeightASL","revid":377799,"updated":"2026-01-03T03:59:49Z","groups":["Positions"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","description":"Returns the terrain height above the sea for the given position.","syntaxes":[{"syntax":"getTerrainHeightASL position","params":[{"name":"position","type":"Position2D or Position3D","description":"Position3D the Z value is ignored","type_expr":"Position2D | Position3D"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"position"}}],"examples":[{"code":["_height = getTerrainHeightASL (getPosATL player);"]},{"code":["_height = getTerrainHeightASL [5213,3245];"]},{"code":["_seaDepth = abs (getTerrainHeightASL getPosATL player); // sea depth at player's position"]}],"see_also":["setPosASL","getPosASL","getPosATL","ASLToATL","ATLToASL","getElevationOffset"]},{"name":"getTerrainInfo","title":"getTerrainInfo","type":"command","url":"https://community.bistudio.com/wiki/getTerrainInfo","revid":377882,"updated":"2026-01-04T16:22:56Z","groups":["Positions"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns the terrain heightmap information, as well as sea level offset (due to tides, if available).","syntaxes":[{"syntax":"getTerrainInfo","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [landGridWidth, landGridSize, terrainGridWidth, terrainGridSize, seaLevel]\n- landGridWidth: Number - width of each land grid, in meters - landGridSize: Number - number of land grid pixels - terrainGridWidth: Number width of each terrain grid, in meters (also known as \"cell size\") - terrainGridSize: Number - number of terrain grid pixels (also known as \"heightmap resolution\") - seaLevel: Number - sea level without waves. The value is `0` if tides are disabled. > [!NOTE] > - The result of `landGridWidth * landGridSize` and `terrainGridWidth * terrainGridSize` is always equal to the worldSize. > - \"land grid\" is used by the game for object placement (e.g. finding the nearestObject), dynamic simulation, etc. > - \"terrain grid\" is the actual terrain, used to display the terrain, calculate terrain height, surface normal, etc.","text":"Array with [landGridWidth, landGridSize, terrainGridWidth, terrainGridSize, seaLevel]\n\n- landGridWidth: Number - width of each land grid, in meters\n- landGridSize: Number - number of land grid pixels\n- terrainGridWidth: Number width of each terrain grid, in meters (also known as \"cell size\")\n- terrainGridSize: Number - number of terrain grid pixels (also known as \"heightmap resolution\")\n- seaLevel: Number - sea level without waves. The value is `0` if tides are disabled.\n\n> [!NOTE]\n> - The result of `landGridWidth * landGridSize` and `terrainGridWidth * terrainGridSize` is always equal to the worldSize.\n> - \"land grid\" is used by the game for object placement (e.g. finding the nearestObject), dynamic simulation, etc.\n> - \"terrain grid\" is the actual terrain, used to display the terrain, calculate terrain height, surface normal, etc."},"form":"nullary"}],"examples":[{"text":"```sqf\nprivate _terrainInfo = getTerrainInfo; // Stratis: [32,256,4,2048,0]; Altis: [30,1024,7.5,4096,0]\n```","code":["private _terrainInfo = getTerrainInfo; // Stratis: [32,256,4,2048,0]; Altis: [30,1024,7.5,4096,0] "]},{"text":"```sqf\n// Draws a 20x20 terrain grid when clicking on the map\n// Each triangle of the terrain is formed by a diagonal\n// that starts from the top-left corner of the cell and ends at the bottom-right corner.\n// The green lines show the cell diagonals\nonMapSingleClick {\n    getTerrainInfo params [\"\", \"\", \"_cellsize\", \"_resolution\"];\n    gridLines = [];\n    _pos apply { floor (_x / _cellsize) } params [\"_x0\", \"_y0\"];\n    for \"_x\" from ((_x0 - 10) max 0) to ((_x0 + 10) min _resolution) do\n    {\n        for \"_y\" from ((_y0 - 10) max 0) to ((_y0 + 10) min _resolution) do\n        {\n            private _p1 = [_x, _y] vectorMultiply _cellsize;        // bottom-left corner\n            private _p2 = [_x, _y + 1] vectorMultiply _cellsize;    // top-left corner\n            private _p3 = [_x + 1, _y] vectorMultiply _cellsize;    // bottom-right corner\n            // Positions are AGL, and Z value of 0 is already at the terrain surface (except on water surface).\n            // Just move them up a few centimeters so they're visible.\n            _p1 set [2, 0.1];\n            _p2 set [2, 0.1];\n            _p3 set [2, 0.1];\n\n            gridLines pushBack [_p1, _p2, [1,0,0,1]];\n            gridLines pushBack [_p1, _p3, [1,0,0,1]];\n            gridLines pushBack [_p2, _p3, [0,1,0,1]];\n        };\n    };\n\n    onEachFrame {\n        {\n            drawLine3D _x;\n        } forEach gridLines;\n    }\n};\n```","code":["// Draws a 20x20 terrain grid when clicking on the map\n// Each triangle of the terrain is formed by a diagonal\n// that starts from the top-left corner of the cell and ends at the bottom-right corner.\n// The green lines show the cell diagonals \nonMapSingleClick {\n\tgetTerrainInfo params [\"\", \"\", \"_cellsize\", \"_resolution\"];\n\tgridLines = [];\n\t_pos apply { floor (_x / _cellsize) } params [\"_x0\", \"_y0\"];\n\tfor \"_x\" from ((_x0 - 10) max 0) to ((_x0 + 10) min _resolution) do\n\t{\n\t\tfor \"_y\" from ((_y0 - 10) max 0) to ((_y0 + 10) min _resolution) do\n\t\t{\n\t\t\tprivate _p1 = [_x, _y] vectorMultiply _cellsize;\t\t// bottom-left corner\n\t\t\tprivate _p2 = [_x, _y + 1] vectorMultiply _cellsize;\t// top-left corner\n\t\t\tprivate _p3 = [_x + 1, _y] vectorMultiply _cellsize;\t// bottom-right corner\n\t\t\t// Positions are AGL, and Z value of 0 is already at the terrain surface (except on water surface). \n\t\t\t// Just move them up a few centimeters so they're visible.\n\t\t\t_p1 set [2, 0.1];\n\t\t\t_p2 set [2, 0.1];\n\t\t\t_p3 set [2, 0.1];\n\n\t\t\tgridLines pushBack [_p1, _p2, [1,0,0,1]];\n\t\t\tgridLines pushBack [_p1, _p3, [1,0,0,1]];\n\t\t\tgridLines pushBack [_p2, _p3, [0,1,0,1]];\n\t\t};\n\t};\n\n\tonEachFrame {\n\t\t{\n\t\t\tdrawLine3D _x;\n\t\t} forEach gridLines;\n\t}\n};"]}],"see_also":["getTerrainHeight","setTerrainHeight","worldSize"]},{"name":"getText","title":"getText","type":"command","url":"https://community.bistudio.com/wiki/getText","revid":341205,"updated":"2023-05-13T22:31:13Z","groups":["Config"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Extracts localized text from config entry, if entry is subject to localization, otherwise returns text value.\nTo obtain the translation key itself, see getTextRaw.","syntaxes":[{"syntax":"getText config","params":[{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"String","type_expr":"String","description":"text value"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["_text = getText (configFile >> \"CfgVehicles\" >> \"Thing\" >> \"icon\"); // \"Get in %1 as Driver\""]}],"see_also":["configFile","a / b","configName","count","getArray","getNumber","inheritsFrom","isArray","isClass","isNumber","isText","select","getTextRaw"],"notes":[{"user":"ffur2007slx2_5","date":"2014-03-28T07:52:00Z","text":"(Arma 3 1.14) It's recommended to use BIS_fnc_getCfgData or BIS_fnc_returnConfigEntry to get variable cfg data rather than conditioning via isNumber, isText, isArray, getNumber, getText and getArray combination.\nTraditional workaround:\n\n```sqf\n_cfg = configFile >> \"CfgVehicles\" >> _SomeAddonClassName >> \"DestructionEffects\" >> \"Smoke1\" >> \"type\";\nswitch ( true ) do\n{\n    case (isNumber _cfg): {getNumber _cfg};\n    case (isText _cfg): {getText _cfg};\n    case (isArray _cfg): {getArray _cfg;};\n    default { nil };\n};\n```\n\n**Recommended workaround:**\n\n```sqf\n(configFile >> \"CfgVehicles\" >> _SomeAddonClassName >> \"DestructionEffects\" >> \"Smoke1\" >> \"type\") call BIS_fnc_getCfgData;\n```\n\nTo return default value once entry was not found, we can use BIS_fnc_returnConfigEntry instead of BIS_fnc_getCfgData. e.g.\n\n```sqf\n[(configFile >> \"CannonFire\" >> \"LightExp\"),\"lifeTime\",0] call BIS_fnc_returnConfigEntry;//0.5\n```\n\nTo compose collected String into Array, use BIS_fnc_getCfgDataArray instead. E.g.\n\n```sqf\n(configFile >> \"CfgVehicles\" >> _SomeAddonClassName >> \"DestructionEffects\" >> \"Smoke1\" >> \"type\") call BIS_fnc_getCfgDataArray;\n```"}]},{"name":"getTextRaw","title":"getTextRaw","type":"command","url":"https://community.bistudio.com/wiki/getTextRaw","revid":347409,"updated":"2023-09-18T13:18:49Z","groups":["Config","Localization"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Returns raw text from config entry. If entry is subject to localization, the translation key is returned. To obtain the localized text, see getText.","syntaxes":[{"syntax":"getTextRaw config","params":[{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"String","type_expr":"String","description":"raw text value"},"form":"unary","right":{"text":"config"}}],"examples":[{"text":"```sqf\nprivate _text = getText (configFile >> \"CfgVehicles\" >> \"Thing\" >> \"displayName\");            // \"Get in %1 as Driver\"\nprivate _rawText = getTextRaw (configFile >> \"CfgVehicles\" >> \"Thing\" >> \"displayName\");    // \"$STR_ACTION_GETIN_DRIVER\"\nprivate _localized = localize _text;                                                        // \"Get in %1 as Driver\"\n_localized == _text; // true\n```","code":["private _text = getText (configFile >> \"CfgVehicles\" >> \"Thing\" >> \"displayName\");\t\t\t// \"Get in %1 as Driver\"\nprivate _rawText = getTextRaw (configFile >> \"CfgVehicles\" >> \"Thing\" >> \"displayName\");\t// \"$STR_ACTION_GETIN_DRIVER\"\nprivate _localized = localize _text;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \"Get in %1 as Driver\"\n_localized == _text; // true"]}],"see_also":["Stringtable.xml","localize","isLocalized","diag_localized","BIS_fnc_localize","getText","getNumber","getArray"]},{"name":"getTextureInfo","title":"getTextureInfo","type":"command","url":"https://community.bistudio.com/wiki/getTextureInfo","revid":378510,"updated":"2026-05-03T17:13:34Z","groups":["System"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Return texture information - resolution in pixels (mipmap level 0) and average colour. Multiply the pixel values by pixelW and pixelH to get screen coordinates.","syntaxes":[{"syntax":"getTextureInfo texture","params":[{"name":"texture","type":"String","description":"texture path (.paa, .jpg, .ogv)","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"with [width, height, rgbaAverageColour]\n- width: Number - height: Number - Arma 3 v2.08 rgbaAverageColour: Color (RGBA)","text":"Array with [width, height, rgbaAverageColour]\n\n- width: Number\n- height: Number\n- Arma 3 v2.08 rgbaAverageColour: Color (RGBA)"},"form":"unary","right":{"text":"texture"}},{"syntax":"getTextureInfo [texture, sizeH]","since":"arma3 2.22","params":[{"name":"texture","type":"String","description":"texture path (.paa, .jpg, .ogv)","type_expr":"String"},{"name":"sizeH","type":"Number","description":"texture height in screen size","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"with [width, height]\n- width: Number - width of the texture in screen units - height: Number - height of the texture in screen units","text":"Array with [width, height]\n\n- width: Number - width of the texture in screen units\n- height: Number - height of the texture in screen units"},"form":"unary","right":{"text":"[texture, sizeH]"}}],"examples":[{"code":["getTextureInfo \"a3\\characters_f\\blufor\\data\\clothing1_co.paa\"; // [2048, 2048, [0.458824, 0.427451, 0.34902, 1]]"]},{"code":["getTextureInfo [\"\\A3\\UI_f\\Data\\Logos\\arma3_shadow_ca.paa\", 0.1]; // [0.150111, 0.1]"]}],"see_also":["pixelW","pixelH","getModelInfo","supportInfo","getObjectType","getObjectTextures"]},{"name":"getTextWidth","title":"getTextWidth","type":"command","url":"https://community.bistudio.com/wiki/getTextWidth","revid":376640,"updated":"2025-11-01T20:58:51Z","groups":["GUI Control","Strings"],"status":"ok","games":{"arma3":"1.98"},"since":"arma3 1.98","arma3_since":"1.98","description":"Returns estimated width of the text based on font type and size. Similar to ctrlTextWidth but does not require a control and can be used to estimate text width for any control including buttons. Result does not include left and right margins (hardcoded at 0.008 each).\n\n> [!NOTE]\n> This command always uses unicode (see also forceUnicode).","syntaxes":[{"syntax":"text getTextWidth [font, size]","params":[{"name":"text","type":"String","description":"text string to measure","type_expr":"String"},{"name":"font","type":"String","optional":true,"default":"\"\" (system font)","description":"font type","type_expr":"String","optional_since":"arma3 2.22","text":"font: String - (Optional since Arma 3 v2.22, default \"\" (system font)) font type"},{"name":"size","type":"Number","optional":true,"default":"-1 (system font size)","description":"font size","type_expr":"Number","optional_since":"arma3 2.22","text":"size: Number - (Optional since Arma 3 v2.22, default -1 (system font size)) font size"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"text"},"right":{"text":"[font, size]"}}],"examples":[{"code":["_textWidth = \"Hello World\" getTextWidth [\"PuristaMedium\", 0.03];"]},{"code":["_textWidthInclMargins = (\"Hello World\" getTextWidth [\"PuristaMedium\", 0.03]) + 0.016;"]},{"code":["#define MARGINS 0.016\nprivate _ctrl = findDisplay 46 ctrlCreate [\"RscText\", -1];\n_ctrl ctrlSetText \"TestString\";\n_ctrl ctrlSetFont \"PuristaMedium\";\n_ctrl ctrlSetFontHeight 0.04;\nctrlTextWidth _ctrl == (\"TestString\" getTextWidth [\"PuristaMedium\", 0.04]) + MARGINS; // true"]}],"see_also":["ctrlTextWidth"],"notes":[{"user":"R3vo","date":"2020-10-28T22:10:00Z","text":"When working with multiline controls ctrlTextWidth or getTextWidth will not return a proper value since the text will be treated as one long line.\n**Solution (Execute in Eden Editor):**\n\n```sqf\ndisableSerialization;\n\nprivate _display = findDisplay 313 createDisplay \"RscDisplayEmpty\";\n\nprivate _edit = _display ctrlCreate [\"RscEditMulti\", -1];\n_edit ctrlSetPosition [0,0,1,1];\n_edit ctrlSetBackgroundColor [0,0,0,1];\n_edit ctrlSetFont \"EtelkaMonospacePro\";\n_edit ctrlSetFontHeight 0.03;\n_edit ctrlCommit 0;\n\nprivate _longestLineWidth = 0;\nprivate _exampleString = \"abcdefghijklmnopqrstuvxyz0134567890\";\nprivate _text = \"\";\n\nfor \"_lines\" from 1 to 400 do // loop through all lines and find the longest one\n{\n    _lineText = _exampleString select [round random 35];\n    _longestLineWidth = _longestLineWidth max (_lineText getTextWidth [\"EtelkaMonospacePro\", 0.03]);\n    _text = _text + _lineText + endl;\n};\n\n_edit ctrlSetPositionW (_longestLineWidth + 2 * 0.008); // width of longest line + left and right margin set in engine\n_edit ctrlCommit 0;\n_edit ctrlSetText _text;\n```"}]},{"name":"getTIParameters","title":"getTIParameters","type":"command","url":"https://community.bistudio.com/wiki/getTIParameters","revid":378062,"updated":"2026-02-05T14:11:50Z","groups":["Environment"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns all Thermal Imaging parameters.\n\n| Parameter | Default Value | Description |\n|---|---|---|\n| `OutputRangeStart` | 0.1 | Thermal output minimal value |\n| `OutputRangeWidth` | 0.8 | Thermal output width |\n| `FilmGrain` | 1 | Film grain |\n| `Blur` | 1 | Blur |\n| `UpdateHistogram` | 1 | Histogram |\n| Arma 3 v2.20 `MaxResolution` | -1 | Maximum vertical resolution |\n\n> [!NOTE]\n> - The output formula is as follows: `OutputRangeStart + thermalValue × OutputRangeWidth`, making the default range 0.1..0.9.\n> - Arma 3 v2.20 The `MaxResolution` setting takes into account the aspect ratio of the screen. A value of 1080 on a 16:9 screen provides a resolution of 1920×1080.","syntaxes":[{"syntax":"getTIParameters","params":[],"returns":{"type":"HashMap","type_expr":"HashMap","description":"format `[[\"OutputRangeStart\", 0.1], [\"OutputRangeWidth\", 0.8]]`","text":"HashMap format `[[\"OutputRangeStart\", 0.1], [\"OutputRangeWidth\", 0.8]]`"},"form":"nullary"}],"examples":[{"code":["if (getTIParameters get \"OutputRangeStart\" == 0.1) then { hint \"default Start\" };"]}],"see_also":["setTIParameter","setCamUseTI","disableTIEquipment"]},{"name":"getTotalDLCUsageTime","title":"getTotalDLCUsageTime","type":"command","url":"https://community.bistudio.com/wiki/getTotalDLCUsageTime","revid":310770,"updated":"2022-05-07T20:21:43Z","groups":["DLC"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns total DLC usage time in this game session","syntaxes":[{"syntax":"getTotalDLCUsageTime","params":[],"returns":{"type":"Number","type_expr":"Number","description":"time (in seconds?)"},"form":"nullary"}],"examples":[{"code":["_dlcTime = getTotalDLCUsageTime;"]}],"see_also":["getDLCs","getObjectDLC","getPersonUsedDLCs","getMissionDLCs"]},{"name":"getTowParent","title":"getTowParent","type":"command","url":"https://community.bistudio.com/wiki/getTowParent","revid":377973,"updated":"2026-01-19T17:39:21Z","groups":["PhysX","Ropes and Sling Loading"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","locality":{"argument":"local"},"description":"Get the vehicle towing the provided one.","syntaxes":[{"syntax":"getTowParent towedVehicle","params":[{"name":"towedVehicle","type":"Object","description":"the towed vehicle","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"the object towing the provided object - objNull if not towed"},"form":"unary","right":{"text":"towedVehicle"}}],"examples":[{"code":["private _towParent = getTowParent _towedVehicle;"]}],"see_also":["setTowParent"]},{"name":"getTrimOffsetRTD","title":"getTrimOffsetRTD","type":"command","url":"https://community.bistudio.com/wiki/getTrimOffsetRTD","revid":348915,"updated":"2023-11-08T14:44:04Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns controls trim offset.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"getTrimOffsetRTD RTD_helicopter","params":[{"name":"RTD_helicopter","type":"Object","description":"helicopter with advanced flight model enabled","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"offsets in format [x,y,z]"},"form":"unary","right":{"text":"RTD_helicopter"}}],"examples":[{"code":["_array = getTrimOffsetRTD vehicle player;"]}],"see_also":["Advanced Helicopter Flight Model in Arma3"]},{"name":"getTurretLimits","title":"getTurretLimits","type":"command","url":"https://community.bistudio.com/wiki/getTurretLimits","revid":377851,"updated":"2026-01-03T11:52:28Z","groups":["Turrets"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","locality":{"argument":"global"},"description":"Returns the rotation and elevation limits for the given turret.","syntaxes":[{"syntax":"vehicle getTurretLimits turret","params":[{"name":"vehicle","type":"Object","description":"vehicle the turret belongs to","type_expr":"Object"},{"name":"turret","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Array","type_expr":"Array","description":"with [minTurn, maxTurn, minElev, maxElev, overridden]\n- minTurn: Number - from 0 to -angle in degrees (left) - maxTurn: Number - from 0 to +angle in degrees (right) - minElev: Number - from 0 to -angle in degrees (down) - maxElev: Number - from 0 to +angle in degrees (up) - overridden: Boolean - if custom limits were applied","text":"Array with [minTurn, maxTurn, minElev, maxElev, overridden]\n\n- minTurn: Number - from 0 to -angle in degrees (left)\n- maxTurn: Number - from 0 to +angle in degrees (right)\n- minElev: Number - from 0 to -angle in degrees (down)\n- maxElev: Number - from 0 to +angle in degrees (up)\n- overridden: Boolean - if custom limits were applied"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turret"}}],"examples":[{"code":["private _turretLimits = m2 getTurretLimits [0];\n_turretLimits params [\"_minTurn\", \"_maxTurn\", \"_minElev\", \"_maxElev\", \"_overridden\"];"]}],"see_also":["setTurretLimits","setTurretOpticsMode","turretLocal","selectWeaponTurret"]},{"name":"getTurretOpticsMode","title":"getTurretOpticsMode","type":"command","url":"https://community.bistudio.com/wiki/getTurretOpticsMode","revid":377480,"updated":"2026-01-02T06:48:55Z","groups":["Turrets"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","locality":{"argument":"local"},"description":"Get the current optics mode of the optics in the turret occupied by the specified unit. The alternative syntax allows a vehicle and turret path to be specified without needing a unit. Optic modes refer to the different fields of view (FOV) or zoom levels of an optic.","syntaxes":[{"syntax":"getTurretOpticsMode obj","params":[{"name":"obj","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"obj"}},{"syntax":"obj getTurretOpticsMode turretPath","params":[{"name":"obj","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"obj"},"right":{"text":"turretPath"}}],"examples":[{"code":["getTurretOpticsMode player;"]},{"code":["myTank getTurretOpticsMode [-1];"]},{"code":["myAircraft getTurretOpticsMode [0, 0];"]}],"see_also":["setTurretOpticsMode","turretOwner","getPilotCameraOpticsMode","setPilotCameraOpticsMode"]},{"name":"getUnitFreefallInfo","title":"getUnitFreefallInfo","type":"command","url":"https://community.bistudio.com/wiki/getUnitFreefallInfo","revid":377879,"updated":"2026-01-04T16:08:21Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","locality":{"argument":"local"},"description":"Returns a unit's freefall information.","syntaxes":[{"syntax":"getUnitFreefallInfo unit","params":[{"name":"unit","type":"Object","description":"unit","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [isFalling, isInFreefallPose, minFreefallHeight]\n- isFalling: Boolean - true if unit is falling - isInFreefallPose: Boolean - true if unit is in freefall pose - minFreefallHeight: Number - current minimum freefall height (see setUnitFreefallHeight)","text":"Array with [isFalling, isInFreefallPose, minFreefallHeight]\n\n- isFalling: Boolean - true if unit is falling\n- isInFreefallPose: Boolean - true if unit is in freefall pose\n- minFreefallHeight: Number - current minimum freefall height (see setUnitFreefallHeight)"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["getUnitFreefallInfo player;"]}],"see_also":["setUnitFreefallHeight","getUserInfo","getModelInfo"],"notes":[{"user":"Sa-Matra","date":"2023-05-08T04:26:25Z","text":"Note that command is supposed to be used on local units. When used on a remote unit, its return (isFalling) is unreliable and sometimes returns wrong values."}]},{"name":"getUnitLoadout","title":"getUnitLoadout","type":"command","url":"https://community.bistudio.com/wiki/getUnitLoadout","revid":377568,"updated":"2026-01-02T06:55:51Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns a **Unit Loadout Array** with all assigned items, weapons, containers and their stored items.\n\n> [!NOTE]\n> The config should contain the following standard entries:\n>\n> ```cpp\n> class MyLoadout\n> {\n>     uniformClass = \"U_B_CombatUniform_mcam\";\n>     backpack = \"B_AssaultPack_mcamo\";\n>     linkedItems[] = { \"V_PlateCarrier1_rgr\", \"H_HelmetB\", \"ItemCompass\", \"ItemWatch\", \"ItemRadio\", \"NVGoggles\" };\n>     weapons[] = { \"arifle_MX_ACO_pointer_F\", \"hgun_P07_F\" };\n>     items[] = { \"FirstAidKit\", \"FirstAidKit\", \"FirstAidKit\" };\n>     magazines[] = {\n>         \"30Rnd_65x39_caseless_mag\", \"16Rnd_9x21_Mag\",\n>         \"SmokeShell\",\n>         \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\",\n>         \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\",\n>         \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\"\n>     };\n> };\n> ```","syntaxes":[{"syntax":"getUnitLoadout unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Unit Loadout Array","type_expr":"Unit Loadout Array"},"form":"unary","right":{"text":"unit"}},{"syntax":"getUnitLoadout [unit, fullMagazines]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"fullMagazines","type":"Boolean","description":"true to top up used magazines","type_expr":"Boolean"}],"returns":{"type":"Unit Loadout Array","type_expr":"Unit Loadout Array"},"form":"unary","right":{"text":"[unit, fullMagazines]"}},{"syntax":"getUnitLoadout name","params":[{"name":"name","type":"String","description":"`CfgVehicles` classname from which to extract the loadout","type_expr":"String"}],"returns":{"type":"Unit Loadout Array","type_expr":"Unit Loadout Array"},"form":"unary","right":{"text":"name"}},{"syntax":"getUnitLoadout config","params":[{"name":"config","type":"Config","description":"loadout config class","type_expr":"Config"}],"returns":{"type":"Unit Loadout Array","type_expr":"Unit Loadout Array"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["getUnitLoadout player;"]},{"code":["getUnitLoadout [player, true];"]},{"code":["getUnitLoadout \"B_Soldier_F\";"]},{"code":["getUnitLoadout (configFile >> \"CfgVehicles\" >> \"B_Soldier_F\");"]},{"code":["getUnitLoadout (missionConfigFile >> \"MyLoadout\");"]}],"see_also":["setUnitLoadout"]},{"name":"getUnitMovesInfo","title":"getUnitMovesInfo","type":"command","url":"https://community.bistudio.com/wiki/getUnitMovesInfo","revid":379161,"updated":"2026-10-21T20:23:17Z","groups":["Animations"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"global"},"description":"Returns various information about the unit moves (primary animation) and gestures (masked animation)\n\n> [!NOTE]\n> Up until Arma 3 v2.20 this command only worked for a man unit, and other units such as animals couldn't use this command. As of Arma 3 v2.22 animals are supported as well.","syntaxes":[{"syntax":"getUnitMovesInfo unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"format:\n- 0 - moveProgress: Number - move progress in range 0-1 - 1 - moveTime: Number - move elapsed time (`move progress * move duration`) - 2 - moveDuration: Number - move duration in seconds - 3 - moveFactor: Number - move blend factor - 4 - rtmStep: Vector3D - rtm step (how many meters the unit will move after finishing the animation) - 5 - gestureProgress: Number - gesture progress in range 0-1 - 6 - gestureTime: Number - gesture elapsed time (`gesture progress * gesture duration`) - 7 - gestureDuration: Number - gesture duration in seconds - 8 - gestureFactor: Number - gesture blend factor","text":"Array format:\n\n- 0 - moveProgress: Number - move progress in range 0-1\n- 1 - moveTime: Number - move elapsed time (`move progress * move duration`)\n- 2 - moveDuration: Number - move duration in seconds\n- 3 - moveFactor: Number - move blend factor\n- 4 - rtmStep: Vector3D - rtm step (how many meters the unit will move after finishing the animation)\n- 5 - gestureProgress: Number - gesture progress in range 0-1\n- 6 - gestureTime: Number - gesture elapsed time (`gesture progress * gesture duration`)\n- 7 - gestureDuration: Number - gesture duration in seconds\n- 8 - gestureFactor: Number - gesture blend factor"},"form":"unary","right":{"text":"unit"}},{"syntax":"unit getUnitMovesInfo index","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"index","type":"Number","description":"index of property from the main syntax","type_expr":"Number"}],"returns":{"type":"Anything","type_expr":"Anything","description":"Value of the requested property, or Nothing if index is invalid. See the main syntax."},"form":"binary","left":{"text":"unit"},"right":{"text":"index"}}],"examples":[{"text":"```sqf\n// Getting the move velocity of the animation\nprivate _animInfo = getUnitMovesInfo player;\n// velocity = displacement / time\nprivate _animVelocity = _animInfo # 4 vectorMultiply -1 / _animInfo # 2;    // -1 is because man model is reversed\n                                                                            // so the rtm animation moves \"backwards\"\n```","code":["// Getting the move velocity of the animation\nprivate _animInfo = getUnitMovesInfo player;\n// velocity = displacement / time\nprivate _animVelocity = _animInfo # 4 vectorMultiply -1 / _animInfo # 2;\t// -1 is because man model is reversed\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// so the rtm animation moves \"backwards\""]},{"text":"```sqf\ngetUnitMovesInfo player params [\n    \"_moveProgress\",\n    \"_moveTime\",\n    \"_moveDuration\",\n    \"_moveFactor\",\n    \"_rtmStep\",\n    \"_gestureProgress\",\n    \"_gestureTime\",\n    \"_gestureDuration\",\n    \"_gestureFactor\"\n];\n```","code":["getUnitMovesInfo player params [\n\t\"_moveProgress\",\n\t\"_moveTime\",\n\t\"_moveDuration\",\n\t\"_moveFactor\",\n\t\"_rtmStep\",\n\t\"_gestureProgress\",\n\t\"_gestureTime\",\n\t\"_gestureDuration\",\n\t\"_gestureFactor\"\n];"]}],"see_also":["switchMove","switchGesture","moveTime","gestureState","animationState","vehicleMoveInfo"]},{"name":"getUnitState","title":"getUnitState","type":"command","url":"https://community.bistudio.com/wiki/getUnitState","revid":369978,"updated":"2024-10-22T13:15:33Z","groups":["AI Behaviour"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"local"},"description":"Returns current state of the given AI unit, which could be one of the following:\n\n- \"WAIT\" - another plan is needed (current partial plan was done or is not present)\n- \"INIT\" - operative planing should start, endpoint is set\n- \"INITFAILED\" - init failed because data are not ready\n- \"BUSY\" - operative plan ready and valid\n- \"OK\" - completed whole strategic plan\n- \"DELAY\" - repeat search, usually when failed\n- \"CARGO\" - unit is in vehicle cargo, no planning needed\n- \"STOPPING\" - unit is stopping (usually because of getin/getout request/landing)\n- \"REPLAN\" - we have a plan, but we would like to search a new one\n- \"STOPPED\" - unit is stopped, no planning needed (also landed. Different from stop command)\n- \"PLANNING\" - operative planning pending","syntaxes":[{"syntax":"getUnitState unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"unit state (see description)"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_state = getUnitState bob; //\"WAIT\""]}],"see_also":["disableAI","enableAI","checkAIFeature","enableAIFeature","vehicleMoveInfo","expectedDestination"]},{"name":"getUnitTrait","title":"getUnitTrait","type":"command","url":"https://community.bistudio.com/wiki/getUnitTrait","revid":347973,"updated":"2023-11-08T09:46:06Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","locality":{"argument":"global"},"description":"Gets the current value of a trait of the given unit.\n\n> [!NOTE]\n> For the default values see setUnitTrait.","syntaxes":[{"syntax":"unit getUnitTrait skillName","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"skillName","type":"String","description":"name of the skill","type_expr":"String"}],"returns":{"types":["Boolean","Number"],"type_expr":"Boolean | Number | Nothing","description":"- Boolean or Number - trait's value - Nothing - if unit is invalid, e.g an empty vehicle","text":"- Boolean or Number - trait's value\n- Nothing - if *unit* is invalid, e.g an empty vehicle"},"form":"binary","left":{"text":"unit"},"right":{"text":"skillName"}}],"examples":[{"code":["player getUnitTrait \"Medic\";"]}],"see_also":["setUnitTrait","getAllUnitTraits"]},{"name":"getUnloadInCombat","title":"getUnloadInCombat","type":"command","url":"https://community.bistudio.com/wiki/getUnloadInCombat","revid":377617,"updated":"2026-01-02T08:51:47Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"A getter for setUnloadInCombat. To return global config value see canUnloadInCombat","syntaxes":[{"syntax":"getUnloadInCombat vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [cargo, turrets]","text":"Array with [cargo, turrets]"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["getUnloadInCombat _vehicle params [\"_cargo\", \"_turrets\"];"]}],"see_also":["setUnloadInCombat","canUnloadInCombat"]},{"name":"getUserInfo","title":"getUserInfo","type":"command","url":"https://community.bistudio.com/wiki/getUserInfo","revid":378191,"updated":"2026-03-10T18:34:18Z","groups":["Multiplayer","Object Detection"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"server_exec":true},"description":"Returns extended information about given server user.","syntaxes":[{"syntax":"getUserInfo playerID","params":[{"name":"playerID","type":"String","description":"user DirectPlay ID (see getPlayerID, PlayerConnected)","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"with [playerID, owner, playerUID, soldierName, displayName, steamProfileName, clientStateNumber, isHeadless, adminState, networkInfo, playerObject]\n- 0 - playerID: String - user DirectPlay ID (see getPlayerID, PlayerConnected) - 1 - owner: Number - user owner (see owner) - 2 - playerUID: String - player UID (see getPlayerUID) - 3 - soldierName: String - player name (see profileName) - 4 - displayName: String - player name including squad (see name, squadParams) - 5 - steamProfileName: String - returns the current machine's Steam profile name (see profileNameSteam), not the targeted player's Steam profile name - 6 - clientStateNumber: String user client state (see getClientStateNumber) - 7 - isHeadless: Boolean - whether or not this is a headless client (see hasInterface, isServer) - 8 - adminState: Number - admin status of the user (see admin) - 9 - networkInfo: Array of Numbers - format [ping, bandwidth, desync] - 10 - playerObject: Object - user player entity (see player, selectPlayer) > [!NOTE] > Returns an empty array if said player is not found.","text":"Array with [playerID, owner, playerUID, soldierName, displayName, steamProfileName, clientStateNumber, isHeadless, adminState, networkInfo, playerObject]\n\n- 0 - playerID: String - user DirectPlay ID (see getPlayerID, PlayerConnected)\n- 1 - owner: Number - user owner (see owner)\n- 2 - playerUID: String - player UID (see getPlayerUID)\n- 3 - soldierName: String - player name (see profileName)\n- 4 - displayName: String - player name including squad (see name, squadParams)\n- 5 - steamProfileName: String - returns the *current machine's* Steam profile name (see profileNameSteam), **not** the targeted player's Steam profile name\n- 6 - clientStateNumber: String user client state (see getClientStateNumber)\n- 7 - isHeadless: Boolean - whether or not this is a headless client (see hasInterface, isServer)\n- 8 - adminState: Number - admin status of the user (see admin)\n- 9 - networkInfo: Array of Numbers - format [ping, bandwidth, desync]\n- 10 - playerObject: Object - user player entity (see player, selectPlayer)\n\n> [!NOTE]\n> Returns an empty array if said player is not found."},"form":"unary","right":{"text":"playerID"}},{"syntax":"playerID getUserInfo infoIndex","since":"arma3 2.18","params":[{"name":"playerID","type":"String","description":"user DirectPlay ID (see getPlayerID, PlayerConnected)","type_expr":"String"},{"name":"infoIndex","type":"Number","description":"the index of the data in the return array (see main syntax)","type_expr":"Number"}],"returns":{"type":"Anything","type_expr":"Anything","description":"depends on the requested index (see main syntax) or Nothing"},"form":"binary","left":{"text":"playerID"},"right":{"text":"infoIndex"}}],"examples":[{"code":["private _randomUserInfo = getUserInfo selectRandom allUsers;"]},{"code":["_userInfo params [\"_playerID\", \"_ownerId\", \"_playerUID\", \"_profileName\", \"_displayName\", \"_steamName\", \"_clientState\", \"_isHC\", \"_adminState\", \"_networkInfo\", \"_unit\"];\n_networkInfo params [\"_avgPing\", \"_avgBandwidth\", \"_desync\"];"]},{"code":["private _myInfo = getUserInfo getPlayerID player; // this particular example only works if player is server host"]}],"see_also":["allUsers","getPlayerID","getUnitFreefallInfo"]},{"name":"getUserMFDText","title":"getUserMFDText","type":"command","url":"https://community.bistudio.com/wiki/getUserMFDText","revid":309231,"updated":"2022-05-04T10:19:29Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.78"},"since":"arma3 1.78","arma3_since":"1.78","description":"Returns array of user text variables used in MFD.","syntaxes":[{"syntax":"getUserMFDText vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["getUserMFDText _vehicle;"]}],"see_also":["setUserMFDText","setUserMFDValue","getUserMFDValue"]},{"name":"getUserMFDValue","title":"getUserMFDValue","type":"command","url":"https://community.bistudio.com/wiki/getUserMFDValue","revid":310918,"updated":"2022-05-07T20:39:37Z","groups":["Interaction"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Returns array of user text variables used in MFD.","syntaxes":[{"syntax":"getUserMFDValue vehicle","params":[{"name":"vehicle","type":"Object","description":"a vehicle with MFD","type_expr":"Object"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["getUserMFDValue vehicle player; // user0 in MFD will return 1"]}],"see_also":["setUserMFDValue","setUserMFDText","getUserMFDText"]},{"name":"getVariable","title":"getVariable","type":"command","url":"https://community.bistudio.com/wiki/getVariable","revid":369203,"updated":"2024-09-03T10:34:50Z","groups":["Variables","Namespaces","Multiplayer"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the value of variable in the variable space assigned to various data types.\nAll available data types combinations:\n\n| Primary syntax (String) |  | Alternative syntax (Array) |  |\n|---|---|---|---|\n| **Code** | **Since** | **Code** | **Since** |\n| Namespace getVariable String | - | Namespace getVariable Array | Arma 2: Operation Arrowhead v1.60 |\n| Object getVariable String | - | Object getVariable Array | - |\n| Group getVariable String | - | Group getVariable Array | - |\n| Team Member getVariable String | - | Team Member getVariable Array | - |\n| Task getVariable String | - | Task getVariable Array | Arma 3 v1.68 |\n| Location getVariable String | - | Location getVariable Array | Arma 3 v1.68 |\n| Control getVariable String | - | Control getVariable Array | Arma 3 v1.56 |\n| Display getVariable String | Arma 3 v1.56 | Display getVariable Array | Arma 3 v1.56 |\n\n> [!IMPORTANT]\n> When variable is set on a Task, it is not actually set on the task itself, but on the FSM attached to the task.\n> If there is no FSM, getVariable will not work.\n\n> [!NOTE]\n> **Arma 3:** In the case of Alt Syntax usage in Arma 3, *defaultValue* will be returned if:\n>\n> - Requested variable is either undefined or nil\n> - Variable namespace is null (objNull, grpNull, etc.)","syntaxes":[{"syntax":"varspace getVariable name","params":[{"name":"varspace","type":"Namespace, Object, Display, Control, Group, Location, Task, Team Member, Display, Control","type_expr":"Namespace | Object | Display | Control | Group | Location | Task | Team Member"},{"name":"name","type":"String","description":"variable name in given namespace","type_expr":"String"}],"returns":{"type":"Anything or Nothing","type_expr":"Anything | Nothing","description":"if the variable doesn't exist","text":"Anything or Nothing if the variable doesn't exist"},"form":"binary","left":{"text":"varspace"},"right":{"text":"name"}},{"syntax":"varspace getVariable [name, defaultValue]","params":[{"name":"varspace","type":"Namespace, Object, Display, Control, Group, Location, Task, Team Member, Display, Control","type_expr":"Namespace | Object | Display | Control | Group | Location | Task | Team Member"},{"name":"name","type":"String","description":"variable name in given namespace","type_expr":"String"},{"name":"defaultValue","type":"Anything","description":"value to return if variable doesn't exist\n\n> [!WARNING]\n> A dynamic *defaultValue* e.g `random 500` will always be executed, even if the variable is defined.","type_expr":"Anything"}],"returns":{"type":"Anything","type_expr":"Anything","description":"current value of the variable or defaultValue if the variable doesn't exist.","text":"Anything - current value of the variable or *defaultValue* if the variable doesn't exist."},"form":"binary","left":{"text":"varspace"},"right":{"text":"[name, defaultValue]"}}],"examples":[{"code":["private _variable = myTruck getVariable \"myVariable\"; // returns nil if \"myVariable\" is not set"]},{"code":["private _variable = myTruck getVariable [\"myVariable\", 50]; // returns 50 if \"myVariable\" is not set"]},{"text":"```sqf\nfor \"_i\" from 0 to 5 do\n{\n    _car = missionNamespace getVariable (\"car\" + str _i);\n    _car setDamage 0;\n}; // Set damage of car0..car5 to 0\n```","code":["for \"_i\" from 0 to 5 do\n{\n\t_car = missionNamespace getVariable (\"car\" + str _i);\n\t_car setDamage 0;\n}; // Set damage of car0..car5 to 0"]},{"code":["myMissionVar = 2015;\nmissionNamespace getVariable \"myMissionVar\"; // returns 2015"]},{"text":"Get current value of a variable and if it is undefined, define it and get the defined value:\n\n```sqf\nprivate _var = missionNamespace getVariable \"varName\";\nif (isNil \"_var\") then\n{\n    missionNamespace setVariable [\"varName\", 123];\n    _var = 123;\n};\n// _var here will contain current value of the variable varName\n```","code":["private _var = missionNamespace getVariable \"varName\";\nif (isNil \"_var\") then\n{\n\tmissionNamespace setVariable [\"varName\", 123];\n\t_var = 123;\n};\n// _var here will contain current value of the variable varName"]}],"see_also":["setVariable","allVariables","getFSMVariable"],"notes":[{"user":"Ebay","date":"2016-08-13T17:13:00Z","text":"**NOTE: Arma 2 only! In Arma 3 this will return default value:**\nWarning: the alternative syntax returns undefined when the namespace is an object and that object is null. Example:\n\n```sqf\n_test = objNull getVariable [\"test\", \"0\"];\nsystemChat _test;\n```\n\nErrors because _test is undefined. Tested in Arma 2: Operation Arrowhead 1.63.131129"},{"user":"AgentRev","date":"2017-08-31T03:29:00Z","text":"You can do typechecking using param:\n\n```sqf\nprivate _myVar = [player getVariable \"myVar\"] param [0, \"\", [\"\"]];\n```\n\nand params:\n\n```sqf\n[player getVariable \"myVar\"] params [[\"_myVar\", \"\", [\"\"]]];\n```"}]},{"name":"getVehicleCargo","title":"getVehicleCargo","type":"command","url":"https://community.bistudio.com/wiki/getVehicleCargo","revid":330010,"updated":"2022-08-14T12:55:01Z","groups":["Vehicle in Vehicle Transport"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","locality":{"argument":"global","effect":"global"},"description":"Get a list of vehicles loaded as cargo inside this vehicle. The returned array is in the order the cargo vehicles were added to containing vehicle.","syntaxes":[{"syntax":"getVehicleCargo storingVehicle","params":[{"name":"storingVehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"vehicles loaded in storingVehicle, in order of their loading"},"form":"unary","right":{"text":"storingVehicle"}}],"examples":[{"code":["_vehicleCargo = getVehicleCargo blackfish; // returns [] if empty"]},{"code":["_vehicleCargo = getVehicleCargo blackfish; // returns [quad_3, quad_1, quad_2] as they were loaded in this order"]}],"see_also":["Arma 3: Vehicle in Vehicle Transport","canVehicleCargo","setVehicleCargo","enableVehicleCargo","isVehicleCargo","vehicleCargoEnabled"]},{"name":"getVehicleTIPars","title":"getVehicleTIPars","type":"command","url":"https://community.bistudio.com/wiki/getVehicleTIPars","revid":377635,"updated":"2026-01-02T08:52:29Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns TI parameters of a vehicle.","syntaxes":[{"syntax":"getVehicleTIPars vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [aliveFactor, movementFactor, metabolismFactor]","text":"Array with [aliveFactor, movementFactor, metabolismFactor]"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["getVehicleTIPars _veh;"]}],"see_also":["setVehicleTIPars"]},{"name":"getVideoOptions","title":"getVideoOptions","type":"command","url":"https://community.bistudio.com/wiki/getVideoOptions","revid":376476,"updated":"2025-10-17T09:37:32Z","groups":["System"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Obtain the current system's video settings.","syntaxes":[{"syntax":"getVideoOptions","params":[],"returns":{"type":"HashMap","type_expr":"HashMap","description":"all video settings, the key is always a String, the value can be a String, Number, Boolean or Array (see Example 1).\n> [!IMPORTANT] > `vramInfo` and `monitorResolution` keys presence is not guaranteed.","text":"HashMap - all video settings, the key is always a String, the value can be a String, Number, Boolean or Array (see Example 1).\n\n> [!IMPORTANT]\n> `vramInfo` and `monitorResolution` keys presence is not guaranteed."},"form":"nullary"}],"examples":[{"text":"```sqf\nprivate _videoOptions = getVideoOptions;\n/*\n[\n    [\"aspectRatioName\", \"Auto (Stretch)\"],\n    [\"brightness\", 1.1],\n    [\"cloudQualityName\", \"VeryHigh\"],\n    [\"displayModeName\", \"FullScreenWindow\"],\n    [\"dynLightsCount\", 32],\n    [\"dynLightsQualityName\", \"VeryHigh\"],\n    [\"gamma\", 1],\n    [\"guiScale\", 0.7],\n    [\"guiScaleName\", \"Normal\"],\n    [\"hdrQuality\", 16],\n    [\"hdrQualityName\", \"Normal\"],\n    [\"monitorResolution\", [0, 0, 2304, 1440]],                            // presence not guaranteed [x, y, width, height]\n    [\"objectVisibility\", 6000],\n    [\"objQualityName\", \"VeryHigh\"],\n    [\"overallPresetName\", \"Custom\"],\n    [\"overallVisibility\", 8000],\n    [\"overrideHazeQuality\", -1],\n    [\"particleQualityName\", \"High\"],\n    [\"pipQuality\", 2048],\n    [\"pipQualityName\", \"VeryHigh\"],\n    [\"pipVisibility\", 3000],\n    [\"ppBloom\", 1],\n    [\"ppBrightness\", 1],\n    [\"ppCausticsQualityName\",\"Enabled\"],                                // fixed in 2.18\n    [\"anisotropicFiltering\",\"VeryHigh\"],                                // fixed in 2.18\n    [\"atocQuality\",\"All\"],                                                // fixed in 2.18\n    [\"ppColorPresetName\", \"Custom\"],\n    [\"ppContrast\", 1],\n    [\"ppDOF\", 1],\n    [\"ppFSAA\", 1],\n    [\"ppHazeQualityName\", \"Standard\"],\n    [\"ppPPAAQualityName\", \"CMAANormal\"],\n    [\"ppRadialBlur\", 1],\n    [\"ppRotationBlur\", 1],\n    [\"ppSaturation\", 1.25],\n    [\"ppSharpenFilter\", 0.75],\n    [\"ppSSAOQualityName\", \"\"],\n    [\"refreshRate\", 60],\n    [\"samplingPercentage\", 100],\n    [\"shadowQualityName\", \"VeryHigh\"],\n    [\"shadowVisibility\", 200],\n    [\"terrainQuality\", 3.125],\n    [\"terrainQualityName\", \"VeryHigh\"],\n    [\"texQualityName\", \"VeryHigh\"],\n    [\"vramInfo\", [\"5.9 GiB\", \"16 GiB\", \"0 B\", \"978 MiB\", \"5.6 GiB\"]],    // presence not guaranteed [installedVram, sharedVram, systemVram(, used, max)]\n    [\"vsync\", true],\n    [\"waterReflectionQualityName\", \"High\"]\n]\n*/\n```","code":["private _videoOptions = getVideoOptions;\n/*\n[\n\t[\"aspectRatioName\", \"Auto (Stretch)\"],\n\t[\"brightness\", 1.1],\n\t[\"cloudQualityName\", \"VeryHigh\"],\n\t[\"displayModeName\", \"FullScreenWindow\"],\n\t[\"dynLightsCount\", 32],\n\t[\"dynLightsQualityName\", \"VeryHigh\"],\n\t[\"gamma\", 1],\n\t[\"guiScale\", 0.7],\n\t[\"guiScaleName\", \"Normal\"],\n\t[\"hdrQuality\", 16],\n\t[\"hdrQualityName\", \"Normal\"],\n\t[\"monitorResolution\", [0, 0, 2304, 1440]],\t\t\t\t\t\t\t// presence not guaranteed [x, y, width, height]\n\t[\"objectVisibility\", 6000],\n\t[\"objQualityName\", \"VeryHigh\"],\n\t[\"overallPresetName\", \"Custom\"],\n\t[\"overallVisibility\", 8000],\n\t[\"overrideHazeQuality\", -1],\n\t[\"particleQualityName\", \"High\"],\n\t[\"pipQuality\", 2048],\n\t[\"pipQualityName\", \"VeryHigh\"],\n\t[\"pipVisibility\", 3000],\n\t[\"ppBloom\", 1],\n\t[\"ppBrightness\", 1],\n\t[\"ppCausticsQualityName\",\"Enabled\"],\t\t\t\t\t\t\t\t// fixed in 2.18\n\t[\"anisotropicFiltering\",\"VeryHigh\"],\t\t\t\t\t\t\t\t// fixed in 2.18\n\t[\"atocQuality\",\"All\"],\t\t\t\t\t\t\t\t\t\t\t\t// fixed in 2.18\n\t[\"ppColorPresetName\", \"Custom\"],\n\t[\"ppContrast\", 1],\n\t[\"ppDOF\", 1],\n\t[\"ppFSAA\", 1],\n\t[\"ppHazeQualityName\", \"Standard\"],\n\t[\"ppPPAAQualityName\", \"CMAANormal\"],\n\t[\"ppRadialBlur\", 1],\n\t[\"ppRotationBlur\", 1],\n\t[\"ppSaturation\", 1.25],\n\t[\"ppSharpenFilter\", 0.75],\n\t[\"ppSSAOQualityName\", \"\"],\n\t[\"refreshRate\", 60],\n\t[\"samplingPercentage\", 100],\n\t[\"shadowQualityName\", \"VeryHigh\"],\n\t[\"shadowVisibility\", 200],\n\t[\"terrainQuality\", 3.125],\n\t[\"terrainQualityName\", \"VeryHigh\"],\n\t[\"texQualityName\", \"VeryHigh\"],\n\t[\"vramInfo\", [\"5.9 GiB\", \"16 GiB\", \"0 B\", \"978 MiB\", \"5.6 GiB\"]],\t// presence not guaranteed [installedVram, sharedVram, systemVram(, used, max)]\n\t[\"vsync\", true],\n\t[\"waterReflectionQualityName\", \"High\"]\n]\n*/"]}],"see_also":["getResolution","getAudioOptionVolumes","getSubtitleOptions","getMissionOptions"]},{"name":"getWaterFillPercentage","title":"getWaterFillPercentage","type":"command","url":"https://community.bistudio.com/wiki/getWaterFillPercentage","revid":363321,"updated":"2024-03-26T16:41:39Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.16"},"since":"arma3 2.16","arma3_since":"2.16","locality":{"argument":"local"},"description":"Get an object's water filling.","syntaxes":[{"syntax":"getWaterFillPercentage obj","params":[{"name":"obj","type":"Object","description":"object to manipulate","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"water level in range 0..1 (empty to full)"},"form":"unary","right":{"text":"obj"}}],"examples":[{"text":"```sqf\nif (getWaterFillPercentage _myCar > 0) then\n{\n    hint \"My feet are wet.\";\n};\n```","code":["if (getWaterFillPercentage _myCar > 0) then\n{\n\thint \"My feet are wet.\";\n};"]}],"see_also":["setWaterLeakiness","getWaterLeakiness","setWaterFillPercentage"]},{"name":"getWaterLeakiness","title":"getWaterLeakiness","type":"command","url":"https://community.bistudio.com/wiki/getWaterLeakiness","revid":378411,"updated":"2026-04-04T08:32:46Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.16"},"since":"arma3 2.16","arma3_since":"2.16","locality":{"argument":"global"},"description":"Get an object's water intake ratio when immersed.","syntaxes":[{"syntax":"getWaterLeakiness obj","params":[{"name":"obj","type":"Object","description":"object to check","type_expr":"Object"}],"returns":{"type":"Number in range 0..1","type_expr":"Number","description":"0 is waterproof and 1 is full leak"},"form":"unary","right":{"text":"obj"}}],"examples":[{"text":"```sqf\nif (getWaterLeakiness _myCar > 0) then\n{\n    hint \"don't go in the water with it!\";\n};\n```","code":["if (getWaterLeakiness _myCar > 0) then\n{\n\thint \"don't go in the water with it!\";\n};"]}],"see_also":["setWaterLeakiness","setWaterFillPercentage","getWaterFillPercentage"]},{"name":"getWeaponCargo","title":"getWeaponCargo","type":"command","url":"https://community.bistudio.com/wiki/getWeaponCargo","revid":319293,"updated":"2022-05-13T09:23:30Z","groups":["Vehicle Inventory","Containers"],"status":"ok","games":{"arma2oa":"1.54","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.54","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns all weapons types and count from the cargo space","syntaxes":[{"syntax":"getWeaponCargo object","params":[{"name":"object","type":"Object","description":"object to check","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"format [all_types_array, all_counts_array]. Eg: [[\"a\", \"b\"], [3, 2]]"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_content = getWeaponCargo carName;"]},{"code":["_content = getWeaponCargo ammoBoxName;"]}],"see_also":["weaponCargo","addWeaponCargo","addWeaponCargoGlobal","clearWeaponCargo","clearWeaponCargoGlobal"]},{"name":"getWeaponSway","title":"getWeaponSway","type":"command","url":"https://community.bistudio.com/wiki/getWeaponSway","revid":376211,"updated":"2025-09-15T15:00:52Z","groups":["Stamina System","Weapons"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Returns current size of weapon sway of a given unit, in radians. This command may still return a value greater 0 even if sway was effectively set to 0 with `player setCustomAimCoef 0;`.","syntaxes":[{"syntax":"getWeaponSway unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"weapon sway"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_sway = getWeaponSway player;"]}],"see_also":["weaponInertia","getCustomAimCoef"]},{"name":"getWingsOrientationRTD","title":"getWingsOrientationRTD","type":"command","url":"https://community.bistudio.com/wiki/getWingsOrientationRTD","revid":319254,"updated":"2022-05-13T09:23:27Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Returns orientation of horizontal stabilizers.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"getWingsOrientationRTD RTD_helicopter","params":[{"name":"RTD_helicopter","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"RTD_helicopter"}}],"examples":[{"code":["_orientation = getWingsOrientationRTD myHelicopter;"]}],"see_also":["getWingsPositionRTD"]},{"name":"getWingsPositionRTD","title":"getWingsPositionRTD","type":"command","url":"https://community.bistudio.com/wiki/getWingsPositionRTD","revid":319210,"updated":"2022-05-13T09:23:22Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Returns position of stabilizers.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"getWingsPositionRTD RTD_helicopter","params":[{"name":"RTD_helicopter","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"RTD_helicopter"}}],"examples":[{"code":["_position = getWingsPositionRTD myHelicopter;"]}],"see_also":["getWingsOrientationRTD"]},{"name":"getWPPos","title":"getWPPos","type":"command","url":"https://community.bistudio.com/wiki/getWPPos","revid":377567,"updated":"2026-01-02T06:55:33Z","groups":["Waypoints"],"status":"ok","games":{"ofp":"1.21","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.21","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the position of a selected waypoint of a given group. Waypoints include only those which were placed in the mission editor.","syntaxes":[{"syntax":"getWPPos [groupOrUnit, index]","params":[{"name":"groupOrUnit","type":"Group or Object","description":"the group (or unit) of which to select a waypoint","type_expr":"Group | Object"},{"name":"index","type":"Number","description":"0 equals the starting position of the group.\nThe number used in this and other waypoint commands is *one more* than the one displayed in the waypoint window in the editor: e.g if the editor labeled a waypoint `\"0:MOVE\"` then it can be accessed using `getWPPos [grp, 1]`","type_expr":"Number"}],"returns":{"type":"Position3D","type_expr":"Position3D","description":"the returned position equals [0,0,0] if the selected waypoint does not exist."},"form":"unary","right":{"text":"[groupOrUnit, index]"}}],"examples":[{"code":["[_group1, 1] setWPPos [200,600,0];\n_pos = getWPPos [_group1, 1]; // returns [200, 600, 0]"]}],"aliases":["waypointPosition"],"see_also":["setWPPos"]},{"name":"glanceAt","title":"glanceAt","type":"command","url":"https://community.bistudio.com/wiki/glanceAt","revid":377158,"updated":"2026-01-01T10:39:40Z","groups":["Unit Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Control what the unit(s) is/are glancing at (target or Position). If target is used, it will get revealed fully.\n\nHow frequently the unit(s) is/are glancing there depends on behaviour.","syntaxes":[{"syntax":"unit(s) glanceAt position","params":[{"name":"unit(s)","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"position","type":"Object or Position","type_expr":"Object | Position"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit(s)"},"right":{"text":"position"}}],"examples":[{"code":["_someSoldier glanceAt _otherSoldier;"]},{"code":["[_someSoldier, _otherSoldier] glanceAt markerPos \"markerOne\";"]}],"see_also":["lookAt","commandWatch","doWatch"]},{"name":"globalChat","title":"globalChat","type":"command","url":"https://community.bistudio.com/wiki/globalChat","revid":376771,"updated":"2025-11-17T00:04:34Z","groups":["Radio and Chat"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Types text to the global radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec). Use clearRadio to clear chat history","syntaxes":[{"syntax":"unit globalChat chatText","params":[{"name":"unit","type":"Object","description":"unit transmitting message","type_expr":"Object"},{"name":"chatText","type":"String","description":"message to transmit","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"chatText"}}],"examples":[{"code":["_soldierOne globalChat \"Show this text\";"]},{"code":["driver vehicle player sideChat \"sideChat\";\ndriver vehicle player globalChat \"globalChat\";\ndriver vehicle player groupChat \"groupChat\";\nvehicle player vehicleChat \"vehicleChat\";\ndriver vehicle player commandChat \"commandChat\";\ndriver vehicle player customChat [1, \"customChat\"];\nsystemChat \"systemChat\";"]}],"see_also":["sideChat","groupChat","vehicleChat","commandChat","customChat","systemChat","globalRadio"],"notes":[{"user":"Ceeeb","date":"2007-01-31T04:47:00Z","text":"In **OFP 1.96**, this command can be used by a Game_Logic unit, which will result in the text being displayed on screen without any indication of the side of radio source, or quotation marks. For example : *gamelogic1 globalchat \"hello world\"* will create the text *hello world* in the radio log."}]},{"name":"globalRadio","title":"globalRadio","type":"command","url":"https://community.bistudio.com/wiki/globalRadio","revid":379351,"updated":"2026-10-30T23:54:58Z","groups":["Radio and Chat","Sounds"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sends the audio message to the global radio channel. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec).\n\n> [!NOTE]\n> When transmitting unit gets killed, transmission will be interrupted. However when receiving unit gets killed, the transmission continues to play.","syntaxes":[{"syntax":"unit globalRadio radioName","params":[{"name":"unit","type":"Object","description":"unit to transmit","type_expr":"Object"},{"name":"radioName","type":"String","description":"class name from CfgRadio","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"radioName"}}],"examples":[{"code":["_soldierOne globalRadio \"messageOne\";"]},{"code":["player globalRadio configName selectRandom (\"true\" configClasses (configFile >> \"CfgRadio\"));"]}],"see_also":["sideRadio","groupRadio","customRadio","vehicleRadio","globalChat","directSay","commandRadio"],"notes":[{"user":"Killzone_Kid","date":"2016-12-03T21:33:00Z","text":"To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial), prefix the full filename including file extension with #. For example if there is a custom user sound file called `MySound.ogg`, to play it on the radio use:\n\n```sqf\nplayer globalRadio \"#MySound.ogg\";\n```"}]},{"name":"goggles","title":"goggles","type":"command","url":"https://community.bistudio.com/wiki/goggles","revid":320934,"updated":"2022-05-13T10:04:40Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns name of currently used goggles (for NVGoggles use hmd).","syntaxes":[{"syntax":"goggles unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_goggles = goggles assaultDiver; //G_Diving"]},{"code":["_goggles = goggles reconTeamLeader; //G_Shades_Black"]}],"see_also":["removeGoggles","addGoggles","hmd","headgear","binocular","getDiverState"]},{"name":"goto","title":"goto","type":"command","url":"https://community.bistudio.com/wiki/goto","revid":364521,"updated":"2024-05-16T20:46:23Z","groups":["Program Flow"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Break script flow and go to given label (defined by **#** - **NOT** to be confused with SQF's hash sign!)\n\n> [!WARNING]\n> This command only works in SQS Syntax.\n\n> [!NOTE]\n> Note that labels are not case sensitive and are searched for from the top of the script, so multiple occurrences of a label will only result in the topmost one ever being found.","syntaxes":[{"syntax":"goto label","params":[{"name":"label","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"label"}}],"examples":[{"text":"```sqs\ngoto \"myLabel\"\nplayer setDamage 1\n\n#myLabel\nhint \"you successfully avoided death!\"\n```","code":["goto \"myLabel\"\nplayer setDamage 1\n\n#myLabel\nhint \"you successfully avoided death!\""]}],"see_also":["Control Structures","SQS to SQF conversion"],"notes":[{"user":"Hardrock","date":"2006-08-04T10:52:00Z","text":"*Notes from before the conversion:*\n\n- This function works only inside of SQS script.\n- The search for labels always begins at the top of the script so that if there are multiple occurrences of a label the first occurrence will always be the one found.\n- Because of the searching order, it is faster to place loops which are executed often at the top of a script.\n- Labels are not case sensitive.\n- Loops which look something like the example below should be avoided as many of them could cause the mission to slow down:\n\n```sqs\n#wait\nif (condition) then { goto \"wait\" }\n```\n\nIt is better to use the **@** command to wait for a condition to be true, or put a small delay into the wait loop.\n\nExample:\n\n- While it is not required to include a delay in a loop, such a loop without a delay can cause the script to slow the game down, as the loop will be executed many times before the game engine interrupts the script.\n- Unless you really want the loop to execute multiple times during a frame, you should include a small delay.\n- You would need to have many scripts running for this to be a significant issue.\n- Deciding whether to use a script with a loop or a trigger or even a **@** statement to detect a condition is a complicated matter and should be subject to experimentation."},{"user":"UNN","date":"2006-08-04T12:17:00Z","text":"A goto command called within a forEach loop will only execute a single jump to goto, once the forEach loop has finished:\n\n```sqs\n{ goto \"wait\" } forEach [0, 1, 2, 3, 4]\n```"}]},{"name":"group","title":"group","type":"command","url":"https://community.bistudio.com/wiki/group","revid":377962,"updated":"2026-01-18T09:47:05Z","groups":["Groups"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the group a unit is assigned to.","syntaxes":[{"syntax":"group object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Group","type_expr":"Group","description":"for dead units, the returned group equals grpNull."},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_playerGrp = group player;"]}],"see_also":["local","join","leader","units","allGroups","groups","groupID","setGroupId","setGroupIdGlobal"],"notes":[{"user":"jafarin","date":"2006-08-19T12:00:00Z","text":"Few rules about group in OFP:R:\n\n1. When last man in group die or is moved to other group, group will be destroyed, and it can't be used anymore.\n1. First man joined to empty group will be group leader."}]},{"name":"groupChat","title":"groupChat","type":"command","url":"https://community.bistudio.com/wiki/groupChat","revid":376775,"updated":"2025-11-17T00:05:36Z","groups":["Radio and Chat"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Types text to the group radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec). Use clearRadio to clear chat history\n\n> [!IMPORTANT]\n> The unit must have an assigned radio item (such as ***\"ItemRadio\"***) to see or transmit the messages. A radio item must have the property `simulation = \"ItemRadio\";` in its CfgWeapons config.","syntaxes":[{"syntax":"unit groupChat chatText","params":[{"name":"unit","type":"Object","description":"unit transmitting message","type_expr":"Object"},{"name":"chatText","type":"String","description":"message to transmit","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"chatText"}}],"examples":[{"code":["_soldierOne groupChat \"Show this text\";"]},{"code":["driver vehicle player sideChat \"sideChat\";\ndriver vehicle player globalChat \"globalChat\";\ndriver vehicle player groupChat \"groupChat\";\nvehicle player vehicleChat \"vehicleChat\";\ndriver vehicle player commandChat \"commandChat\";\ndriver vehicle player customChat [1, \"customChat\"];\nsystemChat \"systemChat\";"]}],"see_also":["globalChat","sideChat","vehicleChat","commandChat","customChat","systemChat","groupRadio"]},{"name":"groupFromNetId","title":"groupFromNetId","type":"command","url":"https://community.bistudio.com/wiki/groupFromNetId","revid":364977,"updated":"2024-07-04T17:39:28Z","groups":["Groups","Multiplayer"],"status":"ok","games":{"arma3":"0.50","arma2oa":"1.63"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get group from the provided unique ID. For objects, use objectFromNetId.","syntaxes":[{"syntax":"groupFromNetId id","params":[{"name":"id","type":"String","type_expr":"String"}],"returns":{"type":"Group","type_expr":"Group"},"form":"unary","right":{"text":"id"}}],"examples":[{"code":["_group = groupFromNetId \"4:45\";"]}],"multiplayer":"- In singleplayer: Arma 3 v2.18 works as described (returned grpNull before v2.18 - see BIS_fnc_groupFromNetId)\n- In multiplayer: works as described","see_also":["objectFromNetId","netId","BIS_fnc_objectFromNetId","BIS_fnc_netId","BIS_fnc_groupFromNetId"]},{"name":"groupIconSelectable","title":"groupIconSelectable","type":"command","url":"https://community.bistudio.com/wiki/groupIconSelectable","revid":310231,"updated":"2022-05-05T13:10:57Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns whether or not group icons raise onGroupIconClick, onGroupIconOverEnter and onGroupIconOverLeave events.","syntaxes":[{"syntax":"groupIconSelectable","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true is selectable"},"form":"nullary"}],"examples":[{"code":["hint str groupIconSelectable;"]}],"see_also":["addGroupIcon","clearGroupIcons","getGroupIcon","getGroupIconParams","groupIconsVisible","onGroupIconClick","removeGroupIcon","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible"]},{"name":"groupIconsVisible","title":"groupIconsVisible","type":"command","url":"https://community.bistudio.com/wiki/groupIconsVisible","revid":310247,"updated":"2022-05-05T13:11:07Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns array with group icons visibility. A getter for setGroupIconsVisible","syntaxes":[{"syntax":"groupIconsVisible","params":[],"returns":{"type":"Array","type_expr":"Array","description":"[visibleOnMap, visibleOnHUD]"},"form":"nullary"}],"examples":[{"code":["hint str groupIconsVisible;"]}],"see_also":["hcShownBar","addGroupIcon","clearGroupIcons","getGroupIcon","getGroupIconParams","groupIconSelectable","onGroupIconClick","removeGroupIcon","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible"]},{"name":"groupId","title":"groupId","type":"command","url":"https://community.bistudio.com/wiki/groupId","revid":337336,"updated":"2023-01-18T11:45:01Z","groups":["Groups"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns a group's name or a unit's group ID number.","syntaxes":[{"syntax":"groupId group","params":[{"name":"group","type":"Group","type_expr":"Group"}],"returns":{"type":"String","type_expr":"String","description":"the group's name (e.g \"Alpha Red\")"},"form":"unary","right":{"text":"group"}},{"syntax":"groupId unit","since":"arma3 2.12","params":[{"name":"unit","type":"Object","description":"a group's unit","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"the unit's group ID (e.g \"2, taking command\")","text":"Number - the unit's group ID (e.g \"**2**, taking command\")"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"```sqf\n_name = groupId group player;            // e.g \"B Alpha 1-1\"\n```","code":["_name = groupId group player;\t\t\t// e.g \"B Alpha 1-1\""]},{"text":"```sqf\nprivate _unitGroupId = groupId player;    // e.g 3 (number, not a string)\n```","code":["private _unitGroupId = groupId player;\t// e.g 3 (number, not a string)"]}],"see_also":["setGroupId","setGroupIdGlobal","group"]},{"name":"groupOwner","title":"groupOwner","type":"command","url":"https://community.bistudio.com/wiki/groupOwner","revid":363282,"updated":"2024-03-26T10:51:53Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.40"},"since":"arma3 1.40","arma3_since":"1.40","locality":{"argument":"global","server_exec":true},"description":"Returns the machine network ID of the client to which the group is local. This command only works when called from the server. When called from a client, it always returns 0.","syntaxes":[{"syntax":"groupOwner group","params":[{"name":"group","type":"Group","type_expr":"Group"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"group"}}],"examples":[{"code":["_clientID = groupOwner _someGroup;"]}],"see_also":["owner","setOwner","setGroupOwner","local","group","didJIPOwner","remoteExecutedOwner"]},{"name":"groupRadio","title":"groupRadio","type":"command","url":"https://community.bistudio.com/wiki/groupRadio","revid":363908,"updated":"2024-04-24T22:08:47Z","groups":["Radio and Chat","Sounds"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sends the audio message to the group radio channel. The message is defined in CfgRadio in the description.ext file or config radio protocol.\n\n> [!IMPORTANT]\n> The unit must have an assigned radio item (such as ***\"ItemRadio\"***) to see or transmit the messages.\n> A radio item must have the property `simulation = \"ItemRadio\";` in its CfgWeapons config.\n\n> [!NOTE]\n> When the transmitting unit gets killed, the transmission is interrupted. However when the receiving unit gets killed, the transmission continues to play.","syntaxes":[{"syntax":"unit groupRadio radioName","params":[{"name":"unit","type":"Object","description":"unit to transmit","type_expr":"Object"},{"name":"radioName","type":"String","description":"class name from `CfgRadio`","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"radioName"}}],"examples":[{"code":["_soldierOne groupRadio \"messageOne\";"]},{"code":["player groupRadio (configName selectRandom (\"true\" configClasses (configFile >> \"CfgRadio\")));"]}],"multiplayer":"If you need the transmission to play on all computers, you have to execute it globally (see remoteExec).","see_also":["sideRadio","groupChat","customRadio","vehicleRadio","globalRadio","directSay","commandRadio"],"notes":[{"user":"Killzone_Kid","date":"2016-12-03T21:34:00Z","text":"To transmit user custom sounds (see Multiplayer Custom Sounds Tutorial), prefix the full filename including file extension with `#`.\nFor example if there is a custom user sound file called `MySound.ogg`, to play it on the radio use:\n\n```sqf\nplayer groupRadio \"#MySound.ogg\";\n```"}]},{"name":"groups","title":"groups","type":"command","url":"https://community.bistudio.com/wiki/groups","revid":338341,"updated":"2023-02-28T14:38:39Z","groups":["Groups"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Returns an array with all groups of given side.","syntaxes":[{"syntax":"groups side","params":[{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Array of Groups","type_expr":"Array<Group>"},"form":"unary","right":{"text":"side"}}],"examples":[{"code":["private _allBluforGroups = groups blufor; // equivalent of allGroups select { side _x == blufor };"]}],"see_also":["group","allGroups","units","allUnits"]},{"name":"groupSelectedUnits","title":"groupSelectedUnits","type":"command","url":"https://community.bistudio.com/wiki/groupSelectedUnits","revid":377896,"updated":"2026-01-05T17:44:14Z","groups":["Interaction"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns selected units in source group for normal commanding mode (individual units). For the High Command equivalent, see hcSelected.","syntaxes":[{"syntax":"groupSelectedUnits unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_selectedUnits = groupSelectedUnits player;"]}],"see_also":["groupSelectUnit"]},{"name":"groupSelectUnit","title":"groupSelectUnit","type":"command","url":"https://community.bistudio.com/wiki/groupSelectUnit","revid":330040,"updated":"2022-08-15T15:25:02Z","groups":["Interaction"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Selects a unit from player's group. If player is the leader, the effect of this command is similar to player pressing <kbd>F1</kbd>, <kbd>F2</kbd>, <kbd>F3</kbd> etc to highlight units in his squad, after which the unit command menu is shown.\nIf leader is AI, player will get usual communication menu to interact with the leader.","syntaxes":[{"syntax":"player groupSelectUnit [unit, select]","params":[{"name":"player","type":"Object","type_expr":"Object"},{"name":"unit","type":"Object","type_expr":"Object"},{"name":"select","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"player"},"right":{"text":"[unit, select]"}}],"examples":[{"text":"After leaving menu, deselect all units (command menu is not opened → no selection)\n\n```sqf\n{\n    player groupSelectUnit [_x, false];\n} forEach (groupSelectedUnits player);\n```","code":["{\n\tplayer groupSelectUnit [_x, false];\n} forEach (groupSelectedUnits player);"]},{"text":"Select all units when player is the leader:\n\n```sqf\n{\n    player groupSelectUnit [_x, true];\n} forEach units player;\n```","code":["{\n\tplayer groupSelectUnit [_x, true];\n} forEach units player;"]},{"text":"Open communication with group leader:\n\n```sqf\nplayer groupSelectUnit [leader player, true];\n```","code":["player groupSelectUnit [leader player, true];"]}],"see_also":["groupSelectedUnits"]},{"name":"grpNull","title":"grpNull","type":"command","url":"https://community.bistudio.com/wiki/grpNull","revid":321055,"updated":"2022-05-13T12:17:13Z","groups":["Groups"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"A non-existing Group. To compare non-existent groups use isNull or isEqualTo:\n\n```sqf\ngrpNull == grpNull;            // false\nisNull grpNull;                // true\ngrpNull isEqualTo grpNull;    // true\n```","syntaxes":[{"syntax":"grpNull","params":[],"returns":{"type":"Group","type_expr":"Group"},"form":"nullary"}],"examples":[{"code":["!isNull grpNull; // false"]},{"code":["str grpNull; // <NULL-group>"]}],"see_also":["controlNull","displayNull","locationNull","objNull","taskNull","teamMemberNull","scriptNull","configNull","typeName","isNull"]},{"name":"gunner","title":"gunner","type":"command","url":"https://community.bistudio.com/wiki/gunner","revid":348608,"updated":"2023-11-08T13:45:17Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the gunner of a vehicle.","syntaxes":[{"syntax":"gunner vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"the person sitting in the gunner place is returned. If vehicle is not a vehicle but a person, the person is returned."},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["gunner _tank action [\"getout\", _tank];"]}],"see_also":["commander","driver","crew","currentPilot"]},{"name":"gusts","title":"gusts","type":"command","url":"https://community.bistudio.com/wiki/gusts","revid":376953,"updated":"2026-01-01T05:39:26Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Return the current gusts value.","syntaxes":[{"syntax":"gusts","params":[],"returns":{"type":"Number","type_expr":"Number","description":"in range 0..1","text":"Number in range 0..1"},"form":"nullary"}],"examples":[{"code":["_gustsValue = gusts;"]}],"see_also":["setGusts","windStr","wind"]},{"name":"halt","title":"halt","type":"command","url":"https://community.bistudio.com/wiki/halt","revid":377978,"updated":"2026-01-19T18:48:19Z","groups":["Program Flow","Broken Commands"],"status":"broken","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"This command was meant to break the script into debugger, however currently **it does not do anything** except displaying and logging the following error: `Error Debugger breakpoint hit`.","syntaxes":[{"syntax":"halt","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"always returns false"},"form":"nullary"}],"examples":[{"code":["if (_displayAnError) then {halt};"]}],"see_also":["assert","terminate"]},{"name":"handgunItems","title":"handgunItems","type":"command","url":"https://community.bistudio.com/wiki/handgunItems","revid":321090,"updated":"2022-05-13T13:46:43Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns array with all items assigned to the handgunWeapon except magazines. Use handgunMagazine command for the latter. This command is used for infantry weapons only.","syntaxes":[{"syntax":"handgunItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"[silencer, laserpointer/flashlight, optics, bipod]"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"```sqf\nhandgunItems player;\n/*\n[\n    \"muzzle_snds_L\",    // silencer\n    \"\",                    // laser\n    \"\",                    // optics\n    \"\"                    // bipod\n]\n*/\n```","code":["handgunItems player;\n/*\n[\n\t\"muzzle_snds_L\",\t// silencer\n\t\"\",\t\t\t\t\t// laser\n\t\"\",\t\t\t\t\t// optics\n\t\"\"\t\t\t\t\t// bipod\n]\n*/"]}],"see_also":["addHandgunItem","removeHandgunItem","removeAllHandgunItems","weaponAccessories","weaponAccessoriesCargo","primaryWeaponItems","secondaryWeaponItems","weaponsItems","binocularItems","weaponsItemsCargo"]},{"name":"handgunMagazine","title":"handgunMagazine","type":"command","url":"https://community.bistudio.com/wiki/handgunMagazine","revid":377157,"updated":"2026-01-01T10:38:51Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.70"},"since":"arma3 0.70","arma3_since":"0.70","locality":{"argument":"global"},"description":"Collects all loaded magazines from all handgunWeapon muzzles and returns them in Array, otherwise it returns []. This command is used for infantry weapons only.","syntaxes":[{"syntax":"handgunMagazine unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hint str handgunMagazine player; // [\"16Rnd_9x21_Mag\"]"]},{"text":"```sqf\n_array = handgunMagazine player;\nif (count _array > 0) then {\n    hint (\"Handgun is loaded with \" + (_array select 0) + \"!\");\n} else {\n    if (handgunWeapon player != \"\") then {\n        hint \"Handgun is not loaded!\";\n    } else {\n        hint \"Player doesn't have a handgun!\";\n    };\n};\n```","code":["_array = handgunMagazine player;\nif (count _array > 0) then {\n\thint (\"Handgun is loaded with \" + (_array select 0) + \"!\");\n} else {\n\tif (handgunWeapon player != \"\") then {\n\t\thint \"Handgun is not loaded!\";\n\t} else {\n\t\thint \"Player doesn't have a handgun!\";\n\t};\n};"]}],"see_also":["handgunWeapon","handgunItems","addHandgunItem","removeHandgunItem","removeAllHandgunItems","primaryWeaponMagazine","secondaryWeaponMagazine","binocularMagazine"]},{"name":"handgunWeapon","title":"handgunWeapon","type":"command","url":"https://community.bistudio.com/wiki/handgunWeapon","revid":320951,"updated":"2022-05-13T10:04:47Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the name of a unit's handgun (an empty string if there is none).","syntaxes":[{"syntax":"handgunWeapon unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hint handgunWeapon player; //\"hgun_P07_F\""]}],"see_also":["handgunMagazine","handgunItems","addHandgunItem","removeHandgunItem","removeAllHandgunItems","primaryWeapon","secondaryWeapon","currentWeapon","weapons"]},{"name":"handsHit","title":"handsHit","type":"command","url":"https://community.bistudio.com/wiki/handsHit","revid":329502,"updated":"2022-07-29T13:32:42Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks if a soldier's hands are hit, which results in inaccurate aiming.","syntaxes":[{"syntax":"handsHit unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"if the hands are not damaged, the returned value is 0. If the hands are hit or the unit is dead, the returned value is 1."},"form":"unary","right":{"text":"unitName"}}],"examples":[{"text":"```sqs\n? (handsHit player == 1) : player globalChat \"Ouch! Don't shoot at my hands dammit!\"\n```","code":["? (handsHit player == 1) : player globalChat \"Ouch! Don't shoot at my hands dammit!\""]}],"see_also":["damage"]},{"name":"hasCustomFace","title":"hasCustomFace","type":"command","url":"https://community.bistudio.com/wiki/hasCustomFace","revid":369746,"updated":"2024-10-08T15:07:09Z","groups":["Unit Identity"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"global"},"description":"Get whether or not a player has an available custom face file.\n\n> [!NOTE]\n> To check if this custom face is currently being used, use face (returns \"Custom\" in that case).","syntaxes":[{"syntax":"hasCustomFace person","params":[{"name":"person","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if player has a `face.paa/jpg` file in their current profile and it is usable"},"form":"unary","right":{"text":"person"}}],"examples":[{"text":"```sqf\nif (isPlayer _thisUnit && hasCustomFace _thisUnit && face _thisUnit != \"Custom\") then\n{\n    [_thisUnit, \"Custom\"] remoteExec [\"setFace\", 0, true];\n};\n```","code":["if (isPlayer _thisUnit && hasCustomFace _thisUnit && face _thisUnit != \"Custom\") then\n{\n\t[_thisUnit, \"Custom\"] remoteExec [\"setFace\", 0, true];\n};"]}],"see_also":["face","setFace","setIdentity","setSpeaker"]},{"name":"hashValue","title":"hashValue","type":"command","url":"https://community.bistudio.com/wiki/hashValue","revid":379221,"updated":"2026-10-30T22:51:35Z","groups":["HashMap"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Processes provided *value*'s hash, and encodes it using [Base64](https://en.wikipedia.org/wiki/Base64). The hash algorithm is [FNV-1A 64bit](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function).\n\n> [!NOTE]\n> A hash value remains the same between game restarts but for Object and Group type, their hash being based on their netId.","syntaxes":[{"syntax":"hashValue value","params":[{"name":"value","type":"Array, Boolean, Code, Config, Group, HashMap, Namespace, NaN, Number, Object, Script Handle, Side or String","type_expr":"Array | Boolean | Code | Config | Group | HashMap | Namespace | NaN | Number | Object | Script Handle | Side | String"}],"returns":{"type":"String","type_expr":"String","description":"base64-encoded 64 bits hash"},"form":"unary","right":{"text":"value"}}],"examples":[{"code":["private _valueHash = hashValue \"Hello There\";"]},{"code":["private _isCorrectPW = hashValue _enteredPassword == \"eWkXUUqiinE\";"]},{"code":["hashValue (systemTime joinString \"\"); // Returns a unique hash value such as \"xoMQ9qd7S60\""]}],"see_also":["createHashMap","values"]},{"name":"hasInterface","title":"hasInterface","type":"command","url":"https://community.bistudio.com/wiki/hasInterface","revid":379352,"updated":"2026-10-30T23:55:06Z","groups":["Multiplayer"],"status":"ok","games":{"arma2oa":"1.63","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.63","arma3_since":"0.50","description":"Returns true if the computer has an interface (a real player). False for a dedicated server or for a headless client.","syntaxes":[{"syntax":"hasInterface","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_isHC = !(hasInterface || isDedicated);"]},{"code":["_isHC = !hasInterface && !isDedicated;"]}],"see_also":["isDedicated","isServer"],"notes":[{"user":"Killzone_Kid","date":"2014-12-21T14:55:00Z","text":"```sqf\nif (isDedicated) then {\n    //run on dedicated server only\n};\n\nif (isServer) then {\n    //run on dedicated server or player host\n};\n\nif (hasInterface) then {\n    //run on all player clients incl. player host\n};\n\nif (!isDedicated) then {\n    //run on all player clients incl. player host and headless clients\n};\n\nif (!isServer) then {\n    //run on all player clients incl. headless clients but not player host\n};\n\nif (!hasInterface) then {\n    //run on headless clients and dedicated server\n};\n\nif (!hasInterface && !isDedicated) then {\n    //run on headless clients only\n};\n```"}]},{"name":"hasPilotCamera","title":"hasPilotCamera","type":"command","url":"https://community.bistudio.com/wiki/hasPilotCamera","revid":310236,"updated":"2022-05-05T13:10:59Z","groups":["Pilot Camera"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","locality":{"argument":"global"},"description":"Returns true if the object airplane or helicopter has a pilotCamera.","syntaxes":[{"syntax":"hasPilotCamera object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["hasPilotCamera vehicle player;"]}],"see_also":["getPilotCameraPosition","getPilotCameraDirection","getPilotCameraRotation","getPilotCameraTarget","setPilotCameraDirection","setPilotCameraRotation","setPilotCameraTarget"]},{"name":"hasWeapon","title":"hasWeapon","type":"command","url":"https://community.bistudio.com/wiki/hasWeapon","revid":318541,"updated":"2022-05-13T09:14:18Z","groups":["Weapons","Unit Inventory"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks if a unit has the given weapon in hands or on back/in holster. Weapons inside unit containers such as vest and backpack are not counted.","syntaxes":[{"syntax":"unitName hasWeapon weaponName","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"weaponName","type":"String","description":"the name of the weapon to check for.","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if the unit has the weapon, false if not."},"form":"binary","left":{"text":"unitName"},"right":{"text":"weaponName"}}],"examples":[{"code":["if !(player hasWeapon \"arifle_MX_ACO_pointer_F\") then { player addWeapon \"arifle_MX_ACO_pointer_F\" };"]}],"see_also":["weapons"],"notes":[{"user":"Benargee","date":"2014-09-11T10:49:00Z","text":"This command doesn't work for Items in Arma 3, use this instead (e.g ItemGPS).\n\n```sqf\n\"ItemGPS\" in (items player + assignedItems player)\n```\n\nReturns true if unit has gps in inventory, assigned or not."}]},{"name":"hcAllGroups","title":"hcAllGroups","type":"command","url":"https://community.bistudio.com/wiki/hcAllGroups","revid":377156,"updated":"2026-01-01T10:38:32Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns selected groups in high command.","syntaxes":[{"syntax":"hcAllGroups unit","params":[{"name":"unit","type":"Object","description":"commander","type_expr":"Object"}],"returns":{"type":"Array of Groups","type_expr":"Array<Group>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hcAllGroups player;"]}],"see_also":["High Command","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","onHCGroupSelectionChanged"]},{"name":"hcGroupParams","title":"hcGroupParams","type":"command","url":"https://community.bistudio.com/wiki/hcGroupParams","revid":319122,"updated":"2022-05-13T09:23:13Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns parameters describing group in high command bar. Return value is array in format [groupName, teamName] or [] if error. Possible values for team name:\n\n- `\"teammain\"` (default)\n- `\"teamred\"`\n- `\"teamgreen\"`\n- `\"teamblue\"`\n- `\"teamyellow\"`","syntaxes":[{"syntax":"unit hcGroupParams group","params":[{"name":"unit","type":"Object","description":"commander","type_expr":"Object"},{"name":"group","type":"Group","type_expr":"Group"}],"returns":{"type":"Array","type_expr":"Array"},"form":"binary","left":{"text":"unit"},"right":{"text":"group"}}],"examples":[{"code":["player hcGroupParams someGroup;"]}],"see_also":["High Command","hcAllGroups","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","onHCGroupSelectionChanged"]},{"name":"hcLeader","title":"hcLeader","type":"command","url":"https://community.bistudio.com/wiki/hcLeader","revid":379424,"updated":"2026-10-31T00:04:41Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns group's high command commander.","syntaxes":[{"syntax":"hcLeader group","params":[{"name":"group","type":"Group","type_expr":"Group"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"group"}}],"examples":[{"code":["_leader = hcLeader groupName;"]}],"see_also":["High Command","hcAllGroups","hcGroupParams","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","onHCGroupSelectionChanged"],"notes":[{"user":"Dimitri Harkov","date":"2009-09-02T00:00:00Z","text":"hcLeader returns 'NULL_OBJECT' if you use it on your HC commander's group in a HC setup with subordinates. It seems to work as expected if you don't use subordinates."}]},{"name":"hcRemoveAllGroups","title":"hcRemoveAllGroups","type":"command","url":"https://community.bistudio.com/wiki/hcRemoveAllGroups","revid":363244,"updated":"2024-03-26T10:51:19Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Remove all groups from unit's high command bar.","syntaxes":[{"syntax":"hcRemoveAllGroups unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hcRemoveAllGroups player;"]}],"see_also":["High Command","hcAllGroups","hcGroupParams","hcLeader","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","onHCGroupSelectionChanged"]},{"name":"hcRemoveGroup","title":"hcRemoveGroup","type":"command","url":"https://community.bistudio.com/wiki/hcRemoveGroup","revid":363247,"updated":"2024-03-26T10:51:22Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Removes group from unit's high command bar.","syntaxes":[{"syntax":"unit hcRemoveGroup group","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"group","type":"Group","type_expr":"Group"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"group"}}],"examples":[{"code":["player hcRemoveGroup BIS_group;"]}],"see_also":["High Command","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","onHCGroupSelectionChanged"]},{"name":"hcSelected","title":"hcSelected","type":"command","url":"https://community.bistudio.com/wiki/hcSelected","revid":377155,"updated":"2026-01-01T10:38:13Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns selected groups in high command.","syntaxes":[{"syntax":"hcSelected unit","params":[{"name":"unit","type":"Object","description":"commander","type_expr":"Object"}],"returns":{"type":"Array of Groups","type_expr":"Array<Group>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["array = hcSelected unit;"]}],"see_also":["High Command","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","onHCGroupSelectionChanged"]},{"name":"hcSelectGroup","title":"hcSelectGroup","type":"command","url":"https://community.bistudio.com/wiki/hcSelectGroup","revid":347546,"updated":"2023-09-28T09:23:04Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Select given group in high command bar.","syntaxes":[{"syntax":"unit hcSelectGroup array","params":[{"name":"unit","type":"Object","description":"HC Owner","type_expr":"Object"},{"name":"array","type":"Array of Groups","type_expr":"Array<Group>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"array"}}],"examples":[{"code":["player hcSelectGroup [group_1,group_2];"]}],"see_also":["High Command","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSetGroup","hcShowBar","hcShownBar","onHCGroupSelectionChanged"]},{"name":"hcSetGroup","title":"hcSetGroup","type":"command","url":"https://community.bistudio.com/wiki/hcSetGroup","revid":376359,"updated":"2025-10-07T21:40:53Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Add group to unit's high command bar.\n\n> [!NOTE]\n> The previous HC leader should be removed before adding the new one (see **Example 3**).","syntaxes":[{"syntax":"unit hcSetGroup [group, groupName, team]","params":[{"name":"unit","type":"Object","description":"the leader","type_expr":"Object"},{"name":"group","type":"Group","type_expr":"Group"},{"name":"groupName","type":"String","optional":true,"type_expr":"String","text":"groupName: String - (Optional)"},{"name":"team","type":"String","optional":true,"default":"\"teamMain\"","description":"can be one of:\n\n- \"teamMain\"\n- \"teamRed\"\n- \"teamGreen\"\n- \"teamBlue\"\n- \"teamYellow\"","type_expr":"String","text":"team: String - (Optional, default \"teamMain\") can be one of:\n\n- \"teamMain\"\n- \"teamRed\"\n- \"teamGreen\"\n- \"teamBlue\"\n- \"teamYellow\""}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[group, groupName, team]"}}],"examples":[{"code":["unit hcSetGroup [_group, \"HQ\", \"teamred\"];"]},{"code":["player hcSetGroup [_group];"]},{"text":"```sqf\nif (player != hcLeader _group) then\n{\n    hcLeader _group hcRemoveGroup _group;\n    player hcSetGroup [_group];\n};\n```","code":["if (player != hcLeader _group) then\n{\n\thcLeader _group hcRemoveGroup _group;\n\tplayer hcSetGroup [_group];\n};"]}],"see_also":["High Command","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcShowBar","hcShownBar","onHCGroupSelectionChanged"]},{"name":"hcShowBar","title":"hcShowBar","type":"command","url":"https://community.bistudio.com/wiki/hcShowBar","revid":347544,"updated":"2023-09-28T09:12:35Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Shows or hides high command bar. There must be some groups under HC command to show HC bar.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.94 this command returns Nothing as it should","syntaxes":[{"syntax":"hcShowBar bool","params":[{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing","description":"(before Arma 3 v1.94 this command returned Object of null value)"},"form":"unary","right":{"text":"bool"}}],"examples":[{"code":["hcShowBar true;"]},{"code":["hcShowBar false;"]}],"see_also":["High Command","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShownBar","onHCGroupSelectionChanged"]},{"name":"hcShownBar","title":"hcShownBar","type":"command","url":"https://community.bistudio.com/wiki/hcShownBar","revid":319103,"updated":"2022-05-13T09:23:11Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return whether the High Command bar is shown/active.","syntaxes":[{"syntax":"hcShownBar","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if HC bar is shown, otherwise false"},"form":"nullary"}],"examples":[{"code":["if (hcShownBar) then { hint \"HC bar is active\"; };"]}],"see_also":["High Command","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","onHCGroupSelectionChanged"]},{"name":"headgear","title":"headgear","type":"command","url":"https://community.bistudio.com/wiki/headgear","revid":319125,"updated":"2022-05-13T09:23:14Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns headgear of unit.","syntaxes":[{"syntax":"headgear unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hint headgear player; //H_HelmetB"]}],"see_also":["addHeadgear","removeHeadgear","goggles","hmd"]},{"name":"hiddenActions","title":"hiddenActions","type":"command","url":"https://community.bistudio.com/wiki/hiddenActions","revid":378901,"updated":"2026-08-11T14:56:33Z","groups":["Interaction"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","description":"> [!IMPORTANT]\n> This command is a work in progress and can evolve until release on stable branch.\n\nGetter for hideActions, see also shownAction.","syntaxes":[{"syntax":"hiddenActions filter","params":[{"name":"filter","type":"Array","description":"Array of Numbers - actions to check if hidden or [] to check all. See shownAction for numbers meaning","type_expr":"Array"}],"returns":{"type":"Array","type_expr":"Array","description":"Array of Numbers - actions that are hidden or [] if none is hidden. See shownAction for numbers meaning"},"form":"unary","right":{"text":"filter"}}],"examples":[{"code":["if (hiddenActions [] isEqualTo []) then { hint \"No actions have been harmed during script execution\" };"]},{"code":["if (hiddenActions [91] isEqualTo [91]) then { hint \"User actions have been hidden\" };"]},{"code":["hiddenActions []; // [2] - GetInDriver is hidden"]},{"code":["hiddenActions [1, 2, 4]; // [1,4] - from GetInCommander/Driver/Gunner only Commander and Gunner are hidden"]}],"see_also":["hideActions","shownAction","visibleMap","shownGPS","shownWatch","shownCompass","shownUAVFeed","shownHUD","addAction","action","isActionMenuVisible"]},{"name":"hideActions","title":"hideActions","type":"command","url":"https://community.bistudio.com/wiki/hideActions","revid":378963,"updated":"2026-09-06T22:42:03Z","groups":["Interaction"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","description":"> [!IMPORTANT]\n> This command is a work in progress and can evolve until release on stable branch.\n\nHides/unhides user UI actions given by their enum number (see shownAction).\n\n> [!NOTE]\n> This command hides actions for the current player (focusOn), a respawned player will have all actions unhidden so it must be reapplied.","syntaxes":[{"syntax":"hideActions [mode, actions]","params":[{"name":"mode","type":"Number or String or Boolean mode of operation, could be one of:","description":"Number or String or Boolean mode of operation, could be one of:\n\n- 0 or \"UnhideSelected\" or false - only given actions (if previously hidden) would be unhidden\n- 1 or \"HideSelected\" or true - only given actions would be hidden\n- 2 or \"UnhideAllButSelected\" - all hidden actions will be unhidden except for the given actions\n- 3 or \"HideAllButSelected\" - all actions will be hidden except for the given actions","type_expr":"Number | String | Boolean","text":"mode: Number or String or Boolean mode of operation, could be one of:\n\n- 0 or \"UnhideSelected\" or false - only given actions (if previously hidden) would be unhidden\n- 1 or \"HideSelected\" or true - only given actions would be hidden\n- 2 or \"UnhideAllButSelected\" - all hidden actions will be unhidden except for the given actions\n- 3 or \"HideAllButSelected\" - all actions will be hidden except for the given actions"},{"name":"actions","type":"Array of Numbers (see shownAction)","type_expr":"Array<Number>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[mode, actions]"}}],"examples":[{"code":["hideActions [true, [1, 2]]; //hide GetInCommander and GetInDriver actions"]},{"code":["hideActions [\"UnhideSelected\", [1, 2]]; //unhide GetInCommander and GetInDriver actions"]},{"code":["hideActions [1, [91]]; //hide all user added actions"]},{"code":["hideActions [\"HideAllButSelected\", [91]]; //hide all engine actions leaving only user added"]},{"code":["hideActions [3, []]; //hide all actions"]},{"code":["hideActions [\"UnhideAllButSelected\", []]; //unhide all hidden actions"]}],"see_also":["hiddenActions","shownAction","visibleMap","shownGPS","shownWatch","shownCompass","shownUAVFeed","shownHUD","addAction","action","isActionMenuVisible","Arma 3: Mission Event Handlers"],"notes":[{"user":"Honger","date":"2026-08-27T20:33:24Z","text":"Hidden actions will also be unhidden once a game save is loaded/game is continued, \"Loaded\" Mission EH is therefore needed to maintain the chosen actions hidden. Actions need to be hidden again if player takes control of a UAV."}]},{"name":"hideBody","title":"hideBody","type":"command","url":"https://community.bistudio.com/wiki/hideBody","revid":309957,"updated":"2022-05-05T12:17:01Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Hides dead body of the given unit. After a short delay, the body slowly sinks into the ground. After awhile, when group of the unit becomes grpNull, the body gets deleted and becomes objNull. If applied to alive unit, nothing happens until unit dies, then the unit's body gets hidden. If a dead unit is human player, the body is hidden but not deleted until player respawns.","syntaxes":[{"syntax":"hideBody unit","params":[{"name":"unit","type":"Object","description":"person","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hideBody player1;"]}],"see_also":["deleteVehicle","setDamage","addToRemainsCollector"]},{"name":"hideObject","title":"hideObject","type":"command","url":"https://community.bistudio.com/wiki/hideObject","revid":349468,"updated":"2023-11-08T16:49:17Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.06","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.06","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Hide entity. Can be used on soldiers and vehicles, also on static objects.","syntaxes":[{"syntax":"hideObject object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"object"}},{"syntax":"object hideObject hidden","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"hidden","type":"Boolean","description":"true->hidden; false->visible","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"hidden"}}],"examples":[{"code":["hideObject unitName;"]},{"code":["objectName hideObject true;"]}],"see_also":["isObjectHidden","hideObjectGlobal","deleteCollection"],"notes":[{"user":"Shuko","date":"2010-07-15T20:00:00Z","text":"This command will hide a unit, but he will still shoot enemies. Unit will be invisible, but weapon muzzle are visible."},{"user":"McHide","date":"2011-02-04T08:13:00Z","text":"Use MP framework to activate this command on all players from server or any other maschine\n\n```sqf\n_nic = [nil, mantohide, \"per\", rHideObject, true] call RE; // In A3 use hideObjectGlobal instead.\n```"},{"user":"DamonDaemon","date":"2012-02-10T06:36:00Z","text":"Hidden Vehicles still emit smoke/rotor blade dust and (probably) still emit engine sounds.\nUseful for creating objects the mission maker doesn't want to be seen, like Units that protect a certain Area (like a safe-zone) against teamkillers or enemy units."},{"user":"Benargee","date":"2014-10-30T05:54:00Z","text":"When used on player, it only has an effect on third person mode. First person LOD is still visible."},{"user":"DreadedEntity","date":"2015-06-27T18:14:00Z","text":"hideObject and hideObjectGlobal disable object collision in addition to rendering.\n(tested by hiding buildings and running through, driving through, flying through, and shooting through where the building used to be)"}]},{"name":"hideObjectGlobal","title":"hideObjectGlobal","type":"command","url":"https://community.bistudio.com/wiki/hideObjectGlobal","revid":369350,"updated":"2024-09-03T18:43:03Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","locality":{"argument":"global","effect":"global","server_exec":true},"description":"This command is designed for MP. Hides object on all connected clients as well as JIP. Can be used on static objects. In singleplayer this command behaves just like hideObject.","syntaxes":[{"syntax":"hideObjectGlobal object","params":[{"name":"object","type":"Object","description":"object to hide","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"object"}},{"syntax":"object hideObjectGlobal hidden","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"hidden","type":"Boolean","description":"true → hidden; false → visible","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"hidden"}}],"examples":[{"code":["hideObjectGlobal myObject; // hides myObject\nhideObjectGlobal nearestBuilding [2500, 2500, 0];"]},{"text":"```sqf\nmyObject hideObjectGlobal true;    // hides myObject\nmyObject hideObjectGlobal false;    // shows myObject\n```","code":["myObject hideObjectGlobal true;\t// hides myObject\nmyObject hideObjectGlobal false;\t// shows myObject"]},{"code":["[myObject, true] remoteExec [\"hideObjectGlobal\", 2]; // remote-executes hideObjectGlobal from a client to the server"]}],"see_also":["hideObject","isObjectHidden","deleteCollection"],"notes":[{"user":"DreadedEntity","date":"2015-06-27T18:14:00Z","text":"hideObject and hideObjectGlobal disable object collision in addition to rendering. **A3 1.45.131175**\n(tested by hiding buildings and running through, driving through, flying through, and shooting through where the building used to be)"},{"user":"Demellion","date":"2016-09-01T12:04:00Z","text":"As of **A3 1,62.134494** running **hideObjectGlobal** in big loop may cause some objects not to be hidden for a players already connected or passed **JIP**. To avoid players rendering desync consider running that in **preInit** schedule of a server."},{"user":"DrSova","date":"2017-08-07T12:44:00Z","text":"In **A3 1.72.142342** when you hide object via hideObjectGlobal, model sounds still be audible.\nFor e.g. if you delete apex house from map, you still hear a conditioner sound at this spot"},{"user":"Tankbuster","date":"2018-10-13T18:36:00Z","text":"Eventhandlers such as \"explosion\" will work on hidden objects"}]},{"name":"hideSelection","title":"hideSelection","type":"command","url":"https://community.bistudio.com/wiki/hideSelection","revid":330039,"updated":"2022-08-15T15:23:51Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","locality":{"argument":"local","effect":"global"},"description":"Hides or shows the simple object's provided selection.","syntaxes":[{"syntax":"object hideSelection [selection, hidden]","params":[{"name":"object","type":"Object","description":"simple object","type_expr":"Object"},{"name":"selection","type":"String","description":"selection name","type_expr":"String"},{"name":"hidden","type":"Boolean","description":"true to hide, false to show","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[selection, hidden]"}}],"examples":[{"code":["_simpleObject hideSelection [\"some_selection\", true];"]}],"see_also":["createSimpleObject","selectionNames","allLODs"]},{"name":"hint","title":"hint","type":"command","url":"https://community.bistudio.com/wiki/hint","revid":376426,"updated":"2025-10-12T22:43:43Z","groups":["Interaction","Structured Text","Strings"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Outputs a hint message to the right of the screen (left of the screen in Operation Flashpoint) with a sound (except in Armed Assault).\nTo split message in multiple lines either use Structured Text or `\\n` (in lower case).\n\n> [!NOTE]\n> **Armed Assault:** Armed Assault hints are silent. For later titles, see hintSilent.","syntaxes":[{"syntax":"hint message","params":[{"name":"message","type":"String or Structured Text","description":"the message to display.","type_expr":"String | Structured Text"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"message"}}],"examples":[{"code":["// outputs the following:\n// Press W to move forward.\n// Press S to move backwards.\nhint \"Press W to move forward.\\nPress S to move backwards.\""]},{"code":["hint format [\"Hello, %1!\", name player];"]},{"code":["hint str count allPlayers;\nsleep 10;\nhintSilent \"\"; // hides the previous hint display"]},{"code":["hint parseText \"<t size='2.0'>Large text</t>\"; // displays text twice as large as the default one"]},{"code":["_txt = text \"Red text, right align\";\n_txt setAttributes [\"color\", \"#FF0000\", \"align\", \"right\"];\nhint composeText [_txt];"]}],"problems":"Operation Flashpoint v1.00 Armed Assault v1.00 Arma 2 v1.00 Hint messages that exceed the screen may lead to crashes.\nArma 3 v1.00 The game would not crash but suffer FPS drop / temporary freezing.","see_also":["hintC","hintCadet","hintSilent","diag_log"],"notes":[{"user":"DreadedEntity","date":"2014-10-20T19:27:00Z","text":"Be careful when using hints to visualize the effects of commands using the Debug Console. Hint can accept an undefined variable and neither the error nor the hint is shown, the command simply fails. Also notice how the hint command should be `hint str _i;`:\n\n```sqf\nfor \"_i\" from 0 to 50 do\n{\n    hint _i;\n};\n```\n\n**tested in A3 1.32.127785**\n\nIn a script, an \"undefined variable\" error will be shown as expected."},{"user":"DreadedEntity","date":"2014-10-21T23:07:00Z","text":"Contrary to previous games, Arma 3 will happily display hints that far exceed screen space.\nHowever, as hints get longer, FPS suffers tremendously.\n**tested in Debug Console, A3 1.32.127785 with the following:**\n\n```sqf\nhint str ((nearestObjects [player, [\"BUILDING\"],  100]) - [player]); 0 spawn { sleep 5; systemChat str diag_fps; };\nsleep 10;\nhint str ((nearestObjects [player, [\"BUILDING\"], 1000]) - [player]); 0 spawn { sleep 5; systemChat str diag_fps; };\n```\n\nResults were: **59.7015** and **5.17297**, respectively. Drawing a hint even longer than this, such as nearestObjects with a radius of 10,000 or 100,000 reduces your FPS so much Arma 3 **appears** to crash, though it doesn't.\n\nUnrelated: Hints will stay on screen for 30 seconds, then fade away over the course of 5 seconds. **Tested with: A3 1.32.127785**"},{"user":"DreadedEntity","date":"2015-02-17T23:14:00Z","text":"An open dialog will pause the 30-second hint fade timer.\n**(A3 1.38.128937)**"},{"user":"Feint","date":"2017-03-25T20:47:00Z","text":"The hint sound is audible only when you have the music volume turned up above 0 in the audio settings.\nOtherwise, it seems to act the same as hintSilent.\n\nThis is important because if you are running a hint that fires at 30 fps or more, the hint will slow down machines that have the music volume turned up but won't slow down machines that have the music volume turned off.\n\nBest practice is to use hint for an alert to the player and use hintSilent for a makeshift display of data to the player that is updated fairly often."}]},{"name":"hintC","title":"hintC","type":"command","url":"https://community.bistudio.com/wiki/hintC","revid":369068,"updated":"2024-09-02T20:24:57Z","groups":["Interaction","Structured Text","Strings"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Displays a very basic message dialog in the center of the screen. Player control is taken away until \"Continue\" is pressed. The message dialog can be dragged around on the screen. After \"Continue\" has been pressed, the content of the hintC is repeated in a normal hint.\n\n> [!NOTE]\n> In Singleplayer, the game is paused while the message dialog is visible.","syntaxes":[{"syntax":"hintC message","params":[{"name":"message","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"message"}},{"syntax":"title hintC message","params":[{"name":"title","type":"String","description":"message title","type_expr":"String"},{"name":"message","type":"String, Structured Text, Array of Strings or Array of Structured Text","type_expr":"String | Structured Text | Array<String> | Array<Structured Text>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"title"},"right":{"text":"message"}}],"examples":[{"code":["hintC \"Press W to move forward\";"]},{"text":"Same as the above in Arma 3 but without second hint displayed:\n\n```sqf\nhintC \"Press W to move forward\";\nhintC_EH = findDisplay 57 displayAddEventHandler [\"Unload\", {\n    _this spawn {\n        _this select 0 displayRemoveEventHandler [\"Unload\", hintC_EH];\n        hintSilent \"\";\n    };\n}];\n```","code":["hintC \"Press W to move forward\";\nhintC_EH = findDisplay 57 displayAddEventHandler [\"Unload\", {\n\t_this spawn {\n\t\t_this select 0 displayRemoveEventHandler [\"Unload\", hintC_EH];\n\t\thintSilent \"\";\n\t};\n}];"]},{"text":"```sqf\n\"Instructions\" hintC [\n    \"Press W to move forward.\",\n    \"Press S to move backwards.\",\n    \"Use the mouse to turn right or left.\",\n    \"Press V for weapon sights.\"\n];\n```","code":["\"Instructions\" hintC [\n\t\"Press W to move forward.\",\n\t\"Press S to move backwards.\",\n\t\"Use the mouse to turn right or left.\",\n\t\"Press V for weapon sights.\"\n];"]},{"text":"Same as the above in Arma 3 but without second hint displayed:\n\n```sqf\n\"Instructions\" hintC [\n    \"Press W to move forward.\",\n    \"Press S to move backwards.\",\n    \"Use the mouse to turn right or left.\",\n    \"Press V for weapon sights.\"\n];\nhintC_EH = findDisplay 72 displayAddEventHandler [\"Unload\", {\n    _this spawn {\n        _this select 0 displayRemoveEventHandler [\"Unload\", hintC_EH];\n        hintSilent \"\";\n    };\n}];\n```","code":["\"Instructions\" hintC [\n\t\"Press W to move forward.\",\n\t\"Press S to move backwards.\",\n\t\"Use the mouse to turn right or left.\",\n\t\"Press V for weapon sights.\"\n];\nhintC_EH = findDisplay 72 displayAddEventHandler [\"Unload\", {\n\t_this spawn {\n\t\t_this select 0 displayRemoveEventHandler [\"Unload\", hintC_EH];\n\t\thintSilent \"\";\n\t};\n}];"]},{"code":["private _separator = parseText \"<br/>------------------------<br/>\";\nprivate _image = \"\\ca\\ui\\textures\\aus_flag.paa\";\nprivate _message = composeText [image _image, \"Heading Text\", _separator, \"Content\"];\n\"\" hintC _message;"]}],"see_also":["hint","hintCadet","hintSilent","BIS_fnc_guiMessage"],"notes":[{"user":"Str","date":"2006-07-31T18:18:00Z","text":"This command must be executed after mission start. If you place it into init.sqs or init field of some unit, it will not work. Just add a little delay (~0.001) and the place the command."},{"user":"Worldeater","date":"2009-05-15T23:42:00Z","text":"To display multiple messages after another you have to add a small delay in between. Otherwise only the first message will be displayed.\n\n```sqf\nhintC \"foo\"; sleep 0.1; hintC \"bar\"\n```\n\nWithout a sleep statement hintC will not suspend the script it has been called from."},{"user":"Killzone_Kid","date":"2015-03-19T09:52:00Z","text":"\"Titled\" hintC uses `display #72` while \"untitled\" one uses `display #57`. If you are trying examples in Arma 3 debug console, add a little delay like this:\n\n```sqf\n0 spawn { sleep 0.5; /* your example code goes here*/ };\n```\n\nor no hintC will be displayed."}]},{"name":"hintCadet","title":"hintCadet","type":"command","url":"https://community.bistudio.com/wiki/hintCadet","revid":379222,"updated":"2026-10-30T22:53:28Z","groups":["Interaction","Difficulty"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Shows a text hint only when in cadetMode.\n\nThe text can contain several lines. \\n is used to indicate the end of a line.","syntaxes":[{"syntax":"hintCadet text","params":[{"name":"text","type":"String or Structured Text","type_expr":"String | Structured Text"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"text"}}],"examples":[{"code":["hintCadet \"Press W to move forward\";"]}],"see_also":["hint","hintC","hintSilent","cadetMode"]},{"name":"hintSilent","title":"hintSilent","type":"command","url":"https://community.bistudio.com/wiki/hintSilent","revid":308951,"updated":"2022-04-18T20:23:57Z","groups":["Interaction","Structured Text","Strings"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Same as hint, but without a sound.","syntaxes":[{"syntax":"hintSilent text","params":[{"name":"text","type":"String or Structured Text","type_expr":"String | Structured Text"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"text"}}],"examples":[{"code":["hintSilent format [\"Hello, %1!\", name player];"]},{"code":["hint \"Hello there!\";\nsleep 5;\nhintSilent \"\"; // removes message"]}],"see_also":["hint","hintC","hintCadet"]},{"name":"hmd","title":"hmd","type":"command","url":"https://community.bistudio.com/wiki/hmd","revid":352035,"updated":"2024-02-01T23:24:28Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","locality":{"argument":"global"},"description":"Returns class name of currently used Head Mounted Display. Returns an empty string if the slot is empty.\n\n> [!NOTE]\n> If hmd returns \"\" this doesn't immediately mean unit has no hmd, some items like Special Helmet (\"H_HelmetO_ViperSP_ghex_F\") can have built-in hmd so you might want to check the type of headgear as well","syntaxes":[{"syntax":"hmd unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_nvgs = hmd player; //NVGoggles"]}],"see_also":["headgear","goggles","binocular"]},{"name":"hostMission","title":"hostMission","type":"command","url":"https://community.bistudio.com/wiki/hostMission","revid":369139,"updated":"2024-09-03T10:34:36Z","groups":["Multiplayer"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","description":"Host the multiplayer mission defined in the config class and opens the lobby with the scenario loaded. Must be called in UI action from a dialog.","syntaxes":[{"syntax":"hostMission [configEntry, activeDisplay]","params":[{"name":"configEntry","type":"Config","type_expr":"Config"},{"name":"activeDisplay","type":"Display","type_expr":"Display"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[configEntry, activeDisplay]"}}],"examples":[{"code":["hostMission [configFile >> \"CfgMissions\" >> \"MPMissions\" >> _scenarioClassName, _currentlyActiveDisplay];"]},{"text":"Launch host mission dialog from a client on dedicated server in Arma 3:\n\n```sqf\nhostMission [\n    configFile >> \"CfgMissions\" >> \"MPmissions\" >> \"MP_COOP_m01\",\n    findDisplay 46\n];\n```","code":["hostMission [\n\tconfigFile >> \"CfgMissions\" >> \"MPmissions\" >> \"MP_COOP_m01\",\n\tfindDisplay 46\n];"]}],"see_also":["playScriptedMission","playMission","createMPCampaignDisplay","createMissionDisplay"],"notes":[{"user":".kju","date":"2011-01-03T16:51:00Z","text":"The command must be called in the main menu or something similar menu it seems."}]},{"name":"htmlLoad","title":"htmlLoad","type":"command","url":"https://community.bistudio.com/wiki/htmlLoad","revid":369066,"updated":"2024-09-02T20:24:56Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Load HTML from file or URI using given control. File path is relative to current mission dir or an absolute path (with drive letter etc.).\nThe command is subject to restrictions, imposed by CfgCommands class.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v2.10 the 'title' attribute is supported within <img> and <a> html tags\n\n> [!IMPORTANT]\n> For unknown reasons, URL's length is limited to 255 characters.","syntaxes":[{"syntax":"control htmlLoad filename","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"filename","type":"String","description":"local file name or remote file URL","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"filename"}}],"examples":[{"code":["_control htmlLoad \"briefing.html\";"]},{"code":["_control htmlLoad \"http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English\";"]},{"text":"Display news item:\n\n```sqf\n0 spawn {\n    disableSerialization;\n    private _html = findDisplay 46 createDisplay \"RscCredits\" ctrlCreate [\"RscHTML\", -1];\n    _html ctrlSetBackgroundColor [0,0,0,0.8];\n    _html ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];\n    _html ctrlCommit 0;\n    _html htmlLoad \"http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English\";\n};\n```","code":["0 spawn {\n\tdisableSerialization;\n\tprivate _html = findDisplay 46 createDisplay \"RscCredits\" ctrlCreate [\"RscHTML\", -1];\n\t_html ctrlSetBackgroundColor [0,0,0,0.8];\n\t_html ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];\n\t_html ctrlCommit 0;\n\t_html htmlLoad \"http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English\";\n};"]}],"see_also":["ctrlHTMLLoaded","loadFile","preprocessFile","preprocessFileLineNumbers","HTML File Format"],"notes":[{"user":"BrotherhoodOfHam","date":"2014-09-07T18:02:00Z","text":"htmlLoad works with URLs as well as html files."},{"user":"Killzone_Kid","date":"2014-09-07T19:35:00Z","text":"While htmlLoad surprisingly does work with URLs as pointed above, the operation is blocking, meaning the whole game will freeze until the operation is complete.\nIt is therefore not recommended to use this command in such way."},{"user":"Benargee","date":"2015-04-21T18:08:00Z","text":"Example use of URL can be found in BIS_fnc_GUInewsfeed with the function browser."},{"user":"Tupolov","date":"2015-10-07T22:03:00Z","text":"(Arma 3) In order to use URLs, they must be included in CfgCommands -> allowedHTMLLoadURIs. In order to use URIs with params a wildcard * character is supported:\n**Script**\n\n```sqf\n_newsOnline = \"http://alivemod.com/alive_news.php?map=\" + _map + \"&amp;mission=\" + _mission + \"&amp;player=\" + _player;\n_ctrlHTML htmlLoad _newsOnline;\n```\n\n**Config**\n\n```cpp\nclass CfgCommands {\n    allowedHTMLLoadURIs[] += {\n        \"http://alivemod.com/alive_news.php*\"\n    };\n};\n```"}]},{"name":"HUDMovementLevels","title":"HUDMovementLevels","type":"command","url":"https://community.bistudio.com/wiki/HUDMovementLevels","revid":378504,"updated":"2026-05-03T16:49:48Z","groups":["Interaction"],"status":"ok","games":{"tkoh":"1.00","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","description":"Returns movement borders for HUD","syntaxes":[{"syntax":"HUDMovementLevels","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [minSpeed, maxSpeed, minAlt, maxAlt, minDir, maxDir, positionOrTarget]\n- minSpeed: Number - in m/s - maxSpeed: Number - in m/s - minAlt: Number - in meters - maxAlt: Number - in meters - minDir: Number - in degrees - maxDir: Number - in degrees - positionOrTarget: Position, Object","text":"Array with [minSpeed, maxSpeed, minAlt, maxAlt, minDir, maxDir, positionOrTarget]\n\n- minSpeed: Number - in m/s\n- maxSpeed: Number - in m/s\n- minAlt: Number - in meters\n- maxAlt: Number - in meters\n- minDir: Number - in degrees\n- maxDir: Number - in degrees\n- positionOrTarget: Position, Object"},"form":"nullary"}],"examples":[{"code":["HUDMovementLevels; // returns e.g [0,0,0,0,0,0,[0,0,0]]"]}],"see_also":["setHUDMovementLevels"]},{"name":"humidity","title":"humidity","type":"command","url":"https://community.bistudio.com/wiki/humidity","revid":376954,"updated":"2026-01-01T05:39:46Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns the current humidity value. 0 is no humidity and 1 is 100% humidity. Humidity value quickly changes from 0 to 1 when rain starts, then slowly changes from 1 to 0 when rain stops.","syntaxes":[{"syntax":"humidity","params":[],"returns":{"type":"Number","type_expr":"Number","description":"in range 0..1","text":"Number in range 0..1"},"form":"nullary"}],"examples":[{"code":["currentHumidity = humidity;"]},{"text":"```sqf\nskipTime -24;\n86400 setOvercast 1;\nskipTime 24;\n0 spawn {\n    10 setRain 1;\n    sleep 10;\n    10 setRain 0;\n};\nonEachFrame {\n    hintSilent str [round (rain * 10) / 10, round (humidity * 10) / 10];\n};\n```","code":["skipTime -24;\n86400 setOvercast 1;\nskipTime 24;\n0 spawn {\n\t10 setRain 1;\n\tsleep 10;\n\t10 setRain 0;\n};\nonEachFrame {\n\thintSilent str [round (rain * 10) / 10, round (humidity * 10) / 10];\n};"]}],"see_also":["setHumidity","simulSetHumidity","setOvercast","setRain","rain","overcast","fog","wind","waves"]},{"name":"if","title":"if","type":"command","url":"https://community.bistudio.com/wiki/if","revid":369387,"updated":"2024-09-03T18:43:16Z","groups":["Program Flow"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"This operator creates a If Type which is used in the if-construct as described here.","syntaxes":[{"syntax":"if condition","params":[{"name":"condition","type":"Boolean","description":"if it evaluates as true, the then clause is executed. Otherwise, the else clause (if present) is executed","type_expr":"Boolean"}],"returns":{"type":"If Type","type_expr":"If Type","description":"predicate which will execute 1st or 2nd option when used. This predicate is used in then or exitWith commands"},"form":"unary","right":{"text":"condition"}}],"examples":[{"code":["_retVal = if (1 > 0) then { \"It's true\" } else { \"It's false\" };\nhint str _retVal;"]},{"code":["_val = if (true) then [{ \"true\" }, { \"false\" }];\nhint _val;"]}],"see_also":["else","exitWith","then","Control Structures","Code Optimisation"],"notes":[{"user":"Ceeeb","date":"2007-01-31T04:08:00Z","text":"Any _local variables you declare within the body of an if/then statement (ie between the curly braces) are local to that 'if' statement, and are destroyed at the end of the statement. If you know you want to use the variable outside the 'if' statement, make sure your declare it before the 'if' statement."},{"user":"Galzohar","date":"2010-01-17T02:40:00Z","text":"If the condition is nil then neither the \"then\" nor the \"else\" section get executed, but the script will proceed with no error messages.\nExample code:\n\n```sqf\nsystemChat \"script started\";    // will get executed\nif (nil) then\n{\n    systemChat \"true\";            // will never get executed\n}\nelse\n{\n    systemChat \"false\";            // will never get executed\n};\nsystemChat \"script ended\";        // will get executed\n```"},{"user":"AgentRev","date":"2015-06-05T09:35:00Z","text":"If you only need to choose between 2 raw values, it is possible to use the following trick to avoid using code blocks, as required by the if command, which results in greater atomicity and faster execution:\n\n```sqf\n_result = [falseValue, trueValue] select condition;\n```\n\nThe select command treats \"false\" as 0 and \"true\" as 1, therefore you can feed it a condition determining the array index of the value to be returned. Here is another example:\n\n```sqf\n_result = [1,-1] select (_this < 0); // if _this is less than 0, _result will be equal to -1, otherwise it will be 1\n```"},{"user":"DreadedEntity","date":"2022-05-19T01:11:46Z","text":"When using **if** to assign values to a variable, if you not have an else block it is treated as nil and returned, setting the variable value to nil. A3 2.08.149102\n\n```sqf\nprivate _myVar = \"value\";\nprivate _condition = false;\n_myVar = if (_condition) then { \"another value\" }; //perfectly valid sqf\nsystemChat str (isNil \"_myVar\"); //returns true\n//_myVar is now nil\n_myVar = if (_condition) then { \"another value\" } else { \"value\" };\nsystemChat _myVar; //returns \"value\"\n```\n\nThis behavior can be both desirable and undesirable depending on your needs"}]},{"name":"ignore3DENHistory","title":"ignore3DENHistory","type":"command","url":"https://community.bistudio.com/wiki/ignore3DENHistory","revid":370529,"updated":"2025-01-02T11:51:16Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Ignores all history steps created by executing the given code.","syntaxes":[{"syntax":"ignore3DENHistory code","params":[{"name":"code","type":"Code","type_expr":"Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"code"}}],"examples":[{"text":"```sqf\nignore3DENHistory {\n    create3DENEntity [\"Object\", \"B_Soldier_F\", screenToWorld [0.5, 0.5]]; // no Ctrl+Z available for this operation\n};\n```","code":["ignore3DENHistory {\n\tcreate3DENEntity [\"Object\", \"B_Soldier_F\", screenToWorld [0.5, 0.5]]; // no Ctrl+Z available for this operation\n};"]}],"see_also":["collect3DENHistory","create3DENEntity","set3DENAttributes"]},{"name":"ignoreTarget","title":"ignoreTarget","type":"command","url":"https://community.bistudio.com/wiki/ignoreTarget","revid":369769,"updated":"2024-10-08T15:08:58Z","groups":["Object Detection"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"global"},"description":"Sets a target to be ignored by this Group. It will not appear in nearTargets and the group will not notice its presence. targetKnowledge can be used to check if a target is currently ignored. While a unit is ignored, reveal has no effect.","syntaxes":[{"syntax":"group ignoreTarget target","params":[{"name":"group","type":"Object or Group","description":"which receives revealing information","type_expr":"Object | Group","text":"group : Object or Group - which receives revealing information"},{"name":"target","type":"Object","description":"which would be ignored","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"target"}},{"syntax":"group ignoreTarget [target, isIgnored]","params":[{"name":"group","type":"Object or Group","description":"which receives revealing information","type_expr":"Object | Group","text":"group : Object or Group - which receives revealing information"},{"name":"target","type":"Object","description":"which would be ignored","type_expr":"Object"},{"name":"isIgnored","type":"Boolean","description":"whether the target should be ignored","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"[target, isIgnored]"}}],"examples":[{"code":["aiGroup ignoreTarget player"]}],"see_also":["knowsAbout","targetsQuery","targetsAggregate","nearTargets","reveal","targetKnowledge"]},{"name":"image","title":"image","type":"command","url":"https://community.bistudio.com/wiki/image","revid":379425,"updated":"2026-10-31T00:04:49Z","groups":["Strings","GUI Control","Structured Text"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Creates a structured text containing the given image. Use setAttributes to set additional attributes on the image.","syntaxes":[{"syntax":"image filename","params":[{"name":"filename","type":"String","type_expr":"String"}],"returns":{"type":"Structured Text","type_expr":"Structured Text"},"form":"unary","right":{"text":"filename"}}],"examples":[{"code":["hint composeText [\"Image: \", image \"\\a3\\Data_f\\Flags\\flag_Altis_co.paa\"];"]},{"code":["hint str (composeText [\"Image: \", image \"\\a3\\Data_f\\Flags\\flag_Altis_co.paa\"] == parseText \"Image: <img image='\\a3\\Data_f\\Flags\\flag_Altis_co.paa'/>\"); // true"]}],"see_also":["setAttributes","parseText","text","composeText","lineBreak"],"notes":[{"user":"Spooner","date":"2009-03-21T00:00:00Z","text":"Although there is a dedicated image command, parseText gives more options:\n\n```sqf\n_imageText = parseText \"<img size='5' color='#ff0000' image='fish.paa'/>\"\n```"}]},{"name":"import","title":"import","type":"command","url":"https://community.bistudio.com/wiki/import","revid":369760,"updated":"2024-10-08T15:08:56Z","groups":["Variables"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Imports one or multiple local variables from the parent scope, and defines them as private variables in the current scope. It can bypass privateAll.\n\n> [!NOTE]\n> For the config keyword, see import (Config).","syntaxes":[{"syntax":"import variableName","params":[{"name":"variableName","type":"String or Array of Strings","description":"variable(s) to import","type_expr":"String | Array<String>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"variableName"}}],"examples":[{"text":"```sqf\nprivate _myVar = 1;\ncall\n{\n    import \"_myVar\"; // similar to: private _myVar = _myVar;\n};\n```","code":["private _myVar = 1;\ncall\n{\n\timport \"_myVar\"; // similar to: private _myVar = _myVar;\n};"]},{"text":"```sqf\nprivate _a = 1;\nprivate _b = 2;\ncall\n{\n    import [\"_a\", \"_b\"]; // similar to: [_a, _b] params [\"_a\", \"_b\"];\n};\n```","code":["private _a = 1;\nprivate _b = 2;\ncall\n{\n\timport [\"_a\", \"_b\"]; // similar to: [_a, _b] params [\"_a\", \"_b\"];\n};"]}],"see_also":["privateAll","private","params"],"notes":[{"user":"Hypoxic125","date":"2024-03-03T18:31:25Z","text":"When making local functions, the imported variable does not have to exist until the function is called.\n\n```sqf\n// Local function\nprivate _stringifyNum = {\n    import \"_num\";\n    str _num;\n};\n\nprivate _num = 5;\ncall _stringifyNum;\n// Returns \"5\"\n```"}]},{"name":"importAllGroups","title":"importAllGroups","type":"command","url":"https://community.bistudio.com/wiki/importAllGroups","revid":363295,"updated":"2024-03-26T10:52:01Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Imports all groups into the RTE.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"importAllGroups map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"map"}}],"examples":[{"text":"-"}]},{"name":"importance","title":"importance","type":"command","url":"https://community.bistudio.com/wiki/importance","revid":323028,"updated":"2022-06-28T21:43:08Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Returns a location's importance value.","syntaxes":[{"syntax":"importance location","params":[{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"location"}}],"examples":[{"code":["_locationImportance = importance myLocation;"]}],"see_also":["setImportance"]},{"name":"in","title":"in","type":"command","url":"https://community.bistudio.com/wiki/in","revid":379353,"updated":"2026-10-30T23:55:14Z","groups":["Strings","Arrays","Locations","HashMap","Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Checks whether value is in array, unit is in vehicle, position is inside location or ANSI string is part of other ANSI string. If Unicode support is desired, see forceUnicode.\n\n> [!NOTE]\n> String comparison is case-sensitive (see Examples **2** and **6**).","syntaxes":[{"syntax":"value in array","params":[{"name":"value","type":"Anything","description":"any value (cannot match Array before Arma 3)","type_expr":"Anything"},{"name":"array","type":"Array","description":"array of values","type_expr":"Array"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"value"},"right":{"text":"array"}},{"syntax":"unit in vehicle","params":[{"name":"unit","type":"Object","description":"alive unit","type_expr":"Object"},{"name":"vehicle","type":"Object","description":"entity vehicle","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"unit"},"right":{"text":"vehicle"}},{"syntax":"position in location","since":"arma3 0.50","params":[{"name":"position","type":"Position2D or Position3D","type_expr":"Position2D | Position3D"},{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"position"},"right":{"text":"location"}},{"syntax":"needle in haystack","since":"arma3 1.96","params":[{"name":"needle","type":"String","description":"string to search **for**","type_expr":"String"},{"name":"haystack","type":"String","description":"string to search **in**","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"needle"},"right":{"text":"haystack"}},{"syntax":"key in hashMap","since":"arma3 2.02","params":[{"name":"key","type":"HashMapKey","type_expr":"HashMapKey"},{"name":"hashMap","type":"HashMap","type_expr":"HashMap","text":"hashMap : HashMap"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"key"},"right":{"text":"hashMap"}}],"examples":[{"code":["1 in [0, 1, 2]; // true"]},{"text":"```sqf\nprivate _myArray = [\"Aaa\", \"AAa\", \"AAA\"];\n\n\"aaa\" in _myArray; // false\n\"AAa\" in _myArray; // true\n\n// Case-insensitive alternatives:\n_myArray findIf { _x == \"aaa\"; } != -1; // true\n\n({\n    if (_x == \"aaa\") exitWith { _forEachIndex };\n    -1\n} forEach _myArray) != -1; // true, less performant but valid before the introduction of the findIf command\n\n{ if (_x == \"aaa\") exitWith { 1 } } count _myArray > 0; // true\n\n{ _x == \"aaa\"; } count _myArray > 0; // true, worst performance, only option available in OFP\n```","code":["private _myArray = [\"Aaa\", \"AAa\", \"AAA\"];\n\n\"aaa\" in _myArray; // false\n\"AAa\" in _myArray; // true\n\n// Case-insensitive alternatives:\n_myArray findIf { _x == \"aaa\"; } != -1; // true\n\n({\n\tif (_x == \"aaa\") exitWith { _forEachIndex };\n\t-1\n} forEach _myArray) != -1; // true, less performant but valid before the introduction of the findIf command\n\n{ if (_x == \"aaa\") exitWith { 1 } } count _myArray > 0; // true\n\n{ _x == \"aaa\"; } count _myArray > 0; // true, worst performance, only option available in OFP"]},{"code":["[1,2,3] in [[1,2,3], [4,5,6]]; // true - Arma 3 only"]},{"code":["private _isInCar = player in Car;"]},{"code":["private _isInside = [1000,2000,0] in MyLocation;"]},{"code":["private _isInString = \"foo\" in \"foobar\"; // true\n_isInString = \"Foo\" in \"foobar\"; // false"]},{"text":"```sqf\nprivate _onFoot = _unit in _unit;\n```\n\nOther options:\n\n```sqf\nprivate _onFoot = vehicle _unit == _unit;\n```\n\n```sqf\nprivate _onFoot = isNull objectParent _unit;\n```","code":["private _onFoot = _unit in _unit;","private _onFoot = vehicle _unit == _unit;","private _onFoot = isNull objectParent _unit;"]}],"see_also":["inPolygon","inArea","find","findIf","toArray","forceUnicode"],"notes":[{"user":"Lou Montana","date":"2019-10-08T21:08:00Z","text":"*From a description note:*\n*<unit>* in *<vehicle>* literally does this: `vehicle <unit> == <vehicle>`. If *<vehicle>* is the same as *<unit>* the expression will return true for when the *<unit>* is on foot and false for when *<unit>* is in vehicle (see example **7** & **8**)."}]},{"name":"inArea","title":"inArea","type":"command","url":"https://community.bistudio.com/wiki/inArea","revid":377541,"updated":"2026-01-02T06:54:31Z","groups":["Triggers","Markers","Locations","Positions"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Checks whether given position or object is inside given area. Use inAreaArray to check multiple positions/objects within area.\n\n> [!IMPORTANT]\n> By default all positions given as Array or as objects are treated as PositionAGL. Since Arma 3 v2.20 there is an option to force them to PositionWorld format.\n\n> [!NOTE]\n> This command also supports hexagon area which can be created from ellipse when both a and b are negative.\n> Hexagon ellipses are also supported by both marker creation and drawEllipse.","syntaxes":[{"syntax":"position inArea area","params":[{"name":"position","type":"Object or Position2D or Position3D (must be PositionAGL if area is checked in 3D)","type_expr":"Object | Position2D | Position3D | PositionAGL"},{"name":"area","type":"Object, String, Location","description":"Object, String, Location\n\n- Object - trigger\n- String - marker name\n- Location - location","type_expr":"Object | String | Location","text":"area: Object, String, Location\n\n- Object - trigger\n- String - marker name\n- Location - location"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"position"},"right":{"text":"area"}},{"syntax":"position inArea [center, a, b, angle, isRectangle, c, usePosWorld]","params":[{"name":"position","description":"Object and/or Position to check. Position must be PositionAGL if area is checked in 3D (see note in description)","type_expr":"Object | Position","text":"position: - Object and/or Position to check. Position must be PositionAGL if area is checked in 3D (see note in description)"},{"name":"center","type":"Array or Object","description":"center of the area in format Position2D, Position3D (must be PositionAGL if area is checked in 3D), Object or Group","type_expr":"Array | Object"},{"name":"a","type":"Number","description":"x axis (x / 2)","type_expr":"Number"},{"name":"b","type":"Number","description":"y axis (y / 2)","type_expr":"Number"},{"name":"angle","type":"Number","optional":true,"default":"0","description":"rotation angle","type_expr":"Number","optional_since":"arma3 2.20","text":"angle: Number - (Optional since 2.20, Default: 0) rotation angle"},{"name":"isRectangle","type":"Boolean","optional":true,"default":"false","description":"true if rectangle, false if ellipse","type_expr":"Boolean","optional_since":"arma3 2.20","text":"isRectangle: Boolean - (Optional since 2.20, Default: false) true if rectangle, false if ellipse"},{"name":"c","type":"Number","optional":true,"default":"-1 (unlimited)","description":"z axis (z / 2)","type_expr":"Number","since":"arma3 1.60","text":"c: Number - (Optional, default -1 (unlimited)) z axis (z / 2)"},{"name":"usePosWorld","type":"Boolean","optional":true,"default":"false","description":"set to true to treat all positions as PositionWorld","type_expr":"Boolean","since":"arma3 2.20","text":"usePosWorld: Boolean - (Optional, default false) set to true to treat all positions as PositionWorld"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"position"},"right":{"text":"[center, a, b, angle, isRectangle, c, usePosWorld]"}}],"examples":[{"code":["_playerIsInside = player inArea _myTrigger;"]},{"code":["_positionIsInside = _myPosition inArea [[100, 100, 0], 20, 30, 45, false];"]}],"see_also":["inAreaArray","triggerArea","in","inPolygon","drawEllipse","drawRectangle","createTrigger","createMarker","createLocation"]},{"name":"inAreaArray","title":"inAreaArray","type":"command","url":"https://community.bistudio.com/wiki/inAreaArray","revid":378040,"updated":"2026-01-27T13:05:40Z","groups":["Triggers","Markers","Locations","Positions"],"status":"ok","games":{"arma3":"1.66"},"since":"arma3 1.66","arma3_since":"1.66","description":"Returns given list of Objects and/or Positions that are in the given area, area defined by a trigger, marker, location or array.\n\n> [!IMPORTANT]\n> By default all positions given as Array or as objects are treated as PositionAGL. Since Arma 3 v2.20 there is an option to force them to PositionWorld format.","syntaxes":[{"syntax":"positions inAreaArray area","params":[{"name":"positions","type":"Array of Objects and/or Positions","type_expr":"Array<Object | Position>"},{"name":"area","type":"Object, Location or String","description":"the defined area:\n\n- Object - trigger\n- Location - location\n- String - marker name","type_expr":"Object | Location | String"}],"returns":{"type":"Array of Objects and/or Positions","type_expr":"Array<Object | Position>"},"form":"binary","left":{"text":"positions"},"right":{"text":"area"}},{"syntax":"positions inAreaArray [centre, a, b, angle, isRectangle, c, usePosWorld]","params":[{"name":"positions","type":"Array of Objects and/or Positions","description":"Places to check. Positions must be PositionAGL if area is checked in 3D (see note in description)","type_expr":"Array<Object | Position>"},{"name":"centre","type":"Position2D, PositionAGL, Arma 3 v2.14 Object or Group","type_expr":"Position2D | PositionAGL | Object | Group"},{"name":"a","type":"Number","description":"x axis (x / 2)","type_expr":"Number"},{"name":"b","type":"Number","description":"y axis (y / 2)","type_expr":"Number"},{"name":"angle","type":"Number","optional":true,"default":"0","description":"rotation angle","type_expr":"Number","text":"angle: Number - (Optional, default 0) rotation angle"},{"name":"isRectangle","type":"Boolean","optional":true,"default":"false","description":"true if rectangle, false if ellipse","type_expr":"Boolean","text":"isRectangle: Boolean - (Optional, default false) true if rectangle, false if ellipse"},{"name":"c","type":"Number","optional":true,"default":"-1: unlimited","description":"z axis (z / 2)","type_expr":"Number","text":"c: Number - (Optional, default -1: unlimited) z axis (z / 2)"},{"name":"usePosWorld","type":"Boolean","optional":true,"default":"false","description":"set to true to treat all positions as PositionWorld","type_expr":"Boolean","since":"arma3 2.20","text":"usePosWorld: Boolean - (Optional, default false) set to true to treat all positions as PositionWorld"}],"returns":{"type":"Array of Objects and/or Positions","type_expr":"Array<Object | Position>"},"form":"binary","left":{"text":"positions"},"right":{"text":"[centre, a, b, angle, isRectangle, c, usePosWorld]"}},{"syntax":"positions inAreaArray [pos1, pos2, pos3,...]","since":"arma3 2.20","params":[{"name":"positions","type":"Array of Objects and/or Positions","description":"places to check.","type_expr":"Array<Object | Position>"},{"name":"posN","type":"Position","description":"polygon vertices in 2d or 3d format (see inPolygon)","type_expr":"Position"}],"returns":{"type":"Array of Objects and/or Positions","type_expr":"Array<Object | Position>"},"form":"binary","left":{"text":"positions"},"right":{"text":"[pos1, pos2, pos3,...]"}}],"examples":[{"code":["vehicles inAreaArray myTrigger;"]},{"code":["allUnits inAreaArray \"myMarker\";"]},{"code":["allPlayers inAreaArray myLocation;"]},{"code":["allDead inAreaArray [[100, 100, 0], 20, 30, 45, false, 10];"]}],"see_also":["inAreaArrayIndexes","inArea","triggerArea"],"notes":[{"user":"Tankbuster","date":"2017-06-11T21:33:00Z","text":"The array you send the command can be filtered. For example:\n\n```sqf\nvehicles select { _x isKindOf \"StaticWeapon\" } inAreaArray \"myMarker\"\n```\n\nWill return only the statics inside the given marker."}]},{"name":"inAreaArrayIndexes","title":"inAreaArrayIndexes","type":"command","url":"https://community.bistudio.com/wiki/inAreaArrayIndexes","revid":379519,"updated":"2026-10-31T00:29:33Z","groups":["Triggers","Markers","Locations","Positions","Groups"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","description":"Returns indices of positions that are within the provided area.\n\n> [!IMPORTANT]\n> Unlike inAreaArray, all positions sent to this command are treated as PositionASL but the center as PositionAGL.\n\n> [!IMPORTANT]\n> Since Arma 3 v2.20 this command is fully compatible with inAreaArray, i.e by default all positions given as Array or as objects are treated as PositionAGL. There is also an option to force them to PositionWorld format.","syntaxes":[{"syntax":"positions inAreaArrayIndexes area","params":[{"name":"positions","type":"Array of Objects and/or Positions","type_expr":"Array<Object | Position>"},{"name":"area","type":"Object, Location or String","description":"the defined area:\n\n- Object - trigger\n- Location - location\n- String - marker name","type_expr":"Object | Location | String"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"indexes of matched positions in positions array"},"form":"binary","left":{"text":"positions"},"right":{"text":"area"}},{"syntax":"positions inAreaArrayIndexes [centre, a, b, angle, isRectangle, c, usePosWorld]","params":[{"name":"positions","type":"Array","description":"Objects and/or Positions to check (see note in description)","type_expr":"Array"},{"name":"centre","type":"Array","description":"Position Object or Group (see note in description)","type_expr":"Array"},{"name":"a","type":"Number","description":"x axis (x / 2)","type_expr":"Number"},{"name":"b","type":"Number","description":"y axis (y / 2)","type_expr":"Number"},{"name":"angle","type":"Number","optional":true,"default":"0","description":"rotation angle","type_expr":"Number","text":"angle: Number - (Optional, default 0) rotation angle"},{"name":"isRectangle","type":"Boolean","optional":true,"default":"false","description":"true if rectangle, false if ellipse","type_expr":"Boolean","text":"isRectangle: Boolean - (Optional, default false) true if rectangle, false if ellipse"},{"name":"c","type":"Number","optional":true,"default":"-1: unlimited","description":"z axis (z / 2)","type_expr":"Number","text":"c: Number - (Optional, default -1: unlimited) z axis (z / 2)"},{"name":"usePosWorld","type":"Boolean","optional":true,"default":"false","description":"set to true to treat all positions as PositionWorld","type_expr":"Boolean","since":"arma3 2.20","text":"usePosWorld: Boolean - (Optional, default false) set to true to treat all positions as PositionWorld"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"indexes of matched positions in positions array"},"form":"binary","left":{"text":"positions"},"right":{"text":"[centre, a, b, angle, isRectangle, c, usePosWorld]"}},{"syntax":"positions inAreaArrayIndexes [pos1, pos2, pos3,...]","params":[{"name":"positions","type":"Array","description":"Objects and/or Positions to check.","type_expr":"Array"},{"name":"posN","type":"Position","description":"polygon vertices in 2d or 3d format (see inPolygon)","type_expr":"Position"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"indexes of matched positions in positions array"},"form":"binary","left":{"text":"positions"},"right":{"text":"[pos1, pos2, pos3,...]"}}],"examples":[{"text":"```sqf\nprivate _players = call BIS_fnc_listPlayers;\nprivate _indices = _players inAreaArrayIndexes _marker;\n{\n    private _player = _players select _x;\n    [\"You are in the marker!\"] remoteExec [\"hint\", _player];\n} forEach _indices;\n```","code":["private _players = call BIS_fnc_listPlayers;\nprivate _indices = _players inAreaArrayIndexes _marker;\n{\n\tprivate _player = _players select _x;\n\t[\"You are in the marker!\"] remoteExec [\"hint\", _player];\n} forEach _indices;"]}],"see_also":["inAreaArray","inArea","triggerArea"]},{"name":"incapacitatedState","title":"incapacitatedState","type":"command","url":"https://community.bistudio.com/wiki/incapacitatedState","revid":379354,"updated":"2026-10-30T23:55:22Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Returns the incapacitated sub-state of the given unit, when the lifeState of the unit is \"INCAPACITATED\". Could be one of:\n\n- \"UNCONSCIOUS\"\n- \"MOVING\"\n- \"SHOOTING\"","syntaxes":[{"syntax":"incapacitatedState person","params":[{"name":"person","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"incapacitated sub-state (see description) or empty string \"\""},"form":"unary","right":{"text":"person"}}],"examples":[{"code":["_result = incapacitatedState player;"]}],"see_also":["setUnconscious","lifeState"],"notes":[{"user":"HazJ","date":"2018-07-18T02:53:00Z","text":"This command returns \"SHOOTING\" (intentional behaviour?) when checking a unit's state while they are unconscious. Tested with BIS revive. I recommend just using the lifeState command instead."},{"user":"Tankbuster","date":"2019-12-29T21:13:00Z","text":"Returns\n\"UNCONSCIOUS\" when awaiting revive.\n\"\" when alive or when awaiting respawn. This means that when a unit dies instantly, ie through drowning, this command will return empty string throughout. As Haz says above, it sometimes show \"SHOOTING\" when the player is unconscious for reasons that are not clear."}]},{"name":"independent","title":"independent","type":"command","url":"https://community.bistudio.com/wiki/independent","revid":369132,"updated":"2024-09-03T10:34:34Z","groups":["Sides"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Pre-defined variable for the independent side.","syntaxes":[{"syntax":"independent","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (side _unit == independent) then\n{\n    hint \"This is a independent unit!\";\n};\n```","code":["if (side _unit == independent) then\n{\n\thint \"This is a independent unit!\";\n};"]}],"aliases":["resistance"],"see_also":["side","civilian","blufor","east","opfor","resistance","west"]},{"name":"inflame","title":"inflame","type":"command","url":"https://community.bistudio.com/wiki/inflame","revid":319281,"updated":"2022-05-13T09:23:29Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Sets the state of a fireplace.","syntaxes":[{"syntax":"fireplace inflame burn","params":[{"name":"fireplace","type":"Object","type_expr":"Object"},{"name":"burn","type":"Boolean","description":"true to let it burn, false to extinguish it.","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"fireplace"},"right":{"text":"burn"}}],"examples":[{"code":["_fireplaceOne inflame true;"]}],"see_also":["inflamed"]},{"name":"inflamed","title":"inflamed","type":"command","url":"https://community.bistudio.com/wiki/inflamed","revid":310855,"updated":"2022-05-07T20:24:08Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.04","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.04","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks if fireplace is inflamed (burning) or not. To check if a unit is receiving damage from fire, use isBurning command.","syntaxes":[{"syntax":"inflamed fireplace","params":[{"name":"fireplace","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"fireplace"}}],"examples":[{"code":["_inflamed = inflamed _fireplaceOne;"]}],"see_also":["inflame","isBurning"]},{"name":"infoPanel","title":"infoPanel","type":"command","url":"https://community.bistudio.com/wiki/infoPanel","revid":378511,"updated":"2026-05-03T17:16:42Z","groups":["Custom Panels"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Returns information about what is currently displayed on given player's info panel.","syntaxes":[{"syntax":"infoPanel infoPanelId","params":[{"name":"infoPanelId","type":"String","description":"info panel classname, or \"left\" or \"right\"","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"with [componentClass, componentType]\n- componentClass: String - EmptyDisplay when no panel is open - componentType: String - EmptyDisplayComponent when no panel is open","text":"Array with [componentClass, componentType]\n\n- componentClass: String - *EmptyDisplay* when no panel is open\n- componentType: String - *EmptyDisplayComponent* when no panel is open"},"form":"unary","right":{"text":"infoPanelId"}}],"examples":[{"code":["infoPanel \"left\" params [\"_componentClass\", \"_componentType\"];"]}],"see_also":["Arma 3: Custom Info","infoPanels","setInfoPanel","infoPanelComponents","enableInfoPanelComponent","infoPanelComponentEnabled","openGPS"]},{"name":"infoPanelComponentEnabled","title":"infoPanelComponentEnabled","type":"command","url":"https://community.bistudio.com/wiki/infoPanelComponentEnabled","revid":377489,"updated":"2026-01-02T06:49:10Z","groups":["Custom Panels"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Controls availability of component to given object info panel.","syntaxes":[{"syntax":"unit infoPanelComponentEnabled [panelID, componentClassOrType]","params":[{"name":"unit","type":"Object","description":"the concerned vehicle","type_expr":"Object"},{"name":"panelID","type":"String","description":"\"left\" or \"right\" can be used as panel names","type_expr":"String"},{"name":"componentClassOrType","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if component was successfully enabled on the panel, false otherwise (e.g. component is not available for the object)"},"form":"binary","left":{"text":"unit"},"right":{"text":"[panelID, componentClassOrType]"}},{"syntax":"[unit, turretPath] infoPanelComponentEnabled [panelID, componentClassOrType]","params":[{"name":"unit","type":"Object","description":"the concerned vehicle","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","description":"turret index","type_expr":"Turret Path"},{"name":"panelID","type":"String","description":"\"left\" or \"right\" can be used as panel names","type_expr":"String"},{"name":"componentClassOrType","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"[unit, turretPath]"},"right":{"text":"[panelID, componentClassOrType]"}}],"examples":[{"code":["// returns true if specific component \"SensorDisplay\" is enabled on player vehicle's left panel\n_state = [vehicle player, [-1]] infoPanelComponentEnabled [\"VehicleSystemsDisplayManagerComponentLeft\", \"SensorDisplay\"];"]},{"code":["// returns true if all \"SensorsDisplayComponent\" components are enabled on player vehicle's left panel, otherwise returns false\n_state = [vehicle player, [-1]] infoPanelComponentEnabled [\"VehicleSystemsDisplayManagerComponentLeft\", \"SensorsDisplayComponent\"];"]}],"see_also":["Arma 3: Custom Info","infoPanel","infoPanels","setInfoPanel","infoPanelComponents","enableInfoPanelComponent"]},{"name":"infoPanelComponents","title":"infoPanelComponents","type":"command","url":"https://community.bistudio.com/wiki/infoPanelComponents","revid":378365,"updated":"2026-04-03T16:46:15Z","groups":["Custom Panels"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Returns array of all components available to given object info panel.","syntaxes":[{"syntax":"unit infoPanelComponents panelID","params":[{"name":"unit","type":"Object","description":"the concerned vehicle","type_expr":"Object"},{"name":"panelID","type":"String","description":"\"left\" or \"right\" can be used as panel names","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"with [className, componentType, isAccessible]\n- className: String - component classname as defined in object/vehicle config - componentType: String - componentType - component type - isAccessible: Boolean - boolean flag that shows if component is currently accessible (lack of required item can make it temporarily inaccessible)","text":"Array with [className, componentType, isAccessible]\n\n- className: String - component classname as defined in object/vehicle config\n- componentType: String - componentType - component type\n- isAccessible: Boolean - boolean flag that shows if component is currently accessible (lack of required item can make it temporarily inaccessible)"},"form":"binary","left":{"text":"unit"},"right":{"text":"panelID"}},{"syntax":"[unit, turretPath] infoPanelComponents panelID","params":[{"name":"unit","type":"Object","description":"the concerned vehicle","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","description":"turret index","type_expr":"Turret Path"},{"name":"panelID","type":"String","description":"\"left\" or \"right\" can be used as panel names","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"with [className, componentType, isAccessible]\n- className: String - component classname as defined in object/vehicle config - componentType: String - componentType - component type - isAccessible: Boolean - boolean flag that shows if component is currently accessible (lack of required item can make it temporarily inaccessible)","text":"Array with [className, componentType, isAccessible]\n\n- className: String - component classname as defined in object/vehicle config\n- componentType: String - componentType - component type\n- isAccessible: Boolean - boolean flag that shows if component is currently accessible (lack of required item can make it temporarily inaccessible)"},"form":"binary","left":{"text":"[unit, turretPath]"},"right":{"text":"panelID"}}],"examples":[{"code":["// returns array of all components configured for _helicopter pilot seat\nprivate _componentsData = [_helicopter, [-1]] infoPanelComponents \"left\";"]}],"see_also":["Arma 3: Custom Info","infoPanel","infoPanels","setInfoPanel","enableInfoPanelComponent","infoPanelComponentEnabled"]},{"name":"infoPanels","title":"infoPanels","type":"command","url":"https://community.bistudio.com/wiki/infoPanels","revid":378367,"updated":"2026-04-03T16:46:20Z","groups":["Custom Panels"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Returns array all info panels configured for given object or object and turret path.","syntaxes":[{"syntax":"infoPanels unit","params":[{"name":"unit","type":"Object","description":"the concerned vehicle","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"format [[infoPanelId1, infoPanelShortcutId1], [infoPanelId2, infoPanelShortcutId2], ...]:\n- infoPanelId: String - name of the info panel class as defined in vehicle config - infopanelShortcutId: String - shortcut representation of infopanelId, currently are supported only shortcuts \"left\" and \"right\"","text":"Array - format [[infoPanelId1, infoPanelShortcutId1], [infoPanelId2, infoPanelShortcutId2], ...]:\n\n- infoPanelId: String - name of the info panel class as defined in vehicle config\n- infopanelShortcutId: String - shortcut representation of *infopanelId*, currently are supported only shortcuts \"left\" and \"right\""},"form":"unary","right":{"text":"unit"}},{"syntax":"infoPanels [unit, turretPath]","params":[{"name":"unit","type":"Object","description":"the concerned vehicle","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","description":"turret index","type_expr":"Turret Path"}],"returns":{"type":"Array","type_expr":"Array","description":"format [[infoPanelId1, infoPanelShortcutId1], [infoPanelId2, infoPanelShortcutId2], ...]:\n- infoPanelId: String - name of the info panel class as defined in vehicle config - infopanelShortcutId: String - shortcut representation of infopanelId, currently are supported only shortcuts \"left\" and \"right\"","text":"Array - format [[infoPanelId1, infoPanelShortcutId1], [infoPanelId2, infoPanelShortcutId2], ...]:\n\n- infoPanelId: String - name of the info panel class as defined in vehicle config\n- infopanelShortcutId: String - shortcut representation of *infopanelId*, currently are supported only shortcuts \"left\" and \"right\""},"form":"unary","right":{"text":"[unit, turretPath]"}}],"examples":[{"code":["infoPanels [vehicle player, [0]];"]}],"see_also":["Arma 3: Custom Info","infoPanel","setInfoPanel","infoPanelComponents","enableInfoPanelComponent","infoPanelComponentEnabled","openGPS"]},{"name":"inGameUISetEventHandler","title":"inGameUISetEventHandler","type":"command","url":"https://community.bistudio.com/wiki/inGameUISetEventHandler","revid":378923,"updated":"2026-08-14T20:25:31Z","groups":["GUI Control - Event Handlers","Event Handlers","Interaction"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets given event handler of in-game UI. If EH function returns true, performed action is overridden. Event handlers available are:\n\n- \"PrevAction\" - mouse scroll up\n- \"Action\" - action key press\n- \"NextAction\" - mouse scroll down\n\nIn order to remove a previously added event handler, set it again with an empty *code* string `\"\"`.\n\n> [!NOTE]\n> **Since Arma 3 v2.22 consider using hideActions**\n\n> [!IMPORTANT]\n> This is a \"set\" command, which means event handlers are not stackable and will replace previously set event handlers of the same type.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.50 the event handler receives an array of the selected/activated action's arguments in `_this` variable:\n>\n> ```sqf\n> params [\"_target\", \"_caller\", \"_index\", \"_engineName\", \"_text\", \"_priority\", \"_showWindow\", \"_hideOnUse\", \"_shortcut\", \"_visibleMenu\", \"_eventName\"];\n> ```\n>\n> - _target: Object - target object to which action is attached\n> - _caller: Object - caller object, basically player\n> - _index: Number - index of the action in action menu (0 - top most)\n> - _engineName: String - engine based action name (\"User\" for user added actions)\n> - _text: String - localized action plain text as seen by the caller\n> - _priority: Number - action *priority* value\n> - _showWindow: Boolean - action *showWindow* value\n> - _hideOnUse: Boolean - action *hideOnUse* value\n> - _shortcut: String - action *shortcut* name or \"\"\n> - _visibleMenu: Boolean - action menu visibility - on first scroll or action press the menu is still invisible, the menu is shown but no action is performed\n> - _eventName: String - event name","syntaxes":[{"syntax":"inGameUISetEventHandler [handlerName, code]","params":[{"name":"handlerName","type":"String","type_expr":"String"},{"name":"code","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[handlerName, code]"}}],"examples":[{"code":["inGameUISetEventHandler [\"Action\", \"hint 'Lights, Camera, Action!'; true\"];\nsleep 10;\ninGameUISetEventHandler [\"Action\", \"\"]; // removes the \"Action\" EH"]},{"code":["inGameUISetEventHandler [\"PrevAction\", \"hint str _this; false\"];\ninGameUISetEventHandler [\"NextAction\", \"hint str _this; false\"];\ninGameUISetEventHandler [\"Action\", \"hint str _this; false\"];"]},{"text":"Deny any weapon disassembly:\n\n```sqf\ninGameUISetEventHandler [\"Action\", \"\n    if (_this select 3 == 'DisAssemble') then {\n        hint 'You are not allowed to do this';\n        true\n    }\n\"];\n```","code":["inGameUISetEventHandler [\"Action\", \"\n\tif (_this select 3 == 'DisAssemble') then {\n\t\thint 'You are not allowed to do this';\n\t\ttrue\n\t}\n\"];"]},{"text":"Detect explosive/mine placement:\n\n```sqf\nprivate _onMagazineUse = '\n    params [\"_target\", \"\", \"\", \"_action\", \"\", \"\", \"\", \"\", \"\", \"\", \"_event\"];\n    if (_action == \"UseMagazine\") then {\n        if (_event == \"Action\") then {\n            _target spawn {\n                waitUntil {!(all_magazines isEqualTo magazines _this)};\n                {\n                    0 = all_magazines deleteAt (all_magazines find _x);\n                } count magazines _this;\n                hint format [\"Magazine Used: %1\", all_magazines select 0];\n            };\n        } else {\n            all_magazines = magazines _target;\n        };\n    };\n    false\n';\ninGameUISetEventHandler [\"PrevAction\", _onMagazineUse];\ninGameUISetEventHandler [\"NextAction\", _onMagazineUse];\ninGameUISetEventHandler [\"Action\", _onMagazineUse];\n```","code":["private _onMagazineUse = '\n\tparams [\"_target\", \"\", \"\", \"_action\", \"\", \"\", \"\", \"\", \"\", \"\", \"_event\"];\n\tif (_action == \"UseMagazine\") then {\n\t\tif (_event == \"Action\") then {\n\t\t\t_target spawn {\n\t\t\t\twaitUntil {!(all_magazines isEqualTo magazines _this)};\n\t\t\t\t{\n\t\t\t\t\t0 = all_magazines deleteAt (all_magazines find _x);\n\t\t\t\t} count magazines _this;\n\t\t\t\thint format [\"Magazine Used: %1\", all_magazines select 0];\n\t\t\t};\n\t\t} else {\n\t\t\tall_magazines = magazines _target;\n\t\t};\n\t};\n\tfalse\n';\ninGameUISetEventHandler [\"PrevAction\", _onMagazineUse];\ninGameUISetEventHandler [\"NextAction\", _onMagazineUse];\ninGameUISetEventHandler [\"Action\", _onMagazineUse];"]}],"see_also":["isActionMenuVisible","addEventHandler","ctrlAddEventHandler","displayAddEventHandler","actionIDs","actionParams","addAction","setUserActionText","showHUD","inputAction","removeAction","removeAllActions","action","enableWeaponDisassembly"],"notes":[{"user":"AgentRev","date":"2016-05-12T20:51:00Z","text":"In case of the \"Action\" event, (*_showWindow* || *_visibleMenu*) also denotes if the action is performed or not. For example, if the action menu is closed or fading off, pressing Spacebar will bring it up and trigger an \"Action\" event; in that case, *_visibleMenu* is false. But if the action menu is open, and Spacebar is pressed to perform the selected action, then *_visibleMenu* will be true. If *_showWindow* is true, then it means the action was performed, regardless of *_visibleMenu*."}]},{"name":"inheritsFrom","title":"inheritsFrom","type":"command","url":"https://community.bistudio.com/wiki/inheritsFrom","revid":349770,"updated":"2023-11-20T22:10:08Z","groups":["Config"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns base entry of config entry.","syntaxes":[{"syntax":"inheritsFrom config","params":[{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Config","type_expr":"Config"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["_base = inheritsFrom (configFile >> \"CfgVehicles\" >> \"Car\"); // returns \"LandVehicle\" Config entry"]},{"text":"Print parent tree of given config class:\n\n```sqf\nfnc_printParents =\n{\n    disableSerialization;\n    if (!isClass _this) exitWith { hint \"Argument is not a config Class\" };\n\n    private _parents = [];\n\n    while { !isNull _this } do\n    {\n        _parents pushBack configName _this;\n        _this = inheritsFrom _this;\n    };\n\n    reverse _parents;\n\n    private _tv = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscTree\", -1];\n    _tv ctrlSetPosition [0,0,1,1];\n    _tv ctrlSetBackgroundColor [0,0,0,0.5];\n    _tv ctrlCommit 0;\n\n    private _path = [];\n    {\n        _tv tvAdd [_path, _x];\n        _path pushBack 0;\n    }\n    forEach _parents;\n\n    tvExpandAll _tv;\n};\n\n// Example:\n(configFile >> \"CfgVehicles\" >> typeOf player) call fnc_printParents;\n```","code":["fnc_printParents =\n{\n\tdisableSerialization;\n\tif (!isClass _this) exitWith { hint \"Argument is not a config Class\" };\n\n\tprivate _parents = [];\n\n\twhile { !isNull _this } do\n\t{\n\t\t_parents pushBack configName _this;\n\t\t_this = inheritsFrom _this;\n\t};\n\n\treverse _parents;\n\n\tprivate _tv = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscTree\", -1];\n\t_tv ctrlSetPosition [0,0,1,1];\n\t_tv ctrlSetBackgroundColor [0,0,0,0.5];\n\t_tv ctrlCommit 0;\n\n\tprivate _path = [];\n\t{\n\t\t_tv tvAdd [_path, _x];\n\t\t_path pushBack 0;\n\t}\n\tforEach _parents;\n\n\ttvExpandAll _tv;\n};\n\n// Example:\n(configFile >> \"CfgVehicles\" >> typeOf player) call fnc_printParents;"]}],"see_also":["configFile","a / b","configName","count","getArray","getText","getNumber","isArray","isClass","isNumber","isText","select","configHierarchy","isKindOf"],"notes":[{"user":"ffur2007slx2_5","date":"2014-04-02T17:11:00Z","text":"(A3 1.14) Use BIS_fnc_returnParents if a parents' collection of the given entry is needed.\n\n```sqf\n[configFile >> \"CfgVehicles\" >> \"Land_Atm_02_F\", true] call BIS_fnc_returnParents;\n// return: [\"Land_Atm_02_F\", \"House_Small_F\", \"House_F\", \"House\", \"HouseBase\", \"NonStrategic\", \"Building\", \"Static\", \"All\"]\n```\n\nNot all entries have parent, and please differ parents from path.\n\n```sqf\ninheritsFrom (configFile >> \"CfgUIColors\" >> \"IGUI\" >> \"Presets\" >> \"PresetA1\" >> \"Variables\");\n// return: Nothing\n```"}]},{"name":"initAmbientLife","title":"initAmbientLife","type":"command","url":"https://community.bistudio.com/wiki/initAmbientLife","revid":319259,"updated":"2022-05-13T09:23:27Z","groups":["Environment"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Initialises the ambient life on local client from `CfgWorlds >> worldName >> AmbientA3`. Has no effect on dedicated server or headless client.","syntaxes":[{"syntax":"initAmbientLife","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["initAmbientLife;"]}],"see_also":["enableEnvironment","sideAmbientLife"]},{"name":"inPolygon","title":"inPolygon","type":"command","url":"https://community.bistudio.com/wiki/inPolygon","revid":379530,"updated":"2026-10-31T00:51:06Z","groups":["Positions"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","description":"Checks whether position is inside given polygon. The polygon is only checked in 2 dimensions, i.e. the value of Z is ignored.","syntaxes":[{"syntax":"position inPolygon polygon","params":[{"name":"position","type":"Position3D or Arma 3 v2.14 Object","type_expr":"Position3D | Object"},{"name":"polygon","type":"Array of Position3D","description":"positions in format: [position1, position2...., positionN]","type_expr":"Array<Position3D>"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"position"},"right":{"text":"polygon"}}],"examples":[{"code":["private _isInside = [100, 100, 0] inPolygon [[0, 0, 0], [1000, 1000, 0], [1000, 0, 0]];"]},{"text":"```sqf\nprivate _markerName = \"_USER_DEFINED #0/0/1\";\n\nprivate _xy2DPositions = markerPolyline _markerName;\nprivate _positions = [];\n\n// let's convert these x,y coordinates to \"normal\" position arrays\nfor \"_i\" from 0 to count _xy2DPositions - 1 step 2 do\n{\n    _positions pushBack [_xy2DPositions select _i, _xy2DPositions select (_i + 1), 0];\n};\n\nplayer inPolygon _positions; // true if in the drawn shape, false if not\n```","code":["private _markerName = \"_USER_DEFINED #0/0/1\";\n\nprivate _xy2DPositions = markerPolyline _markerName;\nprivate _positions = [];\n\n// let's convert these x,y coordinates to \"normal\" position arrays\nfor \"_i\" from 0 to count _xy2DPositions - 1 step 2 do\n{\n\t_positions pushBack [_xy2DPositions select _i, _xy2DPositions select (_i + 1), 0];\n};\n\nplayer inPolygon _positions; // true if in the drawn shape, false if not"]}],"see_also":["in","inArea","inAreaArray","drawPolygon"]},{"name":"inputAction","title":"inputAction","type":"command","url":"https://community.bistudio.com/wiki/inputAction","revid":379355,"updated":"2026-10-30T23:55:30Z","groups":["Interaction"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return the state of input devices mapped to given input action.\n\nFor Arma 3 inputActions and its bindings see: inputAction/actions.\n\nFor earlier Arma editions see Category:Key Actions.","syntaxes":[{"syntax":"inputAction name","params":[{"name":"name","type":"String","description":"name of the action","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"name"}}],"examples":[{"text":"```sqf\ninputAction \"leanLeft\";\n```\n\nReturns 1 if the button mapped to \"leanLeft\" is pressed currently else 0.","code":["inputAction \"leanLeft\";"]},{"text":"```sqf\n0 spawn {\n    waitUntil {inputAction \"reloadMagazine\" > 0};\n    hint \"Reload Key Pressed\";\n};\n```","code":["0 spawn {\n\twaitUntil {inputAction \"reloadMagazine\" > 0};\n\thint \"Reload Key Pressed\";\n};"]}],"see_also":["inputMouse","inputController","actionKeys","actionKeysImages","actionKeysNames","actionIDs","actionParams","addAction","setUserActionText","inGameUISetEventHandler","showHUD","removeAction","removeAllActions","action"],"notes":[{"user":"Worldeater","date":"2010-10-15T05:38:00Z","text":"This command also returns values other than 0 and 1 (like 0.02 or 1.3). Any value greater than zero usually signals that the key or button is pressed. inputAction does not work reliably when used in RscDisplayMission's onKeyDown event handler (the same is probably true for other input related event handlers)."},{"user":"FlannelMouth","date":"2014-05-08T15:18:00Z","text":"inputAction does not return the actual state of the queried key when a dialog screen is open. Instead, it will always return 0."},{"user":"Waffle SS.","date":"2015-07-31T05:33:00Z","text":"**inputAction** is capable of returning the state of analog inputs. This includes mouse, joystick, and even TrackIR. A joystick axis will return a value from 0 to 1, while mouse movement returns the rate of change, which can be > 1.\n\nRight mouse click is currently not supported, but right mouse hold is: https://feedback.bistudio.com/T83382"}]},{"name":"inputController","title":"inputController","type":"command","url":"https://community.bistudio.com/wiki/inputController","revid":338923,"updated":"2023-04-17T15:23:03Z","groups":["Interaction"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","description":"Returns the state of controller inputs. The controller is a standard XBOX controller which is selected with Windows XBOX controller scheme. The input can be:\n\n- XBOX_A 0\n- XBOX_B 1\n- XBOX_X 2\n- XBOX_Y 3\n- XBOX_Up 4\n- XBOX_Down 5\n- XBOX_Left 6\n- XBOX_Right 7\n- XBOX_Start 8\n- XBOX_Back 9\n- XBOX_LeftBumper 10\n- XBOX_RightBumper 11\n- XBOX_LeftTrigger 12\n- XBOX_RightTrigger 13\n- XBOX_LeftThumb 14\n- XBOX_RightThumb 15\n- XBOX_LeftThumbXRight 16\n- XBOX_LeftThumbYUp 17\n- XBOX_RightThumbXRight 18\n- XBOX_RightThumbYUp 19\n- XBOX_LeftThumbXLeft 20\n- XBOX_LeftThumbYDown 21\n- XBOX_RightThumbXLeft 22\n- XBOX_RightThumbYDown 23","syntaxes":[{"syntax":"inputController input","params":[{"name":"input","type":"Number","description":"controller input 0...31 (see description) or -1 for controller detection.","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"value of the controller input 0...1. When input is -1, return is 1 if controller is available, 0 - if controller is unavailable"},"form":"unary","right":{"text":"input"}}],"examples":[{"text":"State of the fire trigger:\n\n```sqf\nonEachFrame { hintSilent str inputController 13 };\n```","code":["onEachFrame { hintSilent str inputController 13 };"]}],"see_also":["inputMouse","inputAction","actionKeys","actionKeysImages","actionKeysNames","actionIDs","actionParams","addAction","setUserActionText","inGameUISetEventHandler","showHUD","removeAction","removeAllActions","action"]},{"name":"inputMouse","title":"inputMouse","type":"command","url":"https://community.bistudio.com/wiki/inputMouse","revid":309128,"updated":"2022-05-03T11:40:11Z","groups":["Interaction"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","description":"Returns the state of mouse button action, alone or in combination with key presses. For more information on codes and combos see Arma_3:_Modded_Keybinding and DIK_KeyCodes but here are some examples of how codes could be hand constructed:\n\n- KEYBOARD_COMBO 16777216 (0x1000000)\n- DEVICE_MOUSE 65536 (0x10000)\n- HOLD_OFFSET 0\n- CLICK_OFFSET 128 (0x80)\n- DOUBLE_CLICK_OFFSET 256 (0x100)\n- SPECIAL_COMBINATIONS 1114112 (0x110000)\n\n```\nClick + Hold: BUTTON + DEVICE_MOUSE + HOLD_OFFSET = BUTTON + 65536 + 0\nClick: BUTTON + DEVICE_MOUSE + CLICK_OFFSET = BUTTON + 65536 + 128\nDouble Click: BUTTON + DEVICE_MOUSE + DOUBLE_CLICK_OFFSET = BUTTON + 65536 + 256\n\nRMB Click + Hold:  1 + 65536 + 0 = 65537\nRMB Click: 1 + 65536 + 128 = 65665\nRMB Double Click: 1 + 65536 + 256 = 65793\n\nCombo + Click + Hold: DIK * KEYBOARD_COMBO + SPECIAL_COMBINATIONS + BUTTON + HOLD_OFFSET = DIK * 16777216 + 1114112 + BUTTON + 0\nCombo + Click: DIK * KEYBOARD_COMBO + SPECIAL_COMBINATIONS + BUTTON + CLICK_OFFSET = DIK * 16777216 + 1114112 + BUTTON + 128\nCombo + Double Click: DIK * KEYBOARD_COMBO + SPECIAL_COMBINATIONS + BUTTON + DOUBLE_CLICK_OFFSET = DIK * 16777216 + 1114112 + BUTTON + 256\n\nLShift + RMB Click + Hold: 42 * 16777216 + 1114112 + 1 + 0 = 705757185\nLShift + RMB Click: 42 * 16777216 + 1114112 + 1 + 128 = 705757313\nLShift + RMB Double Click: 42 * 16777216 + 1114112 + 1 + 256 = 705757441\n```","syntaxes":[{"syntax":"inputMouse button","params":[{"name":"button","type":"Number","description":"button number 0..7: 0-LMB, 1-RMB, 2-MMB","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"the state of the button:\n- 0 - released - 1 - click - 2 - click + hold - 3 - double click - 4 - double click + hold","text":"Number - the state of the button:\n\n- 0 - released\n- 1 - click\n- 2 - click + hold\n- 3 - double click\n- 4 - double click + hold"},"form":"unary","right":{"text":"button"}},{"syntax":"inputMouse combocode","params":[{"name":"combocode","type":"String","description":"code or combination (see actionKeys)","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if given code/combination detected, false otherwise"},"form":"unary","right":{"text":"combocode"}}],"examples":[{"text":"State of the RMB:\n\n```sqf\nonEachFrame { hintSilent str inputMouse 1 };\n```","code":["onEachFrame { hintSilent str inputMouse 1 };"]},{"text":"Detect LCtrl + 2xRMB:\n\n```sqf\nonEachFrame { hintSilent str inputMouse \"487653633\" };\n```","code":["onEachFrame { hintSilent str inputMouse \"487653633\" };"]}],"see_also":["inputController","inputAction","actionKeys","actionKeysImages","actionKeysNames","actionIDs","actionParams","addAction","setUserActionText","inGameUISetEventHandler","showHUD","removeAction","removeAllActions","action"]},{"name":"inRangeOfArtillery","title":"inRangeOfArtillery","type":"command","url":"https://community.bistudio.com/wiki/inRangeOfArtillery","revid":347548,"updated":"2023-09-28T09:25:36Z","groups":["Artillery"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns true if all given units are able to fire at given position with given magazineType.","syntaxes":[{"syntax":"pos inRangeOfArtillery [units, magazineType]","params":[{"name":"pos","type":"Position","type_expr":"Position"},{"name":"units","type":"Array of Objects","description":"array of units.","type_expr":"Array<Object>"},{"name":"magazineType","type":"String","description":"**case-sensitive**","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"pos"},"right":{"text":"[units, magazineType]"}}],"examples":[{"code":["_isInRange = getMarkerPos \"myTarget\" inRangeOfArtillery [[myArty], \"32Rnd_155mm_Mo_shells\"];"]}],"see_also":["getArtilleryAmmo","commandArtilleryFire","doArtilleryFire","enableEngineArtillery","getArtilleryComputerSettings","shownArtilleryComputer","getArtilleryETA"],"notes":[{"user":"Waffle SS.","date":"2015-07-10T19:46:00Z","text":"Using an empty artillery vehicle will return false."}]},{"name":"insert","title":"insert","type":"command","url":"https://community.bistudio.com/wiki/insert","revid":377154,"updated":"2026-01-01T10:37:44Z","groups":["HashMap","Arrays","Strings"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Inserts multiple values into Array/String/HashMap.\nThe String variant also supports forceUnicode. In the event of a HashMap, values, if they already exist, are replaced.","syntaxes":[{"syntax":"array insert [index, valuesToInsert, onlyIfUnique]","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>","text":"array : Array of Anything"},{"name":"index","type":"Number","description":"index at which the values will be inserted, -1 for append, Arma 3 v2.14 -2 for inserting at the second-to-last position, -3 before that, etc.","type_expr":"Number"},{"name":"valuesToInsert","type":"Array of Anything","description":"values to insert at the specified index","type_expr":"Array<Anything>"},{"name":"onlyIfUnique","type":"Boolean","optional":true,"default":"false","description":"only insert if the value is unique in the array, like pushBackUnique","type_expr":"Boolean","text":"onlyIfUnique: Boolean - (Optional, default false) only insert if the value is unique in the array, like pushBackUnique"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"array"},"right":{"text":"[index, valuesToInsert, onlyIfUnique]"}},{"syntax":"string insert [index, substring]","params":[{"name":"string","type":"String","type_expr":"String","text":"string : String"},{"name":"index","type":"Number","description":"index at which the values will be inserted, -1 for append","type_expr":"Number"},{"name":"substring","type":"String","description":"string to insert","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"the new string"},"form":"binary","left":{"text":"string"},"right":{"text":"[index, substring]"}},{"syntax":"hashMap insert [[key1, value1], [key2, value2], ...]","since":"arma3 2.04","params":[{"name":"hashMap","type":"HashMap","type_expr":"HashMap"},{"name":"keyN","type":"HashMapKey","type_expr":"HashMapKey"},{"name":"valueN","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"hashMap"},"right":{"text":"[[key1, value1], [key2, value2], ...]"}},{"syntax":"hashMap insert [splitArray, [keysAndValues]]","since":"arma3 2.04","params":[{"name":"hashMap","type":"HashMap","type_expr":"HashMap"},{"name":"splitArray","type":"Boolean","description":"determines *keysAndValues* format (see *keysAndValues*'s description)","type_expr":"Boolean"},{"name":"keysAndValues","type":"Array","description":"in format depending on *splitArray*'s value:\n\n- true - `[[key1, key2, ...], [value1, value2, ...]]`\n- false - `[[key1, value1], [key2, value2], ...]` (same as Syntax 3, see Example 3 for the correct format)","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"hashMap"},"right":{"text":"[splitArray, [keysAndValues]]"}}],"examples":[{"text":"```sqf\n\"Test\" insert [0, \"Radio\"];        // returns \"RadioTest\"\n\"Test\" insert [2, \"Radio\"];        // returns \"TeRadiost\"\n\"Test\" insert [-1, \"Radio\"];    // returns \"TestRadio\"\n```","code":["\"Test\" insert [0, \"Radio\"];\t\t// returns \"RadioTest\"\n\"Test\" insert [2, \"Radio\"];\t\t// returns \"TeRadiost\"\n\"Test\" insert [-1, \"Radio\"];\t// returns \"TestRadio\""]},{"code":["private _array = [\"a\", \"b\", \"c\"];\n_array insert [0, [\"w\"]]; // _array is now [\"w\", \"a\", \"b\", \"c\"]\n\nprivate _array = [\"a\", \"b\", \"c\"];\n_array insert [-1, [\"w\"]]; // _array is now [\"a\", \"b\", \"c\", \"w\"]\n\nprivate _array = [\"a\", \"b\", \"c\"];\n_array insert [-2, [\"w\"]]; // _array is now [\"a\", \"b\", \"w\", \"c\"] // Arma 3 v2.14"]},{"code":["// Notice how the size of the right array changes depending on the format of keysAndValues format\nprivate _map = createHashMap;\n_map insert [false, [\"one\", 1]];\n\nprivate _map = createHashMap;\n_map insert [true, [\"one\"], [1]];"]}],"see_also":["HashMap","pushBack","pushBackUnique","append","+","merge"]},{"name":"insertEditorObject","title":"insertEditorObject","type":"command","url":"https://community.bistudio.com/wiki/insertEditorObject","revid":379356,"updated":"2026-10-30T23:55:38Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Insert an object to the editor and assign arguments. Create script is,not called. Returns the ID of the new EditorObject. Subtype class is,optional.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map insertEditorObject [type,value,[name1,value1,...],subtype class]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"[type,value,[name1,value1,...],subtype class]","type":"Array","type_expr":"Array"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"map"},"right":{"text":"[type,value,[name1,value1,...],subtype class]"}}],"examples":[{"text":"-"}],"notes":[{"user":"Benargee","date":"2015-05-07T13:56:00Z","text":"\"This works only in the old 3D editor\"\n- KM"}]},{"name":"insideBuilding","title":"insideBuilding","type":"command","url":"https://community.bistudio.com/wiki/insideBuilding","revid":338343,"updated":"2023-02-28T14:42:06Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Returns how much a man is inside a building. The value is the same as normally returned by weapons/ammo sound controller \"interior\".\nIt is possible to modify an individual object to use sound interior with enableAudioFeature.\n\n> [!NOTE]\n> The sound is considered internal when the corresponding surface sound name starts with \"int_\".\n> An object placed inside a building that does not have model `CfgSurfaces`' soundEviron [sic] parameter named this way would generate external sound inside the building, and insideBuilding on top of this object would return 0.","syntaxes":[{"syntax":"insideBuilding man","params":[{"name":"man","type":"Object","description":"entity of class Man","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"in range 0..1, where 0 is outside, 1 is inside"},"form":"unary","right":{"text":"man"}}],"examples":[{"code":["private _isFullyInside = insideBuilding player == 1;"]}],"see_also":["buildingPos","buildingExit","enableAudioFeature","BIS_fnc_buildingPositions"]},{"name":"intersect","title":"intersect","type":"command","url":"https://community.bistudio.com/wiki/intersect","revid":377413,"updated":"2026-01-02T06:45:16Z","groups":["Math - Geometry"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Finds named selections in object which are in specified LOD, intersected by given section of a line. Return value is in the form of [selection, distance]. Multiple returned arrays are nested within a single array. No intersection returns []. *lodName* could be one of the following:\n\n- \"FIRE\"\n- \"VIEW\"\n- \"GEOM\"\n- \"IFIRE\" - (\"I\" stands for Indirect, almost the same as FIRE)\n- Arma 3 v2.02 \"PHYSX\" - PhysX geometry LOD","syntaxes":[{"syntax":"[object, lodName] intersect [begPos, endPos]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"lodName","type":"String","type_expr":"String"},{"name":"begPos","type":"PositionAGL","type_expr":"PositionAGL"},{"name":"endPos","type":"PositionAGL","type_expr":"PositionAGL"}],"returns":{"type":"Array","type_expr":"Array","description":"with [selection, distance]\n- selection: String - name of intersected selection - distance: Number - distance from begPos The results are also sorted, closest selection first","text":"Array with [selection, distance]\n\n- selection: String - name of intersected selection\n- distance: Number - distance from begPos\n\nThe results are also sorted, closest selection first"},"form":"binary","left":{"text":"[object, lodName]"},"right":{"text":"[begPos, endPos]"}}],"examples":[{"code":["[_tank, \"VIEW\"] intersect [[1500, 1500, 2], [1550, 1500, 2]];"]},{"text":"```sqf\nsphere = \"Sign_Sphere10cm_F\" createVehicle [0,0,0];\nonEachFrame {\n    _begPos = positionCameraToWorld [0,0,0];\n    _begPosASL = AGLToASL _begPos;\n    _endPos = positionCameraToWorld [0,0,1000];\n    _endPosASL = AGLToASL _endPos;\n    _ins = lineIntersectsSurfaces [_begPosASL, _endPosASL, player, objNull, true, 1, \"FIRE\", \"NONE\"];\n    if (_ins isEqualTo []) exitWith {sphere setPosASL [0,0,0]};\n    _ins select 0 params [\"_pos\", \"_norm\", \"_obj\", \"_parent\"];\n    if !(getModelInfo _parent select 2) exitWith {sphere setPosASL [0,0,0]};\n    _ins2 = [_parent, \"FIRE\"] intersect [_begPos, _endPos];\n    if (_ins2 isEqualTo []) exitWith {sphere setPosASL [0,0,0]};\n    _ins2 select 0 params [\"_name\", \"_dist\"];\n    _posASL = _begPosASL vectorAdd ((_begPosASL vectorFromTo _endPosASL) vectorMultiply _dist);\n    drawIcon3D [\"\", [1,1,1,1], ASLToAGL _posASL, 0, 0, 0, _name, 1, 0.03, \"PuristaMedium\"];\n    sphere setPosASL _posASL;\n};\n```","code":["sphere = \"Sign_Sphere10cm_F\" createVehicle [0,0,0];\nonEachFrame {\n\t_begPos = positionCameraToWorld [0,0,0];\n\t_begPosASL = AGLToASL _begPos;\n\t_endPos = positionCameraToWorld [0,0,1000];\n\t_endPosASL = AGLToASL _endPos;\n\t_ins = lineIntersectsSurfaces [_begPosASL, _endPosASL, player, objNull, true, 1, \"FIRE\", \"NONE\"];\n\tif (_ins isEqualTo []) exitWith {sphere setPosASL [0,0,0]};\n\t_ins select 0 params [\"_pos\", \"_norm\", \"_obj\", \"_parent\"];\n\tif !(getModelInfo _parent select 2) exitWith {sphere setPosASL [0,0,0]};\n\t_ins2 = [_parent, \"FIRE\"] intersect [_begPos, _endPos];\n\tif (_ins2 isEqualTo []) exitWith {sphere setPosASL [0,0,0]};\n\t_ins2 select 0 params [\"_name\", \"_dist\"];\n\t_posASL = _begPosASL vectorAdd ((_begPosASL vectorFromTo _endPosASL) vectorMultiply _dist);\n\tdrawIcon3D [\"\", [1,1,1,1], ASLToAGL _posASL, 0, 0, 0, _name, 1, 0.03, \"PuristaMedium\"];\n\tsphere setPosASL _posASL;\n};"]}],"see_also":["lineIntersectsSurfaces","terrainIntersect","terrainIntersectASL","terrainIntersectAtASL","lineIntersects","lineIntersectsWith","lineIntersectsObjs","cursorObject","cursorTarget","checkVisibility"],"notes":[{"user":"ManDay","date":"2007-07-25T08:37:00Z","text":"The most common LOD is \"*FIRE*\", which identifies the most detailled hitbox used for ammunition."},{"user":"ffur2007slx2_5","date":"2014-03-27T14:52:00Z","text":"Example (In Arma 3 ver 1.14) display returned arrays on cursor entities:\n\n```sqf\nSto = [];\nFn = {\n    {\n        Sto set [_foreachindex,[cursorTarget, _x] intersect [ASLToAGL eyePos player, screenToWorld [0.5,0.5]]];\n    } foreach [\"FIRE\", \"VIEW\", \"GEOM\", \"IFIRE\"];\n    hintSilent format [\"FIRE: %1, VIEW: %2, GEOM: %3, IFIRE: %4\", Sto select 0, Sto select 1, Sto select 2, Sto select 3];\n};\n[\"sample_id\", \"onEachFrame\", \"Fn\"] call BIS_fnc_addStackedEventHandler;\n```\n\nReturn FIRE: [something], VIEW: [something], GEOM: [something], IFIRE: [something]."},{"user":"Killzone_Kid","date":"2015-08-20T18:34:00Z","text":"intersect will spam .rpt if passed to it object has no skeleton. Use getModelInfo to filter out those objects."}]},{"name":"is3DEN","title":"is3DEN","type":"command","url":"https://community.bistudio.com/wiki/is3DEN","revid":376878,"updated":"2025-12-15T11:17:30Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns true if the Eden Editor is currently being used.","syntaxes":[{"syntax":"is3DEN","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when inside editor environment, false when outside of editor environment"},"form":"nullary"}],"examples":[{"code":["if is3DEN then { systemChat \"Welcome to Eden Editor!\" };"]}],"see_also":["is3DENMultiplayer","is3DENPreview"]},{"name":"is3DENMultiplayer","title":"is3DENMultiplayer","type":"command","url":"https://community.bistudio.com/wiki/is3DENMultiplayer","revid":349042,"updated":"2023-11-08T14:47:14Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns true if the Eden Editor is in multiplayer mode.","syntaxes":[{"syntax":"is3DENMultiplayer","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true in the following cases:\n- Multiplayer preview launched directly from Eden Editor - true in preview and only for the creator - MP mission is chosen for editing when creating a server: `Multiplayer - Server Browser - Host Server`. When 3D EDITOR button is clicked for selected mission and Eden Editor is launched, command returns true within the editor environment","text":"Boolean - returns true in the following cases:\n\n- Multiplayer preview launched directly from Eden Editor - true in preview and only for the creator\n- MP mission is chosen for editing when creating a server: `Multiplayer - Server Browser - Host Server`. When *3D EDITOR* button is clicked for selected mission and Eden Editor is launched, command returns true within the editor environment"},"form":"nullary"}],"examples":[{"code":["if is3DENMultiplayer then {systemChat \"You are hosting a test server!\"};"]}],"see_also":["is3DEN","is3DENPreview"]},{"name":"is3DENPreview","title":"is3DENPreview","type":"command","url":"https://community.bistudio.com/wiki/is3DENPreview","revid":342107,"updated":"2023-07-09T12:26:36Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns true if the Eden Editor is currently in mission preview mode, single player or multiplayer. (see also is3DEN, is3DENMultiplayer)","syntaxes":[{"syntax":"is3DENPreview","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if is3DENPreview then { systemChat \"Welcome to Eden Editor Preview!\" };"]}],"see_also":["get3DENMouseOver","add3DENConnection","add3DENEventHandler","all3DENEntities","collect3DENHistory","create3DENComposition","create3DENEntity","current3DENOperation","delete3DENEntities","do3DENAction","get3DENActionState","get3DENAttribute","get3DENCamera","get3DENConnections","get3DENEntityID","get3DENGrid","get3DENIconsVisible","get3DENLinesVisible","get3DENSelected","is3DENMultiplayer","is3DEN","move3DENCamera","remove3DENConnection","remove3DENEventHandler","removeAll3DENEventHandlers","set3DENAttributes","set3DENGrid","set3DENIconsVisible","set3DENLinesVisible","set3DENObjectType"]},{"name":"isAbleToBreathe","title":"isAbleToBreathe","type":"command","url":"https://community.bistudio.com/wiki/isAbleToBreathe","revid":378057,"updated":"2026-02-02T20:53:32Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"If unit is diving and doesn't have a rebreather, it returns false.\nDiving means the unit's head is underwater. If unit is underwater and has a rebreather, the command returns true.","syntaxes":[{"syntax":"isAbleToBreathe unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_canBreath = isAbleToBreathe player;"]}],"see_also":["underwater"],"notes":[{"user":"Vabene1111","date":"2019-05-06T19:43:00Z","text":"Might return false if player enters a vehicle while underwater."}]},{"name":"isActionMenuVisible","title":"isActionMenuVisible","type":"command","url":"https://community.bistudio.com/wiki/isActionMenuVisible","revid":378567,"updated":"2026-05-08T21:15:48Z","groups":["Interaction"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","description":"Returns true if scroll menu is visible.","syntaxes":[{"syntax":"isActionMenuVisible","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (isActionMenuVisible) then { hint \"Scroll menu is opened\" };"]}],"see_also":["inGameUISetEventHandler","commandingMenu","showCommandingMenu","shownAction","BIS_fnc_addCommMenuItem","BIS_fnc_removeCommMenuItem"],"notes":[{"user":"POLPOX","date":"2021-09-12T03:59:06Z","text":"To force close Action Menu, use showCommandingMenu.\n\n```sqf\nshowCommandingMenu \"RscGroupRootMenu\";\nshowCommandingMenu \"\";\n```"}]},{"name":"isAgent","title":"isAgent","type":"command","url":"https://community.bistudio.com/wiki/isAgent","revid":319121,"updated":"2022-05-13T09:23:13Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Check if team member is an agent.","syntaxes":[{"syntax":"isAgent teamMember","params":[{"name":"teamMember","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"teamMember"}}],"examples":[{"code":["isAgent teamMember _unit;"]}],"see_also":["agent","agents","createAgent","forEachMemberAgent"]},{"name":"isAimPrecisionEnabled","title":"isAimPrecisionEnabled","type":"command","url":"https://community.bistudio.com/wiki/isAimPrecisionEnabled","revid":349310,"updated":"2023-11-08T14:52:24Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","description":"Returns true if procedural aiming precision affects weapon sway.","syntaxes":[{"syntax":"isAimPrecisionEnabled unit","params":[{"name":"unit","type":"Object","description":"unit which should be checked","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if affected, false if not"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_isAffected = isAimPrecisionEnabled player;"]}],"see_also":["getAnimAimPrecision","Arma 3: Stamina"]},{"name":"isAISteeringComponentEnabled","title":"isAISteeringComponentEnabled","type":"command","url":"https://community.bistudio.com/wiki/isAISteeringComponentEnabled","revid":369774,"updated":"2024-10-08T15:08:59Z","groups":["AI Behaviour"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"local"},"description":"Returns whether the AI steering component feature is enabled for the specified vehicle.","syntaxes":[{"syntax":"isAISteeringComponentEnabled vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if AI steering component is supported by the vehicle (i.e. defined in config) and enabled, false otherwise"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["isAISteeringComponentEnabled myTank;"]}],"see_also":["useAISteeringComponent","isUsingAISteeringComponent"]},{"name":"isAllowedCrewInImmobile","title":"isAllowedCrewInImmobile","type":"command","url":"https://community.bistudio.com/wiki/isAllowedCrewInImmobile","revid":309127,"updated":"2022-05-03T11:11:34Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"argument":"global"},"description":"Whether or not units can be in a vehicle with broken tracks/wheels.","syntaxes":[{"syntax":"isAllowedCrewInImmobile vehicle","params":[{"name":"vehicle","type":"Object","description":"transport","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true - allowed, false - not allowed"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"text":"```sqf\nif !(isAllowedCrewInImmobile _tank) then\n{\n    _tank allowCrewInImmobile true;\n};\n```","code":["if !(isAllowedCrewInImmobile _tank) then\n{\n\t_tank allowCrewInImmobile true;\n};"]}],"see_also":["allowCrewInImmobile"]},{"name":"isArray","title":"isArray","type":"command","url":"https://community.bistudio.com/wiki/isArray","revid":322300,"updated":"2022-05-30T13:22:37Z","groups":["Config","Arrays"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Check if config entry represents array.","syntaxes":[{"syntax":"isArray config","params":[{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["_ok = isArray (configFile >> \"CfgVehicles\") // returns false"]}],"see_also":["configFile","a / b","configName","count","getArray","getText","getNumber","inheritsFrom","isClass","isNumber","isText","select"]},{"name":"isAutoHoverOn","title":"isAutoHoverOn","type":"command","url":"https://community.bistudio.com/wiki/isAutoHoverOn","revid":319208,"updated":"2022-05-13T09:23:22Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Return true if vehicle has enabled auto hover. (always returns false if the vehicle can't set auto hover)","syntaxes":[{"syntax":"isAutoHoverOn vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_isOn = isAutoHoverOn vehicle player;"]}]},{"name":"isAutonomous","title":"isAutonomous","type":"command","url":"https://community.bistudio.com/wiki/isAutonomous","revid":364996,"updated":"2024-07-04T19:58:06Z","groups":["Remote Control"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"argument":"global"},"description":"Returns whether the UAV is in autonomous mode or not.","syntaxes":[{"syntax":"isAutonomous uav","params":[{"name":"uav","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"uav"}}],"examples":[{"code":["private _isAutonomous = isAutonomous uav;"]}],"see_also":["setAutonomous","disableAI","enableAI","checkAIFeature"],"notes":[{"user":"Sa-Matra","date":"2023-04-30T04:01:48Z","text":"Only works on UAV vehicle, UAV crew will always return false. Check my comment @ setAutonomous for more details about this command."}]},{"name":"isAutoStartUpEnabledRTD","title":"isAutoStartUpEnabledRTD","type":"command","url":"https://community.bistudio.com/wiki/isAutoStartUpEnabledRTD","revid":377727,"updated":"2026-01-02T21:48:47Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Returns state of automatic start up action.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"isAutoStartUpEnabledRTD helicopter","params":[{"name":"helicopter","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if automatic start up action is enabled."},"form":"unary","right":{"text":"helicopter"}}],"examples":[{"code":["_state = isAutoStartUpEnabledRTD _myHelicopter;"]}],"see_also":["enableAutoStartUpRTD"]},{"name":"isAutotest","title":"isAutotest","type":"command","url":"https://community.bistudio.com/wiki/isAutotest","revid":339084,"updated":"2023-04-26T10:54:05Z","groups":["System"],"status":"ok","games":{"arma3":"1.24"},"since":"arma3 1.24","arma3_since":"1.24","description":"Returns true if game was started with autotest parameter","syntaxes":[{"syntax":"isAutotest","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_bool = isAutotest;"]}],"see_also":["Arma 3 Startup Parameters"]},{"name":"isAutoTrimOnRTD","title":"isAutoTrimOnRTD","type":"command","url":"https://community.bistudio.com/wiki/isAutoTrimOnRTD","revid":351295,"updated":"2023-11-27T03:19:56Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34","tkoh":"1.00"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns state of auto trim functionality.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"isAutoTrimOnRTD helicopter","params":[{"name":"helicopter","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if auto trim is enabled"},"form":"unary","right":{"text":"helicopter"}}],"examples":[{"code":["_state = isAutoTrimOnRTD _myHelicopter;"]}],"see_also":["enableAutoTrimRTD"]},{"name":"isAwake","title":"isAwake","type":"command","url":"https://community.bistudio.com/wiki/isAwake","revid":373887,"updated":"2025-06-26T10:59:02Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"argument":"global"},"description":"Returns resting state of a PhysX (EPE) object. Some EPE objects are deliberately put to sleep by the engine to save resources.\nThis command returns true when object is simulating and false when it is put to sleep. With units of type `Man` the behaviour is slightly different.\nAs units never get put to sleep, the command outputs ragdoll state of a unit instead. There are 6 states for the output of the command:\n\n- EPE object is simulating - true\n- EPE object is put to sleep - false\n- Unit is alive, ragdoll is active - false\n- Unit is alive, ragdoll is NOT active - true\n- Arma 3 v2.10 Unit is NOT alive, ragdoll is active - true\n- Arma 3 v2.10 Unit is NOT alive, ragdoll is NOT active - false","syntaxes":[{"syntax":"isAwake object","params":[{"name":"object","type":"Object","description":"PhysX object or unit","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"see description"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["private _isAwake = isAwake _object;"]},{"text":"Arma 3 v2.10 Here is a simple formula to return ragdoll state of a unit:\n\n```sqf\nprivate _unitIsInRagdoll = alive _unit != isAwake _unit;\n```","code":["private _unitIsInRagdoll = alive _unit != isAwake _unit;"]}],"see_also":["awake","addTorque","addForce","vectorModelToWorld","vectorModelToWorldVisual","selectionPosition"]},{"name":"isBleeding","title":"isBleeding","type":"command","url":"https://community.bistudio.com/wiki/isBleeding","revid":322981,"updated":"2022-06-28T21:42:55Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns whether the unit is bleeding.","syntaxes":[{"syntax":"isBleeding unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["if (isBleeding player) then { player groupChat \"I'm bleeding!!\"; };"]}],"see_also":["getBleedingRemaining","isBurning","setBleedingRemaining"]},{"name":"isBurning","title":"isBurning","type":"command","url":"https://community.bistudio.com/wiki/isBurning","revid":323033,"updated":"2022-06-28T21:43:08Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns whether the unit is burning.\nThis returns true only if unit is damaged by nearby fire, it does **not** check whether a fireplace is burning, use inflamed command for that.","syntaxes":[{"syntax":"isBurning unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["if (isBurning player) then { player groupChat \"I'm burning!!\"; };"]}],"see_also":["getBleedingRemaining","setBleedingRemaining","isBleeding","inflamed"]},{"name":"isClass","title":"isClass","type":"command","url":"https://community.bistudio.com/wiki/isClass","revid":341206,"updated":"2023-05-13T22:33:10Z","groups":["Config"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Check if config entry represents config class.","syntaxes":[{"syntax":"isClass config","params":[{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"config"}}],"examples":[{"text":"```sqf\n_ok = isClass (configFile >> \"CfgVehicles\");\n```\n\nResult is true.","code":["_ok = isClass (configFile >> \"CfgVehicles\");"]}],"see_also":["configFile","a / b","configName","count","getArray","getText","getNumber","inheritsFrom","isArray","isNumber","isText","select"],"notes":[{"user":"Kronzky","date":"2007-03-02T01:17:00Z","text":"This command allows you to check for the presence of an addon.\n\n```\nisClass (configFile >> \"cfgVehicles\" >> \"MyCustomCar\")\n```\n\nwill return true if the addon \"MyCustomCar\" is installed, and false if it is not installed.\n\n*You will have to know under which class the addon is categorized (in this case \"cfgVehicles\") to be able to use the right config path.*"},{"user":"ffur2007slx2_5","date":"2014-03-31T15:45:00Z","text":"(Arma 3 ver 1.14) According to BI Dev Karel Mořický, BIS_fnc_getCfgIsClass provides a comfortable workaround with custom config under description.ext compared with isClass.\n(But as a function created specifically for A3 campaign, it is in no way intended as a replacement for isClass.\nSo it is not suggested to use it for configFile classes. But isClass instead.)\nE.g.\n\n```sqf\n[\"Something1\", \"Something2\", \"Something3\"] call BIS_fnc_getCfgIsClass; // same as isClass (missionConfigFile >> \"Something1\" >> \"Something2\" >> \"Something3\")\n```"}]},{"name":"isCollisionLightOn","title":"isCollisionLightOn","type":"command","url":"https://community.bistudio.com/wiki/isCollisionLightOn","revid":379357,"updated":"2026-10-30T23:55:45Z","groups":["Lights"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global"},"description":"Returns true if vehicle collision lights are on otherwise false.","syntaxes":[{"syntax":"isCollisionLightOn vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_collisionLightOn = isCollisionLightOn heli;"]}],"see_also":["isEngineOn","isLightOn","setPilotLight","setCollisionLight","isIRLaserOn"],"notes":[{"user":"Killzone_Kid","date":"2015-04-06T08:25:00Z","text":"Bind Collision light action to UserAction 2\n\n```sqf\nthis addAction [\"\", {\n    _this select 1 action [\n        [\"CollisionLightOn\", \"CollisionLightOff\"] select isCollisionLightOn (_this select 0),\n        _this select 0\n    ];\n}, \"\", -10, false, true, \"User2\", \"_this == driver _target\"];\n```"}]},{"name":"isCopilotEnabled","title":"isCopilotEnabled","type":"command","url":"https://community.bistudio.com/wiki/isCopilotEnabled","revid":379426,"updated":"2026-10-31T00:04:57Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns true if copilots actions are enabled.","syntaxes":[{"syntax":"isCopilotEnabled vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"text":"```sqf\nif (!isCopilotEnabled myHeli) then {\n    myHeli enableCopilot true;\n};\n```","code":["if (!isCopilotEnabled myHeli) then {\n\tmyHeli enableCopilot true;\n};"]}],"see_also":["enableCopilot"],"notes":[{"user":"Strangepete","date":"2014-02-17T00:00:00Z","text":"Only returns whether or not the actions are enabled and shown to the pilot and co-pilot. This will still return TRUE if the pilot uses the 'Lock Controls' action to disable co-pilot controls.\nYou can use the Arma 3 Event Handler - Controls Shifted to detect 'Take Controls' or 'Release Controls' actions"}]},{"name":"isDamageAllowed","title":"isDamageAllowed","type":"command","url":"https://community.bistudio.com/wiki/isDamageAllowed","revid":336947,"updated":"2023-01-04T16:44:11Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"global","effect":"local"},"description":"A getter for allowDamage command. The command indicates if damage is allowed at current locality, hence local effect of the command.\nFor complete solution for being able to tell whether or not an object can be damaged at current locality see Example 1.","syntaxes":[{"syntax":"isDamageAllowed object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["private _canBeDamaged = local _obj && isDamageAllowed _obj;"]}],"multiplayer":"Always returns false when called on non-local objects","see_also":["allowDamage","setDamage","setHit"]},{"name":"isDedicated","title":"isDedicated","type":"command","url":"https://community.bistudio.com/wiki/isDedicated","revid":337566,"updated":"2023-02-10T01:14:00Z","groups":["Multiplayer"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns true if the machine executing the command is a dedicated multiplayer server. Returns false in single player.","syntaxes":[{"syntax":"isDedicated","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (isDedicated) then { diag_log \"Dedicated Server on the run !\"; };"]}],"see_also":["isServer","hasInterface"],"notes":[{"user":"Killzone_Kid","date":"2014-12-21T14:54:00Z","text":"```sqf\nif (isDedicated) then {\n    // run on dedicated server only\n};\n\nif (isServer) then {\n    // run on dedicated server or player host\n};\n\nif (hasInterface) then {\n    // run on all player clients incl. player host\n};\n\nif (!isDedicated) then {\n    // run on all player clients incl. player host and headless clients\n};\n\nif (!isServer) then {\n    // run on all player clients incl. headless clients but not player host\n};\n\nif (!hasInterface) then {\n    // run on headless clients and dedicated server\n};\n\nif (!hasInterface && !isDedicated) then {\n    // run on headless clients only\n};\n```"}]},{"name":"isDLCAvailable","title":"isDLCAvailable","type":"command","url":"https://community.bistudio.com/wiki/isDLCAvailable","revid":369281,"updated":"2024-09-03T18:42:47Z","groups":["DLC"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Returns true if the DLC (CDLC included) is marked as available on Steam.\nOfficial and Creator DLC appIds can be found on Arma 3: DLCs & Expansions and Arma 3: CDLCs pages.\n\n> [!IMPORTANT]\n> This command will return true if the DLC is owned, even if it is **not** installed!","syntaxes":[{"syntax":"isDLCAvailable appId","params":[{"name":"appId","type":"Number","type_expr":"Number","text":"appId : Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"appId"}}],"examples":[{"code":["private _karts = 288520;\nisDLCAvailable _karts; // returns true"]}],"see_also":["getDLCs","getObjectDLC","getPersonUsedDLCs","getMissionDLCs"],"notes":[{"user":"Benargee","date":"2014-10-19T02:39:00Z","text":"appId can be taken from Steam DLC url, e.g Karts url is `steampowered.com/app/288520/`."}]},{"name":"isEngineOn","title":"isEngineOn","type":"command","url":"https://community.bistudio.com/wiki/isEngineOn","revid":379358,"updated":"2026-10-30T23:55:52Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.90","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.90","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns true if engine is on, false if it is off.","syntaxes":[{"syntax":"isEngineOn vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_carEngineIsOn = isEngineOn _carOne;"]}],"see_also":["engineOn","setCollisionLight","isLightOn","isCollisionLightOn"],"notes":[{"user":"RKillah","date":"2015-03-20T14:32:00Z","text":"isEngineOn returns true for static objects without an engine"},{"user":"Killzone_Kid","date":"2015-04-06T08:24:00Z","text":"Bind Engine action to User Action 1\n\n```sqf\nthis addAction [\"\",\n{\n    _this select 1 action\n    [\n        [\"EngineOn\", \"EngineOff\"] select isEngineOn (_this select 0),\n        _this select 0\n    ];\n}, \"\", -10, false, true, \"User1\", \"_this == driver _target\"];\n```"},{"user":"Sa-Matra","date":"2022-08-28T05:06:58Z","text":"If you're a client (not server) and check remote vehicle that is far away from the camera, you'll get an outdated engine state until the vehicle and client camera position are close to each other. Distance seems to be around 6km and doesn't depend on video settings."}]},{"name":"isEqualRef","title":"isEqualRef","type":"command","url":"https://community.bistudio.com/wiki/isEqualRef","revid":338333,"updated":"2023-02-28T14:32:49Z","groups":["Variables"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Compares two values by reference, returns true if equal.","syntaxes":[{"syntax":"val1 isEqualRef val2","params":[{"name":"val1","type":"Anything","type_expr":"Anything"},{"name":"val2","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the same ref"},"form":"binary","left":{"text":"val1"},"right":{"text":"val2"}}],"examples":[{"text":"```sqf\n_arr1 = [1,[2,[3]]];\n_arr2 = _arr1;\n_arr1 isEqualTo _arr2;    // true\n_arr1 isEqualRef _arr2;    // true\n\n_arr2 = +_arr1;            // array copy\n_arr1 isEqualTo _arr2;    // true\n_arr1 isEqualRef _arr2;    // false\n```","code":["_arr1 = [1,[2,[3]]];\n_arr2 = _arr1;\n_arr1 isEqualTo _arr2;\t// true\n_arr1 isEqualRef _arr2;\t// true\n\n_arr2 = +_arr1;\t\t\t// array copy\n_arr1 isEqualTo _arr2;\t// true\n_arr1 isEqualRef _arr2;\t// false"]}],"see_also":["isNotEqualRef","isEqualTo","Operators"]},{"name":"isEqualTo","title":"isEqualTo","type":"command","url":"https://community.bistudio.com/wiki/isEqualTo","revid":336361,"updated":"2022-12-29T09:01:58Z","groups":["Variables"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Performs strict comparison between var1 and var2 and returns true if equal, otherwise false. Strict means that it would check that both arguments are of the same data type and then compare the values.\n\nSome differences between isEqualTo and ==:\n\n- It performs case sensitive comparison on Strings\n- It doesn't throw error when comparing different types, i.e. (\"eleven\" isEqualTo 11)\n- It can compare Arrays, Script Handles and Booleans (alive player isEqualTo true)\n- It can compare non-existent game objects (grpNull isEqualTo grpNull)\n- It is slightly faster than ==, especially when comparing Strings\n- Arma 3 v1.48 It can compare Namespaces\n\n> [!NOTE]\n> A compiled code is not equal to the same compiled code made final:\n>\n> ```sqf\n> _a = compile \"123\"; _b = compileFinal \"123\"; _a isEqualTo _b; // false\n> ```\n\n> [!WARNING]\n> When comparing Arrays, if an array contains nil element, the comparison will return false. For example:\n>\n> ```sqf\n> private _array1 = [1, nil, 2];\n> private _array2 = [1, nil, 2];\n> _array1 isEqualTo _array2; // false\n> ```\n>\n> UNLESS the compared arrays are the same array:\n>\n> ```sqf\n> private _array1 = [1, nil, 2];\n> private _array2 = _array1;\n> _array1 isEqualTo _array2; // true\n> ```\n>\n> See: isEqualRef and BIS_fnc_areEqual vs BIS_fnc_areEqualNotNil","syntaxes":[{"syntax":"val1 isEqualTo val2","params":[{"name":"val1","type":"Anything","type_expr":"Anything"},{"name":"val2","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"val1"},"right":{"text":"val2"}}],"examples":[{"code":["_arr1 = [1, [2, [3]]];\n_arr2 = [1, [2, [3]]];\nif (_arr1 isEqualTo _arr2) then { hint \"Arrays match!\" };"]},{"code":["if (a isEqualTo b) then { hint \"a is equal to b\" };\nif !(a isEqualTo b) then { hint \"a is not equal to b\" };"]}],"see_also":["isNotEqualTo","isEqualRef","isEqualTypeAll","isEqualTypeAny","isEqualType","isEqualTypeParams","isEqualTypeArray","a == b","Operators"],"notes":[{"user":"Tajin","text":"Simply put, \"isEqualTo\" is a binary comparison. Therefor it is very fast but only accepts **100%** identical matches. In some other languages this is known as \"===\" instead of \"==\"."},{"user":"Dedmen","text":"When comparing with nil result is Nothing.\n\n```sqf\nnil isEqualTo player;\n```\n\nReturns Nothing instead of expected false\n\n```sqf\ndiag_log [nil isEqualTo player];\n```\n\nWill print `[bool]`"}]},{"name":"isEqualType","title":"isEqualType","type":"command","url":"https://community.bistudio.com/wiki/isEqualType","revid":325195,"updated":"2022-07-01T14:49:21Z","groups":["Variables"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","description":"Compares two values' types. A much faster alternative to `typeName a == typeName b`.","syntaxes":[{"syntax":"val1 isEqualType val2","params":[{"name":"val1","type":"Anything","type_expr":"Anything"},{"name":"val2","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"val1"},"right":{"text":"val2"}}],"examples":[{"code":["private _var = [1,2,3];\n_var isEqualType 0; // false\n_var isEqualType []; // true"]}],"see_also":["isEqualTypeAll","isEqualTypeArray","isEqualTypeAny","isEqualTypeParams","param","params","isEqualTo","typeName"]},{"name":"isEqualTypeAll","title":"isEqualTypeAll","type":"command","url":"https://community.bistudio.com/wiki/isEqualTypeAll","revid":377824,"updated":"2026-01-03T04:23:49Z","groups":["Variables","Arrays"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","description":"Compares types of all elements of an array to the type of a single value. Since Arma 3 v2.09.149634 no additional check is needed to make sure the first argument is an Array.\n\n> [!IMPORTANT]\n> An empty array will return `false` (see Example 2).","syntaxes":[{"syntax":"arr isEqualTypeAll val","params":[{"name":"arr","type":"Anything","description":"(was Array before Arma 3 v2.10)","type_expr":"Anything"},{"name":"val","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"arr"},"right":{"text":"val"}}],"examples":[{"text":"```sqf\n_arr = [1,2,3,4,5,6,7,8,9,0];\n_arr isEqualTypeAll \"\"; // false\n_arr isEqualTypeAll 0;    // true\n```","code":["_arr = [1,2,3,4,5,6,7,8,9,0];\n_arr isEqualTypeAll \"\"; // false\n_arr isEqualTypeAll 0;\t// true"]},{"text":"```sqf\n[] isEqualTypeAll \"\";    // false\n[\"\"] isEqualTypeAll \"\";    // true\n```","code":["[] isEqualTypeAll \"\";\t// false\n[\"\"] isEqualTypeAll \"\";\t// true"]},{"text":"```sqf\n0 isEqualTypeAll \"\";    // false\n0 isEqualTypeAll 0;        // false\n[0] isEqualTypeAll 0;    // true\n```","code":["0 isEqualTypeAll \"\";\t// false\n0 isEqualTypeAll 0;\t\t// false\n[0] isEqualTypeAll 0;\t// true"]}],"see_also":["isEqualTypeArray","isEqualTypeAny","isEqualType","isEqualTypeParams","param","params","isEqualTo","typeName"]},{"name":"isEqualTypeAny","title":"isEqualTypeAny","type":"command","url":"https://community.bistudio.com/wiki/isEqualTypeAny","revid":377153,"updated":"2026-01-01T10:37:25Z","groups":["Variables"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","description":"Compares type of given value to every type in the given array and if match is found, true is returned.","syntaxes":[{"syntax":"val isEqualTypeAny types","params":[{"name":"val","type":"Anything","type_expr":"Anything"},{"name":"types","type":"Array of Anything","type_expr":"Array<Anything>"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"val"},"right":{"text":"types"}}],"examples":[{"code":["_var = [1, 2, 3];\n_var isEqualTypeAny [0, \"\", objNull]; //false\n_var isEqualTypeAny [0, \"\", objNull, []]; //true"]}],"see_also":["isEqualType","isEqualTypeAll","isEqualTypeArray","isEqualTypeParams","param","params","isEqualTo","typeName"]},{"name":"isEqualTypeArray","title":"isEqualTypeArray","type":"command","url":"https://community.bistudio.com/wiki/isEqualTypeArray","revid":377152,"updated":"2026-01-01T10:37:00Z","groups":["Variables","Arrays"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","description":"Compares types of all elements of one array to types of all elements of another array. Since Arma 3 v2.09.149634 no additional check is needed to make sure the first argument is an Array.","syntaxes":[{"syntax":"arr1 isEqualTypeArray arr2","params":[{"name":"arr1","type":"Anything","type_expr":"Anything"},{"name":"arr2","type":"Array of Anything","type_expr":"Array<Anything>"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"arr1"},"right":{"text":"arr2"}}],"examples":[{"code":["_arr = [1,true,\"three\"];\n_arr isEqualTypeArray [0,objNull,\"\"]; // false\n_arr isEqualTypeArray [0,false,\"\"]; // true"]},{"code":["_arr = [1,2];\n_arr isEqualTypeArray [0]; // false\n_arr isEqualTypeArray [0,0]; // true\n_arr isEqualTypeArray [0,0,0]; // false"]}],"see_also":["isEqualTypeAll","isEqualType","isEqualTypeParams","param","params","isEqualTo","typeName"]},{"name":"isEqualTypeParams","title":"isEqualTypeParams","type":"command","url":"https://community.bistudio.com/wiki/isEqualTypeParams","revid":377090,"updated":"2026-01-01T09:48:04Z","groups":["Variables"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","description":"Compares types of all elements of input array to types of all elements of template array. Similar to isEqualTypeArray however this command is designed for fast validation of functions params, so there are differences:\n\n- Input can be anything but will be expected to be an Array, otherwise false is returned\n- Input array can be longer but not shorter than template array, will return false if shorter\n- nil could be used in template type array as a wild card to allow any type match","syntaxes":[{"syntax":"input isEqualTypeParams template","params":[{"name":"input","type":"Anything","description":"could be value of any type, but only type Array will be validated","type_expr":"Anything"},{"name":"template","type":"Array of Anything","description":"array of expected types","type_expr":"Array<Anything>"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"input"},"right":{"text":"template"}}],"examples":[{"code":["// These all return true\n[1,2,player,\"10\"] isEqualTypeParams [0,0,objNull,\"\"];\n[1,2,player,\"10\",true] isEqualTypeParams [0,0,nil,\"\"];\n[1,2,getPos player,\"10\",true] isEqualTypeParams [0,0,nil,\"\"];"]},{"code":["// These all return false\n123 isEqualTypeParams [0,0,objNull,\"\"];\n[] isEqualTypeParams [0,0,objNull,\"\"];\n[1,2,player] isEqualTypeParams [0,0,objNull,\"\"];"]}],"see_also":["isEqualTypeAll","isEqualTypeAny","isEqualType","isEqualTypeArray","param","params","isEqualTo","typeName"]},{"name":"isFilePatchingEnabled","title":"isFilePatchingEnabled","type":"command","url":"https://community.bistudio.com/wiki/isFilePatchingEnabled","revid":310763,"updated":"2022-05-07T20:21:37Z","groups":["System","Diagnostic"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns true if file patching is enabled otherwise false","syntaxes":[{"syntax":"isFilePatchingEnabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_state = isFilePatchingEnabled;"]}],"see_also":["Arma 3: Startup Parameters"]},{"name":"isFinal","title":"isFinal","type":"command","url":"https://community.bistudio.com/wiki/isFinal","revid":351275,"updated":"2023-11-27T02:07:26Z","groups":["Variables"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Checks if Code or a variable was compiled final with compileFinal.","syntaxes":[{"syntax":"isFinal variable","params":[{"name":"variable","type":"Code, String, Arma 3 v2.14 Array or HashMap","description":"Code, String, Arma 3 v2.14 Array or HashMap\n\n- Code\n- String - the name of the variable holding Code\n- Arma 3 v2.14 Array - an array that is a HashMapKey, a trigger's `thisList` array, made final with compileFinal etc.\n- Arma 3 v2.14 HashMap - a hashmap made final with compileFinal","type_expr":"Code | String | Array | HashMap","text":"variable: Code, String, Arma 3 v2.14 Array or HashMap\n\n- Code\n- String - the name of the variable holding Code\n- Arma 3 v2.14 Array - an array that is a HashMapKey, a trigger's `thisList` array, made final with compileFinal etc.\n- Arma 3 v2.14 HashMap - a hashmap made final with compileFinal"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if final, false if not"},"form":"unary","right":{"text":"variable"}}],"examples":[{"text":"```sqf\nprivate _myCode = compileFinal \"a = a + 1\";\nsystemChat format [\"isFinal \"\"_myCode\"\": %1\", isFinal \"_myCode\"];                // true\nsystemChat format [\"isFinal _myCode: %1\", isFinal _myCode];                        // true\nsystemChat format [\"isFinal some code: %1\", isFinal { hint \"Hello there\" }];    // false\n\nprivate _myArray1 = list _myTrigger;\nsystemChat format [\"isFinal _myArray1: %1\", isFinal _myArray1];                    // true\n\nprivate _myArray2 = [1, 2, 3];\nsystemChat format [\"isFinal _myArray2: %1\", isFinal _myArray2];                    // false\n\nprivate _myHashMap = compileFinal createHashMap;\nsystemChat format [\"isFinal _myHashMap: %1\", isFinal _myHashMap];                // true\n```","code":["private _myCode = compileFinal \"a = a + 1\";\nsystemChat format [\"isFinal \"\"_myCode\"\": %1\", isFinal \"_myCode\"];\t\t\t\t// true\nsystemChat format [\"isFinal _myCode: %1\", isFinal _myCode];\t\t\t\t\t\t// true\nsystemChat format [\"isFinal some code: %1\", isFinal { hint \"Hello there\" }];\t// false\n\nprivate _myArray1 = list _myTrigger;\nsystemChat format [\"isFinal _myArray1: %1\", isFinal _myArray1];\t\t\t\t\t// true\n\nprivate _myArray2 = [1, 2, 3];\nsystemChat format [\"isFinal _myArray2: %1\", isFinal _myArray2];\t\t\t\t\t// false\n\nprivate _myHashMap = compileFinal createHashMap;\nsystemChat format [\"isFinal _myHashMap: %1\", isFinal _myHashMap];\t\t\t\t// true"]},{"text":"Avoid .rpt's overwrite warnings:\n\n```sqf\nif (!isFinal fnc_myCode) then { fnc_myCode = compileFinal str_myCode };\n```","code":["if (!isFinal fnc_myCode) then { fnc_myCode = compileFinal str_myCode };"]}],"see_also":["compile","compileFinal"]},{"name":"isFlashlightOn","title":"isFlashlightOn","type":"command","url":"https://community.bistudio.com/wiki/isFlashlightOn","revid":319047,"updated":"2022-05-13T09:23:05Z","groups":["Object Manipulation","Weapons"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns true if there is a linked and enabled flashlight on a given weapon.","syntaxes":[{"syntax":"unit isFlashlightOn weapon","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"weapon","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"unit"},"right":{"text":"weapon"}}],"examples":[{"code":["player isFlashlightOn (currentWeapon player);"]}],"see_also":["enableGunLights"]},{"name":"isFlatEmpty","title":"isFlatEmpty","type":"command","url":"https://community.bistudio.com/wiki/isFlatEmpty","revid":377421,"updated":"2026-01-02T06:45:31Z","groups":["Positions"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Checks given position against given filter params. Filter includes checks for:\n\n- If there are any objects closer than given distance from given position (in 2D)\n- If the area around position is flat enough to match given gradient\n- If the given position is over water or land\n- If the given position is over shore line\n\nThe gradient seems to correlate with general hill steepness: 0.1 (10%) ~6°, 0.5 (50%) ~27°, 1.0 (100%) ~45°, etc.\n\n> [!NOTE]\n> See also BIS_fnc_findSafePos.","syntaxes":[{"syntax":"position isFlatEmpty [minDistance, mode, maxGradient, maxGradientRadius, overLandOrWater, shoreLine, ignoreObject]","params":[{"name":"position","type":"PositionAGL","type_expr":"PositionAGL"},{"name":"minDistance","type":"Number","optional":true,"default":"-1","description":"minimum (2D) distance from other objects (range 0..50). -1 to ignore proximity check","type_expr":"Number","text":"minDistance: Number - (Optional, default -1) minimum (2D) distance from other objects (range 0..50). -1 to ignore proximity check"},{"name":"mode","type":"Number","optional":true,"default":"-1","description":"position check mode (**ALWAYS USE DEFAULT VALUE**)","type_expr":"Number","text":"mode: Number - (Optional, default -1) position check mode (**ALWAYS USE DEFAULT VALUE**)"},{"name":"maxGradient","type":"Number","optional":true,"default":"-1","description":"maximum terrain steepness allowed. -1 to ignore","type_expr":"Number","text":"maxGradient: Number - (Optional, default -1) maximum terrain steepness allowed. -1 to ignore"},{"name":"maxGradientRadius","type":"Number","optional":true,"default":"1","description":"how far to extend gradient check","type_expr":"Number","text":"maxGradientRadius: Number - (Optional, default 1) how far to extend gradient check"},{"name":"overLandOrWater","type":"Number","optional":true,"default":"0","description":"0: position cannot be over water\n- 2: position cannot be over land\n- -1 to ignore","type_expr":"Number","text":"overLandOrWater: Number - (Optional, default 0)\n\n- 0: position cannot be over water\n- 2: position cannot be over land\n- -1 to ignore"},{"name":"shoreLine","type":"Boolean","optional":true,"default":"false","description":"true: position is over shoreline (< ~25 m from water)\n- false to ignore","type_expr":"Boolean","text":"shoreLine: Boolean - (Optional, default false)\n\n- true: position is over shoreline (< ~25 m from water)\n- false to ignore"},{"name":"ignoreObject","type":"Object","optional":true,"default":"objNull","description":"object to ignore in proximity checks. objNull to ignore","type_expr":"Object","text":"ignoreObject: Object - (Optional, default objNull) object to ignore in proximity checks. objNull to ignore"}],"returns":{"type":"Array","type_expr":"Array","description":"empty array [] if check failed or PositionASL if succeded. Resulting position will be original PositionAGL + getTerrainHeightASL"},"form":"binary","left":{"text":"position"},"right":{"text":"[minDistance, mode, maxGradient, maxGradientRadius, overLandOrWater, shoreLine, ignoreObject]"}}],"examples":[{"text":"Check if player position is over land:\n\n```sqf\n_overLand = !(position player isFlatEmpty [-1, -1, -1, -1, 0, false] isEqualTo []);\n```","code":["_overLand = !(position player isFlatEmpty [-1, -1, -1, -1, 0, false] isEqualTo []);"]},{"text":"Check if player position is over shore line:\n\n```sqf\n_overShore = !(position player isFlatEmpty  [-1, -1, -1, -1, 0, true] isEqualTo []);\n```","code":["_overShore = !(position player isFlatEmpty  [-1, -1, -1, -1, 0, true] isEqualTo []);"]},{"text":"Check if player position is over water:\n\n```sqf\n_overWater = !(position player isFlatEmpty  [-1, -1, -1, -1, 2, false] isEqualTo []);\n```","code":["_overWater = !(position player isFlatEmpty  [-1, -1, -1, -1, 2, false] isEqualTo []);"]},{"text":"Check if no object is closer than 5m to player position:\n\n```sqf\n_isEmpty = !(position player isFlatEmpty  [5, -1, -1, -1, -1, false, player] isEqualTo []);\n```","code":["_isEmpty = !(position player isFlatEmpty  [5, -1, -1, -1, -1, false, player] isEqualTo []);"]},{"text":"Check if area 10m around player position is relatively flat:\n\n```sqf\n_isFlat = !(position player isFlatEmpty  [-1, -1, 0.3, 10, -1] isEqualTo []);\n```","code":["_isFlat = !(position player isFlatEmpty  [-1, -1, 0.3, 10, -1] isEqualTo []);"]},{"text":"Check if area 15m around player position is very flat and empty:\n\n```sqf\n_isFlatEmpty = !(position player isFlatEmpty  [15, -1, 0.1, 15, -1, false, player] isEqualTo []);\n```","code":["_isFlatEmpty = !(position player isFlatEmpty  [15, -1, 0.1, 15, -1, false, player] isEqualTo []);"]}],"problems":"- Objects accounted for proximity check seem to be static objects. Nearby vehicles and units do not seem to affect the output\n- Given position will be magically transferred into given position + getTerrainHeightASL value\n- The second element must be -1 (≤ 0 really) at all times, otherwise command becomes unusable\n- The command might be a bit heavy on computations so avoid frequent and large area checks","see_also":["BIS_fnc_findSafePos","selectBestPlaces","findEmptyPosition"],"notes":[{"user":"Killzone_Kid","date":"2016-04-24T17:18:00Z","text":"When this command is instructed to check if area at given position is empty it takes into account the radius of the bounding sphere of surrounding objects. Because of this, the high voltage columns such as \"Land_HighVoltageColumnWire_F\" and such objects may appear extremely large to the calculations and the position will be rejected even if visually it doesn't look too bad. To avoid this, use findEmptyPosition command first to find guaranteed empty position, then pass the result to isFlatEmpty making sure you switched off proximity check by setting 1st param to -1. For example:\n\n```sqf\n// Check if given position is flat and empty within 1m radius\n[4274.66,12113,0.00139618] isFlatEmpty [1, -1, 0.1, 1, -1, false, objNull]; // []\n```\n\nThe result suggests it is not flat and empty.\n\n```sqf\n// Check if given position is flat within 1m radius\n[4274.66,12113,0.00139618] isFlatEmpty [-1, -1, 0.1, 1, -1, false, objNull]; // [4274.66,12113,48.3209]\n```\n\nThe result suggests it is.\n\n```sqf\n// Check if given position is empty within 1m radius\n[4274.66,12113,0.00139618] isFlatEmpty [1, -1, -1, -1, -1, false, objNull]; // []\n```\n\nThe result suggests it is not empty. But the position is in the middle of a road and there is nothing within 1m but there is \"Land_HighVoltageColumnWire_F\" not far.\n\n```sqf\n// Check if given position is empty within 1m radius ignoring nearest \"Land_HighVoltageColumnWire_F\"\n[4274.66,12113,0.00139618] isFlatEmpty [1, -1, -1, 1, -1, false, nearestObject [[4274.66,12113,0.00139618], \"Land_HighVoltageColumnWire_F\"]]; // [4274.66,12113,48.3209]\n```\n\nThe result now suggests it is empty. So instead of relying on internal proximity check we can combine both commands:\n\n```sqf\nfnc_isFlatEmpty =\n{\n    params [\"_pos\", \"_params\"];\n    _pos = _pos findEmptyPosition [0, _params select 0];\n    if (_pos isEqualTo []) exitWith {[]};\n    _params = +_params;\n    _params set [0, -1];\n    _pos = _pos isFlatEmpty _params;\n    if (_pos isEqualTo []) exitWith {[]};\n    _pos\n};\n\n// Test\n[[4274.66,12113,0.00139618], [1, -1, 0.1, 1, -1, false, objNull]] call fnc_isFlatEmpty; // [4274.53,12113,48.3175]\n```"}]},{"name":"isForcedWalk","title":"isForcedWalk","type":"command","url":"https://community.bistudio.com/wiki/isForcedWalk","revid":319117,"updated":"2022-05-13T09:23:13Z","groups":["Stamina System"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Returns true if player is forced to walk with forceWalk.","syntaxes":[{"syntax":"isForcedWalk unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object","text":"unitName : Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["_bool = isForcedWalk player;"]}],"see_also":["forceWalk","isWalking","forceSpeed","getSpeed"]},{"name":"isFormationLeader","title":"isFormationLeader","type":"command","url":"https://community.bistudio.com/wiki/isFormationLeader","revid":349302,"updated":"2023-11-08T14:52:18Z","groups":["Groups"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns true if the specified unit is subgroup leader.","syntaxes":[{"syntax":"isFormationLeader unit","params":[{"name":"unit","type":"Object","description":"unit being checked.","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if unit is subgroup leader."},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_isLeader = isFormationLeader player;"]}],"see_also":["commandFollow","doFollow","formationLeader","formLeader","leader","selectLeader","setLeader"]},{"name":"isGameFocused","title":"isGameFocused","type":"command","url":"https://community.bistudio.com/wiki/isGameFocused","revid":309152,"updated":"2022-05-03T14:13:47Z","groups":["System"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","description":"Returns the state of game focus changed by pressing <kbd>Alt</kbd> + <kbd>↹ Tab</kbd> or similar action.","syntaxes":[{"syntax":"isGameFocused","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if game window is focused, false if not"},"form":"nullary"}],"examples":[{"code":["if (!isGameFocused) then { endMission \"End\" };"]}],"see_also":["isGamePaused"]},{"name":"isGamePaused","title":"isGamePaused","type":"command","url":"https://community.bistudio.com/wiki/isGamePaused","revid":349063,"updated":"2023-11-08T14:47:20Z","groups":["System"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","description":"Returns the state of game simulation. Simulation can get paused by pressing <kbd>Alt</kbd> + <kbd>↹ Tab</kbd> or a system dialog opening (e.g. <kbd>Esc</kbd> menu).\nSimulation will not get paused if `-noPause` startup parameter is used.\n\n> [!NOTE]\n> onEachFrame event and `\"EachFrame\"` event handler continue to execute when the simulation is paused, which could result in undesired backlog. Use isGamePaused to skip loop if needed.","syntaxes":[{"syntax":"isGamePaused","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if game simulation is paused, false if not"},"form":"nullary"}],"examples":[{"text":"```sqf\nonEachFrame\n{\n    if (isGamePaused) exitWith {};\n    // ...do stuff\n};\n```","code":["onEachFrame \n{\n\tif (isGamePaused) exitWith {};\n\t// ...do stuff\n};"]}],"multiplayer":"In multiplayer the simulation will not get paused and this command will always return false.","see_also":["isGameFocused"]},{"name":"isGroupDeletedWhenEmpty","title":"isGroupDeletedWhenEmpty","type":"command","url":"https://community.bistudio.com/wiki/isGroupDeletedWhenEmpty","revid":364533,"updated":"2024-05-16T20:46:45Z","groups":["Groups"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"Checks if the given group marked for auto-deletion when empty. See deleteGroupWhenEmpty.\n\n> [!NOTE]\n> It might take up to a minute for the groups marked for auto-deletion when empty to get deleted when they become empty.\n\n> [!IMPORTANT]\n> This command is only a getter for the deleteWhenEmpty flag in createGroup command or deleteGroupWhenEmpty command. All it does is it shows what the flag was set to during group creation. True does not mean the group will be deleted but that it was suggested to the engine that it should be deleted. It is up to the engine how it manages groups. False does not mean that the group will not be deleted **at all**. It has no influence on the engine functionality whatsoever.","syntaxes":[{"syntax":"isGroupDeletedWhenEmpty group","params":[{"name":"group","type":"Group","type_expr":"Group"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true the group is marked for auto-deletion when empty"},"form":"unary","right":{"text":"group"}}],"examples":[{"code":["_isMarked = isGroupDeletedWhenEmpty _group;"]}],"see_also":["deleteGroup","deleteGroupWhenEmpty","createGroup","group","setGroupId","groupID","units","groupFromNetId","netId","leader","selectLeader","join","createCenter","createUnit","createVehicle","Side"]},{"name":"isHidden","title":"isHidden","type":"command","url":"https://community.bistudio.com/wiki/isHidden","revid":379359,"updated":"2026-10-30T23:56:00Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns whether a person is hidden (reached the hiding position).\n\n> [!IMPORTANT]\n> Not to be confused with isObjectHidden, which is returning object visibility set with hideObject","syntaxes":[{"syntax":"isHidden person","params":[{"name":"person","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"person"}}],"examples":[{"code":["_bobIsHidden = isHidden bob;"]}],"see_also":["isObjectHidden","getHideFrom","setHideBehind","findCover"],"notes":[{"user":"Killzone_Kid","date":"2017-01-01T22:40:00Z","text":"Tested in 1.67 DEV, seems to always return false"}]},{"name":"isInRemainsCollector","title":"isInRemainsCollector","type":"command","url":"https://community.bistudio.com/wiki/isInRemainsCollector","revid":353433,"updated":"2024-03-18T11:57:36Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global"},"description":"Checks if unit or vehicle is queued for disposal after death.","syntaxes":[{"syntax":"isInRemainsCollector remain","params":[{"name":"remain","type":"Object","description":"vehicle or unit","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"remain"}}],"examples":[{"code":["if (isInRemainsCollector unit1) then {hint \"unit1 is queued for disposal\"};"]}],"see_also":["addToRemainsCollector","removeFromRemainsCollector","diag_remainsCollector"]},{"name":"isInstructorFigureEnabled","title":"isInstructorFigureEnabled","type":"command","url":"https://community.bistudio.com/wiki/isInstructorFigureEnabled","revid":310274,"updated":"2022-05-05T13:11:22Z","groups":["Difficulty"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Returns the status of INSTRUCTOR FIGURE setting in UI (OPTIONS >> GAME >> GENERAL >> INSTRUCTOR FIGURE).","syntaxes":[{"syntax":"isInstructorFigureEnabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["hint str isInstructorFigureEnabled;"]}],"see_also":["isStreamFriendlyUIEnabled","isTutHintsEnabled"]},{"name":"isIRLaserOn","title":"isIRLaserOn","type":"command","url":"https://community.bistudio.com/wiki/isIRLaserOn","revid":310267,"updated":"2022-05-05T13:11:19Z","groups":["Lights"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns true if there is a linked and enabled IR on the given weapon.","syntaxes":[{"syntax":"unit isIRLaserOn weapon","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"weapon","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"unit"},"right":{"text":"weapon"}}],"examples":[{"code":["player isIRLaserOn currentWeapon player;"]}],"see_also":["enableIRLasers","enableGunLights","isLightOn","isCollisionLightOn","setPilotLight","setCollisionLight"]},{"name":"isKeyActive","title":"isKeyActive","type":"command","url":"https://community.bistudio.com/wiki/isKeyActive","revid":319058,"updated":"2022-05-13T09:23:07Z","groups":["Mission Information"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Checks whether the given key is active in the current user profile.\n\nSee keys, keysLimit and doneKeys in the description.ext file of the missions.","syntaxes":[{"syntax":"isKeyActive keyName","params":[{"name":"keyName","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"keyName"}}],"examples":[{"code":["_active = isKeyActive \"Mission04Key\";"]}],"see_also":["activateKey","deActivateKey"]},{"name":"isKindOf","title":"isKindOf","type":"command","url":"https://community.bistudio.com/wiki/isKindOf","revid":341247,"updated":"2023-05-18T10:50:41Z","groups":["Object Manipulation"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Checks whether the given object or type is (a subtype) of the given type.\nWhile Syntax 1 and Syntax 2 only support **CfgVehicles**, Arma 2 v1.00**CfgAmmo** and **CfgNonAIVehicles**, Syntax 3 can be used with any config, including the mission config.","syntaxes":[{"syntax":"object isKindOf typeName","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"typeName","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"object"},"right":{"text":"typeName"}},{"syntax":"class1 isKindOf class2","params":[{"name":"class1","type":"String","type_expr":"String"},{"name":"class2","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"class1"},"right":{"text":"class2"}},{"syntax":"class1 isKindOf [class2, targetConfig]","since":"arma3 1.48","params":[{"name":"class1","type":"String","type_expr":"String"},{"name":"class2","type":"String","type_expr":"String"},{"name":"targetConfig","type":"Config","type_expr":"Config"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"class1"},"right":{"text":"[class2, targetConfig]"}}],"examples":[{"code":["vehicle player isKindOf \"Tank\";"]},{"code":["\"BMP2\" isKindOf \"Tank\";"]},{"code":["currentWeapon player isKindOf [\"Rifle\", configFile >> \"CfgWeapons\"];"]},{"code":["private _isSoldier = player isKindOf \"CAManBase\";"]}],"see_also":["typeOf","countType","inheritsFrom","configHierarchy"],"notes":[{"user":"Kronzky","date":"2007-04-23T16:34:00Z","text":"This command can be used on the whole hierarchical class tree (i.e. when checking a HMMWV, one could test for \"HMMWV50\", \"Car\", \"LandVehicle\", etc., all of which would return true.)"},{"user":"James","date":"2015-06-16T17:54:00Z","text":"In case you cannot use isKindOf because of the reasons stated, just use BIS_fnc_returnParents with class names as return value:\n\n```sqf\n_isKindOf = \"Rifle\" in [configFile >> \"CfgWeapons\" >> \"BWA3_G36K\", true] call BIS_fnc_returnParents; // is true\n```"},{"user":"Basstard","date":"2015-09-06T22:21:00Z","text":"In Arma 3 isKindOf works well with CfgWeapons and CfgMagazines using the syntax from example 3.\nIt should be prefered to James' solution as it performs more than 25x faster. Tested in debug console with the following code snippets:\n\n```sqf\n\"CA_Magazine\" in ([configFile >> \"CfgMagazines\" >> \"HandGrenade\", true] call BIS_fnc_returnParents);    // 0.12111 ms\n\"HandGrenade\" isKindOf [\"CA_Magazine\", configFile >> \"CfgMagazines\"];                                    // 0.00439453 ms\n```\n\nWhen checking in CfgVehicles the syntax from Example 2 performs a little faster."}]},{"name":"isLaserOn","title":"isLaserOn","type":"command","url":"https://community.bistudio.com/wiki/isLaserOn","revid":377491,"updated":"2026-01-02T06:49:13Z","groups":["Weapons"],"status":"ok","games":{"arma3":"1.78"},"since":"arma3 1.78","arma3_since":"1.78","locality":{"argument":"local","effect":"global"},"description":"Returns true if the vehicle has its laser turned on. Not to be confused with isIRLaserOn which is for units. Main syntax is for primary gunner turret.","syntaxes":[{"syntax":"isLaserOn entity","params":[{"name":"entity","type":"Object","description":"unit or vehicle","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when laser is on, false otherwise"},"form":"unary","right":{"text":"entity"}},{"syntax":"vehicle isLaserOn turret","since":"arma3 2.12","params":[{"name":"vehicle","type":"Object","description":"transport","type_expr":"Object"},{"name":"turret","type":"Turret Path","description":"[-1] for driver turret","type_expr":"Turret Path"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when laser is on, false otherwise"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turret"}}],"examples":[{"code":["if (isLaserOn _vehicle) then { hint \"target ready\" };"]}],"see_also":["laserTarget","enableIRLasers","isIRLaserOn"],"notes":[{"user":"Sa-Matra","date":"2022-12-27T08:27:27Z","text":"Does not mean there is actual laser object present. Returns laser designator weapon's toggle state. In other words isLaserOn can return `true` while laserTarget returns `<NULL-object>`, for example in case laser was turned on and unit left the vehicle, there would be no laser target entity anymore, while designator is still turned on."}]},{"name":"isLightOn","title":"isLightOn","type":"command","url":"https://community.bistudio.com/wiki/isLightOn","revid":377881,"updated":"2026-01-04T16:20:38Z","groups":["Lights"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global"},"description":"Returns true if vehicle headlights are on otherwise false.","syntaxes":[{"syntax":"isLightOn vehicle","params":[{"name":"vehicle","type":"Object","description":"vehicle with headlights","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"vehicle"}},{"syntax":"isLightOn [vehicle, turret]","since":"arma3 1.94","params":[{"name":"vehicle","type":"Object","description":"vehicle with search light on a turret","type_expr":"Object"},{"name":"turret","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"[vehicle, turret]"}}],"examples":[{"code":["_headlightsOn = isLightOn vehicle player;"]},{"code":["_pilotLightOn = isLightOn heli;"]},{"code":["_searchLightOn = isLightOn [heli, [0]];"]}],"see_also":["setPilotLight","isCollisionLightOn","setCollisionLight","isIRLaserOn"]},{"name":"isLocalized","title":"isLocalized","type":"command","url":"https://community.bistudio.com/wiki/isLocalized","revid":349114,"updated":"2023-11-08T14:49:37Z","groups":["Strings","Localization"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Checks whether given *stringName* is localized.","syntaxes":[{"syntax":"isLocalized stringName","params":[{"name":"stringName","type":"String","description":"string which leads to localisation. Casing does not matter. Since Arma 3 v2.04 a string starting with `\"$\"` is supported as well","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"stringName"}}],"examples":[{"text":"```sqf\nif (isLocalized \"STR_USRACT_ADJUST\") then\n{\n    hint localize \"STR_USRACT_ADJUST\";\n}\nelse\n{\n    hint \"STR_USRACT_ADJUST\";\n    diag_log \"ToDo: STR_USRACT_ADJUST is not localized\";\n};\n```","code":["if (isLocalized \"STR_USRACT_ADJUST\") then \n{\n\thint localize \"STR_USRACT_ADJUST\";\n} \nelse \n{\n\thint \"STR_USRACT_ADJUST\";\n\tdiag_log \"ToDo: STR_USRACT_ADJUST is not localized\";\n};"]},{"code":["isLocalized \"$STR_USRACT_ADJUST\"; // Since Arma v2.04"]}],"see_also":["localize","diag_localized","getTextRaw","WFSideText","Stringtable.csv","Stringtable.xml","BIS_fnc_localize"]},{"name":"isManualFire","title":"isManualFire","type":"command","url":"https://community.bistudio.com/wiki/isManualFire","revid":379360,"updated":"2026-10-30T23:56:08Z","groups":["Weapons"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns true if manual fire is on. Manual fire could either be selected in vehicle action menu (if available) or with action \"ManualFire\" and \"ManualFireCancel\". Always returns false for a soldier.","syntaxes":[{"syntax":"isManualFire vehicleName","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"vehicleName"}}],"examples":[{"code":["_bool = isManualFire vehicle player;"]}],"see_also":["fire","doFire","commandFire","canFire","fireAtTarget","forceWeaponFire","commandArtilleryFire","commandSuppressiveFire","doArtilleryFire","doSuppressiveFire"],"notes":[{"user":"AgentRev","date":"2017-02-05T05:35:00Z","text":"Manual fire means the effectiveCommander of the vehicle controls firing (but not aiming) of the gunner turret weapons (usually path [0]), while unable to fire his own weapons."}]},{"name":"isMarkedForCollection","title":"isMarkedForCollection","type":"command","url":"https://community.bistudio.com/wiki/isMarkedForCollection","revid":310851,"updated":"2022-05-07T20:24:08Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks whether the object is marked for weapons collection.","syntaxes":[{"syntax":"isMarkedForCollection object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_marked = isMarkedForCollection _truck;"]}]},{"name":"isMissionProfileNamespaceLoaded","title":"isMissionProfileNamespaceLoaded","type":"command","url":"https://community.bistudio.com/wiki/isMissionProfileNamespaceLoaded","revid":330167,"updated":"2022-08-23T12:23:59Z","groups":["Namespaces","Variables"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"The missionProfileNamespace variables are loaded at the start of a mission, before 'init.sqf' is executed. If the file with saved variables for current mission exists in user profile and is loaded, the command returns true. It also will return true after the first execution of saveMissionProfileNamespace command, which also creates the file.","syntaxes":[{"syntax":"isMissionProfileNamespaceLoaded","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if mission profile variables file exists and is loaded."},"form":"nullary"}],"examples":[{"code":["private _isLoaded = isMissionProfileNamespaceLoaded;"]}],"see_also":["missionProfileNamespace","saveMissionProfileNamespace"]},{"name":"isMultiplayer","title":"isMultiplayer","type":"command","url":"https://community.bistudio.com/wiki/isMultiplayer","revid":369356,"updated":"2024-09-03T18:43:05Z","groups":["Multiplayer"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return true if multiPlayer.","syntaxes":[{"syntax":"isMultiplayer","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (isMultiplayer) then\n{\n    // ...block\n}\n```","code":["if (isMultiplayer) then\n{\n\t// ...block\n}"]}],"see_also":["isDedicated","isServer"]},{"name":"isMultiplayerSolo","title":"isMultiplayerSolo","type":"command","url":"https://community.bistudio.com/wiki/isMultiplayerSolo","revid":310750,"updated":"2022-05-07T20:21:31Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.66"},"since":"arma3 1.66","arma3_since":"1.66","description":"Returns true when playing a game in **solo multiplayer** (for example Apex coop campaign PLAY SOLO option).","syntaxes":[{"syntax":"isMultiplayerSolo","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_state = isMultiplayerSolo;"]}],"see_also":["isMultiplayer","isDedicated","hasInterface","isServer"]},{"name":"isNil","title":"isNil","type":"command","url":"https://community.bistudio.com/wiki/isNil","revid":370850,"updated":"2025-02-18T00:01:09Z","groups":["Variables"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Tests whether a variable is nil or undefined from its identifier, or whether the given expression evaluates to nil or Nothing.\n\n> [!NOTE]\n> This command does not exist in Operation Flashpoint/Arma: Cold War Assault but can be emulated (see Example 5).","syntaxes":[{"syntax":"isNil variableName","params":[{"name":"variableName","type":"String","description":"missionNamespace's or local variable's identifier (e.g \"globalVariable\", \"_localVariable\")","type_expr":"String","text":"variableName: **String** - missionNamespace's or local variable's identifier (e.g \"globalVariable\", \"_localVariable\")"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if variable is nil or undefined"},"form":"unary","right":{"text":"variableName"}},{"syntax":"isNil code","params":[{"name":"code","type":"Code","description":"code to evaluate:\n\n- the code **will** be executed; `isNil { player setDamage 1 };` *will* kill the player\n- the code will not be allowed to suspend while expression is evaluated, even if the parent scope allows it (see Example 4).","type_expr":"Code"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if code returns Nothing, false otherwise","text":"Boolean - true if *code* returns Nothing, false otherwise"},"form":"unary","right":{"text":"code"}},{"syntax":"namespace isNil variableName","since":"arma3 2.18","params":[{"name":"namespace","type":"Namespace, Object, Group, HashMap, Arma 3 v2.20 Control and Display","type_expr":"Namespace | Object | Group | HashMap | Control | Display"},{"name":"variableName","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if variable is nil or undefined"},"form":"binary","left":{"text":"namespace"},"right":{"text":"variableName"}}],"examples":[{"code":["if (isNil \"TAG_globalVariable\") then { TAG_globalVariable = 0 };\nif (isNil \"_localVariable\") then { hint \"_localVariable is nil\" };"]},{"code":["isNil { player getVariable \"someVar\" };"]},{"code":["_myArray = [0, 1];\nisNil { _myArray select 0 }; // returns false\nisNil { _myArray select 1 }; // returns false\nisNil { _myArray select 2 }; // returns true\nisNil { _myArray select 3 }; // throws a script error. only length+1 select is allowed"]},{"text":"This trick forces executing something in Unscheduled Environment:\n\n```sqf\n0 spawn {\n    systemChat str canSuspend;        // chat shows true\n    isNil { hint str canSuspend };    // hint shows false\n};\n```","code":["0 spawn {\n\tsystemChat str canSuspend;\t\t// chat shows true\n\tisNil { hint str canSuspend };\t// hint shows false\n};"]},{"text":"Operation Flashpoint String comparison workaround\nSQS Syntax:\n\n```sqs\n_nil = format [\"%1\", _undefinedVariable]\n? (format [\"%1\", variableToTest] == _nil) : hint \"variableToTest is nil\"\n```\n\nSQF Syntax:\n\n```sqf\n_nil = format [\"%1\", _undefinedVariable];\nif (format [\"%1\", variableToTest] == _nil) then { hint \"variableToTest is nil\" };\n```","code":["_nil = format [\"%1\", _undefinedVariable]\n? (format [\"%1\", variableToTest] == _nil) : hint \"variableToTest is nil\"","_nil = format [\"%1\", _undefinedVariable];\nif (format [\"%1\", variableToTest] == _nil) then { hint \"variableToTest is nil\" };"]}],"see_also":["nil","Variables","Scheduler"]},{"name":"isNotEqualRef","title":"isNotEqualRef","type":"command","url":"https://community.bistudio.com/wiki/isNotEqualRef","revid":338493,"updated":"2023-03-10T17:30:50Z","groups":["Variables"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Compares two values by reference, returns true if not equal.","syntaxes":[{"syntax":"val1 isNotEqualRef val2","params":[{"name":"val1","type":"Anything","type_expr":"Anything"},{"name":"val2","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if not the same reference"},"form":"binary","left":{"text":"val1"},"right":{"text":"val2"}}],"examples":[{"text":"```sqf\n_arr1 = [1,[2,[3]]];\n_arr2 = _arr1;\n_arr1 isEqualTo _arr2;        // true\n_arr1 isNotEqualRef _arr2;    // false\n\n_arr2 = +_arr1;                // array copy\n_arr1 isEqualTo _arr2;        // true\n_arr1 isNotEqualRef _arr2;    // true\n```","code":["_arr1 = [1,[2,[3]]];\n_arr2 = _arr1;\n_arr1 isEqualTo _arr2;\t\t// true\n_arr1 isNotEqualRef _arr2;\t// false\n\n_arr2 = +_arr1;\t\t\t\t// array copy\n_arr1 isEqualTo _arr2;\t\t// true\n_arr1 isNotEqualRef _arr2;\t// true"]}],"see_also":["isEqualRef","isNotEqualTo","Operators"]},{"name":"isNotEqualTo","title":"isNotEqualTo","type":"command","url":"https://community.bistudio.com/wiki/isNotEqualTo","revid":330347,"updated":"2022-09-02T12:25:54Z","groups":["Variables"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Performs strict comparison between var1 and var2 and returns false if equal, otherwise true.","syntaxes":[{"syntax":"val1 isNotEqualTo val2","params":[{"name":"val1","type":"Anything","type_expr":"Anything"},{"name":"val2","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"val1"},"right":{"text":"val2"}}],"examples":[{"code":["private _true = 0 isNotEqualTo 1;"]}],"see_also":["isEqualTo","isNotEqualRef"]},{"name":"isNull","title":"isNull","type":"command","url":"https://community.bistudio.com/wiki/isNull","revid":379531,"updated":"2026-10-31T00:51:14Z","groups":["Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks whether the tested item is null.\nWhich null type the item has to be equal to depends on the type of game entity tested:\n\n|  |  |  |  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|---|---|---|\n| Type | Object | Group | Control | Display | Location | Task | Script | Config | Diary Record | Team Member |\n| Null value | objNull | grpNull | controlNull | displayNull | locationNull | taskNull | scriptNull | configNull | diaryRecordNull | teamMemberNull |\n| Since | Operation Flashpoint v1.00 |  | Armed Assault v1.00 |  | Arma 2 v1.00 |  | Arma 3 v1.30 | Arma 3 v1.54 | Arma 3 v2.00 | Arma 3 v2.10 |\n\n> [!IMPORTANT]\n> A test via == does **not** work because a null value is not equal to anything, not even itself (configNull being the exception).\n> See also isEqualTo.","syntaxes":[{"syntax":"isNull entity","params":[{"name":"entity","type":"Object, Control, Display, Group, Location, Task, Script Handle, Config, Diary Record or Team Member","type_expr":"Object | Control | Display | Group | Location | Task | Script Handle | Config | Diary Record | Team Member"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"entity"}}],"examples":[{"text":"```sqf\nif (isNil \"obj\") exitWith { hint \"obj variable is undefined\" };\n\nif (isNull obj) then\n{\n    hint \"obj variable is defined but is null\";\n}\nelse\n{\n    hint \"obj variable is defined and is not null\";\n};\n```","code":["if (isNil \"obj\") exitWith { hint \"obj variable is undefined\" };\n\nif (isNull obj) then\n{\n\thint \"obj variable is defined but is null\";\n}\nelse\n{\n\thint \"obj variable is defined and is not null\";\n};"]},{"text":"Diary Record support before Arma 3 v2.00:\n\n```sqf\nprivate _nullRecord = objNull createDiaryRecord []; // wrong parameters = failure to create a record = null value\nprivate _createdRecord = player createDiaryRecord [\"Diary\", [\"title\", \"description\"]];\nif (_createdRecord isEqualTo _nullRecord) then { hint \"Failed\" };\n```\n\nTeam Member support before Arma 3 v2.10:\n\n```sqf\nprivate _isNull = _teamMember isEqualTo teamMemberNull;\n```","code":["private _nullRecord = objNull createDiaryRecord []; // wrong parameters = failure to create a record = null value\nprivate _createdRecord = player createDiaryRecord [\"Diary\", [\"title\", \"description\"]];\nif (_createdRecord isEqualTo _nullRecord) then { hint \"Failed\" };","private _isNull = _teamMember isEqualTo teamMemberNull;"]}],"see_also":["controlNull","displayNull","grpNull","locationNull","objNull","taskNull","teamMemberNull","scriptNull","configNull","typeName"]},{"name":"isNumber","title":"isNumber","type":"command","url":"https://community.bistudio.com/wiki/isNumber","revid":323074,"updated":"2022-06-28T21:43:12Z","groups":["Config"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Check if config entry represents number.","syntaxes":[{"syntax":"isNumber config","params":[{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"config"}}],"examples":[{"text":"```sqf\n_ok = isNumber (configFile >> \"CfgVehicles\");\n```\n\nResult is false","code":["_ok = isNumber (configFile >> \"CfgVehicles\");"]}],"see_also":["configFile","a / b","configName","count","getArray","getText","getNumber","inheritsFrom","isArray","isClass","isText","select"]},{"name":"isObjectHidden","title":"isObjectHidden","type":"command","url":"https://community.bistudio.com/wiki/isObjectHidden","revid":319236,"updated":"2022-05-13T09:23:25Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","locality":{"argument":"global","effect":"local"},"description":"Checks visibility of a given object on the local machine.","syntaxes":[{"syntax":"isObjectHidden object","params":[{"name":"object","type":"Object","description":"object to test","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if hidden, false if visible"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_bobIsHidden = isObjectHidden bob;"]}],"see_also":["hideObject","hideObjectGlobal","deleteCollection"]},{"name":"isObjectRTD","title":"isObjectRTD","type":"command","url":"https://community.bistudio.com/wiki/isObjectRTD","revid":330053,"updated":"2022-08-15T16:03:49Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns true if RTD model is loaded.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"isObjectRTD helicopter","params":[{"name":"helicopter","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"helicopter"}}],"examples":[{"code":["_heliRTD = isObjectRTD vehicle player;"]}],"see_also":["weightRTD","difficultyEnabledRTD"]},{"name":"isOnRoad","title":"isOnRoad","type":"command","url":"https://community.bistudio.com/wiki/isOnRoad","revid":377415,"updated":"2026-01-02T06:45:20Z","groups":["Roads and Airports"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks if given position is inside road segment. Same as roadAt, only return is boolean instead of road object.","syntaxes":[{"syntax":"isOnRoad position","params":[{"name":"position","type":"Object or PositionAGL (especially on bridges) or Arma 3 v2.00 Position2D, in which case Z will be automatically deduced as the height of the road surface","type_expr":"Object | PositionAGL | Position2D"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"position"}}],"examples":[{"code":["_objOnRoad = isOnRoad player;"]},{"code":["_posOnRoad = isOnRoad ASLToAGL getPosASL player;"]}],"see_also":["nearRoads","roadsConnectedTo","roadAt","surfaceIsWater","getRoadInfo","nearestTerrainObjects"],"notes":[{"user":"Tankbuster","date":"2017-11-24T21:31:00Z","text":"Some roadobjects will return false when using this command. invisibleroadway_square_f.p3d is found by the nearRoads command, yet will return false for isOnRoad."}]},{"name":"isPiPEnabled","title":"isPiPEnabled","type":"command","url":"https://community.bistudio.com/wiki/isPiPEnabled","revid":310808,"updated":"2022-05-07T20:22:00Z","groups":["System"],"status":"ok","games":{"tkoh":"1.01","arma3":"0.50"},"since":"tkoh 1.01","arma3_since":"0.50","description":"Returns whether Picture-In-Picture video option (Render to Texture) is enabled or not.","syntaxes":[{"syntax":"isPiPEnabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["private _PiPState = isPiPEnabled;"]}],"see_also":["BIS_fnc_PIP"]},{"name":"isPlayer","title":"isPlayer","type":"command","url":"https://community.bistudio.com/wiki/isPlayer","revid":363376,"updated":"2024-03-29T08:30:20Z","groups":["Multiplayer"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks if given person is a player. Returns true for headless clients as well.\n\n> [!NOTE]\n> Prior to Arma 3 v2.02, in some cases the identity of certain player units could fail to propagate to other clients and the server, which caused isPlayer and getPlayerUID to incorrectly return `false` and `\"\"` respectively, where the affected units were not local. See [this GitHub bug report](https://github.com/michail-nikolaev/task-force-arma-3-radio/issues/1096) for more info. Remain vigilant toward potential false negatives.\n\n> [!IMPORTANT]\n> When used on vehicles, this command will return true if effectiveCommander of the vehicle is player. Just because it returns true does not automatically mean we have a player unit. Unlike main syntax, alternative syntax always returns false when used on vehicles, even if they're controlled by a player.","syntaxes":[{"syntax":"isPlayer unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unit"}},{"syntax":"isPlayer [person]","since":"arma3 2.06","params":[{"name":"person","type":"Object","description":"dead or alive unit","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if is/was player and the identity still exists on the (dead) body","text":"Boolean - true if is/was player **and** the identity still exists on the (dead) body"},"form":"unary","right":{"text":"[person]"}}],"examples":[{"text":"```sqf\nif (isPlayer _Soldier1) then\n{\n    _soldier1 setDamage 1;\n};\n```","code":["if (isPlayer _Soldier1) then\n{\n\t_soldier1 setDamage 1;\n};"]},{"code":["_playerCount = { isPlayer _x } count playableUnits;"]},{"code":["private _wasPlayer = isPlayer [_deadBody]; // returns true if _deadBody's identity still exists and was controlled by a player"]}],"see_also":["player","playableSlotsNumber","playableUnits","playersNumber"],"notes":[{"user":"Kronzky","text":"This is not the same as testing object == player, because in MP it tests for any player, not only for the local one. If object is a vehicle, the test is done for the vehicle commander."}]},{"name":"isRealTime","title":"isRealTime","type":"command","url":"https://community.bistudio.com/wiki/isRealTime","revid":323018,"updated":"2022-06-28T21:43:07Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns true if the mission editor is operating in real time mode.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"isRealTime map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"map"}}],"examples":[{"code":["_isRealTime = isRealTime _map;"]}]},{"name":"isRemoteControlling","title":"isRemoteControlling","type":"command","url":"https://community.bistudio.com/wiki/isRemoteControlling","revid":347218,"updated":"2023-09-05T16:49:02Z","groups":["Remote Control"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","locality":{"argument":"local"},"description":"Returns true if the given player is remote-controlling a unit.\n\n> [!IMPORTANT]\n> See also Remote Control Tutorial.","syntaxes":[{"syntax":"isRemoteControlling person","params":[{"name":"person","type":"Object","description":"a player","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the given player is remote controlling a unit"},"form":"unary","right":{"text":"person"}}],"examples":[{"text":"```sqf\nif (isRemoteControlling player) then\n{\n    hint format [\"You are controlling %1\", remoteControlled player];\n}\nelse\n{\n    hint \"Why not remote-control something?\";\n};\n```","code":["if (isRemoteControlling player) then\n{\n\thint format [\"You are controlling %1\", remoteControlled player];\n}\nelse\n{\n\thint \"Why not remote-control something?\";\n};"]}],"see_also":["remoteControl","remoteControlled"]},{"name":"isRemoteExecuted","title":"isRemoteExecuted","type":"command","url":"https://community.bistudio.com/wiki/isRemoteExecuted","revid":365039,"updated":"2024-07-14T13:22:37Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.66"},"since":"arma3 1.66","arma3_since":"1.66","description":"Returns true if the code context is being remote executed by remoteExec or remoteExecCall. In SP always returns false. See also isRemoteExecutedJIP:\n\n| command | Single Player | Multiplayer |  |\n|---|---|---|---|\n| command | Single Player | Direct remoteExec | JIP remoteExec |\n| isRemoteExecuted | ✗ | ✓ | ✓ |\n| isRemoteExecutedJIP | ✗ | ✗ | ✓ |","syntaxes":[{"syntax":"isRemoteExecuted","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["private _remoteExecuted = isRemoteExecuted;"]}],"see_also":["isRemoteExecutedJIP","remoteExec","remoteExecCall","canSuspend","remoteExecutedOwner","isUIContext","isGamePaused","isGameFocused","remoteExecutedJIPID"],"notes":[{"user":"Demellion","date":"2017-09-11T11:16:00Z","text":"When remoteExec/remoteExecCall is called from a headless client to client, this will always return as false.\nThis effect also occurs with remoteExecutedOwner - it will return always return 0 from a headless client."}],"categories_extra":["Arma 3: Remote Execution"]},{"name":"isRemoteExecutedJIP","title":"isRemoteExecutedJIP","type":"command","url":"https://community.bistudio.com/wiki/isRemoteExecutedJIP","revid":365041,"updated":"2024-07-14T13:23:02Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"Returns true if the code context is being remote executed from the JIP queue by remoteExec or remoteExecCall (when JIP param was set). It is a subset of isRemoteExecuted:\n\n| command | Single Player | Multiplayer |  |\n|---|---|---|---|\n| command | Single Player | Direct remoteExec | JIP remoteExec |\n| isRemoteExecuted | ✗ | ✓ | ✓ |\n| isRemoteExecutedJIP | ✗ | ✗ | ✓ |","syntaxes":[{"syntax":"isRemoteExecutedJIP","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (isRemoteExecutedJIP) then\n{\n    waitUntil { sleep 0.1; not isNull player };\n    hint \"Welcome... the battlefield did not wait for you!\";\n}\nelse\n{\n    hint \"You are present and that's good!\";\n};\n```","code":["if (isRemoteExecutedJIP) then\n{\n\twaitUntil { sleep 0.1; not isNull player };\n\thint \"Welcome... the battlefield did not wait for you!\";\n}\nelse\n{\n\thint \"You are present and that's good!\";\n};"]}],"see_also":["isRemoteExecuted","remoteExec","remoteExecCall","canSuspend","remoteExecutedOwner","isUIContext","isGamePaused","isGameFocused","remoteExecutedJIPID"],"categories_extra":["Arma 3: Remote Execution"]},{"name":"isSaving","title":"isSaving","type":"command","url":"https://community.bistudio.com/wiki/isSaving","revid":369063,"updated":"2024-09-02T20:24:55Z","groups":["Mission Information"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","description":"Returns the status of autosave request, made when saveGame command is executed. When request is made, the command immediately returns true. The engine then handles the saving and when it is done, the command returns false.","syntaxes":[{"syntax":"isSaving","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true autosave request is made, false autosave request is processed"},"form":"nullary"}],"examples":[{"text":"```sqf\n0 spawn\n{\n    saveGame;\n    waitUntil { !isSaving };\n    systemChat \"Game Saving Is Done!\";\n};\n```","code":["0 spawn\n{\n\tsaveGame;\n\twaitUntil { !isSaving };\n\tsystemChat \"Game Saving Is Done!\";\n};"]}],"see_also":["saveGame","enableSaving","loadGame","savingEnabled"]},{"name":"isSensorTargetConfirmed","title":"isSensorTargetConfirmed","type":"command","url":"https://community.bistudio.com/wiki/isSensorTargetConfirmed","revid":310733,"updated":"2022-05-07T20:04:52Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Returns if given unit is confirmed target for given side.","syntaxes":[{"syntax":"unit isSensorTargetConfirmed side","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if confirmed target, otherwise false"},"form":"binary","left":{"text":"unit"},"right":{"text":"side"}}],"examples":[{"code":["private _enemyConfirmed = _possibleEnemy isSensorTargetConfirmed opfor;"]}],"see_also":["listVehicleSensors","isVehicleSensorEnabled"]},{"name":"isServer","title":"isServer","type":"command","url":"https://community.bistudio.com/wiki/isServer","revid":379427,"updated":"2026-10-31T00:05:05Z","groups":["Multiplayer"],"status":"ok","games":{"ofp":"1.99","arma1":"1.06","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.99","arma3_since":"0.50","description":"Returns true if the machine executing the command is the server in a multiplayer game or is running single player. It will return true for both dedicated and player-hosted server. See also Multiplayer Scripting/machines.","syntaxes":[{"syntax":"isServer","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (!isServer) exitWith {};"]}],"see_also":["isDedicated","isMultiplayer","hasInterface","local"],"notes":[{"user":"Igneous01","date":"2011-04-08T00:00:00Z","text":"**Before Arma 3 and server-only triggers:** You can use isServer inside the condition of a trigger to have the trigger activate only for the server. All other conditions for the trigger will be checked across all machines, but it will only activate the trigger created on the server. For example:\n\n```sqf\nthis && isServer\n```"},{"user":"Killzone_Kid","date":"2014-12-21T14:51:00Z","text":"```sqf\nif (isDedicated) then {\n    // run on dedicated server only\n};\n\nif (isServer) then {\n    // run on dedicated server or player host\n};\n\nif (hasInterface) then {\n    // run on all player clients incl. player host\n};\n\nif (!isDedicated) then {\n    // run on all player clients incl. player host and headless clients\n};\n\nif (!isServer) then {\n    // run on all player clients incl. headless clients but not player host\n};\n\nif (!hasInterface) then {\n    // run on headless clients and dedicated server\n};\n\nif (!hasInterface && !isDedicated) then {\n    // run on headless clients only\n};\n```"}]},{"name":"isShowing3DIcons","title":"isShowing3DIcons","type":"command","url":"https://community.bistudio.com/wiki/isShowing3DIcons","revid":353375,"updated":"2024-03-15T17:11:58Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns true if the editor is set to draw 3D icons.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"isShowing3DIcons map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"map"}}],"examples":[{"text":"-"}]},{"name":"isSimpleObject","title":"isSimpleObject","type":"command","url":"https://community.bistudio.com/wiki/isSimpleObject","revid":310876,"updated":"2022-05-07T20:24:10Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"Returns true if given object is simple object","syntaxes":[{"syntax":"isSimpleObject object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_isSimple = isSimpleObject _obj1;"]}],"see_also":["createSimpleObject","allSimpleObjects","nearestObjects","nearObjectsReady","nearObjects","nearestObject"]},{"name":"isSprintAllowed","title":"isSprintAllowed","type":"command","url":"https://community.bistudio.com/wiki/isSprintAllowed","revid":341802,"updated":"2023-06-24T08:22:53Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","locality":{"argument":"local"},"description":"Returns true if player is allowed to sprint","syntaxes":[{"syntax":"isSprintAllowed unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["if (not isSprintAllowed player) then { hint \"no running in the corridors!\" };"]}],"see_also":["Arma 3: Stamina","allowSprint"]},{"name":"isStaminaEnabled","title":"isStaminaEnabled","type":"command","url":"https://community.bistudio.com/wiki/isStaminaEnabled","revid":321931,"updated":"2022-05-22T12:50:06Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","locality":{"argument":"global"},"description":"Check if stamina depletion is enabled.","syntaxes":[{"syntax":"isStaminaEnabled unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["if (isStaminaEnabled player) then { hint \"You can get exhausted.\" };"]}],"see_also":["Arma 3: Stamina"]},{"name":"isSteamMission","title":"isSteamMission","type":"command","url":"https://community.bistudio.com/wiki/isSteamMission","revid":369183,"updated":"2024-09-03T10:34:45Z","groups":["Mission Information"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","description":"Returns true if the current mission is a Steam Workshop mission.","syntaxes":[{"syntax":"isSteamMission","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (isSteamMission) then\n{\n    hint \"Thank you for subscribing to my mission on Steam!\";\n}\nelse\n{\n    hint \"Thank you for downloading my mission off the Internet!\";\n};\n```","code":["if (isSteamMission) then\n{\n\thint \"Thank you for subscribing to my mission on Steam!\";\n}\nelse\n{\n\thint \"Thank you for downloading my mission off the Internet!\";\n};"]}],"see_also":["markAsFinishedOnSteam"]},{"name":"isSteamOverlayEnabled","title":"isSteamOverlayEnabled","type":"command","url":"https://community.bistudio.com/wiki/isSteamOverlayEnabled","revid":330173,"updated":"2022-08-23T12:24:04Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns true if Steam overlay is enabled, otherwise false.","syntaxes":[{"syntax":"isSteamOverlayEnabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_overlayEnabled = isSteamOverlayEnabled;"]}],"see_also":["ctrlSetURLOverlayMode","ctrlURLOverlayMode"]},{"name":"isStreamFriendlyUIEnabled","title":"isStreamFriendlyUIEnabled","type":"command","url":"https://community.bistudio.com/wiki/isStreamFriendlyUIEnabled","revid":310270,"updated":"2022-05-05T13:11:20Z","groups":["System"],"status":"ok","games":{"arma3":"0.70"},"since":"arma3 0.70","arma3_since":"0.70","description":"Returns the status of STREAM FRIENDLY UI setting in UI (OPTIONS >> GAME >> GENERAL >> STREAM FRIENDLY UI).","syntaxes":[{"syntax":"isStreamFriendlyUIEnabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["hint str isStreamFriendlyUIEnabled;"]}],"see_also":["isInstructorFigureEnabled","isTutHintsEnabled"]},{"name":"isStressDamageEnabled","title":"isStressDamageEnabled","type":"command","url":"https://community.bistudio.com/wiki/isStressDamageEnabled","revid":310782,"updated":"2022-05-07T20:21:46Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","locality":{"argument":"local","effect":"local"},"description":"Returns true if stress damage is enabled in the game settings. A getter for enableStressDamage.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"isStressDamageEnabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"Returns true if enabled, otherwise false","text":"Boolean Returns true if enabled, otherwise false"},"form":"nullary"}],"examples":[{"code":["_settingEnabled = isStressDamageEnabled;"]}],"see_also":["enableStressDamage"]},{"name":"isSwitchingWeapon","title":"isSwitchingWeapon","type":"command","url":"https://community.bistudio.com/wiki/isSwitchingWeapon","revid":376101,"updated":"2025-08-20T14:10:18Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.20"},"since":"arma3 2.20","arma3_since":"2.20","locality":{"argument":"global"},"description":"Returns wether or not the unit is in the process of switching weapon.","syntaxes":[{"syntax":"isSwitchingWeapon unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the unit is switching weapon."},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["isSwitchingWeapon player;"]}],"see_also":["primaryWeaponMagazine","primaryWeaponItems","addPrimaryWeaponItem","removePrimaryWeaponItem","removeAllPrimaryWeaponItems","secondaryWeapon","handgunWeapon","currentWeapon","weapons","primaryWeapon","setUnitLoadout"],"notes":[{"user":"OverlordZorn","date":"2025-08-20T14:10:18Z","text":"as of 2.20, this does not return true when the unit is prone"}]},{"name":"isText","title":"isText","type":"command","url":"https://community.bistudio.com/wiki/isText","revid":321182,"updated":"2022-05-13T15:18:34Z","groups":["Config"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Checks if config entry represents a text value.","syntaxes":[{"syntax":"isText config","params":[{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["_isText = isText (configFile >> \"CfgVehicles\") // false"]},{"code":["_isText = isText (configFile >> \"CfgVehicles\" >> \"B_MRAP_01_F\" >> \"displayName\") // true"]}],"see_also":["getText","getNumber","isArray","isClass","isNumber"]},{"name":"isThrowable","title":"isThrowable","type":"command","url":"https://community.bistudio.com/wiki/isThrowable","revid":369755,"updated":"2024-10-08T15:08:55Z","groups":["Weapons","Unit Inventory"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns true if the given magazine is a throwable.","syntaxes":[{"syntax":"isThrowable magazine","params":[{"name":"magazine","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if throwable"},"form":"unary","right":{"text":"magazine"}}],"examples":[{"code":["isThrowable \"HandGrenade\"; // true"]}],"see_also":["selectThrowable","currentThrowable","throwables","selectWeapon","currentWeapon","currentMagazine","currentMuzzle","BIS_fnc_isThrowable"]},{"name":"isTouchingGround","title":"isTouchingGround","type":"command","url":"https://community.bistudio.com/wiki/isTouchingGround","revid":376406,"updated":"2025-10-11T00:58:13Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns true if object is touching the ground.","syntaxes":[{"syntax":"isTouchingGround object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["if (isTouchingGround player) then { hint \"Terraferma!\" };"]},{"text":"A full \"is safely parked\" method for air, ground and water vehicles:\n\n```sqf\n// get if a vehicle is properly parked - covers e.g helicopter landed on a building, boat (beached or not) and underwater or not submarine\n// return false on null, disabled or destroyed vehicle\nprivate _isSafelyParked = {\n    params [\n        [\"_vehicle\", objNull, [objNull]],                // 0: OBJECT - vehicle - a null object returns false\n        [\"_altitudeTolerance\", 0.1, [0]],                // 1: NUMBER - altitude tolerance - in metre\n        [\"_velocityTolerance\", 0.01, [0]]                // 2: NUMBER - velocity tolerance - in km/h\n    ];\n\n    if (not canMove _vehicle) exitWith { false };        // returns false for null as well\n\n    if (_vehicle isKindOf \"Ship\") then\n    {\n        // surfaceIsWater getPosASL _vehicle                        // a beached boat is fine\n        velocity _vehicle params [\"_velX\", \"_velY\"];\n        sqrt (_velX * _velX + _velY * _velY) < _velocityTolerance    // only 2D speed matters (think waves)\n        && {\n            getPosASLW _vehicle select 2 < _altitudeTolerance                // underwater submarines are OK\n            || { getPos _vehicle select 2 < _altitudeTolerance }    // beached boat\n        };\n    }\n    else\n    {\n        // over -a- ground and not over ocean\n        (isTouchingGround _vehicle || {\n            getPosASLW _vehicle select 2 >= _altitudeTolerance        // not in water\n            && { getPos _vehicle select 2 < _altitudeTolerance }\n        })\n        && { vectorMagnitude velocity _vehicle * 3.6 < _velocityTolerance }\n    }\n};\n\nobjectParent player call _isSafelyParked;\n```","code":["// get if a vehicle is properly parked - covers e.g helicopter landed on a building, boat (beached or not) and underwater or not submarine\n// return false on null, disabled or destroyed vehicle\nprivate _isSafelyParked = {\n\tparams [\n\t\t[\"_vehicle\", objNull, [objNull]],\t\t\t\t// 0: OBJECT - vehicle - a null object returns false\n\t\t[\"_altitudeTolerance\", 0.1, [0]],\t\t\t\t// 1: NUMBER - altitude tolerance - in metre\n\t\t[\"_velocityTolerance\", 0.01, [0]]\t\t\t\t// 2: NUMBER - velocity tolerance - in km/h\n\t];\n\n\tif (not canMove _vehicle) exitWith { false };\t\t// returns false for null as well\n\n\tif (_vehicle isKindOf \"Ship\") then\n\t{\n\t\t// surfaceIsWater getPosASL _vehicle\t\t\t\t\t\t// a beached boat is fine\n\t\tvelocity _vehicle params [\"_velX\", \"_velY\"];\n\t\tsqrt (_velX * _velX + _velY * _velY) < _velocityTolerance\t// only 2D speed matters (think waves)\n\t\t&& {\n\t\t\tgetPosASLW _vehicle select 2 < _altitudeTolerance\t\t\t\t// underwater submarines are OK\n\t\t\t|| { getPos _vehicle select 2 < _altitudeTolerance }\t// beached boat\n\t\t};\n\t}\n\telse\n\t{\n\t\t// over -a- ground and not over ocean\n\t\t(isTouchingGround _vehicle || {\n\t\t\tgetPosASLW _vehicle select 2 >= _altitudeTolerance\t\t// not in water\n\t\t\t&& { getPos _vehicle select 2 < _altitudeTolerance }\n\t\t})\n\t\t&& { vectorMagnitude velocity _vehicle * 3.6 < _velocityTolerance }\n\t}\n};\n\nobjectParent player call _isSafelyParked;"]}],"see_also":["underwater"],"notes":[{"user":"AgentRev","date":"2014-06-01T01:23:00Z","text":"If you are using this command as a validation method, it should not be the sole thing you are checking for, as the result is often inaccurate.\nFor example, it returns false for some helicopters when landed on the roof of certain buildings, and it always returns false for boats, even if they are beached."},{"user":"Demellion","date":"2016-09-29T08:28:00Z","text":"In addition to previous statement: That behaviour is true, simply because isTouchingGround applied to a player unit (or any unit) is frozen to a last state when unit enters vehicle.\nTo get proper return from this command you should go for units vehicle:\n\n```sqf\n_var = isTouchingGround player;                // unreliable\n_var = isTouchingGround (vehicle player);    // pretty reliable\n```"},{"user":"Pierre MGI","date":"2016-11-10T20:57:00Z","text":"This command returns always true if the falling object is attached to some other object with the attachTo command, like for vehicle air drop with parachute."},{"user":"Gippo","date":"2017-04-26T20:02:00Z","text":"Be aware: it is not reliable on remote objects."}]},{"name":"isTurnedOut","title":"isTurnedOut","type":"command","url":"https://community.bistudio.com/wiki/isTurnedOut","revid":319215,"updated":"2022-05-13T09:23:23Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","description":"Returns true if given unit is turned out, otherwise false. The output changes to true after unit finished turning out, however will change to false almost immediately after unit is ordered to turn in.","syntaxes":[{"syntax":"isTurnedOut unit","params":[{"name":"unit","type":"Object","description":"unit on turn(in/out) enabled turret","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_commanderOut = isTurnedOut (tank turretUnit [0,0]);"]}],"see_also":["moveOut","moveInDriver","turretUnit"]},{"name":"isTutHintsEnabled","title":"isTutHintsEnabled","type":"command","url":"https://community.bistudio.com/wiki/isTutHintsEnabled","revid":310279,"updated":"2022-05-05T13:11:24Z","groups":["Difficulty"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns the status of TUTORIAL HINTS setting in UI (OPTIONS >> GAME >> GENERAL >> TUTORIAL HINTS).","syntaxes":[{"syntax":"isTutHintsEnabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["hint str isTutHintsEnabled;"]}],"see_also":["isInstructorFigureEnabled","isStreamFriendlyUIEnabled"]},{"name":"isUAVConnectable","title":"isUAVConnectable","type":"command","url":"https://community.bistudio.com/wiki/isUAVConnectable","revid":319168,"updated":"2022-05-13T09:23:18Z","groups":["Remote Control"],"status":"ok","games":{"arma3":"1.24"},"since":"arma3 1.24","arma3_since":"1.24","description":"Returns true if UAV is connectable by AV terminal(s).","syntaxes":[{"syntax":"object isUAVConnectable [uav, checkAllItems]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"uav","type":"Object or Array","type_expr":"Object | Array"},{"name":"checkAllItems","type":"Boolean","description":"true to check all terminals in unit's inventory, false to only check assigned terminal.","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"object"},"right":{"text":"[uav, checkAllItems]"}}],"examples":[{"code":["private _canConnect = myUnit isUAVConnectable [myUav, true];"]}],"see_also":["enableUAVConnectability","disableUAVConnectability"]},{"name":"isUAVConnected","title":"isUAVConnected","type":"command","url":"https://community.bistudio.com/wiki/isUAVConnected","revid":378863,"updated":"2026-07-27T13:47:06Z","groups":["Remote Control"],"status":"ok","games":{"arma3":"0.76"},"since":"arma3 0.76","arma3_since":"0.76","locality":{"argument":"global","effect":"local"},"description":"Returns true if UAV is connected to some terminal. Terminal connection is handled locally, therefore the result of this command will be returned only for the client on which this command is executed.","syntaxes":[{"syntax":"isUAVConnected uav","params":[{"name":"uav","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"uav"}}],"examples":[{"code":["_isConnected = isUAVConnected cursorTarget;"]}],"see_also":["showUAVFeed","shownUAVFeed","allUnitsUAV","getConnectedUAV","UAVControl","connectTerminalToUAV"]},{"name":"isUIContext","title":"isUIContext","type":"command","url":"https://community.bistudio.com/wiki/isUIContext","revid":310464,"updated":"2022-05-06T10:49:54Z","groups":["GUI Control","Program Flow"],"status":"ok","games":{"arma3":"1.76"},"since":"arma3 1.76","arma3_since":"1.76","description":"Returns true if the script originated from some UI control event, for example from \"onButtonDown\" EH. Exists within parent scope and immediate child scopes.","syntaxes":[{"syntax":"isUIContext","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (isUIContext) then { hint \"UI control event\" };"]},{"code":["_button ctrlSetEventHandler [\"ButtonDown\", \"call { diag_log isUIContext }\"]; // outputs true"]},{"code":["_button ctrlSetEventHandler [\"ButtonDown\", \"0 spawn { diag_log isUIContext }\"]; // outputs false"]}],"see_also":["canSuspend","isRemoteExecuted","isRemoteExecutedJIP","isGamePaused","isGameFocused","serverCommand"]},{"name":"isUniformAllowed","title":"isUniformAllowed","type":"command","url":"https://community.bistudio.com/wiki/isUniformAllowed","revid":319160,"updated":"2022-05-13T09:23:17Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","locality":{"argument":"global"},"description":"Check whether given uniform can be dressed by target soldier.","syntaxes":[{"syntax":"unit isUniformAllowed type","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"type","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"unit"},"right":{"text":"type"}}],"examples":[{"code":["_canUse = _unit isUniformAllowed \"U_B_CombatUniform_mcam\";"]}],"see_also":["addUniform","forceAddUniform","removeUniform","uniform"]},{"name":"isUsingAISteeringComponent","title":"isUsingAISteeringComponent","type":"command","url":"https://community.bistudio.com/wiki/isUsingAISteeringComponent","revid":369751,"updated":"2024-10-08T15:08:54Z","groups":["AI Behaviour"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns whether the AI steering component setting is enabled globally.","syntaxes":[{"syntax":"isUsingAISteeringComponent","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (isUsingAISteeringComponent) then\n{\n    useAISteeringComponent false;\n};\n```","code":["if (isUsingAISteeringComponent) then\n{\n\tuseAISteeringComponent false;\n};"]}],"see_also":["useAISteeringComponent","isAISteeringComponentEnabled"]},{"name":"isVehicleCargo","title":"isVehicleCargo","type":"command","url":"https://community.bistudio.com/wiki/isVehicleCargo","revid":349517,"updated":"2023-11-08T17:15:53Z","groups":["Vehicle in Vehicle Transport"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Despite a misleading name, returns the vehicle that is transporting given vehicle in cargo. If the given vehicle is not in vehicle cargo, objNull is returned.","syntaxes":[{"syntax":"isVehicleCargo cargo","params":[{"name":"cargo","type":"Object","description":"vehicle in cargo","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"transporting vehicle"},"form":"unary","right":{"text":"cargo"}}],"examples":[{"text":"Blackfish with given variable name blackfish, with a vehicle inside called quad\n\n```sqf\n_transportingVehicle = isVehicleCargo quad; //returns blackfish\n```","code":["_transportingVehicle = isVehicleCargo quad; //returns blackfish"]},{"text":"Vehicle called quad that is not being transported as cargo\n\n```sqf\n_transportingVehicle = isVehicleCargo quad; //returns objNull\n```","code":["_transportingVehicle = isVehicleCargo quad; //returns objNull"]}],"see_also":["Arma 3: Vehicle in Vehicle Transport","canVehicleCargo","setVehicleCargo","enableVehicleCargo","getVehicleCargo","vehicleCargoEnabled"]},{"name":"isVehicleRadarOn","title":"isVehicleRadarOn","type":"command","url":"https://community.bistudio.com/wiki/isVehicleRadarOn","revid":310732,"updated":"2022-05-07T20:04:21Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Returns true if vehicle has active sensors on.","syntaxes":[{"syntax":"isVehicleRadarOn vehicle","params":[{"name":"vehicle","type":"Object","description":"vehicle on which check is performed","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["isVehicleRadarOn vehicle player; // returns true if radar is turned on"]}],"see_also":["setVehicleRadar"]},{"name":"isVehicleSensorEnabled","title":"isVehicleSensorEnabled","type":"command","url":"https://community.bistudio.com/wiki/isVehicleSensorEnabled","revid":363162,"updated":"2024-03-24T17:32:35Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Returns class name (to identify list based on component name) and info if given sensor is enabled.","syntaxes":[{"syntax":"vehicle isVehicleSensorEnabled componentName","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"componentName","type":"String","description":"the component's name (can either be it is \"real name\" or it is className)","type_expr":"String","text":"componentName : String - the component's name (can either be it is \"real name\" or it is className)"}],"returns":{"type":"Array","type_expr":"Array"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"componentName"}}],"examples":[{"code":["vehicle player isVehicleSensorEnabled \"PassiveRadarSensorComponent\"; // [[\"PassiveRadarSensorComponent\", true]]"]}],"see_also":["listVehicleSensors","enableVehicleSensor"]},{"name":"isWalking","title":"isWalking","type":"command","url":"https://community.bistudio.com/wiki/isWalking","revid":364111,"updated":"2024-05-04T22:02:54Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns true if walk is **toggled** (default <kbd>W</kbd> + <kbd>S</kbd> in Arma 3).\n\n> [!NOTE]\n> This command can still return true when the unit is sprinting or stopped; it only returns the **toggle** value of walking, not if the unit is walking right now.","syntaxes":[{"syntax":"isWalking unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["_bool = isWalking player;"]}],"see_also":["forceWalk","isForcedWalk","forceSpeed","getSpeed"],"notes":[{"user":"Benargee","date":"2015-03-08T21:03:00Z","text":"To expand on the limited description, this command doesn't necessarily say whether or not the unit is currently walking. All it says is that walking is toggled on or off.\nThis command can still return true when the unit is sprinting. When walking is toggled on, the unit will return to walking pace when not sprinting.\nWhen walking is toggled off, the unit will return to jogging pace when not sprinting. This command is not intended to gauge a units current movement speed."}]},{"name":"isWeaponDeployed","title":"isWeaponDeployed","type":"command","url":"https://community.bistudio.com/wiki/isWeaponDeployed","revid":321095,"updated":"2022-05-13T13:54:06Z","groups":["Weapons"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","locality":{"argument":"global"},"description":"Returns true if weapon is currently deployed.","syntaxes":[{"syntax":"isWeaponDeployed unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unit"}},{"syntax":"isWeaponDeployed [unit, onGround]","since":"arma3 2.06","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"onGround","type":"Boolean","optional":true,"description":"true to check if deployed on ground, false to check if deployed on object. Omitted - same as main syntax.","type_expr":"Boolean","text":"onGround: Boolean - (Optional) true to check if deployed on ground, false to check if deployed on object. Omitted - same as main syntax."}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"[unit, onGround]"}}],"examples":[{"code":["_dep = isWeaponDeployed player;"]},{"code":["_depOnObj = isWeaponDeployed [player, false];"]}],"see_also":["isWeaponRested","canDeployWeapon"],"notes":[{"user":"AgentRev","date":"2015-07-01T16:44:00Z","text":"You can force a unit out of bipod or resting with:\n\n```sqf\n_unit playMove \"\";\n```"},{"user":"Beno 83au","date":"2017-03-04T03:58:00Z","text":"playMove, as well as switchMove, appears to not work when forcing a player out of being deployed. A more reliable method is:\n\n```sqf\n_player setPos (_player modelToWorld [0,0,0]);\n```"}]},{"name":"isWeaponRested","title":"isWeaponRested","type":"command","url":"https://community.bistudio.com/wiki/isWeaponRested","revid":379361,"updated":"2026-10-30T23:56:16Z","groups":["Weapons"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","locality":{"argument":"local"},"description":"Returns true if weapon is currently rested.","syntaxes":[{"syntax":"isWeaponRested unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_rest = isWeaponRested player;"]}],"see_also":["isWeaponDeployed","canDeployWeapon"],"notes":[{"user":"AgentRev","date":"2015-07-01T16:44:00Z","text":"You can force a unit out of bipod or resting with:\n\n```sqf\n_unit playMove \"\";\n```"},{"user":"Killzone_Kid","date":"2015-07-12T11:00:00Z","text":"As of 1.49\n\n```sqf\nisWeaponRested player;\n```\n\nis the only current use of this command. You cannot detect remote player and you cannot detect local unit that is not a player. Might as well be a nullar command without argument."}]},{"name":"itemCargo","title":"itemCargo","type":"command","url":"https://community.bistudio.com/wiki/itemCargo","revid":376929,"updated":"2025-12-31T20:24:50Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Get array with items from ammo box (or any general weapon holder container).","syntaxes":[{"syntax":"itemCargo object","params":[{"name":"object","type":"Object","description":"vehicle or ammo box","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"[\"ItemType1\",\"ItemType2\",\"ItemType3\"...]"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["hint str itemCargo vestContainer player;"]}],"see_also":["getItemCargo","addItemCargo","addItemCargoGlobal","clearItemCargo","clearItemCargoGlobal","weaponCargo","magazineCargo"]},{"name":"items","title":"items","type":"command","url":"https://community.bistudio.com/wiki/items","revid":377151,"updated":"2026-01-01T10:36:00Z","groups":["Unit Inventory"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns an array of names of all unit's stored items, including weapons but excluding magazines (see itemsWithMagazines) and assignedItems.","syntaxes":[{"syntax":"items unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_itemsPlayer = items player;"]},{"code":["player sideChat format [\"%1\", items player];"]}],"see_also":["itemsWithMagazines","assignedItems","primaryWeaponItems","secondaryWeaponItems","backpacks"],"notes":[{"user":"comp_uter15776","date":"2022-01-19T16:01:04Z","text":"When using **items** on a player; any equipped primary/secondary weapon/launchers, as well as certain throwables i.e. chemlights, smokes, grenades etc. are *not* returned.\nFor weapons and launchers that aren't stored inside a uniform, backpack or vest use **weaponsItems**. For throwables use **magazines**."}]},{"name":"itemsWithMagazines","title":"itemsWithMagazines","type":"command","url":"https://community.bistudio.com/wiki/itemsWithMagazines","revid":377150,"updated":"2026-01-01T10:35:45Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","locality":{"argument":"global"},"description":"Returns combined array including all unit's stored items and all unit's stored magazines and all unit's **stored** weapons. Loaded magazines such as currentMagazine, primaryWeaponMagazine, secondaryWeaponMagazine, handgunMagazine, binocularMagazine as well as assignedItems are excluded.","syntaxes":[{"syntax":"itemsWithMagazines unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"```sqf\nprivate _res1 = itemsWithMagazines player;\n// ... is essentially the same as ...\nprivate _res2 = items player + magazines player;\n```\n\nExample result:\n\n```sqf\n[\n    \"FirstAidKit\",            //item\n    \"30Rnd_65x39_caseless_mag\",    //magazine\n    \"16Rnd_9x21_Mag\",        //magazine\n    \"Chemlight_green\",        //magazine\n    \"HandGrenade\",            //magazine\n    \"ToolKit\",                //item\n    \"MineDetector\"            //item\n]\n```","code":["private _res1 = itemsWithMagazines player;\n// ... is essentially the same as ...\nprivate _res2 = items player + magazines player;","[\n\t\"FirstAidKit\",\t\t\t//item\n\t\"30Rnd_65x39_caseless_mag\",\t//magazine\n\t\"16Rnd_9x21_Mag\",\t\t//magazine\n\t\"Chemlight_green\",\t\t//magazine\n\t\"HandGrenade\",\t\t\t//magazine\n\t\"ToolKit\",\t\t\t\t//item\n\t\"MineDetector\"\t\t\t//item\n]"]}],"see_also":["items","removeAllItemsWithMagazines","backpacks"]},{"name":"join","title":"join","type":"command","url":"https://community.bistudio.com/wiki/join","revid":377820,"updated":"2026-01-03T04:19:29Z","groups":["Groups"],"status":"ok","games":{"ofp":"1.34","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.34","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"| Maximum number of<br>units per group |  |\n|---|---|\n| Operation Flashpoint | 12 |\n| Later titles | 10000+ |\n\nJoins units into a given Group.\n\nTo make a unit leave its current group, join it into grpNull (e.g. `[MyUnit] join grpNull`) - but beware: A new group is created for the leaving unit; this could result in the number of groups growing out of control.","syntaxes":[{"syntax":"unitArray join group","params":[{"name":"unitArray","type":"Array of Objects","description":"units to join group","type_expr":"Array<Object>"},{"name":"group","type":"Group or Object","type_expr":"Group | Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitArray"},"right":{"text":"group"}}],"examples":[{"code":["[_unitOne, _unitTwo] join player;"]},{"code":["[_unitOne, _unitTwo] join (group player);"]}],"see_also":["joinAs","joinAsSilent","joinSilent","group","leader","doFollow"]},{"name":"joinAs","title":"joinAs","type":"command","url":"https://community.bistudio.com/wiki/joinAs","revid":330016,"updated":"2022-08-15T14:38:07Z","groups":["Groups"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Joins the unit to the given group, if position id is available, this one is used.","syntaxes":[{"syntax":"unit joinAs [group, id]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"group","type":"Group","type_expr":"Group"},{"name":"id","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[group, id]"}}],"examples":[{"code":["player joinAs [_group, 4];"]},{"text":"To get the position id:\n\n```sqf\ngetUnitPositionId = {\n    private [\"_vvn\", \"_str\"];\n    _vvn = vehicleVarName _this;\n    _this setVehicleVarName \"\";\n    _str = str _this;\n    _this setVehicleVarName _vvn;\n    parseNumber (_str select [(_str find \":\") + 1])\n};\nplayer joinAs [createGroup west, 5];\n_id = player call getUnitPositionId;\nhint str _id; // 5\n```","code":["getUnitPositionId = {\n\tprivate [\"_vvn\", \"_str\"];\n\t_vvn = vehicleVarName _this;\n\t_this setVehicleVarName \"\";\n\t_str = str _this;\n\t_this setVehicleVarName _vvn;\n\tparseNumber (_str select [(_str find \":\") + 1])\n};\nplayer joinAs [createGroup west, 5];\n_id = player call getUnitPositionId;\nhint str _id; // 5"]}],"see_also":["join","joinAsSilent","joinSilent","group"]},{"name":"joinAsSilent","title":"joinAsSilent","type":"command","url":"https://community.bistudio.com/wiki/joinAsSilent","revid":330017,"updated":"2022-08-15T14:39:44Z","groups":["Groups"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Joins the unit to the given group, if position id is available, this one is used. Avoid any radio communication related to joining.","syntaxes":[{"syntax":"unit joinAsSilent [group, id]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"group","type":"Group","type_expr":"Group"},{"name":"id","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[group, id]"}}],"examples":[{"code":["player joinAsSilent [_group, 4];"]},{"text":"To get the position id:\n\n```sqf\ngetUnitPositionId = {\n    private [\"_vvn\", \"_str\"];\n    _vvn = vehicleVarName _this;\n    _this setVehicleVarName \"\";\n    _str = str _this;\n    _this setVehicleVarName _vvn;\n    parseNumber (_str select [(_str find \":\") + 1])\n};\nplayer joinAsSilent [createGroup west, 5];\n_id = player call getUnitPositionId;\nhint str _id; // 5\n```","code":["getUnitPositionId = {\n\tprivate [\"_vvn\", \"_str\"];\n\t_vvn = vehicleVarName _this;\n\t_this setVehicleVarName \"\";\n\t_str = str _this;\n\t_this setVehicleVarName _vvn;\n\tparseNumber (_str select [(_str find \":\") + 1])\n};\nplayer joinAsSilent [createGroup west, 5];\n_id = player call getUnitPositionId;\nhint str _id; // 5"]}],"see_also":["join","joinAs","joinSilent"],"notes":[{"user":"Mach1723","date":"2010-12-30T04:41:00Z","text":"I have not done a thorough test but this function doesn't seem to work for Civilians, use joinSilent instead."}]},{"name":"joinSilent","title":"joinSilent","type":"command","url":"https://community.bistudio.com/wiki/joinSilent","revid":379362,"updated":"2026-10-30T23:56:24Z","groups":["Groups"],"status":"ok","games":{"arma1":"1.06","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.06","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Join all units in the array to given group silently (without radio message). To have a group member leave a group, join him with the grpNull group (e.g. `[guy1] joinSilent grpNull`), but **beware**, as brand new group is created for the leaving unit and this could result in the number of groups in a mission growing out of control.","syntaxes":[{"syntax":"unitArray joinSilent group","params":[{"name":"unitArray","type":"Array of Objects","description":"units to join group","type_expr":"Array<Object>"},{"name":"group","type":"Object or Group","type_expr":"Object | Group"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitArray"},"right":{"text":"group"}}],"examples":[{"code":["[_unitOne, _unitTwo] joinSilent (group player);"]},{"code":["[_unitOne, _unitTwo] joinSilent player;"]}],"see_also":["join","joinAs","joinAsSilent","group","leader","doFollow"],"notes":[{"user":"ThorViking","date":"2014-08-04T23:22:00Z","text":"If all units of a group are joined to another group then the first group will be NULL-group afterward."},{"user":"Leopard20","date":"2022-02-17T12:22:29Z","text":"If the group is the same as the current group, the command will act similar to `Return To Formation` command. It is more strong than doFollow (doFollow doesn't work with player-issued commands, i.e via the commanding menu keys):\n\n```sqf\n[_unit] joinSilent group _unit; // return to formation\n```\n\nNote that the group must have **at least 2 units**, and not all units should be joined at once, otherwise the group will temporarily become empty and all its waypoints **will be lost**!"}]},{"name":"joinString","title":"joinString","type":"command","url":"https://community.bistudio.com/wiki/joinString","revid":377091,"updated":"2026-01-01T09:48:22Z","groups":["Strings"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","description":"Joins *array* into String with provided *separator*. Array can be of mixed types, all elements will be converted to String prior to joining, but the fastest operation is on the array of Strings.","syntaxes":[{"syntax":"array joinString separator","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"separator","type":"String","description":"separator used to join array elements.","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"array"},"right":{"text":"separator"}}],"examples":[{"code":["_str = \"- This, is a sample string.\" splitString \"-,. \"; // [\"This\",\"is\",\"a\",\"sample\",\"string\"]\n_str joinString \" \"; // \"This is a sample string\""]},{"code":["[\"This\",\"is\",\"sparta\"] joinString \" ~ \"; // \"This ~ is ~ sparta\""]},{"code":["[\"1\",2,text \"3\"] joinString \"\"; // \"123\""]},{"code":["\"Japa is the best!\" splitString \"\" joinString \" \"; // \"J a p a   i s   t h e   b e s t !\""]},{"text":"Remove all \\r\\n from file:\n\n```sqf\nloadFile \"somefile.txt\" splitString toString [13,10] joinString \" \"\n```","code":["loadFile \"somefile.txt\" splitString toString [13,10] joinString \" \""]}],"see_also":["splitString","set","resize","reverse","select","in","find","toArray","forEach","count","deleteAt","deleteRange","append","sort","param","params","arrayIntersect","toString","endl"]},{"name":"kbAddDatabase","title":"kbAddDatabase","type":"command","url":"https://community.bistudio.com/wiki/kbAddDatabase","revid":322954,"updated":"2022-06-28T21:42:49Z","groups":["Conversations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Register knowledge base database to given person. See Conversations for more details.\n\n> [!IMPORTANT]\n> This command is no longer available in Arma 2 and Arma 3.","syntaxes":[{"syntax":"person kbAddDatabase fileName","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"fileName","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"person"},"right":{"text":"fileName"}}],"examples":[{"code":["_hasBeenAdded = _unit kbAddDatabase \"chat.txt\";"]}],"see_also":["Conversations","kbAddTopic","kbHasTopic","kbTell","kbWasSaid","kbReact","kbRemoveTopic","kbAddDatabaseTargets","FSM","FSM Editor"]},{"name":"kbAddDatabaseTargets","title":"kbAddDatabaseTargets","type":"command","url":"https://community.bistudio.com/wiki/kbAddDatabaseTargets","revid":322928,"updated":"2022-06-28T21:42:40Z","groups":["Conversations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Register target list knowledge base database to given person. See Conversations for more details.\n\n> [!IMPORTANT]\n> This command is no longer available in Arma 2 and Arma 3.","syntaxes":[{"syntax":"person kbAddDatabaseTargets fileName","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"fileName","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"person"},"right":{"text":"fileName"}}],"examples":[{"code":["_hasBeenAdded = _unit kbAddDatabaseTargets \"chat.txt\";"]}],"see_also":["Conversations","kbAddTopic","kbHasTopic","kbTell","kbWasSaid","kbReact","kbRemoveTopic","kbAddDatabase","FSM","FSM Editor"]},{"name":"kbAddTopic","title":"kbAddTopic","type":"command","url":"https://community.bistudio.com/wiki/kbAddTopic","revid":353355,"updated":"2024-03-15T17:11:55Z","groups":["Conversations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Register conversation topic to given person. See Conversations for more details.\n\n> [!NOTE]\n> Only the speaker(s) need to have the topic added.","syntaxes":[{"syntax":"person kbAddTopic [topicName, conversationFile, fsmFile, eventHandler]","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"topicName","type":"String","description":"the topic id for further reference","type_expr":"String"},{"name":"conversationFile","type":"String","description":".bikb file path","type_expr":"String"},{"name":"fsmFile","type":"String","optional":true,"description":".fsm file path. Receives the following parameters:\n\n- **_sentenceId:** the sentence as defined in the .bikb file\n- **_topic:** TopicName registered via kbAddTopic\n- **_this:** the person that was talked to (receiver)\n- **_from:** the person that talked to the receiver and triggered the script","type_expr":"String","text":"fsmFile: String - (Optional) .fsm file path. Receives the following parameters:\n\n- **_sentenceId:** the sentence as defined in the .bikb file\n- **_topic:** TopicName registered via kbAddTopic\n- **_this:** the person that was talked to (receiver)\n- **_from:** the person that talked to the receiver and triggered the script"},{"name":"eventHandler","type":"Code or String","optional":true,"description":"code to execute - given String will be compiled. This is **not** an sqf file path.\nParameters: identical to *fsmFile* - see above.","type_expr":"Code | String","text":"eventHandler: Code or String - (Optional) code to execute - given String will be compiled. This is **not** an sqf file path.\nParameters: identical to *fsmFile* - see above."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"[topicName, conversationFile, fsmFile, eventHandler]"}}],"examples":[{"code":["player kbAddTopic [\"myTest\", \"myTest.bikb\", \"myTest.fsm\", compile preprocessFileLineNumbers \"myTest.sqf\"];"]},{"code":["player kbAddTopic [\"itsGettingWarm\", \"weatherTalk.bikb\"];"]}],"see_also":["Conversations","kbHasTopic","kbTell","kbWasSaid","kbReact","kbRemoveTopic","kbAddDatabase","kbAddDatabaseTargets","FSM","FSM Editor"]},{"name":"kbHasTopic","title":"kbHasTopic","type":"command","url":"https://community.bistudio.com/wiki/kbHasTopic","revid":319151,"updated":"2022-05-13T09:23:15Z","groups":["Conversations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local"},"description":"Check if conversation topic was registered to given person. See Conversations for more details.","syntaxes":[{"syntax":"person kbHasTopic topicName","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"topicName","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"person"},"right":{"text":"topicName"}}],"examples":[{"code":["_obiHasTopic = player kbHasTopic \"helloThereGeneralK\";"]},{"code":["if (player kbHasTopic \"dontShoot\") then { player kbRemoveTopic \"dontShoot\"; };"]}],"see_also":["Conversations","kbAddTopic","kbTell","kbReact","kbRemoveTopic","kbAddDatabase","kbAddDatabaseTargets","FSM","FSM Editor"]},{"name":"kbReact","title":"kbReact","type":"command","url":"https://community.bistudio.com/wiki/kbReact","revid":351315,"updated":"2023-11-27T04:58:35Z","groups":["Conversations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Pass a non-verbal communication to the receiver. This command does **as if** the sentence was said and triggers the reaction scripts (AI FSM or player's conversation EH). See Conversations for more details.","syntaxes":[{"syntax":"person kbReact [receiver, topicName, sentenceID, argumentArray1, argumentArray2, ...]","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"receiver","type":"Object","type_expr":"Object"},{"name":"topicName","type":"String","type_expr":"String"},{"name":"sentenceID","type":"String","type_expr":"String"},{"name":"argumentArrayN","type":"Array","optional":true,"description":"in format [argumentName, argumentValue, argumentText, argumentSpeech]:\n\n- argumentName: String\n- argumentValue: Code\n- argumentText: String\n- argumentSpeech: Array of Strings - each string is an already defined word in config.","type_expr":"Array","text":"argumentArrayN: Array - (Optional) in format [argumentName, argumentValue, argumentText, argumentSpeech]:\n\n- argumentName: String\n- argumentValue: Code\n- argumentText: String\n- argumentSpeech: Array of Strings - each string is an already defined word in config."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"[receiver, topicName, sentenceID, argumentArray1, argumentArray2, ...]"}}],"examples":[{"code":["// will trigger AS IF unit1 said the sentence (via kbTell)\n// unit2's FSM will react accordingly.\nunit1 kbReact [unit2, \"topicName\", \"speech1\"];"]}],"see_also":["Conversations","kbAddTopic","kbHasTopic","kbTell","kbWasSaid","kbRemoveTopic","kbAddDatabase","kbAddDatabaseTargets","FSM","FSM Editor"]},{"name":"kbRemoveTopic","title":"kbRemoveTopic","type":"command","url":"https://community.bistudio.com/wiki/kbRemoveTopic","revid":319147,"updated":"2022-05-13T09:23:16Z","groups":["Conversations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Unregister conversation topic from given person. See Conversations for more details.","syntaxes":[{"syntax":"person kbRemoveTopic topicName","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"topicName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"topicName"}}],"examples":[{"code":["_unit1 kbRemoveTopic \"howsTheWeather\";"]}],"see_also":["Conversations","kbAddTopic","kbHasTopic","kbTell","kbReact","kbAddDatabase","kbAddDatabaseTargets","FSM","FSM Editor"]},{"name":"kbTell","title":"kbTell","type":"command","url":"https://community.bistudio.com/wiki/kbTell","revid":369397,"updated":"2024-09-03T18:43:19Z","groups":["Conversations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Make the person tell to the receiver the sentence. See Conversations for more details.","syntaxes":[{"syntax":"person kbTell [receiver, topicName, sentenceClass, argumentArray1, argumentArray2, ..., forceRadio]","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"receiver","type":"Object","type_expr":"Object"},{"name":"topicName","type":"String","type_expr":"String"},{"name":"sentenceClass","type":"String","type_expr":"String"},{"name":"argumentArrayN","type":"Array","optional":true,"description":"format [argumentName, argumentValue, argumentText, argumentSpeech]:\n\n- argumentName: String\n- argumentValue: Code\n- argumentText: String\n- argumentSpeech: Array of Strings - each string is an already defined word in config.","type_expr":"Array","text":"argumentArrayN: Array - (Optional) format [argumentName, argumentValue, argumentText, argumentSpeech]:\n\n- argumentName: String\n- argumentValue: Code\n- argumentText: String\n- argumentSpeech: Array of Strings - each string is an already defined word in config."},{"name":"forceRadio","type":"Boolean, Number or String (last value of the array)","optional":true,"description":"Boolean true/false to force use of radio\n- Number 1-10 to force use of custom radio channel\n- String name of radio channel to use, from: 'GLOBAL', 'SIDE', 'GROUP', 'VEHICLE', 'DIRECT', 'COMMAND'","type_expr":"Boolean | Number | String","text":"forceRadio: Boolean, Number or String (*last value of the array*) - (Optional)\n\n- Boolean true/false to force use of radio\n- Number 1-10 to force use of custom radio channel\n- String name of radio channel to use, from: 'GLOBAL', 'SIDE', 'GROUP', 'VEHICLE', 'DIRECT', 'COMMAND'"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"[receiver, topicName, sentenceClass, argumentArray1, argumentArray2, ..., forceRadio]"}}],"examples":[{"code":["player kbTell [BIS_HQ, \"myTopic\", \"playerSentence1\"];"]},{"text":"```sqf\nplayer kbTell [\n    BIS_HQ,                                        // to\n    \"Airstrike\",                                // topic\n    \"AirstrikeRequest\",                            // sentence\n    [\"Team\", {}, \"Anvil\", [\"Anvil\"]],            // argument 1\n    [\"Location\", {}, \"Strelka\", [\"Strelka\"]],    // argument 2\n    true];                                        // use radio\n```\n\nin given .bikb:\n\n```cpp\nclass AirstrikeRequest\n{\n    text = \"%team requesting close air support at grid %location \";\n    speech[] = { %Team, RequestingCloseAirSupportAtGrid, %Location };\n    class Arguments\n    {\n        class Team        { type = \"simple\"; };\n        class Location    { type = \"simple\"; };\n    };\n};\n```","code":["player kbTell [\n\tBIS_HQ,\t\t\t\t\t\t\t\t\t\t// to\n\t\"Airstrike\",\t\t\t\t\t\t\t\t// topic\n\t\"AirstrikeRequest\",\t\t\t\t\t\t\t// sentence\n\t[\"Team\", {}, \"Anvil\", [\"Anvil\"]],\t\t\t// argument 1\n\t[\"Location\", {}, \"Strelka\", [\"Strelka\"]],\t// argument 2\n\ttrue];\t\t\t\t\t\t\t\t\t\t// use radio"]},{"text":"```sqf\nplayer kbTell [\n    BIS_HQ,                                        // to\n    \"Airstrike\",                                // topic\n    \"AirstrikeRequest\",                            // sentence\n    [\"argumentName\", argumentValue],            // argument 1\n    true];                                        // use radio\n```","code":["player kbTell [\n\tBIS_HQ,\t\t\t\t\t\t\t\t\t\t// to\n\t\"Airstrike\",\t\t\t\t\t\t\t\t// topic\n\t\"AirstrikeRequest\",\t\t\t\t\t\t\t// sentence\n\t[\"argumentName\", argumentValue],\t\t\t// argument 1\n\ttrue];\t\t\t\t\t\t\t\t\t\t// use radio"]}],"problems":"Two units cannot talk on the same channel at the same time, this can lead to weird effects for non-local listeners; make sure not to use the same channel at the same time in multiplayer. Custom channels are considered as one channel for this matter.","see_also":["Conversations","kbAddTopic","kbHasTopic","kbReact","kbRemoveTopic","kbAddDatabase","kbAddDatabaseTargets","FSM","FSM Editor"]},{"name":"kbWasSaid","title":"kbWasSaid","type":"command","url":"https://community.bistudio.com/wiki/kbWasSaid","revid":330038,"updated":"2022-08-15T15:23:07Z","groups":["Conversations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Check if given item was said by person to someone. See Conversations for more details.","syntaxes":[{"syntax":"person kbWasSaid [receiver, topic, sentenceID, maxAge]","params":[{"name":"person","type":"Object","description":"who said the item","type_expr":"Object"},{"name":"receiver","type":"Object","description":"receiver of the sentence","type_expr":"Object"},{"name":"topic","type":"String","description":"name of the topic used in kbAddTopic","type_expr":"String"},{"name":"sentenceID","type":"String","description":"id of sentence that we want to check","type_expr":"String"},{"name":"maxAge","type":"Number","description":"time in seconds. kbWasSaid will check whether the sentence was said in last **max. age** seconds","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"person"},"right":{"text":"[receiver, topic, sentenceID, maxAge]"}}],"examples":[{"code":["player kbWasSaid [otherUnit, \"myTopic\", \"mySentenceID\", 3];"]}],"see_also":["Conversations","kbAddTopic","kbHasTopic","kbTell","kbReact","kbRemoveTopic","kbAddDatabase","kbAddDatabaseTargets","FSM","FSM Editor"]},{"name":"keyImage","title":"keyImage","type":"command","url":"https://community.bistudio.com/wiki/keyImage","revid":338908,"updated":"2023-04-17T14:33:23Z","groups":["System"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Returns a structured text, containing an image or name (if no image is found) of the button, on the keyboard, mouse or joystick, with the given code.","syntaxes":[{"syntax":"keyImage dikCode","params":[{"name":"dikCode","type":"Number or Arma 3 v2.08 String","type_expr":"Number | String"}],"returns":{"type":"Structured Text","type_expr":"Structured Text"},"form":"unary","right":{"text":"dikCode"}}],"examples":[{"code":["_image = keyImage 28; // result is \"Enter\""]},{"text":"From Arma 3 v2.08:\n\n```sqf\n_image = keyImage \"-1660944350\"; // result is \"Right Ctrl+G\"\n```","code":["_image = keyImage \"-1660944350\"; // result is \"Right Ctrl+G\""]}],"see_also":["keyName","actionKeys","actionKeysImages","actionKeysNames","actionKeysNamesArray","DIK KeyCodes"]},{"name":"keyName","title":"keyName","type":"command","url":"https://community.bistudio.com/wiki/keyName","revid":338910,"updated":"2023-04-17T14:36:36Z","groups":["System"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Returns the name of a button with extra quotation marks (on the keyboard, mouse or joystick) with the given code.","syntaxes":[{"syntax":"keyName dikCode","params":[{"name":"dikCode","type":"Number or Arma 3 v2.08 String","type_expr":"Number | String"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"dikCode"}}],"examples":[{"code":["_name = keyName 28; // result is \"\"\"Enter\"\"\""]},{"text":"From Arma 3 v2.08:\n\n```sqf\nprivate _name = keyName \"-1660944350\"; // result is \"\"\"Right Ctrl+G\"\"\"\n```","code":["private _name = keyName \"-1660944350\"; // result is \"\"\"Right Ctrl+G\"\"\""]}],"see_also":["keyImage","actionKeys","actionKeysImages","actionKeysNames","actionKeysNamesArray","DIK KeyCodes"],"notes":[{"user":"POLPOX","date":"2020-04-28T15:10:00Z","text":"The return value is different per keyboard/IME settings."}]},{"name":"keys","title":"keys","type":"command","url":"https://community.bistudio.com/wiki/keys","revid":377092,"updated":"2026-01-01T09:48:45Z","groups":["HashMap"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Retrieves a list of all keys in a HashMap.","syntaxes":[{"syntax":"keys hashMap","params":[{"name":"hashMap","type":"HashMap","type_expr":"HashMap","text":"hashMap : HashMap"}],"returns":{"type":"Array of Anything","type_expr":"Array<Anything>","description":"array of all keys in the HashMap"},"form":"unary","right":{"text":"hashMap"}}],"examples":[{"code":["keys _myHashMap;"]}],"see_also":["HashMap","values","toArray"]},{"name":"knowsAbout","title":"knowsAbout","type":"command","url":"https://community.bistudio.com/wiki/knowsAbout","revid":347557,"updated":"2023-09-28T09:45:05Z","groups":["Object Manipulation","Sides"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local"},"description":"Checks if a group or a side knows about target.\n\n- Enemy knowledge is instantly shared among the group units\n- Units in the same group always perfectly know about each others\n- AI knowledge cannot check beyond current viewDistance and it resets to zero as soon as the target's distance is over it\n  Note: neither fog nor daylight affect this behaviour\n- Losing sight of a target for more than 120 seconds resets its knowsAbout to zero as well\n- **Magic number** is the value that must be reached for a unit to shoot at an enemy (used by \"Detected by\" triggers as well):\n\n|  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|\n| Game | Operation Flashpoint v1.46 | Operation Flashpoint: Resistance v1.96 | Armed Assault v1.18 | Arma 2 v1.11 | Arma 2: Operation Arrowhead v1.62 | Arma 3 v1.82 |\n| Magic value | 0.7 | 0.105 | ? | ? | ? | ? |","syntaxes":[{"syntax":"who knowsAbout target","params":[{"name":"who","type":"Object, Group or Side","description":"if a unit, unit's group is considered; if a vehicle, vehicle commander's group is used.","type_expr":"Object | Group | Side"},{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"in range of 0..4, where 4 is maximum knowledge."},"form":"binary","left":{"text":"who"},"right":{"text":"target"}}],"examples":[{"code":["_knowledge = player knowsAbout _target;"]},{"code":["_knowledge = (group player) knowsAbout _target;"]},{"code":["_knowledge = (side player) knowsAbout _target;"]}],"multiplayer":"*who* **must** be local, while *target* can be remote.","see_also":["nearTargets","reveal","getHideFrom","targetKnowledge","targetsAggregate","targetsQuery","forgetTarget"],"notes":[{"user":"Hardrock","date":"2006-08-04T10:55:00Z","text":"Operation Flashpoint: Resistance v1.91\n\n- As soon as An AI unit gets hit with a bullet his knowsAbout level for the unit that shot him will instantly jump to 1.5, even if the shooter is 1000m away.\n  Vice versa is also true. If An AI soldier's knowsAbout level for an enemy is 0.7 and the soldier fires and hits the enemy, his knowsAbout level about the enemy will instantly jump to 1.5.\n- Some editors have found, whilst using this command over the years, that the following characteristics have cropped up:\n  - AI enemies have a very limited amount of peripheral vision, it is not nearly as good as a human player's. A target must be in front of the unit for him to be noticed, so if you sprint right behind an enemy, this value doesn't increase.\n  - Depending on the unit's skill level, it can take a little time for the unit to notice a target. So if you run right past a unit, this value might not increase.\n  - Bushes between the unit and the target seem to have little effect on this value, and trees definitely have no effect. You may be in a forest and can't see the unit, but he can see you."},{"user":"Bdfy","date":"2007-01-16T16:25:00Z","text":"`the magic knowsAbout number is 0.105` It's not that simple. Maybe true for infantry but not all vehicles:\nReveal command sets knowsAbout to 1, but planes still won't fire at soldiers on the ground.\nThere's only one known way to pass through this - designate target with another fake infantry unit near the target.\nAs soon as this fake unit see the target knowsAbout lifts up to 2.5-4 and even single enemy soldiers are attacked from the air (of course if plane has suitable munition :))"},{"user":"Kju","date":"2012-06-14T10:01:00Z","text":"According to **Suma**:\nAll friendly units within a view distance to each unit [are revealed (to the player? or each friendly?)] on the mission start.\nThe code is half broken, as it does not make the units known, it only sets the \"accuracy\" value for them.\nNote: This is not affecting enemy units at all."},{"user":"Helling3r","date":"2013-03-27T23:25:00Z","text":"Arma 2: Operation Arrowhead v1.62 infantry tests:\nIt is still true that the command returns values between 0 (lowest) and 4 (most). Freshly Spotted units will have at least 1.5, slowly decreasing when the target disappeared.\nThe following table shows my test results on a clear day in Takistan using the Vector. Please note that the returned values vary considerably depending on weather and time. Moonlight however seems to not have any considerable effect.\n\n|  |  |  |\n|---|---|---|\n| **12:00, sunlight, clear sky**<br>\\| Distance \\| knowsAbout \\|<br>\\|---\\|---\\|<br>\\| 1530 \\| 1.5 \\|<br>\\| 1370 \\| 1.5 \\|<br>\\| 1250 \\| 1.5 \\|<br>\\| 1135 \\| 1.5 \\|<br>\\| 1055 \\| 1.52 \\|<br>\\| 1022 \\| 1.64 \\|<br>\\| 990 \\| 1.74 \\|<br>\\| 833 \\| 2.5 \\|<br>\\| 720 \\| 3.37 \\|<br>\\| 600 \\| 3.81 \\|<br>\\| 505 \\| 3.86 \\|<br>\\| 400 \\| 3.92 \\|<br>\\| 380 \\| 4 \\|<br>\\| 365 \\| 4 \\| | **21:00, bright half moon, clear sky**<br>\\| Distance \\| knowsAbout \\|<br>\\|---\\|---\\|<br>\\| 285 \\| 1.5 \\|<br>\\| 120 \\| 1.5 \\|<br>\\| 88 \\| 1.89 \\|<br>\\| 75 \\| 2.3 \\|<br>\\| 61 \\| 3.9 \\| | **23:00, pitch black, clear sky, NVG on**<br>\\| Distance \\| knowsAbout \\|<br>\\|---\\|---\\|<br>\\| 600 \\| 1.5 \\|<br>\\| 487 \\| 1.5 \\|<br>\\| 390 \\| 1.5 \\|<br>\\| 289 \\| 2.22 \\|<br>\\| 278 \\| 2.4 \\| |"},{"user":"Lou Montana","date":"2018-06-03T10:46:00Z","text":"Arma 3 v1.82 knowsAbout tests, player moving towards enemy AI, facing each other:\n\n**Tests executed in VR, default date (2035-05-28), with AI behaviour \"AWARE\"**\n\n| Daytime | AI equipment | AI skill and rank | player stance and speed | player outfit | first detection distance | first detection value | max detection (4) |\n|---|---|---|---|---|---|---|---|\n| 13:37 | Katiba + ACO (Green) | 0.5 - private | Standing, running | B_Soldier_F | 245.663 | 0.148076 | 132.863 |\n| 13:37 | Katiba + ACO (Green) | 0.5 - private | Standing, running | **underwear only**, rifle | 246.815 | 1.19377 | 132.9 |\n| 13:37 | Katiba + ACO (Green) | 0.5 - private | Standing, running | B_Soldier_F, **no uniform** | 241.885 | 1.24 | 132.56 |\n| 13:37 | Katiba + ACO (Green) | 0.5 - private | Standing, running | **B_Sniper_F** | 156.715 | 2.95534 | 133.019 |\n| 13:37 | Katiba + ACO (Green) | 0.5 - private | **Lying down, running** | B_Soldier_F | 105.401 | 4 | 105.401 |\n| 13:37 | Katiba + ACO (Green) | 0.5 - private | **Crouching, running** | B_Soldier_F | 193.232 | 1.94615 | 134.556 |\n| 13:37 | Katiba + ACO (Green) | 0.5 - private | **Standing, sprinting** | B_Soldier_F | 235.001 | 1.3146 | 134.445 |\n| 13:37 | Katiba + ACO (Green) | **0.2 - private** | Standing, running | B_Soldier_F | 214 | 0.166763 | 124.553 |\n| 13:37 | Katiba + ACO (Green) | **1.0 - private** | Standing, running | B_Soldier_F | 293.065 | 1.11004 | *140.088* |\n| 13:37 | Katiba + ACO (Green) | **0.5 - colonel** | Standing, running | B_Soldier_F | 245.641 | 1.20426 | 132.113 |\n| 13:37 | **no weapon** | 0.5 - private | Standing, running | B_Soldier_F | 421.959 | 0.283476 | 109.274 |\n| 13:37 | **Katiba + LRPS** | 0.5 - private | Standing, running | B_Soldier_F | 244.962 | 4 | 244.962 |\n| **20:00** | Katiba + ACO (Green) | 0.5 - private | Standing, running | B_Soldier_F | 132.089 | 0.62443 | 49.4895 |\n| **20:00** | **Katiba + ACO (Green), no NVG** | 0.5 - private | Standing, running | B_Soldier_F | 10.6837 | 4 | 10.6837 |\n\nCode used (click on \"Expand\" to the right):\n\n```sqf\nplayer allowDamage false;\nplayer enableFatigue false;\n\nplayer setPosATL [0,0,0];\nplayer setDir 0;\nunit setPosATL [0,500,0];\nunit setDir 180;\n\nwaitUntil { speed player > 0 };\n\n[unit, player] spawn {\n    params [\"_unit1\", \"_unit2\"];\n    private _time = time;\n    private _knowsAboutData = [\n        format [\"world = %1\\ndate = %2\\nanim = %3\\nweapon/scope = %4/%5\\nskill/rank = %6/%7\\nplayerType = %8\",\n            worldName,\n            date,\n            animationState player,\n            primaryWeapon _unit1,\n            (_unit1 weaponAccessories primaryWeapon _unit1) select 2,\n            skill _unit1,\n            rank _unit1,\n            typeOf _unit2\n        ]\n    ];\n    private \"_knowsAbout\";\n    private \"_entry\";\n    while { alive _unit1 && alive _unit2 } do\n    {\n        _knowsAbout = _unit1 knowsAbout _unit2;\n        _entry = [_unit1 distance _unit2, _knowsAbout];\n        _knowsAboutData pushBack _entry;\n        systemChat format [\"time: %1 - %2\", round (time - _time), _entry];\n        copyToClipboard str _knowsAboutData;\n        sleep 1;\n    };\n};\n```"},{"user":"ComradeCheekiBreeki","date":"2021-09-01T04:16:29Z","text":"As of at least Arma 3 v2.04, all sides appear to always perfectly know about props (`knowsAbout` of 4) unless they are beyond max view distance. Direction of the observer, distance between observer and object (excluding those which are beyond the max view distance) and amount of obstructions between them do not seem to affect it. However, there is a short ~0.5 second delay after mission start before units perfectly know about props.\n\nIn addition, props appear to always have a `knowsAbout` value of 0 regardless of side or other object checked, including other props."}]},{"name":"land","title":"land","type":"command","url":"https://community.bistudio.com/wiki/land","revid":373721,"updated":"2025-06-23T00:49:43Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Forces a helicopter landing. If there is a helipad nearby, the helicopter will attempt to land on it. VTOL he other hand will just land somewhere. To make helicopter or VTOL land on a specific helipad use landAt.","syntaxes":[{"syntax":"helicopter land mode","params":[{"name":"helicopter","type":"Object helicopter or VTOL","type_expr":"Object"},{"name":"mode","type":"String","description":"can be one of:\n\n- \"LAND\" - Complete stop\n- \"GET IN\" - Hovering very low, for another unit to get in\n- \"GET OUT\" - Hovering low, for another unit to get out\n- Arma 2 v1.00 \"NONE\" - Cancel a landing","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"helicopter"},"right":{"text":"mode"}}],"examples":[{"code":["_cobraOne land \"LAND\";"]}],"see_also":["landAt","allAirports"],"notes":[{"user":"Hardrock","date":"2006-08-04T10:56:00Z","text":"*Notes from before the conversion:*\nHelos will land at the nearest \"H\" or \"Invisible H\", if there is one around (within 500m in Armed Assault)."},{"user":"SNKMAN","date":"2010-09-26T12:02:00Z","text":"To make a helicopter LAND correctly and not hovering over the landing position use unitReady to check if the helicopter already has reached his destination.\nYou can fix a landing bug by using a short delay bevore checking the unitReady command.\n\n```sqf\n_helicopter move getPosATL _destination;\nsleep 3;\nwhile { alive _helicopter && not unitReady _helicopter } do\n{\n    sleep 1;\n};\n\nif (alive _helicopter) then\n{\n    _helicopter land \"LAND\";\n};\n```"}]},{"name":"landAt","title":"landAt","type":"command","url":"https://community.bistudio.com/wiki/landAt","revid":378376,"updated":"2026-04-03T17:00:56Z","groups":["Unit Control","Roads and Airports"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Order an AI airplane to land at a given airport. **ID** is the number to identify which map airport you want the airplane to land at. See Arma: Airport IDs for more information. See also land.\n\n> [!NOTE]\n> **Arma 3:**\n>\n> - Arma 3 v1.68 it is possible to also make the airplane land at a dynamic airport object (e.g. aircraft carrier, makeshift runway...) – see Example 2\n> - Arma 3 v2.18 it is also possible to make a helicopter land at a specific helipad.\n\n> [!NOTE]\n> Since Arma 3 v2.20 landAt command has been extended. Helicopter can now be landed not only on a helipad but also at arbitrary position, provided that it is empty and can accomodate the helicopter. In \"Land\" landing mode the helicopter lands permanently, while in \"GetIn\" and \"GetOut\" landing mode the helicopter performs a short touch down before going to the next waypoint. In order to make helicopter wait, the 'waitTime' param can be used. Landing mode \"None\" cancels both, the landing in progress and waiting in progress.\n> Waiting time is available with landAt getter variant. When helicopter is landing, the time shown is the set time for wating, however when helicopter is landed, this time start counting down to 0, after which helicopter will take off if it has a waypoint to go to. The AI pilot state can be monitored with getUnitState command. The helicopter has to be local to the machine executing the command. VTOL waiting time is not supported","syntaxes":[{"syntax":"plane landAt ID","params":[{"name":"plane","type":"Object","description":"a plane","type_expr":"Object"},{"name":"ID","type":"Number","description":"Airport ID","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"plane"},"right":{"text":"ID"}},{"syntax":"plane landAt airportObject","since":"arma3 1.68","params":[{"name":"plane","type":"Object","type_expr":"Object"},{"name":"airportObject","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"plane"},"right":{"text":"airportObject"}},{"syntax":"heli landAt [position, mode, waitTime, putOnSurface]","since":"arma3 2.18","params":[{"name":"heli","type":"Object","description":"Helicopter/VTOL aircraft","type_expr":"Object"},{"name":"position","type":"Object or Arma 3 v2.20 PositionWorld","description":"a helipad object of helipad type (can be an invisible helipad) or PositionWorld to land at.","type_expr":"Object | PositionWorld"},{"name":"mode","type":"String","description":"one of \"None\", \"Get In\", \"Get Out\", \"Land\" and since Arma 3 v2.20 also \"GetIn\", \"GetOut\".","type_expr":"String"},{"name":"waitTime","type":"Number","optional":true,"default":"-1","description":"(Helicopter type only) time to wait after touch down in \"GetIn\"/\"GetOut\" mode before taking off to the next waypoint.","type_expr":"Number","since":"arma3 2.20","text":"waitTime: Number - (Optional) (Helicopter type only) time to wait after touch down in \"GetIn\"/\"GetOut\" mode before taking off to the next waypoint. Default: -1."},{"name":"putOnSurface","type":"Boolean","optional":true,"default":"false","description":"when true, the given land position will be adjusted to the nearest surface underneath.","type_expr":"Boolean","since":"arma3 2.20","text":"putOnSurface: Boolean - (Optional) when true, the given land position will be adjusted to the nearest surface underneath. Default: false."}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"Returns true if landing command was processed successfully, false if failed."},"form":"binary","left":{"text":"heli"},"right":{"text":"[position, mode, waitTime, putOnSurface]"}},{"syntax":"landAt heli","since":"arma3 2.20","params":[{"name":"heli","type":"Object","description":"Helicopter/VTOL aircraft","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [landMode, landResult, landPosition, waitTime, autopilotState]\n- landMode: String - one of the following: \"None\", \"Land\", \"GetIn\", \"GetOut\" or \"\". - landResult: String - one of the following: \"Found\", \"NotFound\", \"NotReady\" or \"\". - landPosition: PositionWorld - land position or [0,0,0]. - waitTime: Number - (Helicopter type only) before heli is landed - wait time set for \"GetIn\"/\"GetOut\" mode, after heli is landed - remaining time before take off to the next waypoint or -1. - autopilotState: String - one of the following: \"FAR\", \"BRAKE\", \"NEAR\", \"ALIGN\", \"REACHED\", \"LOITER\", \"FOLLOW\" or \"\".","text":"Array with [landMode, landResult, landPosition, waitTime, autopilotState]\n\n- landMode: String - one of the following: \"None\", \"Land\", \"GetIn\", \"GetOut\" or \"\".\n- landResult: String - one of the following: \"Found\", \"NotFound\", \"NotReady\" or \"\".\n- landPosition: PositionWorld - land position or [0,0,0].\n- waitTime: Number - (Helicopter type only) before heli is landed - wait time set for \"GetIn\"/\"GetOut\" mode, after heli is landed - remaining time before take off to the next waypoint or -1.\n- autopilotState: String - one of the following: \"FAR\", \"BRAKE\", \"NEAR\", \"ALIGN\", \"REACHED\", \"LOITER\", \"FOLLOW\" or \"\"."},"form":"unary","right":{"text":"heli"}}],"examples":[{"code":["_plane1 landAt 1;"]},{"code":["_dynamicAirport1 = \"DynamicAirport_01_F\" createVehicle position player;\n_plane1 landAt _dynamicAirport1;"]},{"code":["_hpad = \"Land_HelipadEmpty_F\" createVehicle [0,0,0];\n_hpad setPosASL _pos;\nheli landAt [_hpad, \"LAND\"];"]},{"code":["heli landAt [getPosWorld player vectorAdd [10,10,0], \"GetIn\", 30];"]}],"see_also":["Arma: Airport IDs","land","setAirportSide","assignToAirport","allAirports"]},{"name":"landResult","title":"landResult","type":"command","url":"https://community.bistudio.com/wiki/landResult","revid":363668,"updated":"2024-04-14T20:18:01Z","groups":["Unit Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return the result of helicopter landing position searching (performed after the land command).","syntaxes":[{"syntax":"landResult helicopter","params":[{"name":"helicopter","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"result, can be:\n- `\"Found\"` - position found - `\"NotFound\"` - position not found - `\"NotReady\"` - position searching is still in progress - `\"\"` - empty string when the provided helicopter is invalid","text":"String - result, can be:\n\n- `\"Found\"` - position found\n- `\"NotFound\"` - position not found\n- `\"NotReady\"` - position searching is still in progress\n- `\"\"` - empty string when the provided *helicopter* is invalid"},"form":"unary","right":{"text":"helicopter"}}],"examples":[{"code":["_result = landResult BIS_heli;"]}],"see_also":["land"]},{"name":"language","title":"language","type":"command","url":"https://community.bistudio.com/wiki/language","revid":365028,"updated":"2024-07-10T19:28:46Z","groups":["System"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns current game language.","syntaxes":[{"syntax":"language","params":[],"returns":{"type":"String","type_expr":"String","description":"see supported languages for possible values"},"form":"nullary"}],"examples":[{"code":["_myLanguage = language; // will return \"English\" if game language is set to English"]}],"see_also":["Stringtable.xml","getTextRaw","localize","isLocalized","diag_localized","BIS_fnc_localize"]},{"name":"laserTarget","title":"laserTarget","type":"command","url":"https://community.bistudio.com/wiki/laserTarget","revid":377476,"updated":"2026-01-02T06:48:48Z","groups":["Weapons"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the laser target object created by given unit (vehicle or soldier) when using a laser targeting device. The main syntax targets the primary gunner turret.","syntaxes":[{"syntax":"laserTarget entity","params":[{"name":"entity","type":"Object","description":"unit or vehicle","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"laser target or objNull if no laser target exists"},"form":"unary","right":{"text":"entity"}},{"syntax":"vehicle laserTarget turret","since":"arma3 2.12","params":[{"name":"vehicle","type":"Object","description":"transport","type_expr":"Object"},{"name":"turret","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Object","type_expr":"Object","description":"laser target or objNull if no laser target exists"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turret"}}],"examples":[{"code":["private _target = laserTarget gunner heli;"]},{"code":["private _designatedPos = getPosATL laserTarget player;"]}],"see_also":["isLaserOn","cursorTarget","setMissileTarget"]},{"name":"lbAdd","title":"lbAdd","type":"command","url":"https://community.bistudio.com/wiki/lbAdd","revid":379428,"updated":"2026-10-31T00:05:13Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Adds an item with the given text to the CT_LISTBOX or CT_COMBO or CT_TOOLBOX.\n\n> [!NOTE]\n> If using `RscToolBox` as template with ctrlCreate, clear it first with lbClear","syntaxes":[{"syntax":"lbAdd [idc, text]","params":[{"name":"idc","type":"Number","description":"control IDC","type_expr":"Number"},{"name":"text","type":"String","description":"visible text","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"index (row) of newly added item"},"form":"unary","right":{"text":"[idc, text]"}},{"syntax":"control lbAdd text","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"index (row) of newly added item"},"form":"binary","left":{"text":"control"},"right":{"text":"text"}}],"examples":[{"code":["_index = lbAdd [101, \"First item\"];"]},{"code":["_index = _control lbAdd \"First item\";"]}],"see_also":["lbDelete","lbText"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."},{"user":"Nelis75733126","date":"2015-04-12T11:01:00Z","text":"This command can be very very frustrating to use because it does not output any errors if unable to function.\nOften, the 2nd provided syntax needs to be used like this:\n\n```sqf\n_giveYourControlAname = findDisplay 7 displayCtrl 9;\n_addThisToListBox = \"Option\";\n_giveYourControlAname lbAdd _addThisToListBox;\n```\n\nWhere \"7\" is the \"idd\" of the dialog you made in your \".hpp\" file and where \"9\" is the \"idc\" of the RscListBox or RscComboBox.\nThe code above will add an option named \"Option\" to the ListBox or ComboBox."}]},{"name":"lbClear","title":"lbClear","type":"command","url":"https://community.bistudio.com/wiki/lbClear","revid":379429,"updated":"2026-10-31T00:05:21Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Clear all items from a CT_LISTBOX or CT_COMBO control.","syntaxes":[{"syntax":"lbClear idc","params":[{"name":"idc","type":"Number","description":"control IDC","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"idc"}},{"syntax":"lbClear control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["lbClear 101;"]},{"code":["lbClear _ctrl;"]}],"see_also":["lbAdd","lbDelete"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbColor","title":"lbColor","type":"command","url":"https://community.bistudio.com/wiki/lbColor","revid":379430,"updated":"2026-10-31T00:05:29Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Returns the text color of the item with the given index of the CT_LISTBOX or CT_COMBO with IDC of the topmost user dialog.","syntaxes":[{"syntax":"lbColor [idc, index]","params":[{"name":"idc","type":"Number","description":"control IDC","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Color (RGBA)","type_expr":"Color"},"form":"unary","right":{"text":"[idc, index]"}},{"syntax":"control lbColor index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Color (RGBA)","type_expr":"Color"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["_colour = lbColor [101, 0];"]},{"code":["_color = _control lbColor 0;"]}],"see_also":["lbSetColor"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbColorRight","title":"lbColorRight","type":"command","url":"https://community.bistudio.com/wiki/lbColorRight","revid":379431,"updated":"2026-10-31T00:05:37Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":null,"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Returns the text color of the item (right) with the given index of the listbox or combobox with id idc of the topmost user dialog.","syntaxes":[{"syntax":"lbColorRight [idc, index]","params":[{"name":"idc","type":"Number","description":"control's id","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Color (RGBA)","type_expr":"Color"},"form":"unary","right":{"text":"[idc, index]"}},{"syntax":"control lbColorRight index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Color (RGBA)","type_expr":"Color"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["_colour = lbColorRight [101, 0];"]},{"code":["_color = _control lbColorRight 0;"]}],"see_also":["lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbPictureRight","lbSelection","lbSetColor","lbSetColorRight","lbSetCurSel","lbSetData","lbSetPicture","lbSetPictureRight","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbCurSel","title":"lbCurSel","type":"command","url":"https://community.bistudio.com/wiki/lbCurSel","revid":379432,"updated":"2026-10-31T00:05:45Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Returns the index of the selected item of the CT_LISTBOX, CT_LISTNBOX, CT_COMBO or CT_TOOLBOX. For CT_LISTBOX with multi selection enabled use lbSelection.","syntaxes":[{"syntax":"lbCurSel idc","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"selected index (row) or -1 if nothing is selected"},"form":"unary","right":{"text":"idc"}},{"syntax":"lbCurSel control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number","description":"selected index (row) or -1 if nothing is selected"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_index = lbCurSel 101;"]},{"code":["lbCurSel _ctrl;"]}],"see_also":["lbIsSelected","lbSelection","lbSetCurSel"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbData","title":"lbData","type":"command","url":"https://community.bistudio.com/wiki/lbData","revid":364197,"updated":"2024-05-05T10:46:54Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Returns the data set in given index of the CT_LISTBOX or CT_COMBO.","syntaxes":[{"syntax":"lbData [idc, index]","params":[{"name":"idc","type":"Number","description":"control's IDC","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, index]"}},{"syntax":"control lbData index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["_data = lbData [101, 0];"]},{"code":["_data = _control lbData 0;"]}],"see_also":["lbSetData"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T16:28:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbDelete","title":"lbDelete","type":"command","url":"https://community.bistudio.com/wiki/lbDelete","revid":379433,"updated":"2026-10-31T00:05:53Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Removes the item with the given index from the CT_LISTBOX, CT_COMBO or CT_TOOLBOX.","syntaxes":[{"syntax":"lbDelete [idc, index]","params":[{"name":"idc","type":"Number","description":"control IDC","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index]"}},{"syntax":"control lbDelete index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["lbDelete [101, 0];"]},{"code":["_control lbDelete 0;"]}],"see_also":["lbAdd","lbClear"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbIsSelected","title":"lbIsSelected","type":"command","url":"https://community.bistudio.com/wiki/lbIsSelected","revid":379434,"updated":"2026-10-31T00:06:00Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Checks whether or not given row of the given listbox is selected.","syntaxes":[{"syntax":"control lbIsSelected index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["_selected = _control lbIsSelected 0;"]}],"see_also":["lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetPicture","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbPicture","title":"lbPicture","type":"command","url":"https://community.bistudio.com/wiki/lbPicture","revid":379435,"updated":"2026-10-31T00:06:08Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Returns the picture name of the item with the given index of the listbox or combobox with id idc of the topmost user dialog.","syntaxes":[{"syntax":"lbPicture [idc, index]","params":[{"name":"idc","type":"Number","description":"idc of control","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, index]"}},{"syntax":"control lbPicture index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["_picture = lbPicture [101, 0];"]},{"code":["_picture = _control lbPicture 0;"]}],"see_also":["lbSetPicture"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbPictureRight","title":"lbPictureRight","type":"command","url":"https://community.bistudio.com/wiki/lbPictureRight","revid":319142,"updated":"2022-05-13T09:23:15Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":null,"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","description":"Returns the right picture name of the item with the given index of the listbox or combobox with id idc of the topmost user dialog.","syntaxes":[{"syntax":"lbPictureRight [idc, index]","params":[{"name":"idc","type":"Number","description":"idc of control","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, index]"}},{"syntax":"control lbPictureRight index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["_picture = lbPictureRight [101, 0];"]},{"code":["_picture = _control lbPictureRight 0;"]}],"see_also":["lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetPicture","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue"]},{"name":"lbSelection","title":"lbSelection","type":"command","url":"https://community.bistudio.com/wiki/lbSelection","revid":379363,"updated":"2026-10-30T23:56:32Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns Array of selected rows indices in the given listbox. If listbox is of style LB_MULTI (multi-selection) the array will contain multiple elements, otherwise only a single element. For single selection listbox one can also use lbCurSel. See also lbIsSelected, lbSetSelected","syntaxes":[{"syntax":"lbSelection control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_indices = lbSelection _control;"]}],"see_also":["lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSetColor","lbSetCurSel","lbSetData","lbSetPicture","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue"],"notes":[{"user":"Dscha","date":"2020-04-24T11:39:00Z","text":"With the addition of **RscListBoxMulti** (in Arma 3 - 1.98), it is possible to get all the selected Rows with lbSelection."}]},{"name":"lbSetColor","title":"lbSetColor","type":"command","url":"https://community.bistudio.com/wiki/lbSetColor","revid":379436,"updated":"2026-10-31T00:06:16Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets the color of the item (left) with the given index of the listbox or combobox with id idc of the topmost user Dialog to color.","syntaxes":[{"syntax":"lbSetColor [idc, index, color]","params":[{"name":"idc","type":"Number","description":"control's IDC","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index, color]"}},{"syntax":"control lbSetColor [index, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, color]"}}],"examples":[{"code":["lbSetColor [101, 0, [0, 1, 0, 0.5]];"]},{"code":["_control lbSetColor [0, [0, 1, 0, 0.5]];"]}],"see_also":["lbColor","lbSetColorRight","lbColorRight"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbSetColorRight","title":"lbSetColorRight","type":"command","url":"https://community.bistudio.com/wiki/lbSetColorRight","revid":377346,"updated":"2026-01-02T06:40:03Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":null,"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets the color of the item (right) with the given index of the listbox or combobox with id idc of the topmost user dialog to color.","syntaxes":[{"syntax":"lbSetColorRight [idc, index, color]","params":[{"name":"idc","type":"Number","description":"control id","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index, color]"}},{"syntax":"control lbSetColorRight [index, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, color]"}}],"examples":[{"code":["lbSetColorRight [101, 0, [0, 1, 0, 0.5]];"]},{"code":["_control lbSetColorRight [0, [0, 1, 0, 0.5]];"]}],"see_also":["lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetPicture","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T16:30:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbSetCurSel","title":"lbSetCurSel","type":"command","url":"https://community.bistudio.com/wiki/lbSetCurSel","revid":376677,"updated":"2025-11-04T00:29:50Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Selects the item with the given index in the listbox, listnbox, combobox, xcombobox, xlistbox\n\n> [!IMPORTANT]\n> **The following only applies to the Alternative Syntax when used with CT_LISTBOX and CT_LISTNBOX.**\n>\n> To deselect all entries, use -1: `_ctrl lbSetCurSel -1;` For listbox of style LB_MULTI use lbSetSelected instead.\n> CT_COMBO does not allow deselecting entries, it will instead select the first one as it is not a combobox usual behaviour.\n>\n> If you really need to deselect a combobox, see DreadedEntity's note. For the ComboBox you might as well want to explicitly select index 0 to avoid showing ghost row.","syntaxes":[{"syntax":"lbSetCurSel [idc, index]","params":[{"name":"idc","type":"Number","description":"control's IDC","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index]"}},{"syntax":"control lbSetCurSel index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["lbSetCurSel [101, 0];"]},{"code":["_control lbSetCurSel 0;"]}],"see_also":["lbCurSel"],"notes":[{"user":"DreadedEntity","date":"2014-11-29T23:40:00Z","text":"**Prior to ArmA 1.90** lbSetCurSel -1 had no effect while the listbox was populated. You needed to use lbClear first, then lbSetCurSel -1, then re-populate the listbox."},{"user":"Longbow","date":"2015-03-01T18:37:00Z","text":"Keep in mind that running this command will fire the 'onLBSelChanged' event handler."}]},{"name":"lbSetData","title":"lbSetData","type":"command","url":"https://community.bistudio.com/wiki/lbSetData","revid":319184,"updated":"2022-05-13T09:23:19Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Sets the additional text (invisible) in the item with the given index of the listbox or combobox with id idc of the topmost user dialog to the given data.\n\n> [!NOTE]\n> See more information on the CT_LISTBOX command family here.","syntaxes":[{"syntax":"lbSetData [idc, index, data]","params":[{"name":"idc","type":"Number","description":"control's IDC","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"data","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index, data]"}},{"syntax":"control lbSetData [index, data]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"data","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, data]"}}],"examples":[{"code":["lbSetData [101, 1, \"#1\"];"]},{"code":["_control lbSetData [1, \"#1\"];"]}],"see_also":["lbData","lbDelete","lbSetValue","lbValue"]},{"name":"lbSetPicture","title":"lbSetPicture","type":"command","url":"https://community.bistudio.com/wiki/lbSetPicture","revid":364161,"updated":"2024-05-05T10:46:40Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets the left picture in the row with given index of CT_LISTBOX or CT_COMBO. The picture is searched for in the mission directory, the dtaExt subdirectory of the campaign directory and the dtaExt directory and the data bank (or directory).\n\n> [!NOTE]\n> **Arma 3:** In Arma 3 it might be necessary to set the color of the picture as well with lbSetPictureColor as default color `[0,0,0,0]` makes the picture invisible.","syntaxes":[{"syntax":"lbSetPicture [idc, index, path]","params":[{"name":"idc","type":"Number","description":"control IDC","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"path","type":"String","description":"path to the picture","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index, path]"}},{"syntax":"control lbSetPicture [index, path]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"path","type":"String","description":"path to the picture","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, path]"}}],"examples":[{"code":["lbSetPicture [101, 0, \"iskoda.paa\"];"]},{"code":["_control lbSetPicture [0, \"iskoda.paa\"];"]},{"text":"> [!NOTE]\n> Adding pictures to lists is very slow. In order to prevent a list filling's possible slowdown, add the pictures in the **scheduled** environment using spawn.\n> One drawback of that method is that sorting the entries is not easily possible.\n\n```sqf\nprivate _path = _ctrlTV tvAdd [[], \"Some Entry\"];\n[_ctrlTV, _path] spawn {\n    (_this select 0) tvSetPictureRight [[_this select 1], \"someImage.paa\"];\n};\n```","code":["private _path = _ctrlTV tvAdd [[], \"Some Entry\"];\n[_ctrlTV, _path] spawn {\n\t(_this select 0) tvSetPictureRight [[_this select 1], \"someImage.paa\"];\n};"]}],"see_also":["lbPicture","lbSetPictureColor","lbSetPictureRight"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T16:31:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbSetPictureColor","title":"lbSetPictureColor","type":"command","url":"https://community.bistudio.com/wiki/lbSetPictureColor","revid":377805,"updated":"2026-01-03T04:08:03Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Sets the color of item's picture (left) with the given index of the listbox with id idc of the topmost user dialog to the given color. Color is in format Color (RGBA). Color which consists from only zeros means disable this override.","syntaxes":[{"syntax":"lbSetPictureColor [idc, index, color]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index, color]"}},{"syntax":"control lbSetPictureColor [index, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, color]"}}],"examples":[{"code":["lbSetPictureColor [101, 0, [0, 1, 0, 0.5]];"]},{"code":["_ctrl lbSetPictureColor [0, [1, 1, 1, 1]];"]}],"see_also":["lbSetPictureColorSelected","lbPicture","lbSetColor","lbSetPicture","lbSetPictureRightColor","lbSetPictureRight"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T16:30:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbSetPictureColorDisabled","title":"lbSetPictureColorDisabled","type":"command","url":"https://community.bistudio.com/wiki/lbSetPictureColorDisabled","revid":377804,"updated":"2026-01-03T04:08:02Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma3":"1.20"},"since":"arma3 1.20","arma3_since":"1.20","description":"Sets the disabled color of item's picture (left) with the given index of the listbox with id idc of the topmost user dialog to the given color. Color is in format Color (RGBA). Color which consists from only zeros means disable this override.","syntaxes":[{"syntax":"lbSetPictureColorDisabled [idc, index, color]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index, color]"}},{"syntax":"control lbSetPictureColorDisabled [index, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, color]"}}],"examples":[{"code":["lbSetPictureColorDisabled [101, 0, [1, 1, 1, 0.25]];"]},{"code":["_ctrl lbSetPictureColorDisabled [0, [1, 1, 1, 0.25]];"]}],"see_also":["lbSetPictureColor","lbSetPictureRightColor","lbSetPictureRightColorDisabled"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T16:30:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbSetPictureColorSelected","title":"lbSetPictureColorSelected","type":"command","url":"https://community.bistudio.com/wiki/lbSetPictureColorSelected","revid":377357,"updated":"2026-01-02T06:40:23Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma3":"1.20"},"since":"arma3 1.20","arma3_since":"1.20","description":"Sets the selected color of item's picture (left) with the given index of the listbox with id idc of the topmost user dialog to the given color. Color is in format Color (RGBA). Color which consists from only zeros means disable this override.","syntaxes":[{"syntax":"lbSetPictureColorSelected [idc, index, color]","params":[{"name":"idc","type":"Number","description":"control id","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index, color]"}},{"syntax":"control lbSetPictureColorSelected [index, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, color]"}}],"examples":[{"code":["lbSetPictureColorSelected [101, 0, [0, 1, 0, 0.5]];"]},{"code":["_ctrl lbSetPictureColorSelected [0, [1, 1, 1, 1]];"]}],"see_also":["lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue","lbSetPicture","lbSetPictureColor","lbSetPictureColorDisabled"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T16:30:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbSetPictureRight","title":"lbSetPictureRight","type":"command","url":"https://community.bistudio.com/wiki/lbSetPictureRight","revid":377810,"updated":"2026-01-03T04:08:11Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":null,"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets the second (right aligned) picture in the item with the given index of the listbox or combobox with id idc of the topmost user dialog. Name is the picture name.\nThe picture is searched for in the mission directory, the dtaExt subdirectory of the campaign directory and the dtaExt directory and the data bank (or directory).\nIn Arma 3 it might be necessary to set the color of the picture as well with lbSetPictureRightColor as default [0,0,0,0] color makes the picture invisible.\n\n> [!NOTE]\n> When trying to select a listBox entry by clicking at the right picture, the control in the background is focused. It seems the width of the control is not extended by adding a right picture.","syntaxes":[{"syntax":"lbSetPictureRight [idc, index, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"path","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index, path]"}},{"syntax":"control lbSetPictureRight [index, path]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"path","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, path]"}}],"examples":[{"code":["lbSetPictureRight [101, 0, \"a3\\3den\\data\\cfg3den\\history\\createcomment_ca.paa\"];"]},{"code":["_control lbSetPictureRight [0, \"a3\\3den\\data\\cfg3den\\history\\createcomment_ca.paa\"];"]}],"see_also":["lbPicture","lbSetPicture","lbSetPictureColor"],"notes":[{"user":"Ffur2007slx2_5","date":"2014-09-10T16:31:00Z","text":"More information on the CT_LISTBOX command family can be found here."},{"user":"R3vo","date":"2021-04-06T07:34:00Z","text":"Adding pictures to lists is very slow. In order to prevent the filling of the list to be slowed down, add the pictures in the **scheduled** environment.\nOne drawback of that method is, that sorting the entries is not easily possible.\n\n```sqf\nprivate _path = _ctrlTV tvAdd [[], \"Some Entry\"];\n[_ctrlTV, _path] spawn {\n    (_this select 0) tvSetPictureRight [[_this select 1], \"someImage.paa\"];\n};\n```"}]},{"name":"lbSetPictureRightColor","title":"lbSetPictureRightColor","type":"command","url":"https://community.bistudio.com/wiki/lbSetPictureRightColor","revid":379532,"updated":"2026-10-31T00:51:22Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Sets the color of the second (right aligned) picture of the item with the given index of the listbox to the given color.\nColor which consists from only zeros means disable this override.","syntaxes":[{"syntax":"control lbSetPictureRightColor [index, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, color]"}}],"examples":[{"code":["_ctrl lbSetPictureRightColor [0, [1, 1, 1, 1]];"]}],"see_also":["lbAdd","lbClear","lbColor","lbSetPictureColorSelected","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue","lbSetPicture","lbSetPictureColor"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbSetPictureRightColorDisabled","title":"lbSetPictureRightColorDisabled","type":"command","url":"https://community.bistudio.com/wiki/lbSetPictureRightColorDisabled","revid":379533,"updated":"2026-10-31T00:51:30Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma3":"1.20"},"since":"arma3 1.20","arma3_since":"1.20","description":"Sets the disabled color of second (right aligned) picture of the item with the given index of the listbox to the given color.\nColor which consists from only zeros means disable this override.","syntaxes":[{"syntax":"control lbSetPictureRightColorDisabled [index, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, color]"}}],"examples":[{"code":["_ctrl lbSetPictureRightColorDisabled [0, [1, 1, 1, 0.25]];"]}],"see_also":["lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue","lbSetPicture","lbSetPictureColor","lbSetPictureColorDisabled","lbSetPictureColorSelected"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbSetPictureRightColorSelected","title":"lbSetPictureRightColorSelected","type":"command","url":"https://community.bistudio.com/wiki/lbSetPictureRightColorSelected","revid":379438,"updated":"2026-10-31T00:06:32Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma3":"1.20"},"since":"arma3 1.20","arma3_since":"1.20","description":"Sets the selected color of the second (right aligned) picture of the item with the given index of the listbox with id idc of the topmost user dialog to the given color.\nColor which consists from only zeros means disable this override.","syntaxes":[{"syntax":"control lbSetPictureRightColorSelected [index, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, color]"}}],"examples":[{"code":["_ctrl lbSetPictureRightColorSelected [0, [1, 1, 1, 1]];"]}],"see_also":["lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue","lbSetPicture","lbSetPictureColor","lbSetPictureColorDisabled","lbSetPictureColorSelected"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbSetSelectColor","title":"lbSetSelectColor","type":"command","url":"https://community.bistudio.com/wiki/lbSetSelectColor","revid":379439,"updated":"2026-10-31T00:06:40Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma3":"1.46"},"since":"arma3 1.46","arma3_since":"1.46","description":"Sets the select color of the item with the given index of the listbox or combobox with id idc of the topmost user dialog to color.","syntaxes":[{"syntax":"lbSetSelectColor [idc, index, color]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index, color]"}},{"syntax":"control lbSetSelectColor [index, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, color]"}}],"examples":[{"code":["lbSetSelectColor [101, 0, [0, 1, 0, 0.5]];"]},{"code":["_control lbSetSelectColor [0, [0, 1, 0, 0.5]];"]}],"see_also":["lbSetColor","lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetCurSel","lbSetData","lbSetPicture","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the LB command family can be found here"}]},{"name":"lbSetSelectColorRight","title":"lbSetSelectColorRight","type":"command","url":"https://community.bistudio.com/wiki/lbSetSelectColorRight","revid":379440,"updated":"2026-10-31T00:06:48Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma3":"1.46"},"since":"arma3 1.46","arma3_since":"1.46","description":"Sets the select color of the of the secondary text (right aligned) of the item with the given index of the listbox or combobox with id idc of the topmost user dialog to color.","syntaxes":[{"syntax":"lbSetSelectColorRight [idc, index, color]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index, color]"}},{"syntax":"control lbSetSelectColorRight [index, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, color]"}}],"examples":[{"code":["lbSetSelectColorRight [101, 0, [0, 1, 0, 0.5]];"]},{"code":["_control lbSetSelectColorRight [0, [0, 1, 0, 0.5]];"]}],"see_also":["lbSetSelectColor","lbSetColor","lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetCurSel","lbSetData","lbSetPicture","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the LB command family can be found here"}]},{"name":"lbSetSelected","title":"lbSetSelected","type":"command","url":"https://community.bistudio.com/wiki/lbSetSelected","revid":379292,"updated":"2026-10-30T23:47:06Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets the selection state of the given row of the given listbox of style LB_MULTI.\nThe command has to be called for every row which is needed to be selected in multi-selection listbox. Use negative index -1 to select/deselect all rows (since Arma 3 v2.12).\nFor single selection listbox use lbSetCurSel instead.","syntaxes":[{"syntax":"control lbSetSelected [index, selected, forceEH]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number or Arma 3 v2.12 Array of Numbers","type_expr":"Number | Array<Number>"},{"name":"selected","type":"Boolean","type_expr":"Boolean"},{"name":"forceEH","type":"Boolean","optional":true,"default":"false","description":"will force lbSelChanged EH to fire","type_expr":"Boolean","since":"arma3 2.12","text":"forceEH: Boolean - (Optional, default false) will force lbSelChanged EH to fire"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, selected, forceEH]"}}],"examples":[{"code":["_control lbSetSelected [0, true];"]}],"see_also":["lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetPicture","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue"]},{"name":"lbSetText","title":"lbSetText","type":"command","url":"https://community.bistudio.com/wiki/lbSetText","revid":379441,"updated":"2026-10-31T00:06:56Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":null,"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets the text on the left side of the item with the given index of the listbox or combobox with id idc of the topmost user dialog.","syntaxes":[{"syntax":"lbSetText [idc, index, name]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index, name]"}},{"syntax":"control lbSetText [index, name]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, name]"}}],"examples":[{"code":["lbSetText [101, 0, \"iskoda\"];"]},{"code":["_control lbSetText [0, \"iskoda\"];"]}],"see_also":["lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetSelected","lbSetTextRight","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue","lbSetPicture","lbSetPictureColor"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbSetTextRight","title":"lbSetTextRight","type":"command","url":"https://community.bistudio.com/wiki/lbSetTextRight","revid":379442,"updated":"2026-10-31T00:07:04Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":null,"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","description":"Sets the text on the right side of the item with the given row index of the listbox or combobox with id idc of the topmost user dialog.","syntaxes":[{"syntax":"control lbSetTextRight [row, name]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","description":"0-based index (first row is 0, second is 1, etc)","type_expr":"Number"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[row, name]"}}],"examples":[{"code":["_control lbSetTextRight [0, \"iskoda\"];"]}],"see_also":["lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetSelected","lbSetText","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue","lbSetPicture","lbSetPictureColor"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbSetTooltip","title":"lbSetTooltip","type":"command","url":"https://community.bistudio.com/wiki/lbSetTooltip","revid":379443,"updated":"2026-10-31T00:07:12Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma3":"0.58"},"since":"arma3 0.58","arma3_since":"0.58","description":"Sets tooltip for item with given index of the listbox or combobox with id idc of the topmost user dialog to the given data.","syntaxes":[{"syntax":"lbSetTooltip [idc, index, tooltip]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"tooltip","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index, tooltip]"}},{"syntax":"control lbSetTooltip [index, tooltip]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"tooltip","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, tooltip]"}}],"examples":[{"code":["lbSetTooltip [101, 1, \"tooltip\"];"]},{"code":["_control lbSetTooltip [0, \"another tooltip\"];"]}],"see_also":["lbTooltip","lnbSetTooltip","lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetPicture","lbSetSelected","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."},{"user":"Nelis75733126","date":"2017-08-09T13:03:00Z","text":"if you want to put linebreaks into a tooltip, use this method:\n\n```sqf\nformat [\"%1,%2%3\", \"Hi\", parseText \"\\n\", \"my name is Will\"];\n```"}]},{"name":"lbSetValue","title":"lbSetValue","type":"command","url":"https://community.bistudio.com/wiki/lbSetValue","revid":379444,"updated":"2026-10-31T00:07:20Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Sets the additional value in the row with the given index of a CT_LISTBOX or CT_COMBO control.","syntaxes":[{"syntax":"lbSetValue [idc, index, value]","params":[{"name":"idc","type":"Number","description":"control IDC","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"value","type":"Number","description":"only integer values are supported","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index, value]"}},{"syntax":"control lbSetValue [index, value]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"value","type":"Number","description":"only integer values are supported","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[index, value]"}}],"examples":[{"code":["lbSetValue [101, 0, 1];"]},{"code":["_control lbSetValue [0, 1];"]}],"see_also":["lbSortByValue","lbValue"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbSize","title":"lbSize","type":"command","url":"https://community.bistudio.com/wiki/lbSize","revid":353733,"updated":"2024-03-22T10:26:54Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Returns the number of items in a CT_LISTBOX or CT_COMBO control. For CT_TOOLBOX size see lnbSize.","syntaxes":[{"syntax":"lbSize idc","params":[{"name":"idc","type":"Number","description":"control's id","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"idc"}},{"syntax":"lbSize control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_size = lbSize 101;"]},{"code":["_size = lbSize _control;"]}],"see_also":["lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetPicture","lbSetSelected","lbSetTooltip","lbSetValue","lbSort","lbSortByValue","lbText","lbValue"],"notes":[{"user":"Ffur2007slx2_5","date":"2014-09-10T16:32:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbSort","title":"lbSort","type":"command","url":"https://community.bistudio.com/wiki/lbSort","revid":379445,"updated":"2026-10-31T00:07:28Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Sorts listbox entries alphabetically ascending by their lbText.","syntaxes":[{"syntax":"lbSort control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"control"}},{"syntax":"lbSort [control, sortOrder]","since":"arma3 1.18","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"sortOrder","type":"String","description":"\"ASC\": ascending, \"DESC\": descending","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[control, sortOrder]"}},{"syntax":"lbSort idc","since":"arma3 1.68","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"idc"}},{"syntax":"lbSort [idc, sortOrder]","since":"arma3 1.68","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"sortOrder","type":"String","description":"\"ASC\": ascending, \"DESC\": descending","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, sortOrder]"}}],"examples":[{"code":["lbSort _myControl;"]},{"code":["lbSort [_myControl, \"DESC\"];"]},{"code":["lbSort 101;"]},{"code":["lbSort [101, \"DESC\"];"]}],"see_also":["lbSortBy","lnbSortBy","lbSortByValue","lnbSort","tvSort","tvSortByValue","lnbSortByValue","lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetPicture","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbText","lbValue"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the LB command family can be found on the List Box page."}]},{"name":"lbSortBy","title":"lbSortBy","type":"command","url":"https://community.bistudio.com/wiki/lbSortBy","revid":310351,"updated":"2022-05-05T17:24:12Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Sorts given ListBox by either lbText, lbValue or lbData in normal or reversed order, using case-sensitive or case-insensitive comparison. This command supports UNICODE characters.\nWhen sorting by `\"VALUE\"`, the rows with the same lbValue will additionally be sorted by lbText in the order specified by `reversedOrder` flag, text specified by `useTextRight` flag and case-sensitivity specified by `caseSensitive` flag.\n\n> [!IMPORTANT]\n> - This command supports referencing control via IDC as well, but as with any use of IDC in UI Control commands, a dialog should be present, i.e. UI user interaction is created with createDialog rather than createDisplay.\n> - As this command supports UNICODE by default, which may result in slower sorting, you can switch it off with `unicodeOff` param.","syntaxes":[{"syntax":"controlOrIDC lbSortBy [sortByType, reversedOrder, caseSensitive, useTextRight, unicodeOff]","params":[{"name":"controlOrIDC","type":"Control or Number","description":"the ListBox control or its IDC","type_expr":"Control | Number"},{"name":"sortByType","type":"String","optional":true,"default":"\"TEXT\"","description":"one of:\n\n- `\"TEXT\"`\n- `\"VALUE\"`\n- `\"DATA\"`","type_expr":"String","text":"sortByType: String - (Optional, default \"TEXT\") one of:\n\n- `\"TEXT\"`\n- `\"VALUE\"`\n- `\"DATA\"`"},{"name":"reversedOrder","type":"Boolean","optional":true,"default":"false","description":"true for sorting in reversed order","type_expr":"Boolean","text":"reversedOrder: Boolean - (Optional, default false) true for sorting in reversed order"},{"name":"caseSensitive","type":"Boolean","optional":true,"default":"false","description":"true for using case-sensitive comparison","type_expr":"Boolean","text":"caseSensitive: Boolean - (Optional, default false) true for using case-sensitive comparison"},{"name":"useTextRight","type":"Boolean","optional":true,"default":"false","description":"true to sort by text right","type_expr":"Boolean","text":"useTextRight: Boolean - (Optional, default false) true to sort by text right"},{"name":"unicodeOff","type":"Boolean","optional":true,"default":"false","description":"true to switch off UNICODE conversion for faster sorting","type_expr":"Boolean","text":"unicodeOff: Boolean - (Optional, default false) true to switch off UNICODE conversion for faster sorting"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"controlOrIDC"},"right":{"text":"[sortByType, reversedOrder, caseSensitive, useTextRight, unicodeOff]"}}],"examples":[{"text":"```sqf\nwith uiNamespace do\n{\n    private _lb = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscListBox\", -1];\n    _lb ctrlSetPosition [0,0,1,1];\n    _lb ctrlCommit 0;\n    lbClear _lb;\n    {\n        _lb lbAdd (_x select 0);\n        _lb lbSetValue [_forEachIndex, _x select 1];\n    }\n    forEach [[\"В\",1], [\"Я\",0], [\"Б\",1], [\"Ю\",0], [\"А\",1]];\n    _lb lbSortBy [\"VALUE\", false, false];\n};\n```","code":["with uiNamespace do\n{\n\tprivate _lb = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscListBox\", -1];\n\t_lb ctrlSetPosition [0,0,1,1];\n\t_lb ctrlCommit 0;\n\tlbClear _lb;\n\t{\n\t\t_lb lbAdd (_x select 0);\n\t\t_lb lbSetValue [_forEachIndex, _x select 1];\n\t}\n\tforEach [[\"В\",1], [\"Я\",0], [\"Б\",1], [\"Ю\",0], [\"А\",1]];\n\t_lb lbSortBy [\"VALUE\", false, false];\n};"]}],"see_also":["lnbSortBy","lnbSort","lnbSortByValue","lbSort","lbSortByValue","tvSort","tvSortByValue","sort"]},{"name":"lbSortByValue","title":"lbSortByValue","type":"command","url":"https://community.bistudio.com/wiki/lbSortByValue","revid":379446,"updated":"2026-10-31T00:07:36Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Sorts the ListBox entries by lbValue. The entries are sorted in ascending order. Also note that this command will mix up the entries randomly if multiple entries have the same value. In Arma 3 use lbSortBy to avoid this problem.","syntaxes":[{"syntax":"lbSortByValue control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"control"}},{"syntax":"lbSortByValue idc","since":"arma3 1.68","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"idc"}}],"examples":[{"code":["lbSortByValue _control;"]},{"code":["lbSortByValue 101;"]}],"see_also":["lbSortBy","lbSort"],"notes":[{"user":"RoehrenRadio","date":"2011-01-01T22:54:00Z","text":"A good way to avoid that this Command will mix your Listbox up is, to assign your Value summed up with the Index ID returned by lbAdd to your Listbox Entries."},{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the LB command family can be found here"}]},{"name":"lbText","title":"lbText","type":"command","url":"https://community.bistudio.com/wiki/lbText","revid":379447,"updated":"2026-10-31T00:07:44Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Returns the shown text of the item with the given index of the CT_LISTBOX or CT_COMBO.","syntaxes":[{"syntax":"lbText [idc, index]","params":[{"name":"idc","type":"Number","description":"control IDC","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, index]"}},{"syntax":"control lbText index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["_text = lbText [101, 0];"]},{"code":["_text = _control lbText 0;"]}],"see_also":["lbAdd","lbSetText"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"lbTextRight","title":"lbTextRight","type":"command","url":"https://community.bistudio.com/wiki/lbTextRight","revid":377807,"updated":"2026-01-03T04:08:07Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":null,"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Returns the shown right text in the item with the given index of the listbox or combobox with id idc of the topmost user dialog.","syntaxes":[{"syntax":"lbTextRight [idc, index]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, index]"}},{"syntax":"control lbTextRight index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["_text = lbTextRight [101, 0];"]},{"code":["_text = _control lbTextRight 0;"]}],"see_also":["lbSetTextRight","lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetPicture","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbValue"]},{"name":"lbTooltip","title":"lbTooltip","type":"command","url":"https://community.bistudio.com/wiki/lbTooltip","revid":309997,"updated":"2022-05-05T12:20:38Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Returns tooltip for ListBox, ComboBox and Toolbox","syntaxes":[{"syntax":"lbTooltip [idc, index]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, index]"}},{"syntax":"control lbTooltip index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["lbTooltip [1, 1];"]}],"see_also":["lbSetTooltip","ctrlTooltip"]},{"name":"lbValue","title":"lbValue","type":"command","url":"https://community.bistudio.com/wiki/lbValue","revid":379448,"updated":"2026-10-31T00:07:52Z","groups":["GUI Control - ListBox"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Returns the additional integer value of the item with the given index of the CT_LISTBOX or CT_COMBO.","syntaxes":[{"syntax":"lbValue [idc, index]","params":[{"name":"idc","type":"Number","description":"control IDC","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"only integers"},"form":"unary","right":{"text":"[idc, index]"}},{"syntax":"control lbValue index","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"only integers"},"form":"binary","left":{"text":"control"},"right":{"text":"index"}}],"examples":[{"code":["_value = lbValue [101, 0];"]},{"code":["_value = _control lbValue 0;"]}],"see_also":["lbSetValue","lbSortByValue"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-10T00:00:00Z","text":"More information on the CT_LISTBOX command family can be found here."}]},{"name":"leader","title":"leader","type":"command","url":"https://community.bistudio.com/wiki/leader","revid":379223,"updated":"2026-10-30T22:54:04Z","groups":["Groups"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the group leader for the given **unit** or **group**. For dead units, objNull is returned.","syntaxes":[{"syntax":"leader unitOrGroup","params":[{"name":"unitOrGroup","type":"Object, Group or Team Member","type_expr":"Object | Group | Team Member"}],"returns":{"type":"Object or Team Member","type_expr":"Object | Team Member"},"form":"unary","right":{"text":"unitOrGroup"}}],"examples":[{"code":["leader group player == leader player;"]},{"code":["leader group vehicle player;"]},{"code":["leader player;"]}],"see_also":["formationLeader","formLeader","isFormationLeader","selectLeader"]},{"name":"leaderboardDeInit","title":"leaderboardDeInit","type":"command","url":"https://community.bistudio.com/wiki/leaderboardDeInit","revid":323055,"updated":"2022-06-28T21:43:11Z","groups":["Leaderboards"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Deletes internal class for the leaderboard with given name. Returns true if the board has been found and deinitialized.","syntaxes":[{"syntax":"leaderboardDeInit boardName","params":[{"name":"boardName","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"boardName"}}],"examples":[{"code":["leaderboardDeInit \"TT01\";"]}],"see_also":["leaderboardGetRows","leaderboardInit","leaderboardRequestRowsFriends","leaderboardRequestRowsGlobal","leaderboardRequestRowsGlobalAroundUser","leaderboardsRequestUploadScore","leaderboardsRequestUploadScoreKeepBest","leaderboardState"]},{"name":"leaderboardGetRows","title":"leaderboardGetRows","type":"command","url":"https://community.bistudio.com/wiki/leaderboardGetRows","revid":377273,"updated":"2026-01-02T06:36:42Z","groups":["Leaderboards"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns values for the given leaderboard; this can be called after the one of the row request function has been called and successfully finished!","syntaxes":[{"syntax":"leaderboardGetRows boardName","params":[{"name":"boardName","type":"String","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"format: [[player1Name, score, rank], [player2Name, score, rank], [player3Name, score, rank] ...]","text":"Array format: [[player1Name, score, rank], [player2Name, score, rank], [player3Name, score, rank] ...]"},"form":"unary","right":{"text":"boardName"}}],"examples":[{"code":["leaderboardGetRows \"TT01\";"]}],"see_also":["leaderboardDeInit","leaderboardInit","leaderboardRequestRowsFriends","leaderboardRequestRowsGlobal","leaderboardRequestRowsGlobalAroundUser","leaderboardsRequestUploadScore","leaderboardsRequestUploadScoreKeepBest","leaderboardState"]},{"name":"leaderboardInit","title":"leaderboardInit","type":"command","url":"https://community.bistudio.com/wiki/leaderboardInit","revid":323025,"updated":"2022-06-28T21:43:08Z","groups":["Leaderboards"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Initialize the leaderboard structure for board with given name. Returns true if board is already initialized.","syntaxes":[{"syntax":"leaderboardInit boardName","params":[{"name":"boardName","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"boardName"}}],"examples":[{"code":["leaderboardInit \"TT01\";"]}],"see_also":["leaderboardDeInit","leaderboardGetRows","leaderboardRequestRowsFriends","leaderboardRequestRowsGlobal","leaderboardRequestRowsGlobalAroundUser","leaderboardsRequestUploadScore","leaderboardsRequestUploadScoreKeepBest","leaderboardState"]},{"name":"leaderboardRequestRowsFriends","title":"leaderboardRequestRowsFriends","type":"command","url":"https://community.bistudio.com/wiki/leaderboardRequestRowsFriends","revid":319507,"updated":"2022-05-13T09:24:12Z","groups":["Leaderboards"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","description":"Requests given leaderboard to download friends rows from the given leaderboard","syntaxes":[{"syntax":"leaderboardRequestRowsFriends boardName","params":[{"name":"boardName","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"boardName"}}],"examples":[{"code":["leaderboardRequestRowsFriends \"TT01\";"]}],"see_also":["leaderboardDeInit","leaderboardGetRows","leaderboardRequestRowsGlobal","leaderboardRequestRowsGlobalAroundUser","leaderboardsRequestUploadScore","leaderboardsRequestUploadScoreKeepBest","leaderboardState"]},{"name":"leaderboardRequestRowsGlobal","title":"leaderboardRequestRowsGlobal","type":"command","url":"https://community.bistudio.com/wiki/leaderboardRequestRowsGlobal","revid":349053,"updated":"2023-11-08T14:47:19Z","groups":["Leaderboards"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Requests given leaderboard to download values from global table.","syntaxes":[{"syntax":"leaderboardRequestRowsGlobal [leaderboard, offset, rows]","params":[{"name":"leaderboard","type":"String","description":"name of the leaderboard","type_expr":"String"},{"name":"offset","type":"Number","description":"defines how many rows are skipped","type_expr":"Number"},{"name":"rows","type":"Number","description":"defines how many rows are requested","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if request has been started"},"form":"unary","right":{"text":"[leaderboard, offset, rows]"}}],"examples":[{"code":["_isGettingValues = leaderboardRequestRowsGlobal [\"TT01\", 0, 10];"]}],"see_also":["leaderboardGetRows","leaderboardInit","leaderboardRequestRowsFriends","leaderboardRequestRowsGlobalAroundUser","leaderboardsRequestUploadScore","leaderboardsRequestUploadScoreKeepBest","leaderboardState"]},{"name":"leaderboardRequestRowsGlobalAroundUser","title":"leaderboardRequestRowsGlobalAroundUser","type":"command","url":"https://community.bistudio.com/wiki/leaderboardRequestRowsGlobalAroundUser","revid":349073,"updated":"2023-11-08T14:47:22Z","groups":["Leaderboards"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Requests given leaderboard to download values around the user position in the table.","syntaxes":[{"syntax":"leaderboardRequestRowsGlobalAroundUser [leaderboard, offset, rows]","params":[{"name":"leaderboard","type":"String","description":"name of the leaderboard","type_expr":"String"},{"name":"offset","type":"Number","description":"offset from user position.","type_expr":"Number"},{"name":"rows","type":"Number","description":"defines how many rows are requested","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if request has been started"},"form":"unary","right":{"text":"[leaderboard, offset, rows]"}}],"examples":[{"code":["_isGettingValues = leaderboardRequestRowsGlobalAroundUser [\"TT01\", -5, 10];"]}],"see_also":["leaderboardGetRows","leaderboardInit","leaderboardRequestRowsFriends","leaderboardRequestRowsGlobal","leaderboardsRequestUploadScore","leaderboardsRequestUploadScoreKeepBest","leaderboardState"]},{"name":"leaderboardsRequestUploadScore","title":"leaderboardsRequestUploadScore","type":"command","url":"https://community.bistudio.com/wiki/leaderboardsRequestUploadScore","revid":351313,"updated":"2023-11-27T04:56:07Z","groups":["Leaderboards"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","description":"Starts async. operation to upload score to board with given name, value always overwrite the current value in the board. The board has to be initialized before the call.","syntaxes":[{"syntax":"leaderboardsRequestUploadScore [boardName, score, details]","params":[{"name":"boardName","type":"String","type_expr":"String"},{"name":"score","type":"Number","type_expr":"Number"},{"name":"details","type":"Array","optional":true,"type_expr":"Array","text":"details: Array - (Optional)"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"[boardName, score, details]"}}],"examples":[{"code":["leaderboardsRequestUploadScore [\"TT01\", 1234, [5,6,7,8]];"]}],"see_also":["leaderboardRequestRowsGlobal"]},{"name":"leaderboardsRequestUploadScoreKeepBest","title":"leaderboardsRequestUploadScoreKeepBest","type":"command","url":"https://community.bistudio.com/wiki/leaderboardsRequestUploadScoreKeepBest","revid":364164,"updated":"2024-05-05T10:46:42Z","groups":["Leaderboards"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","description":"Starts async. operation to upload score to board with given name, value is only stored to board if it is better than one already in the board. The board has to be initialised before the call.","syntaxes":[{"syntax":"leaderboardsRequestUploadScoreKeepBest [boardName, score, details]","params":[{"name":"boardName","type":"String","type_expr":"String"},{"name":"score","type":"Number","type_expr":"Number"},{"name":"details","type":"Array of Numbers","optional":true,"type_expr":"Array<Number>","text":"details: Array of Numbers (Optional)"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"[boardName, score, details]"}}],"examples":[{"code":["leaderboardsRequestUploadScoreKeepBest [\"TT01\", 1234, [5,6,7,8]];"]}],"see_also":["leaderboardsRequestUploadScore"]},{"name":"leaderboardState","title":"leaderboardState","type":"command","url":"https://community.bistudio.com/wiki/leaderboardState","revid":339110,"updated":"2023-04-26T10:54:35Z","groups":["Leaderboards"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","description":"Returns the state of the board with the given name.","syntaxes":[{"syntax":"leaderboardState boardname","params":[{"name":"boardname","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"- 0: Busy (async. operation in progress) - 1: Async. operation ended with success - 2: Async. operation ended with error - 3: Invalid board (bad board name, not initialised etc)","text":"Number\n\n- 0: Busy (async. operation in progress)\n- 1: Async. operation ended with success\n- 2: Async. operation ended with error\n- 3: Invalid board (bad board name, not initialised etc)"},"form":"unary","right":{"text":"boardname"}}],"examples":[{"code":["leaderboardState \"TT01\";"]}],"see_also":["leaderboardsRequestUploadScoreKeepBest","leaderboardsRequestUploadScore"]},{"name":"leaveVehicle","title":"leaveVehicle","type":"command","url":"https://community.bistudio.com/wiki/leaveVehicle","revid":347946,"updated":"2023-11-07T05:26:00Z","groups":["Unit Control","Groups"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Ceases the using of the vehicle by a group and unassigns vehicle from the group.\nIf the argument is a single unit, the vehicle will be unassigned from unit's group.\nAfter vehicle is unassigned from the group, each individual crew member then unassigned from the vehicle.\n\nIn short the command could be hypothetically presented as:\n\n```sqf\nleaveVehicle = un-addVehicle + unassignVehicle forEach crew\n```\n\nHowever, to make it more reliable, it is best to move unit out of the vehicle manually with moveOut and force unassign the vehicle with unassignVehicle.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"group leaveVehicle vehicle","params":[{"name":"group","type":"Group or Object","description":"object's Group is used","type_expr":"Group | Object"},{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"vehicle"}}],"examples":[{"code":["_unit leaveVehicle _vehicle;"]},{"code":["_grp leaveVehicle _vehicle;"]}],"see_also":["addVehicle","assignAsCargo","assignAsCommander","assignAsDriver","assignAsGunner","assignedVehicle","unassignVehicle","doGetOut","commandGetOut","createVehicleCrew","assignedVehicles","assignedGroup","fullCrew"],"notes":[{"user":"Killzone_Kid","date":"2013-08-31T16:08:00Z","text":"In Arma 3 this command will not force a player to exit from a vehicle. It will unassign vehicle role for this player. AI crew however will also disembark."}]},{"name":"libraryCredits","title":"libraryCredits","type":"command","url":"https://community.bistudio.com/wiki/libraryCredits","revid":369338,"updated":"2024-09-03T18:43:01Z","groups":["System"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Returns the credits for the libraries used by the game.","syntaxes":[{"syntax":"libraryCredits","params":[],"returns":{"type":"Array","type_expr":"Array","description":"[array1, array2, (..), arrayN] all under the form [libraryName, credits]"},"form":"nullary"}],"examples":[{"text":"```sqf\nhint str libraryCredits; // as of Arma 2 OA 1.62.95208\n\n/*\n[\n    [\n        \"Botan\",\n        \"1999-2012 Jack Lloyd, 2001 Peter J Jones, 2004-2007 Justin Karneges, 2004 Vaclav Ovsik, 2005 Matthew Gregan, 2005-2006 Matt Johnston, 2006 Luca Piccarreta, 2007 Yves Jerschow, 2007-2008 FlexSecure GmbH, 2007-2008 Technische Universitat Darmstadt, 2007-2008 Falko Strenzke, 2007-2008 Martin Doering, 2007 Manuel Hartl, 2007 Christoph Ludwig, 2007 Patrick Sona, 2010 Olivier de Gaalon\"\n    ],\n    [\n        \"rapidjson\",\n        \"2011 Milo Yip\"\n    ],\n    [\n        \"libcurl\",\n        \"Copyright (c) 1996 - 2012, Daniel Stenberg\"\n    ],\n    [\n        \"GameSpy\",\n        \"2009 GameSpy Industries, Inc.\"\n    ],\n    [\n        \"Theora\",\n        \"2002-2009 by the Xiph.Org Foundation http://www.xiph.org/\"\n    ],\n    [\n        \"OggVorbis\",\n        \"1994-2002 by the Xiph.Org Foundation http://www.xiph.org/\"\n    ],\n    [\n        \"Intel JPEG Library\",\n        \"1998 Intel Corporation\"\n    ],\n    [\n        \"Matrix Template Library\",\n        \"2001-2005 The Trustees of Indiana University\"\n    ],\n    [\n        \"Matrix Template Library\",\n        \"1998-2001 University of Notre Dame\"\n    ],\n    [\n        \"Speex\",\n        \"2002-2006 Jean-Marc Valin\"\n    ],\n    [\n        \"LZO Professional\",\n        \"1996-2011 Markus Franz Xaver Johannes Oberhumer\"\n    ],\n    [\n        \"NVIDIA FXAA by TIMOTHY LOTTES\",\n        \"2010, 2011 NVIDIA CORPORATION\"\n    ],\n    [\n        \"Jimenez's MLAA\",\n        \"2012 2011 by Jorge Jimenez, Belen Masia, Jose I. Echevarria, Fernando Navarro and Diego Gutierrez\"\n    ]\n]\n*/\n```","code":["hint str libraryCredits; // as of Arma 2 OA 1.62.95208\n\n/*\n[\n\t[\n\t\t\"Botan\",\n\t\t\"1999-2012 Jack Lloyd, 2001 Peter J Jones, 2004-2007 Justin Karneges, 2004 Vaclav Ovsik, 2005 Matthew Gregan, 2005-2006 Matt Johnston, 2006 Luca Piccarreta, 2007 Yves Jerschow, 2007-2008 FlexSecure GmbH, 2007-2008 Technische Universitat Darmstadt, 2007-2008 Falko Strenzke, 2007-2008 Martin Doering, 2007 Manuel Hartl, 2007 Christoph Ludwig, 2007 Patrick Sona, 2010 Olivier de Gaalon\"\n\t],\n\t[\n\t\t\"rapidjson\",\n\t\t\"2011 Milo Yip\"\n\t],\n\t[\n\t\t\"libcurl\",\n\t\t\"Copyright (c) 1996 - 2012, Daniel Stenberg\"\n\t],\n\t[\n\t\t\"GameSpy\",\n\t\t\"2009 GameSpy Industries, Inc.\"\n\t],\n\t[\n\t\t\"Theora\",\n\t\t\"2002-2009 by the Xiph.Org Foundation http://www.xiph.org/\"\n\t],\n\t[\n\t\t\"OggVorbis\",\n\t\t\"1994-2002 by the Xiph.Org Foundation http://www.xiph.org/\"\n\t],\n\t[\n\t\t\"Intel JPEG Library\",\n\t\t\"1998 Intel Corporation\"\n\t],\n\t[\n\t\t\"Matrix Template Library\",\n\t\t\"2001-2005 The Trustees of Indiana University\"\n\t],\n\t[\n\t\t\"Matrix Template Library\",\n\t\t\"1998-2001 University of Notre Dame\"\n\t],\n\t[\n\t\t\"Speex\",\n\t\t\"2002-2006 Jean-Marc Valin\"\n\t],\n\t[\n\t\t\"LZO Professional\",\n\t\t\"1996-2011 Markus Franz Xaver Johannes Oberhumer\"\n\t],\n\t[\n\t\t\"NVIDIA FXAA by TIMOTHY LOTTES\",\n\t\t\"2010, 2011 NVIDIA CORPORATION\"\n\t],\n\t[\n\t\t\"Jimenez's MLAA\",\n\t\t\"2012 2011 by Jorge Jimenez, Belen Masia, Jose I. Echevarria, Fernando Navarro and Diego Gutierrez\"\n\t]\n]\n*/"]}],"see_also":["libraryDisclaimers"]},{"name":"libraryDisclaimers","title":"libraryDisclaimers","type":"command","url":"https://community.bistudio.com/wiki/libraryDisclaimers","revid":377093,"updated":"2026-01-01T09:49:31Z","groups":["System"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Returns the library disclaimers.","syntaxes":[{"syntax":"libraryDisclaimers","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [text]\n- text: String - the library disclaimer","text":"Array with [text]\n\n- text: String - the library disclaimer"},"form":"nullary"}],"examples":[{"text":"```sqf\nhint str libraryDisclaimers;\n/*\n    returns, in Arma 2:OA 1.62.95208:\n    [\"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"]\n*/\n```","code":["hint str libraryDisclaimers;\n/*\n\treturns, in Arma 2:OA 1.62.95208:\n\t[\"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"]\n*/"]}],"see_also":["libraryCredits"]},{"name":"lifeState","title":"lifeState","type":"command","url":"https://community.bistudio.com/wiki/lifeState","revid":329358,"updated":"2022-07-27T12:23:13Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the life state of the given unit.\n\n| Arma 2 | Arma 3 |\n|---|---|\n| - \"ALIVE\"<br>- \"DEAD\"<br>- \"DEAD-RESPAWN\"<br>- \"DEAD-SWITCHING\"<br>- \"ASLEEP\"<br>- \"UNCONSCIOUS\" | - \"HEALTHY\"<br>- \"DEAD\"<br>- \"DEAD-RESPAWN\"<br>- \"DEAD-SWITCHING\"<br>- \"INCAPACITATED\"<br>- \"INJURED\" |\n\n> [!NOTE]\n> **Arma 3:** In Arma 3, lifeState seems to change to \"INJURED\" when `damage aliveUnit >= 0.1` (0.1 seeming to be the value defined in config under \"InjuredTreshold\" [sic]). When the state is \"INCAPACITATED\", a sub-state is available via incapacitatedState command.","syntaxes":[{"syntax":"lifeState unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _lifeState = lifeState player;"]}],"see_also":["setUnconscious","incapacitatedState"]},{"name":"lightAttachObject","title":"lightAttachObject","type":"command","url":"https://community.bistudio.com/wiki/lightAttachObject","revid":377510,"updated":"2026-01-02T06:50:14Z","groups":["Lights"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Attach light to given object at given position on object.","syntaxes":[{"syntax":"light lightAttachObject [object, position]","params":[{"name":"light","type":"Object","type_expr":"Object"},{"name":"object","type":"Object","type_expr":"Object"},{"name":"position","type":"Position","type_expr":"Position"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"[object, position]"}}],"examples":[{"code":["myLight lightAttachObject [myVehicle, [-0.5,-0.25,1]];"]}],"see_also":["setLightAmbient","setLightBrightness","lightDetachObject","setLightColor","setLightIntensity","setLightAttenuation","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightDayLight","attachObject","attachTo","attachedObjects","attachedTo","waypointAttachVehicle","waypointAttachedVehicle","triggerAttachVehicle","attachedObject"],"notes":[{"user":"Feersum","date":"2006-12-01T16:42:00Z","text":"Light can be created with command createVehicleLocal with special vehicle class \"#lightpoint\"\nfor example:\n\n```sqf\n_light = \"#lightpoint\" createVehicleLocal pos;\n_light setLightBrightness 1.0;\n_light setLightAmbient [0.0, 1.0, 0.0];\n_light setLightColor [0.0, 1.0, 0.0];\n_light lightAttachObject [_object, [0,0,0]];\n```"},{"user":"Waffle SS.","date":"2015-03-31T04:49:00Z","text":"When attached, movement is slow to update (jumpy). Use attachTo when attaching a light to moving objects."}]},{"name":"lightDetachObject","title":"lightDetachObject","type":"command","url":"https://community.bistudio.com/wiki/lightDetachObject","revid":309932,"updated":"2022-05-05T12:16:58Z","groups":["Lights"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Detach light from object.","syntaxes":[{"syntax":"lightDetachObject light","params":[{"name":"light","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"light"}}],"examples":[{"code":["lightDetachObject _light;"]}],"see_also":["setLightAmbient","setLightBrightness","lightAttachObject","setLightColor","setLightIntensity","setLightAttenuation","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightDayLight"]},{"name":"lightIsOn","title":"lightIsOn","type":"command","url":"https://community.bistudio.com/wiki/lightIsOn","revid":369182,"updated":"2024-09-03T10:34:45Z","groups":["Lights"],"status":"ok","games":{"ofp":"1.04","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.04","arma3_since":"0.50","description":"Check if lampost is on (shining).\n\n> [!NOTE]\n> A lamp state is **local** to each client (see switchLight).\n\n> [!NOTE]\n> This command was originally designed to only work with CfgNonAIVehicles class \"StreetLamp\" only;\n> since Arma 3 v1.92 this command was extended to work with street lights.","syntaxes":[{"syntax":"lightIsOn lamppost","params":[{"name":"lamppost","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"can be one of:\n- \"ON\" - light is on - \"OFF\" - light is off - \"AUTO\" - applicable only to the light of type \"StreetLamp\" and is only on during the night. - \"ERROR\" - if command fails","text":"String - can be one of:\n\n- **\"ON\"** - light is on\n- **\"OFF\"** - light is off\n- **\"AUTO\"** - applicable only to the light of type \"StreetLamp\" and is only on during the night.\n- **\"ERROR\"** - if command fails"},"form":"unary","right":{"text":"lamppost"}}],"examples":[{"code":["if (lightIsOn nearestObject [player, \"StreetLamp\"] == \"ON\") then { hint \"nightime\"; };"]},{"code":["_it = lightIsOn object 159582;"]},{"text":"```sqf\nif (count allMissionObjects \"StreetLamp\" == 0) then {\n    hint \"Objects compatible with 'lightIsOn' are not found.\";\n} else {\n    hint \"'lightIsOn' compatible objects are found!\";\n};\n```","code":["if (count allMissionObjects \"StreetLamp\" == 0) then {\n\thint \"Objects compatible with 'lightIsOn' are not found.\";\n} else {\n\thint \"'lightIsOn' compatible objects are found!\";\n};"]}],"see_also":["switchLight"]},{"name":"lightnings","title":"lightnings","type":"command","url":"https://community.bistudio.com/wiki/lightnings","revid":310753,"updated":"2022-05-07T20:21:32Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Return the current lightnings value.","syntaxes":[{"syntax":"lightnings","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"text":"Get the current *lightnings* value:\n\n```sqf\n_lightningsVal = lightnings;\n```","code":["_lightningsVal = lightnings;"]}],"see_also":["setLightnings"]},{"name":"limitSpeed","title":"limitSpeed","type":"command","url":"https://community.bistudio.com/wiki/limitSpeed","revid":379293,"updated":"2026-10-30T23:47:14Z","groups":["Unit Control","Object Manipulation"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Limit the speed of an AI-driven vehicle or AI person to given value. It has continuous effect and AI will not break through the speed limitation until one is contacted, engaged or regrouped.","syntaxes":[{"syntax":"objectName limitSpeed speed","params":[{"name":"objectName","type":"Object","type_expr":"Object"},{"name":"speed","type":"Number or Arma 3 v2.22 Boolean","description":"in km/h; By default, it's `2 * maxSpeed` of the vehicle/unit (which is defined in config). See Example 1.","type_expr":"Number | Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"objectName"},"right":{"text":"speed"}}],"examples":[{"text":"```sqf\nleader player limitSpeed 5;        // set to walking speed\nsleep 30;\nleader player limitSpeed (2 * getNumber(configOf leader player >> \"maxSpeed\"));    // remove the limit\n```","code":["leader player limitSpeed 5;\t\t// set to walking speed\nsleep 30;\nleader player limitSpeed (2 * getNumber(configOf leader player >> \"maxSpeed\"));\t// remove the limit"]},{"code":["addMissionEventHandler [\"OnEachFrame\", { hintSilent format [\"myVehicle's speed: %1 km/h\", speed myVehicle toFixed 2] }];\nsleep 5;\nmyVehicle limitSpeed 5;"]},{"text":"```sqf\n// it was necessary to use limitSpeed repeatedly before Arma 3 1.24\n_this setVariable [\"speedLimit\", 50];\n_this spawn {\n    while { sleep 0.1; canMove _this } do\n    {\n        _this limitSpeed (_this getVariable \"speedLimit\");\n    };\n};\nsleep 10;\n_this setVariable [\"speedLimit\", 100]; // update the speed limit\n```","code":["// it was necessary to use limitSpeed repeatedly before Arma 3 1.24\n_this setVariable [\"speedLimit\", 50];\n_this spawn {\n\twhile { sleep 0.1; canMove _this } do\n\t{\n\t\t_this limitSpeed (_this getVariable \"speedLimit\");\n\t};\n};\nsleep 10;\n_this setVariable [\"speedLimit\", 100]; // update the speed limit"]},{"text":"Since Arma 3 2.22:\n\n```sqf\n_heli limitSpeed false; // reset to default\n```","code":["_heli limitSpeed false; // reset to default"]}],"problems":"Since Take On Helicopters v1.00 and as of Arma 3 v2.14, using any negative value on a helicopter will not reset the speed limit, but will force it to fly in reverse.","see_also":["speed","setCruiseControl","forceSpeed"]},{"name":"linearConversion","title":"linearConversion","type":"command","url":"https://community.bistudio.com/wiki/linearConversion","revid":364172,"updated":"2024-05-05T10:46:44Z","groups":["Math"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Converts given value from given \"from\" range to wanted \"to\" range. If clipping is set to true, the resulting value is guaranteed to be within \"to\" range no matter what.\n\n> [!NOTE]\n> **Arma 3:** Faster alternative to BIS_fnc_linearConversion.","syntaxes":[{"syntax":"linearConversion [minFrom, maxFrom, value, minTo, maxTo, clip]","params":[{"name":"minFrom","type":"Number","description":"start \"from\" range","type_expr":"Number"},{"name":"maxFrom","type":"Number","description":"end \"from\" range","type_expr":"Number"},{"name":"value","type":"Number","description":"given value from \"from\" range","type_expr":"Number"},{"name":"minTo","type":"Number","description":"start \"to\" range","type_expr":"Number"},{"name":"maxTo","type":"Number","description":"end \"to\" range","type_expr":"Number"},{"name":"clip","type":"Boolean","optional":true,"default":"false","description":"if true, resulting value cannot leave \"to\" range","type_expr":"Boolean","text":"clip: Boolean - (Optional, default false) if true, resulting value cannot leave \"to\" range"}],"returns":{"type":"Number","type_expr":"Number","description":"respectful value from \"to\" range"},"form":"unary","right":{"text":"[minFrom, maxFrom, value, minTo, maxTo, clip]"}}],"examples":[{"code":["// Say given range is 0 to 1 and wanted range is 0 to 100 (percent calculation). Given value 0.55 then will be 55\nlinearConversion [0, 1, 0.55, 0, 100];\n\n// but if given value is 1.1 it will return 110\nlinearConversion [0, 1, 1.1, 0, 100, false];\n\n// or if clipping is true it will return 100\nlinearConversion [0, 1, 1.1, 0, 100, true];"]},{"code":["linearConversion [4, 8, 5, 0, 1, false];"]},{"text":"```sqf\n// Calculate days from 1/1/1970\nfnc_daysFromEpoc =\n{\n    private _year = param [0];\n    private _days = 0;\n    for \"_i\" from 1970 to _year - 1 do\n    {\n        _days = _days + round linearConversion [0, 1, dateToNumber [_i, 12, 31, 23, 59], 0, 365, false];\n    };\n    _days + linearConversion [0, 1, dateToNumber _this, 0, 365, false];\n};\n\nhint str (date call fnc_daysFromEpoc);\n```","code":["// Calculate days from 1/1/1970\nfnc_daysFromEpoc = \n{\n\tprivate _year = param [0];\n\tprivate _days = 0;\n\tfor \"_i\" from 1970 to _year - 1 do \n\t{\n\t\t_days = _days + round linearConversion [0, 1, dateToNumber [_i, 12, 31, 23, 59], 0, 365, false];\n\t};\n\t_days + linearConversion [0, 1, dateToNumber _this, 0, 365, false];\n};\n\nhint str (date call fnc_daysFromEpoc);"]}],"see_also":["round","floor","ceil","vectorLinearConversion","bezierInterpolation"]},{"name":"lineBreak","title":"lineBreak","type":"command","url":"https://community.bistudio.com/wiki/lineBreak","revid":321099,"updated":"2022-05-13T13:56:57Z","groups":["Strings","Structured Text"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Creates a structured text containing a line break.","syntaxes":[{"syntax":"lineBreak","params":[],"returns":{"type":"Structured Text","type_expr":"Structured Text"},"form":"nullary"}],"examples":[{"code":["hint composeText [\"First line\", lineBreak, \"Second line\"];"]},{"code":["hint str (composeText [lineBreak] == parseText \"<br/>\"); // true"]}],"see_also":["composeText","parseText","Structured Text","text","image","endl"]},{"name":"lineIntersects","title":"lineIntersects","type":"command","url":"https://community.bistudio.com/wiki/lineIntersects","revid":377702,"updated":"2026-01-02T09:03:32Z","groups":["Math - Geometry"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks for object intersection with a virtual line between two positions. Since Arma 3 v2.20, there is an alternative syntax that does multiple checks in parallel, faster than multiple calls.\n\n> [!NOTE]\n> - Does not work under water.\n> - Max hardcoded distance is 1000m.","syntaxes":[{"syntax":"lineIntersects [begPos, endPos, objIgnore1, objIgnore2]","params":[{"name":"begPos","type":"PositionASL","type_expr":"PositionASL"},{"name":"endPos","type":"PositionASL","type_expr":"PositionASL"},{"name":"objIgnore1","type":"Object","optional":true,"default":"objNull","description":"object to ignore. When testing intersections from an object/unit/vehicle, pass that object here to prevent intersections inside of the object","type_expr":"Object","text":"objIgnore1: Object - (Optional, default objNull) object to ignore. When testing intersections from an object/unit/vehicle, pass that object here to prevent intersections inside of the object"},{"name":"objIgnore2","type":"Object","optional":true,"default":"objNull","description":"another object to ignore. When testing intersections of a line between two objects, pass the second object here to prevent intersections inside of it being reported","type_expr":"Object","text":"objIgnore2: Object - (Optional, default objNull) another object to ignore. When testing intersections of a line between two objects, pass the second object here to prevent intersections inside of it being reported"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if an intersection happens with an object (not with terrain)"},"form":"unary","right":{"text":"[begPos, endPos, objIgnore1, objIgnore2]"}},{"syntax":"lineIntersects [[element1, element2, ...]]","since":"arma3 2.20","params":[{"name":"elementN","type":"Array with [begPos, endPos, objIgnore1, objIgnore2]","description":"Array with [begPos, endPos, objIgnore1, objIgnore2]\n\n- begPos: PositionASL\n- endPos: PositionASL\n- objIgnore1: Object - (Optional, default objNull) object to ignore. When testing intersections from an object/unit/vehicle, pass that object here to prevent intersections inside of the object\n- objIgnore2: Object - (Optional, default objNull) another object to ignore. When testing intersections of a line between two objects, pass the second object here to prevent intersections inside of it being reported","type_expr":"Array","text":"elementN: Array with [begPos, endPos, objIgnore1, objIgnore2]\n\n- begPos: PositionASL\n- endPos: PositionASL\n- objIgnore1: Object - (Optional, default objNull) object to ignore. When testing intersections from an object/unit/vehicle, pass that object here to prevent intersections inside of the object\n- objIgnore2: Object - (Optional, default objNull) another object to ignore. When testing intersections of a line between two objects, pass the second object here to prevent intersections inside of it being reported"}],"returns":{"type":"Array","type_expr":"Array","description":"with [result1, result2, ...] - true if an intersection happens with an object (not with terrain) for the Nth element","text":"Array with [result1, result2, ...] - true if an intersection happens with an object (not with terrain) for the Nth element"},"form":"unary","right":{"text":"[[element1, element2, ...]]"}}],"examples":[{"code":["private _hasStraightLineToChopper = lineIntersects [eyePos player, aimPos chopper, player, chopper];"]},{"text":"Alternative syntax to check intersections in parallel:\n\n```sqf\nprivate _enemies = units opfor;\nprivate _enemyDataArray = _enemies apply { [eyePos player, aimPos _x, player, _x] };\nprivate _result = lineIntersects [_enemyDataArray];\n```","code":["private _enemies = units opfor;\nprivate _enemyDataArray = _enemies apply { [eyePos player, aimPos _x, player, _x] };\nprivate _result = lineIntersects [_enemyDataArray];"]}],"see_also":["lineIntersectsSurfaces","lineIntersectsObjs","lineIntersectsWith","terrainIntersect","terrainIntersectASL","terrainIntersectAtASL","intersect","cursorObject","cursorTarget","checkVisibility"],"notes":[{"user":"Lou Montana","date":"2012-05-31T10:46:00Z","text":"Please note the difference:\n\n- terrainIntersect\n- terrainIntersectASL\n- lineIntersects\n- lineIntersectsWith\n- lineIntersectsObjs\n- intersect"}]},{"name":"lineIntersectsObjs","title":"lineIntersectsObjs","type":"command","url":"https://community.bistudio.com/wiki/lineIntersectsObjs","revid":377627,"updated":"2026-01-02T08:52:08Z","groups":["Math - Geometry"],"status":"ok","games":{"arma3":"1.10"},"since":"arma3 1.10","arma3_since":"1.10","locality":{"argument":"global"},"description":"Returns a list of objects intersected by the line from *begPos* to *endPos*. Since Arma 3 v2.20, there is an alternative syntax that does multiple checks in parallel, faster than multiple calls.","syntaxes":[{"syntax":"lineIntersectsObjs [begPos, endPos, ignoreObj1, ignoreObj2, sortByDistance, flags]","params":[{"name":"begPos","type":"PositionASL","description":"virtual line start","type_expr":"PositionASL"},{"name":"endPos","type":"PositionASL","description":"virtual line end","type_expr":"PositionASL"},{"name":"ignoreObj1","type":"Object","optional":true,"description":"object to ignore","type_expr":"Object","text":"ignoreObj1: Object - (Optional) - object to ignore"},{"name":"ignoreObj2","type":"Object","optional":true,"description":"object to ignore","type_expr":"Object","text":"ignoreObj2: Object - (Optional) - object to ignore"},{"name":"sortByDistance","type":"Boolean","optional":true,"description":"true: furthest object first, closest object last; false: unsorted","type_expr":"Boolean","text":"sortByDistance: Boolean - (Optional) - true: furthest object first, closest object last; false: unsorted"},{"name":"flags","type":"Number","optional":true,"description":"1 - CF_ONLY_WATER\n- 2 - CF_NEAREST_CONTACT\n- 4 - CF_ONLY_STATIC\n- 8 - CF_ONLY_DYNAMIC\n- 16 - CF_FIRST_CONTACT\n- 32 - CF_ALL_OBJECTS (Usable only with CF_FIRST_CONTACT and it will check one contact per object)\n\nFlags can be combined: 2 + 4 = 6 is CF_NEAREST_OBJECT + CF_ONLY_STATIC","type_expr":"Number","text":"flags: Number - (Optional)\n\n- 1 - CF_ONLY_WATER\n- 2 - CF_NEAREST_CONTACT\n- 4 - CF_ONLY_STATIC\n- 8 - CF_ONLY_DYNAMIC\n- 16 - CF_FIRST_CONTACT\n- 32 - CF_ALL_OBJECTS (Usable only with CF_FIRST_CONTACT and it will check one contact per object)\n\nFlags can be combined: 2 + 4 = 6 is CF_NEAREST_OBJECT + CF_ONLY_STATIC"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"intersecting objects"},"form":"unary","right":{"text":"[begPos, endPos, ignoreObj1, ignoreObj2, sortByDistance, flags]"}},{"syntax":"lineIntersectsObjs [[element1, element2, ...]]","since":"arma3 2.20","params":[{"name":"elementN","type":"Array with [begPos, endPos, ignoreObj1, ignoreObj2, sortByDistance, flags]","description":"Array with [begPos, endPos, ignoreObj1, ignoreObj2, sortByDistance, flags]\n\n- begPos: PositionASL - virtual line start\n- endPos: PositionASL - virtual line end\n- ignoreObj1: Object - (Optional) - object to ignore\n- ignoreObj2: Object - (Optional) - object to ignore\n- sortByDistance: Boolean - (Optional) - true: furthest object first, closest object last; false: unsorted\n- flags: Number - (Optional)\n  - 1 - CF_ONLY_WATER\n  - 2 - CF_NEAREST_CONTACT\n  - 4 - CF_ONLY_STATIC\n  - 8 - CF_ONLY_DYNAMIC\n  - 16 - CF_FIRST_CONTACT\n  - 32 - CF_ALL_OBJECTS (Usable only with CF_FIRST_CONTACT and it will check one contact per object)\n\nFlags can be combined: 2 + 4 = 6 is CF_NEAREST_OBJECT + CF_ONLY_STATIC","type_expr":"Array","text":"elementN: Array with [begPos, endPos, ignoreObj1, ignoreObj2, sortByDistance, flags]\n\n- begPos: PositionASL - virtual line start\n- endPos: PositionASL - virtual line end\n- ignoreObj1: Object - (Optional) - object to ignore\n- ignoreObj2: Object - (Optional) - object to ignore\n- sortByDistance: Boolean - (Optional) - true: furthest object first, closest object last; false: unsorted\n- flags: Number - (Optional)\n  - 1 - CF_ONLY_WATER\n  - 2 - CF_NEAREST_CONTACT\n  - 4 - CF_ONLY_STATIC\n  - 8 - CF_ONLY_DYNAMIC\n  - 16 - CF_FIRST_CONTACT\n  - 32 - CF_ALL_OBJECTS (Usable only with CF_FIRST_CONTACT and it will check one contact per object)\n\nFlags can be combined: 2 + 4 = 6 is CF_NEAREST_OBJECT + CF_ONLY_STATIC"}],"returns":{"type":"Array","type_expr":"Array","description":"with [result1, result2, ...] - each result is an Array of intersecting objects for the Nth element","text":"Array with [result1, result2, ...] - each result is an Array of intersecting objects for the Nth element"},"form":"unary","right":{"text":"[[element1, element2, ...]]"}}],"examples":[{"text":"```sqf\ndata = [];\ndisplayFunction = {\n    {\n        data set [_foreachindex, lineIntersectsObjs [eyePos player, ATLToASL screenToWorld [0.5, 0.5], objNull, objNull, false, _x]];\n    } forEach [1, 2, 4, 8, 16, 32];\n\n    hintSilent format [\"ONLY_WATER: %1\\nNEAREST_CONTACT: %2\\nONLY_STATIC: %3\\nONLY_DYNAMIC: %4\\nFIRST_CONTACT: %5\\nALL_OBJECTS: %6\",\n    data select 0, data select 1, data select 2, data select 3, data select 4, data select 5];\n};\n\n[\"sample_id\", \"onEachFrame\", \"displayFunction\"] call BIS_fnc_addStackedEventHandler;\n// example display objects' array in the middle of the screen sorted by 6 flags\n```","code":["data = [];\ndisplayFunction = {\n\t{\n\t\tdata set [_foreachindex, lineIntersectsObjs [eyePos player, ATLToASL screenToWorld [0.5, 0.5], objNull, objNull, false, _x]];\n\t} forEach [1, 2, 4, 8, 16, 32];\n\n\thintSilent format [\"ONLY_WATER: %1\\nNEAREST_CONTACT: %2\\nONLY_STATIC: %3\\nONLY_DYNAMIC: %4\\nFIRST_CONTACT: %5\\nALL_OBJECTS: %6\",\n\tdata select 0, data select 1, data select 2, data select 3, data select 4, data select 5];\n};\n\n[\"sample_id\", \"onEachFrame\", \"displayFunction\"] call BIS_fnc_addStackedEventHandler;\n// example display objects' array in the middle of the screen sorted by 6 flags"]},{"text":"Alternative syntax to check intersections in parallel:\n\n```sqf\nprivate _enemies = units opfor;\nprivate _enemyDataArray = _enemies apply { [eyePos player, aimPos _x, player, _x, true] };\nprivate _result = lineIntersectsObjs [_enemyDataArray];\n```","code":["private _enemies = units opfor;\nprivate _enemyDataArray = _enemies apply { [eyePos player, aimPos _x, player, _x, true] };\nprivate _result = lineIntersectsObjs [_enemyDataArray];"]}],"see_also":["lineIntersectsSurfaces","lineIntersectsWith","lineIntersects","terrainIntersectASL","terrainIntersectAtASL","terrainIntersect","intersect","cursorObject","cursorTarget","checkVisibility"],"notes":[{"user":"AgentRev","date":"2016-03-29T06:07:00Z","text":"Distance sorting is relative to object model center, and not intersect position."}]},{"name":"lineIntersectsSurfaces","title":"lineIntersectsSurfaces","type":"command","url":"https://community.bistudio.com/wiki/lineIntersectsSurfaces","revid":377700,"updated":"2026-01-02T09:03:29Z","groups":["Math - Geometry"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","locality":{"argument":"global"},"description":"Returns a list of intersections with surfaces and ground from *begPosASL* to *endPosASL*. Doesn't return intersection with sea surface. Works underwater, unlike lineIntersects. Hardcoded max distance: 5000m.\n\n> [!IMPORTANT]\n> - if *begPosASL* is under the ground and *endPosASL* is above it, the command will only return intersection with the ground, this is an engine limitation and none of the intersectXXX commands will work when initiated from under the ground.\n> - only a single LOD is checked for intersection. LOD2 will only be checked if LOD1 is unavailable.\n\nSince Arma 3 v2.20, there is an alternative syntax that does multiple checks in parallel, faster than multiple calls.","syntaxes":[{"syntax":"lineIntersectsSurfaces [begPosASL, endPosASL, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2, returnUnique]","params":[{"name":"begPosASL","type":"PositionASL","description":"virtual line start","type_expr":"PositionASL"},{"name":"endPosASL","type":"PositionASL","description":"virtual line end","type_expr":"PositionASL"},{"name":"ignoreObj1","type":"Object","optional":true,"default":"objNull","description":"first object to ignore","type_expr":"Object","text":"ignoreObj1: Object - (Optional, default objNull) first object to ignore"},{"name":"ignoreObj2","type":"Object","optional":true,"default":"objNull","description":"second object to ignore","type_expr":"Object","text":"ignoreObj2: Object - (Optional, default objNull) second object to ignore"},{"name":"sortMode","type":"Boolean","optional":true,"default":"true","description":"true: closest to furthest, false: furthest to closest","type_expr":"Boolean","text":"sortMode: Boolean - (Optional, default true) true: closest to furthest, false: furthest to closest"},{"name":"maxResults","type":"Number","optional":true,"default":"1","description":"max results to return. -1 to return every result","type_expr":"Number","text":"maxResults: Number - (Optional, default 1) max results to return. -1 to return every result"},{"name":"LOD1","type":"String","optional":true,"default":"\"VIEW\"","description":"primary LOD to look for intersection. Can be one of:\n\n- \"FIRE\"\n- \"VIEW\"\n- \"GEOM\"\n- \"IFIRE\" - (\"I\" stands for Indirect, *almost* identical to \"FIRE\")\n- \"NONE\"\n- Arma 3 v2.02 \"PHYSX\" - PhysX geometry LOD\n- Arma 3 v2.08 \"ROADWAY\" - only works from the top","type_expr":"String","since":"arma3 1.52","text":"LOD1: String - (Optional, default \"VIEW\") primary LOD to look for intersection. Can be one of:\n\n- \"FIRE\"\n- \"VIEW\"\n- \"GEOM\"\n- \"IFIRE\" - (\"I\" stands for Indirect, *almost* identical to \"FIRE\")\n- \"NONE\"\n- Arma 3 v2.02 \"PHYSX\" - PhysX geometry LOD\n- Arma 3 v2.08 \"ROADWAY\" - only works from the top"},{"name":"LOD2","type":"String","optional":true,"default":"\"FIRE\"","description":"secondary LOD to look for intersection. See *LOD1* for possible values","type_expr":"String","since":"arma3 1.52","text":"LOD2: String - (Optional, default \"FIRE\") secondary LOD to look for intersection. See *LOD1* for possible values"},{"name":"returnUnique","type":"Boolean","optional":true,"default":"true","description":"when false, all intersections in the same object are included, otherwise only the first one","type_expr":"Boolean","since":"arma3 1.70","text":"returnUnique: Boolean - (Optional, default true) when false, all intersections in the same object are included, otherwise only the first one"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [intersectPosASL, surfaceNormal, intersectObj, parentObject, selectionNames, pathToBisurf]\n- intersectPosASL: PositionASL - the actual position where line intersects surface - surfaceNormal: Vector - a normal to the intersected surface - intersectObject: Object - the object the surface belongs to (could be proxy object) - objNull if terrain - parentObject: Object - the object proxy object belongs to (not always the same as intersect object) - objNull if terrain - Arma 3 v2.10 selectionNames: Array of Strings - Names of the intersected selections (bones). Returns `[]` if there is no intersection with a selection. - Arma 3 v2.10 pathToBisurf: String - path to intersected surface properties (.bisurf) file. Returns `\"\"` if surface has no special properties. Terrain surface properties begin with `#`, and the surface properties are defined in `CfgSurfaces`. For example, if it returns `#GdtVRsurface01`, properties are defined in: `configFile >> \"CfgSurfaces\" >> \"GdtVRsurface01\"`","text":"Array of Arrays with [intersectPosASL, surfaceNormal, intersectObj, parentObject, selectionNames, pathToBisurf]\n\n- intersectPosASL: PositionASL - the actual position where line intersects surface\n- surfaceNormal: Vector - a normal to the intersected surface\n- intersectObject: Object - the object the surface belongs to (could be proxy object) - objNull if terrain\n- parentObject: Object - the object proxy object belongs to (not always the same as intersect object) - objNull if terrain\n- Arma 3 v2.10 selectionNames: Array of Strings - Names of the intersected selections (bones). Returns `[]` if there is no intersection with a selection.\n- Arma 3 v2.10 pathToBisurf: String - path to intersected surface properties (.bisurf) file. Returns `\"\"` if surface has no special properties. Terrain surface properties begin with `#`, and the surface properties are defined in `CfgSurfaces`. For example, if it returns `#GdtVRsurface01`, properties are defined in: `configFile >> \"CfgSurfaces\" >> \"GdtVRsurface01\"`"},"form":"unary","right":{"text":"[begPosASL, endPosASL, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2, returnUnique]"}},{"syntax":"lineIntersectsSurfaces [[element1, element2, ...]]","since":"arma3 2.20","params":[{"name":"elementN","type":"Array with [begPosASL, endPosASL, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2, returnUnique]","description":"- begPosASL: PositionASL - virtual line start\n- endPosASL: PositionASL - virtual line end\n- ignoreObj1: Object - (Optional, default objNull) first object to ignore\n- ignoreObj2: Object - (Optional, default objNull) second object to ignore\n- sortMode: Boolean - (Optional, default true) true: closest to furthest, false: furthest to closest\n- maxResults: Number - (Optional, default 1) max results to return. -1 to return every result\n- LOD1: String - (Optional, default \"VIEW\") primary LOD to look for intersection. Can be one of:\n  - \"FIRE\"\n  - \"VIEW\"\n  - \"GEOM\"\n  - \"IFIRE\" - (\"I\" stands for Indirect, *almost* identical to \"FIRE\")\n  - \"NONE\"\n  - \"PHYSX\" - PhysX geometry LOD\n  - \"ROADWAY\" - only works from the top\n- LOD2: String - (Optional, default \"FIRE\") secondary LOD to look for intersection. See *LOD1* for possible values\n- returnUnique: Boolean - (Optional, default true) when false, all intersections in the same object are included, otherwise only the first one","type_expr":"Array","text":"elementN: Array with [begPosASL, endPosASL, ignoreObj1, ignoreObj2, sortMode, maxResults, LOD1, LOD2, returnUnique]\n\n- begPosASL: PositionASL - virtual line start\n- endPosASL: PositionASL - virtual line end\n- ignoreObj1: Object - (Optional, default objNull) first object to ignore\n- ignoreObj2: Object - (Optional, default objNull) second object to ignore\n- sortMode: Boolean - (Optional, default true) true: closest to furthest, false: furthest to closest\n- maxResults: Number - (Optional, default 1) max results to return. -1 to return every result\n- LOD1: String - (Optional, default \"VIEW\") primary LOD to look for intersection. Can be one of:\n  - \"FIRE\"\n  - \"VIEW\"\n  - \"GEOM\"\n  - \"IFIRE\" - (\"I\" stands for Indirect, *almost* identical to \"FIRE\")\n  - \"NONE\"\n  - \"PHYSX\" - PhysX geometry LOD\n  - \"ROADWAY\" - only works from the top\n- LOD2: String - (Optional, default \"FIRE\") secondary LOD to look for intersection. See *LOD1* for possible values\n- returnUnique: Boolean - (Optional, default true) when false, all intersections in the same object are included, otherwise only the first one"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [intersectPosASL, surfaceNormal, intersectObj, parentObject, selectionNames, pathToBisurf]\n- intersectPosASL: PositionASL - the actual position where line intersects surface - surfaceNormal: Vector - a normal to the intersected surface - intersectObject: Object - the object the surface belongs to (could be proxy object) - objNull if terrain - parentObject: Object - the object proxy object belongs to (not always the same as intersect object) - objNull if terrain - selectionNames: Array of Strings - Names of the intersected selections (bones). Returns `[]` if there is no intersection with a selection. - pathToBisurf: String - path to intersected surface properties (.bisurf) file. Returns `\"\"` if surface has no special properties. Terrain surface properties begin with `#`, and the surface properties are defined in `CfgSurfaces`. For example, if it returns `#GdtVRsurface01`, properties are defined in: `configFile >> \"CfgSurfaces\" >> \"GdtVRsurface01\"`","text":"Array of Arrays with [intersectPosASL, surfaceNormal, intersectObj, parentObject, selectionNames, pathToBisurf]\n\n- intersectPosASL: PositionASL - the actual position where line intersects surface\n- surfaceNormal: Vector - a normal to the intersected surface\n- intersectObject: Object - the object the surface belongs to (could be proxy object) - objNull if terrain\n- parentObject: Object - the object proxy object belongs to (not always the same as intersect object) - objNull if terrain\n- selectionNames: Array of Strings - Names of the intersected selections (bones). Returns `[]` if there is no intersection with a selection.\n- pathToBisurf: String - path to intersected surface properties (.bisurf) file. Returns `\"\"` if surface has no special properties. Terrain surface properties begin with `#`, and the surface properties are defined in `CfgSurfaces`. For example, if it returns `#GdtVRsurface01`, properties are defined in: `configFile >> \"CfgSurfaces\" >> \"GdtVRsurface01\"`"},"form":"unary","right":{"text":"[[element1, element2, ...]]"}}],"examples":[{"code":["_intersections = lineIntersectsSurfaces [eyePos player, aimPos chopper, player, chopper, true, -1];"]},{"text":"```sqf\narrow = \"Sign_Arrow_F\" createVehicle [0,0,0];\nonEachFrame {\n    _ins = lineIntersectsSurfaces [\n        AGLToASL positionCameraToWorld [0,0,0],\n        AGLToASL positionCameraToWorld [0,0,1000],\n        player\n    ];\n    if (count _ins == 0) exitWith { arrow setPosASL [0,0,0] };\n    arrow setPosASL (_ins select 0 select 0);\n    arrow setVectorUp (_ins select 0 select 1);\n    hintSilent str _ins;\n};\n```","code":["arrow = \"Sign_Arrow_F\" createVehicle [0,0,0];\nonEachFrame {\n\t_ins = lineIntersectsSurfaces [\n\t\tAGLToASL positionCameraToWorld [0,0,0], \n\t\tAGLToASL positionCameraToWorld [0,0,1000], \n\t\tplayer\n\t];\n\tif (count _ins == 0) exitWith { arrow setPosASL [0,0,0] };\n\tarrow setPosASL (_ins select 0 select 0);\n\tarrow setVectorUp (_ins select 0 select 1);\n\thintSilent str _ins;\n};"]},{"text":"This should detect glass windows and wire fences (since Arma 3 v1.52):\n\n```sqf\nwirefence = \"Land_New_WiredFence_5m_F\" createVehicle position player;\narrow = \"Sign_Arrow_F\" createVehicle [0,0,0];\nonEachFrame {\n    _ins = lineIntersectsSurfaces [\n        AGLToASL positionCameraToWorld [0,0,0],\n        AGLToASL positionCameraToWorld [0,0,1000],\n        player,\n        objNull,\n        true,\n        1,\n        \"GEOM\",\n        \"NONE\"\n    ];\n    if (count _ins == 0) exitWith { arrow setPosASL [0,0,0] };\n    arrow setPosASL (_ins select 0 select 0);\n    arrow setVectorUp (_ins select 0 select 1);\n    hintSilent str _ins;\n};\n```","code":["wirefence = \"Land_New_WiredFence_5m_F\" createVehicle position player;\narrow = \"Sign_Arrow_F\" createVehicle [0,0,0];\nonEachFrame {\n\t_ins = lineIntersectsSurfaces [\n\t\tAGLToASL positionCameraToWorld [0,0,0], \n\t\tAGLToASL positionCameraToWorld [0,0,1000], \n\t\tplayer,\n\t\tobjNull,\n\t\ttrue,\n\t\t1,\n\t\t\"GEOM\",\n\t\t\"NONE\"\n\t];\n\tif (count _ins == 0) exitWith { arrow setPosASL [0,0,0] };\n\tarrow setPosASL (_ins select 0 select 0);\n\tarrow setVectorUp (_ins select 0 select 1);\n\thintSilent str _ins;\n};"]},{"text":"Alternative syntax to check intersections in parallel. Will draw a redline to the first intersecting object between the player and unit:\n\n```sqf\nprivate _handle = addMissionEventHandler [\"Draw3D\", {\n    private _enemies = units opfor;\n    private _enemyDataArray = _enemies apply { [eyePos player, eyePos _x, player, _x] };\n\n    private _intersections = lineIntersectsSurfaces [_enemyDataArray];\n    {\n        // No intersections found, draw green '+' icon at unit\n        if (_x isEqualTo []) then {\n            drawIcon3D [\n                \"\\a3\\ui_f\\data\\gui\\cfg\\cursors\\add_gs.paa\",\n                [0, 1, 0, 1],\n                ASLToAGL (eyePos (_enemies#_forEachIndex)),\n                0.5, 0.5, 0,\n                str (_enemies#_forEachIndex)\n            ];\n        } else {\n            private _firstIntersection = _x#0;\n            // Draw red line and '+' icon to first intersecting object\n            drawIcon3D [\n                \"\\a3\\ui_f\\data\\gui\\cfg\\cursors\\add_gs.paa\",\n                [1, 0, 0, 1],\n                ASLToAGL (_firstIntersection#0),\n                0.5, 0.5, 0,\n                str (_enemies#_forEachIndex) + \"- Blocked by \" + str (_firstIntersection#2)\n            ];\n            drawLine3D [\n                ASLToAGL (eyePos player),\n                ASLToAGL (_firstIntersection#0),\n                [1, 0, 0, 1],\n                5\n            ];\n        };\n    } forEach _intersections;\n}];\n```","code":["private _handle = addMissionEventHandler [\"Draw3D\", {\n\tprivate _enemies = units opfor;\n\tprivate _enemyDataArray = _enemies apply { [eyePos player, eyePos _x, player, _x] };\n\t\n\tprivate _intersections = lineIntersectsSurfaces [_enemyDataArray];\n\t{\n\t\t// No intersections found, draw green '+' icon at unit\n\t\tif (_x isEqualTo []) then {\n\t\t\tdrawIcon3D [\n\t\t\t\t\"\\a3\\ui_f\\data\\gui\\cfg\\cursors\\add_gs.paa\",\n\t\t\t\t[0, 1, 0, 1],\n\t\t\t\tASLToAGL (eyePos (_enemies#_forEachIndex)),\n\t\t\t\t0.5, 0.5, 0,\n\t\t\t\tstr (_enemies#_forEachIndex)\n\t\t\t];\n\t\t} else {\n\t\t\tprivate _firstIntersection = _x#0;\n\t\t\t// Draw red line and '+' icon to first intersecting object\n\t\t\tdrawIcon3D [\n\t\t\t\t\"\\a3\\ui_f\\data\\gui\\cfg\\cursors\\add_gs.paa\",\n\t\t\t\t[1, 0, 0, 1],\n\t\t\t\tASLToAGL (_firstIntersection#0),\n\t\t\t\t0.5, 0.5, 0,\n\t\t\t\tstr (_enemies#_forEachIndex) + \"- Blocked by \" + str (_firstIntersection#2)\n\t\t\t];\n\t\t\tdrawLine3D [\n\t\t\t\tASLToAGL (eyePos player),\n\t\t\t\tASLToAGL (_firstIntersection#0),\n\t\t\t\t[1, 0, 0, 1],\n\t\t\t\t5\n\t\t\t];\n\t\t};\n\t} forEach _intersections;\n}];"]}],"see_also":["lineIntersectsObjs","lineIntersectsWith","lineIntersects","terrainIntersectASL","terrainIntersectAtASL","terrainIntersect","intersect","cursorObject","cursorTarget","checkVisibility"],"notes":[{"user":"Killzone_Kid","date":"2015-08-27T12:44:00Z","text":"Fast check if the player is in a house:\n\n```sqf\nKK_fnc_inHouse = {\n    lineIntersectsSurfaces [\n        getPosWorld _this,\n        getPosWorld _this vectorAdd [0, 0, 50],\n        _this, objNull, true, 1, \"GEOM\", \"NONE\"\n    ] select 0 params [\"\",\"\",\"\",\"_house\"];\n    if (_house isKindOf \"House\") exitWith { true };\n    false\n};\nonEachFrame { hintSilent str (player call KK_fnc_inHouse) };\n```"},{"user":"Pierre MGI","date":"2016-01-30T20:10:00Z","text":"This command is useful to place weaponholder (and then spawned weapons) on floor of houses, correcting the spawn position (can_collide) to intersect with floor:\n\n```sqf\nMGI_fnc_setPosAGLS = {\n    params [\"_obj\", \"_pos\"];\n    _wh_pos = getPosASL _obj;\n\n    _pos set [2, (ATLToASL _pos select 2) - 10];\n    _ins = lineIntersectsSurfaces [_wh_pos, _pos,_obj, objNull, true, 1, \"VIEW\", \"FIRE\"];\n    _surface_distance = if (count _ins > 0) then [{ (_ins select 0 select 0) distance _wh_pos }, { 0 }];\n    _wh_pos set [2, (getPosASL _obj select 2) - (_surface_distance)];\n    _weaponholder setPosASL _wh_pos;\n};\n```\n\nAfter the position (_pos) obtained in BIS_fnc_buidingPositions array:\n\n```sqf\nprivate _weaponHolder = createVehicle [\"groundWeaponHolder\", _pos, [], 0, \"CAN_COLLIDE\"];\n[_weaponHolder, _pos] call MGI_fnc_setPosAGLS;\n```\n\nThen fill your weapon holder."},{"user":"Tankbuster","date":"2024-01-06T15:41:15Z","text":"Note that dome_big and dome_small objects have glass roof panels which this function can't see if it intersects those windows"}]},{"name":"lineIntersectsWith","title":"lineIntersectsWith","type":"command","url":"https://community.bistudio.com/wiki/lineIntersectsWith","revid":378359,"updated":"2026-04-03T15:54:33Z","groups":["Math - Geometry"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns objects intersecting with the virtual line from *begPos* to *endPos*. By default, the resulting array of intersecting objects is unsorted (see *sortByDistance*).\n\n> [!NOTE]\n> - Does not work under water.\n> - Max hardcoded distance is 1000m.\n\nSince Arma 3 v2.20, there is an alternative syntax that does multiple checks in parallel, faster than multiple calls.","syntaxes":[{"syntax":"lineIntersectsWith [begPos, endPos, objIgnore1, objIgnore2, sortByDistance]","params":[{"name":"begPos","type":"PositionASL","description":"virtual line start","type_expr":"PositionASL"},{"name":"endPos","type":"PositionASL","description":"virtual line end","type_expr":"PositionASL"},{"name":"objIgnore1","type":"Object","optional":true,"description":"object to ignore. When testing intersections from an object/unit/vehicle, pass that object here to prevent intersections inside of the object.","type_expr":"Object","text":"objIgnore1: Object - (Optional) object to ignore. When testing intersections from an object/unit/vehicle, pass that object here to prevent intersections inside of the object."},{"name":"objIgnore2","type":"Object","optional":true,"description":"another object to ignore. When testing intersections of a line between two objects, pass the second object here to prevent intersections inside of it being reported","type_expr":"Object","text":"objIgnore2: Object - (Optional) another object to ignore. When testing intersections of a line between two objects, pass the second object here to prevent intersections inside of it being reported"},{"name":"sortByDistance","type":"Boolean","optional":true,"description":"true: sort by **desc**ending distance (furthermost object first, closest object last); false: unsorted","type_expr":"Boolean","text":"sortByDistance: Boolean - (Optional) true: sort by **desc**ending distance (furthermost object first, closest object last); false: unsorted"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"intersecting objects"},"form":"unary","right":{"text":"[begPos, endPos, objIgnore1, objIgnore2, sortByDistance]"}},{"syntax":"lineIntersectsWith [[element1, element2, ...]]","since":"arma3 2.20","params":[{"name":"elementN","type":"Array with [begPos, endPos, objIgnore1, objIgnore2, sortByDistance]","description":"Array with [begPos, endPos, objIgnore1, objIgnore2, sortByDistance]\n\n- begPos: PositionASL - virtual line start\n- endPos: PositionASL - virtual line end\n- objIgnore1: Object - (Optional) object to ignore. When testing intersections from an object/unit/vehicle, pass that object here to prevent intersections inside of the object.\n- objIgnore2: Object - (Optional) another object to ignore. When testing intersections of a line between two objects, pass the second object here to prevent intersections inside of it being reported\n- sortByDistance: Boolean - (Optional) true: sort by **desc**ending distance (furthermost object first, closest object last); false: unsorted","type_expr":"Array","text":"elementN: Array with [begPos, endPos, objIgnore1, objIgnore2, sortByDistance]\n\n- begPos: PositionASL - virtual line start\n- endPos: PositionASL - virtual line end\n- objIgnore1: Object - (Optional) object to ignore. When testing intersections from an object/unit/vehicle, pass that object here to prevent intersections inside of the object.\n- objIgnore2: Object - (Optional) another object to ignore. When testing intersections of a line between two objects, pass the second object here to prevent intersections inside of it being reported\n- sortByDistance: Boolean - (Optional) true: sort by **desc**ending distance (furthermost object first, closest object last); false: unsorted"}],"returns":{"type":"Array","type_expr":"Array","description":"with [result1, result2, ...] - each result is an Array of intersecting objects for the Nth element","text":"Array with [result1, result2, ...] - each result is an Array of intersecting objects for the Nth element"},"form":"unary","right":{"text":"[[element1, element2, ...]]"}}],"examples":[{"code":["_objects = lineIntersectsWith [eyePos player, AGLToASL screenToWorld [0.5, 0.5]];"]},{"text":"Sort by distance:\n\n```sqf\n_objects = lineIntersectsWith [eyePos player, AGLToASL screenToWorld [0.5, 0.5], objNull, objNull, true];\n```","code":["_objects = lineIntersectsWith [eyePos player, AGLToASL screenToWorld [0.5, 0.5], objNull, objNull, true];"]},{"text":"Ignore objects:\n\n```sqf\n_objects = lineIntersectsWith [eyePos player, aimPos chopper, player, chopper];\n```","code":["_objects = lineIntersectsWith [eyePos player, aimPos chopper, player, chopper];"]},{"text":"Alternative syntax to check intersections in parallel:\n\n```sqf\nprivate _enemies = units opfor;\nprivate _enemyDataArray = _enemies apply { [eyePos player, aimPos _x, player, _x, true] };\nprivate _result = lineIntersectsWith [_enemyDataArray];\n```","code":["private _enemies = units opfor;\nprivate _enemyDataArray = _enemies apply { [eyePos player, aimPos _x, player, _x, true] };\nprivate _result = lineIntersectsWith [_enemyDataArray];"]}],"see_also":["lineIntersectsSurfaces","lineIntersectsObjs","lineIntersects","terrainIntersect","terrainIntersectASL","terrainIntersectAtASL","intersect","cursorObject","cursorTarget","checkVisibility"],"notes":[{"user":"Lou Montana","date":"2012-05-31T10:50:00Z","text":"Please note the difference :\n\n- terrainIntersect\n- terrainIntersectASL\n- lineIntersect***s***\n- lineIntersect***s***With\n- lineIntersect***s***Objs\n- intersect"}]},{"name":"linkItem","title":"linkItem","type":"command","url":"https://community.bistudio.com/wiki/linkItem","revid":369226,"updated":"2024-09-03T10:34:55Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Create and assign item to the correct slot. If there is an item in the targeted slot, it gets replaced. See also assignItem.","syntaxes":[{"syntax":"unit linkItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["bluforUnit linkItem \"NVGoggles\";\nopforUnit linkItem \"NVGoggles_OPFOR\";\nindependentUnit linkItem \"NVGoggles_INDEP\";"]}],"see_also":["unlinkItem","addItem","assignItem","removeItem","unassignItem","assignedItems","removeAllAssignedItems"]},{"name":"list","title":"list","type":"command","url":"https://community.bistudio.com/wiki/list","revid":378370,"updated":"2026-04-03T16:47:58Z","groups":["Triggers"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"List of units that would activate given Trigger.\n\nIt returns nothing before the simulation started, i.e. in (undelayed) init.sqf files. Returns a **pointer** to the trigger's list after the simulation started.\nSince this is just a *reference* this means that the value in your local variable will change as the content of the trigger area changes.\nTo permanently copy the returned list to a different variable, use `_mylist = +(list triggerOne)`.\n\nThe second example can be used inside the trigger (in that case, no need to name your trigger).\n\nThe list returned for trigger of type \"Not present\" is the same as that returned for type \"present\".\n\n> [!IMPORTANT]\n> While the command can query any trigger, local or remote, the result will be only for the trigger condition set on the local client. See createTrigger for more info.","syntaxes":[{"syntax":"list trigger","params":[{"name":"trigger","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing or Array of Objects","type_expr":"Nothing | Array<Object>"},"form":"unary","right":{"text":"trigger"}}],"examples":[{"code":["_triggerList = list _triggerOne;"]},{"code":["hint format [\"%1\", thisList];"]}],"see_also":["setTriggerActivation","createTrigger","thisList"],"notes":[{"user":"TeaCup","date":"2013-03-06T14:15:00Z","text":"Calling list immediately after creating a trigger via createTrigger (and setting up activation, area, statements, timeout, etc..), will return `<null>` instead of an array. It seems the trigger needs about 1 second to initialise, after which it will behave as expected: returning an array of all the objects inside the trigger (the ones matching the criteria), or an empty array."},{"user":"7erra","date":"2021-01-06T01:58:00Z","text":"The resulting array is not modifiable. Any array related commands, that modify the original array, will fail with the error message: `Error Reserved variable in expression`."}]},{"name":"listObjects","title":"listObjects","type":"command","url":"https://community.bistudio.com/wiki/listObjects","revid":363269,"updated":"2024-03-26T10:51:38Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return the list of all objects of given type.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map listObjects type","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"type","type":"String","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array"},"form":"binary","left":{"text":"map"},"right":{"text":"type"}}],"examples":[{"text":"-"}]},{"name":"listRemoteTargets","title":"listRemoteTargets","type":"command","url":"https://community.bistudio.com/wiki/listRemoteTargets","revid":377652,"updated":"2026-01-02T09:01:59Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Return list of datalink targets and time for which they will be/were known.","syntaxes":[{"syntax":"listRemoteTargets side","params":[{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [remoteTarget, lastDetected]\n- remoteTarget: Object - lastDetected: Number","text":"Array of Arrays with [remoteTarget, lastDetected]\n\n- remoteTarget: Object\n- lastDetected: Number"},"form":"unary","right":{"text":"side"}}],"examples":[{"code":["listRemoteTargets opfor;"]}],"see_also":["listVehicleSensors","enableVehicleSensor","isVehicleRadarOn","isVehicleSensorEnabled"]},{"name":"listVehicleSensors","title":"listVehicleSensors","type":"command","url":"https://community.bistudio.com/wiki/listVehicleSensors","revid":363161,"updated":"2024-03-24T17:31:12Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Returns an array of the sensors in the given vehicle's config (configFile >> \"CfgVehicles\" >> *vehicle* >> \"Components\" >> \"SensorsManagerComponent\" >> \"Components\").","syntaxes":[{"syntax":"listVehicleSensors vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Arrays of Strings","type_expr":"Array<Array<String>>","description":"format [className, componentType] (use className for enableVehicleSensor / isVehicleSensorEnabled)","text":"Array of Arrays of Strings format [className, componentType] (use *className* for enableVehicleSensor / isVehicleSensorEnabled)"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"text":"```sqf\nprivate _sensors = listVehicleSensors _v44blackfish;\nhint str _sensors;\n/*\n    e.g for a V44 Blackfish:\n    [\n        [\"IRSensorComponent\", \"IRSensorComponent\"],\n        [\"VisualSensorComponent\", \"VisualSensorComponent\"],\n        [\"ActiveRadarSensorComponent\", \"ActiveRadarSensorComponent\"],\n        [\"PassiveRadarSensorComponent\", \"PassiveRadarSensorComponent\"],\n        [\"LaserSensorComponent\", \"LaserSensorComponent\"],\n        [\"NVSensorComponent\", \"NVSensorComponent\"]\n    ]\n*/\n```","code":["private _sensors = listVehicleSensors _v44blackfish;\nhint str _sensors;\n/*\n\te.g for a V44 Blackfish:\n\t[\n\t\t[\"IRSensorComponent\", \"IRSensorComponent\"],\n\t\t[\"VisualSensorComponent\", \"VisualSensorComponent\"],\n\t\t[\"ActiveRadarSensorComponent\", \"ActiveRadarSensorComponent\"],\n\t\t[\"PassiveRadarSensorComponent\", \"PassiveRadarSensorComponent\"],\n\t\t[\"LaserSensorComponent\", \"LaserSensorComponent\"],\n\t\t[\"NVSensorComponent\", \"NVSensorComponent\"]\n\t]\n*/"]}],"see_also":["listRemoteTargets","enableVehicleSensor","isVehicleRadarOn","isVehicleSensorEnabled"]},{"name":"ln","title":"ln","type":"command","url":"https://community.bistudio.com/wiki/ln","revid":369410,"updated":"2024-09-03T18:43:25Z","groups":["Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the natural logarithm of x.","syntaxes":[{"syntax":"ln x","params":[{"name":"x","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"x"}}],"examples":[{"code":["_nlog = ln 10;"]},{"code":["_euler = exp 1;\n_euler = ln _euler; // Returns 1"]}],"see_also":["Math Commands"]},{"name":"lnbAddArray","title":"lnbAddArray","type":"command","url":"https://community.bistudio.com/wiki/lnbAddArray","revid":379294,"updated":"2026-10-30T23:47:22Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Adds list of rows of strings.","syntaxes":[{"syntax":"lnbAddArray [ctrl, arrayOfTextAndValues]","params":[{"name":"ctrl","type":"Number or Arma 3 v2.22 Control","type_expr":"Number | Control"},{"name":"arrayOfTextAndValues","type":"Array of Arrays format [[text], [value], [data]]:","description":"Array of Arrays format [[text], [value], [data]]:\n\n- text: String\n- value: Number\n- data: String","type_expr":"Array<Array>","text":"arrayOfTextAndValues: Array of Arrays format [[text], [value], [data]]:\n\n- text: String\n- value: Number\n- data: String"}],"returns":{"type":"Number","type_expr":"Number","description":"index"},"form":"unary","right":{"text":"[ctrl, arrayOfTextAndValues]"}}],"examples":[{"text":"```sqf\nlnbAddArray [\n    102,\n    [\n        [\n            [\"#1\"],\n            [1],\n            [\"#1\"]\n        ],\n        [\n            [\"#2\"],\n            [2],\n            [\"#2\"]\n        ]\n    ]\n];\n```","code":["lnbAddArray [\n\t102,\n\t[\n\t\t[\n\t\t\t[\"#1\"],\n\t\t\t[1],\n\t\t\t[\"#1\"]\n\t\t],\n\t\t[\n\t\t\t[\"#2\"],\n\t\t\t[2],\n\t\t\t[\"#2\"]\n\t\t]\n\t]\n];"]}],"see_also":["lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbAddColumn","title":"lnbAddColumn","type":"command","url":"https://community.bistudio.com/wiki/lnbAddColumn","revid":378410,"updated":"2026-04-04T08:30:26Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Adds a column at given position.","syntaxes":[{"syntax":"control lnbAddColumn position","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"position","type":"Number","description":"position of the new column where 0 means all the way to the left and 1 all the way to the right of the control","type_expr":"Number"}],"returns":{"type":"Number or Nothing","type_expr":"Number | Nothing","description":"returns the zero based index of the new column"},"form":"binary","left":{"text":"control"},"right":{"text":"position"}},{"syntax":"lnbAddColumn [controlOrIdc, position]","params":[{"name":"controlOrIdc","type":"Control or Number","description":"control or the idc of the control","type_expr":"Control | Number"},{"name":"position","type":"Number","description":"position of the new column where 0 means all the way to the left and 1 all the way to the right of the control","type_expr":"Number"}],"returns":{"type":"Number or Nothing","type_expr":"Number | Nothing","description":"returns the zero based index of the new column"},"form":"unary","right":{"text":"[controlOrIdc, position]"}}],"examples":[{"code":["_ctrl lnbAddColumn 0.8;"]},{"code":["lnbAddColumn [105, 0.8];"]}],"see_also":["lnbAddArray","lnbAddRow","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbSetColumnsPos"]},{"name":"lnbAddRow","title":"lnbAddRow","type":"command","url":"https://community.bistudio.com/wiki/lnbAddRow","revid":379295,"updated":"2026-10-30T23:47:30Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Adds a row of strings.","syntaxes":[{"syntax":"lnbAddRow [ctrl, data]","params":[{"name":"ctrl","type":"Number or Arma 3 v2.22 Control","type_expr":"Number | Control"},{"name":"data","type":"Array of Strings","type_expr":"Array<String>"}],"returns":{"type":"Number","type_expr":"Number","description":"row index"},"form":"unary","right":{"text":"[ctrl, data]"}},{"syntax":"ctrl lnbAddRow data","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"data","type":"Array of Strings","type_expr":"Array<String>"}],"returns":{"type":"Number","type_expr":"Number","description":"row index"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"data"}}],"examples":[{"code":["lnbAddRow [1, [\"COL1\", \"COL2\"]];"]},{"code":["_ctrl lnbAddRow [\"COL1\", \"COL2\"];"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbClear","title":"lnbClear","type":"command","url":"https://community.bistudio.com/wiki/lnbClear","revid":309988,"updated":"2022-05-05T12:17:03Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Clears all items in the given listbox or combobox.","syntaxes":[{"syntax":"lnbClear idc","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"idc"}},{"syntax":"lnbClear ctrl","params":[{"name":"ctrl","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"ctrl"}}],"examples":[{"code":["lnbClear _ctrl;"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbColor","title":"lnbColor","type":"command","url":"https://community.bistudio.com/wiki/lnbColor","revid":377372,"updated":"2026-01-02T06:42:22Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the text color of the item with the given position of the 2D listbox. The color is returned in format Color (RGBA).","syntaxes":[{"syntax":"lnbColor [idc, [row, column]]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"}],"returns":{"type":"Color (RGBA)","type_expr":"Color"},"form":"unary","right":{"text":"[idc, [row, column]]"}},{"syntax":"control lnbColor [row, column]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"}],"returns":{"type":"Color (RGBA)","type_expr":"Color"},"form":"binary","left":{"text":"control"},"right":{"text":"[row, column]"}}],"examples":[{"code":["_ctrl lnbColor [0,0];"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbColorRight","title":"lnbColorRight","type":"command","url":"https://community.bistudio.com/wiki/lnbColorRight","revid":377818,"updated":"2026-01-03T04:15:56Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Returns the right color of given row.","syntaxes":[{"syntax":"lnbColorRight [idc, [row, column]]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","description":"index of the row","type_expr":"Number"},{"name":"column","type":"Number","description":"index of the column","type_expr":"Number"}],"returns":{"type":"Color (RGBA)","type_expr":"Color"},"form":"unary","right":{"text":"[idc, [row, column]]"}},{"syntax":"ctrl lnbColorRight [row, column]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","description":"index of the row","type_expr":"Number"},{"name":"column","type":"Number","description":"index of the column","type_expr":"Number"}],"returns":{"type":"Color (RGBA)","type_expr":"Color"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[row, column]"}}],"examples":[{"code":["private _result = _control lnbColorRight [0, 0];"]}],"see_also":["lnbSetColor","lnbSetColorRight","lnbColor"]},{"name":"lnbCurSelRow","title":"lnbCurSelRow","type":"command","url":"https://community.bistudio.com/wiki/lnbCurSelRow","revid":309967,"updated":"2022-05-05T12:17:01Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the index of the selected row id 2D listbox.","syntaxes":[{"syntax":"lnbCurSelRow idc","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"idc"}},{"syntax":"lnbCurSelRow ctrl","params":[{"name":"ctrl","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"ctrl"}}],"examples":[{"code":["lnbCurSelRow _ctrl;"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbData","title":"lnbData","type":"command","url":"https://community.bistudio.com/wiki/lnbData","revid":320643,"updated":"2022-05-13T09:38:23Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Returns the additional text (invisible) in an item with the given position of the 2D listbox.","syntaxes":[{"syntax":"lnbData [idc, [row, column]]","params":[{"name":"idc","type":"Number or Control","type_expr":"Number | Control"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, [row, column]]"}},{"syntax":"ctrl lnbData [row, column]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[row, column]"}}],"examples":[{"code":["_ctrl lnbData [lnbCurSelRow _ctrl,0]; // \"#1\""]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbDeleteColumn","title":"lnbDeleteColumn","type":"command","url":"https://community.bistudio.com/wiki/lnbDeleteColumn","revid":310134,"updated":"2022-05-05T12:25:45Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Removes column with given index from ListNBox control.","syntaxes":[{"syntax":"lnbDeleteColumn [idc, index]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index]"}},{"syntax":"ctrl lnbDeleteColumn index","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"index"}}],"examples":[{"code":["_ctrl lnbDeleteColumn 1;"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbDeleteRow","title":"lnbDeleteRow","type":"command","url":"https://community.bistudio.com/wiki/lnbDeleteRow","revid":379224,"updated":"2026-10-30T22:56:51Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Removes row with the given index from the given listbox or combobox.","syntaxes":[{"syntax":"_ctrl lnbDeleteRow row","params":[{"name":"_ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"_ctrl"},"right":{"text":"row"}},{"syntax":"lnbDeleteRow [idc, row]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, row]"}}],"examples":[{"code":["_ctrl lnbDeleteRow 1;"]},{"code":["lnbDeleteRow [105, 0];"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbGetColumnsPosition","title":"lnbGetColumnsPosition","type":"command","url":"https://community.bistudio.com/wiki/lnbGetColumnsPosition","revid":379225,"updated":"2026-10-30T22:57:34Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Returns relative screen X of ListNBox control columns position [0.1,0.3,0.6...]. Use lnbSetColumnsPos to set positions.","syntaxes":[{"syntax":"lnbGetColumnsPosition _ctrl","params":[{"name":"_ctrl","type":"Control","type_expr":"Control"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"unary","right":{"text":"_ctrl"}},{"syntax":"lnbGetColumnsPosition idc","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"unary","right":{"text":"idc"}}],"examples":[{"code":["lnbGetColumnsPosition _ctrl;"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbPicture","title":"lnbPicture","type":"command","url":"https://community.bistudio.com/wiki/lnbPicture","revid":364186,"updated":"2024-05-05T10:46:48Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Returns the picture name or path of the item with the given position of the 2D listbox.","syntaxes":[{"syntax":"lnbPicture [idc, [row, column]]","params":[{"name":"idc","type":"Number","description":"number of Control","type_expr":"Number"},{"name":"row","type":"Number","description":"index of Row","type_expr":"Number"},{"name":"column","type":"Number","description":"index of Column","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, [row, column]]"}},{"syntax":"control lnbPicture [row, column]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","description":"index of Row in given Control","type_expr":"Number"},{"name":"column","type":"Number","description":"index of Column in given Control","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"[row, column]"}}],"examples":[{"code":["lnbPicture [200, [1, 1]];"]},{"code":["_control lnbPicture [1, 1]; // \"a3\\ui_f\\data\\gui\\cfg\\ranks\\corporal_gs.paa\""]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbPictureRight","title":"lnbPictureRight","type":"command","url":"https://community.bistudio.com/wiki/lnbPictureRight","revid":348973,"updated":"2023-11-08T14:45:44Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Returns the right picture of given row. The *column* parameter does not matter.","syntaxes":[{"syntax":"lnbPictureRight [idc, [row, column]]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","description":"index of the row","type_expr":"Number"},{"name":"column","type":"Number","description":"index of the column","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String","description":"path of image"},"form":"unary","right":{"text":"[idc, [row, column]]"}},{"syntax":"ctrl lnbPictureRight [row, column]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","description":"index of the row","type_expr":"Number"},{"name":"column","type":"Number","description":"index of the column","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String","description":"path of image"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[row, column]"}}],"examples":[{"code":["_path = _control lnbPictureRight [0, 0];"]}],"see_also":["lnbSetPictureRight","lnbSetPicture","lnbPicture"]},{"name":"lnbSetColor","title":"lnbSetColor","type":"command","url":"https://community.bistudio.com/wiki/lnbSetColor","revid":377345,"updated":"2026-01-02T06:40:01Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets the color of the item with the given position of the 2D listbox. Color is in format Color (RGBA).","syntaxes":[{"syntax":"lnbSetColor [idc, [row, column], color]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, [row, column], color]"}},{"syntax":"ctrl lnbSetColor [[row, column], color]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[[row, column], color]"}}],"examples":[{"code":["_ctrl lnbSetColor [[0,0], [1,0,0,1]];"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbSetColorRight","title":"lnbSetColorRight","type":"command","url":"https://community.bistudio.com/wiki/lnbSetColorRight","revid":377728,"updated":"2026-01-03T00:21:09Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Sets the right color.","syntaxes":[{"syntax":"lnbSetColorRight [idc, [row, column], color]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","description":"index of the row","type_expr":"Number"},{"name":"column","type":"Number","description":"index of the column","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, [row, column], color]"}},{"syntax":"ctrl lnbSetColorRight [[row, column], color]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","description":"index of the row","type_expr":"Number"},{"name":"column","type":"Number","description":"index of the column","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[[row, column], color]"}}],"examples":[{"code":["_control lnbSetColorRight [[0, 0], [1,1,1,0.5]];"]}],"see_also":["lnbSetColor","lnbColorRight","lnbColor"]},{"name":"lnbSetColumnsPos","title":"lnbSetColumnsPos","type":"command","url":"https://community.bistudio.com/wiki/lnbSetColumnsPos","revid":341220,"updated":"2023-05-13T23:12:29Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets relative screen X for ListNBox control columns positions. Setter for lnbGetColumnsPosition.","syntaxes":[{"syntax":"lnbSetColumnsPos [idc, positions]","params":[{"name":"idc","type":"Number","description":"idc of the control","type_expr":"Number"},{"name":"positions","type":"Array","description":"positions of the columns","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, positions]"}},{"syntax":"ctrl lnbSetColumnsPos positions","params":[{"name":"ctrl","type":"Control","description":"lnb control","type_expr":"Control"},{"name":"positions","type":"Array","description":"positions of the columns","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"positions"}}],"examples":[{"code":["lnbSetColumnsPos [101, [0.1,0.5,0.7]];"]},{"code":["_ctrl lnbSetColumnsPos [0.1,0.5,0.7];"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"],"notes":[{"user":"ffur2007slx2_5","date":"2014-09-09T16:52:00Z","text":"See: List Box#LISTNBOX"}]},{"name":"lnbSetCurSelRow","title":"lnbSetCurSelRow","type":"command","url":"https://community.bistudio.com/wiki/lnbSetCurSelRow","revid":369217,"updated":"2024-09-03T10:34:53Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Selects the row with the given index of the 2D listbox.","syntaxes":[{"syntax":"lnbSetCurSelRow [idc, index]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, index]"}},{"syntax":"ctrl lnbSetCurSelRow index","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"index"}}],"examples":[{"code":["disableSerialization;\n_ctrl = (findDisplay 300) displayCtrl 304;\n_ctrl lnbSetCurSelRow 1;"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbSetData","title":"lnbSetData","type":"command","url":"https://community.bistudio.com/wiki/lnbSetData","revid":349203,"updated":"2023-11-08T14:50:43Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets the additional text (invisible) on the item with the given position of the 2D listbox.","syntaxes":[{"syntax":"lnbSetData [idc, [row, column], data]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"data","type":"String","description":"the invisible text to add","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, [row, column], data]"}},{"syntax":"ctrl lnbSetData [[row, column], data]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"data","type":"String","description":"the invisible text to add","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[[row, column], data]"}}],"examples":[{"code":["lnbSetData [123, [0,0],\"#1\"];"]},{"code":["_ctrl lnbSetData [[0,0],\"#1\"];"]}],"see_also":["lnbSetTooltip","lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbSetPicture","title":"lnbSetPicture","type":"command","url":"https://community.bistudio.com/wiki/lnbSetPicture","revid":379364,"updated":"2026-10-30T23:56:40Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets the picture in the item with the given position of the 2D listbox.The picture is searched in the mission, directory, the dtaExt subdirectory of the campaign directory, and the dtaExt directory and the data bank (or directory).","syntaxes":[{"syntax":"lnbSetPicture [idc, [row, column], picturePathOrName]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"picturePathOrName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, [row, column], picturePathOrName]"}},{"syntax":"ctrl lnbSetPicture [[row, column], picturePathOrName]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"picturePathOrName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[[row, column], picturePathOrName]"}}],"examples":[{"code":["lnbSetPicture [1, [0, 0], \"Picture\"];"]},{"code":["_ctrl lnbSetPicture [[0, 0], \"\\A3\\Ui_f\\data\\GUI\\Cfg\\Ranks\\lieutenant_gs.paa\"];"]}],"see_also":["lnbPicture","lnbSetPictureRight","lnbPictureRight"],"notes":[{"user":"R3vo","date":"2021-04-06T07:35:00Z","text":"> [!NOTE]\n> Adding pictures to lists is very slow. In order to prevent the filling of the list to be slowed down, add the pictures in the **scheduled** environment. One drawback of that method is, that sorting the entries is not easily possible.\n>\n> ```sqf\n> private _path = _ctrlTV tvAdd [[], \"Some Entry\"];\n> [_ctrlTV, _path] spawn {\n>     (_this select 0) tvSetPictureRight [[_this select 1], \"someImage.paa\"];\n> };\n> ```"}]},{"name":"lnbSetPictureColor","title":"lnbSetPictureColor","type":"command","url":"https://community.bistudio.com/wiki/lnbSetPictureColor","revid":377350,"updated":"2026-01-02T06:40:12Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","description":"Sets the cell picture's colour.","syntaxes":[{"syntax":"lnbSetPictureColor [idc, [row, column], colour]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","description":"0-based index (first column is 0, second is 1, etc)","type_expr":"Number"},{"name":"column","type":"Number","description":"0-based index (first column is 0, second is 1, etc)","type_expr":"Number"},{"name":"colour","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, [row, column], colour]"}},{"syntax":"ctrl lnbSetPictureColor [[row, column], colour]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","description":"0-based index (first column is 0, second is 1, etc)","type_expr":"Number"},{"name":"column","type":"Number","description":"0-based index (first column is 0, second is 1, etc)","type_expr":"Number"},{"name":"colour","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[[row, column], colour]"}}],"examples":[{"code":["lnbSetPictureColor [1492, [1,0], [0,0.75,0.3,0.5]];"]},{"code":["ctrl lnbSetPictureColor [[0, 3], [1,0,0,1]];"]}],"notes":[{"user":"Unknown","text":"MAYBE Arma 3 1.40 (or earlier) - see https://feedback.bistudio.com/T81738"}]},{"name":"lnbSetPictureColorRight","title":"lnbSetPictureColorRight","type":"command","url":"https://community.bistudio.com/wiki/lnbSetPictureColorRight","revid":377730,"updated":"2026-01-03T00:21:13Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Sets color of the right picture in a CT_LISTNBOX.","syntaxes":[{"syntax":"lnbSetPictureColorRight [idc, [row, column], color]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","description":"index of the row","type_expr":"Number"},{"name":"column","type":"Number","description":"index of the column","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, [row, column], color]"}},{"syntax":"ctrl lnbSetPictureColorRight [[row, column], color]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","description":"index of the row","type_expr":"Number"},{"name":"column","type":"Number","description":"index of the column","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[[row, column], color]"}}],"examples":[{"code":["_control lnbSetPictureColorRight [[0, 0], [1,1,1,0.5]];"]}],"see_also":["lnbSetColor","lnbColorRight","lnbColor"]},{"name":"lnbSetPictureColorSelected","title":"lnbSetPictureColorSelected","type":"command","url":"https://community.bistudio.com/wiki/lnbSetPictureColorSelected","revid":319487,"updated":"2022-05-13T09:24:10Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Sets the cell picture's colour on cell selection.","syntaxes":[{"syntax":"lnbSetPictureColorSelected [idc, [row, column], colour]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","description":"0-based index (first row is 0, second is 1, etc)","type_expr":"Number"},{"name":"column","type":"Number","description":"0-based index (first column is 0, second is 1, etc)","type_expr":"Number"},{"name":"colour","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, [row, column], colour]"}},{"syntax":"ctrl lnbSetPictureColorSelected [[row, column], colour]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","description":"0-based index (first row is 0, second is 1, etc)","type_expr":"Number"},{"name":"column","type":"Number","description":"0-based index (first column is 0, second is 1, etc)","type_expr":"Number"},{"name":"colour","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[[row, column], colour]"}}],"examples":[{"code":["lnbSetPictureColorSelected [1492, [1,0], [0,0.75,0.3,0.5]];"]},{"code":["ctrl lnbSetPictureColorSelected [[0, 3], [1,0,0,1]];"]}],"see_also":["lnbSetPictureColor"]},{"name":"lnbSetPictureColorSelectedRight","title":"lnbSetPictureColorSelectedRight","type":"command","url":"https://community.bistudio.com/wiki/lnbSetPictureColorSelectedRight","revid":377729,"updated":"2026-01-03T00:21:11Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Sets the color of the right picture when it is selected.","syntaxes":[{"syntax":"lnbSetPictureColorSelectedRight [idc, [row, column], color]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","description":"index of the row","type_expr":"Number"},{"name":"column","type":"Number","description":"index of the column","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, [row, column], color]"}},{"syntax":"ctrl lnbSetPictureColorSelectedRight [[row, column], color]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","description":"index of the row","type_expr":"Number"},{"name":"column","type":"Number","description":"index of the column","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[[row, column], color]"}}],"examples":[{"code":["_control lnbSetPictureColorSelectedRight [[0, 0], [1,1,1,0.5]];"]}],"see_also":["lnbSetColor","lnbColorRight","lnbColor"]},{"name":"lnbSetPictureRight","title":"lnbSetPictureRight","type":"command","url":"https://community.bistudio.com/wiki/lnbSetPictureRight","revid":353377,"updated":"2024-03-15T17:11:58Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Sets the cell's right-picture. The picture is set to the end of the **row**, the *column* parameter does not matter.\n\n> [!NOTE]\n> The picture is searched in the mission, directory, the campaign directory's dtaExt subdirectory, and the data bank (or directory).","syntaxes":[{"syntax":"lnbSetPictureRight [idc, [row, column], path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","description":"0-based index (first row is 0, second is 1, etc)","type_expr":"Number"},{"name":"column","type":"Number","description":"0-based index (first column is 0, second is 1, etc)","type_expr":"Number"},{"name":"path","type":"String","description":"the picture's file path","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, [row, column], path]"}},{"syntax":"ctrl lnbSetPictureRight [[row, column], path]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","description":"0-based index (first row is 0, second is 1, etc)","type_expr":"Number"},{"name":"column","type":"Number","description":"0-based index (first column is 0, second is 1, etc)","type_expr":"Number"},{"name":"path","type":"String","description":"the picture's file path","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[[row, column], path]"}}],"examples":[{"code":["lnbSetPictureRight [1, [0, 0], \"Picture.paa\"];"]},{"code":["_ctrl lnbSetPictureRight [[0, 0], \"\\A3\\Ui_f\\data\\GUI\\Cfg\\Ranks\\lieutenant_gs.paa\"];"]}],"see_also":["lnbPictureRight"]},{"name":"lnbSetText","title":"lnbSetText","type":"command","url":"https://community.bistudio.com/wiki/lnbSetText","revid":321488,"updated":"2022-05-16T14:15:09Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets the text in the item with the given position of the 2D listbox.","syntaxes":[{"syntax":"lnbSetText [idc, [row, column], data]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"data","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, [row, column], data]"}},{"syntax":"ctrl lnbSetText [[row, column], data]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"data","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[[row, column], data]"}}],"examples":[{"code":["lnbSetText [101, [0,1], \"#1\"];"]},{"code":["_ctrl lnbSetText [[0,1], \"#1\"];"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbSetTextRight","title":"lnbSetTextRight","type":"command","url":"https://community.bistudio.com/wiki/lnbSetTextRight","revid":321491,"updated":"2022-05-16T14:16:31Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Sets cell's right-aligned text. Does not replace cell's text.","syntaxes":[{"syntax":"lnbSetTextRight [idc, [row, column], text]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","description":"0-based index (first row is 0, second is 1, etc)","type_expr":"Number"},{"name":"column","type":"Number","description":"0-based index (first column is 0, second is 1, etc)","type_expr":"Number"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, [row, column], text]"}},{"syntax":"ctrl lnbSetTextRight [[row, column], text]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","description":"0-based index (first row is 0, second is 1, etc)","type_expr":"Number"},{"name":"column","type":"Number","description":"0-based index (first column is 0, second is 1, etc)","type_expr":"Number"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[[row, column], text]"}}],"examples":[{"code":["lnbSetTextRight [1492, [1,0], \"right text\"];"]},{"code":["_ctrl lnbSetTextRight [[0, 3], \"right text\"];"]}],"see_also":["lnbTextRight","lnbSetColorRight","lnbColorRight","lnbText"]},{"name":"lnbSetTooltip","title":"lnbSetTooltip","type":"command","url":"https://community.bistudio.com/wiki/lnbSetTooltip","revid":349264,"updated":"2023-11-08T14:51:08Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"1.94"},"since":"arma3 1.94","arma3_since":"1.94","description":"Sets tooltip on the item with the given row and column of CT_LISTNBOX.\n\n> [!IMPORTANT]\n> By default, tooltips are added for all columns no matter what column index is provided.\n>\n> This behaviour can be overwritten since Arma 3 v2.02 by setting the control's property `tooltipPerColumn` to true.\n>\n> See CT_LISTNBOX documentation.","syntaxes":[{"syntax":"lnbSetTooltip [idc, [row, column], text]","params":[{"name":"idc","type":"Number","description":"control's IDC","type_expr":"Number"},{"name":"row","type":"Number","description":"row where the tooltip should be shown","type_expr":"Number"},{"name":"column","type":"Number","description":"column where tooltip should be shown. By default it is set for every column, see description","type_expr":"Number"},{"name":"text","type":"String","description":"tooltip text","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, [row, column], text]"}},{"syntax":"ctrl lnbSetTooltip [[row, column], text]","params":[{"name":"ctrl","type":"Control","description":"control","type_expr":"Control"},{"name":"row","type":"Number","description":"row where the tooltip should be shown","type_expr":"Number"},{"name":"column","type":"Number","description":"column where tooltip should be shown. By default it is set for every column, see description","type_expr":"Number"},{"name":"text","type":"String","description":"tooltip text","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[[row, column], text]"}}],"examples":[{"code":["lnbSetTooltip [1234, [1,0], \"tip\"];"]},{"code":["_ctrl lnbSetTooltip [[3,0], \"top\"];"]}],"see_also":["lbSetTooltip","lnbSetData","lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue"]},{"name":"lnbSetValue","title":"lnbSetValue","type":"command","url":"https://community.bistudio.com/wiki/lnbSetValue","revid":321489,"updated":"2022-05-16T14:15:36Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets the additional **integer** value in the item with the position index of the 2D listbox.","syntaxes":[{"syntax":"lnbSetValue [idc, [row, column], value]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, [row, column], value]"}},{"syntax":"control lnbSetValue [[row, column], value]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[[row, column], value]"}}],"examples":[{"code":["_ctrl lnbSetValue [[0,0],1];"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSize","lnbText","lnbValue"]},{"name":"lnbSize","title":"lnbSize","type":"command","url":"https://community.bistudio.com/wiki/lnbSize","revid":377872,"updated":"2026-01-04T11:45:13Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns size of CT_LISTNBOX. This command supports CT_TOOLBOX control since Arma 3 v2.06. For CT_COMBO or CT_LISTBOX see lbSize.","syntaxes":[{"syntax":"lnbSize controlOrIDC","params":[{"name":"controlOrIDC","type":"Control or Number","description":"control or control's IDC","type_expr":"Control | Number"}],"returns":{"type":"Array","type_expr":"Array","description":"in format [rows, columns]\n- rows: Number - Number of rows - columns: Number - Number of columns","text":"Array - in format [rows, columns]\n\n- rows: Number - Number of rows\n- columns: Number - Number of columns"},"form":"unary","right":{"text":"controlOrIDC"}}],"examples":[{"code":["lnbSize _control;"]},{"code":["lnbSize _someIDC;"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbText","lnbValue"]},{"name":"lnbSort","title":"lnbSort","type":"command","url":"https://community.bistudio.com/wiki/lnbSort","revid":364169,"updated":"2024-05-05T10:46:44Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"1.08"},"since":"arma3 1.08","arma3_since":"1.08","description":"Sorts given multicolumn listbox by lnbText in given column in ascending or descending order.\n\n> [!IMPORTANT]\n> This command does not support UNICODE, use lnbSortBy if it is needed instead","syntaxes":[{"syntax":"lnbSort [idc, column, reversed]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"reversed","type":"Boolean","optional":true,"default":"false","description":"false: descending / true: ascending","type_expr":"Boolean","text":"reversed: Boolean - (Optional, default false) false: descending / true: ascending"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, column, reversed]"}},{"syntax":"control lnbSort [column, reversed]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"reversed","type":"Boolean","optional":true,"default":"false","description":"false: descending / true: ascending","type_expr":"Boolean","text":"reversed: Boolean - (Optional, default false) false: descending / true: ascending"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[column, reversed]"}}],"examples":[{"code":["lnbSort [1800, 1, false];"]},{"code":["_ctl lnbSort [1, true];"]}],"see_also":["lbSortBy","lnbSortBy","lbSort","lnbSortByValue","tvSortByValue","lbSortByValue","tvSort"]},{"name":"lnbSortBy","title":"lnbSortBy","type":"command","url":"https://community.bistudio.com/wiki/lnbSortBy","revid":352015,"updated":"2024-02-01T23:24:06Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Sorts given multi-column ListNBox in the given column by either lnbText, lnbValue or lnbData in normal or reversed order, using case-sensitive or case-insensitive comparison. Unlike the older **lnbSortXXX** commands, this command supports UNICODE characters out of the box.\nWhen sorting by `\"VALUE\"`, the rows with the same lnbValue will additionally be sorted by lnbText in the order specified by the *reversedOrder* flag, text specified by `useTextRight` flag and case-sensitivity specified by `caseSensitive` flag.\n\n> [!IMPORTANT]\n> - This command supports referencing control via IDC as well, but as with any use of IDC in UI Control commands, a dialog should be present, i.e. UI user interaction is created with createDialog rather than createDisplay.\n> - As this command supports UNICODE by default, which may result in slower sorting, you can switch it off with `unicodeOff` param.","syntaxes":[{"syntax":"[controlOrIDC, column] lnbSortBy [sortByType, reversedOrder, caseSensitive, useTextRight, unicodeOff]","params":[{"name":"controlOrIDC","type":"Control or Number","description":"the ListNBox control or its IDC","type_expr":"Control | Number"},{"name":"column","type":"Number","description":"column to sort (starts with 0)","type_expr":"Number"},{"name":"sortByType","type":"String","optional":true,"default":"\"TEXT\"","description":"one of:\n\n- `\"TEXT\"`\n- `\"VALUE\"`\n- `\"DATA\"`","type_expr":"String","text":"sortByType: String - (Optional, default \"TEXT\") one of:\n\n- `\"TEXT\"`\n- `\"VALUE\"`\n- `\"DATA\"`"},{"name":"reversedOrder","type":"Boolean","optional":true,"default":"false","description":"true for sorting in reversed order","type_expr":"Boolean","text":"reversedOrder: Boolean - (Optional, default false) true for sorting in reversed order"},{"name":"caseSensitive","type":"Boolean","optional":true,"default":"false","description":"true for using case-sensitive comparison","type_expr":"Boolean","text":"caseSensitive: Boolean - (Optional, default false) true for using case-sensitive comparison"},{"name":"useTextRight","type":"Boolean","optional":true,"default":"false","description":"true to sort by text right","type_expr":"Boolean","text":"useTextRight: Boolean - (Optional, default false) true to sort by text right"},{"name":"unicodeOff","type":"Boolean","optional":true,"default":"false","description":"true to switch off UNICODE conversion for faster sorting","type_expr":"Boolean","text":"unicodeOff: Boolean - (Optional, default false) true to switch off UNICODE conversion for faster sorting"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"[controlOrIDC, column]"},"right":{"text":"[sortByType, reversedOrder, caseSensitive, useTextRight, unicodeOff]"}}],"examples":[{"text":"```sqf\nwith uiNamespace do\n{\n    private _column = 1;\n    private _lnb = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscListNBox\", -1];\n    _lnb ctrlSetPosition [0,0,1,1];\n    _lnb ctrlCommit 0;\n    lnbClear _lnb;\n    {\n        _lnb lnbAddRow [format [\"Row %1\", _forEachIndex], _x select 0];\n        _lnb lnbSetValue [[_forEachIndex, _column], _x select 1];\n    }\n    forEach [[\"В\",1], [\"Я\",0], [\"Б\",1], [\"Ю\",0], [\"А\",1]];\n    [_lnb, _column] lnbSortBy [\"VALUE\", true, false];\n};\n```","code":["with uiNamespace do\n{\n\tprivate _column = 1;\n\tprivate _lnb = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscListNBox\", -1];\n\t_lnb ctrlSetPosition [0,0,1,1];\n\t_lnb ctrlCommit 0;\n\tlnbClear _lnb;\n\t{ \n\t\t_lnb lnbAddRow [format [\"Row %1\", _forEachIndex], _x select 0];\n\t\t_lnb lnbSetValue [[_forEachIndex, _column], _x select 1];\n\t} \n\tforEach [[\"В\",1], [\"Я\",0], [\"Б\",1], [\"Ю\",0], [\"А\",1]];\n\t[_lnb, _column] lnbSortBy [\"VALUE\", true, false];\n};"]}],"see_also":["lbSortBy","lnbSort","lnbSortByValue","lbSort","lbSortByValue","tvSort","tvSortByValue","sort"]},{"name":"lnbSortByValue","title":"lnbSortByValue","type":"command","url":"https://community.bistudio.com/wiki/lnbSortByValue","revid":330120,"updated":"2022-08-21T19:54:07Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"1.08"},"since":"arma3 1.08","arma3_since":"1.08","description":"Sorts given multicolumn listbox by lnbValue in given column in ascending or descending order.","syntaxes":[{"syntax":"lnbSortByValue [idc, column, reversed]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"reversed","type":"Boolean","optional":true,"default":"false","description":"false: descending / true: ascending","type_expr":"Boolean","text":"reversed: Boolean - (Optional, default false) false: descending / true: ascending"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, column, reversed]"}},{"syntax":"control lnbSortByValue [column, reversed]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"column","type":"Number","type_expr":"Number"},{"name":"reversed","type":"Boolean","optional":true,"default":"false","description":"false: descending / true: ascending","type_expr":"Boolean","text":"reversed: Boolean - (Optional, default false) false: descending / true: ascending"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[column, reversed]"}}],"examples":[{"code":["lnbSortByValue [1800, 1, false];"]},{"code":["_ctl lnbSortByValue [1, true];"]}],"see_also":["lbSortBy","lnbSortBy","lbSort","lnbSort","tvSortByValue","lbSortByValue","tvSort"]},{"name":"lnbText","title":"lnbText","type":"command","url":"https://community.bistudio.com/wiki/lnbText","revid":379226,"updated":"2026-10-30T22:58:17Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Returns the shown text in the item with the given position of the given 2D listbox.","syntaxes":[{"syntax":"control lnbText [row, column]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"[row, column]"}},{"syntax":"lnbText [idc, [row, column]]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, [row, column]]"}}],"examples":[{"code":["_text = _ctrl lnbText [0,0];"]},{"code":["_text = lnbText [101, [0,1]];"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbValue"]},{"name":"lnbTextRight","title":"lnbTextRight","type":"command","url":"https://community.bistudio.com/wiki/lnbTextRight","revid":348794,"updated":"2023-11-08T14:33:18Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Returns CT_LISTNBOX's right aligned cell text.","syntaxes":[{"syntax":"lnbTextRight [idc, [row, column]]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","description":"index of the row","type_expr":"Number"},{"name":"column","type":"Number","description":"index of the column","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, [row, column]]"}},{"syntax":"ctrl lnbTextRight [row, column]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","description":"index of the row","type_expr":"Number"},{"name":"column","type":"Number","description":"index of the column","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[row, column]"}}],"examples":[{"code":["_text = _control lnbTextRight [0, 0];"]}],"see_also":["lnbSetTextRight"]},{"name":"lnbValue","title":"lnbValue","type":"command","url":"https://community.bistudio.com/wiki/lnbValue","revid":319419,"updated":"2022-05-13T09:24:03Z","groups":["GUI Control - ListNBox"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the additional integer value in the item with the given position of the 2D listbox.","syntaxes":[{"syntax":"lnbValue [idc, [row, column]]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"[idc, [row, column]]"}},{"syntax":"ctrl lnbValue [row, column]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"row","type":"Number","type_expr":"Number"},{"name":"column","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[row, column]"}}],"examples":[{"code":["_ctrl lnbValue [0,0]; // 1, default is 0 if value is String set by lnbSetValue"]}],"see_also":["lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText"]},{"name":"load","title":"load","type":"command","url":"https://community.bistudio.com/wiki/load","revid":347534,"updated":"2023-09-28T08:15:16Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns the percentage of fullness of a unit's cargo. Output is usually in range 0..1, but can be higher after using certain scripting commands (like addWeaponWithAttachmentsCargoGlobal) which ignore load values when adding items.\n\n> [!NOTE]\n> See Example 2 for load calculation.","syntaxes":[{"syntax":"load unit","params":[{"name":"unit","type":"Object","description":"(before Arma 3 v2.08 the command did not support containers, ammo boxes, weapon holders, vehicle cargos)","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["load player;"]},{"text":"unit load calculation formula:\n\n```sqf\nprivate _unitLoad = loadAbs _unit / getNumber (configFile >> \"CfgInventoryGlobalVariable\" >> \"maxSoldierLoad\");\n```","code":["private _unitLoad = loadAbs _unit / getNumber (configFile >> \"CfgInventoryGlobalVariable\" >> \"maxSoldierLoad\");"]}],"see_also":["maxLoad","loadAbs","loadBackpack","loadUniform","loadVest","getMass","weightRTD","getContainerMaxLoad"]},{"name":"load3DENScenario","title":"load3DENScenario","type":"command","url":"https://community.bistudio.com/wiki/load3DENScenario","revid":369783,"updated":"2024-10-08T15:09:02Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Load the provided scenario or an empty scenario in the provided world.","syntaxes":[{"syntax":"load3DENScenario scenarioOrWorld","params":[{"name":"scenarioOrWorld","type":"String","description":"scenario name or world name","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success, false otherwise"},"form":"unary","right":{"text":"scenarioOrWorld"}}],"examples":[{"code":["load3DENScenario \"MyMission.VR\";"]},{"code":["load3DENScenario \"Stratis\";"]},{"code":["//For a scenario located at ...\\Arma 3 - Other Profiles\\<PROFILENAME>\\missions\\subfolder\\myMission.VR\n//full path needs to be provided without leading \\\nload3DENScenario \"missions\\subfolder\\myMission.VR\";"]}],"see_also":["is3DENPreview"]},{"name":"loadAbs","title":"loadAbs","type":"command","url":"https://community.bistudio.com/wiki/loadAbs","revid":353757,"updated":"2024-03-23T13:51:29Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns current sum of mass from items stored in all unit's containers, linked items and weapons.","syntaxes":[{"syntax":"loadAbs unit","params":[{"name":"unit","type":"Object","description":"(before Arma 3 v2.08 the command did not support containers, ammo boxes, weapon holders, vehicle cargos)","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"Player weight:\n\n```sqf\n_weight = loadAbs player;\n```","code":["_weight = loadAbs player;"]},{"text":"```sqf\nprivate _loadUniform = loadAbs uniformContainer player;\nprivate _loadVest = loadAbs vestContainer player;\nprivate _loadBackpack = loadAbs backpackContainer player;\nhint format [\n    \"Player's load:\\nUniform: %1\\nVest:%2\\nBackpack: $3\\nTotal: %4\",\n    _loadUniform,\n    _loadVest,\n    _loadBackpack,\n    _loadUniform + _loadVest + _loadBackpack\n];\n```","code":["private _loadUniform = loadAbs uniformContainer player;\nprivate _loadVest = loadAbs vestContainer player;\nprivate _loadBackpack = loadAbs backpackContainer player;\nhint format [\n\t\"Player's load:\\nUniform: %1\\nVest:%2\\nBackpack: $3\\nTotal: %4\",\n\t_loadUniform,\n\t_loadVest,\n\t_loadBackpack,\n\t_loadUniform + _loadVest + _loadBackpack\n];"]}],"see_also":["load","maxLoad","loadBackpack","loadUniform","loadVest","getMass","weightRTD","getContainerMaxLoad"]},{"name":"loadBackpack","title":"loadBackpack","type":"command","url":"https://community.bistudio.com/wiki/loadBackpack","revid":321277,"updated":"2022-05-13T19:08:07Z","groups":["Containers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns current percentage of mass from items stored in a backpack relative to the maximum capacity of the backpack.\nIt is equivalent to this formula:\n\n```sqf\n_loadBackpack = massOfAllItemsInBackpack / getContainerMaxLoad backpack player;\n```","syntaxes":[{"syntax":"loadBackpack unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _myVariable = loadBackpack myUnit;"]}],"see_also":["load","backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","removeBackpack","clearBackpackCargo","clearAllItemsFromBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack","loadUniform","loadVest","getMass","weightRTD","getContainerMaxLoad"]},{"name":"loadConfig","title":"loadConfig","type":"command","url":"https://community.bistudio.com/wiki/loadConfig","revid":341399,"updated":"2023-05-25T14:02:22Z","groups":["Config"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Loads the given file as a Config, allowing easy processing of the config file contents using commands such as configClasses, configProperties, >>, etc. It can load .rvmat, .bisurf, .cpp, .bin, .sqm, and description.ext files (both binarized and unbinarized configs are supported).\n\n> [!IMPORTANT]\n> - Config loading can be very slow; the config should only be loaded once and cached, e.g in a HashMap of `File Path → Config` pairs (see Example 3).\n> - It is advised to store the generated config in a variable, otherwise it will get destroyed if it is not being referenced directly (see Example 2).","syntaxes":[{"syntax":"loadConfig path","params":[{"name":"path","type":"String","description":"path to the file, which should be in a valid config format.","type_expr":"String"}],"returns":{"type":"Config","type_expr":"Config","description":"loaded config. Returns configNull if the file doesn't exist."},"form":"unary","right":{"text":"path"}}],"examples":[{"code":["private _cfg = loadConfig \"a3\\data_f\\default_super.rvmat\"; // note: very slow! ~0.1200 ms on tested system\ngetText (_cfg >> \"Stage2\" >> \"uvSource\");"]},{"code":["// INCORRECT - the config is destroyed after the first operator >> accesses it\ngetNumber (loadConfig \"mission.sqm\" >> \"ScenarioData\" >> \"respawnDelay\");\n\n// CORRECT - the config is destroyed only when the variable _cfg is destroyed\n_cfg = loadConfig \"mission.sqm\";\ngetNumber (_cfg >> \"ScenarioData\" >> \"respawnDelay\");"]},{"text":"```sqf\n// using a hashmap to cache loaded configs, since loading configs is very slow and should be done once.\nprivate _fnc_loadConfig = {\n    params [\"_path\"];\n    // initialize cache if not initialized yet\n    if (isNil \"TAG_configCache\") then\n    {\n        TAG_configCache = createHashMap;\n    };\n    private _cfg = TAG_configCache getOrDefault [_path, configNull];\n    // if path doesn't exist in the cache or cfg is null, load the config\n    if (isNull _cfg) then\n    {\n        _cfg = loadConfig _path;\n        TAG_configCache set [_path, _cfg];\n    };\n    _cfg;\n};\n// the first call will be slow (~0.1200 ms), but subsequent calls are fast (~0.0050 ms)\n[\"a3\\data_f\\default_super.rvmat\"] call _fnc_loadConfig;\n```","code":["// using a hashmap to cache loaded configs, since loading configs is very slow and should be done once.\nprivate _fnc_loadConfig = {\n\tparams [\"_path\"];\n\t// initialize cache if not initialized yet\n\tif (isNil \"TAG_configCache\") then\n\t{\n\t\tTAG_configCache = createHashMap;\n\t};\n\tprivate _cfg = TAG_configCache getOrDefault [_path, configNull];\n\t// if path doesn't exist in the cache or cfg is null, load the config\n\tif (isNull _cfg) then\n\t{\n\t\t_cfg = loadConfig _path;\n\t\tTAG_configCache set [_path, _cfg];\n\t};\n\t_cfg;\n};\n// the first call will be slow (~0.1200 ms), but subsequent calls are fast (~0.0050 ms)\n[\"a3\\data_f\\default_super.rvmat\"] call _fnc_loadConfig;"]},{"text":"```sqf\n// converting a config into hashmap\nprivate _fnc_convertClass = {\n    params [\"_cfgClass\"];\n\n    private _result = createHashMap;\n    private _props = configProperties [_cfgClass, \"true\", true];\n    // note: Hashmaps are case-sensitive so configName cases have to be consistent (e.g. all lowercase)\n    {\n        if (isNumber _x)    then { _result set [toLowerANSI configName _x, getNumber _x];    continue; };\n        if (isText _x)        then { _result set [toLowerANSI configName _x, getText _x];        continue; };\n        if (isArray _x)        then { _result set [toLowerANSI configName _x, getArray _x];    continue; };\n    } forEach _props;\n\n    private _classes = \"true\" configClasses _cfgClass;\n    {\n        _result set [toLowerANSI configName _x, _x call _fnc_convertClass];\n    } forEach _classes;\n\n    _result;\n};\n\nprivate _cfg = loadConfig \"mission.sqm\";\nprivate _cfgMap = _cfg call _fnc_convertClass;\n\n// the following expression is similar to getNumber(_cfg >> \"EditorData\" >> \"moveGridStep\")\n// note that all strings are lowercase (which is how they were stored in hashmap)\n_cfgMap get \"editordata\" get \"movegridstep\";\n```","code":["// converting a config into hashmap\nprivate _fnc_convertClass = {\n\tparams [\"_cfgClass\"];\n\n\tprivate _result = createHashMap;\n\tprivate _props = configProperties [_cfgClass, \"true\", true];\n\t// note: Hashmaps are case-sensitive so configName cases have to be consistent (e.g. all lowercase)\n\t{\n\t\tif (isNumber _x)\tthen { _result set [toLowerANSI configName _x, getNumber _x];\tcontinue; };\n\t\tif (isText _x)\t\tthen { _result set [toLowerANSI configName _x, getText _x];\t\tcontinue; };\n\t\tif (isArray _x)\t\tthen { _result set [toLowerANSI configName _x, getArray _x];\tcontinue; };\n\t} forEach _props;\n\n\tprivate _classes = \"true\" configClasses _cfgClass;\n\t{\n\t\t_result set [toLowerANSI configName _x, _x call _fnc_convertClass];\n\t} forEach _classes;\n\n\t_result;\n};\n\nprivate _cfg = loadConfig \"mission.sqm\";\nprivate _cfgMap = _cfg call _fnc_convertClass;\n\n// the following expression is similar to getNumber(_cfg >> \"EditorData\" >> \"moveGridStep\")\n// note that all strings are lowercase (which is how they were stored in hashmap)\n_cfgMap get \"editordata\" get \"movegridstep\";"]}],"see_also":["loadFile","config greater greater name","configFile","configClasses","isText","isNumber","isArray","isClass","configName","getText","getNumber","getArray"],"notes":[{"user":"Dedmen","date":"2022-03-22T09:14:37Z","text":"When trying to load a terrain surface name, like you get from Ammo Eventhandlers when you hit the terrain, you can simply use\n\n```sqf\nprivate _config = configFile >> \"CfgSurfaces\" >> _surfaceName;\n```\n\nYou can recognize surface names by them not having any \\ path separators in them, they usually start with gdt, for example \"gdtvrsurface01\"."}]},{"name":"loadCuratorSelectionPreset","title":"loadCuratorSelectionPreset","type":"command","url":"https://community.bistudio.com/wiki/loadCuratorSelectionPreset","revid":347228,"updated":"2023-09-05T17:11:28Z","groups":["Curator"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","description":"Load the given selection preset to the current selection of the curator.","syntaxes":[{"syntax":"loadCuratorSelectionPreset numkey","params":[{"name":"numkey","type":"Number","description":"the number key under which the selection preset is saved","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"numkey"}}],"examples":[{"code":["loadCuratorSelectionPreset 1;"]}],"see_also":["curatorSelectionPreset","setCuratorSelectionPreset","curatorSelected","setCuratorSelected","addCuratorSelected","Arma 3: Curator"]},{"name":"loadFile","title":"loadFile","type":"command","url":"https://community.bistudio.com/wiki/loadFile","revid":379449,"updated":"2026-10-31T00:08:00Z","groups":["Program Flow"],"status":"ok","games":{"ofp":"1.90","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.90","arma3_since":"0.50","description":"Returns the content of given files. If you plan to compile said string, be aware that the file should not contain comments or compile will throw an error. If there are comments, use preprocessFile/preprocessFileLineNumbers instead.\n\n> [!WARNING]\n> If the file is not prepared using UTF-8 encoding and contains some characters with codes > 127, they might convert incorrectly.","syntaxes":[{"syntax":"loadFile fileName","params":[{"name":"fileName","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"fileName"}}],"examples":[{"code":["_contents = loadFile \"wantedString.txt\";"]},{"code":["_contents = compile loadFile \"myFunction.sqf\"; // will compile string into code"]}],"see_also":["fileExists","preprocessFile","preprocessFileLineNumbers"],"notes":[{"user":"James","date":"2016-01-25T12:13:00Z","text":"Notice that you will have to activate file patching via -filePatching. Otherwise execVM and loadFile will **not** load any files outside your mission folder (like the global scripts)."}]},{"name":"loadGame","title":"loadGame","type":"command","url":"https://community.bistudio.com/wiki/loadGame","revid":353705,"updated":"2024-03-21T18:23:51Z","groups":["Mission Information"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Loads game from the last autosave made with saveGame.\nIf no autosave exists, restarts the mission. When used in campaign it will also deduct 1 life, defined in:\n\n```sqf\ncampaignConfigFile >> \"Campaign\" / \"ChapterName\" / \"MissionName\" / \"lives\"\n```\n\n> [!NOTE]\n> A `\"Loaded\"` mission event handler is available;\n> it is important that it is added in `preInit` in order for it to fire on load from save.","syntaxes":[{"syntax":"loadGame","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["loadGame;"]}],"see_also":["enableSaving","saveGame","savingEnabled","isSaving"]},{"name":"loadIdentity","title":"loadIdentity","type":"command","url":"https://community.bistudio.com/wiki/loadIdentity","revid":322977,"updated":"2022-06-28T21:42:55Z","groups":["Unit Identity"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Loads person's identity from Objects.sav file in campaign directory (from entry name).","syntaxes":[{"syntax":"unit loadIdentity name","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if successfull, otherwise false"},"form":"binary","left":{"text":"unit"},"right":{"text":"name"}}],"examples":[{"code":["_ok = player loadIdentity \"playerIdentity\";"]}],"multiplayer":"This command does not work in Multiplayer.","see_also":["saveIdentity","lockIdentity","setIdentity"]},{"name":"loadMagazine","title":"loadMagazine","type":"command","url":"https://community.bistudio.com/wiki/loadMagazine","revid":377475,"updated":"2026-01-02T06:48:47Z","groups":["Weapons","Turrets"],"status":"ok","games":{"arma2oa":"1.60","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.60","arma3_since":"0.50","description":"Initiates the loading action on given weapon of the turret of a transport. So the new magazine is not available instantly, yet according to the reloadTime.\nThe turret has to be manned. One can also change the magazine if its respective weapon is not selected.","syntaxes":[{"syntax":"transport loadMagazine [turretPath, weaponName, magazineName]","params":[{"name":"transport","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"},{"name":"weaponName","type":"String","type_expr":"String"},{"name":"magazineName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"transport"},"right":{"text":"[turretPath, weaponName, magazineName]"}}],"examples":[{"code":["vehicle player loadMagazine [[0], \"m256\", \"20Rnd_120mmHE_M1A2\"];"]}],"see_also":["magazinesTurret","addMagazineTurret","reload","weaponState","setWeaponReloadingTime","weapons","magazines","Arma 3: Actions"]},{"name":"loadOverlay","title":"loadOverlay","type":"command","url":"https://community.bistudio.com/wiki/loadOverlay","revid":353378,"updated":"2024-03-15T17:11:59Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Creates the load overlay dialog for the specified type of overlay.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map loadOverlay config","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"config"}}],"examples":[{"text":"-"}]},{"name":"loadStatus","title":"loadStatus","type":"command","url":"https://community.bistudio.com/wiki/loadStatus","revid":319462,"updated":"2022-05-13T09:24:07Z","groups":["Weapon Pool","Mission Information"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Loads object's properties from Objects.sav file in campaign directory (from entry name).","syntaxes":[{"syntax":"object loadStatus entryName","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"entryName","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if successfull, otherwise false"},"form":"binary","left":{"text":"object"},"right":{"text":"entryName"}}],"examples":[{"code":["_ok = player loadStatus \"playerState\";"]}],"multiplayer":"This command does not work in Multiplayer.","see_also":["saveStatus"]},{"name":"loadUniform","title":"loadUniform","type":"command","url":"https://community.bistudio.com/wiki/loadUniform","revid":320992,"updated":"2022-05-13T10:22:04Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns current percentage of mass from items stored in a uniform relative to the maximum capacity of the uniform.\nIt is equivalent to this formula:\n\n```sqf\nprivate _loadUniform = massOfAllItemsInUniform / getContainerMaxLoad uniform player;\n```","syntaxes":[{"syntax":"loadUniform unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _weight = loadUniform player;"]}],"see_also":["load","loadAbs","loadBackpack","loadVest","getMass","weightRTD","getContainerMaxLoad"]},{"name":"loadVest","title":"loadVest","type":"command","url":"https://community.bistudio.com/wiki/loadVest","revid":323062,"updated":"2022-06-28T21:43:11Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns current percentage of mass from items stored in a vest relative to the maximum capacity of the vest.\nIt is equivalent to this formula:\n\n```sqf\n_loadVest = massOfAllItemsInVest / getContainerMaxLoad vest player;\n```","syntaxes":[{"syntax":"loadVest unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_weight = loadVest player;"]}],"see_also":["load","loadAbs","loadBackpack","loadUniform","getMass","weightRTD","getContainerMaxLoad"]},{"name":"local","title":"local","type":"command","url":"https://community.bistudio.com/wiki/local","revid":379296,"updated":"2026-10-30T23:47:38Z","groups":["Multiplayer"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Check if given unit is local on the computer in multiplayer games - see Multiplayer Scripting - Locality.\nThis can be used to determine on which computer some code must be run. In single player all objects are local.","syntaxes":[{"syntax":"local object","params":[{"name":"object","type":"Object or Arma 3 v1.32 Group","type_expr":"Object | Group"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"object"}},{"syntax":"local variable = value","note":"**From Arma 2 v1.00 until Arma 3 v1.54** - see **private** for later versions","since":"arma2 1.00","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"variable = value"}}],"examples":[{"text":"```sqf\nif (not local _unit) then\n{\n    hint format [\"%1 is remote\", name _unit];\n};\n```","code":["if (not local _unit) then\n{\n\thint format [\"%1 is remote\", name _unit];\n};"]},{"code":["_isLocalGroup = local group _unit;"]},{"text":"Sets variable's scope:\n\n```sqf\n// from Arma 2 v1.00 until Arma 3v1.54\nlocal _myVariable = 42;\n\n// since Arma 3 v1.54\nprivate _myVariable = 42;\n```","code":["// from Arma 2 v1.00 until Arma 3v1.54\nlocal _myVariable = 42;\n\n// since Arma 3 v1.54\nprivate _myVariable = 42;"]}],"multiplayer":"A few things to note amongst others:\n\n- A game logic / module is always local to the server\n- Terrain objects are local to every machine","see_also":["Arma 3: Event Handlers","owner","setOwner"]},{"name":"localize","title":"localize","type":"command","url":"https://community.bistudio.com/wiki/localize","revid":340342,"updated":"2023-04-30T12:39:28Z","groups":["Strings","Localization"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Used to internationalise text messages. The provided translation key is looked up in Stringtable.xml (or Stringtable.csv).","syntaxes":[{"syntax":"localize stringName","params":[{"name":"stringName","type":"String","description":"string which leads to localisation. Casing does not matter. Arma 3 v2.04 A string starting with \"$\" is supported","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"text found in corresponding entry in stringtable file. If the key could not be found an empty string `\"\"` is returned and an entry is added to .rpt file, for example `String STR_DN_SNAKE not found`"},"form":"unary","right":{"text":"stringName"}}],"examples":[{"text":"```sqf\nhint localize \"STR_West\";                // returns \"BLUFOR\"\nhint localize \"STR_WEST\";                // returns \"BLUFOR\"\nhint localize \"STR_weSt\";                // returns \"BLUFOR\"\nhint localize \"STR_NonExistentString\";    // returns \"\" and logs \"String STR_NonExistentString not found\"\n```","code":["hint localize \"STR_West\";\t\t\t\t// returns \"BLUFOR\"\nhint localize \"STR_WEST\";\t\t\t\t// returns \"BLUFOR\"\nhint localize \"STR_weSt\";\t\t\t\t// returns \"BLUFOR\"\nhint localize \"STR_NonExistentString\";\t// returns \"\" and logs \"String STR_NonExistentString not found\""]},{"code":["hint format [\"Go %1\", localize \"STR_Q_NORTH\"]; // returns \"Go North\""]},{"text":"```sqf\nhint format\n[\n    localize \"STR_ACTION_DROP_WEAPON\",    // \"STR_ACTION_DROP_WEAPON\" contains \"Drop %1\"\n    localize \"STR_SN_RIFLE\"                // \"STR_SN_RIFLE\" contains \"Rifle\"\n]; // returns \"Drop Rifle\"\n```","code":["hint format \n[\n\tlocalize \"STR_ACTION_DROP_WEAPON\",\t// \"STR_ACTION_DROP_WEAPON\" contains \"Drop %1\"\n\tlocalize \"STR_SN_RIFLE\"\t\t\t\t// \"STR_SN_RIFLE\" contains \"Rifle\"\n]; // returns \"Drop Rifle\""]},{"code":["localize \"$STR_USRACT_ADJUST\"; // returns \"Adjust\" since Arma 3 v2.04"]}],"see_also":["isLocalized","diag_localized","getTextRaw","BIS_fnc_localize","WFSideText","parseText","Stringtable.csv","Stringtable.xml"],"notes":[{"user":"Killzone_Kid","date":"2014-09-12T11:55:00Z","text":"The command localize will strip all HTML tags from your Stringtable.xml entries, however there is a way to trick it by substituting tags with HTML code instead:\n\n```xml\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Key ID=\"STR_TEST_KK\">\n    <Original><![CDATA[<t color='#ff0000'>This doesn't work</t>]]></Original>\n</Key>\n<Key ID=\"STR_TEST_KK2\">\n    <Original>&lt;t color='#ff0000'&gt;This works&lt;/t&gt;</Original>\n</Key>\n```\n\n```sqf\nhint parseText localize \"str_test_kk\";    // no change of colour\nhint parseText localize \"str_test_kk2\";    // hint content is in red\n```"}]},{"name":"localNamespace","title":"localNamespace","type":"command","url":"https://community.bistudio.com/wiki/localNamespace","revid":309258,"updated":"2022-05-04T11:01:29Z","groups":["Namespaces","Variables","Multiplayer"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns local Namespace attached to the mission.\nHas the same lifetime as missionNamespace but variables **cannot be broadcasted** out of or into this namespace in multiplayer and will not be serialized when game is saved. UI variables can be safely stored in this namespace.\nUse allVariables command to save the variables elsewhere if required.","syntaxes":[{"syntax":"localNamespace","params":[],"returns":{"type":"Namespace","type_expr":"Namespace"},"form":"nullary"}],"examples":[{"code":["localNamespace setVariable [\"abc\", 123];"]},{"code":["with localNamespace do { hint str abc };"]}],"see_also":["missionNamespace","uiNamespace","parsingNamespace","profileNamespace","currentNamespace","allVariables"]},{"name":"locationNull","title":"locationNull","type":"command","url":"https://community.bistudio.com/wiki/locationNull","revid":321059,"updated":"2022-05-13T12:19:56Z","groups":["Locations","Variables"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"A non-existing Location. To compare non-existent locations use isNull or isEqualTo:\n\n```sqf\nlocationNull == locationNull;            // false\nisNull locationNull;                    // true\nlocationNull isEqualTo locationNull;    // true\n```","syntaxes":[{"syntax":"locationNull","params":[],"returns":{"type":"Location","type_expr":"Location"},"form":"nullary"}],"examples":[{"code":["!isNull locationNull; // false"]},{"code":["str locationNull; // No location"]},{"code":["position locationNull; // [0,0,0]"]}],"see_also":["controlNull","displayNull","grpNull","objNull","taskNull","teamMemberNull","scriptNull","configNull","typeName","isNull"]},{"name":"locationPosition","title":"locationPosition","type":"command","url":"https://community.bistudio.com/wiki/locationPosition","revid":377416,"updated":"2026-01-02T06:45:21Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Returns the position of a location. If the location is attached to an object, that object's position is returned.","syntaxes":[{"syntax":"locationPosition location","params":[{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"as locations are placed at Z = zero ASL the returned Z is negative on land and around zero on water, see Example 3"},"form":"unary","right":{"text":"location"}}],"examples":[{"code":["_locationPos = locationPosition myLocation;"]},{"code":["_location = nearestLocation [getPos player, \"nameCity\"];\n_locationPos = locationPosition _location;"]},{"code":["private _landLocation = locationPosition nearestLocation [[2915.2, 6164.52], \"NameCityCapital\"]; // \"Agia Marina\" [2915.2, 6164.52, -21.9009]\nprivate _waterLocation = locationPosition nearestLocation [[2647.8799, 5989.9502], \"NameMarine\"]; // \"Marina Bay\" [2647.88, 5989.95, 0.0161484]"]}],"see_also":["setPosition","createLocation","nearestLocation","nearestLocations","position","size"]},{"name":"lock","title":"lock","type":"command","url":"https://community.bistudio.com/wiki/lock","revid":353298,"updated":"2024-03-15T17:11:43Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Lock vehicle (disable mounting / dismounting) for player.\nThis command will remove user get in/get out actions but will not stop player getting into or out of vehicle via script commands (e.g moveInCargo).\n\n> [!NOTE]\n> Alternative syntax is similar to setVehicleLock but with numbers.","syntaxes":[{"syntax":"vehicleName lock locked","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"},{"name":"locked","type":"Boolean","description":"true to lock, false to unlock","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"locked"}},{"syntax":"vehicleName lock lockstate","since":"arma3 0.50","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"},{"name":"lockstate","type":"Number","description":"can be one of the following:\n0 - Unlocked\n1 - Default (player subordinate cannot enter until his leader says so)\n2 - Locked\n3 - Locked for player","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"lockstate"}}],"examples":[{"code":["_jeepOne lock true;"]},{"code":["heli lock true;\nlocked heli; // 2\n\nheli lock false;\nlocked heli; // 0\n\nheli lock 1;\nlocked heli; // 1"]}],"see_also":["locked","setVehicleLock","lockDriver","lockCargo","lockTurret"],"notes":[{"user":"Tankbuster","date":"2010-01-09T22:48:00Z","text":"Lock prevents AI persons mounting or dismounting vehicles when ordered to do so and players are prevented from doing both too, but AI will still dismount when a vehicle is damaged."},{"user":"cali","date":"2010-09-22T04:56:00Z","text":"If an AI group (e.g Mechanized Infantry) has its vehicle locked with its crew in it, it will mount or dismount it anyway. But a player in this group won't be able to enter the vehicle."}]},{"name":"lockCameraTo","title":"lockCameraTo","type":"command","url":"https://community.bistudio.com/wiki/lockCameraTo","revid":377889,"updated":"2026-01-05T17:33:18Z","groups":["Camera Control"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","locality":{"argument":"local"},"description":"Lock/Unlock stabilized camera to target. Works only on turrets which have optic mode selected with direction stabilization enabled.\n\n> [!NOTE]\n> Since Arma 3 v2.08 the command also works with non-stabilized turrets (such as main turret of a tank). See syntax 2.\n\n> [!NOTE]\n> The command is local to the **turret** gunner, not the vehicle.","syntaxes":[{"syntax":"vehicle lockCameraTo [target, turretPath]","params":[{"name":"vehicle","type":"Object","description":"UAV","type_expr":"Object"},{"name":"target","type":"Object or PositionASL","description":"use objNull to unlock","type_expr":"Object | PositionASL"},{"name":"turretPath","type":"Turret Path","description":"path to the turret with required camera","type_expr":"Turret Path"}],"returns":{"type":"Nothing","type_expr":"Nothing","description":"> [!IMPORTANT] > - This syntax only works with stabilized turrets. > - When using this syntax, if target is out of possible view, the turret will move to its limit and get stuck there, with blocked input.","text":"Nothing\n\n> [!IMPORTANT]\n> - This syntax only works with stabilized turrets.\n> - When using this syntax, if target is out of possible view, the turret will move to its limit and get stuck there, with blocked input."},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[target, turretPath]"}},{"syntax":"vehicle lockCameraTo [target, turretPath, temporary]","since":"arma3 2.08","params":[{"name":"vehicle","type":"Object","description":"UAV","type_expr":"Object"},{"name":"target","type":"Object or PositionASL","description":"use objNull to unlock","type_expr":"Object | PositionASL"},{"name":"turretPath","type":"Turret Path","description":"path to the turret with required camera","type_expr":"Turret Path"},{"name":"temporary","type":"Boolean","description":"if set to true, the engine will automatically remove the lock-on once the turret reaches its target.\nIf the target is out of turret's reach, once the turret reaches its limits the lock-on will be released.","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing","description":"> [!NOTE] > This syntax also works with non-stabilized turrets, unlike Syntax 1.","text":"Nothing\n\n> [!NOTE]\n> This syntax also works with non-stabilized turrets, unlike Syntax 1."},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[target, turretPath, temporary]"}}],"examples":[{"code":["uav lockCameraTo [cursorObject, [0,0]];"]},{"code":["uav lockCameraTo [objNull, [0,0]]; // unlocks the turret"]},{"code":["vehicle player lockCameraTo [enemyTarget, vehicle player unitTurret player, false];"]}],"see_also":["lockedCameraTo","camTarget","camSetTarget","camPrepareTarget","directionStabilizationEnabled","enableDirectionStabilization"],"notes":[{"user":"Commy2","date":"2015-04-10T06:54:00Z","text":"The vehicle has to have a stabilized optic for this command to work with ASL position."}]},{"name":"lockCargo","title":"lockCargo","type":"command","url":"https://community.bistudio.com/wiki/lockCargo","revid":330374,"updated":"2022-09-04T20:45:50Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Lock all cargo positions of a vehicle or lock by index.\nThis command will remove user \"get in\" action (not get out) but will also stop player getting into vehicle via script commands (e.g moveInCargo) unlike lock command.","syntaxes":[{"syntax":"vehicle lockCargo lock","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"lock","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"lock"}},{"syntax":"vehicle lockCargo [index, lock]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"lock","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[index, lock]"}}],"examples":[{"code":["vehicleName lockCargo true;"]},{"code":["vehicleName lockCargo [0, true];"]}],"see_also":["lock","setVehicleLock","lockDriver","lockedCargo","lockTurret"]},{"name":"lockDriver","title":"lockDriver","type":"command","url":"https://community.bistudio.com/wiki/lockDriver","revid":364987,"updated":"2024-07-04T19:58:05Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Lock the driver position of the vehicle. This command must be executed where vehicle is local. This command will remove user get in action (not get out) but will also stop player getting into vehicle via script commands unlike lock command","syntaxes":[{"syntax":"vehicle lockDriver lock","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"lock","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"lock"}}],"examples":[{"code":["vehicleName lockDriver true;"]}],"see_also":["lock","setVehicleLock","lockedDriver","lockCargo","lockTurret"],"notes":[{"user":"Sa-Matra","date":"2023-04-03T03:34:25Z","text":"Locked seats also aren't allowed to be controlled remotely through UAV terminal."}]},{"name":"locked","title":"locked","type":"command","url":"https://community.bistudio.com/wiki/locked","revid":310835,"updated":"2022-05-07T20:23:59Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Check if vehicle is locked. If it is locked, Persons cannot mount / dismount without order.","syntaxes":[{"syntax":"locked vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"types":["Number"],"type_expr":"Number | Boolean","description":"- Number - since Arma 3 v0.50 - 0: Unlocked - 1: Default - a subordinate player cannot enter without AI leader order - 2: Locked - 3: Locked for player - -1: vehicle is null - Boolean for older games","text":"- Number - since Arma 3 v0.50\n  - 0: Unlocked\n  - 1: Default - a subordinate player cannot enter without AI leader order\n  - 2: Locked\n  - 3: Locked for player\n  - -1: vehicle is null\n- Boolean for older games"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_locked = locked _jeepOne;"]}],"see_also":["lock","setVehicleLock","lockedDriver","lockedCargo","lockedTurret"]},{"name":"lockedCameraTo","title":"lockedCameraTo","type":"command","url":"https://community.bistudio.com/wiki/lockedCameraTo","revid":378357,"updated":"2026-04-02T16:48:58Z","groups":["Camera Control"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"argument":"local"},"description":"Return the turret lock target.\n\n> [!NOTE]\n> The command is local to the **turret**, not the vehicle.","syntaxes":[{"syntax":"vehicle lockedCameraTo turretPath","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","description":"Turret Path. Use an empty array to select the gunner's turret by default","type_expr":"Turret Path","text":"turretPath: Turret Path. Use an empty array to select the gunner's turret by default"}],"returns":{"type_expr":"Nothing | Object | PositionASL","description":"- Nothing - not locked - Object - if locked to an object - PositionASL - if locked to a position","text":"Can be one of:\n\n- Nothing - not locked\n- Object - if locked to an object\n- PositionASL - if locked to a position"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}}],"examples":[{"code":["vehicle player lockedCameraTo [];"]}],"see_also":["lockCameraTo"]},{"name":"lockedCargo","title":"lockedCargo","type":"command","url":"https://community.bistudio.com/wiki/lockedCargo","revid":321015,"updated":"2022-05-13T11:15:18Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Check whether cargo position of the vehicle is locked.","syntaxes":[{"syntax":"vehicle lockedCargo cargoIndex","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"cargoIndex","type":"Number","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"cargoIndex"}}],"examples":[{"code":["_result = vehicleName lockedCargo 0;"]}],"see_also":["lockCargo"],"notes":[{"user":"AgentRev","date":"2016-05-04T23:09:00Z","text":"For some vehicles, the command returns Nothing if the cargo index is invalid (i.e. -1)"}]},{"name":"lockedDriver","title":"lockedDriver","type":"command","url":"https://community.bistudio.com/wiki/lockedDriver","revid":363262,"updated":"2024-03-26T10:51:33Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Check whether driver position of the vehicle turret is locked.","syntaxes":[{"syntax":"lockedDriver vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_driverLocked = lockedDriver vehicle player;"]}],"see_also":["vehicle","driver"]},{"name":"lockedInventory","title":"lockedInventory","type":"command","url":"https://community.bistudio.com/wiki/lockedInventory","revid":338797,"updated":"2023-04-07T06:40:04Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Get a vehicle's inventory lock state. Can also be used on a unit's backback (see lockInventory).","syntaxes":[{"syntax":"lockedInventory vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["private _isInventoryLocked = lockedInventory vehicle player;"]},{"code":["private _isBackpackLocked = lockedInventory backpackContainer player;"]}],"see_also":["lockInventory"]},{"name":"lockedTurret","title":"lockedTurret","type":"command","url":"https://community.bistudio.com/wiki/lockedTurret","revid":377494,"updated":"2026-01-02T06:49:19Z","groups":["Turrets"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Check whether gunner position of the vehicle turret is locked.","syntaxes":[{"syntax":"vehicle lockedTurret turretPath","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}}],"examples":[{"code":["_locked = tank lockedTurret [0];"]}],"see_also":["lockTurret","moveInTurret","turretUnit"]},{"name":"lockIdentity","title":"lockIdentity","type":"command","url":"https://community.bistudio.com/wiki/lockIdentity","revid":321185,"updated":"2022-05-13T15:19:51Z","groups":["Unit Identity"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Locks the identity of a person. This will disable default identity.","syntaxes":[{"syntax":"lockIdentity unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true, if it was applied"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_success = lockIdentity player;"]}],"see_also":["loadIdentity","setIdentity"]},{"name":"lockInventory","title":"lockInventory","type":"command","url":"https://community.bistudio.com/wiki/lockInventory","revid":370883,"updated":"2025-02-21T10:44:04Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","locality":{"argument":"global","effect":"local"},"description":"Lock or unlock a vehicle's inventory access.\nThis command can also lock backpack a unit is wearing to prevent access by a third party.\nIf set to true (locked), the inventory cannot be accessed via hotkey or action menu.","syntaxes":[{"syntax":"vehicle lockInventory lock","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"lock","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"lock"}}],"examples":[{"code":["vehicle player lockInventory true;"]},{"code":["backpackContainer player lockInventory true;"]}],"see_also":["lockedInventory"],"notes":[{"user":"PierreMGI","text":"This command works only on alive unit. No matter you run it before or after death, on due backpackContainer unit, the backpack will be accessible on corpse."}]},{"name":"lockTurret","title":"lockTurret","type":"command","url":"https://community.bistudio.com/wiki/lockTurret","revid":377482,"updated":"2026-01-02T06:48:59Z","groups":["Turrets"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Lock the gunner position of the vehicle turret.\nThis command will remove user \"get in\" action (not \"get out\") but will also stop player getting into vehicle via script commands unlike lock command.","syntaxes":[{"syntax":"vehicle lockTurret [turretPath, lock]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"},{"name":"lock","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[turretPath, lock]"}}],"examples":[{"code":["vehicleName lockTurret [[0,0], true];"]},{"code":["vehicle player lockTurret [[0], true];"]}],"see_also":["lockedTurret","lockCargo","lockDriver","assignedVehicleRole","turretUnit","moveInTurret"]},{"name":"lockWP","title":"lockWP","type":"command","url":"https://community.bistudio.com/wiki/lockWP","revid":321186,"updated":"2022-05-13T15:20:16Z","groups":["Waypoints"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Disable switching to next waypoint (current waypoint will never complete while lockwp is used). Sometimes used during cut-scenes.","syntaxes":[{"syntax":"groupName lockWP lock","params":[{"name":"groupName","type":"Object or Group","type_expr":"Object | Group"},{"name":"lock","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"groupName"},"right":{"text":"lock"}}],"examples":[{"code":["_groupOne lockWP true;"]},{"code":["_Soldier lockWP true;"]},{"code":["_MyTank lockWP false;"]}],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed"]},{"name":"log","title":"log","type":"command","url":"https://community.bistudio.com/wiki/log","revid":379450,"updated":"2026-10-31T00:08:08Z","groups":["Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Base-10 logarithm of x.","syntaxes":[{"syntax":"log x","params":[{"name":"x","type":"Number","description":"a positive number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"x"}}],"examples":[{"code":["_log = log 10;"]},{"code":["_log = log abs -10;"]},{"code":["finite log -10; // Returns false"]}],"see_also":["Math Commands"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-16T23:14:00Z","text":"To clarify:\n\n```sqf\ny = 10 ^ x // x = log y\n```\n\nPeople use logarithm at the purpose of simplifying multiplication via exponents plus years before.\n\n```sqf\n23456*45634 = 1.07039e9\nlog 23456 = 4.37025; log 45634 = 4.65929; (log 23456) + (log 45634) = 9.02954\n10^((log 23456) + (log 45634)) = 10 ^ 9.02954  // same as 23456*45634\n```\n\nAs modern usage, for instance, to evaluate another exponent when multiple is known (Which magnitude is 4 times stronger than 8.3 earthquake?):\n\n```sqf\n//_Unknown = log x; 8.3 = log y\n// x = 10 ^_Unknown; y = 10 ^8.3\n//x/y = (10 ^_Unknown)/(10 ^8.3) = log 4\n// x/y = _Unknown – 8.3 = 0.6\n//_result = 8.9 magnitude\n_result = (log 4) + 8.3\n```"}]},{"name":"logEntities","title":"logEntities","type":"command","url":"https://community.bistudio.com/wiki/logEntities","revid":369445,"updated":"2024-09-05T17:09:41Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.18"},"since":"arma3 1.18","arma3_since":"1.18","description":"Creates a log file containing the list of all game entities in scene.\nThe file is created in the same directory as .rpt file.\n\n> [!NOTE]\n> BattlEye's RCON variant of this command is `#logEntities` (see also Multiplayer Server Commands).\n\nFile name example: `logEntities_4688_12-04-2014_12-19-39.log`\nFile content example:\n\n```\n====================== Vehicles =======================\n\n> Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:1, Out: 0, NetID:2:3, Pos: [2476.243896][73.782043], N:B_Soldier_F\n> Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2471.500977][62.477680], N:Snake_random_F\n> Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2489.192383][73.935181], N:Snake_random_F\n> Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2487.953857][73.828362], N:Snake_random_F\n> Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2800.174805][96.234093], N:Rabbit_F\n> Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2825.378418][2.068635], N:Rabbit_F\n> Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2888.919434][6.837101], N:Rabbit_F\n> Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:0:0, Pos: [2910.756104][16.089361], N:Rabbit_F\n> Loc:0, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 1, AnyPl:0, Out: 0, NetID:2:0, Pos: [9.000000][9.000000], N:Logic\n\nTotal objects: 9\nStatistics objects: 9\n\nIsLocal: 8\nIsMarkedToDelete: 0\nIsDestroyed: 0\nIsDamageDestroyed: 0\nIsDamageDead: 0\nIsNotSimulated: 9\nIsVisible: 1\nIsAnyPlayer: 1\nIsOutsideMap: 0\n\n=================== Slow vehicles =====================\n\nTotal objects: 214\nStatistics objects: 0\n\nStatic objects are accounted in total object count but not included in statistics\n\nIsLocal: 0\nIsMarkedToDelete: 0\nIsDestroyed: 0\nIsDamageDestroyed: 0\nIsDamageDead: 0\nIsNotSimulated: 0\nIsVisible: 0\nIsAnyPlayer: 0\nIsOutsideMap: 0\n\n=================== Out vehicles ====================\n\n> Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:2:1, Pos: [2476.243896][73.782043], N:Supply40\n> Loc:1, ForDel:0, Dstr:0, DmgDstr:0, DmgDead:0, Sim:1, Inv: 0, AnyPl:0, Out: 0, NetID:2:2, Pos: [2476.243896][73.782043], N:Supply140\n\nTotal objects: 2\nStatistics objects: 2\n\nIsLocal: 2\nIsMarkedToDelete: 0\nIsDestroyed: 0\nIsDamageDestroyed: 0\nIsDamageDead: 0\nIsNotSimulated: 2\nIsVisible: 0\nIsAnyPlayer: 0\nIsOutsideMap: 0\n```","syntaxes":[{"syntax":"logEntities","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["logEntities;"]}],"see_also":["entities","nearEntities","diag_log","diag_fps","diag fpsmin","diag frameno","diag_tickTime","diag_captureFrame","exportJIPMessages"]},{"name":"logNetwork","title":"logNetwork","type":"command","url":"https://community.bistudio.com/wiki/logNetwork","revid":376352,"updated":"2025-10-07T21:20:01Z","groups":["Multiplayer","Diagnostic"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Registers new log file recording a network traffic and returns handle of the log. The log file is saved inside the Arma 3 root folder.\n\n> [!IMPORTANT]\n> logNetwork can potentially create a large log file.","syntaxes":[{"syntax":"logNetwork [logFile, filter]","params":[{"name":"logFile","type":"String","description":"where to store the log","type_expr":"String"},{"name":"filter","type":"Array of Strings","optional":true,"description":"????","type_expr":"Array<String>","text":"filter: Array of Strings - (Optional) ????"}],"returns":{"type":"Number","type_expr":"Number","description":"handle for the logging"},"form":"unary","right":{"text":"[logFile, filter]"}}],"examples":[{"code":["_handle = logNetwork [\"myLog.txt\", [\"\"]];"]}],"see_also":["logNetworkTerminate"]},{"name":"logNetworkTerminate","title":"logNetworkTerminate","type":"command","url":"https://community.bistudio.com/wiki/logNetworkTerminate","revid":347532,"updated":"2023-09-28T06:16:33Z","groups":["Multiplayer","Diagnostic"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Terminates a network log file started with logNetwork with the given handle","syntaxes":[{"syntax":"logNetworkTerminate handle","params":[{"name":"handle","type":"Number","description":"handle to terminate (created with logNetwork)","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"handle"}}],"examples":[{"code":["logNetworkTerminate _someHandle;"]}],"see_also":["logNetwork"]},{"name":"lookAt","title":"lookAt","type":"command","url":"https://community.bistudio.com/wiki/lookAt","revid":369219,"updated":"2024-09-03T10:34:54Z","groups":["Unit Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Control what the unit(s) is/are looking at (target or Position). If target is used, it will get revealed fully.","syntaxes":[{"syntax":"unit(s) lookAt position","params":[{"name":"unit(s)","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"position","type":"Object or PositionAGL","type_expr":"Object | PositionAGL"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit(s)"},"right":{"text":"position"}}],"examples":[{"code":["_someSoldier lookAt _otherSoldier;"]},{"code":["[_someSoldier, _otherSoldier] lookAt markerPos \"markerOne\";"]},{"text":"```sqf\nhint \"R U N !\";\nBFG = \"B_AAA_System_01_F\" createVehicle position player;\ncreateVehicleCrew BFG;\nt = time + 10;\nonEachFrame\n{\n    BFG lookAt (unitAimPosition player vectorAdd (velocity player vectorMultiply 0.2));\n    if (time > t && alive player) then\n    {\n        [BFG,\"weapon_Cannon_Phalanx\",[0]] call BIS_fnc_fire;\n    };\n};\n```","code":["hint \"R U N !\";\nBFG = \"B_AAA_System_01_F\" createVehicle position player;\ncreateVehicleCrew BFG;\nt = time + 10;\nonEachFrame\n{\n\tBFG lookAt (unitAimPosition player vectorAdd (velocity player vectorMultiply 0.2));\n\tif (time > t && alive player) then\n\t{\n\t\t[BFG,\"weapon_Cannon_Phalanx\",[0]] call BIS_fnc_fire;\n\t};\n};"]}],"see_also":["glanceAt","commandWatch","doWatch","freeLook"]},{"name":"lookAtPos","title":"lookAtPos","type":"command","url":"https://community.bistudio.com/wiki/lookAtPos","revid":377146,"updated":"2026-01-01T10:33:39Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Point the camera and center the map on the position.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map lookAtPos position","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"position","type":"Position","type_expr":"Position"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"position"}}],"examples":[{"code":["findDisplay 12 displayCtrl 51 lookAtPos [0,0,0];"]}]},{"name":"magazineCargo","title":"magazineCargo","type":"command","url":"https://community.bistudio.com/wiki/magazineCargo","revid":348708,"updated":"2023-11-08T14:29:30Z","groups":["Vehicle Inventory","Containers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get array with magazines from ammo box (or any general weapon holder container).","syntaxes":[{"syntax":"magazineCargo object","params":[{"name":"object","type":"Object","description":"vehicle or ammo box","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"format: [\"MagType1\",\"MagType1\",\"MagType2\"...]"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["hint str magazineCargo uniformContainer cursorTarget;"]}],"see_also":["magazinesAmmoCargo","getMagazineCargo","addMagazineCargo","addMagazineCargoGlobal","clearMagazineCargo","clearMagazineCargoGlobal","weaponCargo","itemCargo"]},{"name":"magazines","title":"magazines","type":"command","url":"https://community.bistudio.com/wiki/magazines","revid":378372,"updated":"2026-04-03T16:50:03Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Returns array of type names of all vehicle's magazines. When applied to a unit, the command behaves differently and will omit magazines already loaded into unit's weapons. Use currentMagazine to get this information for a currently loaded magazine.","syntaxes":[{"syntax":"magazines vehicle","params":[{"name":"vehicle","type":"Object","description":"unit or vehicle","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"vehicle"}},{"syntax":"magazines [vehicle, includeEmpty]","since":"arma3 2.00","params":[{"name":"vehicle","type":"Object","description":"unit or vehicle","type_expr":"Object"},{"name":"includeEmpty","type":"Boolean","optional":true,"default":"false","description":"true to include empty magazines","type_expr":"Boolean","text":"includeEmpty: Boolean - (Optional, default false) true to include empty magazines"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"[vehicle, includeEmpty]"}}],"examples":[{"code":["_mags = magazines player;"]}],"see_also":["currentMagazine","magazinesTurret","magazinesDetail","magazinesAmmo","magazinesAmmoFull","ammo","weapons","backpacks"],"notes":[{"user":"Ceeeb","text":"In Operation Flashpoint v1.96, if a weapon is loaded with an empty magazine, that magazine will still be counted by this command. The ammo command can be used to check if a unit has any ammunition into it is last magazine."},{"user":"Dr_Eyeball","date":"2011-11-25","text":"This command does not include non-turret weapon magazines, such as smoke, flare or chaff magazines which are usually declared in the root of the vehicle's class, rather than in the Turrets hierarchy."}]},{"name":"magazinesAllTurrets","title":"magazinesAllTurrets","type":"command","url":"https://community.bistudio.com/wiki/magazinesAllTurrets","revid":377649,"updated":"2026-01-02T09:01:54Z","groups":["Turrets"],"status":"ok","games":{"arma3":"1.52"},"since":"arma3 1.52","arma3_since":"1.52","locality":{"argument":"global"},"description":"Returns all magazines (including empty) from all vehicle turrets (including driver turret [-1]) and their ammo counts. Since Arma 3 v2.08.148327 it is possible to exclude person turrets from returned results.","syntaxes":[{"syntax":"magazinesAllTurrets vehicle","params":[{"name":"vehicle","type":"Object","description":"vehicle with turrets","type_expr":"Object"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [className, turretPath, ammoCount, id, creator]\n- className: String - magazine class name - turretPath: Turret Path - ammoCount: Number - how many rounds left in the magazine - id: Number - id of the magazine object. The number starts at 10,000,000. This gives it about 6,700,000 possible ids before the number starts losing precision and cannot be used in scripts. - creator: Number - owner / clientOwner of the PC that created the object","text":"Array of Arrays with [className, turretPath, ammoCount, id, creator]\n\n- className: String - magazine class name\n- turretPath: Turret Path\n- ammoCount: Number - how many rounds left in the magazine\n- id: Number - id of the magazine object. The number starts at 10,000,000. This gives it about 6,700,000 possible ids before the number starts losing precision and cannot be used in scripts.\n- creator: Number - owner / clientOwner of the PC that created the object"},"form":"unary","right":{"text":"vehicle"}},{"syntax":"magazinesAllTurrets [vehicle, excludePersonTurrets]","since":"arma3 2.08","params":[{"name":"vehicle","type":"Object","description":"vehicle with turrets","type_expr":"Object"},{"name":"excludePersonTurrets","type":"Boolean","description":"when true only vehicle's turrets are queried","type_expr":"Boolean"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [className, turretPath, ammoCount, id, creator]\n- className: String - magazine class name - turretPath: Turret Path - ammoCount: Number - how many rounds left in the magazine - id: Number - id of the magazine object. The number starts at 10,000,000. This gives it about 6,700,000 possible ids before the number starts losing precision and cannot be used in scripts. - creator: Number - owner / clientOwner of the PC that created the object","text":"Array of Arrays with [className, turretPath, ammoCount, id, creator]\n\n- className: String - magazine class name\n- turretPath: Turret Path\n- ammoCount: Number - how many rounds left in the magazine\n- id: Number - id of the magazine object. The number starts at 10,000,000. This gives it about 6,700,000 possible ids before the number starts losing precision and cannot be used in scripts.\n- creator: Number - owner / clientOwner of the PC that created the object"},"form":"unary","right":{"text":"[vehicle, excludePersonTurrets]"}}],"examples":[{"code":["_mags = magazinesAllTurrets vehicle player;"]},{"code":["_mags = magazinesAllTurrets [vehicle player, true];"]}],"see_also":["magazinesTurret","allTurrets","addMagazineTurret","removeMagazinesTurret","removeMagazineTurret","weaponsTurret","loadMagazine","magazines","magazinesDetail","magazinesAmmo","magazinesAmmoFull","addWeaponTurret","removeWeaponTurret","turretLocal","getPylonMagazines","ammoOnPylon"]},{"name":"magazinesAmmo","title":"magazinesAmmo","type":"command","url":"https://community.bistudio.com/wiki/magazinesAmmo","revid":379365,"updated":"2026-10-30T23:56:48Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"arma3":"0.76"},"since":"arma3 0.76","arma3_since":"0.76","description":"Returns all vehicle's magazines and their ammo count (also works on supply boxes). When applied to a unit (soldier), the command behaves differently and will omit magazines already loaded into unit's weapons. Use magazinesAmmoFull to return all magazines.","syntaxes":[{"syntax":"magazinesAmmo vehicle","params":[{"name":"vehicle","type":"Object","description":"unit or vehicle or container. When transport is supplied, the command returns vehicle's magazines not the cargo. When container is supplied, the command behaves identically to magazinesAmmoCargo","type_expr":"Object"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"in format:\n- String: magazine class name - Number: magazine ammo count","text":"Array of Arrays in format:\n\n- String: magazine class name\n- Number: magazine ammo count"},"form":"unary","right":{"text":"vehicle"}},{"syntax":"magazinesAmmo [vehicle, includeEmpty]","since":"arma3 2.00","params":[{"name":"vehicle","type":"Object","description":"unit or vehicle.","type_expr":"Object"},{"name":"includeEmpty","type":"Boolean","optional":true,"default":"false","description":"true to include empty magazines","type_expr":"Boolean","text":"includeEmpty: Boolean - (Optional, default false) true to include empty magazines"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"in format:\n- String: magazine class name - Number: magazine ammo count","text":"Array of Arrays in format:\n\n- String: magazine class name\n- Number: magazine ammo count"},"form":"unary","right":{"text":"[vehicle, includeEmpty]"}}],"examples":[{"text":"```sqf\n_magazinesAmmo = magazinesAmmo player;\n/*\n[\n    [\"30Rnd_65x39_caseless_mag\",30],\n    [\"30Rnd_65x39_caseless_mag\",30],\n    [\"16Rnd_9x21_Mag\",16],\n    [\"SmokeShellGreen\",1],\n    [\"Chemlight_green\",1],\n    [\"HandGrenade\",1]\n]\n*/\n```","code":["_magazinesAmmo = magazinesAmmo player;\n/*\n[\n\t[\"30Rnd_65x39_caseless_mag\",30],\n\t[\"30Rnd_65x39_caseless_mag\",30],\n\t[\"16Rnd_9x21_Mag\",16],\n\t[\"SmokeShellGreen\",1],\n\t[\"Chemlight_green\",1],\n\t[\"HandGrenade\",1]\n]\n*/"]},{"text":"```sqf\n_magazinesAmmo = magazinesAmmo Mi_48;\n/*\n[\n    [\"250Rnd_30mm_APDS_shells\",250],\n    [\"250Rnd_30mm_HE_shells\",250],\n    [\"8Rnd_LG_scalpel\",8],\n    [\"38Rnd_80mm_rockets\",38]\n]\n*/\n```","code":["_magazinesAmmo = magazinesAmmo Mi_48;\n/*\n[\n\t[\"250Rnd_30mm_APDS_shells\",250],\n\t[\"250Rnd_30mm_HE_shells\",250],\n\t[\"8Rnd_LG_scalpel\",8],\n\t[\"38Rnd_80mm_rockets\",38]\n]\n*/"]}],"see_also":["magazinesAmmoFull","magazinesAmmoCargo","magazinesDetail","magazines","magazinesTurret"],"notes":[{"user":"Actium","date":"2014-12-20T14:41:00Z","text":"When used on vehicles this will only return all magazines associated with a single turretPath (which one depends on the actual armament of the vehicle, usually the first armed turretPath or alternatively turretPath [-1]).\nIf you want to get all turrets' magazines, use allTurrets and magazinesTurret.\n--Actium (talk) 15:41, 20 December 2014 (CET)"}]},{"name":"magazinesAmmoCargo","title":"magazinesAmmoCargo","type":"command","url":"https://community.bistudio.com/wiki/magazinesAmmoCargo","revid":378412,"updated":"2026-04-04T08:33:25Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Returns an array of subarrays with the type names and ammo left of all the vehicle's cargo or container magazines.","syntaxes":[{"syntax":"magazinesAmmoCargo vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [class, ammo]\n- class: String - Class name of the magazine - ammo: Number - Number of rounds loaded","text":"Array of Arrays with [class, ammo]\n\n- class: String - Class name of the magazine\n- ammo: Number - Number of rounds loaded"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["magazinesAmmoCargo vehicle player;"]},{"text":"```sqf\nmagazinesAmmoCargo uniformContainer player;\n```\n\n```sqf\n// returns:\n[\n    [\"30Rnd_65x39_caseless_mag\",30],\n    [\"30Rnd_65x39_caseless_mag\",30],\n    [\"Chemlight_green\",1]\n]\n```","code":["magazinesAmmoCargo uniformContainer player;","// returns:\n[\n\t[\"30Rnd_65x39_caseless_mag\",30],\n\t[\"30Rnd_65x39_caseless_mag\",30],\n\t[\"Chemlight_green\",1]\n]"]}],"see_also":["magazinesAmmo","magazinesAmmoFull"]},{"name":"magazinesAmmoFull","title":"magazinesAmmoFull","type":"command","url":"https://community.bistudio.com/wiki/magazinesAmmoFull","revid":343867,"updated":"2023-07-27T15:53:37Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"arma3":"0.76"},"since":"arma3 0.76","arma3_since":"0.76","description":"Returns array of arrays of all unit's or vehicle's magazines with extended information about them.\nThe magazines returned are for primary gunner. If you need magazines for all turrets, see magazinesAllTurrets.\n\n> [!IMPORTANT]\n> This command does not return empty magazines from containers, only from the weapon. Use magazinesAmmoCargo instead.","syntaxes":[{"syntax":"magazinesAmmoFull entity","params":[{"name":"entity","type":"Object","description":"unit or vehicle","type_expr":"Object"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"in format:\n- String: magazine class name - Number: magazine ammo count - Boolean: is magazine loaded - Number: magazine type: - -1 = n/a (default if magazine is not loaded) - 0 - grenade - 1 - primary weapon mag - 2 - handgun mag - 4 - secondary weapon mag - 4096 - binocular weapon mag - 65536 - vehicle mag - String: magazine location: \"Vest\", \"Uniform\", \"Backpack\", \"\" or currentMuzzle if the magazine is loaded - Arma 3 v2.08 Number: magazine id, starts with 10000000; use `toFixed 0;` to see this number in a human readable format - Arma 3 v2.08 Number: magazine creator","text":"Array of Arrays in format:\n\n- String: magazine class name\n- Number: magazine ammo count\n- Boolean: is magazine loaded\n- Number: magazine type:\n  - -1 = n/a (default if magazine is not loaded)\n  - 0 - grenade\n  - 1 - primary weapon mag\n  - 2 - handgun mag\n  - 4 - secondary weapon mag\n  - 4096 - binocular weapon mag\n  - 65536 - vehicle mag\n- String: magazine location: \"Vest\", \"Uniform\", \"Backpack\", \"\" or currentMuzzle if the magazine is loaded\n- Arma 3 v2.08 Number: magazine id, starts with 10000000; use `toFixed 0;` to see this number in a human readable format\n- Arma 3 v2.08 Number: magazine creator"},"form":"unary","right":{"text":"entity"}},{"syntax":"magazinesAmmoFull [vehicle, includeEmpty]","since":"arma3 2.00","params":[{"name":"vehicle","type":"Object","description":"unit or vehicle","type_expr":"Object"},{"name":"includeEmpty","type":"Boolean","optional":true,"default":"false","description":"true to include empty magazines","type_expr":"Boolean","text":"includeEmpty: Boolean - (Optional, default false) true to include empty magazines"}],"returns":{"type":"same as Primary Syntax"},"form":"unary","right":{"text":"[vehicle, includeEmpty]"}}],"examples":[{"text":"```sqf\ntoFixed 0;\nmagazinesAmmoFull player;\n/*\n[\n    [\"30Rnd_65x39_caseless_mag\",30,false,-1,\"Uniform\",10000003,0],\n    [\"Chemlight_green\",1,true,0,\"ChemlightGreenMuzzle\",10000016,0],\n    [\"30Rnd_65x39_caseless_mag\",30,false,-1,\"Vest\",10000008,0],\n    [\"30Rnd_65x39_caseless_mag\",30,false,-1,\"Vest\",10000009,0],\n    [\"30Rnd_65x39_caseless_mag\",30,false,-1,\"Vest\",10000010,0],\n    [\"HandGrenade\",1,true,0,\"HandGrenadeMuzzle\",10000018,0],\n    [\"HandGrenade\",1,false,-1,\"Vest\",10000019,0],\n    [\"30Rnd_65x39_caseless_mag\",30,true,1,\"arifle_MX_ACO_pointer_F\",10000001,0],\n    [\"16Rnd_9x21_Mag\",16,true,2,\"hgun_P07_F\",10000011,0]\n]\n*/\n```","code":["toFixed 0;\nmagazinesAmmoFull player;\n/*\n[\n\t[\"30Rnd_65x39_caseless_mag\",30,false,-1,\"Uniform\",10000003,0],\n\t[\"Chemlight_green\",1,true,0,\"ChemlightGreenMuzzle\",10000016,0],\n\t[\"30Rnd_65x39_caseless_mag\",30,false,-1,\"Vest\",10000008,0],\n\t[\"30Rnd_65x39_caseless_mag\",30,false,-1,\"Vest\",10000009,0],\n\t[\"30Rnd_65x39_caseless_mag\",30,false,-1,\"Vest\",10000010,0],\n\t[\"HandGrenade\",1,true,0,\"HandGrenadeMuzzle\",10000018,0],\n\t[\"HandGrenade\",1,false,-1,\"Vest\",10000019,0],\n\t[\"30Rnd_65x39_caseless_mag\",30,true,1,\"arifle_MX_ACO_pointer_F\",10000001,0],\n\t[\"16Rnd_9x21_Mag\",16,true,2,\"hgun_P07_F\",10000011,0]\n]\n*/"]},{"text":"```sqf\ntoFixed 0;\nmagazinesAmmoFull Mi_48;\n/*\n[\n    [\"250Rnd_30mm_HE_shells_Tracer_Green\",250,true,65536,\"HE\",10000043,0],\n    [\"250Rnd_30mm_APDS_shells_Tracer_Green\",250,true,65536,\"AP\",10000044,0],\n    [\"Laserbatteries\",1,true,65536,\"Laserdesignator_mounted\",10000045,0],\n    [\"PylonRack_4Rnd_LG_scalpel\",4,false,-1,\"\",10000049,0],\n    [\"PylonRack_19Rnd_Rocket_Skyfire\",19,false,-1,\"\",10000051,0],\n    [\"PylonRack_19Rnd_Rocket_Skyfire\",19,false,-1,\"\",10000052,0],\n    [\"PylonRack_4Rnd_LG_scalpel\",4,false,-1,\"\",10000053,0]\n]\n*/\n```","code":["toFixed 0;\nmagazinesAmmoFull Mi_48;\n/*\n[\n\t[\"250Rnd_30mm_HE_shells_Tracer_Green\",250,true,65536,\"HE\",10000043,0],\n\t[\"250Rnd_30mm_APDS_shells_Tracer_Green\",250,true,65536,\"AP\",10000044,0],\n\t[\"Laserbatteries\",1,true,65536,\"Laserdesignator_mounted\",10000045,0],\n\t[\"PylonRack_4Rnd_LG_scalpel\",4,false,-1,\"\",10000049,0],\n\t[\"PylonRack_19Rnd_Rocket_Skyfire\",19,false,-1,\"\",10000051,0],\n\t[\"PylonRack_19Rnd_Rocket_Skyfire\",19,false,-1,\"\",10000052,0],\n\t[\"PylonRack_4Rnd_LG_scalpel\",4,false,-1,\"\",10000053,0]\n]\n*/"]}],"see_also":["magazinesAmmo","magazinesAmmoCargo","magazinesDetail","magazines","magazinesTurret"],"notes":[{"user":"Actium","date":"2014-12-20T14:40:00Z","text":"When used on vehicles this will only return all magazines associated with a single turretPath (which one depends on the actual armament of the vehicle, usually the first armed turretPath or alternatively turretPath [-1]).\nIf you want to get all turrets' magazines, use allTurrets and magazinesTurret."},{"user":"Pierre MGI","date":"2015-02-10T04:40:00Z","text":"As Actium said, this function seems to extract data from:\n\n```sqf\nconfigFile >> \"CfgVehicles\" >> _the_vehicle_you_want >> \"Turrets\" >> \"MainTurret\">> \"magazines\"\n```\n\nSome vehicles return an empty field {} because magazines are in straight in:\n\n```sqf\nconfigFile >> \"CfgVehicles\" >> _the_vehicle_you_want >> \"magazines\" // often dedicated to flares only\n```\n\nThis is the case of WY-55 Hellcat. This function returns an empty array."}]},{"name":"magazinesDetail","title":"magazinesDetail","type":"command","url":"https://community.bistudio.com/wiki/magazinesDetail","revid":377200,"updated":"2026-01-01T11:36:18Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns an array of strings with description of all vehicle's magazines, their ammo count (current/default) and their ids for the primary gunner.\n\nWhen applied to a unit (soldier), the command behaves differently and will omit magazines already loaded into unit's weapons. Use currentMagazineDetail to get this information for a currently loaded magazine.","syntaxes":[{"syntax":"magazinesDetail vehicle","params":[{"name":"vehicle","type":"Object","description":"unit or vehicle","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"vehicle"}},{"syntax":"magazinesDetail [vehicle, includeEmpty, includeLoaded]","since":"arma3 2.00","params":[{"name":"vehicle","type":"Object","description":"unit or vehicle","type_expr":"Object"},{"name":"includeEmpty","type":"Boolean","optional":true,"default":"false","description":"true to include empty magazines","type_expr":"Boolean","text":"includeEmpty: Boolean - (Optional, default false) true to include empty magazines"},{"name":"includeLoaded","type":"Boolean","optional":true,"default":"false","description":"true to include magazines loaded in weapons (Since Arma 3 v2.07.148195)","type_expr":"Boolean","text":"includeLoaded: Boolean - (Optional, default false) true to include magazines loaded in weapons (Since Arma 3 v2.07.148195)"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"[vehicle, includeEmpty, includeLoaded]"}}],"examples":[{"text":"```sqf\n_magazinesDetail = magazinesDetail player;\n/*\n[\n    \"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000003/0]\",\n    \"Chemlight (Green)(1/1)[id/cr:10000020/0]\",\n    \"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000012/0]\",\n    \"RGO Grenade(1/1)[id/cr:10000016/0]\",\n    \"RGO Grenade(1/1)[id/cr:10000017/0]\",\n    \"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000070/0]\",\n    \"PCML Missile(1/1)[id/cr:10000072/0]\",\n    \"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000001/0]\",\n    \"9 mm 16Rnd Mag(16/16)[id/cr:10000013/0]\"\n]\n*/\n```","code":["_magazinesDetail = magazinesDetail player;\n/*\n[\n\t\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000003/0]\",\n\t\"Chemlight (Green)(1/1)[id/cr:10000020/0]\",\n\t\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000012/0]\",\n\t\"RGO Grenade(1/1)[id/cr:10000016/0]\",\n\t\"RGO Grenade(1/1)[id/cr:10000017/0]\",\n\t\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000070/0]\",\n\t\"PCML Missile(1/1)[id/cr:10000072/0]\",\n\t\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000001/0]\",\n\t\"9 mm 16Rnd Mag(16/16)[id/cr:10000013/0]\"\n]\n*/"]},{"text":"```sqf\n_magazinesDetail = magazinesDetail Mi_48;\n/*\n[\n    \"30 mm HE Tracer (Green) Shells(250/250)[id/cr:10000043/0]\",\n    \"30 mm APDS Tracer (Green) Shells(250/250)[id/cr:10000044/0]\",\n    \"Designator Batteries(1/1)[id/cr:10000045/0]\",\n    \"Scalpel 4x(4/4)[id/cr:10000049/0]\",\n    \"Skyfire 19x(19/19)[id/cr:10000051/0]\",\n    \"Skyfire 19x(19/19)[id/cr:10000052/0]\",\n    \"Scalpel 4x(4/4)[id/cr:10000053/0]\"\n]\n*/\n```","code":["_magazinesDetail = magazinesDetail Mi_48;\n/*\n[\n\t\"30 mm HE Tracer (Green) Shells(250/250)[id/cr:10000043/0]\",\n\t\"30 mm APDS Tracer (Green) Shells(250/250)[id/cr:10000044/0]\",\n\t\"Designator Batteries(1/1)[id/cr:10000045/0]\",\n\t\"Scalpel 4x(4/4)[id/cr:10000049/0]\",\n\t\"Skyfire 19x(19/19)[id/cr:10000051/0]\",\n\t\"Skyfire 19x(19/19)[id/cr:10000052/0]\",\n\t\"Scalpel 4x(4/4)[id/cr:10000053/0]\"\n]\n*/"]}],"see_also":["currentMagazineDetail","magazines","magazinesTurret","magazinesAmmo","magazinesAmmoFull","magazinesDetailUniform","magazinesDetailVest","magazinesDetailBackpack"],"notes":[{"user":"Leopard20","date":"2021-09-12T22:06:40Z","text":"To return the ammo count in each magazine, you can use this code:\n\n```sqf\nmagazinesDetail player apply {\n    private _reverse = reverse _x;\n    private_i1 = (_reverse find \"[)\") + 1;\n    private_i2 = (_reverse find [\"/\", _id1]) + 1;\n    private_i3 = _reverse find [\"(\", _id2];\n    parseNumber reverse (_reverse select [_i2, _i3 - _i2]); // return cnt\n};\n```"}]},{"name":"magazinesDetailBackpack","title":"magazinesDetailBackpack","type":"command","url":"https://community.bistudio.com/wiki/magazinesDetailBackpack","revid":377201,"updated":"2026-01-01T11:36:34Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Returns an array with the type names of all the unit's backpack magazines.","syntaxes":[{"syntax":"magazinesDetailBackpack unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}},{"syntax":"magazinesDetailBackpack [unit, includeEmpty, includeLoaded]","since":"arma3 2.00","params":[{"name":"unit","type":"Object","description":"unit","type_expr":"Object"},{"name":"includeEmpty","type":"Boolean","optional":true,"default":"false","description":"true to include empty magazines","type_expr":"Boolean","text":"includeEmpty: Boolean - (Optional, default false) true to include empty magazines"},{"name":"includeLoaded","type":"Boolean","optional":true,"default":"false","description":"true to include magazines loaded in weapons (Since Arma 3 v2.07.148195)","type_expr":"Boolean","text":"includeLoaded: Boolean - (Optional, default false) true to include magazines loaded in weapons (Since Arma 3 v2.07.148195)"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"[unit, includeEmpty, includeLoaded]"}}],"examples":[{"text":"```sqf\nmagazinesDetailBackpack player;\n/*\n[\n    \"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000011/2]\",\n    \"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000012/2]\",\n    \"Chemlight (Green)(1/1)[id/cr:10000027/2]\",\n    \"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000013/2]\",\n    \"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000014/2]\",\n    \"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000015/2]\",\n    \"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000016/2]\",\n    \"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000017/2]\",\n    \"9 mm 16Rnd Mag(16/16)[id/cr:10000019/2]\",\n    \"9 mm 16Rnd Mag(16/16)[id/cr:10000020/2]\",\n    \"RGO Grenade(1/1)[id/cr:10000021/2]\",\n    \"RGO Grenade(1/1)[id/cr:10000022/2]\",\n    \"IR Grenade [NATO](1/1)[id/cr:10000023/2]\",\n    \"IR Grenade [NATO](1/1)[id/cr:10000024/2]\",\n    \"Smoke Grenade (White)(1/1)[id/cr:10000025/2]\",\n    \"Smoke Grenade (Green)(1/1)[id/cr:10000026/2]\",\n    \"Chemlight (Green)(1/1)[id/cr:10000028/2]\"\n]\n*/\n```","code":["magazinesDetailBackpack player;\n/*\n[\n\t\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000011/2]\",\n\t\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000012/2]\",\n\t\"Chemlight (Green)(1/1)[id/cr:10000027/2]\",\n\t\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000013/2]\",\n\t\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000014/2]\",\n\t\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000015/2]\",\n\t\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000016/2]\",\n\t\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000017/2]\",\n\t\"9 mm 16Rnd Mag(16/16)[id/cr:10000019/2]\",\n\t\"9 mm 16Rnd Mag(16/16)[id/cr:10000020/2]\",\n\t\"RGO Grenade(1/1)[id/cr:10000021/2]\",\n\t\"RGO Grenade(1/1)[id/cr:10000022/2]\",\n\t\"IR Grenade [NATO](1/1)[id/cr:10000023/2]\",\n\t\"IR Grenade [NATO](1/1)[id/cr:10000024/2]\",\n\t\"Smoke Grenade (White)(1/1)[id/cr:10000025/2]\",\n\t\"Smoke Grenade (Green)(1/1)[id/cr:10000026/2]\",\n\t\"Chemlight (Green)(1/1)[id/cr:10000028/2]\"\n]\n*/"]}],"see_also":["magazinesDetail","magazinesDetailUniform","magazinesDetailVest","currentMagazineDetail"],"notes":[{"user":"Leopard20","date":"2021-09-12T22:07:55Z","text":"To return the ammo count in each magazine, you can use this code:\n\n```sqf\nmagazinesDetailBackpack player apply {\n    private _reverse = reverse _x;\n    private_i1 = (_reverse find \"[)\") + 1;\n    private_i2 = (_reverse find [\"/\", _id1]) + 1;\n    private_i3 = _reverse find [\"(\", _id2];\n    parseNumber reverse (_reverse select [_i2, _i3 - _i2]); // return cnt\n};\n```"}]},{"name":"magazinesDetailUniform","title":"magazinesDetailUniform","type":"command","url":"https://community.bistudio.com/wiki/magazinesDetailUniform","revid":377202,"updated":"2026-01-01T11:36:50Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Returns an array with the type names of all the unit's uniform magazines.","syntaxes":[{"syntax":"magazinesDetailUniform unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}},{"syntax":"magazinesDetailUniform [unit, includeEmpty, includeLoaded]","since":"arma3 2.00","params":[{"name":"unit","type":"Object","description":"unit","type_expr":"Object"},{"name":"includeEmpty","type":"Boolean","optional":true,"default":"false","description":"true to include empty magazines","type_expr":"Boolean","text":"includeEmpty: Boolean - (Optional, default false) true to include empty magazines"},{"name":"includeLoaded","type":"Boolean","optional":true,"default":"false","description":"true to include magazines loaded in weapons (Since Arma 3 v2.07.148195)","type_expr":"Boolean","text":"includeLoaded: Boolean - (Optional, default false) true to include magazines loaded in weapons (Since Arma 3 v2.07.148195)"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"[unit, includeEmpty, includeLoaded]"}}],"examples":[{"text":"```sqf\nmagazinesDetailUniform player;\n/*\n[\n    \"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000003/0]\",\n    \"Chemlight (Green)(1/1)[id/cr:10000020/0]\"\n]\n*/\n```","code":["magazinesDetailUniform player;\n/*\n[\n\t\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000003/0]\",\n\t\"Chemlight (Green)(1/1)[id/cr:10000020/0]\"\n]\n*/"]}],"see_also":["magazinesDetail","magazinesDetailVest","magazinesDetailBackpack"],"notes":[{"user":"Leopard20","date":"2021-09-12T22:07:51Z","text":"To return the ammo count in each magazine, you can use this code:\n\n```sqf\nmagazinesDetailUniform player apply {\n    private _reverse = reverse _x;\n    private_i1 = (_reverse find \"[)\") + 1;\n    private_i2 = (_reverse find [\"/\", _id1]) + 1;\n    private_i3 = _reverse find [\"(\", _id2];\n    parseNumber reverse (_reverse select [_i2, _i3 - _i2]); // return cnt\n};\n```"}]},{"name":"magazinesDetailVest","title":"magazinesDetailVest","type":"command","url":"https://community.bistudio.com/wiki/magazinesDetailVest","revid":377203,"updated":"2026-01-01T11:37:09Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Returns an array with the type names of all the unit's vest magazines.","syntaxes":[{"syntax":"magazinesDetailVest unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}},{"syntax":"magazinesDetailVest [unit, includeEmpty, includeLoaded]","since":"arma3 2.00","params":[{"name":"unit","type":"Object","description":"unit","type_expr":"Object"},{"name":"includeEmpty","type":"Boolean","optional":true,"default":"false","description":"true to include empty magazines","type_expr":"Boolean","text":"includeEmpty: Boolean - (Optional, default false) true to include empty magazines"},{"name":"includeLoaded","type":"Boolean","optional":true,"default":"false","description":"true to include magazines loaded in weapons (Since Arma 3 v2.07.148195)","type_expr":"Boolean","text":"includeLoaded: Boolean - (Optional, default false) true to include magazines loaded in weapons (Since Arma 3 v2.07.148195)"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"[unit, includeEmpty, includeLoaded]"}}],"examples":[{"text":"```sqf\nmagazinesDetailVest player;\n/*\n[\n    [\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000012/0]\",\n    \"RGO Grenade(1/1)[id/cr:10000016/0]\",\n    \"RGO Grenade(1/1)[id/cr:10000017/0]\"]\n]\n*/\n```","code":["magazinesDetailVest player;\n/*\n[\n\t[\"6.5 mm 30Rnd Sand Mag(30/30)[id/cr:10000012/0]\",\n\t\"RGO Grenade(1/1)[id/cr:10000016/0]\",\n\t\"RGO Grenade(1/1)[id/cr:10000017/0]\"]\n]\n*/"]}],"see_also":["magazinesDetail","magazinesDetailUniform","magazinesDetailBackpack"],"notes":[{"user":"Leopard20","date":"2021-09-12T22:07:44Z","text":"To return the ammo count in each magazine, you can use this code:\n\n```sqf\nmagazinesDetailVest player apply {\n    private _reverse = reverse _x;\n    private _i1 = (_reverse find \"[)\") + 1;\n    private _i2 = (_reverse find [\"/\", _id1]) + 1;\n    private _i3 = _reverse find [\"(\", _id2];\n    parseNumber reverse (_reverse select [_i2, _i3 - _i2]); // return cnt\n};\n```"}]},{"name":"magazinesTurret","title":"magazinesTurret","type":"command","url":"https://community.bistudio.com/wiki/magazinesTurret","revid":377498,"updated":"2026-01-02T06:49:25Z","groups":["Turrets"],"status":"ok","games":{"arma2oa":"1.52","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.52","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns all magazines of given turret. Use turret path [-1] for driver's turret. Alternatively, use magazinesAllTurrets.\n\n> [!NOTE]\n> When main syntax is used, command excludes empty magazines for driver turret [-1] but returns empty magazines for all the other turrets.","syntaxes":[{"syntax":"vehicle magazinesTurret turretPath","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}},{"syntax":"vehicle magazinesTurret [turretPath, includeEmpty]","since":"arma3 2.02","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"},{"name":"includeEmpty","type":"Boolean","optional":true,"default":"true","description":"true = include empty magazines (behaviour as the primary syntax, but consistent), false = exclude empty magazines","type_expr":"Boolean","text":"includeEmpty: Boolean - (Optional, default true) - true = include empty magazines (behaviour as the primary syntax, but consistent), false = exclude empty magazines"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[turretPath, includeEmpty]"}}],"examples":[{"code":["_mags = vehicle player magazinesTurret [0, 0];"]},{"code":["_mags = _tank magazinesTurret [[0], false];"]}],"see_also":["magazinesAllTurrets","addMagazineTurret","removeMagazinesTurret","removeMagazineTurret","weaponsTurret","loadMagazine","magazines","magazinesDetail","magazinesAmmo","magazinesAmmoFull","addWeaponTurret","removeWeaponTurret","turretLocal"]},{"name":"magazineTurretAmmo","title":"magazineTurretAmmo","type":"command","url":"https://community.bistudio.com/wiki/magazineTurretAmmo","revid":377502,"updated":"2026-01-02T06:49:31Z","groups":["Turrets"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns ammo count of given magazine from given turret (see setMagazineTurretAmmo for more info)","syntaxes":[{"syntax":"vehicle magazineTurretAmmo [magazineClass, turretPath]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"magazineClass","type":"String","type_expr":"String"},{"name":"turretPath","type":"Turret Path","description":"[-1] for driver turret is supported","type_expr":"Turret Path"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[magazineClass, turretPath]"}}],"examples":[{"code":["vehicle player magazineTurretAmmo [\"cls\", [0]];"]}],"see_also":["setMagazineTurretAmmo","magazinesAllTurrets","ammoOnPylon"],"notes":[{"user":"Sa-Matra","date":"2024-05-04T11:38:40Z","text":"Returns ammo for first magazine, not loaded magazine."}]},{"name":"mapAnimAdd","title":"mapAnimAdd","type":"command","url":"https://community.bistudio.com/wiki/mapAnimAdd","revid":377554,"updated":"2026-01-02T06:54:54Z","groups":["Map"],"status":"ok","games":{"ofp":"1.27","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.27","arma3_since":"0.50","locality":{"effect":"local"},"description":"Add next frame to map animation.","syntaxes":[{"syntax":"mapAnimAdd [time, zoom, position]","params":[{"name":"time","type":"Number","description":"animation duration in seconds","type_expr":"Number"},{"name":"zoom","type":"Number","description":"range from 0.01 (max. zoom) to 1 (zoomed out)","type_expr":"Number"},{"name":"position","type":"Object or Position2D, Position3D","type_expr":"Object | Position2D | Position3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[time, zoom, position]"}}],"examples":[{"code":["mapAnimAdd [1, 0.1, markerPos \"anim1\"];\nmapAnimCommit;"]},{"code":["mapAnimAdd [3, 0.01, player];\nmapAnimCommit;"]}],"see_also":["mapAnimClear","mapAnimCommit","mapAnimDone","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone"],"notes":[{"user":"Ceeeb","date":"2007-02-02T05:26:00Z","text":"In **OFP v1.96**, the mapAnim series of commands, together with forceMap can only be used in the intro and mission, as it is not possible to access the map from the outro. *(not checked, sourced from an old copy of the OFPEC comref)*"}]},{"name":"mapAnimClear","title":"mapAnimClear","type":"command","url":"https://community.bistudio.com/wiki/mapAnimClear","revid":319460,"updated":"2022-05-13T09:24:07Z","groups":["Map"],"status":"ok","games":{"ofp":"1.27","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.27","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Clear map animation.","syntaxes":[{"syntax":"mapAnimClear","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["mapAnimClear;"]}],"see_also":["mapAnimAdd","mapAnimCommit","mapAnimDone","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone"],"notes":[{"user":"Ceeeb","text":"In **OFP v1.96**, the mapAnim series of commands, together with forceMap can only be used in the intro and mission, as it is not possible to access the map from the outro. *(not checked, sourced from an old copy of the OFPEC comref)*"}]},{"name":"mapAnimCommit","title":"mapAnimCommit","type":"command","url":"https://community.bistudio.com/wiki/mapAnimCommit","revid":319497,"updated":"2022-05-13T09:24:11Z","groups":["Map"],"status":"ok","games":{"ofp":"1.27","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.27","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Play map animation.","syntaxes":[{"syntax":"mapAnimCommit","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["mapAnimCommit;"]}],"see_also":["mapAnimAdd","mapAnimClear","mapAnimDone","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone"],"notes":[{"user":"Ceeeb","text":"In **OFP v1.96**, the mapAnim series of commands, together with forceMap can only be used in the intro and mission, as it is not possible to access the map from the outro. *(not checked, sourced from an old copy of the OFPEC comref)*"}]},{"name":"mapAnimDone","title":"mapAnimDone","type":"command","url":"https://community.bistudio.com/wiki/mapAnimDone","revid":310810,"updated":"2022-05-07T20:22:01Z","groups":["Map"],"status":"ok","games":{"ofp":"1.27","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.27","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Check if map animation is finished.","syntaxes":[{"syntax":"mapAnimDone","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["private _isDone = mapAnimDone;"]}],"see_also":["mapAnimAdd","mapAnimClear","mapAnimCommit","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone"],"notes":[{"user":"Ceeeb","text":"In **OFP v1.96**, the mapAnim series of commands, together with forceMap can only be used in the intro and mission, as it is not possible to access the map from the outro. *(not checked, sourced from an old copy of the OFPEC comref)*"}]},{"name":"mapCenterOnCamera","title":"mapCenterOnCamera","type":"command","url":"https://community.bistudio.com/wiki/mapCenterOnCamera","revid":377461,"updated":"2026-01-02T06:47:30Z","groups":["GUI Control - Map"],"status":"ok","games":{"arma2":"1.02","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.02","arma3_since":"0.50","description":"The main syntax enables/disables continuous centering of the main map type control on the camera position. Needs to be executed once.\nThe alternative syntax centers mini map type control on camera. Needs to be executed each frame (preferably inside an `onDraw` event handler).","syntaxes":[{"syntax":"mainmap mapCenterOnCamera enable","params":[{"name":"mainmap","type":"Control","type_expr":"Control"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"mainmap"},"right":{"text":"enable"}},{"syntax":"mapCenterOnCamera minimap","since":"arma3 1.48","params":[{"name":"minimap","type":"Control","type_expr":"Control"}],"returns":{"type_expr":"PositionASL","text":"PositionASL of the map center (camera focus object's **model centre**'s position (see getPosWorld)) in render scope"},"form":"unary","right":{"text":"minimap"}}],"examples":[{"code":["// --- Minimap update\n((uiNamespace getVariable \"BIS_UAV_DISPLAY\") displayCtrl 112410) mapCenterOnCamera true;"]}],"see_also":["ctrlMapAnimAdd","ctrlMapAnimCommit","getPosWorld"]},{"name":"mapGridPosition","title":"mapGridPosition","type":"command","url":"https://community.bistudio.com/wiki/mapGridPosition","revid":319458,"updated":"2022-05-13T09:24:06Z","groups":["Positions","Map"],"status":"ok","games":{"arma2":"1.04","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.04","arma3_since":"0.50","description":"Returns the map grid position of an object or position.\nThe format is determined by the Grid format specified in the CfgWorlds for the current world. Eg: \"024577\" or \"De82\" or similar.","syntaxes":[{"syntax":"mapGridPosition param","params":[{"name":"param","type":"Object or Position","description":"determines reference position","type_expr":"Object | Position"}],"returns":{"type":"String","type_expr":"String","description":"grid position"},"form":"unary","right":{"text":"param"}}],"examples":[{"code":["_gridPos = mapGridPosition player;"]},{"code":["_gridPos = mapGridPosition getPos player;"]}],"see_also":["BIS_fnc_gridToPos","BIS_fnc_posToGrid"]},{"name":"markAsFinishedOnSteam","title":"markAsFinishedOnSteam","type":"command","url":"https://community.bistudio.com/wiki/markAsFinishedOnSteam","revid":369150,"updated":"2024-09-03T10:34:38Z","groups":["Mission Information"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","description":"Marks current mission as finished on Steam. Returns true if Steam query is successfully started or false otherwise.","syntaxes":[{"syntax":"markAsFinishedOnSteam","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["markAsFinishedOnSteam;\nendMission \"END1\";"]}],"see_also":["isSteamMission"]},{"name":"markerAlpha","title":"markerAlpha","type":"command","url":"https://community.bistudio.com/wiki/markerAlpha","revid":363255,"updated":"2024-03-26T10:51:30Z","groups":["Markers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Gets the marker alpha. See setMarkerAlpha.","syntaxes":[{"syntax":"markerAlpha markerName","params":[{"name":"markerName","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"markerName"}}],"examples":[{"code":["AlphaMarker = markerAlpha \"myMarker\";"]}],"see_also":["setMarkerAlpha","setMarkerAlphaLocal"]},{"name":"markerBrush","title":"markerBrush","type":"command","url":"https://community.bistudio.com/wiki/markerBrush","revid":322955,"updated":"2022-06-28T21:42:49Z","groups":["Markers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Gets the marker brush. See setMarkerBrush.","syntaxes":[{"syntax":"markerBrush name","params":[{"name":"name","type":"String","description":"marker name","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"name"}}],"examples":[{"code":["if (markerBrush \"Marker1\" == \"Solid\") then { hint \"Marker1 is solid!\" };"]}],"see_also":["setMarkerBrush","setMarkerBrushLocal"]},{"name":"markerChannel","title":"markerChannel","type":"command","url":"https://community.bistudio.com/wiki/markerChannel","revid":369657,"updated":"2024-10-01T12:04:41Z","groups":["Markers"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Returns the channel to which a marker belongs.","syntaxes":[{"syntax":"markerChannel marker","params":[{"name":"marker","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"marker"}}],"examples":[{"code":["markerChannel \"marker_1\";"]}],"see_also":["createMarker","Channel IDs"]},{"name":"markerColor","title":"markerColor","type":"command","url":"https://community.bistudio.com/wiki/markerColor","revid":370049,"updated":"2024-10-29T12:21:16Z","groups":["Markers"],"status":"ok","games":{"ofp":"1.46","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.46","arma3_since":"0.50","description":"Returns colour of the given marker. See also setMarkerColor/Local.","syntaxes":[{"syntax":"markerColor markerName","params":[{"name":"markerName","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"markerName"}}],"examples":[{"code":["if (markerColor \"Marker1\" == \"ColorRed\") then { hint \"Marker1 is red!\" };"]},{"text":"```sqf\n\"mySuperMarker\" setMarkerColor \"#(0,1000,0,0.50000)\";    // full green, 50% alpha\nprivate _colour = markerColor \"mySuperMarker\";            // return properly-formatted custom value, here #(0,1,0,0.5)\nif (_colour select [0, 1] == \"#\") then { hint \"this marker has a custom colour!\" };\n```","code":["\"mySuperMarker\" setMarkerColor \"#(0,1000,0,0.50000)\";\t// full green, 50% alpha\nprivate _colour = markerColor \"mySuperMarker\";\t\t\t// return properly-formatted custom value, here #(0,1,0,0.5)\nif (_colour select [0, 1] == \"#\") then { hint \"this marker has a custom colour!\" };"]}],"see_also":["setMarkerColor","setMarkerColorLocal"]},{"name":"markerDir","title":"markerDir","type":"command","url":"https://community.bistudio.com/wiki/markerDir","revid":377913,"updated":"2026-01-09T17:40:49Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.04","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.04","arma3_since":"0.50","locality":{"argument":"global"},"description":"Get marker direction.","syntaxes":[{"syntax":"markerDir markerName","params":[{"name":"markerName","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"markerName"}}],"examples":[{"code":["_mPos = markerDir \"markerOne\";"]}],"see_also":["setMarkerDir","setMarkerDirLocal"],"notes":[{"user":"Inkompetent","date":"2010-04-18T13:44:00Z","text":"The direction of the marker is the same as displayed in the editor, so it can both be negative, and be 360 degrees or greater."}]},{"name":"markerDrawPriority","title":"markerDrawPriority","type":"command","url":"https://community.bistudio.com/wiki/markerDrawPriority","revid":351284,"updated":"2023-11-27T02:52:20Z","groups":["Markers"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","description":"Returns marker draw priority.","syntaxes":[{"syntax":"markerDrawPriority markerName","params":[{"name":"markerName","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"draw priority"},"form":"unary","right":{"text":"markerName"}}],"examples":[{"code":["markerDrawPriority \"MarkerOne\""]}],"see_also":["setMarkerDrawPriority","setMarkerType","setMarkerTypeLocal","markerType","setMarkerAlphaLocal","setMarkerBrush","setMarkerColor","setMarkerDir","setMarkerPos","setMarkerShape","setMarkerSize","setMarkerText","createMarker","CfgMarkers"]},{"name":"markerPolyline","title":"markerPolyline","type":"command","url":"https://community.bistudio.com/wiki/markerPolyline","revid":377288,"updated":"2026-01-02T06:37:29Z","groups":["Markers"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Returns a polyline marker's path data.","syntaxes":[{"syntax":"markerPolyline marker","params":[{"name":"marker","type":"String","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"format `[x1, y1, x2, y2, ... xn, yn]`","text":"Array format `[x1, y1, x2, y2, ... xn, yn]`"},"form":"unary","right":{"text":"marker"}}],"examples":[{"code":["markerPolyline \"_USER_DEFINED #0/0/1\"; // returns your first polyline's data in Singleplayer"]}],"see_also":["setMarkerPolyline","setMarkerPolylineLocal"]},{"name":"markerPos","title":"markerPos","type":"command","url":"https://community.bistudio.com/wiki/markerPos","revid":379366,"updated":"2026-10-30T23:56:56Z","groups":["Markers"],"status":"ok","games":{"ofp":"1.46","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.46","arma3_since":"0.50","description":"Returns marker position. See also setMarkerPos.","syntaxes":[{"syntax":"markerPos markerName","params":[{"name":"markerName","type":"String","type_expr":"String"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"[x, y, 0], z is always 0","text":"PositionAGL - [x, y, **0**], z is always 0"},"form":"unary","right":{"text":"markerName"}},{"syntax":"markerPos [markerName, preserveElevation]","since":"arma3 1.94","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"preserveElevation","type":"Boolean","optional":true,"default":"false","type_expr":"Boolean","text":"preserveElevation: Boolean - (Optional, default false)"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"if preserveElevation is true or [x, y, 0] if preserveElevation is false","text":"PositionAGL - if *preserveElevation* is true or [x, y, **0**] if *preserveElevation* is false"},"form":"unary","right":{"text":"[markerName, preserveElevation]"}}],"examples":[{"code":["_mPos1 = markerPos \"markerOne\";"]},{"code":["_mPos2 = markerPos [\"markerTwo\", true];"]}],"aliases":["getMarkerPos"],"see_also":["setMarkerPos","setMarkerPosLocal"],"notes":[{"user":"Demellion","date":"2016-09-01T12:42:00Z","text":"To accomplish getting the altitude of a marker before the alternative syntax introduced in A3 v1.93, you can do a workaround using setMarkerDir as it accepts any number (above 360 or below -360):\n\n```sqf\n\"myMarker\" setMarkerPos [200, 200];\n\"myMarker\" setMarkerDir 1640;\n```\n\nAfter, setting player position as an example:\n\n```sqf\nplayer setPosASL [(markerPos \"myMarker\") select 0, (markerPos \"myMarker\") select 1, (markerDir \"myMarker\")]\n```"}]},{"name":"markerShadow","title":"markerShadow","type":"command","url":"https://community.bistudio.com/wiki/markerShadow","revid":379520,"updated":"2026-10-31T00:29:41Z","groups":["Markers"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","description":"Returns if the marker is drawn with shadow enabled.","syntaxes":[{"syntax":"markerShadow marker","params":[{"name":"marker","type":"String","description":"the marker","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if marker is enabled, false if not"},"form":"unary","right":{"text":"marker"}}],"examples":[{"code":["private _shadowEnabled = markerShadow _myMarker;"]}],"problems":"setMarkerType will reset the shadow value to the one defined in marker type.","see_also":["setMarkerShadow","setMarkerShadowLocal"]},{"name":"markerShape","title":"markerShape","type":"command","url":"https://community.bistudio.com/wiki/markerShape","revid":378609,"updated":"2026-05-13T15:29:58Z","groups":["Markers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the shape of given marker. markerShape#Example_2\n\n> [!NOTE]\n> This command can be used as a fast way to check if a marker exists. See Example 2.","syntaxes":[{"syntax":"markerShape name","params":[{"name":"name","type":"String","description":"name of the marker","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"shape of given marker. Can be return:\n- `\"\"` - if the marker does not exist - `\"ICON\"` - `\"RECTANGLE\"` - `\"ELLIPSE\"` - Arma 3 v1.60 `\"POLYLINE\"` - hand drawn markers - Arma 3 v2.20 `\"TRIANGLE\"` - Arma 3 v2.20 `\"PENTAGON\"` - Arma 3 v2.20 `\"HEXAGON\"` - Arma 3 v2.20 `\"HEPTAGON\"` - Arma 3 v2.20 `\"OCTAGON\"` - Arma 3 v2.20 `\"NONAGON\"` - Arma 3 v2.20 `\"DECAGON\"`","text":"String - shape of given marker. Can be return:\n\n- `\"\"` - if the marker does not exist\n- `\"ICON\"`\n- `\"RECTANGLE\"`\n- `\"ELLIPSE\"`\n- Arma 3 v1.60 `\"POLYLINE\"` - hand drawn markers\n- Arma 3 v2.20 `\"TRIANGLE\"`\n- Arma 3 v2.20 `\"PENTAGON\"`\n- Arma 3 v2.20 `\"HEXAGON\"`\n- Arma 3 v2.20 `\"HEPTAGON\"`\n- Arma 3 v2.20 `\"OCTAGON\"`\n- Arma 3 v2.20 `\"NONAGON\"`\n- Arma 3 v2.20 `\"DECAGON\"`"},"form":"unary","right":{"text":"name"}}],"examples":[{"code":["if (markerShape \"Marker1\" == \"RECTANGLE\") then { hint \"Marker1 is a rectangle!\" };"]},{"code":["if (markerShape \"Marker1\" == \"\") then { hint \"Marker1 does not exist!\" };"]}],"see_also":["setMarkerShape","setMarkerShapeLocal"]},{"name":"markerSize","title":"markerSize","type":"command","url":"https://community.bistudio.com/wiki/markerSize","revid":377691,"updated":"2026-01-02T09:03:12Z","groups":["Markers"],"status":"ok","games":{"ofp":null,"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns marker size. This command is identical to getMarkerSize.","syntaxes":[{"syntax":"markerSize markerName","params":[{"name":"markerName","type":"String","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"with [a_axis, b_axis]\n- a_axis: Number - 1/2 width of marker - b_axis: Number - 1/2 height of marker","text":"Array with [a_axis, b_axis]\n\n- a_axis: Number - 1/2 width of marker\n- b_axis: Number - 1/2 height of marker"},"form":"unary","right":{"text":"markerName"}}],"examples":[{"code":["_mSize = markerSize \"Marker1\";"]}],"see_also":["setMarkerSize","setMarkerSizeLocal"]},{"name":"markerText","title":"markerText","type":"command","url":"https://community.bistudio.com/wiki/markerText","revid":308978,"updated":"2022-04-22T13:12:44Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.04","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.04","arma3_since":"0.50","locality":{"argument":"global"},"description":"Get marker text.","syntaxes":[{"syntax":"markerText markerName","params":[{"name":"markerName","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"markerName"}}],"examples":[{"code":["hint format [\"Marker Text: %1\", markerText \"Marker1\"];"]}],"see_also":["setMarkerText","setMarkerTextLocal"]},{"name":"markerType","title":"markerType","type":"command","url":"https://community.bistudio.com/wiki/markerType","revid":379451,"updated":"2026-10-31T00:08:16Z","groups":["Markers"],"status":"ok","games":{"ofp":null,"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","locality":{"argument":"global"},"description":"Gets type of marker. See CfgMarkers for a list of standard markers.","syntaxes":[{"syntax":"markerType markerName","params":[{"name":"markerName","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"marker class name. See CfgMarkers."},"form":"unary","right":{"text":"markerName"}}],"examples":[{"code":["if (markerType \"Marker1\" == \"\") then { hint \"Marker1 is not an icon!\" };"]}],"aliases":["getMarkerType"],"see_also":["setMarkerType","setMarkerTypeLocal"],"notes":[{"user":"Waffle SS.","date":"2014-03-17T00:00:00Z","text":"Using markerType is a good method to determine if a string is a valid marker name, unless the marker type isn't set.\n\n```sqf\nif (markerType \"mark1\" != \"\") then {hint \"valid marker\"}\n```"}]},{"name":"matrixMultiply","title":"matrixMultiply","type":"command","url":"https://community.bistudio.com/wiki/matrixMultiply","revid":364807,"updated":"2024-06-15T13:13:13Z","groups":["Math","Math - Vectors"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Returns resulting matrix from the [multiplication](https://en.wikipedia.org/wiki/Matrix_multiplication) of two matrices. First matrix must be of the size n × **k**, while the second must be of the size **k** × m, i.e `columns` matrix1 == `rows` matrix2. The resulting matrix will be of the size n × m. If the shapes do not match, empty array [] will be returned.","syntaxes":[{"syntax":"matrix1 matrixMultiply matrix2","params":[{"name":"matrix1","type":"Array of Array of Numbers","description":"matrix of the size `n`*(rows)* × `k`*(columns)*","type_expr":"Array<Array<Number>>"},{"name":"matrix2","type":"Array of Array of Numbers","description":"matrix of the size `k`*(rows)* × `m`*(columns)*","type_expr":"Array<Array<Number>>"}],"returns":{"type":"Array of Array of Numbers","type_expr":"Array<Array<Number>>","description":"resulting matrix of the size `n`(rows) × `m`(columns)","text":"Array of Array of Numbers - resulting matrix of the size `n`*(rows)* × `m`*(columns)*"},"form":"binary","left":{"text":"matrix1"},"right":{"text":"matrix2"}}],"examples":[{"text":"```sqf\n[\n    [2],\n    [2]\n]\nmatrixMultiply\n[\n    [3]\n]\n/* returns\n[\n    [6],\n    [6]\n] */\n```","code":["[\n\t[2],\n\t[2]\n] \nmatrixMultiply \n[\n\t[3] \n]\n/* returns \n[\n\t[6],\n\t[6]\n] */"]},{"text":"```sqf\n[\n    [-1,0,0],\n    [0,-1,0]\n]\nmatrixMultiply\n[\n    [1,2],\n    [3,1],\n    [2,3]\n]\n/* returns\n[\n    [-1,-2],\n    [-3,-1]\n] */\n```","code":["[\n\t[-1,0,0],\n\t[0,-1,0]\n] \nmatrixMultiply \n[\n\t[1,2],\n\t[3,1],\n\t[2,3]\n] \n/* returns \n[\n\t[-1,-2],\n\t[-3,-1]\n] */"]}],"see_also":["matrixTranspose","vectorAdd","vectorMagnitude","vectorNormalized","vectorMultiply","vectorDotProduct","vectorCrossProduct","vectorDistance","vectorLinearConversion","vectorCos","vectorFromTo","vectorModelToWorld","vectorWorldToModel","BIS_fnc_transformVectorDirAndUp"],"notes":[{"user":"oOKexOo","date":"2019-06-30T03:53:00Z","text":"Note that this command won't automatically transform a 1D array into a column vector\n\n```sqf\n[[-1,0,0],[0,-1,0],[0,0,-1]] matrixMultiply [1,2,3] // wrong, syntax error\n[[-1,0,0],[0,-1,0],[0,0,-1]] matrixMultiply [[1,2,3]] // wrong, will return []\n[[-1,0,0],[0,-1,0],[0,0,-1]] matrixMultiply [[1], [2], [3]] // correct, will return [[-1], [-2], [-3]]\n```"}]},{"name":"matrixTranspose","title":"matrixTranspose","type":"command","url":"https://community.bistudio.com/wiki/matrixTranspose","revid":364808,"updated":"2024-06-15T13:13:33Z","groups":["Math","Math - Vectors"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Returns [transposed](https://en.wikipedia.org/wiki/Transpose) version of the given matrix.\nThe matrix is an Array of rows.\nEach row is an Array of corresponding column values for the row. The minimum number of rows is 1.","syntaxes":[{"syntax":"matrixTranspose matrix","params":[{"name":"matrix","type":"Array of Array of Numbers","description":"given matrix","type_expr":"Array<Array<Number>>"}],"returns":{"type":"Array of Array of Numbers","type_expr":"Array<Array<Number>>","description":"transposed matrix"},"form":"unary","right":{"text":"matrix"}}],"examples":[{"text":"```sqf\nmatrixTranspose\n[\n    [1,2,3],\n    [3,1,2],\n    [2,3,1]\n];\n/* returns\n[\n    [1,3,2],\n    [2,1,3],\n    [3,2,1]\n] */\n```","code":["matrixTranspose \n[\n\t[1,2,3], \n\t[3,1,2], \n\t[2,3,1]\n];\n/* returns \n[\n\t[1,3,2], \n\t[2,1,3], \n\t[3,2,1]\n] */"]},{"text":"```sqf\nmatrixTranspose\n[\n    [1,2,3]\n];\n/* returns\n[\n    [1],\n    [2],\n    [3]\n] */\n```","code":["matrixTranspose \n[\n\t[1,2,3]\n];\n/* returns \n[\n\t[1],\n\t[2],\n\t[3]\n] */"]},{"text":"```sqf\nmatrixTranspose\n[\n    [1],\n    [2],\n    [3]\n];\n/* returns\n[\n    [1,2,3]\n] */\n```","code":["matrixTranspose \n[\n\t[1],\n\t[2],\n\t[3]\n];\n/* returns \n[\n\t[1,2,3]\n] */"]}],"see_also":["matrixMultiply","vectorAdd","vectorMagnitude","vectorNormalized","vectorMultiply","vectorDotProduct","vectorCrossProduct","vectorDistance","vectorLinearConversion","vectorCos","vectorFromTo","vectorModelToWorld","vectorWorldToModel"]},{"name":"max","title":"max","type":"command","url":"https://community.bistudio.com/wiki/max","revid":321188,"updated":"2022-05-13T15:20:51Z","groups":["Math"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"The greater value of a and b.","syntaxes":[{"syntax":"a max b","params":[{"name":"a","type":"Number","type_expr":"Number"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"code":["3 max 2; // Result is 3"]},{"code":["-3 max -2; // Result is -2"]}],"see_also":["min","selectMin","selectMax","ceil","floor","linearConversion","Math Commands"]},{"name":"maxLoad","title":"maxLoad","type":"command","url":"https://community.bistudio.com/wiki/maxLoad","revid":309123,"updated":"2022-05-03T11:08:26Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","description":"Returns maximum load limit for a unit, uniform/vest/backpack containers, vehicle cargo, supply boxes and weapon holders.","syntaxes":[{"syntax":"maxLoad container","params":[{"name":"container","type":"Object","description":"unit, uniform/vest/backpack container, vehicle cargo, supply box, weapon holder","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"container"}}],"examples":[{"code":["private _maxLoad = maxLoad _yaMum;"]}],"see_also":["setMaxLoad","load","loadAbs","loadBackpack","loadUniform","loadVest","getContainerMaxLoad"]},{"name":"members","title":"members","type":"command","url":"https://community.bistudio.com/wiki/members","revid":310843,"updated":"2022-05-07T20:24:01Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return a list of members in given team.","syntaxes":[{"syntax":"members team","params":[{"name":"team","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"Array","type_expr":"Array"},"form":"unary","right":{"text":"team"}}],"examples":[{"code":["_members = members _team;"]}],"see_also":["teams"]},{"name":"menuAction","title":"menuAction","type":"command","url":"https://community.bistudio.com/wiki/menuAction","revid":378323,"updated":"2026-04-02T16:28:16Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns action stored in item on given path in CT_MENU_STRIP control.","syntaxes":[{"syntax":"menuAction [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String","description":"action"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control menuAction path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String","description":"action"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["menuAction [120, [1, 0]];"]},{"code":["findDisplay 313 displayCtrl 120 menuAction [1, 0];"]}],"see_also":["menuSetAction"]},{"name":"menuAdd","title":"menuAdd","type":"command","url":"https://community.bistudio.com/wiki/menuAdd","revid":378324,"updated":"2026-04-02T16:28:30Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Adds new submenu entry into item on given path.","syntaxes":[{"syntax":"menuAdd [idc, path, text]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"[idc, path, text]"}},{"syntax":"control menuAdd [path, text]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","description":"path where the items should be added","type_expr":"Tree View Path"},{"name":"text","type":"String","description":"displayed name for the entry","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"index of the item"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, text]"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuAdd [[], \"Custom Tools\"]; // Add new entry at the top level to the menu strip in Eden Editor"]}],"see_also":["menuDelete"]},{"name":"menuChecked","title":"menuChecked","type":"command","url":"https://community.bistudio.com/wiki/menuChecked","revid":378328,"updated":"2026-04-02T16:30:35Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns if item on given path is checked or not.","syntaxes":[{"syntax":"menuChecked [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control menuChecked path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["private _isChecked = findDisplay 313 displayCtrl 120 menuChecked [0, 1];"]}],"see_also":["menuSetCheck"]},{"name":"menuClear","title":"menuClear","type":"command","url":"https://community.bistudio.com/wiki/menuClear","revid":339137,"updated":"2023-04-26T10:55:01Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Removes all entries from given menu strip.","syntaxes":[{"syntax":"menuClear idc","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"idc"}},{"syntax":"menuClear control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["menuClear (findDisplay 313 displayCtrl 120); // removes all entries from Eden Editor. Restart the editor to reset the menu."]}],"see_also":["menuEnable","menuExpand","menuCollapse","menuSetData","menuSetValue","menuSetCheck","menuSetAction","menuDelete","menuAdd","menuHover","menuValue","menuURL","menuText","menuSort","menuSize","menuEnabled","menuChecked","menuAction","menuShortcutText","menuShortcut","menuPicture","menuData","menuSetPicture"]},{"name":"menuCollapse","title":"menuCollapse","type":"command","url":"https://community.bistudio.com/wiki/menuCollapse","revid":378331,"updated":"2026-04-02T16:30:43Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Collapses item on given path and all its children.","syntaxes":[{"syntax":"menuCollapse [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control menuCollapse path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuCollapse [0];"]}],"see_also":["menuExpand"]},{"name":"menuData","title":"menuData","type":"command","url":"https://community.bistudio.com/wiki/menuData","revid":378335,"updated":"2026-04-02T16:30:53Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns data stored in menu entry on given path.","syntaxes":[{"syntax":"menuData [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control menuData path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["// Create an entry which will return its data once clicked\nprivate _ctrlMenuStrip = findDisplay 313 displayCtrl 120;\nprivate _indexMain = _ctrlMenuStrip menuAdd [[], \"Custom Tools\"];\nprivate _indexData = _ctrlMenuStrip menuAdd [[_indexMain],\"This entry will print its data to system chat when clicked\"];\n_ctrlMenuStrip menuSetData [[_indexMain,_indexData], \"[objNull,'Some String',true]\"];\n_ctrlMenuStrip menuSetAction [[_indexMain,_indexData], \"systemChat (findDisplay 313 displayCtrl 120 menuData (menuHover (findDisplay 313 displayCtrl 120)));\"];"]}],"see_also":["menuSetData"]},{"name":"menuDelete","title":"menuDelete","type":"command","url":"https://community.bistudio.com/wiki/menuDelete","revid":378336,"updated":"2026-04-02T16:31:01Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Deletes menu entry on given path.","syntaxes":[{"syntax":"menuDelete [idc,path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc,path]"}},{"syntax":"control menuDelete path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["(findDisplay 313 displayCtrl 120) menuDelete [1]; // removes the second entry from Eden Editor menu strip. Restart Eden Editor to reset the menu."]}],"see_also":["menuEnable","menuExpand","menuCollapse","menuSetData","menuSetValue","menuSetCheck","menuSetAction","menuAdd","menuHover","menuValue","menuURL","menuText","menuSort","menuSize","menuEnabled","menuChecked","menuAction","menuShortcutText","menuShortcut","menuPicture","menuData","menuClear","menuSetPicture"]},{"name":"menuEnable","title":"menuEnable","type":"command","url":"https://community.bistudio.com/wiki/menuEnable","revid":378329,"updated":"2026-04-02T16:30:39Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Enables or disables menu entry on given path.","syntaxes":[{"syntax":"menuEnable [idc, path, enable]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"enable","type":"Boolean","optional":true,"default":"true","description":"disabled if false","type_expr":"Boolean","since":"arma3 2.06","text":"enable: Boolean - (Optional, default true) disabled if false"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, enable]"}},{"syntax":"control menuEnable [path, enable]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"enable","type":"Boolean","optional":true,"default":"true","description":"disabled if false","type_expr":"Boolean","since":"arma3 2.06","text":"enable: Boolean - (Optional, default true) disabled if false"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, enable]"}},{"syntax":"control menuEnable path","note":"> [!CAUTION]\n> This information is **obsolete** as of Arma 3 v2.06. Reason: This old syntax is kept only for backward compatibility.","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuEnable [0]; // old syntax, do not use"]},{"code":["findDisplay 313 displayCtrl 120 menuEnable [[0, 0, 1], false]; // since Arma 3 v2.06"]}],"see_also":["menuEnabled"]},{"name":"menuEnabled","title":"menuEnabled","type":"command","url":"https://community.bistudio.com/wiki/menuEnabled","revid":378333,"updated":"2026-04-02T16:30:48Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns if menu entry on given path is enabled or not.","syntaxes":[{"syntax":"menuEnabled [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control menuEnabled path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["_isEnabled = findDisplay 313 displayCtrl 120 menuEnabled [0];"]}],"see_also":["menuEnable"]},{"name":"menuExpand","title":"menuExpand","type":"command","url":"https://community.bistudio.com/wiki/menuExpand","revid":378347,"updated":"2026-04-02T16:31:34Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Expands given menu entry on given path and all its parents so entry is visible.","syntaxes":[{"syntax":"menuExpand [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control menuExpand path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuExpand [0, 1];"]}],"see_also":["menuCollapse"]},{"name":"menuHover","title":"menuHover","type":"command","url":"https://community.bistudio.com/wiki/menuHover","revid":339129,"updated":"2023-04-26T10:54:57Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns path to menu entry mouse is currently hovering over.","syntaxes":[{"syntax":"menuHover idc","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array"},"form":"unary","right":{"text":"idc"}},{"syntax":"menuHover control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Array","type_expr":"Array"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["private _path = menuHover (findDisplay 313 displayCtrl 120);"]}],"see_also":["menuEnable","menuExpand","menuCollapse","menuSetData","menuSetValue","menuSetCheck","menuSetAction","menuDelete","menuAdd","menuValue","menuURL","menuText","menuSort","menuSize","menuEnabled","menuChecked","menuAction","menuShortcutText","menuShortcut","menuPicture","menuData","menuClear","menuSetPicture"]},{"name":"menuPicture","title":"menuPicture","type":"command","url":"https://community.bistudio.com/wiki/menuPicture","revid":378338,"updated":"2026-04-02T16:31:12Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns picture set into item on given path.","syntaxes":[{"syntax":"menuPicture [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control menuPicture path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["private _picturePath = (findDisplay 313 displayCtrl 120) menuPicture [0, 1];"]}],"see_also":["menuSetPicture"]},{"name":"menuSetAction","title":"menuSetAction","type":"command","url":"https://community.bistudio.com/wiki/menuSetAction","revid":378340,"updated":"2026-04-02T16:31:17Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Sets new action into menu entry on given path.","syntaxes":[{"syntax":"menuSetAction [idc, path, action]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"action","type":"String","description":"expression that should be executed when entry is clicked","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, action]"}},{"syntax":"control menuSetAction [path, action]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"action","type":"String","description":"expression that should be executed when entry is clicked","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, action]"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuSetAction [[0, 1], \"systemChat 'Hello World!'\"];"]}],"see_also":["menuAction"]},{"name":"menuSetCheck","title":"menuSetCheck","type":"command","url":"https://community.bistudio.com/wiki/menuSetCheck","revid":378337,"updated":"2026-04-02T16:31:09Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Sets item on given path to be checked or not. By default menu strip entries are not checkable.\nOnce this command was executed, an entry can become checked and unchecked.\nIf an entry is checked is indicated by a tick to the left of the entry's text.\nSetting an entry to be checkable will overwrite set picture with menuSetPicture.","syntaxes":[{"syntax":"menuSetCheck [idc, path, checked]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"checked","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, checked]"}},{"syntax":"control menuSetCheck [path, checked]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"checked","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, checked]"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuSetCheck [[0,1], true];"]}],"see_also":["menuChecked"]},{"name":"menuSetData","title":"menuSetData","type":"command","url":"https://community.bistudio.com/wiki/menuSetData","revid":378345,"updated":"2026-04-02T16:31:30Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Sets data into menu entry on given path.","syntaxes":[{"syntax":"menuSetData [idc, path, data]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"data","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, data]"}},{"syntax":"control menuSetData [path, data]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"data","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, data]"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuSetData [[0, 1], \"[true, player, 'Hello World!', 1337]\"];"]}],"see_also":["menuData"]},{"name":"menuSetPicture","title":"menuSetPicture","type":"command","url":"https://community.bistudio.com/wiki/menuSetPicture","revid":378346,"updated":"2026-04-02T16:31:33Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Sets new picture into menu entry on given path. The picture will be replaced by a tick if the entry was set to checkable with menuSetCheck.","syntaxes":[{"syntax":"menuSetPicture [idc, path, picture]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"picture","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, picture]"}},{"syntax":"control menuSetPicture [path, picture]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"picture","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, picture]"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuSetPicture [[0, 1], \"\\a3\\modules_f\\data\\iconunlock_ca.paa\"];"]}],"see_also":["menuPicture"]},{"name":"menuSetShortcut","title":"menuSetShortcut","type":"command","url":"https://community.bistudio.com/wiki/menuSetShortcut","revid":378330,"updated":"2026-04-02T16:30:41Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Sets shortcut of given menu strip entry.","syntaxes":[{"syntax":"menuSetShortcut [idc, path, shortcut]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"shortcut","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, shortcut]"}},{"syntax":"control menuSetShortcut [path, shortcut]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"shortcut","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, shortcut]"}}],"examples":[{"code":["_ctrlMenuStrip menuSetShortcut [[0,0], 2048 + 0x16]; // ALT + U"]}],"see_also":["menuShortcut","menuShortcutText"]},{"name":"menuSetText","title":"menuSetText","type":"command","url":"https://community.bistudio.com/wiki/menuSetText","revid":378350,"updated":"2026-04-02T16:31:40Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Sets text of given menu strip entry.","syntaxes":[{"syntax":"menuSetText [idc, path, text]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, text]"}},{"syntax":"control menuSetText [path, text]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, text]"}}],"examples":[{"code":["_ctrlMenuStrip menuSetText [[0,0,1], \"Hello World!\"];"]}],"see_also":["menuText"]},{"name":"menuSetURL","title":"menuSetURL","type":"command","url":"https://community.bistudio.com/wiki/menuSetURL","revid":378344,"updated":"2026-04-02T16:31:28Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Sets weblink (URL) of given menu strip entry, subject to `allowedHTMLLoadURIs[]` whitelisting in CfgCommands config.","syntaxes":[{"syntax":"menuSetURL [idc, path, link]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path of Numbers","type_expr":"Tree View Path"},{"name":"link","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, link]"}},{"syntax":"control menuSetURL [path, link]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path of Numbers","type_expr":"Tree View Path"},{"name":"link","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, link]"}}],"examples":[{"code":["_ctrlMenuStrip menuSetURL [[0,0,1], \"https://arma3.com/\"];"]}],"see_also":["menuURL","ctrlSetURL"]},{"name":"menuSetValue","title":"menuSetValue","type":"command","url":"https://community.bistudio.com/wiki/menuSetValue","revid":378339,"updated":"2026-04-02T16:31:15Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Sets new value into menu entry on given path.","syntaxes":[{"syntax":"menuSetValue [idc, path, value]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, value]"}},{"syntax":"control menuSetValue [path, value]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, value]"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuSetValue [[0, 1], 1337];"]}],"see_also":["menuValue"]},{"name":"menuShortcut","title":"menuShortcut","type":"command","url":"https://community.bistudio.com/wiki/menuShortcut","revid":378341,"updated":"2026-04-02T16:31:19Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns shortcut related to menu entry on given path in form of a bitflag. To get the shortcut text use menuShortcutText.","syntaxes":[{"syntax":"menuShortcut [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control menuShortcut path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuShortcut [0, 1];"]}],"see_also":["menuShortcutText","menuSetURL"]},{"name":"menuShortcutText","title":"menuShortcutText","type":"command","url":"https://community.bistudio.com/wiki/menuShortcutText","revid":378343,"updated":"2026-04-02T16:31:24Z","groups":["GUI Control - Menu","Broken Commands"],"status":"broken","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns a string containing shortcut text for menu item on the given path.","syntaxes":[{"syntax":"menuShortcutText [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control menuShortcutText path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuShortcutText [1, 8]; // returns \"#\""]}],"problems":"> [!WARNING]\n> This command is currently broken in Arma 3 2.00. It only returns shortcuts which do not use a modifier key (<kbd>Ctrl</kbd>, <kbd>Alt</kbd> and <kbd>⇧ Shift</kbd>).","see_also":["menuShortcut","menuSetShortcut"]},{"name":"menuSize","title":"menuSize","type":"command","url":"https://community.bistudio.com/wiki/menuSize","revid":378332,"updated":"2026-04-02T16:30:46Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns how many sub entries is in item on given path.","syntaxes":[{"syntax":"menuSize [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control menuSize path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuSize [];"]}],"see_also":["menuEnable","menuExpand","menuCollapse","menuSetData","menuSetValue","menuSetCheck","menuSetAction","menuDelete","menuAdd","menuHover","menuValue","menuURL","menuText","menuSort","menuEnabled","menuChecked","menuAction","menuShortcutText","menuShortcut","menuPicture","menuData","menuClear","menuSetPicture"]},{"name":"menuSort","title":"menuSort","type":"command","url":"https://community.bistudio.com/wiki/menuSort","revid":378342,"updated":"2026-04-02T16:31:22Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Sorts subentries of item on given path by their text.","syntaxes":[{"syntax":"menuSort [idc, path, sortOrder]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"sortOrder","type":"Boolean","description":"true to sort from A to Z, false to sort from Z to A","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, sortOrder]"}},{"syntax":"control menuSort [path, sortOrder]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"sortOrder","type":"Boolean","description":"true to sort from A to Z, false to sort from Z to A","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, sortOrder]"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuSort [[], true];"]}],"see_also":["menuEnable","menuExpand","menuCollapse","menuSetData","menuSetValue","menuSetCheck","menuSetAction","menuDelete","menuAdd","menuHover","menuValue","menuURL","menuText","menuEnabled","menuChecked","menuAction","menuShortcutText","menuShortcut","menuPicture","menuData","menuClear","menuSetPicture"]},{"name":"menuText","title":"menuText","type":"command","url":"https://community.bistudio.com/wiki/menuText","revid":378349,"updated":"2026-04-02T16:31:38Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns current text set in menu entry on given path.","syntaxes":[{"syntax":"menuText [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control menuText path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["_ctrlMenuStrip menuText [1];"]}],"see_also":["menuSetText"]},{"name":"menuURL","title":"menuURL","type":"command","url":"https://community.bistudio.com/wiki/menuURL","revid":378348,"updated":"2026-04-02T16:31:36Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns current URL set in entry on given path.","syntaxes":[{"syntax":"menuURL [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control menuURL path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["findDisplay 313 displayCtrl 120 menuURL [7, 0]; // returns \"https://community.bistudio.com/wiki/Eden_Editor\""]}],"see_also":["menuSetURL"]},{"name":"menuValue","title":"menuValue","type":"command","url":"https://community.bistudio.com/wiki/menuValue","revid":379227,"updated":"2026-10-30T22:59:52Z","groups":["GUI Control - Menu"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns current value set in menu entry on given path.","syntaxes":[{"syntax":"menuValue [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control menuValue path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"see_also":["menuEnable","menuExpand","menuCollapse","menuSetData","menuSetValue","menuSetCheck","menuSetAction","menuDelete","menuAdd","menuHover","menuURL","menuText","menuSort","menuSize","menuEnabled","menuChecked","menuAction","menuShortcutText","menuShortcut","menuPicture","menuData","menuClear","menuSetPicture"]},{"name":"merge","title":"merge","type":"command","url":"https://community.bistudio.com/wiki/merge","revid":347592,"updated":"2023-09-28T20:05:03Z","groups":["HashMap"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Merges two HashMaps.","syntaxes":[{"syntax":"hashMap1 merge hashMap2","params":[{"name":"hashMap1","type":"HashMap","description":"this HashMap will be modified","type_expr":"HashMap"},{"name":"hashMap2","type":"HashMap","description":"all key-value pairs from this HashMap are added to *hashMap1*. If a key from *hashMap2* already exists in *hashMap1*, it doesn't overwrite the value in *hashMap1*.","type_expr":"HashMap"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"hashMap1"},"right":{"text":"hashMap2"}},{"syntax":"hashMap1 merge [hashMap2, overwriteExisting]","params":[{"name":"hashMap1","type":"HashMap","description":"this HashMap will be modified","type_expr":"HashMap"},{"name":"hashMap2","type":"HashMap","description":"all key-value pairs from this HashMap are added to *hashMap1*","type_expr":"HashMap"},{"name":"overwriteExisting","type":"Boolean","optional":true,"default":"false","description":"if true, keys from *hashMap1* that also exist in *hashMap2* are overwritten. When set to true, merging is faster","type_expr":"Boolean","text":"overwriteExisting: Boolean - (Optional, default false) if true, keys from *hashMap1* that also exist in *hashMap2* are overwritten. When set to true, merging is faster"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"hashMap1"},"right":{"text":"[hashMap2, overwriteExisting]"}}],"examples":[{"code":["_hashMap merge _otherHashMap;"]},{"code":["private _hashmap1 = [\"cow\", \"cat\", \"chicken\"] createHashMapFromArray [100, 200, 200];\nprivate _hashmap2 = [\"cow\", \"cat\", \"chicken\", \"camel\"] createHashMapFromArray [150, 300, 400, 800];\n_hashmap1 merge _hashmap2; // _hashmap is [[\"cow\",100],[\"cat\",200],[\"chicken\",200],[\"camel\",800]]"]},{"code":["private _hashmap1 = [\"cow\", \"cat\", \"chicken\"] createHashMapFromArray [100, 200, 200];\nprivate _hashmap2 = [\"cow\", \"cat\", \"chicken\", \"camel\"] createHashMapFromArray [150, 300, 400, 800];\n_hashmap1 merge [_hashmap2, true]; // _hashmap is [[\"cow\",150],[\"cat\",300],[\"chicken\",400],[\"camel\",800]]"]},{"code":["private _hashmap1 = [\"cow\", \"cat\", \"chicken\"] createHashMapFromArray [100, 200, 200];\nprivate _hashmap2 = [\"cow\", \"cat\", \"chicken\", \"camel\"] createHashMapFromArray [150, 300, 400, 800];\n_hashmap1 merge [_hashmap2, false]; // _hashmap is [[\"cow\",100],[\"cat\",200],[\"chicken\",200],[\"camel\",800]] as Syntax 1"]}],"see_also":["insert","set"]},{"name":"min","title":"min","type":"command","url":"https://community.bistudio.com/wiki/min","revid":321189,"updated":"2022-05-13T15:21:16Z","groups":["Math"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"The smaller of a and b.","syntaxes":[{"syntax":"a min b","params":[{"name":"a","type":"Number","type_expr":"Number"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"code":["3 min 2 // Result is 2"]},{"code":["-3 min -2 // Result is -3"]}],"see_also":["max","selectMin","selectMax","ceil","floor","linearConversion","Math Commands"]},{"name":"mineActive","title":"mineActive","type":"command","url":"https://community.bistudio.com/wiki/mineActive","revid":319444,"updated":"2022-05-13T09:24:05Z","groups":["Mines"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks if the given mine is active.","syntaxes":[{"syntax":"mineActive obj","params":[{"name":"obj","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"obj"}}],"examples":[{"code":["if (mineActive _mine) then {hint \"BOOM!\"};"]}],"see_also":["allMines","detectedMines","mineDetectedBy","createMine","revealMine"]},{"name":"mineDetectedBy","title":"mineDetectedBy","type":"command","url":"https://community.bistudio.com/wiki/mineDetectedBy","revid":378787,"updated":"2026-06-05T12:20:54Z","groups":["Mines"],"status":"ok","games":{"arma3":"1.24"},"since":"arma3 1.24","arma3_since":"1.24","description":"Returns true if mine has been detected by a given side","syntaxes":[{"syntax":"mine mineDetectedBy side","params":[{"name":"mine","type":"Object","type_expr":"Object"},{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"mine"},"right":{"text":"side"}}],"examples":[{"text":"```sqf\nif (_myMine mineDetectedBy opfor) then\n{\n    hint \"Children yearn for the mines\";\n};\n```","code":["if (_myMine mineDetectedBy opfor) then\n{\n\thint \"Children yearn for the mines\";\n};"]}],"see_also":["allMines","detectedMines","createMine","mineActive","revealMine"]},{"name":"missileState","title":"missileState","type":"command","url":"https://community.bistudio.com/wiki/missileState","revid":377694,"updated":"2026-01-02T09:03:16Z","groups":["Weapons"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Get the provided *guided* missile's engine, target lock and flight profile states.","syntaxes":[{"syntax":"missileState munition","params":[{"name":"munition","type":"Object","description":"missile","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [engineState, lockState, flightState]\n- engineState: String - one of \"INIT\", \"THRUST\", \"FLY\" or \"\" - lockState: String - one of \"MANUAL\", \"LOCKED\", \"LOST\", \"INITIAL\", \"SEEKING\" or \"\" - flightState: String - one of \"DEFAULT\", \"DIRECT\", \"TOPDOWN\", \"LOALDISTANCE\", \"LOALALTITUDE\", \"OVERFLY\", \"CRUISE\" or \"\" (LOAL stands for \"Lock-On After Launch\")","text":"Array with [engineState, lockState, flightState]\n\n- engineState: String - one of \"INIT\", \"THRUST\", \"FLY\" or \"\"\n- lockState: String - one of \"MANUAL\", \"LOCKED\", \"LOST\", \"INITIAL\", \"SEEKING\" or \"\"\n- flightState: String - one of \"DEFAULT\", \"DIRECT\", \"TOPDOWN\", \"LOALDISTANCE\", \"LOALALTITUDE\", \"OVERFLY\", \"CRUISE\" or \"\" (LOAL stands for \"Lock-On After Launch\")"},"form":"unary","right":{"text":"munition"}}],"examples":[{"code":["missileState _myMissile params [\"_engineState\", \"_lockState\", \"_flightState\"];"]},{"text":"```sqf\n_myHelicopter addEventHandler [\"Fired\", {\n    private _projectile = _this select 6;\n    // or params [\"\", \"\", \"\", \"\", \"\", \"\", \"_projectile\"];\n    systemChat str missileState _projectile;\n}];\n```","code":["_myHelicopter addEventHandler [\"Fired\", {\n\tprivate _projectile = _this select 6;\n\t// or params [\"\", \"\", \"\", \"\", \"\", \"\", \"_projectile\"];\n\tsystemChat str missileState _projectile;\n}];"]}],"see_also":["missileTargetPos","setMissileTargetPos","setMissileTarget","missileTarget"]},{"name":"missileTarget","title":"missileTarget","type":"command","url":"https://community.bistudio.com/wiki/missileTarget","revid":364926,"updated":"2024-06-30T22:40:26Z","groups":["Weapons"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Returns a guided missile's target.","syntaxes":[{"syntax":"missileTarget munition","params":[{"name":"munition","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"munition"}}],"examples":[{"code":["missileTarget missile1;"]}],"see_also":["missileTargetPos","setMissileTargetPos","setMissileTarget","missileState"]},{"name":"missileTargetPos","title":"missileTargetPos","type":"command","url":"https://community.bistudio.com/wiki/missileTargetPos","revid":377453,"updated":"2026-01-02T06:47:13Z","groups":["Weapons"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Returns a guided missile's target position.","syntaxes":[{"syntax":"missileTargetPos munition","params":[{"name":"munition","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionASL","type_expr":"PositionASL"},"form":"unary","right":{"text":"munition"}}],"examples":[{"code":["private _targetDistance = vehicle player distance missileTargetPos missile1;"]}],"see_also":["missileTarget","setMissileTargetPos","setMissileTarget","missileState"]},{"name":"missionConfigFile","title":"missionConfigFile","type":"command","url":"https://community.bistudio.com/wiki/missionConfigFile","revid":342131,"updated":"2023-07-09T12:26:44Z","groups":["Config"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return root of mission Description.ext entries hierarchy.\n\n> [!IMPORTANT]\n> Since the introduction of the Eden Editor, scenario attributes can be configured in the editor itself, not only in the external Description.ext file.\n>\n> To access desired value independently on where it is stored, use the following commands:\n>\n> - getMissionConfigValue\n> - getMissionConfig","syntaxes":[{"syntax":"missionConfigFile","params":[],"returns":{"type":"Config","type_expr":"Config"},"form":"nullary"}],"examples":[{"text":"```sqf\nfor \"_i\" from 0 to (count paramsArray - 1) do\n{\n    missionNamespace setVariable [configName ((missionConfigFile/\"Params\") select _i), paramsArray select _i];\n};\n```","code":["for \"_i\" from 0 to (count paramsArray - 1) do\n{\n\tmissionNamespace setVariable [configName ((missionConfigFile/\"Params\") select _i), paramsArray select _i];\n};"]},{"text":"To define custom values in description.ext:\n\n```cpp\nclass myMissionConfig\n{\n    class mySetup\n    {\n        myNumber = 3;\n        myArray[] = { 1, 2, 3 };\n        myText = \"LOL\";\n    };\n};\n```\n\nTo read defined custom values from a script:\n\n```sqf\n_myNumber = getNumber (missionConfigFile >> \"myMissionConfig\" >> \"mySetup\" >> \"myNumber\");\n_myArray = getArray (missionConfigFile >> \"myMissionConfig\" >> \"mySetup\" >> \"myArray\");\n_myText = getText (missionConfigFile >> \"myMissionConfig\" >> \"mySetup\" >> \"myText\");\n```","code":["_myNumber = getNumber (missionConfigFile >> \"myMissionConfig\" >> \"mySetup\" >> \"myNumber\");\n_myArray = getArray (missionConfigFile >> \"myMissionConfig\" >> \"mySetup\" >> \"myArray\");\n_myText = getText (missionConfigFile >> \"myMissionConfig\" >> \"mySetup\" >> \"myText\");"]}],"see_also":["configFile","campaignConfigFile","getMissionConfigValue","getMissionConfig","getMissionPath"],"notes":[{"user":"Killzone_Kid","date":"2015-02-17T16:46:00Z","text":"missionConfigFile can be used to parse *mission.sqm* file data as well if it is included into description.ext:\n\n```cpp\nclass MissionSQM\n{\n    #include \"mission.sqm\"\n};\n```\n\nThen *mission.sqm* data can be accessed like this:\n\n```sqf\ngetNumber (missionConfigFile >> \"MissionSQM\" >> \"version\"); // 12 - version param in mission.sqm\n```\n\n(courtesy of Master85)"},{"user":"Dedmen","date":"2018-04-27T20:39:00Z","text":"If your Description.ext file is empty, str missionConfigFile may report an empty string instead of the path to the file. You have to put at least one entry into your config.\nTo get file path with description.ext to play sound via playSound3D (before getMissionPath):\n\n```sqf\nprivate _missionRootPath = str missionConfigFile select [0, count str missionConfigFile - 15];\n```"}]},{"name":"missionDifficulty","title":"missionDifficulty","type":"command","url":"https://community.bistudio.com/wiki/missionDifficulty","revid":337653,"updated":"2023-02-16T13:02:43Z","groups":["Difficulty","Mission Information"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Return difficulty that has been forced for this mission, returns -1 if difficulty is not forced and it is used one from player's options.","syntaxes":[{"syntax":"missionDifficulty","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["private _number = missionDifficulty;"]},{"text":"```sqf\nprivate _playedDifficulty = missionDifficulty;\nif (_playedDifficulty == -1) then\n{\n    _playedDifficulty = difficulty;\n};\n```","code":["private _playedDifficulty = missionDifficulty;\nif (_playedDifficulty == -1) then\n{\n\t_playedDifficulty = difficulty;\n};"]}],"see_also":["difficultyOption","difficulty"]},{"name":"missionEnd","title":"missionEnd","type":"command","url":"https://community.bistudio.com/wiki/missionEnd","revid":377043,"updated":"2026-01-01T08:50:34Z","groups":["Mission Information"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Returns mission end type and how it was ended or an empty array [] is mission was not ended.","syntaxes":[{"syntax":"missionEnd","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [endType, failMission, isFailed] (or empty array if the mission is not ending):\n- endType : String - the ending that was passed to failMission or endMission - failMission: Boolean - true if the mission ended via failMission, false if via endMission - isFailed: Boolean - engine idea of how mission ended. For example if mission ended via failMission but the type of ending was not \"Killed\", isFailed is false","text":"Array with [endType, failMission, isFailed] (or empty array if the mission is not ending):\n\n- endType : String - the ending that was passed to failMission or endMission\n- failMission: Boolean - true if the mission ended via failMission, false if via endMission\n- isFailed: Boolean - engine idea of how mission ended. For example if mission ended via failMission but the type of ending was not \"Killed\", *isFailed* is false"},"form":"nullary"}],"examples":[{"code":["private _endInfo = missionEnd;"]},{"code":["missionEnd params [\"_endType\", \"_failMission\", \"_isFailed\"];"]}],"see_also":["endMission","failMission","forceEnd"]},{"name":"missionName","title":"missionName","type":"command","url":"https://community.bistudio.com/wiki/missionName","revid":364087,"updated":"2024-05-03T19:33:29Z","groups":["Mission Information"],"status":"ok","games":{"ofp":"1.80","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.80","arma3_since":"0.50","description":"Return currently loaded mission file (path to mission.pbo, relative to game exe).","syntaxes":[{"syntax":"missionName","params":[],"returns":{"type":"String","type_expr":"String"},"form":"nullary"}],"examples":[{"code":["hint format [\"You are playing mission \"\"%1\"\"\", missionName];"]}],"see_also":["missionNameSource","worldName","briefingName","serverName","worldSize"],"notes":[{"user":".kju","date":"2010-08-02T10:19:00Z","text":"Only works in SP and on the MP Host/DS. It returns the mission pboprefix if available, otherwise the pboname. For clients it returns '__cur_mp'."},{"user":"Kenoxite","date":"2014-09-25T08:05:00Z","text":"Prior to Operation Flashpoint v1.96 it returns the mission filename. Since Operation Flashpoint v1.99, it returns the briefing name instead when in multiplayer. The string displayed is that set in the Intel section of the mission editor."},{"user":"NikkoJT","date":"2021-06-12T19:31:00Z","text":"Testing suggests it does now work on clients in the current Arma 3 version."}]},{"name":"missionNameSource","title":"missionNameSource","type":"command","url":"https://community.bistudio.com/wiki/missionNameSource","revid":310162,"updated":"2022-05-05T13:07:20Z","groups":["Mission Information"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Return workshop-compatible currently loaded mission file (path to mission.pbo, relative to game exe).\n\n> [!NOTE]\n> - missionName will return the Workshop user-friendly mission name, whereas missionNameSource will take the information from mission.sqm.\n> - pre-v2.02 missions may return an empty string.","syntaxes":[{"syntax":"missionNameSource","params":[],"returns":{"type":"String","type_expr":"String"},"form":"nullary"}],"examples":[{"code":["hint format [\"You are playing mission \"\"%1\"\"\", missionNameSource];"]}],"see_also":["missionName","worldName","briefingName","serverName","worldSize"]},{"name":"missionNamespace","title":"missionNamespace","type":"command","url":"https://community.bistudio.com/wiki/missionNamespace","revid":339108,"updated":"2023-04-26T10:54:35Z","groups":["Namespaces","Variables"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the global namespace attached to mission.","syntaxes":[{"syntax":"missionNamespace","params":[],"returns":{"type":"Namespace","type_expr":"Namespace"},"form":"nullary"}],"examples":[{"code":["missionNamespace setVariable [\"StringVariable\", \"myString\"]; // same as: StringVariable = \"myString\";\n_myStringValue = missionNamespace getVariable \"StringVariable\";\nhint _myStringValue; // hints \"myString\""]}],"see_also":["currentNamespace","uiNamespace","parsingNamespace","profileNamespace","localNamespace","serverNamespace","allVariables","with","ArmA: Editing"]},{"name":"missionProfileNamespace","title":"missionProfileNamespace","type":"command","url":"https://community.bistudio.com/wiki/missionProfileNamespace","revid":330144,"updated":"2022-08-23T12:23:40Z","groups":["Namespaces","Variables"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"This namespace has the same lifetime as profileNamespace but is also connected to the mission it is saved from. See saveMissionProfileNamespace for more details.","syntaxes":[{"syntax":"missionProfileNamespace","params":[],"returns":{"type":"Namespace","type_expr":"Namespace","description":"namespace"},"form":"nullary"}],"examples":[{"code":["private _currentMissionProfileNamespace = missionProfileNamespace;"]}],"see_also":["missionNamespace","profileNamespace","saveMissionProfileNamespace","isMissionProfileNamespaceLoaded"]},{"name":"missionStart","title":"missionStart","type":"command","url":"https://community.bistudio.com/wiki/missionStart","revid":329154,"updated":"2022-07-25T12:25:22Z","groups":["Mission Information"],"status":"ok","games":{"ofp":"1.80","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.80","arma3_since":"0.50","description":"Returns date and time when mission started. Because this command returns the time of the actual start of the mission, it might not be available in *pre-init* or *init*, but is guaranteed to be available in *post-init* when `time > 0`.","syntaxes":[{"syntax":"missionStart","params":[],"returns":{"type":"Array","type_expr":"Array","description":"format `[year, month, day, hour, minute, second]` in multiplayer, which differs from date format only by seconds. In SP returns `[0,0,0,0,0,0]`","text":"Array format `[year, month, day, hour, minute, second]` in multiplayer, which differs from date format only by seconds. In SP returns `[0,0,0,0,0,0]`"},"form":"nullary"}],"examples":[{"code":["setDate (missionStart select [0,5]);"]},{"text":"Set real date:\n\n```sqf\n//postInit = 1;\nif (isServer) then\n{\n    waitUntil { time > 0 };\n    setDate (missionStart select [0, 5]);\n};\n```","code":["//postInit = 1;\nif (isServer) then\n{\n\twaitUntil { time > 0 };\n\tsetDate (missionStart select [0, 5]);\n};"]}],"multiplayer":"Command only has the desired return value in multiplayer.","see_also":["date","time","dayTime","serverTime","setDate","systemTime","systemTimeUTC"]},{"name":"missionVersion","title":"missionVersion","type":"command","url":"https://community.bistudio.com/wiki/missionVersion","revid":342111,"updated":"2023-07-09T12:26:37Z","groups":["Mission Information"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns the version of the current mission.\n\n- Mission from the 2D Editor: 12\n- Mission from the Eden Editor: 15 and higher (for example current version for Eden Editor mission in Arma 3 v1.57 is 51)","syntaxes":[{"syntax":"missionVersion","params":[],"returns":{"type":"Number","type_expr":"Number","description":"SQM version"},"form":"nullary"}],"examples":[{"code":["_version = missionVersion;"]}],"see_also":["Mission.sqm","Description.ext"]},{"name":"mod","title":"mod","type":"command","url":"https://community.bistudio.com/wiki/mod","revid":339102,"updated":"2023-04-26T10:54:26Z","groups":["Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Remainder of a divided by b.","syntaxes":[{"syntax":"a mod b","params":[{"name":"a","type":"Number","type_expr":"Number"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"code":["_remaining = 5 mod 2; // returns 1, as 5 divided by 2 is 2 × 2 + 1"]}],"aliases":["a % b"],"see_also":["Math Commands","Operators","a % b"],"notes":[{"user":"Hoz","date":"2006-04-16T01:34:00Z","text":"- Remainder is calculated in real domain.\n- mod is identical to a % b\n\nYou can use mod to round a decimal number down to the nearest whole number. For example: If you wanted to use the command random to generate a whole number between 0 and 5, you could put this in a script:\n\n```sqf\n_rand = random 6;\n_num = _rand - (_rand mod 1);\n```\n\nIn A1, the new commands round, floor or ceil would be the easier way to round."}]},{"name":"modelToWorld","title":"modelToWorld","type":"command","url":"https://community.bistudio.com/wiki/modelToWorld","revid":377424,"updated":"2026-01-02T06:45:36Z","groups":["Positions"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Translates relative position from object model space to world space in PositionAGL format.\nThis command will take into account vectorUp of the object when calculating relative coordinates.\nFor the PositionASL version of this command, see modelToWorldWorld.\n\n> [!IMPORTANT]\n> For scaled objects, the relative position will first be multiplied by the object scale.\n> For example, if the object scale is 2, `_obj modelToWorld [0,1,0]` will be offset **2 meters** from the model center (`[0,0,0]`).","syntaxes":[{"syntax":"model modelToWorld position","params":[{"name":"model","type":"Object","type_expr":"Object"},{"name":"position","type":"PositionRelative","description":"[x,y,z] offset relative to the model centre","type_expr":"PositionRelative"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"translated world position"},"form":"binary","left":{"text":"model"},"right":{"text":"position"}}],"examples":[{"code":["_aboveAndBehindPlayer = player modelToWorld [0,-1,3];"]}],"see_also":["vectorModelToWorld","modelToWorldVisual","worldToModel","modelToWorldWorld","modelToWorldVisualWorld","selectionPosition"],"notes":[{"user":"Dr_Eyeball","date":"2007-02-18T01:55:00Z","text":"The *worldPos* parameter appears to be a relative offset to the position of *object*, so it can often simply be [0,0,0].\n**Example:** to position an object *_obj* relative to the position of another object *_relObj* with on offset of *_offset*, try:\n\n```sqf\n_offset = [_x,_y,_z];\n_worldPos = _relObj modelToWorld _offset;\n_obj setPos _worldPos;\n```"},{"user":"ManDay","date":"2007-07-24T17:45:00Z","text":"The object model space has got its Z-Axis along the object's vectorUp,\nits Y-Axis along the object's vectorDir,\nwhile its X-Axis goes along [vectorDir x VectorUp](https://en.wikipedia.org/wiki/Cross_product) (meaning as the X-Axis in a [right-handed cartesian coordiante system](https://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions))."},{"user":"Dr_Eyeball","date":"2008-05-08T08:05:00Z","text":"If your object requires a new direction, ensure you call setDir *prior* to setPosATL when using modelToWorld.\nCalling setDir afterwards will skew its position otherwise.\n\n```sqf\n_ladder setDir _angle;\n_ladder setPosATL (_building modelToWorld [_x, _y, _z]);\n```"},{"user":"Hduregger","date":"2011-02-06T20:41:00Z","text":"The z height returned changes dynamically with the height of waves beneath the object, if the object is located over sea.\nThe z height returned by getPosATL and getPosASL does not change like this.\nThis was tested by continuously retrieving the position of a static object, like the cross in the empty/corpses category, placed over sea or land.\nmodelToWorld behaves similar to getPos but it does not give the same result, therefore\n\n```sqf\n_obj modelToWorld [0.0, 0.0, 0.0]\n```\n\nis **not** the same as\n\n```sqf\ngetPos _obj;\n```\n\n."}]},{"name":"modelToWorldVisual","title":"modelToWorldVisual","type":"command","url":"https://community.bistudio.com/wiki/modelToWorldVisual","revid":377834,"updated":"2026-01-03T04:32:01Z","groups":["Object Manipulation","Render Time Scope"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","description":"Converts position from object model space to world space in render time scope. For ASL version see modelToWorldVisualWorld.\n\n> [!IMPORTANT]\n> For scaled objects, the relative position will first be multiplied by the object scale.\n> For example, if the object scale is 2, `_obj modelToWorldVisual [0,1,0]` will be offset **2 meters** from the model center (`[0,0,0]`).","syntaxes":[{"syntax":"object modelToWorldVisual modelPos","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"modelPos","type":"Array","description":"in format PositionRelative ([x,y,z] offset relative to the model centre)","type_expr":"Array"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"world position"},"form":"binary","left":{"text":"object"},"right":{"text":"modelPos"}}],"examples":[{"code":["_aboveAndBehindPlayer = player modelToWorldVisual [0,-1,3];"]}],"see_also":["modelToWorld","vectorModelToWorldVisual","getPosWorldVisual","worldToModelVisual","worldToModel","selectionPosition"]},{"name":"modelToWorldVisualWorld","title":"modelToWorldVisualWorld","type":"command","url":"https://community.bistudio.com/wiki/modelToWorldVisualWorld","revid":377447,"updated":"2026-01-02T06:47:02Z","groups":["Object Manipulation","Render Time Scope"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"global"},"description":"Converts position from object model space to world space in render time scope. For the PositionAGL version see modelToWorldVisual.\n\n> [!IMPORTANT]\n> For scaled objects, the relative position will first be multiplied by the object scale.\n> For example, if the object's scale is 2, `_obj modelToWorldVisualWorld [0,1,0]` will be offset **2 meters** from the model center (`[0,0,0]`).","syntaxes":[{"syntax":"obj modelToWorldVisualWorld modelPos","params":[{"name":"obj","type":"Object","type_expr":"Object"},{"name":"modelPos","type":"PositionRelative","description":"[x,y,z] offset relative to the model centre","type_expr":"PositionRelative"}],"returns":{"type":"PositionASL","type_expr":"PositionASL","description":"translated world position (see getPosWorld)"},"form":"binary","left":{"text":"obj"},"right":{"text":"modelPos"}}],"examples":[{"code":["player modelToWorldVisualWorld [0,1,0];"]}],"see_also":["modelToWorldWorld","modelToWorldVisual","getPosWorldVisual"]},{"name":"modelToWorldWorld","title":"modelToWorldWorld","type":"command","url":"https://community.bistudio.com/wiki/modelToWorldWorld","revid":377452,"updated":"2026-01-02T06:47:11Z","groups":["Positions"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"global"},"description":"Converts position from object model space to world space in PositionASL format from the object's centre position.\n\n> [!IMPORTANT]\n> For scaled objects, the relative position will first be multiplied by the object scale.\n> For example, if the object scale is 2, `_obj modelToWorldWorld [0,1,0]` will be offset **2 meters** from the model center (`[0,0,0]`).","syntaxes":[{"syntax":"obj modelToWorldWorld modelPos","params":[{"name":"obj","type":"Object","type_expr":"Object"},{"name":"modelPos","type":"PositionRelative","type_expr":"PositionRelative"}],"returns":{"type":"PositionASL","type_expr":"PositionASL","description":"the model's centre (see getPosWorld)","text":"PositionASL - **the model's centre** (see getPosWorld)"},"form":"binary","left":{"text":"obj"},"right":{"text":"modelPos"}}],"examples":[{"code":["private _playersFrontWorld = player modelToWorldWorld [0,1,0];"]}],"see_also":["modelToWorldVisualWorld"]},{"name":"modParams","title":"modParams","type":"command","url":"https://community.bistudio.com/wiki/modParams","revid":329409,"updated":"2022-07-27T15:04:52Z","groups":["Mods and Addons"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Returns list of mod parameters according to given options, values are in same order as the given options.","syntaxes":[{"syntax":"modParams [modClass, options]","params":[{"name":"modClass","type":"String","description":"mod classname","type_expr":"String"},{"name":"options","type":"Array of Strings","description":"can be:\n\n| Option | Data Type | Description |\n|---|---|---|\n| `\"name\"` | String | Name to be shown (Arma 3 instead of A3, etc.) |\n| `\"picture\"` | String | Picture shown in Mod Launcher |\n| `\"logo\"` | String | Logo to be shown in Main Menu |\n| `\"logoOver\"` | String | Logo to be shown in Main Menu when mouse is over |\n| `\"logoSmall\"` | String | Small version of logo, prepared for drawing small icons |\n| `\"tooltip\"` | String | Tooltip to be shown on mouse over |\n| `\"tooltipOwned\"` | String | Tooltip to be shown on mouse over the icon when DLC is owned by player |\n| `\"action\"` | String | URL to be triggered when mod button is clicked |\n| `\"actionName\"` | String | What to put on Action Button |\n| `\"overview\"` | String | Overview text visible in expansion menu |\n| `\"hidePicture\"` | Boolean | Do not show mod picture icon in the main menu mod list |\n| `\"hideName\"` | Boolean | Do not show mod name in the main menu mod list |\n| `\"defaultMod\"` | Boolean | Default mods cannot be moved or disabled by Mod Launcher |\n| `\"serverOnly\"` | Boolean | Mod does not have to be installed on client in order to play on server with this mod running |\n| `\"active\"` | Boolean | Active mod (activated through command line or stored in profile by mod launcher)<br>> [!IMPORTANT]<br>> Note that `\"active\"` does not actually tell if a mod is actually running. |","type_expr":"Array<String>"}],"returns":{"type":"Array","type_expr":"Array","description":"retrieved requested data on success or empty array `[]`"},"form":"unary","right":{"text":"[modClass, options]"}}],"examples":[{"code":["_data = modParams [\"Kart\", [\"name\", \"logo\", \"picture\"]];"]}],"see_also":["configSourceModList","configSourceMod"],"notes":[{"user":"Killzone_Kid","date":"2017-04-24T21:25:00Z","text":"This command used to spam .rpt when queried mod didn't exist, making it little awkward to use for testing if mod is active. For example:\n\n```sqf\n_superDuperModEnabled = modParams [\"super_duper\", [\"active\"]] param [0, false];\n```\n\nSince v1.69 the command would fail silently if mod didn't exist, but would still log .rpt error if the mod name passed to the command was empty or there was an error processing one of the passed options."},{"user":"heyoxe","date":"2021-02-26T16:42:00Z","text":"For each value, it will first read the value from the `mod.cpp` file, if the value is not in it (or the files does not exist), it will try to read it from the `CfgMods` entry as long as it has the **exact** same name. If you try to get `\"name\"` and the command cannot find it in either of those locations, it will return the same value as the `modClass` input.\nIn practice, this means that content from user mods will always be read from `mod.cpp` and never from the `CfgMods`."},{"user":"mikero","date":"2021-10-07T16:21:17Z","text":"Later versions of PboProject and its friends with arma as the intended engine, will **never** allow a cfgmods to appear in a pbo. Instead, it will scribble it out to a mod.cpp in the mods\\ folder that this pbo was intended for."}]},{"name":"moonIntensity","title":"moonIntensity","type":"command","url":"https://community.bistudio.com/wiki/moonIntensity","revid":369557,"updated":"2024-09-21T22:26:41Z","groups":["Environment"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Returns the intensity of the moon's brightness in range 0..1.","syntaxes":[{"syntax":"moonIntensity","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_intensity = moonIntensity;"]}],"see_also":["moonPhase","sunOrMoon"]},{"name":"moonPhase","title":"moonPhase","type":"command","url":"https://community.bistudio.com/wiki/moonPhase","revid":377266,"updated":"2026-01-02T06:34:11Z","groups":["Environment"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns the phase of the in-game Moon on the given date.\nAccording to this command, the fullest Moon in Arma 3 at midnight is on `setDate [4804, 7, 13, 0, 0];`.\nUse the Moon Phase Utility to find out a scenario date with desired moon.","syntaxes":[{"syntax":"moonPhase date","params":[{"name":"date","type":"Date","type_expr":"Date"}],"returns":{"type":"Number in 0..1 range","type_expr":"Number","description":"0 = new Moon, 1 = full Moon"},"form":"unary","right":{"text":"date"}}],"examples":[{"code":["private _currentMoonPhase = moonPhase date;"]},{"text":"```sqf\n// Returns array of dates for given year when moon is at its fullest\nfnc_fullMoonDates =\n{\n    private _year = param [0, 2035];\n    private [\"_date\", \"_phase\", \"_fullMoonDate\"];\n    private _fullMoonPhase = 1;\n    private _waxing = false;\n    private _fullMoonDates = [];\n    for \"_i\" from dateToNumber [_year, 1, 1, 0, 0] to dateToNumber [_year, 12, 31, 23, 59] step 1 / 365 do\n    {\n        _date = numberToDate [_year, _i];\n        _phase = moonPhase _date;\n\n        call\n        {\n            if (_phase > _fullMoonPhase) exitWith\n            {\n                _waxing = true;\n                _fullMoonDate = _date;\n            };\n\n            if (_waxing) exitWith\n            {\n                _waxing = false;\n                _fullMoonDates pushBack _fullMoonDate;\n            };\n        };\n\n        _fullMoonPhase = _phase;\n    };\n\n    _fullMoonDates;\n};\n\n//set random full moon date in year 1970\nsetDate selectRandom (1970 call fnc_fullMoonDates);\n```","code":["// Returns array of dates for given year when moon is at its fullest\nfnc_fullMoonDates = \n{\n\tprivate _year = param [0, 2035];\n\tprivate [\"_date\", \"_phase\", \"_fullMoonDate\"];\n\tprivate _fullMoonPhase = 1;\n\tprivate _waxing = false;\n\tprivate _fullMoonDates = [];\n\tfor \"_i\" from dateToNumber [_year, 1, 1, 0, 0] to dateToNumber [_year, 12, 31, 23, 59] step 1 / 365 do\n\t{\n\t\t_date = numberToDate [_year, _i];\n\t\t_phase = moonPhase _date;\n\n\t\tcall\n\t\t{\n\t\t\tif (_phase > _fullMoonPhase) exitWith\n\t\t\t{\n\t\t\t\t_waxing = true;\n\t\t\t\t_fullMoonDate = _date;\n\t\t\t};\n\n\t\t\tif (_waxing) exitWith \n\t\t\t{\n\t\t\t\t_waxing = false;\n\t\t\t\t_fullMoonDates pushBack _fullMoonDate;\n\t\t\t};\n\t\t};\n\n\t\t_fullMoonPhase = _phase;\n\t};\n\n\t_fullMoonDates;\n};\n\n//set random full moon date in year 1970\nsetDate selectRandom (1970 call fnc_fullMoonDates);"]}],"see_also":["moonIntensity","sunOrMoon"]},{"name":"morale","title":"morale","type":"command","url":"https://community.bistudio.com/wiki/morale","revid":337696,"updated":"2023-02-21T11:22:08Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Get the provided unit's current morale level.","syntaxes":[{"syntax":"morale unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"in range -1..+1"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hint format [\"Leader's morale: %1\", morale leader player];"]}],"see_also":["skill","setSkill"],"notes":[{"user":".kju","date":"2020-08-13T10:54:00Z","text":"In Arma 3 probably affects Suppression."}]},{"name":"move","title":"move","type":"command","url":"https://community.bistudio.com/wiki/move","revid":319343,"updated":"2022-05-13T09:23:55Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Let group move to given position. Active waypoints will be ignored when command is used.","syntaxes":[{"syntax":"group move position","params":[{"name":"group","type":"Object or Group","type_expr":"Object | Group"},{"name":"position","type":"Position2D or PositionATL","type_expr":"Position2D | PositionATL"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"position"}}],"examples":[{"code":["_groupOne move position player;"]}],"see_also":["doMove","commandMove","addWaypoint"]},{"name":"move3DENCamera","title":"move3DENCamera","type":"command","url":"https://community.bistudio.com/wiki/move3DENCamera","revid":377459,"updated":"2026-01-02T06:47:27Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Moves the Eden Editor camera.","syntaxes":[{"syntax":"move3DENCamera [position, useOffset]","params":[{"name":"position","type":"PositionASL","description":"new position","type_expr":"PositionASL"},{"name":"useOffset","type":"Boolean","description":"Boolean\n\n- if true the camera will move to the *position*, add the offset defined in `configFile >> \"Cfg3DEN\" >> \"Camera\" >> \"moveOffset\"` and look at the *position*. Default camera offset: `[0, -25, 25]`\n- if false, the camera will be moved to the exact *position*","type_expr":"Boolean","text":"useOffset: Boolean\n\n- if true the camera will move to the *position*, add the offset defined in `configFile >> \"Cfg3DEN\" >> \"Camera\" >> \"moveOffset\"` and look at the *position*. Default camera offset: `[0, -25, 25]`\n- if false, the camera will be moved to the exact *position*"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[position, useOffset]"}}],"examples":[{"code":["move3DENCamera [getPosASL player, true];"]}],"see_also":["get3DENCamera"]},{"name":"moveInAny","title":"moveInAny","type":"command","url":"https://community.bistudio.com/wiki/moveInAny","revid":378826,"updated":"2026-07-02T20:02:58Z","groups":["Unit Control"],"status":"ok","games":{"arma3":"1.18"},"since":"arma3 1.18","arma3_since":"1.18","locality":{"argument":"global","effect":"global"},"description":"Moves unit to the first available seat in the specified vehicle.\n\nThe order of priorities is the same order used in squad command when you order subordinates to get in vehicle to any position and is the same order used in Zeus when you drag units to a vehicle.\n\nSeat assignment seems to use the following priority logic:\ndriver (moveInDriver) → commander (moveInCommander) → gunner (moveInGunner) → turrets (moveInTurret) → cargo (moveInCargo).\n\n> [!IMPORTANT]\n> If the unit is already in a vehicle, nothing will happen. You should use moveOut to move the unit out of his vehicle before trying to move him into a new (or same) vehicle.\n\n> [!NOTE]\n> This command will move player into the locked vehicle or seat just as well.","syntaxes":[{"syntax":"unit moveInAny vehicle","params":[{"name":"unit","type":"Object","description":"person","type_expr":"Object"},{"name":"vehicle","type":"Object","description":"transport","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success, false on failure"},"form":"binary","left":{"text":"unit"},"right":{"text":"vehicle"}},{"syntax":"unit moveInAny [vehicle, positions, ignoreLocked]","since":"arma3 2.22","params":[{"name":"unit","type":"Object","description":"person","type_expr":"Object"},{"name":"vehicle","type":"Object","description":"transport","type_expr":"Object"},{"name":"positions","type":"Array of Strings","description":"array of positions to check and in which order. Positions are (in default order):\n\n- \"DRIVER\" - driver\n- \"COMMANDER\" - commander turret (turret configured as commander)\n- \"GUNNER\" - gunner turret (turret configured as gunner)\n- \"TURRET\" - other turrets incl. FFV but excl. gunner or commander turret\n- \"CARGO\" - cargo seats excl. FFV\n\nWhen empty array [] is given, all positions in default order (same as in the main syntax) will be considered; see also emptyPositions","type_expr":"Array<String>"},{"name":"ignoreLocked","type":"Boolean","optional":true,"default":"false","description":"true to ignore locked positions","type_expr":"Boolean","text":"ignoreLocked: Boolean - (Optional, default false) true to ignore locked positions"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success, false on failure"},"form":"binary","left":{"text":"unit"},"right":{"text":"[vehicle, positions, ignoreLocked]"}}],"examples":[{"code":["player moveInAny tank;"]},{"code":["player moveInAny [tank, [\"CARGO\", \"TURRET\"]]; // checks free cargo position, if not available, checks free turret next"]}],"see_also":["moveInDriver","moveInCommander","moveInGunner","moveInTurret","moveInCargo","emptyPositions"]},{"name":"moveInCargo","title":"moveInCargo","type":"command","url":"https://community.bistudio.com/wiki/moveInCargo","revid":351994,"updated":"2024-02-01T23:23:57Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Moves a unit into a vehicle cargo position (immediately and without animation).\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.\n\n> [!IMPORTANT]\n> If the unit is already in a vehicle, nothing will happen. You should use moveOut to move the unit out of his vehicle before trying to move him into a new (or same) vehicle.","syntaxes":[{"syntax":"unit moveInCargo vehicle","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"vehicle"}},{"syntax":"unit moveInCargo [vehicle, cargoIndex, canReassign]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"cargoIndex","type":"Number","type_expr":"Number"},{"name":"canReassign","type":"Boolean","optional":true,"default":"true","description":"try to move *unit* into the first free *vehicle* cargo seat if *cargoIndex* is already occupied","type_expr":"Boolean","since":"arma3 2.08","text":"canReassign: Boolean - (Optional, default true) try to move *unit* into the first free *vehicle* cargo seat if *cargoIndex* is already occupied"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[vehicle, cargoIndex, canReassign]"}}],"examples":[{"code":["_soldierOne moveInCargo _jeepOne;"]},{"code":["_soldierOne moveInCargo [_jeepOne, 1];"]}],"multiplayer":"> [!NOTE]\n> The command should execute where the **unit** (not **vehicle**) is local.","see_also":["moveInAny","moveInCommander","moveInDriver","moveInGunner","moveInTurret","assignAsCargo","assignAsCommander","assignAsDriver","assignAsGunner","getCargoIndex"],"notes":[{"user":"Hardrock","date":"2006-08-04T14:42:00Z","text":"*Notes from before the conversion*\nIf you place a soldier in a vehicle with the moveInCargo command, he wont \"know\" he's in the vehicle, and thus he won't disembark properly when the vehicle reaches a Transport Unload waypoint.\nTherefore you have to use the assignAsCargo command, in order for the AI to catch on. Something like this:\n\n```sqf\n_soldier moveInCargo helo1; _soldier assignAsCargo helo1;\n```"},{"user":"Ceeeb","date":"2007-02-02T07:00:00Z","text":"In **OFP v1.96**, the moveIn commands will not trigger an associated getIn event. To ensure the getIn event is fired, use the \"getIn Cargo\" action command."},{"user":"Killzone_Kid","date":"2014-03-18T19:08:00Z","text":"In Arma 3 when using the alternative syntax of moveInCargo, it is necessary to call assignAsCargoIndex because it is not called automatically.\n\n```sqf\nunit1 moveInCargo [heli, 3];\nunit1 assignAsCargoIndex [heli, 3];\n```\n\nAlternatively avoid this broken syntax all together and use:\n\n```sqf\nunit1 assignAsCargoIndex [heli, 3];\nunit1 moveInCargo heli;\n```"}]},{"name":"moveInCommander","title":"moveInCommander","type":"command","url":"https://community.bistudio.com/wiki/moveInCommander","revid":352017,"updated":"2024-02-01T23:24:06Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Move soldier into vehicle commander position (Immediate, no animation).\n\n> [!IMPORTANT]\n> If the unit is already in a vehicle, nothing will happen. You should use moveOut to move the unit out of his vehicle before trying to move him into a new (or same) vehicle.","syntaxes":[{"syntax":"unitName moveInCommander vehicle","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"vehicle"}}],"examples":[{"code":["_soldierOne moveInCommander _tankOne;"]}],"see_also":["moveInAny","moveInCargo","moveInDriver","moveInGunner","moveInTurret","assignAsCargo","assignAsCommander","assignAsDriver","assignAsGunner"],"notes":[{"user":"Ceeeb","date":"2007-02-02T07:01:00Z","text":"In **OFP v1.96**, the moveIn commands will not trigger an associated getIn event. To ensure the getIn event is fired, use the \"getIn Commander\" action command."}]},{"name":"moveInDriver","title":"moveInDriver","type":"command","url":"https://community.bistudio.com/wiki/moveInDriver","revid":363679,"updated":"2024-04-16T14:31:18Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Moves soldier into vehicle driver position (immediate, no animation).\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.\n\n> [!IMPORTANT]\n> If the unit is already in a vehicle, nothing will happen unless moveOut (since Arma 2) is used first to move the unit out of their vehicle (see Example 2).","syntaxes":[{"syntax":"unit moveInDriver vehicle","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"vehicle"}}],"examples":[{"code":["_soldierOne moveInDriver _tankOne;"]},{"text":"```sqf\nif (not isNull vehicle player) then\n{\n    moveOut player;\n};\n\nplayer moveInDriver _myTruck;\n```","code":["if (not isNull vehicle player) then\n{\n\tmoveOut player;\n};\n\nplayer moveInDriver _myTruck;"]}],"multiplayer":"*unit* must be local, while the vehicle's locality does not matter.","see_also":["moveInAny","moveInCargo","moveInCommander","moveInGunner","moveInTurret","assignAsCargo","assignAsCommander","assignAsDriver","assignAsGunner","isTurnedOut"],"notes":[{"user":"Ceeeb","date":"2007-02-02T06:02:00Z","text":"In **OFP v1.96**, the moveIn commands will not trigger an associated getIn event.\nTo ensure the getIn event is fired, use the \"getIn Driver\" action command."}]},{"name":"moveInGunner","title":"moveInGunner","type":"command","url":"https://community.bistudio.com/wiki/moveInGunner","revid":378020,"updated":"2026-01-22T17:04:27Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Move the unit into vehicle gunner position (immediate, no animation).\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.\n\n> [!IMPORTANT]\n> If the unit is already in a vehicle, nothing will happen.\n> You should use moveOut to move the unit out of his vehicle before trying to move him into a new (or same) vehicle.","syntaxes":[{"syntax":"unitName moveInGunner vehicle","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"vehicle"}}],"examples":[{"code":["soldierOne moveInGunner tankOne;"]}],"see_also":["moveInAny","moveInCargo","moveInCommander","moveInDriver","moveInTurret","assignAsCargo","assignAsCommander","assignAsDriver","assignAsGunner"],"notes":[{"user":"Ceeeb","date":"2007-02-02T06:02:00Z","text":"In **OFP v1.96**, the moveIn commands will not trigger an associated getIn event.\nTo ensure the getIn event is fired, use the \"getIn Gunner\" action command."}]},{"name":"moveInTurret","title":"moveInTurret","type":"command","url":"https://community.bistudio.com/wiki/moveInTurret","revid":377492,"updated":"2026-01-02T06:49:15Z","groups":["Turrets"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Moves the soldier into the vehicle's turret. (Immediately, without animation).\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.\n\n> [!IMPORTANT]\n> If the unit is already in a vehicle, nothing will happen. You should use moveOut to move the unit out of his vehicle before trying to move him into a new (or same) vehicle.","syntaxes":[{"syntax":"unitName moveInTurret [vehicle, turretPath]","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"[vehicle, turretPath]"}}],"examples":[{"code":["_soldierOne moveInTurret [_tank, [0, 0]];"]}],"see_also":["allTurrets","fullCrew","assignAsTurret","moveInAny","moveInCargo","moveInCommander","moveInDriver","moveInGunner","assignAsCargo","assignAsCommander","assignAsDriver","assignAsGunner","ArmA: Actions"],"notes":[{"user":"Kronzky","date":"2008-03-06T20:31:00Z","text":"To find out which turrets are available on a vehicle (**edit:** before allTurrets), and what the syntax is, you can use [this little script](http://kronzky.info/turrets/index.htm)."},{"user":"hcpookie","date":"2014-02-13T01:56:00Z","text":"Examples for nested turrets:\n\nMainTurret =\n\n```sqf\n_soldierOne moveInTurret [_tank, [0]];\n```\n\nCommanderTurret =\n\n```sqf\n_soldierOne moveInTurret [_tank, [0, 0]];\n```\n\n... where:\n\nMainTurret is the standard BIS MainTurret... e.g:\n\n```cpp\nclass Turrets\n{\n    class MainTurret {};\n};\n```\n\nCommanderTurret is the standard BIS CommanderTurret located on the MainTurret... e.g:\n\n```cpp\nclass Turrets\n{\n    class MainTurret\n    {\n        class Turrets\n        {\n            class CommanderTurret {};\n        };\n    };\n};\n```"},{"user":"Killzone_Kid","date":"2014-03-19T00:07:00Z","text":"Here is a small function to find available *turret paths* for a given vehicle. It will only search 2 levels deep, hence called *commonTurrets*:\n\n```sqf\nKK_fnc_commonTurrets = {\n    private [\"_arr\",\"_trts\"];\n    _arr = [];\n    _trts = configFile / \"CfgVehicles\" / typeOf _this / \"Turrets\";\n    for \"_i\" from 0 to count _trts - 1 do {\n        _arr set [count _arr, [_i]];\n        for \"_j\" from 0 to count (\n            _trts / configName (_trts select _i) / \"Turrets\"\n        ) - 1 do {\n            _arr set [count _arr, [_i, _j]];\n        };\n    };\n    _arr\n};\n```\n\nExample call:\n\n```sqf\nhint str (vehicle player call KK_fnc_commonTurrets); // [[0],[0,0]]\n```\n\nSee also allTurrets"}]},{"name":"moveObjectToEnd","title":"moveObjectToEnd","type":"command","url":"https://community.bistudio.com/wiki/moveObjectToEnd","revid":363294,"updated":"2024-03-26T10:52:01Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Shifts an editor object to the end of the objects array. This means,that the object will be drawn last (after all other objects).\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map moveObjectToEnd object","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"object","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"object"}}],"examples":[{"text":"-"}]},{"name":"moveOut","title":"moveOut","type":"command","url":"https://community.bistudio.com/wiki/moveOut","revid":349641,"updated":"2023-11-16T22:02:40Z","groups":["Unit Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Moves the soldier out of the vehicle.\n\nNotes:\n\n- Works for both AI and player entities\n- AI unit gets back in - unless is under player command or combined with other sqf commands (orderGetIn false, allowGetIn false or leaveVehicle)\n- Respects the vehicle's lock state (same as action \"Eject\") - unlike doGetOut, commandGetOut. It will work for player entities regardless though\n- Still executes when the vehicle is moving/flying (same as action \"Eject\") - unlike doGetOut, commandGetOut\n- Without vehicle's position's get out animation - unlike action eject, doGetOut, commandGetOut\n- Immediately - unlike action eject, doGetOut, commandGetOut\n- Works also on dead units (same as action \"Eject\" (but one after another)) - unlike doGetOut, commandGetOut\n- Does not work for UAV crew\n- Does not work for remoteControlled units\n- Works on unconscious (same as action \"Eject\" (but one after another)) - unlike doGetOut, commandGetOut (unless AI under player command)","syntaxes":[{"syntax":"moveOut soldier","params":[{"name":"soldier","type":"Object","description":"unit (only a living unit before Arma 3 v2.06)","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"soldier"}},{"syntax":"soldier moveOut vehicle","since":"arma3 2.06","params":[{"name":"soldier","type":"Object","description":"unit","type_expr":"Object"},{"name":"vehicle","type":"Object","description":"vehicle could be objNull, in this case the command is identical to the main syntax.","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"soldier"},"right":{"text":"vehicle"}}],"examples":[{"code":["{ if (lifeState _x == \"UNCONSCIOUS\") then { moveOut _x } } forEach crew cursorTarget;"]},{"text":"Move out player just before he dies:\n\n```sqf\nplayer addEventHandler [\n    \"HandleDamage\",\n    format [\n        'if (switch (_this select 1) do {\n            case \"\": { _this select 2 >= 1 };\n            case \"head\": {_this select 2 >= %1};\n            case \"body\": {_this select 2 >= %2};\n            default {false};\n        }) then {moveOut player}',\n        getNumber (configFile >> \"CfgFirstAid\" >> \"CriticalHeadHit\"),\n        getNumber (configFile >> \"CfgFirstAid\" >> \"CriticalBodyHit\")\n    ]\n];\n```","code":["player addEventHandler [\n\t\"HandleDamage\", \n\tformat [\n\t\t'if (switch (_this select 1) do {\n\t\t\tcase \"\": { _this select 2 >= 1 };\n\t\t\tcase \"head\": {_this select 2 >= %1};\n\t\t\tcase \"body\": {_this select 2 >= %2};\n\t\t\tdefault {false};\n\t\t}) then {moveOut player}',\n\t\tgetNumber (configFile >> \"CfgFirstAid\" >> \"CriticalHeadHit\"),\n\t\tgetNumber (configFile >> \"CfgFirstAid\" >> \"CriticalBodyHit\")\n\t]\n];"]}],"see_also":["Arma 3: Actions","doGetOut","commandGetOut","leaveVehicle","moveInDriver","moveInGunner","moveInCommander","moveInTurret","moveInCargo","isTurnedOut"],"notes":[{"user":".kju","date":"2020-08-07T08:53:00Z","text":"This seems no longer true in Arma 3:\n*Does not work on dead crew - Use setPos family of commands to move dead units out soon after they became dead. After awhile dead unit's group becomes grpNull and it cannot be moved out at all.*"}]},{"name":"moveTarget","title":"moveTarget","type":"command","url":"https://community.bistudio.com/wiki/moveTarget","revid":377512,"updated":"2026-01-02T06:50:18Z","groups":["Broken Commands"],"status":"broken","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Change information about a target.","syntaxes":[{"syntax":"target moveTarget [position, typeAccuracy, posAccuracy]","params":[{"name":"target","type":"Target","type_expr":"Target"},{"name":"position","type":"Position","type_expr":"Position"},{"name":"typeAccuracy","type":"Number","type_expr":"Number"},{"name":"posAccuracy","type":"Number","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"target"},"right":{"text":"[position, typeAccuracy, posAccuracy]"}}],"examples":[{"code":["_moved = _target moveTarget [position player, 1, 1];"]}],"problems":"> [!WARNING]\n> This command is not implemented.","see_also":["createTarget","deleteTarget"]},{"name":"moveTime","title":"moveTime","type":"command","url":"https://community.bistudio.com/wiki/moveTime","revid":310173,"updated":"2022-05-05T13:10:28Z","groups":["Animations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the current time of the most important RTM animation currently being played on the soldier.","syntaxes":[{"syntax":"moveTime soldier","params":[{"name":"soldier","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"soldier"}}],"examples":[{"code":["moveTime player;"]}]},{"name":"moveTo","title":"moveTo","type":"command","url":"https://community.bistudio.com/wiki/moveTo","revid":379452,"updated":"2026-10-31T00:08:24Z","groups":["Unit Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Low level command to person to move to given position. It is good to check first if AI pilot unit state is COMPLETED moveToCompleted first as this command will set unit into WAIT state waiting for instruction, but only if the unit has COMPLETED.","syntaxes":[{"syntax":"unit moveTo position","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"position","type":"PositionATL","type_expr":"PositionATL"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"position"}}],"examples":[{"code":["_myAgent moveTo getPosATL player;"]}],"see_also":["doMove","commandMove","setDestination","move","moveToCompleted","moveToFailed","addWaypoint"],"notes":[{"user":"Rübe","date":"2010-08-14T05:44:00Z","text":"moveTo is a low-level command used in FSM called with doFSM or commandFSM. See doFSM for more information about this. Use doMove everywhere else - even in FSM executed with execFSM."}]},{"name":"moveToCompleted","title":"moveToCompleted","type":"command","url":"https://community.bistudio.com/wiki/moveToCompleted","revid":369921,"updated":"2024-10-19T12:27:30Z","groups":["Unit Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Check if latest low level moveTo command is finished. Returns true if given AI pilot unit state == COMPLETED","syntaxes":[{"syntax":"moveToCompleted person","params":[{"name":"person","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"person"}}],"examples":[{"code":["_isCompleted = moveToCompleted _unit;"]}],"see_also":["moveTo","moveToFailed"],"notes":[{"user":"DreadedEntity","date":"2022-04-02T20:31:47Z","text":"This command can also check the status of doMove and commandMove (A3 2.08.149102)\nThis is handy to make your script wait until a unit has moved to some position:\n\n```sqf\nwaitUntil {moveToCompleted _unit};\n```"}]},{"name":"moveToFailed","title":"moveToFailed","type":"command","url":"https://community.bistudio.com/wiki/moveToFailed","revid":369920,"updated":"2024-10-19T12:26:25Z","groups":["Unit Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Check if latest low level moveTo command failed.","syntaxes":[{"syntax":"moveToFailed unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"NOT IMPLEMENTED, ALWAYS false"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _hasFailed = moveToFailed _unit;"]}],"see_also":["moveTo","moveToCompleted"]},{"name":"musicVolume","title":"musicVolume","type":"command","url":"https://community.bistudio.com/wiki/musicVolume","revid":376980,"updated":"2026-01-01T06:16:13Z","groups":["Sounds"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the current music volume (set by fadeMusic)","syntaxes":[{"syntax":"musicVolume","params":[],"returns":{"type":"Number","type_expr":"Number","description":"in range 0..5","text":"Number in range 0..5"},"form":"nullary"}],"examples":[{"code":["hint str musicVolume;"]}],"see_also":["fadeMusic","soundVolume","radioVolume","speechVolume","environmentVolume","getAudioOptionVolumes"]},{"name":"name","title":"name","type":"command","url":"https://community.bistudio.com/wiki/name","revid":373980,"updated":"2025-07-10T15:43:22Z","groups":["Unit Identity","Locations"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"When argument is Object, the command returns the name given to a unit using the setIdentity instruction or selected randomly by the game engine if setIdentity has not been used on the unit.\nIf used on vehicle, name of first crew member (in order commander, driver, gunner). If used on an object, \"Error: No unit\" is being returned.","syntaxes":[{"syntax":"name object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"object"}},{"syntax":"name location","since":"arma1 1.08","params":[{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"String","type_expr":"String","description":"the location's name. To get its textual value, use text (see Example 3)","text":"String - the location's *name*. To get its textual value, use text (see Example 3)"},"form":"unary","right":{"text":"location"}},{"syntax":"name namespace","since":"arma3 2.18","params":[{"name":"namespace","type":"Namespace","type_expr":"Namespace"}],"returns":{"type":"String","type_expr":"String","description":"namespace's name. Possible values:\n- \"mission\" - for missionNamespace - \"profile\" - for profileNamespace - \"ui\" - for uiNamespace - \"parsing\" - for parsingNamespace - \"local\" - for localNamespace - \"missionprofile\" - for missionProfileNamespace - \"server\" - for serverNamespace - \"\" - for some unnamed namespaces like temporary or server config for example. - \"null\" - null namespace (this should never happen)","text":"String - namespace's *name*. Possible values:\n\n- \"mission\" - for missionNamespace\n- \"profile\" - for profileNamespace\n- \"ui\" - for uiNamespace\n- \"parsing\" - for parsingNamespace\n- \"local\" - for localNamespace\n- \"missionprofile\" - for missionProfileNamespace\n- \"server\" - for serverNamespace\n- \"\" - for some unnamed namespaces like temporary or server config for example.\n- \"null\" - null namespace (this should never happen)"},"form":"unary","right":{"text":"namespace"}},{"syntax":"name scriptHandle","since":"arma3 2.22","params":[{"name":"scriptHandle","type":"Script Handle","type_expr":"Script Handle"}],"returns":{"type":"String","type_expr":"String","description":"The name given to the script via scriptName or the name passed to spawn when creating a \"Empty Handle\""},"form":"unary","right":{"text":"scriptHandle"}}],"examples":[{"code":["_name = name player;"]},{"code":["_locationName = name myLocation;"]},{"code":["name nearestLocation [position player, \"Hill\"]; // \"\"\ntext nearestLocation [position player, \"Hill\"]; // \"Lesnoy Khrebet\""]},{"code":["_currentNamespace = name currentNamespace;"]}],"multiplayer":"name returns profileName, eventually suffixed by the server in the event of identical names, e.g `username`/`username (2)`.","problems":"> [!IMPORTANT]\n> If the provided unit is dead and has been removed from its group, its identity has then been purged to save memory and using name on it will result in a logged error.","see_also":["profileName","setName","setIdentity","nameSound","setNameSound","createLocation","deleteLocation","locationPosition","nearestLocation","nearestLocations","nearestLocationWithDubbing"],"notes":[{"user":"Kju","date":"2017-01-30T19:42:00Z","text":"Location variant appears to be only for the 3d editor."},{"user":"Alef","date":"2009-04-14T01:41:00Z","text":"Will return `Error: No vehicle` for JIP players in init.sqf, if no sleep were performed."}]},{"name":"namedProperties","title":"namedProperties","type":"command","url":"https://community.bistudio.com/wiki/namedProperties","revid":338564,"updated":"2023-03-20T14:40:54Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns a list of named properties on Geometry LOD.","syntaxes":[{"syntax":"namedProperties object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Arrays of Strings","type_expr":"Array<Array<String>>","description":"in format: [[namedProperty1, propertyValue1], [namedProperty2, propertyValue2], ...]","text":"Array of Arrays of Strings, in format: [[namedProperty1, propertyValue1], [namedProperty2, propertyValue2], ...]"},"form":"unary","right":{"text":"object"}},{"syntax":"object namedProperties [LOD]","since":"arma3 2.14","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"LOD","type":"String or Number","description":"can be one of:\n\n- `\"Memory\"`\n- `\"Geometry\"`\n- `\"FireGeometry\"`\n- `\"LandContact\"`\n- `\"HitPoints\"`\n- `\"ViewGeometry\"`\n\nWhen Number is used, command searches for a LOD with the similar LOD resolution","type_expr":"String | Number"}],"returns":{"type":"HashMap","type_expr":"HashMap"},"form":"binary","left":{"text":"object"},"right":{"text":"[LOD]"}}],"examples":[{"code":["private _properties = namedProperties _object; // [[\"sbsource\",\"shadowvolume\"],[\"prefershadowvolume\",\"1\"],[\"reversed\",\"1\"],[\"buoyancy\",\"1\"]]"]},{"code":["private _namedProperties = cursorObject namedProperties [\"FireGeometry\"];"]}],"see_also":["selectionNames","animationNames","Arma 3: Named Properties","allLODs"]},{"name":"nameSound","title":"nameSound","type":"command","url":"https://community.bistudio.com/wiki/nameSound","revid":310222,"updated":"2022-05-05T13:10:49Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.02"},"since":"arma3 1.02","arma3_since":"1.02","description":"Returns the nameSound of a person.","syntaxes":[{"syntax":"nameSound person","params":[{"name":"person","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"person"}}],"examples":[{"code":["nameSound player;"]}],"see_also":["setNameSound","name","setName"]},{"name":"nearEntities","title":"nearEntities","type":"command","url":"https://community.bistudio.com/wiki/nearEntities","revid":377403,"updated":"2026-01-02T06:44:59Z","groups":["Object Detection"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Finds entities inside a sphere with the given radius. If the alternative syntax is used, only entities of given types or subtypes are listed.\nEntities returned are not sorted by distance.\n\nThe main syntax does not return dead entities or entities inside vehicles. If you need to return those, use the alternative syntax (with *includeCrew* set to true) or the entities command.\n\n> [!NOTE]\n> This command is much faster than nearestObjects for on-foot soldier and vehicle detection.","syntaxes":[{"syntax":"position nearEntities radius","params":[{"name":"position","type":"Object or PositionAGL or Position2D","description":"search centre","type_expr":"Object | PositionAGL | Position2D"},{"name":"radius","type":"Number","description":"radius of the sphere","type_expr":"Number"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"not sorted"},"form":"binary","left":{"text":"position"},"right":{"text":"radius"}},{"syntax":"position nearEntities [type, radius]","params":[{"name":"position","type":"Object or PositionAGL or Position2D","description":"search centre","type_expr":"Object | PositionAGL | Position2D"},{"name":"type","type":"String or Array of Strings","description":"type(s) to search for. See isKindOf","type_expr":"String | Array<String>"},{"name":"radius","type":"Number","description":"radius of the sphere","type_expr":"Number"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"not sorted"},"form":"binary","left":{"text":"position"},"right":{"text":"[type, radius]"}},{"syntax":"area nearEntities [types, matchExactType, aliveOnly, includeCrew]","since":"arma3 2.18","params":[{"name":"area","type":"String, Object or Array:","description":"String, Object or Array:\n\n- String - marker name\n- Object - trigger\n- Array - format [center, a, b, angle, isRectangular, c] or Arma 3 v2.22 [center, a, b, angle, isRectangular, c, usePosWorld] (see inArea)","type_expr":"String | Object | Array","text":"area: String, Object or Array:\n\n- String - marker name\n- Object - trigger\n- Array - format [center, a, b, angle, isRectangular, c] or Arma 3 v2.22 [center, a, b, angle, isRectangular, c, usePosWorld] (see inArea)"},{"name":"types","type":"Array of Strings","description":"type(s) to search for or [] empty array to return every type","type_expr":"Array<String>"},{"name":"matchExactType","type":"Boolean","optional":true,"default":"false","description":"true for an exact type match, false for an isKindOf match","type_expr":"Boolean","text":"matchExactType: Boolean - (Optional, default false) true for an exact type match, false for an isKindOf match"},{"name":"aliveOnly","type":"Boolean","optional":true,"default":"true","description":"true to ignore dead entities, false to include them","type_expr":"Boolean","text":"aliveOnly: Boolean - (Optional, default true) true to ignore dead entities, false to include them"},{"name":"includeCrew","type":"Boolean","optional":true,"default":"false","description":"true to include crew of vehicles in search","type_expr":"Boolean","text":"includeCrew: Boolean - (Optional, default false) true to include crew of vehicles in search"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"not sorted"},"form":"binary","left":{"text":"area"},"right":{"text":"[types, matchExactType, aliveOnly, includeCrew]"}}],"examples":[{"code":["_list = player nearEntities 20;\n_list = ASLToAGL getPosASL player nearEntities 50;\n_list = player nearEntities [\"Man\", 1000];\n_list = ASLToAGL getPosASL player nearEntities [\"LaserTarget\", 3000];\n_list = player nearEntities [[\"Car\", \"Motorcycle\", \"Tank\"], 50];\n_list = ASLToAGL getPosASL player nearEntities [[\"Man\", \"Air\", \"Car\", \"Motorcycle\", \"Tank\"], 200];"]}],"see_also":["entities","findNearestEnemy","nearestBuilding","nearestObject","nearestObjects","nearObjects","nearestLocation","nearTargets","nearSupplies","nearestLocationWithDubbing","nearObjectsReady","nearRoads","nearestMines"]},{"name":"nearestBuilding","title":"nearestBuilding","type":"command","url":"https://community.bistudio.com/wiki/nearestBuilding","revid":377548,"updated":"2026-01-02T06:54:43Z","groups":["Object Detection"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Finds the nearest building to a given object or position. A \"building\" is defined as an object that is of class \"House\" and contains a path LOD.","syntaxes":[{"syntax":"nearestBuilding position","params":[{"name":"position","type":"Object or Position2D or PositionAGL","type_expr":"Object | Position2D | PositionAGL"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"position"}}],"examples":[{"code":["_nBuilding = nearestBuilding player;"]},{"code":["_nBuilding = nearestBuilding position player;"]}],"see_also":["buildingPos","nearestObject","nearestObjects","nearObjects","nearestLocation","nearEntities","nearTargets","nearSupplies","nearestLocationWithDubbing","nearObjectsReady","nearRoads","nearestMines"],"notes":[{"user":"Pierre MGI","date":"2016-02-18T20:18:00Z","text":"This command doesn't return any house or building placed in editor (with createVehicle). Use nearestObjects instead:\n\n```sqf\nnearestObjects [player, [\"House\", \"Building\"], 50] select 0\n```"},{"user":"Tankbuster","date":"2020-12-30T16:04:00Z","text":"Some large buildings are not found by this command. \"Land_Airport_Tower_F\", \"Land_Offices_01_V1_F\" and \"Land_Hotel_02_F\" are examples."}]},{"name":"nearestLocation","title":"nearestLocation","type":"command","url":"https://community.bistudio.com/wiki/nearestLocation","revid":377409,"updated":"2026-01-02T06:45:10Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Return the closest location of specified class to a given position. Checked range is unlimited (i.e. covers the whole map).\n\n> [!NOTE]\n> Although locations can be placed in 3D with setPosition, nearestLocations search is conducted in 2D.","syntaxes":[{"syntax":"nearestLocation [position, locationType, maxDistance]","params":[{"name":"position","type":"Object or PositionAGL or Position2D","type_expr":"Object | PositionAGL | Position2D"},{"name":"locationType","description":"String of a location class name. If \"\" is supplied, any nearest location is returned. Since Arma 3 2.14 locationType could be an Array of location types. See Location Types","type_expr":"String","text":"locationType: String of a location class name. If \"\" is supplied, any nearest location is returned. Since Arma 3 2.14 locationType could be an Array of location types. See Location Types"},{"name":"maxDistance","type":"Number","optional":true,"description":"max search radius. Default - unlimited range.","type_expr":"Number","since":"arma3 2.14","text":"maxDistance: Number - (Optional) max search radius. Default - unlimited range."}],"returns":{"type":"Location","type_expr":"Location"},"form":"unary","right":{"text":"[position, locationType, maxDistance]"}}],"examples":[{"code":["_nearestCity = nearestLocation [getPos player, \"nameCity\"];"]},{"code":["_anyNearestLocation = nearestLocation [player, \"\"];"]}],"see_also":["findNearestEnemy","nearestBuilding","nearestObject","nearestObjects","nearObjects","nearEntities","nearTargets","nearSupplies","nearestLocationWithDubbing","nearObjectsReady","nearRoads","Location","locationPosition","nearestLocations","createLocation","nearestMines"]},{"name":"nearestLocations","title":"nearestLocations","type":"command","url":"https://community.bistudio.com/wiki/nearestLocations","revid":377540,"updated":"2026-01-02T06:54:27Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Returns an array of locations of chosen type(s) within the given radius of the given position, sorted from nearest to farthest.\n\n> [!NOTE]\n> Although locations can be placed in 3D with setPosition, nearestLocations' search result is sorted in 2D.","syntaxes":[{"syntax":"nearestLocations [centre, locationTypes, radius, sortPosition]","params":[{"name":"centre","type":"Position2D, Position3D or Object","type_expr":"Position2D | Position3D | Object"},{"name":"locationTypes","type":"Array of Strings","description":"list of location type names, e.g \"NameCity\"; Arma 3 v2.14 passing empty array [] will return all available locations within the radius","type_expr":"Array<String>"},{"name":"radius","type":"Number","description":"maximum distance from the given position that returned locations may be, in metres","type_expr":"Number"},{"name":"sortPosition","type":"Position2D, Position3D or Object","optional":true,"description":"results will be sorted from the distance to given *sortPosition* (nearest to farthest still)","type_expr":"Position2D | Position3D | Object","text":"sortPosition: Position2D, Position3D or Object - (Optional) results will be sorted from the distance to given *sortPosition* (nearest to farthest still)"}],"returns":{"type":"Array of Locations","type_expr":"Array<Location>"},"form":"unary","right":{"text":"[centre, locationTypes, radius, sortPosition]"}}],"examples":[{"code":["_nearbyLocations = nearestLocations [getPosATL player, [\"RockArea\", \"VegetationFir\"], 100];"]},{"text":"Find any of nearest locations:\n\n```sqf\nprivate _allLocationTypes = [];\n\"_allLocationTypes pushBack configName _x\" configClasses (configFile >> \"CfgLocationTypes\");\n{\n    systemChat format [\n        \"%1 (%2) - %3m\",\n        _x,\n        text _x,\n        getPosATL player distance _x\n    ];\n} forEach nearestLocations [player, _allLocationTypes, 500];\n```","code":["private _allLocationTypes = [];\n\"_allLocationTypes pushBack configName _x\" configClasses (configFile >> \"CfgLocationTypes\");\n{\n\tsystemChat format [\n\t\t\"%1 (%2) - %3m\", \n\t\t_x, \n\t\ttext _x, \n\t\tgetPosATL player distance _x\n\t];\n} forEach nearestLocations [player, _allLocationTypes, 500];"]}],"see_also":["createLocation","nearestLocation","locationPosition","nearestLocationWithDubbing"]},{"name":"nearestLocationWithDubbing","title":"nearestLocationWithDubbing","type":"command","url":"https://community.bistudio.com/wiki/nearestLocationWithDubbing","revid":379228,"updated":"2026-10-30T23:00:51Z","groups":["Locations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Find the nearest location having a non-empty speech.\n\n> [!NOTE]\n> **Arma 3:** No locations are dubbed in Arma 3.","syntaxes":[{"syntax":"nearestLocationWithDubbing position","params":[{"name":"position","type":"PositionAGL or Position2D","type_expr":"PositionAGL | Position2D"}],"returns":{"type":"Location","type_expr":"Location"},"form":"unary","right":{"text":"position"}}],"examples":[{"code":["_location = nearestLocationWithDubbing ASLToAGL getPosASL player;"]},{"code":["_location = nearestLocationWithDubbing getMarkerPos \"myMarker\";"]}],"see_also":["findNearestEnemy","nearestBuilding","nearestObject","nearestObjects","nearObjects","nearestLocation","nearEntities","nearTargets","nearSupplies","nearObjectsReady","nearRoads","nearestMines"]},{"name":"nearestMines","title":"nearestMines","type":"command","url":"https://community.bistudio.com/wiki/nearestMines","revid":377408,"updated":"2026-01-02T06:45:08Z","groups":["Object Detection"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns a list of nearest mines of the given types to the given position or object, within the specified distance.\nIf more than one mine are found they will be ordered by proximity by default, the closest one will be first in the array. The sorting can be turned off.","syntaxes":[{"syntax":"nearestMines [position, types, radius, sort, 2Dmode]","params":[{"name":"position","type":"Object or PositionAGL or Position2D","description":"search position centre","type_expr":"Object | PositionAGL | Position2D"},{"name":"types","type":"Array","description":"list of class name of the objects to search for (uses isKindOf comparison instead of direct class name == comparison). Use an empty array `[]` to search for all classes","type_expr":"Array"},{"name":"radius","type":"Number","description":"search range","type_expr":"Number"},{"name":"sort","type":"Boolean","optional":true,"default":"true","description":"true to sort the results closest first, false to turn off sorting","type_expr":"Boolean","text":"sort: Boolean - (Optional, default true) true to sort the results closest first, false to turn off sorting"},{"name":"2Dmode","type":"Boolean","optional":true,"default":"false","description":"true for 2D distance, false for 3D distance comparison","type_expr":"Boolean","text":"2Dmode: Boolean - (Optional, default false) true for 2D distance, false for 3D distance comparison"}],"returns":{"type":"Array","type_expr":"Array","description":"found mines as array of Objects"},"form":"unary","right":{"text":"[position, types, radius, sort, 2Dmode]"}}],"examples":[{"code":["nearestMines [player, [\"MineBase\"], 20];"]},{"code":["nearestMines [position player, [\"DirectionalBombBase\"], 500, true];"]},{"code":["nearestMines [[2716,2949,0], [\"APERSTripMine_Wire_Ammo\", \"APERSMine_Range_Ammo\"], 100, false, true];"]},{"text":"Return every mine in 50 metres radius around player sorted by distance:\n\n```sqf\nnearestMines [player, [], 50];\n```","code":["nearestMines [player, [], 50];"]}],"see_also":["nearestTerrainObjects","findNearestEnemy","nearestBuilding","nearestObject","nearObjects","nearestLocation","nearEntities","nearTargets","nearSupplies","nearestLocationWithDubbing","nearObjectsReady","nearRoads","nearestObjects"]},{"name":"nearestObject","title":"nearestObject","type":"command","url":"https://community.bistudio.com/wiki/nearestObject","revid":377544,"updated":"2026-01-02T06:54:36Z","groups":["Object Detection"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the nearest object of given type (or inherited classes) to given position within a sphere. Hardcoded radius is 50 meters.\nUnlike with nearestObjects, where distance is measured in 2D space, nearestObject will be closest object in 3D space.\n\n> [!NOTE]\n> - in Operation Flashpoint, only objects of the exact provided class are found.\n> - if an object ID is used (Syntax 4, see Example 2) the search range is unlimited","syntaxes":[{"syntax":"nearestObject [position, type]","params":[{"name":"position","type":"Object or Position2D or Position3D","description":"position to start search at","type_expr":"Object | Position2D | Position3D"},{"name":"type","type":"String","description":"type of object (see typeOf, class type)","type_expr":"String"}],"returns":{"type":"Object","type_expr":"Object","description":"nearest object, objNull otherwise"},"form":"unary","right":{"text":"[position, type]"}},{"syntax":"nearestObject position","params":[{"name":"position","type":"Position2D or Position3D","description":"position to start search at","type_expr":"Position2D | Position3D"}],"returns":{"type":"Object","type_expr":"Object","description":"nearest object, objNull otherwise"},"form":"unary","right":{"text":"position"}},{"syntax":"position nearestObject typeOrId","params":[{"name":"position","type":"Position3D or Position2D","description":"position to start search at","type_expr":"Position3D | Position2D"},{"name":"typeOrId","type":"String","description":"type of object (see typeOf, class type) or Arma 3 v2.10 Visitor id (see getObjectID)","type_expr":"String"}],"returns":{"type":"Object","type_expr":"Object","description":"nearest object, objNull otherwise"},"form":"binary","left":{"text":"position"},"right":{"text":"typeOrId"}},{"syntax":"position nearestObject id","params":[{"name":"position","type":"Position2D or Position3D","description":"position to start search at","type_expr":"Position2D | Position3D"},{"name":"id","type":"Number","description":"object Visitor id","type_expr":"Number"}],"returns":{"type":"Object","type_expr":"Object","description":"nearest object, objNull otherwise"},"form":"binary","left":{"text":"position"},"right":{"text":"id"}}],"examples":[{"code":["_nObject = nearestObject [2345, 6789];\n_nObject = nearestObject [player, \"StreetLamp\"];"]},{"text":"Return the object with ID 123456:\n\n```sqf\n_nObject = [0,0,0] nearestObject 123456;\n```","code":["_nObject = [0,0,0] nearestObject 123456;"]},{"code":["_nObject = getPos player nearestObject \"StreetLamp\";"]},{"text":"Return the nearest object with (typeOf _nObject == \"#XXXX\") -> #mark, #slop, etc. Unlimited search range:\n\n```sqf\n_nObject = _position nearestObject -1;\n```\n\nReturn the nearest object with (typeOf _nObject != \"\"). Search range is 50m:\n\n```sqf\n_nObject = nearestObject _position;\n```","code":["_nObject = _position nearestObject -1;","_nObject = nearestObject _position;"]},{"text":"(See also allMissionObjects):\n\n```sqf\n_blood    = nearestObject [player, \"#slop\"];\n_step    = nearestObject [player, \"#mark\"];\n_track    = nearestObject [player, \"#track\"];\n_crater    = nearestObject [player, \"#crater\"];\n```","code":["_blood\t= nearestObject [player, \"#slop\"];\n_step\t= nearestObject [player, \"#mark\"];\n_track\t= nearestObject [player, \"#track\"];\n_crater\t= nearestObject [player, \"#crater\"];"]}],"see_also":["nearestObjects","nearObjectsReady","nearObjects","objectFromNetId","nearEntities","entities","object","nearestBuilding","nearestTerrainObjects","nearestMines"],"notes":[{"user":"Gnashes","date":"2019-01-29T15:31:00Z","text":"The ID for Syntax 4 may be dynamically obtained via the following (as of Arma 3 v1.88):\n(for Arma 3 v2.10 or newer, use getObjectID instead)\n\n```sqf\n// returns Object Terrain/Visitor ID, or -1 if no ID found (invalid/null object)\ncursorObject call {\n    private _obj = str (param [0, objNull]);\n    private _id = -1;\n\n    private _find = ((_obj find \"#\") + 2);\n    if (_find > 1) then\n    {\n        private _len = ((_obj find \":\") - _find);\n        _id = _obj select [_find, _len];\n        parseNumber _id;\n    };\n    _id\n};\n```"},{"user":"blackfisch","date":"2020-02-12T08:55:00Z","text":"Note, that if you want to check for the nearest Unit you have to check for `CAManBase` instead of `Man`, since `Man` will also return any wildlife population in that area:\n\n```sqf\nnearestObject [player, \"Man\"];            // could possibly return rabbits or other wildlife\nnearestObject [player, \"CAManBase\"];    // only returns units\n```"}]},{"name":"nearestObjects","title":"nearestObjects","type":"command","url":"https://community.bistudio.com/wiki/nearestObjects","revid":377394,"updated":"2026-01-02T06:44:39Z","groups":["Object Detection"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns a list of nearest objects of the given types to the given position or object, within the specified distance. If more than one object is found they will be ordered by proximity, the closest one will be first in the array. If an object is given as the center and the filter criteria applies to it, it will be the first result in the list. Alternatively, you can use nearObjects command, which doesn't sort results.\n\nA list of ClassName types (e.g `Tank`) can be found in CfgVehicles.\n\n> [!IMPORTANT]\n> This command matches objects using isKindOf comparison instead of direct class name == comparison. As a result, if a class type is a parent, the search will return all objects that inherit from the parent as well as parent itself. This command also only finds objects that are **entities**. If you are looking for non-entity objects, see nearObjects, nearestObject.\n\n> [!WARNING]\n> Because of map object streaming, using nearestObjects or similar object finding commands over long distance from player camera may not find what you are looking for, as some objects might not exist at the time of command execution. Use nearestTerrainObjects instead.","syntaxes":[{"syntax":"nearestObjects [position, types, radius, 2Dmode]","params":[{"name":"position","type":"Object or PositionAGL or Position2D","description":"where to find objects, center position.","type_expr":"Object | PositionAGL | Position2D"},{"name":"types","type":"Array","description":"list of class name of the objects to search for. Use an empty array `[]` to search for all classes.","type_expr":"Array"},{"name":"radius","type":"Number","description":"range from center position to search for objects.","type_expr":"Number"},{"name":"2Dmode","type":"Boolean","optional":true,"default":"false","description":"true for 2D distance, false for 3D distance","type_expr":"Boolean","since":"arma3 1.66","text":"2Dmode: Boolean - (Optional, default false) true for 2D distance, false for 3D distance"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"[position, types, radius, 2Dmode]"}}],"examples":[{"code":["nearestObjects [player, [\"Car\", \"Tank\"], 200];"]},{"code":["nearestObjects [player, [\"house\"], 200];"]},{"code":["nearestObjects [[2716,2949,0], [\"Car\", \"Truck\"], 100];"]},{"text":"Return every object in 50 metres radius around player:\n\n```sqf\nnearestObjects [player, [], 50];\n```","code":["nearestObjects [player, [], 50];"]}],"see_also":["nearestTerrainObjects","findNearestEnemy","nearestBuilding","nearestObject","nearObjects","nearestLocation","nearEntities","nearTargets","nearSupplies","nearestLocationWithDubbing","nearObjectsReady","nearRoads","nearestMines"],"notes":[{"user":"PhilippRauch","date":"2010-04-03T16:21:00Z","text":"To get a list with alive targets for various situations use this construct:\n\n```sqf\n_nearestTargets = nearestObjects [_submunScanPos, [\"VBS2_TANK\", \"TANK\"], _scanArea];\n_validNearestTargets = [];\n{ if (alive _x ) then { _validNearestTargets set [(count _validNearestTargets), _x]; }; } forEach _nearestTargets;\n```\n\nresults in _validNearestTargets being filled with targets == alive .. (you could use other conditions there, of course!)"},{"user":"Rübe","date":"2010-08-10T02:28:00Z","text":"Passing an empty array to define the types will also return objects with no class at all (such as trees, bushes, stones, ...).\nExample:\n\n```sqf\n_objects = nearestObjects [_position, [], _radius];\n```\n\nPassing the array [\"All\"] is not the same and will only return objects that have some sort of class."},{"user":"Katulobotomia","date":"2013-09-11T14:54:00Z","text":"If you want to detect nearby grenades for the position of a unit, for example, using 'nearestObjects' won't work. You have to use\n'nearObjects' instead.\n\n```sqf\ncount (nearestObjects [_unit, [\"GrenadeHand\"], 30]); // WON'T WORK\n```\n\nWon't ever return anything but 0.\n\n```sqf\ncount (_unit nearObjects [\"GrenadeHand\", 30]); // WORKS!\n```\n\nWill work."},{"user":"AgentRev01","date":"2014-03-22T02:38:00Z","text":"The distance from which an object is determined to be inside the radius is calculated from its model center (object modelToWorld [0,0,0]), and not the position returned by getPos/ATL/ASL. If an object is used as the origin from which to scan, distance is calculated from its model center as well."},{"user":"Killzone_Kid","date":"2014-10-26T15:15:00Z","text":"Return all trees in 100m radius around player:\n\n```sqf\nprivate _trees = [];\n{\n    if (str _x find \": t_\" > -1) then {\n        _trees pushBack _x;\n    };\n} forEach nearestObjects [player, [], 100];\n```"},{"user":"Tankbuster","date":"2015-08-27T16:45:00Z","text":"If you use \"Man\" as the class to look for, it will only find dismounted men. IE, men in vehicles will NOT be found."},{"user":"Killzone_Kid","date":"2016-01-08T12:14:00Z","text":"The first call to this command can take significantly longer than consecutive calls. But even after the objects in given radius were cached, the sorting this command performs could be quite expensive. For example to sort ~7000 object it might take up to 100ms. For performance reasons you can use nearObjects instead, which is basically the same command but without added sorting."},{"user":"Ceeeb","date":"2016-03-02T23:09:00Z","text":"In Arma 3, nearestObjects is partially broken and is unable to return nearby placed explosive charges or mines when searching by classnames. Use nearObjects, nearestObject or allMines instead.\nExample of non-functional code:\n\n```sqf\n// always returns nothing, even if there are objects that should be returned\nnearestObjects [position player, [\"APERSMine_Range_Ammo\", \"SatchelCharge_Remote_Ammo\"], 10];\n```"},{"user":"Killzone_Kid","date":"2016-10-31T00:32:00Z","text":"Since Arma 3 v1.66 the default sorting is done according to 3D distance not distance2D as before. This is an attempt to correct some very old bug in implementation."}]},{"name":"nearestTerrainObjects","title":"nearestTerrainObjects","type":"command","url":"https://community.bistudio.com/wiki/nearestTerrainObjects","revid":377095,"updated":"2026-01-01T09:55:27Z","groups":["Object Detection"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","description":"Returns a list of nearest terrain objects of the given types to the given position or object, within the specified distance. If more than one object is found they will be ordered according to 3D distance to the object (i.e. the closest one will be first in the array).\nIn contrast to nearestObjects this command returns terrain placed objects like trees, rocks and buildings which don't necessarily need an associated config class.\n\nPossible type names:\n\n- `\"BUILDING\"`\n- `\"BUNKER\"`\n- `\"BUSH\"`\n- `\"BUSSTOP\"`\n- `\"CHAPEL\"`\n- `\"CHURCH\"`\n- `\"CROSS\"`\n- `\"FENCE\"`\n- `\"FOREST BORDER\"`\n- `\"FOREST SQUARE\"`\n- `\"FOREST TRIANGLE\"`\n- `\"FOREST\"`\n- `\"FORTRESS\"`\n- `\"FOUNTAIN\"`\n- `\"FUELSTATION\"`\n- `\"HIDE\"`\n- `\"HOSPITAL\"`\n- `\"HOUSE\"`\n- `\"LIGHTHOUSE\"`\n- `\"MAIN ROAD\"`\n- `\"POWER LINES\"`\n- `\"POWERSOLAR\"`\n- `\"POWERWAVE\"`\n- `\"POWERWIND\"`\n- `\"QUAY\"`\n- `\"RAILWAY\"`\n- `\"ROAD\"`\n- `\"ROCK\"`\n- `\"ROCKS\"`\n- `\"RUIN\"`\n- `\"SHIPWRECK\"`\n- `\"SMALL TREE\"`\n- `\"STACK\"`\n- `\"TOURISM\"`\n- `\"TRACK\"`\n- `\"TRAIL\"`\n- `\"TRANSMITTER\"`\n- `\"TREE\"`\n- `\"VIEW-TOWER\"`\n- `\"WALL\"`\n- `\"WATERTOWER\"`\n\n> [!IMPORTANT]\n> The names are / The filter is based on the named property map - not on the named property *class* or any config definition!\n\n> [!NOTE]\n> Types which are missing are not present in the given world. Virtual Reality has no terrain objects. Last updated Arma 3 v2.12\n\nStratis\n\n- BUSH: 47974\n- CHAPEL: 2\n- CROSS: 1\n- FENCE: 1728\n- FUELSTATION: 3\n- HIDE: 70975\n- HOUSE: 684\n- LIGHTHOUSE: 3\n- ROAD: 143\n- ROCK: 820\n- SHIPWRECK: 11\n- TRACK: 2063\n- TRANSMITTER: 11\n- TREE: 40110\n- WALL: 1355\n- WATERTOWER: 1\n\nAltis\n\n- BUSH: 747193\n- CHAPEL: 165\n- CHURCH: 54\n- CROSS: 48\n- FENCE: 47940\n- FUELSTATION: 32\n- HIDE: 655958\n- HOSPITAL: 1\n- HOUSE: 17472\n- LIGHTHOUSE: 7\n- MAIN ROAD: 2061\n- POWER LINES: 2224\n- POWERSOLAR: 10\n- POWERWAVE: 51\n- POWERWIND: 128\n- ROAD: 4849\n- ROCK: 5483\n- RUIN: 3\n- SHIPWRECK: 43\n- TOURISM: 1\n- TRACK: 26823\n- TRANSMITTER: 23\n- TREE: 263630\n- WALL: 38943\n- WATERTOWER: 10\n\nMalden 2035\n\n- BUSH: 288461\n- BUSSTOP: 45\n- CHAPEL: 14\n- CHURCH: 14\n- CROSS: 16\n- FENCE: 11189\n- FUELSTATION: 24\n- HIDE: 192553\n- HOUSE: 4062\n- LIGHTHOUSE: 15\n- MAIN ROAD: 1050\n- POWER LINES: 3427\n- POWERSOLAR: 1\n- ROAD: 1442\n- ROCK: 3513\n- SHIPWRECK: 23\n- TRACK: 3489\n- TRANSMITTER: 7\n- TREE: 101960\n- WALL: 14189\n- WATERTOWER: 63\n\nTanoa\n\n- BUSH: 754347\n- CHURCH: 21\n- FENCE: 2912\n- FUELSTATION: 85\n- HIDE: 356904\n- HOUSE: 13389\n- MAIN ROAD: 2921\n- POWER LINES: 3985\n- POWERSOLAR: 2\n- POWERWIND: 19\n- RAILWAY: 2138\n- ROAD: 1485\n- ROCK: 8909\n- SHIPWRECK: 58\n- TOURISM: 35\n- TRACK: 9419\n- TRAIL: 6936\n- TRANSMITTER: 16\n- TREE: 506993\n- WALL: 20526\n- WATERTOWER: 73\n\nLivonia\n\n- BUILDING: 1262\n- BUNKER: 40\n- BUSH: 473543\n- BUSSTOP: 73\n- CHAPEL: 8\n- CHURCH: 17\n- FENCE: 48426\n- FOUNTAIN: 36\n- FUELSTATION: 7\n- HIDE: 474123\n- HOUSE: 6762\n- MAIN ROAD: 2118\n- POWER LINES: 2671\n- POWERSOLAR: 2\n- POWERWIND: 1\n- RAILWAY: 843\n- ROAD: 5378\n- ROCK: 744\n- SHIPWRECK: 4\n- STACK: 11\n- TRACK: 12834\n- TRANSMITTER: 15\n- TREE: 1881630\n- VIEW-TOWER: 239\n- WALL: 4418\n- WATERTOWER: 7\n\nWeferlingen\n\n- BUILDING: 5072\n- BUSH: 731315\n- BUSSTOP: 106\n- CHAPEL: 13\n- CHURCH: 21\n- FENCE: 83908\n- FUELSTATION: 9\n- HIDE: 231818\n- HOUSE: 4562\n- MAIN ROAD: 1535\n- POWER LINES: 1958\n- RAILWAY: 2324\n- ROAD: 8740\n- STACK: 18\n- TRACK: 24372\n- TRANSMITTER: 1\n- TREE: 829449\n- VIEW-TOWER: 34\n\nWeferlingen (Winter)\n\n- BUILDING: 5072\n- BUSH: 519827\n- BUSSTOP: 106\n- CHAPEL: 13\n- CHURCH: 21\n- FENCE: 83908\n- FUELSTATION: 9\n- HIDE: 229792\n- HOUSE: 4562\n- MAIN ROAD: 1535\n- POWER LINES: 1958\n- RAILWAY: 2324\n- ROAD: 8740\n- STACK: 18\n- TRACK: 24372\n- TRANSMITTER: 1\n- TREE: 829449\n- VIEW-TOWER: 34\n\nCam Lao Nam\n\n- BUILDING: 390\n- BUNKER: 2622\n- BUSH: 1852844\n- CHURCH: 6\n- FENCE: 12346\n- FORTRESS: 2\n- FOUNTAIN: 3\n- FUELSTATION: 32\n- HIDE: 309385\n- HOUSE: 13319\n- LIGHTHOUSE: 3\n- MAIN ROAD: 4162\n- POWER LINES: 1591\n- POWERSOLAR: 5\n- POWERWIND: 5\n- RAILWAY: 1345\n- ROAD: 17621\n- ROCK: 60452\n- SHIPWRECK: 161\n- TOURISM: 18\n- TRACK: 6846\n- TRAIL: 7726\n- TRANSMITTER: 33\n- TREE: 1442842\n- VIEW-TOWER: 529\n- WALL: 19664\n- WATERTOWER: 32\n\nKhe Sanh\n\n- BUILDING: 91\n- BUNKER: 4861\n- BUSH: 1299130\n- FENCE: 2196\n- FOUNTAIN: 2\n- FUELSTATION: 3\n- HIDE: 228731\n- HOUSE: 5754\n- POWER LINES: 801\n- ROAD: 7755\n- ROCK: 33853\n- TRACK: 8156\n- TRANSMITTER: 3\n- TREE: 1145377\n- VIEW-TOWER: 227\n- WALL: 9078\n- WATERTOWER: 13\n\nThe Bra\n\n- BUILDING: 8\n- BUNKER: 265\n- BUSH: 179428\n- FENCE: 251\n- HIDE: 56960\n- HOUSE: 522\n- POWER LINES: 25\n- ROAD: 7\n- ROCK: 671\n- SHIPWRECK: 2\n- TRACK: 584\n- TRAIL: 2767\n- TRANSMITTER: 1\n- TREE: 203443\n- VIEW-TOWER: 48\n- WALL: 2076\n\nGabreta\n\n- BUILDING: 222\n- BUSH: 383449\n- BUSSTOP: 18\n- CHAPEL: 10\n- CHURCH: 11\n- CROSS: 17\n- FENCE: 25616\n- FORTRESS: 149\n- FOUNTAIN: 2\n- FUELSTATION: 11\n- HIDE: 582635\n- HOSPITAL: 1\n- HOUSE: 6352\n- MAIN ROAD: 4427\n- POWER LINES: 502\n- POWERSOLAR: 2\n- RAILWAY: 1923\n- ROAD: 8693\n- ROCK: 918\n- RUIN: 5\n- SHIPWRECK: 1\n- STACK: 6\n- TRACK: 10066\n- TRAIL: 1170\n- TRANSMITTER: 2\n- TREE: 3473175\n- VIEW-TOWER: 39\n- WALL: 6218\n- WATERTOWER: 8\n\nSefrou-Ramal\n\n- BUILDING: 2\n- BUSH: 13669\n- FENCE: 5199\n- FUELSTATION: 2\n- HIDE: 23243\n- HOUSE: 1963\n- MAIN ROAD: 403\n- POWER LINES: 565\n- POWERWIND: 19\n- RAILWAY: 135\n- ROAD: 199\n- ROCK: 1183\n- TRACK: 3286\n- TRANSMITTER: 9\n- TREE: 7592\n- WALL: 3560\n- WATERTOWER: 2\n\nSpearhead 1944 Normandy\n\n- BUILDING: 2918\n- BUNKER: 1703\n- BUSH: 608441\n- CHURCH: 45\n- CROSS: 16\n- FENCE: 288630\n- FORTRESS: 196\n- FOUNTAIN: 1286\n- HIDE: 330656\n- HOUSE: 12837\n- MAIN ROAD: 1981\n- RAILWAY: 776\n- ROAD: 20237\n- ROCK: 837\n- RUIN: 1\n- SMALL TREE: 20\n- TRACK: 29761\n- TRAIL: 6365\n- TREE: 581549\n- VIEW-TOWER: 95\n- WALL: 60793\n- WATERTOWER: 34\n\nSpearhead 1944 Mortain\n\n- BUILDING: 759\n- BUNKER: 597\n- BUSH: 192944\n- CHURCH: 7\n- CROSS: 3\n- FENCE: 66361\n- FORTRESS: 35\n- FOUNTAIN: 320\n- HIDE: 140143\n- HOUSE: 3120\n- MAIN ROAD: 551\n- RAILWAY: 733\n- ROAD: 4276\n- ROCK: 1896\n- SMALL TREE: 19\n- TRACK: 11268\n- TRAIL: 996\n- TREE: 291745\n- VIEW-TOWER: 65\n- WALL: 13364\n- WATERTOWER: 13\n\n> [!NOTE]\n> Extraction script can be found on the Biki Export Scripts page.","syntaxes":[{"syntax":"nearestTerrainObjects [position, types, radius, sort, 2Dmode]","params":[{"name":"position","type":"Object, PositionAGL or Position2D","description":"where to find objects, center position","type_expr":"Object | PositionAGL | Position2D"},{"name":"types","type":"Array","description":"list of case-insensitive types of the objects to search for. `[]` to search without filters","type_expr":"Array"},{"name":"radius","type":"Number","description":"range from center position to search for objects","type_expr":"Number"},{"name":"sort","type":"Boolean","optional":true,"default":"true","description":"sort objects by distance to the center or not - setting to false **greatly** improves performance","type_expr":"Boolean","since":"arma3 1.62","text":"sort: Boolean - (Optional, default true) sort objects by distance to the center or not - setting to false **greatly** improves performance"},{"name":"2Dmode","type":"Boolean","optional":true,"default":"false","description":"the object search and sorting mode: true - 2D, false - 3D","type_expr":"Boolean","since":"arma3 1.66","text":"2Dmode: Boolean - (Optional, default false) the object search and sorting mode: true - 2D, false - 3D"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"Before Arma 3 v2.00 this command did not return roads of type `\"ROAD\"`, `\"MAIN ROAD\"`, `\"TRACK\"`, `\"TRAIL\"`"},"form":"unary","right":{"text":"[position, types, radius, sort, 2Dmode]"}}],"examples":[{"code":["nearestTerrainObjects [player, [\"Tree\", \"Bush\"], 200];"]},{"code":["nearestTerrainObjects [player, [\"House\"], 200];"]},{"code":["nearestTerrainObjects [[2716, 2949, 0], [\"Chapel\", \"Fuelstation\"], 100];"]},{"text":"Return every terrain object in 50 metres radius around player sorted, closest first:\n\n```sqf\nnearestTerrainObjects [player, [], 50];\n```","code":["nearestTerrainObjects [player, [], 50];"]},{"text":"Return every terrain object in 50 metres radius around player unsorted:\n\n```sqf\nnearestTerrainObjects [player, [], 50, false];\n```","code":["nearestTerrainObjects [player, [], 50, false];"]},{"text":"Hide all terrain objects (run locally for each client):\n\n```sqf\nprivate _allTerrainObjects = nearestTerrainObjects\n[\n    [worldSize / 2, worldSize / 2],\n    [],\n    worldSize * sqrt 2 / 2,\n    false,\n    true\n];\n{ _x hideObject true } forEach _allTerrainObjects;\n```","code":["private _allTerrainObjects = nearestTerrainObjects\n[\n\t[worldSize / 2, worldSize / 2],\n\t[],\n\tworldSize * sqrt 2 / 2,\n\tfalse,\n\ttrue\n];\n{ _x hideObject true } forEach _allTerrainObjects;"]}],"see_also":["nearestObjects","findNearestEnemy","hideObject","nearestBuilding","nearestObject","nearObjects","nearestLocation","nearEntities","nearTargets","nearSupplies","nearestLocationWithDubbing","nearObjectsReady","nearRoads","roadsConnectedTo","roadAt","isOnRoad","getRoadInfo","nearestMines"],"notes":[{"user":"Killzone_Kid","date":"2016-10-31T00:20:00Z","text":"Since Arma 3 v1.66 the default sorting is done according to 3D distance not distance2D as before. This is an attempt to correct some very old bug in implementation."},{"user":"Demellion","date":"2016-12-28T20:21:00Z","text":"Be aware that some terrain objects types might be tricky to be found, such as terrain rocks and boulders which are not considered to be \"ROCKS\" or \"ROCK\", but \"HIDE\". Example:\n\n```sqf\nnearestTerrainObjects [player, [\"HIDE\"], 20]; // [939688: bluntstone_01.p3d,939691: garbagebags_f.p3d,939671: wreck_car_f.p3d,939692: junkpile_f.p3d]\n```"},{"user":"Killzone_Kid","date":"2020-06-07T14:16:00Z","text":"Large bridges are map type `\"ROAD\"`. Small foot bridges are not roads and not included into road net."}]},{"name":"nearObjects","title":"nearObjects","type":"command","url":"https://community.bistudio.com/wiki/nearObjects","revid":377428,"updated":"2026-01-02T06:45:43Z","groups":["Object Detection"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Find objects (Units, Vehicles, Dead, Map Objects) in a sphere with given radius. The first object in the returned array is *not* necessarily the closest one. If you need returned objects to be sorted by distance, use nearestObjects. If typeName is given, only objects of given type (or its subtype) are listed.","syntaxes":[{"syntax":"position nearObjects radius","params":[{"name":"position","type":"Position, Position2D or Object","type_expr":"Position | Position2D | Object"},{"name":"radius","type":"Number","type_expr":"Number"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"binary","left":{"text":"position"},"right":{"text":"radius"}},{"syntax":"position nearObjects [typeName, radius]","params":[{"name":"position","type":"PositionAGL, Position2D or Object","type_expr":"PositionAGL | Position2D | Object"},{"name":"typeName","type":"String","type_expr":"String"},{"name":"radius","type":"Number","type_expr":"Number"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"binary","left":{"text":"position"},"right":{"text":"[typeName, radius]"}}],"examples":[{"code":["_list = position player nearObjects 50;"]},{"code":["_list = [_xpos,_ypos] nearObjects [\"House\", 20];"]},{"code":["_list = player nearObjects 20;"]}],"see_also":["findNearestEnemy","nearestBuilding","nearestObject","nearestObjects","nearestLocation","nearEntities","nearTargets","nearSupplies","nearestLocationWithDubbing","nearObjectsReady","nearRoads","nearestMines"],"notes":[{"user":"Kronzky","date":"2007-06-30T08:21:00Z","text":"Units in vehicles are not detected via this command."},{"user":"Tankbuster","date":"2011-12-15T23:17:00Z","text":"In the second syntax, you can't omit the typeName parameter. It's required and you'll get an error if you don't supply it. Use \"All\" as an alternative to leaving it out. (CO 1.59)"},{"user":"Tankbuster","date":"2013-01-03T19:59:00Z","text":"If you use the first syntax, it will return objects many more objects such as pollen, honeybees and crucially, triggers. Triggers will show in the returned array as \"no shape\" but you can use typeOf to get the classname, which will give \"EmptyDetector\". This will not return objects that don't have classnames such as plants, stones and some map objects like vehicle wrecks. nearestObjects will find objects without classnames."},{"user":"Cheitan","date":"2017-08-08T16:08:00Z","text":"The syntax 2 means that the command will include all types which inherit from the given type. As an example, when using \"Helipad_Base_F\", the command will detect all types of helipads (Land_HelipadSquare_F, Land_HelipadCircle_F, Land_HelipadEmpty_F, etc) in the given radius."}]},{"name":"nearObjectsReady","title":"nearObjectsReady","type":"command","url":"https://community.bistudio.com/wiki/nearObjectsReady","revid":377425,"updated":"2026-01-02T06:45:38Z","groups":["Object Detection"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Check whether all data are loaded to nearObjects will return in reasonable time.","syntaxes":[{"syntax":"position nearObjectsReady radius","params":[{"name":"position","type":"Object or PositionAGL or Position2D","type_expr":"Object | PositionAGL | Position2D"},{"name":"radius","type":"Number","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"position"},"right":{"text":"radius"}}],"examples":[{"code":["_twnpos nearObjectsReady 500; //from ALICE"]}],"see_also":["findNearestEnemy","nearestBuilding","nearestObject","nearestObjects","nearObjects","nearestLocation","nearEntities","nearTargets","nearSupplies","nearestLocationWithDubbing","nearRoads","nearestMines"]},{"name":"nearRoads","title":"nearRoads","type":"command","url":"https://community.bistudio.com/wiki/nearRoads","revid":379453,"updated":"2026-10-31T00:08:32Z","groups":["Roads and Airports","Object Detection"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Find the road segments within the circle of given radius.","syntaxes":[{"syntax":"pos nearRoads radius","params":[{"name":"pos","type":"Object or PositionAGL or Position2D","description":"center of search radius","type_expr":"Object | PositionAGL | Position2D"},{"name":"radius","type":"Number","description":"search radius in meters","type_expr":"Number"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"road segments within radius"},"form":"binary","left":{"text":"pos"},"right":{"text":"radius"}}],"examples":[{"code":["_list = player nearRoads 50;"]},{"code":["_list = (position _unit) nearRoads 50;"]},{"code":["_list = [1800,5700] nearRoads 50;"]}],"see_also":["isOnRoad","roadAt","surfaceIsWater","roadsConnectedTo","findNearestEnemy","nearestBuilding","nearestObject","nearestObjects","nearObjects","nearestLocation","nearEntities","nearTargets","nearSupplies","nearestLocationWithDubbing","nearObjectsReady","getRoadInfo","nearestTerrainObjects","nearestMines"],"notes":[{"user":"Tankbuster","date":"2011-03-26T00:00:00Z","text":"NearRoads always gets data in the same order. In a 300 meter radius around Feruz Abad, for example, the first one is in the south-west corner and the last one is in the north-east."}]},{"name":"nearSupplies","title":"nearSupplies","type":"command","url":"https://community.bistudio.com/wiki/nearSupplies","revid":377405,"updated":"2026-01-02T06:45:03Z","groups":["Object Detection"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Find supplies (weapon holders, ammo crates, fuel feeds, other units) in the sphere with given radius.","syntaxes":[{"syntax":"origin nearSupplies radius","params":[{"name":"origin","type":"Object or PositionAGL or Position2D","type_expr":"Object | PositionAGL | Position2D"},{"name":"radius","type":"Number","type_expr":"Number"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"binary","left":{"text":"origin"},"right":{"text":"radius"}},{"syntax":"origin nearSupplies [typeName, radius]","params":[{"name":"origin","type":"Object or PositionAGL or Position2D","type_expr":"Object | PositionAGL | Position2D"},{"name":"typeName","type":"String","type_expr":"String"},{"name":"radius","type":"Number","type_expr":"Number"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"binary","left":{"text":"origin"},"right":{"text":"[typeName, radius]"}}],"examples":[{"code":["_list = player nearSupplies 50;"]}],"see_also":["findNearestEnemy","nearestBuilding","nearestObject","nearestObjects","nearObjects","nearestLocation","nearEntities","nearTargets","nearestLocationWithDubbing","nearObjectsReady","nearRoads","nearestMines","getCorpse"]},{"name":"nearTargets","title":"nearTargets","type":"command","url":"https://community.bistudio.com/wiki/nearTargets","revid":377595,"updated":"2026-01-02T07:00:21Z","groups":["Object Detection"],"status":"ok","games":{"arma1":"1.07","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.07","arma3_since":"0.50","description":"Returns a list of targets within the defined range. \"Targets\" are not restricted to enemy units.","syntaxes":[{"syntax":"unit nearTargets range","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"range","type":"Number","type_expr":"Number"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"in format [position, type, side, subjectiveCost, object, positionAccuracy]:\n- position: Position3D - perceived position including judgment and memory errors - type: String - perceived, gives only what was recognized - side: Side - perceived side - subjectiveCost: Number - positive for enemies, more positive for more important or more dangerous enemies - object: Object object type, can be used to get more information if needed - positionAccuracy: Number - assumed accuracy of the perceived position","text":"Array of Arrays in format [position, type, side, subjectiveCost, object, positionAccuracy]:\n\n- position: Position3D - perceived position including judgment and memory errors\n- type: String - perceived, gives only what was recognized\n- side: Side - perceived side\n- subjectiveCost: Number - positive for enemies, more positive for more important or more dangerous enemies\n- object: Object object type, can be used to get more information if needed\n- positionAccuracy: Number - assumed accuracy of the perceived position"},"form":"binary","left":{"text":"unit"},"right":{"text":"range"}}],"examples":[{"text":"```sqf\nplayer nearTargets 100;\n// can return e.g\n/*\n    [\n        [[2555.33,2535.33,1.32708],\"SoldierEB\",EAST,214222,EAST 1-1-A:1],\n        [[2550.39,2482.5,1.32696],\"SoldierWB\",WEST,0,WEST 1-1-A:2]\n    ]\n*/\n```","code":["player nearTargets 100;\n// can return e.g\n/*\n\t[\n\t\t[[2555.33,2535.33,1.32708],\"SoldierEB\",EAST,214222,EAST 1-1-A:1],\n\t\t[[2550.39,2482.5,1.32696],\"SoldierWB\",WEST,0,WEST 1-1-A:2]\n\t]\n*/"]}],"see_also":["targets","targetsQuery","targetsAggregate","targetKnowledge","knowsAbout","reveal","forgetTarget","setTargetAge","getHideFrom","findNearestEnemy","nearestBuilding","nearestObject","nearestObjects","nearObjects","nearestLocation","nearEntities","nearSupplies","nearestLocationWithDubbing","nearObjectsReady","nearRoads","nearestMines"],"notes":[{"user":"mrcurry","date":"2011-02-17T16:00:00Z","text":"A subjective cost greater than 0 does not necessarily mean the target is an enemy unit. **Any** unit, that have yet to be identified by the unit, have a small positive cost in the range 0 to 1."},{"user":".kju","date":"2012-01-15T17:45:00Z","text":"The quality/detail level of the info depends on the knowsAbout value of the sourceUnit about the targetUnit:\n\n- For infantry:\n  - ] 0 , 1.5 [ - side unknown, some position offset, identified as SoldierWB\n  - [ 1.5, 1.6 [ - side identified, subjective cost set\n  - [ 1.6, 2 [ - type identified better (USMC_Soldier_Base)\n  - [ 2 , 3.6 [ - type identified precisely (USMC_Soldier)\n  - [ 3.6, 4 ] - position identified precisely\n\nThe values seems closely linked to the accuracy value of the given targetUnit class and its parents up in the config tree:\n\n- 0 class CAManBase : Man\n- 1.6 class SoldierWB : CAManBase\n- 2 class USMC_Soldier_Base : SoldierWB\n- 3.9 class USMC_Soldier : USMC_Soldier_Base\n\n- For tanks:\n  - ] 0 , 0.03 [ - side unknown, some position offset, identified as LandVehicle\n  - [ 0.03, 0.13 [ - type identified better (Tank)\n  - [ 0.13, 0.3 [ - type identified better (M1A1)\n  - [ 0.3 , 1.5 [ - side identified, subjective cost set\n  - [ 1.5 , 3.6 [ - side identified precisely (CIV), subjective cost adjusted\n  - [ 3.6 , 4 ] - position identified precisely\n\nThe values seems closely linked to the accuracy value of the given targetUnit class and its parents up in the config tree:\n\n- 0 class All\n- class AllVehicles : All\n  - 0.0005 class Land : AllVehicles\n  - 0.02 class LandVehicle : Land\n  - 0.12 class Tank : LandVehicle\n  - 0.25 class M1A1 : Tank"},{"user":".kju","date":"2012-01-17T16:14:00Z","text":"- When an unit dies, it is nearTargets array gets emptied after some seconds.\n- When an unit dies, its reference will get removed from other units nearTargets' arrays immediately.\n- A target will be removed from the array after about 360 seconds without contact."},{"user":".kju","date":"2012-01-21T20:00:00Z","text":"Position accuracy seems to be a radius in meters from the perceived position."}]},{"name":"needReload","title":"needReload","type":"command","url":"https://community.bistudio.com/wiki/needReload","revid":376453,"updated":"2025-10-14T11:29:23Z","groups":["Weapons"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns how much vehicle wants to reload its weapons.","syntaxes":[{"syntax":"needReload entity","params":[{"name":"entity","type":"Object","description":"unit or vehicle","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"range: 0-1, 0: full mag, 1: empty mag"},"form":"unary","right":{"text":"entity"}},{"syntax":"entity needReload muzzle","since":"arma3 2.22","params":[{"name":"entity","type":"Object","description":"unit or vehicle","type_expr":"Object"},{"name":"muzzle","type":"String","description":"muzzle to check. \"\" to check all muzzles","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"range: 0-1, 0: full mag, 1: empty mag"},"form":"binary","left":{"text":"entity"},"right":{"text":"muzzle"}}],"examples":[{"code":["_seriousness = needReload _vehicle;"]},{"code":["if (needReload player == 1) then { reload player };"]},{"code":["player needReload currentMuzzle player;"]}],"see_also":["needService","reload","reloadEnabled","enableReload"]},{"name":"needService","title":"needService","type":"command","url":"https://community.bistudio.com/wiki/needService","revid":377624,"updated":"2026-01-02T08:52:02Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Returns array with how much vehicle needs repairing, refueling and rearming.","syntaxes":[{"syntax":"needService vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [repair, refuel, rearm]. Values are in range 0..1: 0: no need, 1: maximum need","text":"Array with [repair, refuel, rearm]. Values are in range 0..1: 0: no need, 1: maximum need"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["needService tank params [\"_needRepair\", \"_needRefuel\", \"_needRearm\"];"]},{"code":["onEachFrame { hintSilent str needService vehicle player };"]}],"see_also":["allowService","allowedService","needReload"]},{"name":"netId","title":"netId","type":"command","url":"https://community.bistudio.com/wiki/netId","revid":364973,"updated":"2024-07-04T17:25:50Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"0.50","arma2oa":"1.63"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get the unique ID of an object or a group.","syntaxes":[{"syntax":"netId objOrGroup","params":[{"name":"objOrGroup","type":"Object or Group","type_expr":"Object | Group"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"objOrGroup"}}],"examples":[{"code":["_playerNetId = netId player;"]}],"multiplayer":"- In singleplayer: Arma 3 v2.18 returns a net ID (different from BIS_fnc_netId's output), before that it returned an empty string in single player (see BIS_fnc_netId and BIS_fnc_objectVar)\n- In multiplayer: works as described","see_also":["objectFromNetId","groupFromNetId","BIS_fnc_objectFromNetId","BIS_fnc_netId","BIS_fnc_groupFromNetId","BIS_fnc_objectVar"],"notes":[{"user":"Demellion","date":"2018-10-19T13:40:00Z","text":"Even if the returned value is in format of **owner:uniqueid**, it doesn't follow the current ownership of an object (owner for example).\nThis command keeps the **original owner** of a created object."}]},{"name":"netObjNull","title":"netObjNull","type":"command","url":"https://community.bistudio.com/wiki/netObjNull","revid":379040,"updated":"2026-09-22T14:03:06Z","groups":["Variables"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"A non-existent NetObject. To compare non-existent objects use isNull or isEqualTo:\n\n```sqf\nnetObjNull == netObjNull;            // false\nnetObjNull != netObjNull;            // true\nisNull netObjNull;                    // true\nnetObjNull isEqualTo netObjNull;    // true\ntypeName netObjNull;                // \"NetObject\"\nnetObjNull isEqualType netObjNull;  // true\n```\n\n.\n\n> [!NOTE]\n> This command always returned false prior to Arma 3 2.24","syntaxes":[{"syntax":"netObjNull","params":[],"returns":{"type":"NetObject","type_expr":"NetObject","description":"null net object. Before Arma 3 2.24 Boolean, always returned false"},"form":"nullary"}],"examples":[{"code":["str netObjNull; // <NULL-NetObject>"]}],"see_also":["objNull"]},{"name":"newOverlay","title":"newOverlay","type":"command","url":"https://community.bistudio.com/wiki/newOverlay","revid":353326,"updated":"2024-03-15T17:11:49Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Creates the new overlay dialog for the specified type of overlay.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map newOverlay config","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"config","type":"Config","type_expr":"Config"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"config"}}],"examples":[{"text":"-"}]},{"name":"nextMenuItemIndex","title":"nextMenuItemIndex","type":"command","url":"https://community.bistudio.com/wiki/nextMenuItemIndex","revid":363274,"updated":"2024-03-26T10:51:44Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the next available menu item index.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"nextMenuItemIndex map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"map"}}],"examples":[{"text":"-"}]},{"name":"nextWeatherChange","title":"nextWeatherChange","type":"command","url":"https://community.bistudio.com/wiki/nextWeatherChange","revid":379151,"updated":"2026-10-17T01:44:35Z","groups":["Environment"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return the remaining time (in seconds) over which the current weather change will occur.\n\nWhen a weather change finishes, the game engine will automatically generate a new random weather change over a realistic time period (minimum of 90 minutes).","syntaxes":[{"syntax":"nextWeatherChange","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_seconds = nextWeatherChange;"]}],"multiplayer":"Each client and the server can have differing weather.","see_also":["fog","fogForecast","setFog","overcast","setOvercast","overcastForecast","forceWeatherChange"],"notes":[{"user":"OverlordZorn","date":"2026-10-17T01:44:35Z","text":"Tested in Arma 3 v2.22: `setFog` sets this timer to its transition time, while `setOvercast` leaves it unchanged. When it reaches 0, the engine rolls a new weather forecast."}]},{"name":"nil","title":"nil","type":"command","url":"https://community.bistudio.com/wiki/nil","revid":347969,"updated":"2023-11-08T09:38:47Z","groups":["Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Nil value. This value can be used to undefine existing variables.","syntaxes":[{"syntax":"nil","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["variableToDestroy = nil;"]},{"text":"```sqf\nprivate _variable = 50;\n_variable = nil;\nhint format [\"Variable = %1\", _variable];    // will display \"Variable = any\" in unscheduled environment\n                                            // will output \"Error Undefined variable in expression: _variable\" in scheduled environment\n// identical to\nhint format [\"Variable = %1\", _variableThatWasNeverDefined];\n```","code":["private _variable = 50;\n_variable = nil;\nhint format [\"Variable = %1\", _variable];\t// will display \"Variable = any\" in unscheduled environment\n\t\t\t\t\t\t\t\t\t\t\t// will output \"Error Undefined variable in expression: _variable\" in scheduled environment\n// identical to\nhint format [\"Variable = %1\", _variableThatWasNeverDefined];"]}],"see_also":["isNil","Variables"]},{"name":"nMenuItems","title":"nMenuItems","type":"command","url":"https://community.bistudio.com/wiki/nMenuItems","revid":353351,"updated":"2024-03-15T17:11:54Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the total number of user-added menu items belonging to the given menu.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map nMenuItems menuName","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"menuName","type":"String","description":"\"file\" or \"view\"","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"map"},"right":{"text":"menuName"}},{"syntax":"map nMenuItems index","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"map"},"right":{"text":"index"}}],"examples":[{"text":"-"}]},{"name":"not","title":"not","type":"command","url":"https://community.bistudio.com/wiki/not","revid":319391,"updated":"2022-05-13T09:23:59Z","groups":["Math","Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"not a is exactly the same as ! a.","syntaxes":[{"syntax":"not a","params":[{"name":"a","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"a"}}],"examples":[{"code":["not false; // returns true"]}],"aliases":["! a"],"see_also":["Operators"]},{"name":"numberOfEnginesRTD","title":"numberOfEnginesRTD","type":"command","url":"https://community.bistudio.com/wiki/numberOfEnginesRTD","revid":377770,"updated":"2026-01-03T01:32:19Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Returns the number of engines a helicopter has.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"numberOfEnginesRTD helicopterRTD","params":[{"name":"helicopterRTD","type":"ObjectRTD","description":"helicopter","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"helicopterRTD"}}],"examples":[{"code":["_engineCount = numberOfEnginesRTD vehicle player;"]}]},{"name":"numberToDate","title":"numberToDate","type":"command","url":"https://community.bistudio.com/wiki/numberToDate","revid":377267,"updated":"2026-01-02T06:34:12Z","groups":["Environment"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Convert float number to a date.","syntaxes":[{"syntax":"numberToDate [year, time]","params":[{"name":"year","type":"Number","description":"year value, e.g 2035","type_expr":"Number"},{"name":"time","type":"Number","description":"year time in range 0..1, from beginning to end of the year (e.g `0` is January 1st and `1` is December 31st)","type_expr":"Number"}],"returns":{"type":"Date","type_expr":"Date"},"form":"unary","right":{"text":"[year, time]"}}],"examples":[{"code":["setDate numberToDate [2008, 0.5324]; // sets date to [2008,7,13,7,49]"]}],"see_also":["dateToNumber","getNumber","isNumber","parseNumber","playersNumber"]},{"name":"objectCurators","title":"objectCurators","type":"command","url":"https://community.bistudio.com/wiki/objectCurators","revid":377144,"updated":"2026-01-01T10:32:33Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns array with all curators which can edit given object.","syntaxes":[{"syntax":"objectCurators obj","params":[{"name":"obj","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"obj"}}],"examples":[{"code":["_curatorsThatcanEdit = objectCurators BIS_Tank;"]}],"see_also":["addCuratorEditableObjects","curatorRegisteredObjects","removeCuratorEditableObjects"]},{"name":"objectFromNetId","title":"objectFromNetId","type":"command","url":"https://community.bistudio.com/wiki/objectFromNetId","revid":373126,"updated":"2025-04-02T15:43:29Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"0.50","arma2oa":"1.63"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get object with given unique ID. For groups, use groupFromNetId.","syntaxes":[{"syntax":"objectFromNetId id","params":[{"name":"id","type":"String","type_expr":"String"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"id"}}],"examples":[{"code":["objectFromNetId \"2:3\""]}],"multiplayer":"Before Arma 3 v2.18 it would return objNull in multiplayer - see BIS_fnc_objectFromNetId","see_also":["groupFromNetId","netId","BIS_fnc_objectFromNetId","BIS_fnc_netId","BIS_fnc_groupFromNetId"]},{"name":"objectParent","title":"objectParent","type":"command","url":"https://community.bistudio.com/wiki/objectParent","revid":363381,"updated":"2024-03-29T13:23:37Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","description":"Returns the parent of an object if said object is a proxy.\n\n> [!IMPORTANT]\n> Use objectParent instead of vehicle to get a soldier's vehicle.\n> Apart from being faster it is also more reliable, as when used on dead crew, vehicle command may surprisingly return the unit itself.\n\n> [!NOTE]\n> Since Arma 3 v2.18 objectParent can return the creator of a weaponholder if the weaponholder was created through some user action.","syntaxes":[{"syntax":"objectParent object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"object"}}],"examples":[{"text":"```sqf\n_isOnFoot = isNull objectParent player;                            // check if the player is on foot\n_isCommander = player isEqualTo commander objectParent player;    // check if the player is in a vehicle and is its commander\n\n_holder = objectParent _myBackpack;                                // return:\n                                                                // - the weapon holder of a dropped backpack\n                                                                // - the cargo space of a vehicle holding this backpack\n                                                                // - the dead unit holding the backpack\n                                                                // works for a backpack, a vest or a uniform\n\n_isDeployed = isNull objectParent _deployableStaticMG;            // true if deployed, false if in a backpack\n\n_ropeParent = objectParent _ropeSegment;                        // since Arma 3 v2.12\n_creatorUnit = objectParent _weaponholder;                        // since Arma 3 v2.18\n```","code":["_isOnFoot = isNull objectParent player;\t\t\t\t\t\t\t// check if the player is on foot\n_isCommander = player isEqualTo commander objectParent player;\t// check if the player is in a vehicle and is its commander\n\n_holder = objectParent _myBackpack;\t\t\t\t\t\t\t\t// return:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// - the weapon holder of a dropped backpack\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// - the cargo space of a vehicle holding this backpack\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// - the dead unit holding the backpack\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// works for a backpack, a vest or a uniform\n\n_isDeployed = isNull objectParent _deployableStaticMG;\t\t\t// true if deployed, false if in a backpack\n\n_ropeParent = objectParent _ropeSegment;\t\t\t\t\t\t// since Arma 3 v2.12\n_creatorUnit = objectParent _weaponholder;\t\t\t\t\t\t// since Arma 3 v2.18"]},{"text":"Create and place a created backpack in front of player:\n\n```sqf\n_backpackContainer = \"B_TacticalPack_rgr\" createVehicle [0, 0, 0];\n_weaponHolder = objectParent _backpackContainer;\n_weaponHolder setPosWorld (player modelToWorldWorld [0, 5, 0]);\n```","code":["_backpackContainer = \"B_TacticalPack_rgr\" createVehicle [0, 0, 0];\n_weaponHolder = objectParent _backpackContainer;\n_weaponHolder setPosWorld (player modelToWorldWorld [0, 5, 0]);"]}],"see_also":["backpackContainer","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack","vehicle","getCorpse"]},{"name":"objNull","title":"objNull","type":"command","url":"https://community.bistudio.com/wiki/objNull","revid":379022,"updated":"2026-09-22T13:39:58Z","groups":["Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"A non-existent Object. To compare non-existent objects use isNull or isEqualTo:\n\n```sqf\nobjNull == objNull;            // false\nobjNull != objNull;            // true\nisNull objNull;                // true\nobjNull isEqualTo objNull;    // true\ntypeName objNull;           // \"OBJECT\"\n```","syntaxes":[{"syntax":"objNull","params":[],"returns":{"type":"Object","type_expr":"Object"},"form":"nullary"}],"examples":[{"code":["player == player; // false if player is null"]},{"code":["isNull player; // true if player is null"]},{"code":["str objNull // <NULL-object>"]},{"code":["position objNull // [0,0,0]"]}],"see_also":["controlNull","displayNull","grpNull","locationNull","taskNull","teamMemberNull","scriptNull","configNull","netObjNull","typeName","isNull"]},{"name":"objStatus","title":"objStatus","type":"command","url":"https://community.bistudio.com/wiki/objStatus","revid":322935,"updated":"2022-06-28T21:42:43Z","groups":["Briefing"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Sets the status of an objective that was defined in briefing.html.\n\nStatus may be one of:\n\n- \"ACTIVE\"\n- \"FAILED\"\n- \"DONE\"\n- \"HIDDEN\"\n\nTo refer to an objective that is named \"OBJ_1\", for example, use only the index number in this command (i.e. \"1\" objStatus \"HIDDEN\").","syntaxes":[{"syntax":"objectivenumber objStatus status","params":[{"name":"objectivenumber","type":"String","type_expr":"String"},{"name":"status","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"objectivenumber"},"right":{"text":"status"}}],"examples":[{"text":"```sqf\n\"1\" objStatus \"DONE\";\n```\n\nMarks the objective named \"OBJ_1\" as completed.","code":["\"1\" objStatus \"DONE\";"]}]},{"name":"onBriefingGroup","title":"onBriefingGroup","type":"command","url":"https://community.bistudio.com/wiki/onBriefingGroup","revid":322956,"updated":"2022-06-28T21:42:49Z","groups":["Briefing","Sounds","Groups","Event Handlers"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Select a sound declared in the Description.ext of the mission to be played the first time the Group tab is selected in the briefing.","syntaxes":[{"syntax":"onBriefingGroup soundName","params":[{"name":"soundName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"soundName"}}],"examples":[{"code":["onBriefingGroup \"GroupVoiceOver\";"]}],"see_also":["Description.ext"]},{"name":"onBriefingNotes","title":"onBriefingNotes","type":"command","url":"https://community.bistudio.com/wiki/onBriefingNotes","revid":378135,"updated":"2026-02-24T13:54:13Z","groups":["Sounds","Briefing","Event Handlers"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Select a sound declared in the Description.ext of the mission to be played the first time the Notes tab is selected in the briefing.","syntaxes":[{"syntax":"onBriefingNotes soundName","params":[{"name":"soundName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"soundName"}}],"examples":[{"code":["onBriefingNotes \"NotesVoiceOver\";"]}],"see_also":["playSound"],"notes":[{"user":"Bdfy","date":"2007-02-08T15:30:00Z","text":"In Operation Flashpoint it works only with the sound files defined in the mission's description.ext"}]},{"name":"onBriefingPlan","title":"onBriefingPlan","type":"command","url":"https://community.bistudio.com/wiki/onBriefingPlan","revid":379454,"updated":"2026-10-31T00:08:40Z","groups":["Event Handlers","Sounds","Briefing"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Select a sound declared in the Description.ext of the mission to be played the first time the Plan tab is selected in the briefing.","syntaxes":[{"syntax":"onBriefingPlan soundName","params":[{"name":"soundName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"soundName"}}],"examples":[{"code":["onBriefingPlan \"PlanVoiceOver\";"]}],"see_also":["Description.ext"],"notes":[{"user":"bdfy","date":"2007-01-20T00:00:00Z","text":"In Operation Flashpoint v1.96 only sound files defined in the mission description can be played in this way."}]},{"name":"onBriefingTeamSwitch","title":"onBriefingTeamSwitch","type":"command","url":"https://community.bistudio.com/wiki/onBriefingTeamSwitch","revid":319537,"updated":"2022-05-13T09:24:16Z","groups":["Briefing","Sounds","Team Switch","Event Handlers"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Select a sound defined in the CfgSounds of the mission to be played the first time the TeamSwitch tab is selected in the briefing.","syntaxes":[{"syntax":"onBriefingTeamSwitch soundName","params":[{"name":"soundName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"soundName"}}],"examples":[{"code":["onBriefingTeamSwitch \"TeamSwitchVoiceOver\";"]}],"see_also":["enableTeamSwitch","onTeamSwitch","teamSwitch","teamSwitchEnabled","Description.ext"]},{"name":"onCommandModeChanged","title":"onCommandModeChanged","type":"command","url":"https://community.bistudio.com/wiki/onCommandModeChanged","revid":369384,"updated":"2024-09-03T18:43:15Z","groups":["Event Handlers","High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Defines code performed when hc command mode changes either because of (Left Ctrl + Space) shortcut or hcShowBar scripting command. Groups hc mode must contain at least one group for this command to work (see High Command). Attached code receives *_isHighCommand* boolean.\n\n> [!NOTE]\n> Since **Arma 3** *v1.57* a stackable version of this EH is available: CommandModeChanged","syntaxes":[{"syntax":"onCommandModeChanged code","params":[{"name":"code","type":"Code or String","type_expr":"Code | String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"code"}}],"examples":[{"code":["//Examples in-use can be found in:\n\n//ca\\modules\\HC\\data\\scripts\\HC_GUI.sqf\n//A3\\modules_f\\HC\\data\\scripts\\HC_GUI.sqf"]}],"see_also":["High Command","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","onHCGroupSelectionChanged"]},{"name":"onDoubleClick","title":"onDoubleClick","type":"command","url":"https://community.bistudio.com/wiki/onDoubleClick","revid":363235,"updated":"2024-03-26T10:51:11Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Defines an action performed when the user double clicks on the map. Command receives:,_pos array position,_units array selected units,_shift,_alt bool key state\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map onDoubleClick command","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"command","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"command"}}],"examples":[{"text":"-"}],"see_also":["onMapSingleClick"]},{"name":"onEachFrame","title":"onEachFrame","type":"command","url":"https://community.bistudio.com/wiki/onEachFrame","revid":369525,"updated":"2024-09-15T18:15:30Z","groups":["Event Handlers"],"status":"ok","games":{"arma2oa":"1.63","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.63","arma3_since":"0.50","description":"Runs given statement every frame in an unscheduled environment.\n\n> [!NOTE]\n> **Arma 3:** In order to keep compatibility between official and community content:\n>\n> - Since Arma 3 v1.58 a stackable version of this EH is available: EachFrame Mission Event Handler\n> - Before that, the scripted version of the event handler should be used instead (using BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler).","syntaxes":[{"syntax":"onEachFrame statement","params":[{"name":"statement","type":"String or Code","type_expr":"String | Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"statement"}}],"examples":[{"code":["onEachFrame { hintSilent str getPosWorld player }; // hints position every frame"]},{"text":"Private variables defined outside of the onEachFrame scope are not inherited:\n\n```sqf\n_myVar = \"bob\";\nMyVar = \"bill\";\nonEachFrame { hintSilent str [_myVar, MyVar]; };\n// Result: [any, \"bill\"]\n```","code":["_myVar = \"bob\";\nMyVar = \"bill\";\nonEachFrame { hintSilent str [_myVar, MyVar]; };\n// Result: [any, \"bill\"]"]},{"text":"Only one onEachFrame loop can exist at any time:\n\n```sqf\nonEachFrame { player sideChat \"first\"; };\nonEachFrame { player sideChat \"second\"; };    // replaces the first one\nonEachFrame {};                                // reset to the initial state\n```","code":["onEachFrame { player sideChat \"first\"; };\nonEachFrame { player sideChat \"second\"; };\t// replaces the first one\nonEachFrame {};\t\t\t\t\t\t\t\t// reset to the initial state"]},{"text":"Script suspension is not permitted within onEachFrame scope:\n\n```sqf\n// will throw an error\nonEachFrame { sleep 1; };\n```","code":["// will throw an error\nonEachFrame { sleep 1; };"]},{"text":"```sqf\nonEachFrame { if (diag_frameNo mod 60 isEqualTo 0) then { /* code */ } };    // executes every 60 frames (every second @ 60 FPS, every two seconds @ 30 FPS, etc)\n\nonEachFrame {                                                                // this version is the closest to a precise 1 second tick\n    if (isNil \"TAG_LastHint\") then\n    {\n        TAG_LastHint = diag_tickTime;\n    }\n    else\n    {\n        if (diag_tickTime - TAG_LastHint >= 1) then // set the duration in seconds here\n        {\n            hint format [\"a second has passed (%1s since game start)\", diag_tickTime];\n            TAG_LastHint = diag_tickTime;\n        };\n    };\n};\n```","code":["onEachFrame { if (diag_frameNo mod 60 isEqualTo 0) then { /* code */ } };\t// executes every 60 frames (every second @ 60 FPS, every two seconds @ 30 FPS, etc)\n\nonEachFrame {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// this version is the closest to a precise 1 second tick\n\tif (isNil \"TAG_LastHint\") then\n\t{\n\t\tTAG_LastHint = diag_tickTime;\n\t}\n\telse\n\t{\n\t\tif (diag_tickTime - TAG_LastHint >= 1) then // set the duration in seconds here\n\t\t{\n\t\t\thint format [\"a second has passed (%1s since game start)\", diag_tickTime];\n\t\t\tTAG_LastHint = diag_tickTime;\n\t\t};\n\t};\n};"]}],"see_also":["diag_frameNo","diag_fps"]},{"name":"onGroupIconClick","title":"onGroupIconClick","type":"command","url":"https://community.bistudio.com/wiki/onGroupIconClick","revid":321243,"updated":"2022-05-13T18:19:21Z","groups":["High Command","Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Defines an action performed when player clicked on group marker (3D or in a map). The code executed once.\nThis EH, unlike onGroupIconOverEnter and onGroupIconOverLeave, has one more param which returns 1 if RMB was pressed, 0 otherwise.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.58 a Mission Event Handler exists and should be used.","syntaxes":[{"syntax":"onGroupIconClick command","params":[{"name":"command","type":"String or Code","description":"script","type_expr":"String | Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"command"}}],"examples":[{"text":"```sqf\nonGroupIconClick\n{\n    // passed values for _this are:\n    params [\"_is3D\", \"_group\", \"_wpID\", \"_posX\", \"_posY\", \"_shift\", \"_ctrl\", \"_alt\"];\n\n    // before Arma 3\n    _is3D = _this select 0;\n    _group = _this select 1;\n    _wpID = _this select 2;\n    _RMB = _this select 3;\n    _posx = _this select 4;\n    _posy = _this select 5;\n    _shift = _this select 6;\n    _ctrl = _this select 7;\n    _alt = _this select 8;\n\n    _message = format [\"____ Info ____\"];\n    {_message = _message + format [\"\\n %1\", _x]} forEach _this;\n    hint _message;\n};\n```","code":["onGroupIconClick\n{\n\t// passed values for _this are:\n\tparams [\"_is3D\", \"_group\", \"_wpID\", \"_posX\", \"_posY\", \"_shift\", \"_ctrl\", \"_alt\"];\n\n\t// before Arma 3\n\t_is3D = _this select 0;\n\t_group = _this select 1;\n\t_wpID = _this select 2;\n\t_RMB = _this select 3;\n\t_posx = _this select 4;\n\t_posy = _this select 5;\n\t_shift = _this select 6;\n\t_ctrl = _this select 7;\n\t_alt = _this select 8;\n\n\t_message = format [\"____ Info ____\"];\n\t{_message = _message + format [\"\\n %1\", _x]} forEach _this;\n\thint _message;\n};"]}],"see_also":["addGroupIcon","clearGroupIcons","getGroupIcon","getGroupIconParams","groupIconSelectable","groupIconsVisible","removeGroupIcon","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible","onGroupIconOverEnter","onGroupIconOverLeave"]},{"name":"onGroupIconOverEnter","title":"onGroupIconOverEnter","type":"command","url":"https://community.bistudio.com/wiki/onGroupIconOverEnter","revid":369394,"updated":"2024-09-03T18:43:18Z","groups":["High Command","Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Defines an action performed when player moves pointer over group marker (3D or in a map). The code will execute continuously while pointer is over icon.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.58 a Mission Event Handler exists and should be used.","syntaxes":[{"syntax":"onGroupIconOverEnter command","params":[{"name":"command","type":"String or Code","type_expr":"String | Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"command"}}],"examples":[{"text":"```sqf\nonGroupIconOverEnter\n{\n    // passed values for _this are:\n    params [\"_is3D\", \"_group\", \"_wpID\", \"_posX\", \"_posY\", \"_shift\", \"_ctrl\", \"_alt\"];\n\n    // before Arma 3\n    _is3D = _this select 0;\n    _group = _this select 1;\n    _wpID = _this select 2;\n    _posx = _this select 3;\n    _posy = _this select 4;\n    _shift = _this select 5;\n    _ctrl = _this select 6;\n    _alt = _this select 7;\n\n    _message = format [\"____ Info ____\"];\n    {_message = _message + format [\"\\n %1\",_x]} forEach _this;\n    hint _message;\n};\n```","code":["onGroupIconOverEnter\n{\n\t// passed values for _this are:\n\tparams [\"_is3D\", \"_group\", \"_wpID\", \"_posX\", \"_posY\", \"_shift\", \"_ctrl\", \"_alt\"];\n\n\t// before Arma 3\n\t_is3D = _this select 0;\n\t_group = _this select 1;\n\t_wpID = _this select 2;\n\t_posx = _this select 3;\n\t_posy = _this select 4;\n\t_shift = _this select 5;\n\t_ctrl = _this select 6;\n\t_alt = _this select 7;\n\n\t_message = format [\"____ Info ____\"];\n\t{_message = _message + format [\"\\n %1\",_x]} forEach _this;\n\thint _message;\n};"]}],"see_also":["onGroupIconClick","onGroupIconOverLeave","groupIconSelectable","setGroupIconsSelectable"]},{"name":"onGroupIconOverLeave","title":"onGroupIconOverLeave","type":"command","url":"https://community.bistudio.com/wiki/onGroupIconOverLeave","revid":369294,"updated":"2024-09-03T18:42:50Z","groups":["High Command","Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Defines an action performed when pointer, previously positioned over icon, is moved away from it (3D or in a map). The code is executed once.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.58 a Mission Event Handler exists and should be used.","syntaxes":[{"syntax":"onGroupIconOverLeave command","params":[{"name":"command","type":"String or Code","type_expr":"String | Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"command"}}],"examples":[{"text":"```sqf\nonGroupIconOverLeave\n{\n    // passed values for _this are:\n    params [\"_is3D\", \"_group\", \"_wpID\", \"_posX\", \"_posY\", \"_shift\", \"_ctrl\", \"_alt\"];\n\n    // before Arma 3\n    _is3D = _this select 0;\n    _group = _this select 1;\n    _wpID = _this select 2;\n    _posx = _this select 3;\n    _posy = _this select 4;\n    _shift = _this select 5;\n    _ctrl = _this select 6;\n    _alt = _this select 7;\n\n    _message = format [\"____ Info ____\"];\n    { _message = _message + format [\"\\n %1\",_x] } forEach _this;\n    hint _message;\n};\n```","code":["onGroupIconOverLeave\n{\n\t// passed values for _this are:\n\tparams [\"_is3D\", \"_group\", \"_wpID\", \"_posX\", \"_posY\", \"_shift\", \"_ctrl\", \"_alt\"];\n\n\t// before Arma 3\n\t_is3D = _this select 0;\n\t_group = _this select 1;\n\t_wpID = _this select 2;\n\t_posx = _this select 3;\n\t_posy = _this select 4;\n\t_shift = _this select 5;\n\t_ctrl = _this select 6;\n\t_alt = _this select 7;\n\n\t_message = format [\"____ Info ____\"];\n\t{ _message = _message + format [\"\\n %1\",_x] } forEach _this;\n\thint _message;\n};"]}],"see_also":["onGroupIconClick","onGroupIconOverEnter","groupIconSelectable","setGroupIconsSelectable"]},{"name":"onHCGroupSelectionChanged","title":"onHCGroupSelectionChanged","type":"command","url":"https://community.bistudio.com/wiki/onHCGroupSelectionChanged","revid":369345,"updated":"2024-09-03T18:43:02Z","groups":["High Command","Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Defines an action performed when high command group selection has been changed.\nCommand receives 2 variables:\n\n- _group: Group - last selected/deselected group\n- _isSelected: Boolean - new selection state of the specific group\n\nThe code is executed on every hc group selection change until it is replaced or removed (see Example 3).\n\n> [!IMPORTANT]\n> Using the command again will **overwrite** the previously set code.\n\n> [!NOTE]\n> Since Arma 3 v1.58 a stackable version of this EH is available: HCGroupSelectionChanged","syntaxes":[{"syntax":"onHCGroupSelectionChanged code","params":[{"name":"code","type":"String or Code","type_expr":"String | Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"code"}}],"examples":[{"text":"```sqf\nonHCGroupSelectionChanged {\n    if (_isSelected) then\n    {\n        hint format [\"Group %1 has been selected.\", _group];\n    }\n    else\n    {\n        hint format [\"Group %1 has been deselected.\", _group];\n    };\n};\n```","code":["onHCGroupSelectionChanged {\n\tif (_isSelected) then\n\t{\n\t\thint format [\"Group %1 has been selected.\", _group];\n\t}\n\telse\n\t{\n\t\thint format [\"Group %1 has been deselected.\", _group];\n\t};\n};"]},{"code":["onHCGroupSelectionChanged \"player globalChat 'HC group selection has been changed.';\";"]},{"text":"Remove event handler:\n\n```sqf\nonHCGroupSelectionChanged \"\";\n// or\nonHCGroupSelectionChanged {};\n```","code":["onHCGroupSelectionChanged \"\";\n// or\nonHCGroupSelectionChanged {};"]}],"see_also":["High Command","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","onCommandModeChanged"]},{"name":"onMapSingleClick","title":"onMapSingleClick","type":"command","url":"https://community.bistudio.com/wiki/onMapSingleClick","revid":377823,"updated":"2026-01-03T04:21:02Z","groups":["Map","Event Handlers"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Defines the action performed when user clicks in map by executing command string. The code is executed on every click, until the **command** is\n\n- removed via `onMapSingleClick \"\"`, or\n- replaced by `onMapSingleClick \"SomeOtherCommand(s)\"`\n\nIn Arma 3 the code should return true only if you wish to override default engine handling of the mouse click on map (see Example 4).\nFor older games, when click is processed, code should ultimately return true back to the engine. If false is returned, default processing by the game engine is done.\nReturn value of any other type (including Nothing) is an error. In such case default processing by the game engine is done, and error message may be displayed.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.58 the stackable MapSingleClick Mission Event Handler is available and should be used instead.","syntaxes":[{"syntax":"onMapSingleClick command","params":[{"name":"command","type":"String or Code","description":"code executed on click. The following variables are available:\n\n- _pos: Position2D - clicked position\n- _units: Array of Objects - units which were selected (via function keys) **before** opening the map (*may be non-functional in Arma*)\n- _shift: Boolean - Whether <kbd>⇧ Shift</kbd> was pressed when clicking on the map\n- _alt: Boolean - Whether <kbd>Alt</kbd> was pressed when clicking on the map","type_expr":"String | Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"command"}},{"syntax":"params onMapSingleClick command","params":[{"name":"params","type":"Anything","type_expr":"Anything"},{"name":"command","type":"String or Code","description":"code executed on click. The following variables are available:\n\n- _this: Anything - Params passed to onMapSingleClick\n- _pos: Position2D - clicked position\n- _units: Array of Objects - units which were selected (via function keys) **before** opening the map (*may be non-functional in Arma*)\n- _shift: Boolean - Whether <kbd>⇧ Shift</kbd> was pressed when clicking on the map\n- _alt: Boolean - Whether <kbd>Alt</kbd> was pressed when clicking on the map","type_expr":"String | Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"params"},"right":{"text":"command"}}],"examples":[{"text":"**Armed Assault:** Creates a soldier unit at the position clicked:\n\n```sqf\nonMapSingleClick \"'SoldierWB' createUnit [_pos, group player]; true\";\n```","code":["onMapSingleClick \"'SoldierWB' createUnit [_pos, group player]; true\";"]},{"text":"**Armed Assault:** Orders \"grp1\" to move to position clicked. Disables further map-click actions:\n\n```sqf\nonMapSingleClick \"grp1 move _pos; onMapSingleClick ''; true\";\n```","code":["onMapSingleClick \"grp1 move _pos; onMapSingleClick ''; true\";"]},{"text":"**Operation Flashpoint:** Single quotes cannot be used for string definition, so two double-quotes have to be used instead:\n\n```sqf\nonMapSingleClick \"'SoldierWB' createUnit [_pos, group player]; true\";\n```","code":["onMapSingleClick \"'SoldierWB' createUnit [_pos, group player]; true\";"]},{"code":["// The following code will disable Shift+click waypoint marker creation\nonMapSingleClick {_shift};"]},{"code":["// Pass params to onMapSingleClick code\nplayer onMapSingleClick { hint (\"Hello \" + name _this) }; // Hello KK"]},{"code":["// Pass params to onMapSingleClick code -and- disable Shift+click waypoint marker creation\n player onMapSingleClick \"hint (\"\"Hello \"\" + name _this); _shift\"; // Hello KK"]}],"see_also":["onGroupIconClick"],"notes":[{"user":"General Barron","date":"2009-07-08T02:25:00Z","text":"See my [Multiple OnMapSingleClick](http://www.ofpec.com/editors-depot/index.php?action=details&id=292&game=ArmA) script to allow you to add multiple events to the onMapSingleClick event. Some minor editing of the scripts would be required to use them in Arma."},{"user":"Killzone_Kid","date":"2016-04-01T00:25:00Z","text":"`_units` param is supposed to return what groupSelectedUnits returns. Player must be leader and some units in the group must be selected on the group bar. However selected units are connected with group orders menu, which interferes with map click. In other words, when you click on the main map, the map gets focus and group orders menu closes, deselecting any selected unit, so `_units` is [] pretty much all the time."}]},{"name":"onPlayerConnected","title":"onPlayerConnected","type":"command","url":"https://community.bistudio.com/wiki/onPlayerConnected","revid":369528,"updated":"2024-09-15T18:22:20Z","groups":["Multiplayer","Event Handlers"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"server_exec":true},"description":"This command will execute the provided code on the server whenever a player connects to a multiplayer session.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.58 a stackable MissionEventHandler is available and should be used: PlayerConnected.\n> Before that, the functions BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler should be used instead in order to keep compatibility between official and community content.","syntaxes":[{"syntax":"onPlayerConnected code","params":[{"name":"code","type":"String or Code","description":"has access to the following variables:\n\n- **_id**: Number - is the unique DirectPlay ID. Quite useless as the number is too big for in-built string representation and gets rounded. It is also the same id used for user placed markers.\n- **_uid**: String - is getPlayerUID of the joining player. In Arma 3 it is also the same as Steam ID.\n- **_name**: String - is profileName of the joining player.\n- Arma 3 v1.50 **_jip**: Boolean - is a flag that indicates whether or not the player joined after the mission has started (**J**oined **I**n **P**rogress). true when the player is JIP, otherwise false.\n- Arma 3 v1.50 **_owner**: Number - is owner id of the joining player. Can be used for kick or ban purposes or just for publicVariableClient.\n- Arma 3 v1.96 **_idstr**: String - same as `_id` but in string format, so could be exactly compared to user marker ids.","type_expr":"String | Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"code"}}],"examples":[{"code":["onPlayerConnected \"[_id, _name] execVM 'PlayerConnected.sqf';\";"]},{"code":["onPlayerConnected { diag_log [_id, _uid, _name] };"]},{"text":"From Arma 3 v1.49:\n\n```sqf\nonPlayerConnected {\n    somevar = random 123;\n    _owner publicVariableClient \"somevar\";\n    // this will define \"somevar\" to a random value on the joining machine\n};\n```","code":["onPlayerConnected {\n\tsomevar = random 123;\n\t_owner publicVariableClient \"somevar\";\n\t// this will define \"somevar\" to a random value on the joining machine\n};"]}],"multiplayer":"> [!IMPORTANT]\n> A player with the **_name** `__SERVER__` will also connect to a multiplayer game, executing *code*.","see_also":["onPlayerDisconnected","didJIP","didJIPOwner"]},{"name":"onPlayerDisconnected","title":"onPlayerDisconnected","type":"command","url":"https://community.bistudio.com/wiki/onPlayerDisconnected","revid":369204,"updated":"2024-09-03T10:34:50Z","groups":["Multiplayer","Event Handlers"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"server_exec":true},"description":"This command will execute attached code whenever a player is leaving an MP session. The code will receive a number of special variables:","syntaxes":[{"syntax":"onPlayerDisconnected code","params":[{"name":"code","type":"String or Code","description":"code executed. The code will receive a number of special variables:\n\n- _id: Number - Is the unique DirectPlay ID. Quite useless as the number is too big for in-built string representation and gets rounded. It is also the same id used for user placed markers.\n- _uid: String - Is getPlayerUID of the leaving player. In Arma 3 it is also the same as Steam ID.\n- _name: String - Is profileName of the leaving player.\n- Arma 3 v1.50 _jip: Boolean - Is a flag that indicated whether or not the player joined after the mission has started (**J**oined **I**n **P**rogress). true - if the player was JIP, otherwise false.\n- Arma 3 v1.50 _owner: Number - Is owner id of the leaving player. Can be used for kick or ban purposes or just for publicVariableClient.\n- Arma 3 v1.96 _idstr: String - Same as `_id` but in string format, so could be exactly compared to user marker ids.","type_expr":"String | Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"code"}}],"examples":[{"code":["onPlayerDisconnected {diag_log [_id, _uid, _name]};"]},{"text":"```sqf\nonPlayerDisconnected {\n    if (count allPlayers == 0) then {\n        endMission \"END1\";\n    };\n};\n```","code":["onPlayerDisconnected {\n\tif (count allPlayers == 0) then {\n\t\tendMission \"END1\";\n\t};\n};"]}],"multiplayer":"In multiplayer onPlayerDisconnected is executed only on the server.\n\n> [!NOTE]\n> **Arma 3:** Use playerDisconnected or HandleDisconnect instead in Arma 3.","see_also":["onPlayerConnected","didJIP","didJIPOwner","Arma 3: Mission Event Handlers"]},{"name":"onPreloadFinished","title":"onPreloadFinished","type":"command","url":"https://community.bistudio.com/wiki/onPreloadFinished","revid":379455,"updated":"2026-10-31T00:08:48Z","groups":["Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Defines an action performed after the preload screen finished. Preload event occurs after briefing screen on mission start.\n\n> [!IMPORTANT]\n> This event handler also fires on client after user closes the main map.\n\n> [!NOTE]\n> **Arma 3:**\n>\n> - Since Arma 3 v1.58 a stackable version of this EH is available: PreloadFinished\n> - Before that, the BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler functions should be used instead.","syntaxes":[{"syntax":"onPreloadFinished command","params":[{"name":"command","type":"String or Code","type_expr":"String | Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"command"}}],"examples":[{"code":["onPreloadFinished {TAG_ReceivingScreenDone = true};"]},{"code":["// removes the event immediately after the first run again\nonPreloadFinished { TAG_ReceivingScreenDone = true; onPreloadFinished \"\" };"]}],"see_also":["onPreloadStarted"],"notes":[{"user":"Tophe","date":"2009-07-24T00:00:00Z","text":"There is a bug in Arma 2 that will make this command execute every time the screen with \"Receiving...\" has been displayed.\nIf this code is put in the Init.sqf it will run the startcam.sqf script when the loading screen has disappeared\n\n```sqf\nonPreloadFinished '[fire1] execVM \"scripts\\startcam.sqf\"';\n```\n\nIt will however also run every time a player change graphics settings, alt-tab or do anything else that will trigger the loading screen.\nYou will have to script around it with if statements to get it to run only in the beginning of the mission."}]},{"name":"onPreloadStarted","title":"onPreloadStarted","type":"command","url":"https://community.bistudio.com/wiki/onPreloadStarted","revid":352159,"updated":"2024-02-01T23:25:23Z","groups":["Event Handlers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Defines an action performed just before the preload screen started. Preload event occurs after briefing screen on mission start.\n\n> [!IMPORTANT]\n> This event handler also fires on client after user closes the main map.\n\n> [!NOTE]\n> Since **Arma 3** *v1.57* a stackable version of this EH is available: PreloadStarted\n\n> [!NOTE]\n> **Arma 3:** In order to keep compatibility between official and community content the functions BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler should be used instead.","syntaxes":[{"syntax":"onPreloadStarted command","params":[{"name":"command","type":"String or Code","type_expr":"String | Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"command"}}],"examples":[{"code":["onPreloadStarted {diag_log \"preload started\"};"]}],"see_also":["onPreloadFinished"]},{"name":"onShowNewObject","title":"onShowNewObject","type":"command","url":"https://community.bistudio.com/wiki/onShowNewObject","revid":363234,"updated":"2024-03-26T10:51:09Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Defines an action performed when the user right clicks on the map and,selects New Object. Set to empty for default behavior. Command receives:,_pos array position,\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map onShowNewObject command","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"command","type":"String","type_expr":"String"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"map"},"right":{"text":"command"}}],"examples":[{"text":"-"}]},{"name":"onTeamSwitch","title":"onTeamSwitch","type":"command","url":"https://community.bistudio.com/wiki/onTeamSwitch","revid":353308,"updated":"2024-03-15T17:11:45Z","groups":["Team Switch","Event Handlers"],"status":"deprecated","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Defines an action performed when the team switch is finished.\nCommandset receives the following special variables: *_from* object previous unit, *_to* object current unit.\nConsecutive use of onTeamSwitch command will overwrite previously set commandset.\n\n> [!IMPORTANT]\n> This command is deprecated. Since **Arma 3** *v1.57* a stackable version of this EH is available: TeamSwitch\n\n> [!NOTE]\n> When player switches and leaves behind AI unit, you need to enable \"TeamSwitch\" AI on it (with `onTeamSwitch { _from enableAI \"TeamSwitch\" };`) so that the unit continues with waypoints.","syntaxes":[{"syntax":"onTeamSwitch commandset","params":[{"name":"commandset","type":"String or Code","type_expr":"String | Code"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"commandset"}}],"examples":[{"code":["onTeamSwitch { [_from, _to] execVM \"myTeamSwitchScript.sqf\"; };"]}],"see_also":["Team Switch","enableTeamSwitch","onBriefingTeamSwitch","teamSwitch","teamSwitchEnabled"]},{"name":"openCuratorInterface","title":"openCuratorInterface","type":"command","url":"https://community.bistudio.com/wiki/openCuratorInterface","revid":321434,"updated":"2022-05-14T14:17:08Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"effect":"local"},"description":"Force opens curator interface.","syntaxes":[{"syntax":"openCuratorInterface","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"text":"Open interface:\n\n```sqf\nopenCuratorInterface;\n```","code":["openCuratorInterface;"]},{"text":"Close interface:\n\n```sqf\nfindDisplay 312 closeDisplay 2;\n```","code":["findDisplay 312 closeDisplay 2;"]},{"text":"Detect if user used \"Zeus\" key to open curator interface in the absence of event handler for it:\n\n```sqf\nfindDisplay 46 displayAddEventHandler [\"KeyDown\", {\n    if (inputAction \"CuratorInterface\" > 0) then\n    {\n        hint \"Curator interface is open\";\n    };\n    false\n}];\n```","code":["findDisplay 46 displayAddEventHandler [\"KeyDown\", {\n\tif (inputAction \"CuratorInterface\" > 0) then\n\t{\n\t\thint \"Curator interface is open\";\n\t};\n\tfalse\n}];"]}],"see_also":["Arma 3: Curator"]},{"name":"openDLCPage","title":"openDLCPage","type":"command","url":"https://community.bistudio.com/wiki/openDLCPage","revid":286224,"updated":"2021-06-21T20:52:06Z","groups":["DLC"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Opens a Steam page of the app with given appId. Only works for known appId (game + linked DLCs)","syntaxes":[{"syntax":"openDLCPage dlcID","params":[{"name":"dlcID","type":"Number","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"result"},"form":"unary","right":{"text":"dlcID"}}],"examples":[{"text":"openDLCPage 288520"}],"see_also":["isDLCAvailable"]},{"name":"openGPS","title":"openGPS","type":"command","url":"https://community.bistudio.com/wiki/openGPS","revid":310316,"updated":"2022-05-05T16:28:36Z","groups":["Interaction"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","description":"Opens or closes minimap if player has `\"ItemGPS\"` linked in inventory and `\"MinimapDisplayComponent\"` is not disabled with enableInfoPanelComponent. Returns true on success. If more than one minimap is open (see infoPanels, infoPanel) each call to the command will close only 1 minimap. Visibility of minimap can be checked with visibleGPS command.","syntaxes":[{"syntax":"openGPS open","params":[{"name":"open","type":"Boolean","description":"true to open, false to close","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success"},"form":"unary","right":{"text":"open"}}],"examples":[{"code":["player linkItem \"ItemGPS\";\nprivate _success = openGPS true;"]},{"text":"To close all opened minimaps:\n\n```sqf\nwhile { openGPS false } do { };\n// or\nwhile { visibleGPS } do { openGPS false };\n```","code":["while { openGPS false } do { };\n// or\nwhile { visibleGPS } do { openGPS false };"]}],"see_also":["showGPS","shownGPS","visibleGPS"]},{"name":"openMap","title":"openMap","type":"command","url":"https://community.bistudio.com/wiki/openMap","revid":349654,"updated":"2023-11-18T17:02:30Z","groups":["Map","Interaction"],"status":"ok","games":{"arma2":"1.03","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.03","arma3_since":"0.50","locality":{"effect":"local"},"description":"Opens or closes in-game map.\n\n> [!WARNING]\n> If `forced` param is set to true and map is set to open, when the map is opened it cannot be closed manually and the user can get stuck requiring the game restart.\n>\n> Make sure you provide scripted mechanics to resolve this, should you need to force the map.\n>\n> Useful when you wish to keep user for example on respawn screen, where they could still interact with the map but cannot enter the game until the time is up.","syntaxes":[{"syntax":"openMap show","params":[{"name":"show","type":"Boolean","description":"if true opens map, if false closes map, provided it is not *forced*","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"equivalent of visibleMap"},"form":"unary","right":{"text":"show"}},{"syntax":"openMap [show, forced]","params":[{"name":"show","type":"Boolean","description":"if true opens map, if false closes map, provided it is not *forced*.","type_expr":"Boolean"},{"name":"forced","type":"Boolean","description":"if true keeps map from closing when map is open. Arma 3 v2.06 if false, forces map to stay closed if *show* is false (see Example 1)","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"equivalent of visibleMap"},"form":"unary","right":{"text":"[show, forced]"}}],"examples":[{"text":"```sqf\nopenMap [true, false];    // opens map normally\nopenMap [false, false];    // closes an opened map normally\nopenMap [true, true];    // force opens map and keeps it open (the user cannot close it on their own)\nopenMap [false, true];    // since Arma 3 2.06: prevents map from opening, closes open map and forces it to stay close (the user cannot open it on their own)\n```","code":["openMap [true, false];\t// opens map normally\nopenMap [false, false];\t// closes an opened map normally\nopenMap [true, true];\t// force opens map and keeps it open (the user cannot close it on their own)\nopenMap [false, true];\t// since Arma 3 2.06: prevents map from opening, closes open map and forces it to stay close (the user cannot open it on their own)"]}],"see_also":["forceMap","forcedMap","visibleMap","showMap","shownMap"],"notes":[{"user":"Fraali","date":"2021-12-08T11:00:58Z","text":"(**As of Arma 3 ver.2.06.148470**)\nTrying to close a map using `openMap false` inside of a map event handler like\n\n```sqf\naddMissionEventHandler [\"Map\", { openMap false }];\n```\n\nwill cause the game to crash.\nTo fix this, please use it inside of a spawned script.\n\n```sqf\naddMissionEventHandler [\"Map\", { 0 spawn { openMap false }; }];\n```\n\nThis should stop any issue of crashing when you close the map."}]},{"name":"openSteamApp","title":"openSteamApp","type":"command","url":"https://community.bistudio.com/wiki/openSteamApp","revid":309224,"updated":"2022-05-04T10:07:21Z","groups":["System"],"status":"ok","games":{"arma3":"1.78"},"since":"arma3 1.78","arma3_since":"1.78","description":"Opens a Steam application, returns false if it was not possible to run the application.","syntaxes":[{"syntax":"openSteamApp appID","params":[{"name":"appID","type":"Number","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"appID"}}],"examples":[{"code":["openSteamApp 553228;"]}],"see_also":["getSteamFriendsServers","openYoutubeVideo"],"notes":[{"user":".kju","date":"2018-08-02T14:26:00Z","text":"It seems like it was limited to bohemia stuff. Like launching 'Arma 3 Community Guide Series: Zeus DLC'."}]},{"name":"openYoutubeVideo","title":"openYoutubeVideo","type":"command","url":"https://community.bistudio.com/wiki/openYoutubeVideo","revid":339601,"updated":"2023-04-28T14:11:50Z","groups":["System"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Opens Steam overlay with given YT video. Video URL is the end part of the YT URL, starting with **watch?v=...**. If the user has Steam overlay disabled, the command will display appropriate message to the user and return false.","syntaxes":[{"syntax":"openYoutubeVideo youTubeUrl","params":[{"name":"youTubeUrl","type":"String","description":"for parameters see: https://developers.google.com/youtube/player_parameters","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"youTubeUrl"}}],"examples":[{"code":["// open http://www.youtube.com/watch?v=UBIAbm7Rt78\n_isOpened = openYoutubeVideo \"watch?v=UBIAbm7Rt78\";"]}],"see_also":["openDSInterface","openMap"],"notes":[{"user":"celoush","date":"2018-05-25T15:03:00Z","text":"[SITREP 00061](https://dev.arma3.com/post/sitrep-00061): For security reasons we have restricted its use to outside scenarios only (e.g. in the game's UI or a mod's UI)."}]},{"name":"opfor","title":"opfor","type":"command","url":"https://community.bistudio.com/wiki/opfor","revid":369180,"updated":"2024-09-03T10:34:45Z","groups":["Sides"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Pre-defined variable for the opfor side.","syntaxes":[{"syntax":"opfor","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (side player == opfor) then\n{\n    hint \"OPFOR\";\n};\n```","code":["if (side player == opfor) then\n{\n\thint \"OPFOR\";\n};"]}],"aliases":["east"],"see_also":["side","civilian","blufor","east","independent","resistance","west"]},{"name":"or","title":"or","type":"command","url":"https://community.bistudio.com/wiki/or","revid":369315,"updated":"2024-09-03T18:42:56Z","groups":["Math","Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns true if one or both conditions are true. In case of the alternative syntax, [lazy evaluation](https://en.wikipedia.org/wiki/Lazy_evaluation#Control_structures) is used. That means that if left operand is true, evaluation of the right side is skipped completely.","syntaxes":[{"syntax":"a or b","params":[{"name":"a","type":"Boolean","description":"test condition or variable","type_expr":"Boolean"},{"name":"b","type":"Boolean","description":"test condition or variable","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}},{"syntax":"a or b","since":"arma2oa 1.62","params":[{"name":"a","type":"Boolean","description":"test condition or variable","type_expr":"Boolean"},{"name":"b","type":"Code","description":"code that returns Boolean. It is not evaluated if *a* returns true","type_expr":"Code"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"a"},"right":{"text":"b"}}],"examples":[{"code":["if (_obj1 or (_enemycount == 0) or (not alive _enemyGeneral)) then { hint \"you win !\"; };"]},{"text":"```sqf\n// without lazy evaluation, select would throw an error in the event of an empty array\nif ((count _array == 0) or { (_array select 0) != player }) then\n{\n    hint \"It works!\";\n};\n```","code":["// without lazy evaluation, select would throw an error in the event of an empty array\nif ((count _array == 0) or { (_array select 0) != player }) then\n{\n\thint \"It works!\";\n};"]}],"aliases":["a or b"],"see_also":["a or b","and","Operators"]},{"name":"orderGetIn","title":"orderGetIn","type":"command","url":"https://community.bistudio.com/wiki/orderGetIn","revid":377143,"updated":"2026-01-01T10:31:44Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Force all units in the array to get in or out of their assigned vehicles. Units must be assigned to a vehicle before this command will do anything.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"unitArray orderGetIn order","params":[{"name":"unitArray","type":"Array of Objects","type_expr":"Array<Object>"},{"name":"order","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitArray"},"right":{"text":"order"}}],"examples":[{"code":["[_unitOne, _unitTwo] orderGetIn true;"]},{"code":["[_unitOne, _unitTwo] orderGetIn false;"]}],"see_also":["allowGetIn","addVehicle","assignAsCargo","assignAsCommander","assignAsDriver","assignAsGunner"]},{"name":"overcast","title":"overcast","type":"command","url":"https://community.bistudio.com/wiki/overcast","revid":310759,"updated":"2022-05-07T20:21:35Z","groups":["Environment"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return the current overcast level. Zero is clear skies, one is maximum cloud cover.","syntaxes":[{"syntax":"overcast","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_cloudLevel = overcast;"]}],"multiplayer":"Before Arma 3, each client and the server can have differing overcast values.","see_also":["overcastForecast","setOvercast","nextWeatherChange"]},{"name":"overcastForecast","title":"overcastForecast","type":"command","url":"https://community.bistudio.com/wiki/overcastForecast","revid":310793,"updated":"2022-05-07T20:21:53Z","groups":["Environment"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return the overcast forecast.","syntaxes":[{"syntax":"overcastForecast","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_forecast = overcastForecast;"]}],"see_also":["overcast","rain","fog"]},{"name":"owner","title":"owner","type":"command","url":"https://community.bistudio.com/wiki/owner","revid":363241,"updated":"2024-03-26T10:51:18Z","groups":["Multiplayer"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","server_exec":true},"description":"On server machine, returns the machine network ID of the client to which the object is local. Otherwise returns 0. For use on clients clientOwner command is available. To find out the owner of a Group, use groupOwner.","syntaxes":[{"syntax":"owner object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_clientID = owner _someobject;"]}],"see_also":["publicVariableClient","setOwner","setGroupOwner","groupOwner","flagOwner","onPlayerConnected","didJIPOwner","local","admin","remoteExecutedOwner"]},{"name":"param","title":"param","type":"command","url":"https://community.bistudio.com/wiki/param","revid":369264,"updated":"2024-09-03T18:42:42Z","groups":["Variables","Arrays"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","description":"Extracts a single value with given index from input argument, similar to BIS_fnc_param. When used without argument, as shown in main syntax, internal variable _this, which is usually available inside functions and event handlers, is used as argument. If input argument is not an array, it will be converted to 1 element array.\n\nIf extracted item of input with given index is undefined, of the wrong type or of the wrong length (if the item is an array), default value is used instead. Since Arma 3 v1.54, onscreen errors are displayed for when the input is of the wrong type or size.","syntaxes":[{"syntax":"param [index, defaultValue, expectedDataTypes, expectedArrayCount]","params":[{"name":"index","type":"Number","description":"index of required item in the input array.","type_expr":"Number"},{"name":"defaultValue","type":"Anything","optional":true,"description":"a default value to return if input is undefined, of the wrong type or of the wrong length (if the item is an array).","type_expr":"Anything","text":"defaultValue: Anything - (Optional) a default value to return if input is undefined, of the wrong type or of the wrong length (if the item is an array)."},{"name":"expectedDataTypes","type":"Array of direct Data Types","optional":true,"description":"checks if passed value is one of listed Data Types. If not, default value is used instead. Empty array [] means every data type is accepted.","type_expr":"Array","text":"expectedDataTypes: Array of direct Data Types - (Optional) checks if passed value is one of listed Data Types. If not, default value is used instead. Empty array [] means every data type is accepted."},{"name":"expectedArrayCount","type":"Number or Array","optional":true,"description":"a single size or array of sizes. If passed input value is an array, checks that it has a certain number of elements. If not, default value is used instead. Empty array [] means any size is accepted.","type_expr":"Number | Array","text":"expectedArrayCount: Number or Array - (Optional) a single size or array of sizes. If passed input value is an array, checks that it has a certain number of elements. If not, default value is used instead. Empty array [] means any size is accepted."}],"returns":{"type":"Anything","type_expr":"Anything","description":"extracted value on success or default value otherwise. Nothing if syntax error occurred."},"form":"unary","right":{"text":"[index, defaultValue, expectedDataTypes, expectedArrayCount]"}},{"syntax":"argument param [index, defaultValue, expectedDataTypes, expectedArrayCount]","params":[{"name":"argument","type":"Anything","description":"a usual array of params is expected. If a non-array value is passed, it will be converted to 1 element array","type_expr":"Anything"},{"name":"index","type":"Number","description":"index of required item in the input array.","type_expr":"Number"},{"name":"defaultValue","type":"Anything","optional":true,"description":"a default value to return if input is undefined, of the wrong type or of the wrong length (if the item is an array).","type_expr":"Anything","text":"defaultValue: Anything - (Optional) a default value to return if input is undefined, of the wrong type or of the wrong length (if the item is an array)."},{"name":"expectedDataTypes","type":"Array of direct Data Types","optional":true,"description":"checks if passed value is one of listed Data Types. If not, default value is used instead. Empty array [] means every data type is accepted.","type_expr":"Array","text":"expectedDataTypes: Array of direct Data Types - (Optional) checks if passed value is one of listed Data Types. If not, default value is used instead. Empty array [] means every data type is accepted."},{"name":"expectedArrayCount","type":"Number or Array","optional":true,"description":"a single size or array of sizes. If passed input value is an array, checks that it has a certain number of elements. If not, default value is used instead. Empty array [] means any size is accepted.","type_expr":"Number | Array","text":"expectedArrayCount: Number or Array - (Optional) a single size or array of sizes. If passed input value is an array, checks that it has a certain number of elements. If not, default value is used instead. Empty array [] means any size is accepted."}],"returns":{"type":"Anything","type_expr":"Anything","description":"extracted value on success or default value otherwise. Nothing if syntax error occurred."},"form":"binary","left":{"text":"argument"},"right":{"text":"[index, defaultValue, expectedDataTypes, expectedArrayCount]"}}],"examples":[{"text":"```sqf\n[1, 2, 3] call\n{\n    private _one = param [0, 1];\n    private _two = param [1, 2];\n    private _three = param [2, 3];\n    // ...\n};\n```","code":["[1, 2, 3] call \n{\n\tprivate _one = param [0, 1];\n\tprivate _two = param [1, 2];\n\tprivate _three = param [2, 3];\n\t// ...\n};"]},{"text":"```sqf\n[123] call\n{\n    private _val = param [0];\n};\n\n// Below would produce the same result as above\n123 call\n{\n    private _val = param [0];\n};\n```","code":["[123] call \n{\n\tprivate _val = param [0];\n};\n\n// Below would produce the same result as above\n123 call \n{\n\tprivate _val = param [0];\n};"]},{"text":"```sqf\n_z = position player param [2, 0];\nif (_z > 10) then\n{\n    hint \"YOU ARE FLYING!\";\n};\n```","code":["_z = position player param [2, 0];\nif (_z > 10) then \n{\n\thint \"YOU ARE FLYING!\";\n};"]},{"text":"```sqf\nfnc =\n{\n    private _pos = param [0, [0,0,0], [objNull, []], [2,3]];\n    private _rad = param [1, 0, [0]];\n    _pos nearObjects _rad;\n};\n\n[position player, 25] call fnc; // ok\n[player, 25] call fnc; // ok\n[25, player] call fnc; // default values are used\n```","code":["fnc = \n{\n\tprivate _pos = param [0, [0,0,0], [objNull, []], [2,3]];\n\tprivate _rad = param [1, 0, [0]];\n\t_pos nearObjects _rad;\n};\n\n[position player, 25] call fnc; // ok\n[player, 25] call fnc; // ok\n[25, player] call fnc; // default values are used"]}],"see_also":["params","select","set","resize","reverse","in","find","findIf","toArray","toString","forEach","count","deleteAt","deleteRange","append","sort","arrayIntersect","splitString","joinString","isEqualTypeAll","isEqualType","isEqualTypeParams","isEqualTypeArray","isEqualTypeAny","typeName","BIS_fnc_param"]},{"name":"params","title":"params","type":"command","url":"https://community.bistudio.com/wiki/params","revid":377705,"updated":"2026-01-02T09:03:38Z","groups":["Variables","Arrays"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","description":"Parses input argument into array of private variables. When used without argument, as shown in main syntax, internal variable _this, which is usually available inside functions and event handlers, is used as argument.\n\nIn addition to simple parsing directly into variables, input can be tested in case it is undefined, of the wrong type or of the wrong size (if array) and substituted if necessary with default values. Since Arma 3 v1.54, onscreen errors are displayed for when the input is of the wrong type or size.\n\n> [!WARNING]\n> All variables names must start with underscore and be enclosed in quotes: `params [\"_myVar1\", \"_myVar2\"];`\n\n> [!NOTE]\n> It is a good practice to make your local variables **private** (through private or params) in order to avoid overwriting a local variable of the same name.","syntaxes":[{"syntax":"params [element1, element2, ...]","params":[{"name":"elementN","type":"String or Array","description":"String or Array\n\n- String:name of the private variable (must begin with underscore _, e.g. \"_myVar\", or can be an empty string \"\", in which case the element is skipped)\n- Array with [variableName, defaultValue, expectedDataTypes, expectedArrayCount]\n  - variableName: String - name of a private variable (must begin with underscore _, e.g. \"_myVar\")\n  - defaultValue: Anything - default value to return if input element is undefined, of the wrong type or of the wrong size (if array).\n  - expectedDataTypes: Array of direct Data Types - (Optional) checks if passed value is one of listed Data Types. If not, default value is used instead. Empty array [] means every data type is accepted.\n  - expectedArrayCount: Number or Array - (Optional) a single size or array of sizes. If passed input value is an array, checks that it has a certain number of elements. If not, default value is used instead. Empty array [] means any size is accepted.","type_expr":"String | Array","text":"elementN: String or Array\n\n- String:name of the private variable (must begin with underscore _, e.g. \"_myVar\", or can be an empty string \"\", in which case the element is skipped)\n- Array with [variableName, defaultValue, expectedDataTypes, expectedArrayCount]\n  - variableName: String - name of a private variable (must begin with underscore _, e.g. \"_myVar\")\n  - defaultValue: Anything - default value to return if input element is undefined, of the wrong type or of the wrong size (if array).\n  - expectedDataTypes: Array of direct Data Types - (Optional) checks if passed value is one of listed Data Types. If not, default value is used instead. Empty array [] means every data type is accepted.\n  - expectedArrayCount: Number or Array - (Optional) a single size or array of sizes. If passed input value is an array, checks that it has a certain number of elements. If not, default value is used instead. Empty array [] means any size is accepted."}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"false if error occurred or default value has been used, otherwise true"},"form":"unary","right":{"text":"[element1, element2, ...]"}},{"syntax":"argument params [element1, element2, ...]","params":[{"name":"argument","type":"Anything","description":"a usual array of params is expected. If a non-array argument is passed, it will be converted to 1 element array","type_expr":"Anything"},{"name":"elementN","type":"String or Array","description":"String or Array\n\n- String:name of the private variable (must begin with underscore _, e.g. \"_myVar\", or can be an empty string \"\", in which case the element is skipped)\n- Array with [variableName, defaultValue, expectedDataTypes, expectedArrayCount]\n  - variableName: String - name of a private variable (must begin with underscore _, e.g. \"_myVar\")\n  - defaultValue: Anything - default value to return if input element is undefined, of the wrong type or of the wrong size (if array).\n  - expectedDataTypes: Array of direct Data Types - (Optional) checks if passed value is one of listed Data Types. If not, default value is used instead. Empty array [] means every data type is accepted.\n  - expectedArrayCount: Number or Array - (Optional) a single size or array of sizes. If passed input value is an array, checks that it has a certain number of elements. If not, default value is used instead. Empty array [] means any size is accepted.","type_expr":"String | Array","text":"elementN: String or Array\n\n- String:name of the private variable (must begin with underscore _, e.g. \"_myVar\", or can be an empty string \"\", in which case the element is skipped)\n- Array with [variableName, defaultValue, expectedDataTypes, expectedArrayCount]\n  - variableName: String - name of a private variable (must begin with underscore _, e.g. \"_myVar\")\n  - defaultValue: Anything - default value to return if input element is undefined, of the wrong type or of the wrong size (if array).\n  - expectedDataTypes: Array of direct Data Types - (Optional) checks if passed value is one of listed Data Types. If not, default value is used instead. Empty array [] means every data type is accepted.\n  - expectedArrayCount: Number or Array - (Optional) a single size or array of sizes. If passed input value is an array, checks that it has a certain number of elements. If not, default value is used instead. Empty array [] means any size is accepted."}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"false if error occurred or default value has been used, otherwise true"},"form":"binary","left":{"text":"argument"},"right":{"text":"[element1, element2, ...]"}}],"examples":[{"text":"```sqf\n[1, 2, 3] call {\n    private [\"_one\", \"_two\", \"_three\"];\n    _one = _this select 0;\n    _two = _this select 1;\n    _three = _this select 2;\n    // ...\n};\n\n// Same as above, only using params\n[1, 2, 3] call {\n    params [\"_one\", \"_two\", \"_three\"];\n    // ...\n};\n```","code":["[1, 2, 3] call {\n\tprivate [\"_one\", \"_two\", \"_three\"];\n\t_one = _this select 0;\n\t_two = _this select 1;\n\t_three = _this select 2;\n\t// ...\n};\n\n// Same as above, only using params\n[1, 2, 3] call {\n\tparams [\"_one\", \"_two\", \"_three\"];\n\t// ...\n};"]},{"text":"```sqf\n[123] call {\n    params [\"_myvar\"];\n};\n\n// Below would produce the same result as above\n123 call {\n    params [\"_myvar\"];\n};\n```","code":["[123] call {\n\tparams [\"_myvar\"];\n};\n\n// Below would produce the same result as above\n123 call {\n\tparams [\"_myvar\"];\n};"]},{"text":"Skipping some array elements:\n\n```sqf\nposition player params [\"\", \"\", \"_z\"];\nif (_z > 10) then {\n    hint \"YOU ARE FLYING!\";\n};\n```","code":["position player params [\"\", \"\", \"_z\"];\nif (_z > 10) then {\n\thint \"YOU ARE FLYING!\";\n};"]},{"code":["[1, nil, 2] params [\"_var1\", \"_var2\", \"_var3\"];\n// All 3 variables are made private but only _var1 and _var3 are defined\n\n[1, nil, 2] params [\"_var1\", [\"_var2\", 23], \"_var3\"];\n// All 3 variables are private and defined"]},{"text":"```sqf\n[1, 2] call {\n    if (!params [\"_var1\", \"_var2\", [\"_var3\", true, [true]]]) exitWith {\n        hint str [_var1, _var2, _var3];\n    };\n};\n// The hint shows [1,2,true]\n// Script exits, default value was used due to missing value\n\n[1, 2, 3] call {\n    if (!params [\"_var1\", \"_var2\", [\"_var3\", true, [true]]]) exitWith {\n        hint str [_var1, _var2, _var3];\n    };\n};\n// The hint shows [1,2,true]\n// Script exits, default value was used due incorrect value type\n```","code":["[1, 2] call {\n\tif (!params [\"_var1\", \"_var2\", [\"_var3\", true, [true]]]) exitWith {\n\t\thint str [_var1, _var2, _var3];\n\t};\n};\n// The hint shows [1,2,true]\n// Script exits, default value was used due to missing value\n\n[1, 2, 3] call {\n\tif (!params [\"_var1\", \"_var2\", [\"_var3\", true, [true]]]) exitWith {\n\t\thint str [_var1, _var2, _var3];\n\t};\n};\n// The hint shows [1,2,true]\n// Script exits, default value was used due incorrect value type"]},{"text":"```sqf\n[1, \"ok\", [1, 2, 3]] call {\n    if (!params [\n        [\"_var1\", 0, [0]],\n        [\"_var2\", \"\", [\"\"]],\n        [\"_var3\", [0,0,0], [[], objNull, 0], [2,3]]\n    ]) exitWith {};\n    hint \"ok\";\n};\n// Passes validation\n\n[1, 2, [3, 4, 5]] call {\n    if (!params [\"_var1\", \"_var2\", [\"_var3\", [], [[], objNull, 0], 0]]) exitWith {};\n    hint \"ok\";\n};\n// Fails, because passed array is expected to be of 0 length, i.e. empty\n```","code":["[1, \"ok\", [1, 2, 3]] call {\n\tif (!params [\n\t\t[\"_var1\", 0, [0]],\n\t\t[\"_var2\", \"\", [\"\"]],\n\t\t[\"_var3\", [0,0,0], [[], objNull, 0], [2,3]]\n\t]) exitWith {};\n\thint \"ok\";\n};\n// Passes validation\n\n[1, 2, [3, 4, 5]] call {\n\tif (!params [\"_var1\", \"_var2\", [\"_var3\", [], [[], objNull, 0], 0]]) exitWith {};\n\thint \"ok\";\n};\n// Fails, because passed array is expected to be of 0 length, i.e. empty"]},{"text":"```sqf\n[1, 2, 3, [4, 5, 6]] call {\n    params [\"_one\", \"_two\", \"_three\"];\n    _this select 3 params [\"_four\", \"_five\", \"_six\"];\n};\n```","code":["[1, 2, 3, [4, 5, 6]] call {\n\tparams [\"_one\", \"_two\", \"_three\"];\n\t_this select 3 params [\"_four\", \"_five\", \"_six\"];\n};"]},{"text":"```sqf\n{\n    _x params [\"_group\", \"_index\"];\n    // ...\n} forEach waypoints group player;\n\nfn_someFnc = {\n    params [\"_position\", [\"_direction\", 0], [\"_name\", \"\"]];\n    // Extract the x, y, and z from \"_position\" array:\n    _position params [\"_x\", \"_y\", \"_z\"];\n    // ...\n};\n\n[position player, direction player, name player] call fn_someFnc;\n```","code":["{\n\t_x params [\"_group\", \"_index\"];\n\t// ...\n} forEach waypoints group player;\n\nfn_someFnc = {\n\tparams [\"_position\", [\"_direction\", 0], [\"_name\", \"\"]];\n\t// Extract the x, y, and z from \"_position\" array:\n\t_position params [\"_x\", \"_y\", \"_z\"];\n\t// ...\n};\n\n[position player, direction player, name player] call fn_someFnc;"]},{"text":"```sqf\nplayer addEventHandler [\"HitPart\", {\n    _this select 0 params [\"_target\", \"_shooter\", \"_projectile\"];\n}];\n```","code":["player addEventHandler [\"HitPart\", {\n\t_this select 0 params [\"_target\", \"_shooter\", \"_projectile\"];\n}];"]}],"see_also":["param","select","#"," this","isEqualTypeAll","isEqualType","isEqualTypeParams","isEqualTypeArray","isEqualTypeAny"],"notes":[{"user":"Dedmen","date":"2016-11-03T04:07:00Z","text":"With a function only taking one Parameter, it doesn't matter whether the parameter is in an array or not:\n\nExample:\n\n```sqf\n1 call {\n    params [[\"_number\",0, [0]]];\n};\n```\n\nor\n\n```sqf\n[1] call {\n    params [[\"_number\",0, [0]]];\n};\n```\n\nBut when the one Parameter is an array that parameter has to be inside of an array when the function is called\nExample:\n\n```sqf\n[1, 2] call {\n    params [[\"_array\", [], [[]], 2]];\n}; // Fails\n\n[[1,2]] call {\n    params [[\"_array\", [], [[]], 2]];\n}; // Succeeds\n```"},{"user":"7erra","date":"2019-07-04T16:54:00Z","text":"It is valid to redefine the _this variable and use params again like this:\n\n```sqf\n[1, 2, [3, 4]] call {\n    params [\"_one\", \"_two\", \"_this\"];\n    params [\"_three\", \"_four\"];\n};\n```"},{"user":"AgentRev","date":"2021-11-01T16:00:30Z","text":"Here's how to validate HashMap parameters:\n\n```sqf\n_myHashMap = createHashMapFromArray [[\"a\",1],[\"b\",2],[\"c\",3]];\n\n[_myHashMap] call {\n    params [[\"_theHashMap\",createHashMap,[createHashMap]]];\n};\n```"}]},{"name":"parentAttached","title":"parentAttached","type":"command","url":"https://community.bistudio.com/wiki/parentAttached","revid":378907,"updated":"2026-08-11T14:57:07Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"local"},"description":"Get the parent of a attachChild attached child.","syntaxes":[{"syntax":"parentAttached child","params":[{"name":"child","type":"Object","description":"Must be a Transport vehicle like Car/Tank (Maybe helicopter/airplane works?).","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"child"}}],"see_also":["attachChild","childAttached"]},{"name":"parseNumber","title":"parseNumber","type":"command","url":"https://community.bistudio.com/wiki/parseNumber","revid":378867,"updated":"2026-07-30T16:48:17Z","groups":["Strings"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Parses the string, interpreting its content as a floating point number.\n\n> [!IMPORTANT]\n> This command does **not** work with strings representing hexadecimal numbers (e.g `\"0xCF\"`).\n>\n> ```sqf\n> parseNumber \"512 + 0x2F\"; // 512, WRONG!\n> \"512 + 0x2F\" call BIS_fnc_parseNumber // 559, CORRECT!\n> ```\n\n> [!NOTE]\n> Starting whitespaces are discarded, then as many valid characters are used to be interpreted as a number until an invalid character is found then the rest of the string is ignored.","syntaxes":[{"syntax":"parseNumber value","params":[{"name":"value","type":"String or Arma 3 v1.50 Boolean or Arma 3 v2.24 Anything","type_expr":"String | Boolean | Anything"}],"returns":{"type":"Number","type_expr":"Number","description":"the parsed number, `0` if no valid number was found; in the case of a passed Boolean, 0 if false, 1 if true"},"form":"unary","right":{"text":"value"}}],"examples":[{"text":"```sqf\n_number = parseNumber \"0.125\";            // 0.125\n_number = parseNumber \"0050\";            // 50\n_number = parseNumber \"        42 yes\";    // 42\n_number = parseNumber \"3 or 4\";            // 3\n_number = parseNumber \"either 3 or 4\";    // 0\n_number = parseNumber \"0xCF\";            // 0\n```","code":["_number = parseNumber \"0.125\";\t\t\t// 0.125\n_number = parseNumber \"0050\";\t\t\t// 50\n_number = parseNumber \"\t\t42 yes\";\t// 42\n_number = parseNumber \"3 or 4\";\t\t\t// 3\n_number = parseNumber \"either 3 or 4\";\t// 0\n_number = parseNumber \"0xCF\";\t\t\t// 0"]},{"text":"since Arma 3 v1.50:\n\n```sqf\n_result = parseNumber false;                // 0\n_result = parseNumber true;                    // 1\n_zeroOneStatus = parseNumber alive player;    // 0 if the player is dead, 1 if alive\n```","code":["_result = parseNumber false;\t\t\t\t// 0\n_result = parseNumber true;\t\t\t\t\t// 1\n_zeroOneStatus = parseNumber alive player;\t// 0 if the player is dead, 1 if alive"]},{"text":"since Arma 3 v2.24:\n\n```sqf\nparseNumber 0;                    // 0\nparseNumber 1;                     // 1\nparseNumber false;                // 0\nparseNumber true;                // 1\nparseNumber \"0\";                // 0\nparseNumber \"1\";                // 1\nparseNumber \"false\";            // 0\nparseNumber \"true\";                // 1\n```","code":["parseNumber 0;\t\t\t\t\t// 0\nparseNumber 1;\t\t \t\t\t// 1\nparseNumber false;\t\t\t\t// 0\nparseNumber true;\t\t\t\t// 1\nparseNumber \"0\";\t\t\t\t// 0\nparseNumber \"1\";\t\t\t\t// 1\nparseNumber \"false\";\t\t\t// 0\nparseNumber \"true\";\t\t\t\t// 1"]}],"see_also":["BIS_fnc_parseNumber","Floating Point Number"]},{"name":"parseSimpleArray","title":"parseSimpleArray","type":"command","url":"https://community.bistudio.com/wiki/parseSimpleArray","revid":363379,"updated":"2024-03-29T13:22:55Z","groups":["Strings","Arrays"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"Converts given, formatted as simple array, String into a valid Array. Simple array is array consisting of Numbers, Strings, Booleans and Arrays of all of the above.\nThis command is almost **4× faster** than similar uncached call compile method. And because call compile is not required, it is also **more secure** and primarily intended for use with callExtension to parse the String output into Array.\n\n> [!NOTE]\n> Since Arma 3 v1.96 the command tolerates extra spaces and supports single quotes. The only recognised keywords (case **in**sensitive) are:\n>\n> - `true` - translates into true\n> - `false` - translates into false\n> - `nil` - translates into nil\n> - `null` - translates into nil\n> - `<null>` - translates into nil (*not* objNull)\n> - `any` - translates into nil","syntaxes":[{"syntax":"parseSimpleArray stringArray","params":[{"name":"stringArray","type":"String","description":"string formatted as simple array","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"valid array"},"form":"unary","right":{"text":"stringArray"}}],"examples":[{"code":["private _arr = parseSimpleArray \"[1,2,3]\";"]},{"code":["private _array1 = [1, \"2\", true, [4, \"five\", false]];\nprivate _array2 = parseSimpleArray \"[1,\"\"2\"\",true,[4,\"\"five\"\",false]]\";\n_array1 isEqualTo _array2; // true"]},{"code":["_bool = true;\n_num = 123.45;\n_str = \"ok\";\n_arr = [1, false, \"cool\"];\n_res = parseSimpleArray format [\"[%1,%2,%3,%4]\", _bool, _num, str _str, str _arr];\n// note how _bool and _num do not need str, however if used anyway, the result in this case would be identical\nhint str _res;  // returns [true,123.45,\"ok\",[1,false,\"cool\"]]"]}],"see_also":["set","resize","pushBack","pushBackUnique","select","apply","reverse","count","find","in","forEach","deleteAt","deleteRange","append","sort","arrayIntersect","callExtension"]},{"name":"parseText","title":"parseText","type":"command","url":"https://community.bistudio.com/wiki/parseText","revid":364995,"updated":"2024-07-04T19:58:06Z","groups":["Strings","Structured Text"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Creates a structured text by parsing the given XML description. Do not use parseText when displaying a localized text from Stringtable.xml.\nA detailed explanation of all formatting possibilities can be found at Structured Text.","syntaxes":[{"syntax":"parseText text","params":[{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Structured Text","type_expr":"Structured Text"},"form":"unary","right":{"text":"text"}}],"examples":[{"code":["private _Stxt = parseText \"First line<img image='data\\isniper.paa'/><br/>Second line\";"]},{"code":["hintSilent parseText format[\"<t size='1.25' font='Zeppelin33' color='#ff0000'>%1 lives remaining.</t>\", 12];"]},{"code":["private _clickableLink = parseText \"<a href='http://arma3.com'>A3</a>\";"]}],"see_also":["Structured Text","composeText","text","localize","ctrlSetStructuredText"],"notes":[{"user":"Dr_Eyeball","date":"2016-09-01T06:47:00Z","text":"To convert a structured text back to a string type, just use:\n\n```sqf\n_str = str parseText _structuredText;\n```"},{"user":"AgentRev","date":"2017-09-01T13:23:00Z","text":"If you are parsing user-defined strings like player names, you may want to convert special characters to their [XML entities](https://en.wikipedia.org/wiki/Character_encodings_in_HTML#XML_character_references) as a precaution beforehand, otherwise the result might be corrupted.\n\n```sqf\nprivate _escapeXML =\n{\n    _this\n    regexReplace [\"&\", \"&amp;\"]\n    regexReplace [\"<\", \"&lt;\"]\n    regexReplace [\">\", \"&gt;\"]\n    regexReplace ['\"', \"&quot;\"]\n    regexReplace [\"'\", \"&apos;\"]\n};\n\nprivate _name = '<A&M> Paul \"Bear\" Bryant';\nprivate _escapedName = _name call _escapeXML;\nprivate _redName = parseText format [\"<t color='#ff0000'>%1</t>\", _escapedName];\n```"},{"user":"Sa-Matra","date":"2023-10-13T12:02:33Z","text":"Here is a useful script snippet to safely use angled braces and ampersand in structured texts:\n\n```sqf\n_string regexReplace [\"&\", \"&amp;\"] regexReplace [\"<\", \"&lt;\"]\n```"}]},{"name":"parsingNamespace","title":"parsingNamespace","type":"command","url":"https://community.bistudio.com/wiki/parsingNamespace","revid":339160,"updated":"2023-04-26T10:55:24Z","groups":["Namespaces","Variables"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the global namespace attached to config parser.","syntaxes":[{"syntax":"parsingNamespace","params":[],"returns":{"type":"Namespace","type_expr":"Namespace"},"form":"nullary"}],"examples":[{"code":["parsingNamespace setVariable [\"var1\", 101.23124];\n_profVar1 = parsingNamespace getVariable \"var1\";"]}],"see_also":["missionNamespace","uiNamespace","currentNamespace","profileNamespace","localNamespace","allVariables","with","ArmA: Editing"],"notes":[{"user":"BrotherhoodOfHam","date":"2015-01-27T18:08:00Z","text":"Any global variable defined in a config using __EXEC() will be stored in this namespace.\nFor example in the description.ext:\n\n```sqf\n__EXEC(testVar = 1);\n```\n\nThe variable \"testVar\" can be accessed during mission run time using getVariable\n\n```sqf\nhint str (parsingNamespace getVariable [\"testVar\", 0]);\n```\n\nThe above example would print 1.\n\nThis example however:\n\n```sqf\n__EXEC(_testVar = 1);\n```\n\nWould print 0, because adding an underscore will make the variable local to the config in the same way that it would make it local to a script.\n\nSee PreProcessor Commands for more details on __EXEC()"}]},{"name":"particlesQuality","title":"particlesQuality","type":"command","url":"https://community.bistudio.com/wiki/particlesQuality","revid":310765,"updated":"2022-05-07T20:21:39Z","groups":["Particles"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Returns current user settings for particles quality (configure->video->general->particles). 0-low, 1-normal, 2-high","syntaxes":[{"syntax":"particlesQuality","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_currentQuality = particlesQuality;"]}],"see_also":["setParticleCircle","setParticleParams","setParticleRandom","ParticleTemplates","setParticleClass","setParticleFire"]},{"name":"periscopeElevation","title":"periscopeElevation","type":"command","url":"https://community.bistudio.com/wiki/periscopeElevation","revid":378227,"updated":"2026-03-17T23:24:58Z","groups":["Object Manipulation","Animations"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns current periscope elevation value, see also elevatePeriscope.","syntaxes":[{"syntax":"vehicle periscopeElevation turretPath","params":[{"name":"vehicle","type":"Object","description":"vehicle with periscope tech","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Array","type_expr":"Array","description":"format [elevation, isLocked]:\n- elevation: Number - current periscope elevation value. -1 in case of an invalid turret - isLocked: Boolean - whether or not user override is blocked","text":"Array format [elevation, isLocked]:\n\n- elevation: Number - current periscope elevation value. -1 in case of an invalid turret\n- isLocked: Boolean - whether or not user override is blocked"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}}],"examples":[{"code":["_eddie periscopeElevation [0] params [\"_elevation\", \"_isLocked\"];"]}],"see_also":["elevatePeriscope","animationPhase","allTurrets","Arma 3: Event Handlers"]},{"name":"pi","title":"pi","type":"command","url":"https://community.bistudio.com/wiki/pi","revid":319402,"updated":"2022-05-13T09:24:00Z","groups":["Math - Geometry"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"pi (180 degrees converted to Radians).","syntaxes":[{"syntax":"pi","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_radians = 2 * pi; // Result is 6.2830"]}],"see_also":["tan","cos","sin"]},{"name":"pickWeaponPool","title":"pickWeaponPool","type":"command","url":"https://community.bistudio.com/wiki/pickWeaponPool","revid":310249,"updated":"2022-05-05T13:11:07Z","groups":["Weapon Pool"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Transfers weapons and magazines from cargo of object into the weapon pool. This is used in the campaign to transfer weapons into the next mission.","syntaxes":[{"syntax":"pickWeaponPool object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["pickWeaponPool vehicle player;"]}]},{"name":"pitch","title":"pitch","type":"command","url":"https://community.bistudio.com/wiki/pitch","revid":310193,"updated":"2022-05-05T13:10:35Z","groups":["Unit Identity","Sounds"],"status":"ok","games":{"arma3":"1.02"},"since":"arma3 1.02","arma3_since":"1.02","description":"Returns the pitch of a persons voice.","syntaxes":[{"syntax":"pitch person","params":[{"name":"person","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"person"}}],"examples":[{"code":["pitch player;"]}],"see_also":["setPitch"]},{"name":"pixelGrid","title":"pixelGrid","type":"command","url":"https://community.bistudio.com/wiki/pixelGrid","revid":376543,"updated":"2025-10-27T00:18:56Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.60"},"since":"arma3 1.60","arma3_since":"1.60","description":"Returns grid size based on screen resolution, UI size and configs: uiScaleFactor, uiScaleMaxGrids.","syntaxes":[{"syntax":"pixelGrid","params":[],"returns":{"type":"Number","type_expr":"Number","description":"grid size, see Arma 3: Pixel Grid System"},"form":"nullary"}],"examples":[{"code":["private _gridHeight = pixelH * pixelGrid;"]}],"see_also":["pixelGridBase","pixelGridNoUIScale","pixelH","pixelW","Pixel Grid System"]},{"name":"pixelGridBase","title":"pixelGridBase","type":"command","url":"https://community.bistudio.com/wiki/pixelGridBase","revid":348722,"updated":"2023-11-08T14:31:29Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Returns grid size based on screen resolution.","syntaxes":[{"syntax":"pixelGridBase","params":[],"returns":{"type":"Number","type_expr":"Number","description":"grid size, see Arma 3: Pixel Grid System"},"form":"nullary"}],"examples":[{"code":["_gridBaseHeight = pixelH * pixelGridBase;"]}],"see_also":["pixelGrid","pixelGridNoUIScale","pixelH","pixelW","Pixel Grid System"]},{"name":"pixelGridNoUIScale","title":"pixelGridNoUIScale","type":"command","url":"https://community.bistudio.com/wiki/pixelGridNoUIScale","revid":378048,"updated":"2026-01-29T12:07:20Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Returns grid size based on screen resolution and configs: `uiScaleFactor`, `uiScaleMaxGrids`.\nAs mentioned in the name of this command, **the user interface scale is ignored**.","syntaxes":[{"syntax":"pixelGridNoUIScale","params":[],"returns":{"type":"Number","type_expr":"Number","description":"grid size, see Arma 3: Pixel Grid System"},"form":"nullary"}],"examples":[{"code":["private _gridHeightNoUIScale = pixelH * pixelGridNoUIScale;"]}],"see_also":["pixelGrid","pixelGridBase","pixelH","pixelW","Pixel Grid System"]},{"name":"pixelH","title":"pixelH","type":"command","url":"https://community.bistudio.com/wiki/pixelH","revid":349003,"updated":"2023-11-08T14:45:51Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.60"},"since":"arma3 1.60","arma3_since":"1.60","description":"Returns the height of one pixel for current resolution.","syntaxes":[{"syntax":"pixelH","params":[],"returns":{"type":"Number","type_expr":"Number","description":"pixel height"},"form":"nullary"}],"examples":[{"code":["_pixelHeight = pixelH;"]}],"see_also":["pixelGrid","pixelGridBase","pixelGridNoUIScale","pixelW","Pixel Grid System"]},{"name":"pixelW","title":"pixelW","type":"command","url":"https://community.bistudio.com/wiki/pixelW","revid":348976,"updated":"2023-11-08T14:45:44Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma3":"1.60"},"since":"arma3 1.60","arma3_since":"1.60","description":"Returns width of one pixel for current resolution.","syntaxes":[{"syntax":"pixelW","params":[],"returns":{"type":"Number","type_expr":"Number","description":"pixel width"},"form":"nullary"}],"examples":[{"code":["_pixelWidth = pixelW;"]}],"see_also":["pixelGrid","pixelGridBase","pixelGridNoUIScale","pixelH","Pixel Grid System"]},{"name":"playableSlotsNumber","title":"playableSlotsNumber","type":"command","url":"https://community.bistudio.com/wiki/playableSlotsNumber","revid":319373,"updated":"2022-05-13T09:23:58Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.06"},"since":"arma3 1.06","arma3_since":"1.06","description":"Returns the number of available slots in mission per side (both empty and taken).\nIn singleplayer mission, it returns number of playable units per side.","syntaxes":[{"syntax":"playableSlotsNumber side","params":[{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"side"}}],"examples":[{"code":["_maxBluforPlayers = playableSlotsNumber blufor;"]}],"see_also":["playersNumber","playableUnits","switchableUnits"]},{"name":"playableUnits","title":"playableUnits","type":"command","url":"https://community.bistudio.com/wiki/playableUnits","revid":376985,"updated":"2026-01-01T07:13:32Z","groups":["Multiplayer","Object Detection"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns a list of playable units in a multiplayer game (occupied by both AI or players), created on the following sides east/opfor, west/blufor, resistance/independent and civilian only.\nDoes not contain units of sideLogic.\n\n> [!NOTE]\n> This command returns an empty array in Singleplayer; use switchableUnits instead.\n\n> [!IMPORTANT]\n> This command does not include dead players awaiting for respawn.","syntaxes":[{"syntax":"playableUnits","params":[],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"nullary"}],"examples":[{"code":["{ _x groupChat \"I'm a playable unit.\"; } forEach playableUnits;"]},{"code":["_playableInGroup = units group player arrayIntersect playableUnits;"]},{"code":["_nonPlayableInGroup = units group player - playableUnits;"]}],"see_also":["playableSlotsNumber","allPlayers","allCurators","allGroups","allDead","switchableUnits","vehicles","allUnitsUAV","allDeadMen","isPlayer","playersNumber"],"notes":[{"user":"DreadedEntity","date":"2014-12-23T23:13:00Z","text":"To get a list of all player-controlled units:\n\n```sqf\n_allPlayers = [];\n{\n    if (isPlayer _x) then\n    {\n        _allPlayers pushBack _x;\n    };\n} forEach playableUnits;\n```"},{"user":"FR Starfox64","date":"2015-08-16T10:05:00Z","text":"playableUnits will not return dead players, use allPlayers instead."},{"user":"Pierre MGI","date":"2017-02-14T22:05:00Z","text":"Using the Editor (multiplayer attributes) for unchecking \"enable AI\", or disabling AI(s) in lobby, will make playableUnits as a public variable, updated by each JIP on disabled slot.\nSo, if all slots are disabled AI, playableUnits is same as allPlayers\nFurthermore, in this case, non-played slot (playable and disabled AI) units simply don't exist!\ni.e. If you name 8 playable units: u1..u8, then 2 players in game: u3 & u6\nplayableUnits will return [u3,u6], and true for isNil \"u1\", isNil \"u2\"... until another player takes the slot."}]},{"name":"playAction","title":"playAction","type":"command","url":"https://community.bistudio.com/wiki/playAction","revid":341827,"updated":"2023-06-28T04:46:19Z","groups":["Unit Control","Animations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"When used on a person, a smooth transition to the given action will be initiated.\nFor Arma 3 actions see: playAction/actions.","syntaxes":[{"syntax":"soldier playAction action","params":[{"name":"soldier","type":"Object","type_expr":"Object"},{"name":"action","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"soldier"},"right":{"text":"action"}}],"examples":[{"code":["soldierOne playAction \"SitDown\";"]}],"see_also":["playActionNow","switchAction","playMove","playMoveNow","switchMove"]},{"name":"playActionNow","title":"playActionNow","type":"command","url":"https://community.bistudio.com/wiki/playActionNow","revid":364763,"updated":"2024-06-08T18:43:24Z","groups":["Animations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"When used on a person, a smooth transition to the given action will be initiated, but all previous playAction are discarded.\n\n> [!NOTE]\n> **Arma 3:** For Arma 3 actions, see playAction/actions.","syntaxes":[{"syntax":"soldier playActionNow action","params":[{"name":"soldier","type":"Object","type_expr":"Object"},{"name":"action","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"soldier"},"right":{"text":"action"}}],"examples":[{"code":["soldierOne playActionNow \"SitDown\";"]},{"code":["rabbitTwo playActionNow \"WalkF\";"]}],"see_also":["playAction","switchAction","playMove","playMoveNow","switchMove"],"notes":[{"user":"Wolfrug","date":"2010-10-12T09:41:00Z","text":"Some other possible playactions:\n\n- `\"walkF\"` - walk forward\n- `\"walkB\"` - walk backwards\n- `\"walkR\"` - strafe right\n- `\"walkL\"` - strafe left\n- `\"grabDrag\"` - initiate First Aid dragging animation\n- `\"stopDrag\"` - stop First Aid dragging animation\n- `\"reloadMagazine\"` - reload the current magazine\n- `\"gestureFreeze\"` - hand signal \"Freeze\"\n- `\"gestureGo\"`\n- `\"gestureCover\"`\n- `\"gestureAttack\"`\n- `\"gestureCeaseFire\"`\n- `\"gestureFollow\"`\n- `\"gestureUp\"`\n- `\"gestureAdvance\"`\n- `\"gesturePoint\"`\n\nNote that playAction works regardless of stance (rifle up, down, crouched, prone)."},{"user":"h -","date":"2023-09-05T07:36:58Z","text":"Playing a gesture with playActionNow while a soldier held weapon is deployed on something will 'undeploy' the weapon.\nUsing playAction doesn't."}]},{"name":"player","title":"player","type":"command","url":"https://community.bistudio.com/wiki/player","revid":363907,"updated":"2024-04-24T21:56:05Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"A person object controlled by user. In Intros and Outros this isn't set by default and must be assigned.","syntaxes":[{"syntax":"player","params":[],"returns":{"type":"Object","type_expr":"Object"},"form":"nullary"}],"examples":[{"code":["player addRating 500;"]}],"multiplayer":"In MP player is different on each computer and on dedicated server it is objNull by default ([unless scripted](https://www.youtube.com/watch?v=JzgJe9sXAiU)).\nWhen user is joining a dedicated server mission, at the moment of onPlayerConnected the player object is remote to the joining client, as the player unit is created on the server, but once control of the unit is passed to the user moments later, the player objects becomes and remains local to the client.\n\nSee Multiplayer Scripting's player topic for additional helpful information.","problems":"In multiplayer, the command is not initialised in functions called by initline or init eventhandlers.","see_also":["Multiplayer Scripting","isPlayer","playableUnits","selectPlayer"],"notes":[{"user":"Galzohar","date":"2010-06-20T03:11:00Z","text":"Before you use the **player** object in init scripts, to avoid JIP issues all you need is to run:\n\n```sqf\nwaitUntil { not isNull player };\n```\n\nAnything else you see in other scripts is equivalent and/or redundant. (but you may need to add other conditions too, such as checking hasInterface before initiating that loop)\nOf course JIP players may need more than just the player to point at the actual JIP player unit, but that's script/mission-specific."},{"user":"Killzone_Kid","date":"2014-06-26T18:49:00Z","text":"player can actually be REMOTE object on player's PC: <http://www.youtube.com/watch?v=m6IILtfa3cQ>"}]},{"name":"playerRespawnTime","title":"playerRespawnTime","type":"command","url":"https://community.bistudio.com/wiki/playerRespawnTime","revid":353208,"updated":"2024-03-12T13:57:45Z","groups":["Multiplayer"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return the player's remaining time before respawn, or -1 if it is not available (such as when the player is alive).","syntaxes":[{"syntax":"playerRespawnTime","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["waitUntil { playerRespawnTime <= 0 };"]}],"see_also":["setPlayerRespawnTime"],"notes":[{"user":"Synide","date":"2007-06-21T17:33:00Z","text":"When playerRespawnTime reaches zero the player respawns as expected. When the player has completed respawning this command returns -1."},{"user":"RolanDecoy","date":"2009-02-25T20:44:00Z","text":"Also note that spawning doesn't create a body to use, but allows a player to choose an already existing one as defined either in the mission editor or in a script as player or playable."}]},{"name":"playerSide","title":"playerSide","type":"command","url":"https://community.bistudio.com/wiki/playerSide","revid":353328,"updated":"2024-03-15T17:11:49Z","groups":["Sides"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the player's side. This is valid even when the player controlled person is dead (a difference from side player).\n\n> [!NOTE]\n> playerSide will not change automatically if player joins a group on different side. However, selectPlayer command can and does change playerSide - see Example 3 for information.","syntaxes":[{"syntax":"playerSide","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (side man1 == playerSide) then\n{\n    hint \"man1 is on your side!\";\n};\n```","code":["if (side man1 == playerSide) then\n{\n\thint \"man1 is on your side!\";\n};"]},{"text":"```sqf\nswitch (playerSide) do\n{\n    case west: { hint \"You are BLUFOR\"; };\n    case east: { hint \"You are OPFOR\"; };\n};\n```","code":["switch (playerSide) do\n{\n\tcase west: { hint \"You are BLUFOR\"; };\n\tcase east: { hint \"You are OPFOR\"; };\n};"]},{"text":"the following code will change the side of the player including playerSide:\n\n```sqf\nprivate _player = player;\n[player] join createGroup east;\nselectNoPlayer;\nselectPlayer _player;\nhint str playerSide; // EAST\n```","code":["private _player = player;\n[player] join createGroup east;\nselectNoPlayer;\nselectPlayer _player;\nhint str playerSide; // EAST"]}],"see_also":["Side","side","west","east","resistance","civilian","sideLogic","sideFriendly","sideEnemy","sideUnknown","sideEmpty","sideAmbientLife","Side Relations"],"notes":[{"user":"Dr_Eyeball","date":"2008-01-27T07:52:00Z","text":"playerSide defaults to west for JIP players early on during initialization regardless of their side.\nSo if you are a JIP player on another side (like east), you will need to cater for this for any early initializations."},{"user":"Dr_Eyeball","date":"2008-10-13T08:30:00Z","text":"playerSide also shows your starting side, even if your side changes to enemy due to a bad rating. In that case, playerSide != side player."}]},{"name":"playersNumber","title":"playersNumber","type":"command","url":"https://community.bistudio.com/wiki/playersNumber","revid":369133,"updated":"2024-09-03T10:34:34Z","groups":["Multiplayer"],"status":"ok","games":{"ofp":"1.80","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.80","arma3_since":"0.50","description":"Returns count of occupied role selection slots for given side. Players who claimed a slot in the lobby but did not start the mission are counted as well. If `disabledAI = 0;` in description.ext or *Enable AI* option is checked in Eden Editor, AI bots will be treated as valid players and will be counted too.","syntaxes":[{"syntax":"playersNumber side","params":[{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"side"}}],"examples":[{"code":["_west = playersNumber west;\n_east = playersNumber east;\n_civ = playersNumber civilian;\nhint format [\"West:%1 East:%2, Civ:%3\", _west, _east, _civ];"]}],"multiplayer":"**Multiplayer only**, in singleplayer it always returns 0.","see_also":["playableSlotsNumber","countSide","allPlayers","allUnits"],"notes":[{"user":"Nelis75733126","date":"2015-04-13T09:44:00Z","text":"**2024-04-16 edit:**\n`playersNumber` returns playable AI as well as human players.\nBy default, a unit (placed down in the editor for example) ONLY becomes playable when the creator specifically checks the relevant checkbox.\n\nIn addition to the examples already given, this is how `playersNumber` can be used to get an array of players and playable AI on the same side as the side of the player:\n\n```sqf\nplayersNumber playerSide;\n```"}]},{"name":"playerTargetLock","title":"playerTargetLock","type":"command","url":"https://community.bistudio.com/wiki/playerTargetLock","revid":377647,"updated":"2026-01-02T09:01:49Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Get the local player's current locked target (with weapons that can lock on).","syntaxes":[{"syntax":"playerTargetLock","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [target, lockValue, config]\n- target: Object - the locked object - lockValue: Number - in range 0..1 where 1 is fully locked - config: Config - used weapon's `CfgWeapons` config","text":"Array with [target, lockValue, config]\n\n- target: Object - the locked object\n- lockValue: Number - in range 0..1 where 1 is fully locked\n- config: Config - used weapon's `CfgWeapons` config"},"form":"nullary"}],"examples":[{"text":"```sqf\nplayerTargetLock params [\"_target\", \"_lock\", \"_cfg\"];\nif (_lock == 1) then\n{\n    hint format [\"%1 locked %2\", getText (_cfg >> \"displayName\"), getText (configOf _target >> \"displayName\")];\n};\n```","code":["playerTargetLock params [\"_target\", \"_lock\", \"_cfg\"];\nif (_lock == 1) then\n{\n\thint format [\"%1 locked %2\", getText (_cfg >> \"displayName\"), getText (configOf _target >> \"displayName\")];\n};"]},{"code":["playerTargetLock; // returns [objNull, 0, configNull] if no lock is being done"]}],"see_also":["cursorTarget"]},{"name":"playGesture","title":"playGesture","type":"command","url":"https://community.bistudio.com/wiki/playGesture","revid":379456,"updated":"2026-10-31T00:08:56Z","groups":["Animations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"When used on a person,a smooth transition to the given move will be initiated. **Command doesn't seem to be functional**\n\n> [!NOTE]\n> **Arma 3:** Use switchGesture instead (the alternative syntax, sinceArma 3 v2.18)","syntaxes":[{"syntax":"soldier playGesture moveName","params":[{"name":"soldier","type":"Object","type_expr":"Object"},{"name":"moveName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"soldier"},"right":{"text":"moveName"}}],"examples":[{"code":["soldierOne playGesture \"Wave\";"]}],"see_also":["playMove","playMoveNow","playAction","playActionNow","switchMove","switchGesture"],"notes":[{"user":".kju","date":"2010-08-31T00:00:00Z","text":"Rpt says \"Not implemented\" as of OA 1.54."}]},{"name":"playMission","title":"playMission","type":"command","url":"https://community.bistudio.com/wiki/playMission","revid":376427,"updated":"2025-10-13T07:06:23Z","groups":["System"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"The mission is launched (from the main menu).","syntaxes":[{"syntax":"playMission [campaign, mission, skipBriefing]","params":[{"name":"campaign","type":"String","description":"directory of Campaign, if empty a single mission is launched","type_expr":"String"},{"name":"mission","type":"String or Config","description":"directory if a string","type_expr":"String | Config"},{"name":"skipBriefing","type":"Boolean","optional":true,"description":"If true, the intro and briefing are skipped.","type_expr":"Boolean","text":"skipBriefing: Boolean - (Optional) If true, the intro and briefing are skipped."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[campaign, mission, skipBriefing]"}}],"examples":[{"code":["playMission [\"XOutrage\", \"x05Negotiator.Noe\"];"]},{"code":["playMission [\"\", configFile >> \"CfgMissions\" >> \"Missions\" >> \"Armory1\"];"]},{"code":["playMission [\"\", \"\\A3\\Missions_F_Bootcamp\\Scenarios\\Arsenal.VR\"];"]}],"see_also":["hostMission","playScriptedMission","createMissionDisplay","createMPCampaignDisplay"]},{"name":"playMove","title":"playMove","type":"command","url":"https://community.bistudio.com/wiki/playMove","revid":373663,"updated":"2025-06-01T19:28:50Z","groups":["Animations"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"When used on a person, smooth transition to given move will be done.\nThe difference between playMove and playMoveNow is that playMove adds another move to the move queue, while playMoveNow replaces the whole move queue with new move (see Example 2).\n\n> [!NOTE]\n> see Category:Moves for respective games animations.\n\n> [!IMPORTANT]\n> A transition is only possible if the current and provided animation nodes are connected to each other in config (via connectTo/From and interpolateTo/From). The connection can be indirect (using intermediate animations)","syntaxes":[{"syntax":"unitName playMove moveName","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"moveName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"moveName"}}],"examples":[{"code":["soldierOne playMove \"Stand\";"]},{"text":"```sqf\nplayer switchMove \"AmovPercMstpSrasWrflDnon\";\n0 spawn\n{\n    sleep 0.5;\n    player playMove \"AmovPpneMstpSrasWrflDnon\";        // player goes prone\n    player playMove \"amovPknlMstpSrasWrflDnon\";        // player gets up on one knee\n};\n```","code":["player switchMove \"AmovPercMstpSrasWrflDnon\";\n0 spawn \n{\n\tsleep 0.5;\n\tplayer playMove \"AmovPpneMstpSrasWrflDnon\";\t\t// player goes prone\n\tplayer playMove \"amovPknlMstpSrasWrflDnon\";\t\t// player gets up on one knee\n};"]},{"text":"```sqf\nplayer switchMove \"AmovPercMstpSrasWrflDnon\";\n0 spawn\n{\n    sleep 0.5;\n    player playMove \"AmovPpneMstpSrasWrflDnon\";        // player never goes prone\n    player playMoveNow \"AmovPknlMstpSrasWrflDnon\";    // player goes down on one knee straight away\n};\n```","code":["player switchMove \"AmovPercMstpSrasWrflDnon\";\n0 spawn\n{\n\tsleep 0.5;\n\tplayer playMove \"AmovPpneMstpSrasWrflDnon\";\t\t// player never goes prone\n\tplayer playMoveNow \"AmovPknlMstpSrasWrflDnon\";\t// player goes down on one knee straight away\n};"]}],"see_also":["playMoveNow","switchMove","playAction","playActionNow"],"notes":[{"user":"Macguba","date":"2006-04-16T02:39:00Z","text":"For an immediate transition use switchMove. This command must be executed after mission start. If you place it into init.sqs / init.sqf or in the Init field of some unit, it will not work. Just add a little delay (~0.001) and then place the command."}]},{"name":"playMoveNow","title":"playMoveNow","type":"command","url":"https://community.bistudio.com/wiki/playMoveNow","revid":376870,"updated":"2025-12-10T17:02:35Z","groups":["Animations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"When used on a person,a smooth transition to the given move will be initiated, but all previous playMove are discarded.\nThe difference between playMove and playMoveNow is that playMove adds another move to the move queue, while playMoveNow replaces the whole move queue with new move (see Example 2).\n\n> [!NOTE]\n> see Category:Moves for respective games animations.\n\n> [!IMPORTANT]\n> A transition is only possible if the current and provided animation nodes are connected to each other in config (via connectTo/From and interpolateTo/From).\n> The connection can be indirect (using intermediate animations).","syntaxes":[{"syntax":"soldier playMoveNow moveName","params":[{"name":"soldier","type":"Object","type_expr":"Object"},{"name":"moveName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"soldier"},"right":{"text":"moveName"}}],"examples":[{"code":["player playMoveNow \"AmovPercMevaSlowWrflDf\";"]},{"text":"```sqf\nplayer switchMove \"AmovPercMstpSrasWrflDnon\";\n0 spawn\n{\n    sleep 0.5;\n    player playMove \"AmovPpneMstpSrasWrflDnon\";        // player goes prone\n    player playMove \"amovPknlMstpSrasWrflDnon\";        // player gets up on one knee\n};\n```","code":["player switchMove \"AmovPercMstpSrasWrflDnon\";\n0 spawn \n{\n\tsleep 0.5;\n\tplayer playMove \"AmovPpneMstpSrasWrflDnon\";\t\t// player goes prone\n\tplayer playMove \"amovPknlMstpSrasWrflDnon\";\t\t// player gets up on one knee\n};"]},{"text":"```sqf\nplayer switchMove \"AmovPercMstpSrasWrflDnon\";\n0 spawn\n{\n    sleep 0.5;\n    player playMove \"AmovPpneMstpSrasWrflDnon\";        // player never goes prone\n    player playMoveNow \"AmovPknlMstpSrasWrflDnon\";    // player goes down on one knee straight away\n};\n```","code":["player switchMove \"AmovPercMstpSrasWrflDnon\";\n0 spawn\n{\n\tsleep 0.5;\n\tplayer playMove \"AmovPpneMstpSrasWrflDnon\";\t\t// player never goes prone\n\tplayer playMoveNow \"AmovPknlMstpSrasWrflDnon\";\t// player goes down on one knee straight away\n};"]}],"see_also":["playMove","switchMove","playAction","playActionNow"]},{"name":"playMusic","title":"playMusic","type":"command","url":"https://community.bistudio.com/wiki/playMusic","revid":369050,"updated":"2024-09-02T20:24:51Z","groups":["Sounds"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Plays music defined in Description.ext's CfgMusic or config.cpp. If the *musicName* could not be found a message is logged into the .rpt file: `Music <musicName> not found`.\n\n- Arma 3: CfgMusic\n- Arma 2: CfgMusic\n- ArmA: Armed Assault: CfgMusic\n- Operation Flashpoint: CfgMusic\n\n> [!NOTE]\n> To stop the music, use `playMusic \"\";`.","syntaxes":[{"syntax":"playMusic musicName","params":[{"name":"musicName","type":"String","description":"music classname","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"musicName"}},{"syntax":"playMusic [musicName, start]","params":[{"name":"musicName","type":"String","description":"music classname","type_expr":"String"},{"name":"start","type":"Number","description":"start, in seconds. Can be negative.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[musicName, start]"}}],"examples":[{"code":["playMusic \"RadioAmbient1\";"]},{"code":["playMusic [\"RadioAmbient3\", 3]; // start to play from 00:00:03"]},{"text":"Play from 00:00:01 to 00:00:05:\n\n```sqf\n0 spawn {\n    playMusic [\"RadioAmbient5\", 1];\n    sleep 4;\n    playMusic \"\";\n};\n```","code":["0 spawn {\n\tplayMusic [\"RadioAmbient5\", 1];\n\tsleep 4;\n\tplayMusic \"\";\n};"]}],"see_also":["getMusicPlayedTime","playSound","say","createSoundSource","addMusicEventHandler","fadeMusic","Arma 3 Utilities"]},{"name":"playScriptedMission","title":"playScriptedMission","type":"command","url":"https://community.bistudio.com/wiki/playScriptedMission","revid":369272,"updated":"2024-09-03T18:42:43Z","groups":["System"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Load the given world, launch an empty mission, and execute the given expression.\nIf provided, *config* can reference to the config entry, replacing Description.ext for this mission.","syntaxes":[{"syntax":"playScriptedMission [world, expression, config, ignoreChildWindow]","params":[{"name":"world","type":"String","type_expr":"String"},{"name":"expression","type":"Code","type_expr":"Code"},{"name":"config","type":"Config","optional":true,"type_expr":"Config","text":"config: Config - (Optional)"},{"name":"ignoreChildWindow","type":"Boolean","optional":true,"type_expr":"Boolean","text":"ignoreChildWindow: Boolean - (Optional)"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[world, expression, config, ignoreChildWindow]"}}],"examples":[{"text":"```sqf\nplayScriptedMission\n[\n    \"desert_e\",\n    {\n        execVM \"\\ca\\missions_e\\data\\scenes\\credits1\\init.sqf\";\n    },\n    configFile / \"CfgMissions\" / \"Cutscenes\" / \"Credits\"\n];\n```","code":["playScriptedMission\n[\n\t\"desert_e\",\n\t{\n\t\texecVM \"\\ca\\missions_e\\data\\scenes\\credits1\\init.sqf\";\n\t},\n\tconfigFile / \"CfgMissions\" / \"Cutscenes\" / \"Credits\"\n];"]}],"see_also":["hostMission","playMission","createMissionDisplay","createMPCampaignDisplay"],"notes":[{"user":"SkaceKachna","date":"2015-12-31T17:55:00Z","text":"For this command to work, you will need to:\n\n1. call command with ignoreChildWindow param set to true (in VBS docs its called fromMission)\n1. close any opened display (not sure about this part, but closing every display (but #0) seems to work):\n   - if mission is run from 2D editor, you can just close RscDisplayArcadeMap display (idd 26) (because this was done from 2D editor, so RscDisplayArcadeMap is still active in background -- benargee)\n   - if mission is run from single mission browser, you can just close RscDisplaySingleMission (idd 2)\n1. end mission\n\nDebriefing will show and player will be moved to new mission after clicking on Continue.\n\nCommand is a bit bugged:\n\n- third (config) param doesn't seem to work\n- if you run this command in mission loaded from pbo, said pbo won't be writable until you close the game (you can't update it)\n\nFollowing code will change change island to Stratis and spawns player as basic soldier at [0,0,0] coordinates.\n\n```sqf\ndisableSerialization;\nplayScriptedMission ['Stratis', {\n    private _grp = createGroup west;\n    private _player = _grp createUnit [\"B_Soldier_F\", [0,0,0], [], 0, \"NONE\"];\n    selectPlayer _player;\n}, missionConfigFile, true];\n\n// Close all displays that could be the background display ... this is essentially forceEnd command\n// Closing #0 will cause game to fail\n_zero = findDisplay 0;\n{\n    if (_x != _zero) then {\n        _x closeDisplay 1;\n    };\n} foreach allDisplays;\nfailMission \"END1\";\n```\n\n(tested in Arma 3 1.54.133741)"}]},{"name":"playSound","title":"playSound","type":"command","url":"https://community.bistudio.com/wiki/playSound","revid":349659,"updated":"2023-11-18T17:02:31Z","groups":["Sounds"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Plays a sound from CfgSounds. Sound can be defined in missionConfigFile, configFile or campaignConfigFile.","syntaxes":[{"syntax":"playSound soundName","params":[{"name":"soundName","type":"String","type_expr":"String"}],"returns":{"type":"Object","type_expr":"Object","description":"the speaker object (Nothing before Arma 3 v2.00)"},"form":"unary","right":{"text":"soundName"}},{"syntax":"playSound [soundName, isSpeech, offset]","params":[{"name":"soundName","type":"String","type_expr":"String"},{"name":"isSpeech","type":"Boolean or Arma 3 v2.04 Number","optional":true,"default":"false","description":"0/false = play as sound (fadeSound applies)\n- 1/true = play as speech (fadeSpeech applies), filters are not applied to it (i.e. house or vehicle interior one)\n- 2 = play as sound (fadeSound applies) without interior/vehicle muffling","type_expr":"Boolean | Number","text":"isSpeech: Boolean or Arma 3 v2.04 Number - (Optional, default false)\n\n- 0/false = play as sound (fadeSound applies)\n- 1/true = play as speech (fadeSpeech applies), filters are not applied to it (i.e. house or vehicle interior one)\n- 2 = play as sound (fadeSound applies) without interior/vehicle muffling"},{"name":"offset","type":"Number","optional":true,"default":"0","description":"offset in seconds. Same as playMusic","type_expr":"Number","since":"arma3 2.00","text":"offset: Number - (Optional, default 0) offset in seconds. Same as playMusic"}],"returns":{"type":"Object","type_expr":"Object","description":"the speaker object (Nothing before Arma 3 v2.00)"},"form":"unary","right":{"text":"[soundName, isSpeech, offset]"}}],"examples":[{"code":["playSound \"soundname\";"]},{"text":"Start a sound and then stop it after 1.2 second:\n\n```sqf\nplaySound \"AlarmCar\";\n0 spawn\n{\n    _sound = ASLToAGL [0,0,0] nearestObject \"#soundonvehicle\";\n    sleep 1.2;\n    deleteVehicle _sound;\n};\n\n// since Arma 3 v2.00\n_source = playSound \"AlarmCar\";\n_source spawn\n{\n    sleep 1.2;\n    deleteVehicle _this;\n};\n```","code":["playSound \"AlarmCar\";\n0 spawn\n{\n\t_sound = ASLToAGL [0,0,0] nearestObject \"#soundonvehicle\";\n\tsleep 1.2;\n\tdeleteVehicle _sound;\n};\n\n// since Arma 3 v2.00\n_source = playSound \"AlarmCar\";\n_source spawn\n{\n\tsleep 1.2;\n\tdeleteVehicle _this;\n};"]},{"text":"Start a sound and wait until it is finished:\n\n```sqf\nplaySound \"Alarm\";\nhint \"Started!\";\n0 spawn\n{\n    _sound = ASLToAGL [0,0,0] nearestObject \"#soundonvehicle\";\n    waitUntil {isNull _sound};\n    hint \"Finished!\";\n};\n\n// since Arma 3 v2.00\nprivate _source = playSound \"Alarm\";\n_source spawn\n{\n    waitUntil { isNull _this };\n    hint \"Finished!\";\n};\n```","code":["playSound \"Alarm\";\nhint \"Started!\";\n0 spawn\n{\n\t_sound = ASLToAGL [0,0,0] nearestObject \"#soundonvehicle\";\n\twaitUntil {isNull _sound};\n\thint \"Finished!\";\n};\n\n// since Arma 3 v2.00\nprivate _source = playSound \"Alarm\";\n_source spawn\n{\n\twaitUntil { isNull _this };\n\thint \"Finished!\";\n};"]}],"see_also":["playSound3D","sideRadio","say","playMusic","say2D","say3D","createSoundSource","playSoundUI"],"notes":[{"user":"Hardrock","date":"2006-08-04T10:57:00Z","text":"*Notes from before the conversion:*\n\nFor dialogue involving living units it is better to use say,\nplaySound will play a sound at the location of the player,\nsay will play a sound at the location of the unit that is speaking, and it will only play that sound if the unit is alive."},{"user":"PiZZADOX","date":"2014-12-28T08:22:00Z","text":"As you may have noticed, the parameter for playsound/say3d that deals with the \"volume\" of the sound played has little to do with the effective loudness heard in game. What it is alters is the drop off for fading the sound at a distance. A higher decibel or integer value will increase the distance before any sort of fading will take place. The actual volume of the sound file played will factor in to this, as it does throughout the playing action.\n\n##### Amplifying the Sound\n\nModifying the effective volume of sounds played by the engine is possible by \"spamming\" the sounds. By quickly playing the sounds overtop of one another, you can effectively amplify the volume\n\nThis example\n\n```sqf\nplaySound \"soundname\";\nplaySound \"soundname\";\n```\n\nWill effectively amplify the sound by a sensed 2x. The volume of the sound file itself will still affect the sound volume as it appears as though the arma engine has no normalization for sound files added to it.\n\n> [!NOTE]\n> This technique may cause issues in sound quality in large multiplayer servers. I observed multiple instances when a triggered sound amplified with this method was out of sync with each other. Timing of the individual commands sent over the network is probably the issue. Recommend you compile your amplification code into a single finished function for better syncing for clients not activating the action/far away from the activation position."}]},{"name":"playSound3D","title":"playSound3D","type":"command","url":"https://community.bistudio.com/wiki/playSound3D","revid":379065,"updated":"2026-09-24T20:28:32Z","groups":["Sounds"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Plays positional sound with given *filename* on every computer on network. To stop the sound use stopSound","syntaxes":[{"syntax":"playSound3D [filename, soundSource, isInside, soundPosition, volume, soundPitch, distance, offset, local, loop]","params":[{"name":"filename","type":"String","description":"see Arma 3: Sound Files for available file names or Example 3 to use mission files\n\n> [!IMPORTANT]\n> Since Arma 3 v2.10 the file name can start with a leading backslash `\\a3\\...`.\n> However a leading backslash must **not** be used for an **addon** sound file.","type_expr":"String"},{"name":"soundSource","type":"Object","description":"the object emitting the sound. If *soundPosition* below is specified this parameter is ignored","type_expr":"Object"},{"name":"isInside","type":"Boolean","optional":true,"default":"false","description":"true to simulate a sound played inside a building or similar","type_expr":"Boolean","text":"isInside: Boolean - (Optional, default false) - true to simulate a sound played inside a building or similar"},{"name":"soundPosition","type":"PositionASL","optional":true,"default":"nil","description":"position for sound emitter, overrides *soundSource*. Object is also supported (see note below). Since Arma 3 v2.24 use nil to skip this param\n\n> [!NOTE]\n> If a following parameter has to be used, simply use `getPosASL _soundSource` for *soundPosition* instead of `_soundSource` for *soundSource*.\n\n> [!IMPORTANT]\n> This parameter also takes Object but their AGL position is used instead of ASL resulting in sound source being underground if they're above ground, always use PositionASL instead.","type_expr":"PositionASL","text":"soundPosition: PositionASL - (Optional, default nil) position for sound emitter, overrides *soundSource*. Object is also supported (see note below). Since Arma 3 v2.24 use nil to skip this param\n\n> [!NOTE]\n> If a following parameter has to be used, simply use `getPosASL _soundSource` for *soundPosition* instead of `_soundSource` for *soundSource*.\n\n> [!IMPORTANT]\n> This parameter also takes Object but their AGL position is used instead of ASL resulting in sound source being underground if they're above ground, always use PositionASL instead."},{"name":"volume","type":"Number","optional":true,"default":"1","description":"sound volume. A value greater than 5 gets capped","type_expr":"Number","text":"volume: Number - (Optional, default 1) sound volume. A value greater than 5 gets capped"},{"name":"soundPitch","type":"Number","optional":true,"default":"1","description":"1.0 → normal\n- 0.5 → Darth Vader\n- 2.0 → Chipmunks","type_expr":"Number","text":"soundPitch: Number - (Optional, default 1)\n\n- 1.0 → normal\n- 0.5 → Darth Vader\n- 2.0 → Chipmunks"},{"name":"distance","type":"Number","optional":true,"default":"0","description":"how far the sound is audible, in meters. `0` means no maximum distance","type_expr":"Number","text":"distance: Number - (Optional, default 0) how far the sound is audible, in meters. `0` means no maximum distance"},{"name":"offset","type":"Number","optional":true,"default":"0","description":"offset in seconds. Same as with playMusic (ignored if sound is set to play repeatedly, see 'loop')","type_expr":"Number","since":"arma3 2.00","text":"offset: Number - (Optional, default 0) offset in seconds. Same as with playMusic (ignored if sound is set to play repeatedly, see 'loop')"},{"name":"local","type":"Boolean","optional":true,"default":"false","description":"if true the sound will not be broadcast over network","type_expr":"Boolean","since":"arma3 2.06","text":"local: Boolean - (Optional, default false) if true the sound will not be broadcast over network"},{"name":"loop","type":"Boolean","optional":true,"default":"false","description":"if true the sound will repeat indefinitely. In MP, requires 'local' to be set to true. Use stopSound to stop.","type_expr":"Boolean","since":"arma3 2.22","text":"loop: Boolean - (Optional, default false) if true the sound will repeat indefinitely. In MP, requires 'local' to be set to true. Use stopSound to stop."}],"returns":{"type":"Number","type_expr":"Number","description":"id of the sound (0..65535) (was Nothing before Arma 3 v2.12)"},"form":"unary","right":{"text":"[filename, soundSource, isInside, soundPosition, volume, soundPitch, distance, offset, local, loop]"}}],"examples":[{"code":["playSound3D [\"A3\\Sounds_F\\sfx\\blip1.wss\", player];"]},{"code":["playSound3D [\"A3\\Sounds_F\\sfx\\blip1.wss\", player, false, getPosASL player, 1, 1, 0];"]},{"code":["playSound3D [getMissionPath \"mySound.ogg\", player]; // to play a mission directory sound"]},{"text":"Sound file extension must be specified even if a config entry has none:\n\n```sqf\nplaySound3D [\"A3\\Sounds_F\\sfx\\alarm_independent\", player];        // no sound\nplaySound3D [\"A3\\Sounds_F\\sfx\\alarm_independent.wss\", player];    // alarm\n```","code":["playSound3D [\"A3\\Sounds_F\\sfx\\alarm_independent\", player];\t\t// no sound\nplaySound3D [\"A3\\Sounds_F\\sfx\\alarm_independent.wss\", player];\t// alarm"]},{"text":"Example 2 from Arma 3 v2.24\n\n```sqf\nplaySound3D [\"A3\\Sounds_F\\sfx\\blip1.wss\", player, false, nil, 1, 1, 0];\n```","code":["playSound3D [\"A3\\Sounds_F\\sfx\\blip1.wss\", player, false, nil, 1, 1, 0];"]}],"see_also":["say3D","playSound","say2D","say","createSoundSource","setRandomLip","getMissionPath","playSoundUI","stopSound"],"notes":[{"user":"Killzone_Kid","date":"2014-09-26T09:18:00Z","text":"Currently, playSound3D is not JIP compatible, so joining players will not hear the sound if is started before and is still playing when player joins."},{"user":"Killzone_Kid","date":"2014-11-08T21:48:00Z","text":"When object is supplied but not a position, the position is taken from object, otherwise the position is taken from supplied position. That doesn't mean that when position is taken from object it is going to follow object when it changes position. The sound is generated at object position and it stays there.\n\nOne other important note: If *soundSource* param is objNull then this command develops the same bug with first person view as createSoundSource and say3D. If *soundSource* is player then the bug is inverted. It seems that passing vehicle player as *soundSource* param is the only way to make it behave correctly when vehicles involved."},{"user":"R3vo","date":"2020-10-07T12:24:00Z","text":"The sound will be distorted according to the [Doppler effect](https://en.wikipedia.org/wiki/Doppler_effect) when passing by the sound source quickly."},{"user":"Hypoxic125","date":"2023-05-14T13:57:52Z","text":"Wait for sound to end:\n\n```sqf\nprivate _sound = playSound3D [\"A3\\Sounds_F\\sfx\\blip1.wss\", player];\nwaitUntil { soundParams _sound isEqualTo [] };\n```"}]},{"name":"playSoundUI","title":"playSoundUI","type":"command","url":"https://community.bistudio.com/wiki/playSoundUI","revid":376806,"updated":"2025-11-21T17:10:26Z","groups":["Sounds"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","locality":{"effect":"local"},"description":"Plays given CfgSounds sound or a sound file given by file path through a dedicated UI sound channel unaffected by the global mixer volumes. If the file path is given, the leading slash will be ignored. To stop the sound use stopSound","syntaxes":[{"syntax":"playSoundUI [sound, volume, soundPitch, isEffect, offset, loop]","params":[{"name":"sound","type":"String","description":"CfgSounds class or file as used in playSound3D (see Arma 3: Sound Files for available file names)","type_expr":"String"},{"name":"volume","type":"Number","optional":true,"default":"1","description":"sound volume clamped in range 0..5","type_expr":"Number","text":"volume: Number - (Optional, default 1) sound volume clamped in range 0..5"},{"name":"soundPitch","type":"Number","optional":true,"default":"1","description":"1.0 → normal\n- 0.5 → Darth Vader\n- 2.0 → Chipmunks","type_expr":"Number","text":"soundPitch: Number - (Optional, default 1)\n\n- 1.0 → normal\n- 0.5 → Darth Vader\n- 2.0 → Chipmunks"},{"name":"isEffect","type":"Boolean","optional":true,"default":"false","description":"if true, diverts sound through effects channel (see fadeSound, soundVolume)","type_expr":"Boolean","text":"isEffect: Boolean - (Optional, default false) if true, diverts sound through effects channel (see fadeSound, soundVolume)"},{"name":"offset","type":"Number","optional":true,"default":"0","description":"offset in seconds. Same as with playSound3D (ignored if sound is set to 'loop')","type_expr":"Number","since":"arma3 2.12","text":"offset: Number - (Optional, default 0) offset in seconds. Same as with playSound3D (ignored if sound is set to 'loop')"},{"name":"loop","type":"Boolean","optional":true,"default":"false","description":"If true the sound will loop forever. Use stopSound to stop","type_expr":"Boolean","since":"arma3 2.22","text":"loop: Boolean - (Optional, default false) If true the sound will loop forever. Use stopSound to stop"}],"returns":{"type":"Number","type_expr":"Number","description":"id of the sound (0..65535) since Arma 3 v2.12 (was Nothing before that)"},"form":"unary","right":{"text":"[sound, volume, soundPitch, isEffect, offset, loop]"}}],"examples":[{"code":["playSoundUI [\"Alarm\", 0.5, 0.5];"]},{"code":["playSoundUI [\"A3\\Sounds_F\\sfx\\blip1.wss\"];"]},{"text":"Sound file extension must be specified even if a config entry has none:\n\n```sqf\nplaySoundUI [\"A3\\Sounds_F\\sfx\\alarm_independent\", 5, 1];        // no sound\nplaySoundUI [\"A3\\Sounds_F\\sfx\\alarm_independent.wss\", 5, 1];    // alarm\n```","code":["playSoundUI [\"A3\\Sounds_F\\sfx\\alarm_independent\", 5, 1];\t\t// no sound\nplaySoundUI [\"A3\\Sounds_F\\sfx\\alarm_independent.wss\", 5, 1];\t// alarm"]}],"see_also":["stopSound","soundParams","say3D","playSound","say2D","say","createSoundSource","setRandomLip","getMissionPath","playSound3D"]},{"name":"pose","title":"pose","type":"command","url":"https://community.bistudio.com/wiki/pose","revid":351637,"updated":"2023-12-12T20:33:12Z","groups":["Unit Control"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"argument":"global"},"description":"Returns the pose of the given unit.","syntaxes":[{"syntax":"pose unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"can be one of:\n- `\"Dead\"` - `\"Weapon\"` (special weapon - AT) - `\"BinocLying\"` - `\"LyingNoWeapon\"` - `\"Lying\"` - `\"HandGunLying\"` - `\"Crouch\"` - `\"HandGunCrouch\"` - `\"Combat\"` - `\"HandGunStand\"` - `\"Stand\"` - `\"Swimming\"` - `\"BottomSwimming\"` - `\"SurfaceSwimming\"` - `\"Diving\"` - `\"BottomDiving\"` - `\"SurfaceDiving\"` - `\"NoWeapon\"` (civilian moves) - `\"Binoc\"` (binocular pose) - `\"BinocStand\"` (binocular pose (weapon on back)) - `\"Healing\"` - `\"Dragged\"` - `\"Carrying\"` - `\"Freefall\"`","text":"String - can be one of:\n\n- `\"Dead\"`\n- `\"Weapon\"` (special weapon - AT)\n- `\"BinocLying\"`\n- `\"LyingNoWeapon\"`\n- `\"Lying\"`\n- `\"HandGunLying\"`\n- `\"Crouch\"`\n- `\"HandGunCrouch\"`\n- `\"Combat\"`\n- `\"HandGunStand\"`\n- `\"Stand\"`\n- `\"Swimming\"`\n- `\"BottomSwimming\"`\n- `\"SurfaceSwimming\"`\n- `\"Diving\"`\n- `\"BottomDiving\"`\n- `\"SurfaceDiving\"`\n- `\"NoWeapon\"` (civilian moves)\n- `\"Binoc\"` (binocular pose)\n- `\"BinocStand\"` (binocular pose (weapon on back))\n- `\"Healing\"`\n- `\"Dragged\"`\n- `\"Carrying\"`\n- `\"Freefall\"`"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["if (pose player == \"SurfaceSwimming\") then { hint \"How's water?\" };"]}],"see_also":["animationState","unitPos","stance","getLeaning"]},{"name":"position","title":"position","type":"command","url":"https://community.bistudio.com/wiki/position","revid":377525,"updated":"2026-01-02T06:52:45Z","groups":["Positions"],"status":"ok","games":{"ofp":null,"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","description":"Returns position of an object (alias of getPos) or location (alias of locationPosition).\n\n> [!IMPORTANT]\n> Do **not** use this command to get an object's position in 3D. See getPos for an explanation and alternatives.","syntaxes":[{"syntax":"position object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionAGLS","type_expr":"PositionAGLS"},"form":"unary","right":{"text":"object"}},{"syntax":"position location","params":[{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"see locationPosition\n> [!IMPORTANT] > This position is the location's position regardless of attachObject usage - see Example 3.","text":"PositionAGL - see locationPosition\n\n> [!IMPORTANT]\n> This position is the location's position **regardless of attachObject usage** - see Example 3."},"form":"unary","right":{"text":"location"}}],"examples":[{"code":["private _pos = position player;"]},{"code":["_myLocationHomePos = position myLocation;"]},{"text":"```sqf\nprivate _location = createLocation [\"b_inf\", [1000, 1000], 1, 1];\n_location attachObject player;\nlocationPosition _location;    // [1916.03,5711.98,12.208]\ngetPos _location;            // [1916.03,5711.98,12.208]\nposition _location;            // [1000,1000,0]\n```","code":["private _location = createLocation [\"b_inf\", [1000, 1000], 1, 1];\n_location attachObject player;\nlocationPosition _location;\t// [1916.03,5711.98,12.208]\ngetPos _location;\t\t\t// [1916.03,5711.98,12.208]\nposition _location;\t\t\t// [1000,1000,0]"]}],"see_also":["getPos","getPosATL","getPosASL","getPosASLW","visiblePosition","getPosVisual","visiblePositionASL","locationPosition"]},{"name":"positionCameraToWorld","title":"positionCameraToWorld","type":"command","url":"https://community.bistudio.com/wiki/positionCameraToWorld","revid":378531,"updated":"2026-05-04T02:19:23Z","groups":["Camera Control","Positions"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Get the world coordinate space (AGL) from a camera-relative position.","syntaxes":[{"syntax":"positionCameraToWorld cameraPos","params":[{"name":"cameraPos","type":"PositionRelative","description":"relative camera position, format **[x, z, y]** (X = left-right, Z = below-above, Y = back-front)\n\n> [!IMPORTANT]\n> This command has Y and Z axes swapped around, which is different from the usual model space coordinates format ([x, y, z]).","type_expr":"PositionRelative"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"camera world position"},"form":"unary","right":{"text":"cameraPos"}}],"examples":[{"code":["_worldPos = positionCameraToWorld _cameraPos;"]},{"text":"Example demonstrating reversed Y and Z:\n\n```sqf\nplayer setDir 0; // assuming player is looking forward\nhint str [positionCameraToWorld [0,0,0], positionCameraToWorld [0,0,1]];\n/*\n[\n    [2481.35, 5671.21, 1.51395],\n    [2481.35, 5672.21, 1.46955]\n]\n*/\n```","code":["player setDir 0; // assuming player is looking forward\nhint str [positionCameraToWorld [0,0,0], positionCameraToWorld [0,0,1]];\n/*\n[\n\t[2481.35, 5671.21, 1.51395],\n\t[2481.35, 5672.21, 1.46955]\n]\n*/"]},{"code":["_cameraAGLPosition = positionCameraToWorld [0,0,0];"]}],"see_also":["modelToWorld","modelToWorldVisual","getCameraViewDirection","weaponDirection","eyeDirection","vectorDir","vectorDirVisual"],"notes":[{"user":"Kronzky","date":"2008-10-17T11:25:00Z","text":"By measuring the distance between the camera and the player one can determine whether 1st-person or 3rd-person view is being used:\n\n```sqf\nif ((positionCameraToWorld [0,0,0] distance player)>2) then { hint \"3rd person\" } else { hint \"1st person\" };\n```"},{"user":"Worldeater","date":"2010-10-17T22:45:00Z","text":"The camera coordinate system is different from the model coordinate system: when modelToWorld uses [x, y, z] then positionCameraToWorld uses [x, z, y]. So for a steady camera the following is true:\n\n```sqf\npositionCameraToWorld [5,10,15] == _camera modelToWorld [5,15,10];\n```"}]},{"name":"posScreenToWorld","title":"posScreenToWorld","type":"command","url":"https://community.bistudio.com/wiki/posScreenToWorld","revid":379457,"updated":"2026-10-31T00:09:04Z","groups":["Positions"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Converts map screen coordinates into world coordinates. Unlike ctrlMapScreenToWorld, this command returns world position is format [x, y, 0], otherwise it is identical to it.","syntaxes":[{"syntax":"map posScreenToWorld [x, y]","params":[{"name":"map","type":"Control","description":"map control","type_expr":"Control"},{"name":"x","type":"Number","description":"screen X","type_expr":"Number"},{"name":"y","type":"Number","description":"screen Y","type_expr":"Number"}],"returns":{"type":"Position3D","type_expr":"Position3D","description":"world position in format [x,y,0]"},"form":"binary","left":{"text":"map"},"right":{"text":"[x, y]"}}],"examples":[{"code":["_worldCoord = _control posScreenToWorld _ScreenCoord;"]},{"code":["_worldCoord = _control posScreenToWorld [_x, _y];"]},{"code":["_worldCoord = _control posScreenToWorld [0.5, 0.5];"]}],"see_also":["posWorldToScreen","ctrlMapScreenToWorld","ctrlMapWorldToScreen"],"notes":[{"user":"LowFly","date":"2007-04-07T10:03:00Z","text":"*Notes:*\n\nYou can get the screen coordinates by the UI Event Handlers onMouseButtonDown, onMouseButtonUp, onMouseButtonClick, onMouseButtonDblClick.\n\nThe return Array is in 2D, you can use it with all set-position commands.\n\n```sqf\n_x = returnArray select 0;\n_y = returnArray select 1;\n```"}]},{"name":"posWorldToScreen","title":"posWorldToScreen","type":"command","url":"https://community.bistudio.com/wiki/posWorldToScreen","revid":377539,"updated":"2026-01-02T06:54:25Z","groups":["GUI Control - Map","Positions"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Converts world coordinates into map screen coordinates. This command is identical to ctrlMapWorldToScreen.","syntaxes":[{"syntax":"map posWorldToScreen position","params":[{"name":"map","type":"Control","description":"map control","type_expr":"Control","text":"map : Control - map control"},{"name":"position","type":"Position2D or Position3D","description":"world position","type_expr":"Position2D | Position3D","text":"position : Position2D or Position3D - world position"}],"returns":{"type":"Position2D","type_expr":"Position2D","description":"screen coordinates in format [x, y]"},"form":"binary","left":{"text":"map"},"right":{"text":"position"}}],"examples":[{"code":["_screenCoord = _control posWorldToScreen _worldCoord;"]},{"code":["_screenCoord = _control posWorldToScreen position player;"]}],"see_also":["posScreenToWorld","ctrlMapWorldToScreen"]},{"name":"ppEffectAdjust","title":"ppEffectAdjust","type":"command","url":"https://community.bistudio.com/wiki/ppEffectAdjust","revid":379297,"updated":"2026-10-30T23:47:46Z","groups":["Camera Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Set post process effect parameters.\n\n> [!NOTE]\n> The two syntaxes differ in what format of the params they accept. The syntax with PP name expects colors to be packed into arrays within main array, while the syntax with PP handle can handle both flat and packed array. Therefore it is recommended to use the universal packed format, such as shown in the examples.","syntaxes":[{"syntax":"effect ppEffectAdjust settings","params":[{"name":"effect","type":"String or Number","description":"String or Number\n\n- String - effect name\n- Number - effect handle","type_expr":"String | Number","text":"effect: String or Number\n\n- String - effect name\n- Number - effect handle"},{"name":"settings","type":"Array of Anything","description":"array of effect params","type_expr":"Array<Anything>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"effect"},"right":{"text":"settings"}}],"examples":[{"code":["\"colorCorrections\" ppEffectAdjust [1, 1, -0.01, [0, 0, 0, 0], [1.5, 1, 1.2, 0.6], [0.199, 0.587, 0.114, 0]];"]},{"text":"Black&White:\n\n```sqf\n_colorCorrectionsEffHandle ppEffectAdjust [1, 0.4, 0, [0, 0, 0, 0], [1, 1, 1, 0], [1, 1, 1, 0]];\n```","code":["_colorCorrectionsEffHandle ppEffectAdjust [1, 0.4, 0, [0, 0, 0, 0], [1, 1, 1, 0], [1, 1, 1, 0]];"]}],"see_also":["Post Process Effects","ppEffectForceInNVG","ppEffectEnable","ppEffectEnabled","ppEffectDestroy","ppEffectCreate","ppEffectCommitted","ppEffectCommit","setPiPEffect"]},{"name":"ppEffectCommit","title":"ppEffectCommit","type":"command","url":"https://community.bistudio.com/wiki/ppEffectCommit","revid":327517,"updated":"2022-07-12T22:25:19Z","groups":["Camera Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Commit post process effect in given time.","syntaxes":[{"syntax":"effect ppEffectCommit commit","params":[{"name":"effect","type":"String","description":"name of the effect","type_expr":"String"},{"name":"commit","type":"Number","description":"duration","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"effect"},"right":{"text":"commit"}},{"syntax":"handle ppEffectCommit commit","params":[{"name":"handle","type":"Number","description":"handle of the effect","type_expr":"Number"},{"name":"commit","type":"Number","description":"duration","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"handle"},"right":{"text":"commit"}},{"syntax":"handles ppEffectCommit commit","params":[{"name":"handles","type":"Array of Numbers","description":"list of handles","type_expr":"Array<Number>"},{"name":"commit","type":"Number","description":"duration","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"handles"},"right":{"text":"commit"}}],"examples":[{"code":["\"colorCorrection\" ppEffectCommit 3;"]},{"code":["_hndl ppEffectCommit 3;"]},{"code":["[_hndl1, _hndl2] ppEffectCommit 3;"]}],"see_also":["Post Process Effects","ppEffectForceInNVG","ppEffectEnable","ppEffectEnabled","ppEffectDestroy","ppEffectCreate","ppEffectCommitted","ppEffectAdjust"]},{"name":"ppEffectCommitted","title":"ppEffectCommitted","type":"command","url":"https://community.bistudio.com/wiki/ppEffectCommitted","revid":348518,"updated":"2023-11-08T13:06:00Z","groups":["Camera Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Check whether given post process effect is committed.","syntaxes":[{"syntax":"ppEffectCommitted effect","params":[{"name":"effect","type":"String","description":"effect name","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"effect"}},{"syntax":"ppEffectCommitted handle","params":[{"name":"handle","type":"Number","description":"effect handle","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"handle"}}],"examples":[{"code":["ppEffectCommitted \"colorCorrection\";"]},{"code":["ppEffectCommitted _hndl;"]},{"code":["if (ppEffectCommitted \"colorCorrection\") then { hint \"alteration done !\" };"]}],"see_also":["Post Process Effects","ppEffectForceInNVG","ppEffectEnable","ppEffectDestroy","ppEffectCreate","ppEffectCommit","ppEffectAdjust"]},{"name":"ppEffectCreate","title":"ppEffectCreate","type":"command","url":"https://community.bistudio.com/wiki/ppEffectCreate","revid":376949,"updated":"2025-12-31T23:30:11Z","groups":["Camera Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Creates Post Process Effects specified by effect name and priority.\nSupported effects:\n\n- \"RadialBlur\"\n- \"ChromAberration\"\n- \"WetDistortion\"\n- \"ColorCorrections\"\n- \"DynamicBlur\"\n- \"FilmGrain\"\n- \"ColorInversion\"\n- \"SSAO\"\n- \"Resolution\"","syntaxes":[{"syntax":"ppEffectCreate [name, priority]","params":[{"name":"name","type":"String","description":"name of effect type","type_expr":"String"},{"name":"priority","type":"Number","description":"unique priority, defines order of applying effect to the scene. If there is another effect using the same priority, creation will fail","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"handle or -1 if failed"},"form":"unary","right":{"text":"[name, priority]"}},{"syntax":"ppEffectCreate [[name1, priority1], ...]","params":[{"name":"nameN","type":"String","description":"name of effect type","type_expr":"String"},{"name":"priorityN","type":"Number","description":"unique priority, defines order of applying effect to the scene. If there is another effect using the same priority, creation will fail","type_expr":"Number"}],"returns":{"type":"Array of Numbers or Nothing","type_expr":"Array<Number> | Nothing","description":"if failed","text":"Array of Numbers or Nothing if failed"},"form":"unary","right":{"text":"[[name1, priority1], ...]"}}],"examples":[{"code":["_ppGrain = ppEffectCreate [\"filmGrain\", 2005];"]},{"text":"If an effect ID is already used, the effect is not created. Use the following:\n\n```sqf\nprivate _name = \"ChromAberration\";\nprivate _priority = 200;\nprivate _handle = -1;\nwhile\n{\n    _handle = ppEffectCreate [_name, _priority];\n    _handle < 0;\n} do {\n    _priority = _priority + 1;\n};\n\n// _handle can be used here as usual\n```\n\nor\n\n```sqf\nprivate _name = \"ChromAberration\";\nprivate _priority = 200;\nprivate _handle = -1;\nwaitUntil { _handle = ppEffectCreate [_name, _priority]; _priority = _priority + 1; _handle > 0; };\n\n// _handle can be used here as usual\n```","code":["private _name = \"ChromAberration\";\nprivate _priority = 200;\nprivate _handle = -1;\nwhile\n{\n\t_handle = ppEffectCreate [_name, _priority];\n\t_handle < 0;\n} do {\n\t_priority = _priority + 1;\n};\n\n// _handle can be used here as usual","private _name = \"ChromAberration\";\nprivate _priority = 200;\nprivate _handle = -1;\nwaitUntil { _handle = ppEffectCreate [_name, _priority]; _priority = _priority + 1; _handle > 0; };\n\n// _handle can be used here as usual"]}],"see_also":["Post Process Effects","ppEffectForceInNVG","ppEffectEnable","ppEffectEnabled","ppEffectDestroy","ppEffectCommit","ppEffectCommitted","ppEffectAdjust"],"notes":[{"user":"Lou Montana","date":"2009-06-29T22:33:00Z","text":"For some examples, check [this forums' topic](http://forums.bistudio.com/showthread.php?t=75528)."},{"user":"Raymix (DayZ)","date":"2015-06-24T04:08:00Z","text":"\"wetDistortion\" only works if handle is used."}]},{"name":"ppEffectDestroy","title":"ppEffectDestroy","type":"command","url":"https://community.bistudio.com/wiki/ppEffectDestroy","revid":330371,"updated":"2022-09-04T20:26:39Z","groups":["Camera Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Destroy Post Process Effects given by handle or array of handles.","syntaxes":[{"syntax":"ppEffectDestroy effect","params":[{"name":"effect","type":"Number","description":"effect handle","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"effect"}},{"syntax":"ppEffectDestroy effects","params":[{"name":"effects","type":"Array of Numbers","description":"array of effect handles","type_expr":"Array<Number>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"effects"}}],"examples":[{"code":["ppEffectDestroy _hndl;"]},{"code":["ppEffectDestroy [_hndl0, _hndl1, _hndl2];"]}],"see_also":["Post Process Effects","ppEffectForceInNVG","ppEffectEnable","ppEffectEnabled","ppEffectCreate","ppEffectCommit","ppEffectCommitted","ppEffectAdjust"]},{"name":"ppEffectEnable","title":"ppEffectEnable","type":"command","url":"https://community.bistudio.com/wiki/ppEffectEnable","revid":363568,"updated":"2024-04-07T08:27:59Z","groups":["Camera Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Enable / disable Post Process Effects\n\n> [!IMPORTANT]\n> If effect fails to get enabled (can check it with ppEffectEnabled) try adding a little sleep in front of it.","syntaxes":[{"syntax":"effect ppEffectEnable enable","params":[{"name":"effect","type":"String","description":"name of the effect","type_expr":"String"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"effect"},"right":{"text":"enable"}},{"syntax":"effect ppEffectEnable enable","params":[{"name":"effect","type":"Number","description":"handle of the effect","type_expr":"Number"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"effect"},"right":{"text":"enable"}},{"syntax":"effectArray ppEffectEnable enable","params":[{"name":"effectArray","type":"Array of Numbers","description":"array of effect handles","type_expr":"Array<Number>"},{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"effectArray"},"right":{"text":"enable"}}],"examples":[{"code":["\"colorCorrections\" ppEffectEnable true;"]},{"code":["_hndl ppEffectEnable true;"]},{"code":["[_hndl1, _hndl2] ppEffectEnable true;"]}],"see_also":["Post Process Effects","ppEffectForceInNVG","ppEffectDestroy","ppEffectCreate","ppEffectEnabled","ppEffectCommit","ppEffectCommitted","ppEffectAdjust"],"notes":[{"user":"Pi123263","date":"2024-04-06T13:32:57Z","text":"Using ppEffectEnable immediatelly enables/disables the effect. If you want the effect to fade in/out it might be better to use ppEffectAdjust.\n\nIf you want to fade out an effect using ppEffectAdjust you can set the values for the command back to the default and then use ppEffectCommit to set the time for the fadeout.\n\nExample:\nActivate effect:\n\n```sqf\n\"colorCorrections\" ppEffectAdjust [1,1,0,[0,0,0,0],[0,0,0,0.24],[1,1,1,0],[0.6,0.5,0,0,-0.1,0.4,0.8]];\n\"colorCorrections\" ppEffectEnable true;\n\"colorCorrections\" ppEffectCommit 0;\n```\n\nAnd then fade the effect out over 10 seconds:\n\n```sqf\n\"colorCorrections\" ppEffectAdjust [1,1,0,[0,0,0,0],[1,1,1,1],[0.299, 0.587, 0.114, 0],[-1,-1,0,0,0,0,0]];\n\"colorCorrections\" ppEffectCommit 10;\n```"}]},{"name":"ppEffectEnabled","title":"ppEffectEnabled","type":"command","url":"https://community.bistudio.com/wiki/ppEffectEnabled","revid":327511,"updated":"2022-07-12T22:24:54Z","groups":["Camera Control"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Checks whether given post process effect is enabled","syntaxes":[{"syntax":"ppEffectEnabled effect","params":[{"name":"effect","type":"Number","description":"effect handle","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"effect"}},{"syntax":"ppEffectEnabled effect","since":"arma3 2.04","params":[{"name":"effect","type":"String","description":"effect name","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"effect"}}],"examples":[{"code":["_enabled = ppEffectEnabled _hndl;"]},{"code":["_enabled = ppEffectEnabled \"DynamicBlur\";"]}],"see_also":["Post Process Effects","ppEffectForceInNVG","ppEffectDestroy","ppEffectEnable","ppEffectCreate","ppEffectCommit","ppEffectCommitted","ppEffectAdjust"]},{"name":"ppEffectForceInNVG","title":"ppEffectForceInNVG","type":"command","url":"https://community.bistudio.com/wiki/ppEffectForceInNVG","revid":348736,"updated":"2023-11-08T14:32:10Z","groups":["Camera Control"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Forces use of Post Process Effects in NVG.","syntaxes":[{"syntax":"ppHandle ppEffectForceInNVG force","params":[{"name":"ppHandle","type":"Number","description":"handle of the post processing returned by ppEffectCreate","type_expr":"Number"},{"name":"force","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ppHandle"},"right":{"text":"force"}}],"examples":[{"code":["_ppGrain ppEffectForceInNVG true;"]}],"see_also":["Post Process Effects","ppEffectEnable","ppEffectEnabled","ppEffectDestroy","ppEffectCreate","ppEffectCommit","ppEffectCommitted","ppEffectAdjust"]},{"name":"precision","title":"precision","type":"command","url":"https://community.bistudio.com/wiki/precision","revid":369414,"updated":"2024-09-03T18:46:04Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return the movement precision of the given entity, how is the entity able to be precise when moving to given target.\n\n> [!NOTE]\n> See CfgVehicles Config Reference - precision.","syntaxes":[{"syntax":"precision entity","params":[{"name":"entity","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"accuracy in metres"},"form":"unary","right":{"text":"entity"}}],"examples":[{"code":["// used in formationCDanger.fsm\nif (getPosATL _this distance _dangerPos <= precision _this) then { /* ... */ };"]}],"see_also":["visiblePositionASL"]},{"name":"preloadCamera","title":"preloadCamera","type":"command","url":"https://community.bistudio.com/wiki/preloadCamera","revid":377505,"updated":"2026-01-02T06:50:05Z","groups":["Camera Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Preload all textures and models around given Position to avoid visual artifacts after camera is moved.\n\nShould be used before any abrupt camera change/cut.\n\nReturns true once all data is ready. See camPreload for alternative, more flexible camera preloading.","syntaxes":[{"syntax":"preloadCamera position","params":[{"name":"position","type":"Position","type_expr":"Position"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"position"}}],"examples":[{"code":["waitUntil { preloadCamera markerPos \"cam_location_2\" };"]}],"see_also":["camPreload","camPreloaded"]},{"name":"preloadObject","title":"preloadObject","type":"command","url":"https://community.bistudio.com/wiki/preloadObject","revid":369157,"updated":"2024-09-03T10:34:40Z","groups":["Object Manipulation"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Preloads all textures, materials and proxies needed to render given object. Works with objects and classnames - note that classnames require an object instance in the mission.","syntaxes":[{"syntax":"distance preloadObject object","params":[{"name":"distance","type":"Number","description":"distance at which preload the object","type_expr":"Number"},{"name":"object","type":"Object or String","description":"Object or String\n\n- Object - existing object\n- String - object classname - an object of that type **must** exist in the mission for it to have effect","type_expr":"Object | String","text":"object: Object or String\n\n- Object - existing object\n- String - object classname - an object of that type **must** exist in the mission for it to have effect"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when preload is finished"},"form":"binary","left":{"text":"distance"},"right":{"text":"object"}}],"examples":[{"text":"```sqf\n0 spawn\n{\n    waitUntil { 10 preloadObject \"SoldierW\" };\n    hint \"Preload finished\";\n};\n```","code":["0 spawn \n{\n\twaitUntil { 10 preloadObject \"SoldierW\" };\n\thint \"Preload finished\";\n};"]},{"text":"```sqf\n0 spawn\n{\n    waitUntil { 10 preloadObject leader player };\n    hint \"Preload finished\";\n};\n```","code":["0 spawn \n{\n\twaitUntil { 10 preloadObject leader player };\n\thint \"Preload finished\";\n};"]}],"see_also":["preloadCamera","preloadSound","preloadTitleObj","preloadTitleRsc"]},{"name":"preloadSound","title":"preloadSound","type":"command","url":"https://community.bistudio.com/wiki/preloadSound","revid":376517,"updated":"2025-10-22T23:11:17Z","groups":["Sounds"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Makes sure that a sound can start playing without any delay once it is needed.\nCommand works in Arma 3 but might not be implemented in earlier Arma installments.","syntaxes":[{"syntax":"preloadSound soundName","params":[{"name":"soundName","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"soundName"}}],"examples":[{"code":["private _sounds = getArray (missionConfigFile >> \"CfgSounds\" >> \"sounds\");\nwaitUntil { _sounds findIf { !(preloadSound _x) } == -1 };"]}],"see_also":["preloadTitleRsc"]},{"name":"preloadTitleObj","title":"preloadTitleObj","type":"command","url":"https://community.bistudio.com/wiki/preloadTitleObj","revid":363768,"updated":"2024-04-19T08:56:31Z","groups":["GUI Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Preloads data for the given resource object.","syntaxes":[{"syntax":"preloadTitleObj [name, type, speed, showInMap]","params":[{"name":"name","type":"String","description":"defined in `configFile >> \"CfgTitles\" >> name`","type_expr":"String"},{"name":"type","type":"String","description":"see Title Effect Types","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"-1","type_expr":"Number","text":"speed: Number - (Optional, default -1)"},{"name":"showInMap","type":"Boolean","optional":true,"default":"true","type_expr":"Boolean","text":"showInMap: Boolean - (Optional, default true)"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"[name, type, speed, showInMap]"}}],"examples":[{"code":["_ok = preloadTitleObj [\"BISLogo\", \"PLAIN\"];"]}],"see_also":["cutObj"]},{"name":"preloadTitleRsc","title":"preloadTitleRsc","type":"command","url":"https://community.bistudio.com/wiki/preloadTitleRsc","revid":322925,"updated":"2022-06-28T21:42:39Z","groups":["GUI Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Resource title - preload data. The resource can be defined in the Description.ext file.","syntaxes":[{"syntax":"preloadTitleRsc [name, type, speed, showInMap]","params":[{"name":"name","type":"String","description":"defined in Description.ext for the mission","type_expr":"String"},{"name":"type","type":"String","description":"e.g \"PLAIN\"","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"description":"ignored","type_expr":"Number","text":"speed: Number - (Optional) ignored"},{"name":"showInMap","type":"Boolean","optional":true,"type_expr":"Boolean","text":"showInMap: Boolean - (Optional)"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"[name, type, speed, showInMap]"}}],"examples":[{"code":["_ok = preloadTitleRsc [\"BIS\", \"PLAIN\"];"]}]},{"name":"preprocessFile","title":"preprocessFile","type":"command","url":"https://community.bistudio.com/wiki/preprocessFile","revid":349792,"updated":"2023-11-20T22:10:15Z","groups":["System"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Reads and processes the content of the specified file. Preprocessor is C-like, supports comments using `//` or `/*` and `*/` and PreProcessor Commands.\nDue to the hard-drive access this command executes and the lack of caching this command should not be used in time-critical script loops.\n\n> [!WARNING]\n> If the file you are loading is not prepared using UTF-8 encoding and contains some characters with codes > 127, they might convert incorrectly.","syntaxes":[{"syntax":"preprocessFile fileName","params":[{"name":"fileName","type":"String","description":"path to the file and name of the file","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"fileName"}}],"examples":[{"code":["_content = preprocessFile \"myFunction.sqf\";"]}],"see_also":["fileExists","preprocessFileLineNumbers","loadFile","Function","SQF Syntax","call","spawn","execVM","PreProcessor Commands"],"notes":[{"user":"Alef","date":"2008-03-04T22:35:00Z","text":"File path is always relative to mission directory. If script dir\\a.sqf includes dir\\b.sqf, use \"dir\\b.sqf\" and not \"b.sqf\"."},{"user":"Kju","date":"2011-07-08T10:59:00Z","text":"Use preprocessFileLineNumbers instead as it provides more context information on error."},{"user":"Killzone_Kid","date":"2013-12-17T13:44:00Z","text":"The main difference between preprocessFile and preprocessFileLineNumbers is that the latter adds #line directive to the target file, which allows to log the `__LINE__` error happened at and the `__FILE__` error happened in."},{"user":"BrotherhoodOfHam","date":"2014-07-25T18:43:00Z","text":"Essentially what the preprocessFile command does is it refers to the contents of a file as a string:\nExample 1:\nboop.html:\n\n```html\n<t align = 'center' valign = 'middle' shadow = '0' size = '2'>structured text</t>\n```\n\ninit.sqf:\n\n```sqf\n_text = parseText preprocessFile \"boop.html\";\nhint _text;\n```\n\nThis is especially useful for long strings, and it works on files with any file extension as long as they can be edited with a text editor.\nExample 2:\ninit.sqf:\n\n```sqf\nhint preprocessFile \"description.ext\";\ncopyToClipboard preprocessFile \"mission.sqm\";\n```\n\nThe above is all valid. However, using *.jpg or any other files saved in an image format is not possible."}]},{"name":"preprocessFileLineNumbers","title":"preprocessFileLineNumbers","type":"command","url":"https://community.bistudio.com/wiki/preprocessFileLineNumbers","revid":364516,"updated":"2024-05-16T20:46:22Z","groups":["System"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Returns the preprocessed content of the given file. The preprocessor is C-like, it supports comments using /* */ and PreProcessor Commands. The preprocessor also adds a default debug entrypoint for compiler at the begining of script: `#line 1 \"aFilename\"`\n\nThe **#line** keyword can be used in any script that are not preprocess, or with preprocess script with extra macro to protect reserverd sharp character. The format is:\n`#line <number> \"<name>\"`\nfollowed by new line. <number> could be only positive integer and <name> could be any name. This will be used only if an error occurs in the script. The error will contain the line:\n`File <filename>, line <linenumber>`\nwhere <filename> will be the <name> you set and <linenumber> will be <number> + how many lines it is from the **#line** line. If the error happened on the line right under **#line** it will add 0 to <number>, if on second line, it will add 1 etc.\n\nIt is possible to use more than one **#line** keywords, but it seems having just one at the top for little script is enough to pinpoint position of the error easily.\n\n> [!WARNING]\n> If the file you are loading is not prepared using UTF-8 encoding and contains some characters with codes > 127, they might convert incorrectly","syntaxes":[{"syntax":"preprocessFileLineNumbers fileName","params":[{"name":"fileName","type":"String","description":"path to the file","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"file content containing `#line 1 \"aFilename\"`"},"form":"unary","right":{"text":"fileName"}}],"examples":[{"text":"```sqf\n_string = preprocessFileLineNumbers \"A3\\ui_f\\scripts\\IGUI\\RscUnitInfo.sqf\"\n```\n\nResult is:\n\n```\n#line 1 \"A3\\ui_f\\scripts\\IGUI\\RscUnitInfo.sqf\"\n\ndisableserialization;\n\n........\n```","code":["_string = preprocessFileLineNumbers \"A3\\ui_f\\scripts\\IGUI\\RscUnitInfo.sqf\""]}],"see_also":["fileExists","preprocessFile","loadFile","Function","SQF Syntax","call","spawn","execVM","PreProcessor Commands"],"notes":[{"user":"Killzone_Kid","date":"2013-12-17T13:44:00Z","text":"The main difference between preprocessFile and preprocessFileLineNumbers is that the latter adds #line keyword to the target file, which allows to log the __LINE__ error happened at and the __FILE__ error happened in."},{"user":"code34","date":"2017-11-04T10:16:00Z","text":"The #line directive get's removed from the output.\nSo to add a custom #line directive before while using preprocessFileLineNumbers, you have to use a preprocessor macro like this:\n*#define* DEBUG(sharp,name) sharp##line 0 name\nand add this at the right place in your code\nDEBUG(#,\"your filename\");\n\nThis way you can have custom filenames in error messages."}]},{"name":"primaryWeapon","title":"primaryWeapon","type":"command","url":"https://community.bistudio.com/wiki/primaryWeapon","revid":349379,"updated":"2023-11-08T15:35:14Z","groups":["Unit Inventory"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns name of unit's primary weapon. This command will also return a weapon class name if the weapon is not used by the player, for example, it is on the unit's back. Use currentWeapon to get the weapon the unit is using.","syntaxes":[{"syntax":"primaryWeapon unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"weapon class name or \"\" if no primary weapon"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_pWeap = primaryWeapon player;"]},{"code":["hint primaryWeapon player; // \"arifle_MX_ACO_pointer_F\""]}],"see_also":["primaryWeaponMagazine","primaryWeaponItems","addPrimaryWeaponItem","removePrimaryWeaponItem","removeAllPrimaryWeaponItems","secondaryWeapon","handgunWeapon","currentWeapon","weapons"]},{"name":"primaryWeaponItems","title":"primaryWeaponItems","type":"command","url":"https://community.bistudio.com/wiki/primaryWeaponItems","revid":378479,"updated":"2026-04-24T11:51:13Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns array with all items assigned to the primaryWeapon except magazines. Use primaryWeaponMagazine command for the latter. This command is used for infantry weapons only.","syntaxes":[{"syntax":"primaryWeaponItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [muzzle, rail, optic, bipod]\n- muzzle: String - class name of the muzzle attachment (silencer, flash hider) - rail: String - class name of the rail attachement (laserpointer/flashlight) - optic: String - bipod: String","text":"Array with [muzzle, rail, optic, bipod]\n\n- muzzle: String - class name of the muzzle attachment (silencer, flash hider)\n- rail: String - class name of the rail attachement (laserpointer/flashlight)\n- optic: String\n- bipod: String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"```sqf\nprimaryWeaponItems player;\n/*\n[\n    \"muzzle_snds_H\",    // silencer\n    \"acc_pointer_IR\",    // laser\n    \"optic_Aco\",        // optics\n    \"bipod_01_F_blk\"    // bipod\n]\n*/\n```","code":["primaryWeaponItems player;\n/*\n[\n\t\"muzzle_snds_H\",\t// silencer\n\t\"acc_pointer_IR\",\t// laser\n\t\"optic_Aco\",\t\t// optics\n\t\"bipod_01_F_blk\"\t// bipod\n]\n*/"]}],"see_also":["addPrimaryWeaponItem","removePrimaryWeaponItem","removeAllPrimaryWeaponItems","weaponAccessories","weaponAccessoriesCargo","handgunItems","binocularItems","secondaryWeaponItems","weaponsItems","weaponsItemsCargo"]},{"name":"primaryWeaponMagazine","title":"primaryWeaponMagazine","type":"command","url":"https://community.bistudio.com/wiki/primaryWeaponMagazine","revid":377142,"updated":"2026-01-01T10:31:18Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.70"},"since":"arma3 0.70","arma3_since":"0.70","description":"Collects all loaded magazines from all primaryWeapon muzzles and returns them in Array, otherwise it returns []. This command is used for infantry weapons only.","syntaxes":[{"syntax":"primaryWeaponMagazine unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hint str primaryWeaponMagazine player; //[\"30Rnd_65x39_caseless_mag\"]"]},{"text":"```sqf\n_array = primaryWeaponMagazine player;\nif (count _array > 0) then {\n    hint (\"Primary weapon is loaded with \" + (_array select 0) + \"!\");\n} else {\n    if (primaryWeapon player != \"\") then {\n        hint \"Primary weapon is not loaded!\";\n    } else {\n        hint \"Player doesn't have a primary weapon!\";\n    };\n};\n```","code":["_array = primaryWeaponMagazine player;\nif (count _array > 0) then {\n\thint (\"Primary weapon is loaded with \" + (_array select 0) + \"!\");\n} else {\n\tif (primaryWeapon player != \"\") then {\n\t\thint \"Primary weapon is not loaded!\";\n\t} else {\n\t\thint \"Player doesn't have a primary weapon!\";\n\t};\n};"]}],"see_also":["primaryWeapon","primaryWeaponItems","addPrimaryWeaponItem","removePrimaryWeaponItem","removeAllPrimaryWeaponItems","handgunMagazine","secondaryWeaponMagazine","binocularMagazine"],"notes":[{"user":"Pierre MGI","date":"2014-06-08T21:52:00Z","text":"This function returns an array like [\"type of magazine loaded in primary weapon\", \"type of grenade loaded in launcher if exist\"]\nFor example [\"30Rnd_556x45_Stanag\", \"1Rnd_HE_Grenade_shell\"], with no consideration about amount of these ammo.\nHowever, be careful if you intend to use it in expression like : (magazines _unit) - (primaryWeaponMagazine _unit), i.e. magazines \"minus\" this array,\nThe result will inventory all magazines (with grenades, chemlights...) except ALL magazines (and grenades eventually) belonging to the TYPE of the loaded one! i.e. you suppress ALL \"30Rnd_556x45_Stanag\" but the \"30Rnd_556x45_Stanag_Tracer_Green\" are still remaining.\nIf you kill the unit, the same expression will return a consistent inventory as primary weapon \"disappears\" and primaryWeaponMagazine is empty. \"30Rnd_556x45_Stanag\" are back!"}]},{"name":"priority","title":"priority","type":"command","url":"https://community.bistudio.com/wiki/priority","revid":323078,"updated":"2022-06-28T21:43:13Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return the priority of the task.","syntaxes":[{"syntax":"priority task","params":[{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["_prioTsk01 = priority task01;"]}],"see_also":["createSimpleTask","simpleTasks"]},{"name":"private","title":"private","type":"command","url":"https://community.bistudio.com/wiki/private","revid":377850,"updated":"2026-01-03T11:40:32Z","groups":["Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Sets a variable to the innermost scope. See also param and params.\n\n> [!WARNING]\n> - private variables **must** start with an underscore: `private _myVar1 = \"myVar\";` - see Identifier.\n> - **Always** make your local variables **private** (through private or params) in order to avoid overwriting a local variable of the same name.","syntaxes":[{"syntax":"private variableName","params":[{"name":"variableName","type":"String","description":"e.g `\"_myVar\"`","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"variableName"}},{"syntax":"private variableNameList","params":[{"name":"variableNameList","type":"Array of Strings","description":"e.g `[\"_target\", \"_damage\"]`","type_expr":"Array<String>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"variableNameList"}},{"syntax":"private _identifier = value","note":"**From Arma 2 v1.00 to Arma 3 v1.52:** see **local**","since":"arma3 1.54","params":[{"name":"_identifier","type":"underscored variable name, for example `_myVar`","types":["Identifier"]},{"name":"value","type":"Anything: value to assign to the variable","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"_identifier = value"}}],"examples":[{"code":["private _varname = \"this is my new variable\"; // since Arma 3 v1.54\n\n// identical, but less performant\nprivate \"_varname\";\n_varname = \"this is my new variable\";"]},{"code":["private [\"_varname1\", \"_varname2\"];\n_varname1 = \"variable 1\";\n_varname2 = \"variable 2\";"]},{"code":["_lol = 123; call { hint str [_lol] }; // [123]\n_lol = 123; call { private \"_lol\"; hint str [_lol] }; // [any]"]},{"text":"```sqf\n_myvar = 123;\nsystemChat str [_myvar];        // [123]\ncall {\n    systemChat str [_myvar];    // [123]\n    private \"_myvar\";\n    systemChat str [_myvar];    // [any]\n    _myvar = 345;\n    systemChat str [_myvar];    // [345]\n};\nsystemChat str [_myvar];        // [123]\n```","code":["_myvar = 123;\nsystemChat str [_myvar];\t\t// [123]\ncall {\n\tsystemChat str [_myvar];\t// [123]\n\tprivate \"_myvar\";\n\tsystemChat str [_myvar];\t// [any]\n\t_myvar = 345;\n\tsystemChat str [_myvar];\t// [345]\n};\nsystemChat str [_myvar];\t\t// [123]"]}],"see_also":["param","params","privateAll"],"notes":[{"user":"Faguss","date":"2010-08-04T13:30:00Z","text":"The higher scope is also the script from which the function has been called.\nin **script2.sqf**:\n\n```sqf\n_a = 2;\n```\n\nin **script1.sqf**:\n\n```sqf\n_a = 1;\ncall compile preprocessFileLineNumbers \"script2.sqf\";\nhint format [\"%1\", _a];\n```\n\nGame will display 2.\nInserting `private \"_a\"` in the function prevents the change and so number 1 will be displayed on the screen."},{"user":"DreadedEntity","date":"2015-02-25T17:06:00Z","text":"Recursive loops require the use of private. Without it, your variables will be overwritten."},{"user":"654wak654","date":"2018-01-31T10:37:00Z","text":"This command is *similar* to javascript's [let](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) keyword.\n**EDIT:** in the way that it scopes the variable to the innermost scope. Otherwise, let and private can behave differently - Lou Montana (talk)"}]},{"name":"privateAll","title":"privateAll","type":"command","url":"https://community.bistudio.com/wiki/privateAll","revid":369773,"updated":"2024-10-08T15:08:58Z","groups":["Variables"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Disables the implicit inheritance of local variables, as defined in the parent scope.\nBy default, any local variables defined in a parent scope are available to the lower scope code.\nAfter using privateAll, parent scope variables can no longer be accessed implicitly. However, it is still possible to explicitly access parent scope variables using the import command.","syntaxes":[{"syntax":"privateAll","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"text":"```sqf\n_a = 1;\n_b = 2;\n_c = 3;\n4 call {\n    // _a, _b and _c from the parent scope are accessible at this point\n    systemChat str [_a, _b, _c];             // prints [1, 2, 3]\n    privateAll;                             // _a, _b and _c from the parent scope can no longer be accessed\n    systemChat str [_a, _b, _c];             // prints [Any, Any, Any]\n    import [\"_a\", \"_b\"];                     // _a and _b are now defined as private variables in the current scope; _c is still not defined\n    systemChat str [_a, _b, _c, _this];     // prints [1, 2, Any, 4]\n    _a = _a + 1;                             // changes the private _a variable in the current scope, but doesn't change the parent scope _a\n};\nsystemChat str _a; // _a is still 1\n```","code":["_a = 1;\n_b = 2;\n_c = 3;\n4 call {\n\t// _a, _b and _c from the parent scope are accessible at this point\n\tsystemChat str [_a, _b, _c]; \t\t\t// prints [1, 2, 3]\n\tprivateAll; \t\t\t\t\t\t\t// _a, _b and _c from the parent scope can no longer be accessed\n\tsystemChat str [_a, _b, _c]; \t\t\t// prints [Any, Any, Any]\n\timport [\"_a\", \"_b\"]; \t\t\t\t\t// _a and _b are now defined as private variables in the current scope; _c is still not defined\n\tsystemChat str [_a, _b, _c, _this]; \t// prints [1, 2, Any, 4]\n\t_a = _a + 1; \t\t\t\t\t\t\t// changes the private _a variable in the current scope, but doesn't change the parent scope _a\n};\nsystemChat str _a; // _a is still 1"]},{"text":"```sqf\nprivate _a = /* ... */;\nprivate _b = /* ... */;\nprivate _c = /* ... */;\n\n{\n    _x call {\n        privateAll;\n        import [\"_a\", \"_b\"];\n        call _this;\n    };\n} forEach CustomEventHandlers;\n```\n\n1. Because of the import-statement, code from `CustomEventHandlers` can use `_a` and `_b` without using params (even if `_a` and `_b` were provided via `_this`, which is not the case here).\n1. Code from `CustomEventHandlers` can only see `_a` and `_b`, but no other variables such as `_c`, `_x` or `_forEachIndex`.\n1. Code from `CustomEventHandlers` can modify `_a` and `_b` (e.g. `_a = _b / 2`), but only within its own scope (i.e. `CustomEventHandlers # (n + 1)` will not see any changes that `CustomEventHandlers # n` may have made to `_a` and `_b`).\n1. The values of `_a`, `_b` and `_c` after the forEach-loop are guaranteed to be the same as before the forEach-loop.\n\n> [!IMPORTANT]\n> There is one important exception to points 3 and 4: Modifications by reference (e.g. `_a pushBack 123` where `_a` is an Array) are applied in all scopes. This can be avoided by copying `_a` before calling the `CustomEventHandlers` code:\n>\n> ```sqf\n> private _a = [/* ... */]; // Note that _a is an array.\n> private _b = /* ... */;\n> private _c = /* ... */;\n>\n> {\n>     _x call {\n>         privateAll;\n>         import [\"_a\", \"_b\"];\n>         _a = +_a; // Copy the array so that the code from CustomEventHandlers can no longer modify the original array.\n>         call _this;\n>     };\n> } forEach CustomEventHandlers;\n> ```","code":["private _a = /* ... */;\nprivate _b = /* ... */;\nprivate _c = /* ... */;\n\n{\n\t_x call {\n\t\tprivateAll;\n\t\timport [\"_a\", \"_b\"];\n\t\tcall _this;\n\t};\n} forEach CustomEventHandlers;","private _a = [/* ... */]; // Note that _a is an array.\nprivate _b = /* ... */;\nprivate _c = /* ... */;\n\n{\n\t_x call {\n\t\tprivateAll;\n\t\timport [\"_a\", \"_b\"];\n\t\t_a = +_a; // Copy the array so that the code from CustomEventHandlers can no longer modify the original array.\n\t\tcall _this;\n\t};\n} forEach CustomEventHandlers;"]}],"see_also":["import","private","Variables"]},{"name":"processDiaryLink","title":"processDiaryLink","type":"command","url":"https://community.bistudio.com/wiki/processDiaryLink","revid":321937,"updated":"2022-05-22T12:54:35Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Opens the Diary screen on the subject/record specified by link. To get a valid link format, use createDiaryLink.","syntaxes":[{"syntax":"processDiaryLink link","params":[{"name":"link","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"link"}}],"examples":[{"code":["processDiaryLink createDiaryLink [\"Tasks\", (simpleTasks player) select 0, \"\"]; // Select a task in the Task menu"]},{"code":["// To select various tabs in the map screen:\nprocessDiaryLink createDiaryLink [\"selected_tab\", player, \"\"];\n// ... where \"selected_tab\" can be \"Tasks\", \"Diary\", \"Units\", \"Players\", \"Statistics\", other user created subjects"]}],"see_also":["createDiaryLink","createDiaryRecord","createDiarySubject","diarySubjectExists"],"notes":[{"user":"Killzone_Kid","date":"2017-06-30T21:49:00Z","text":"You can also force open diary with selected link by passing string in link format directly:\n\n```sqf\nprocessDiaryLink \"<log subject='Diary'></log>\";\n```\n\nThe above will open tab Briefing.\n\n```sqf\nprocessDiaryLink \"<log subject='Diary' record='Record2'></log>\";\n```\n\nThe above will open tab Briefing and select 3rd record from the bottom, provided the records were added consistently."}]},{"name":"productVersion","title":"productVersion","type":"command","url":"https://community.bistudio.com/wiki/productVersion","revid":377698,"updated":"2026-01-02T09:03:25Z","groups":["System"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Returns the product's friendly name, identifier, version and build number.\n\n> [!NOTE]\n> **Arma 3:** The command has been upgraded to also returns branch identifier, whether or not the game was launched using mods, the platform and the architecture.","syntaxes":[{"syntax":"productVersion","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [name, nameShort, version, buildNumber, buildType, isModded, platform, architecture, steamBranchName]\n- name: String - product name - nameShort: String - product short name - version: Number - product version number - buildNumber: Number - product build number - Arma 3 v1.00 buildType: String - build type, can be `\"Stable\"`, `\"Development\"`, `\"Diag\"` or `\"Profile\"` - Arma 3 v1.00 isModded: Boolean - is the product running with mods (true) or vanilla (false) - Arma 3 v1.00 platform: String - can be `\"Windows\"`, `\"Linux\"` or `\"OSX\"` - Arma 3 v1.68 architecture: String - `\"x64\"` for 64bit or `\"x86\"` for 32bit - Arma 3 v2.20 steamBranchName: String - `\"\"` (for default/public branch), `\"profiling\"` or `\"development\"`","text":"Array with [name, nameShort, version, buildNumber, buildType, isModded, platform, architecture, steamBranchName]\n\n- name: String - product name\n- nameShort: String - product short name\n- version: Number - product version number\n- buildNumber: Number - product build number\n- Arma 3 v1.00 buildType: String - build type, can be `\"Stable\"`, `\"Development\"`, `\"Diag\"` or `\"Profile\"`\n- Arma 3 v1.00 isModded: Boolean - is the product running with mods (true) or vanilla (false)\n- Arma 3 v1.00 platform: String - can be `\"Windows\"`, `\"Linux\"` or `\"OSX\"`\n- Arma 3 v1.68 architecture: String - `\"x64\"` for 64bit or `\"x86\"` for 32bit\n- Arma 3 v2.20 steamBranchName: String - `\"\"` (for default/public branch), `\"profiling\"` or `\"development\"`"},"form":"nullary"}],"examples":[{"code":["hint str productVersion; // would return [\"Arma 2 OA\", \"arma2oa\", 162, 95208] on Arma 2 OA 1.62.95208"]},{"code":["hint str productVersion; // [\"Arma 3\", \"Arma3\", 137, 128764, \"Development\", false, \"Windows\"]"]},{"code":["format [\"%1.%2\", (productVersion select 2) * 0.01 toFixed 2, productVersion select 3]; // returns version e.g.: \"2.00.146773\""]},{"code":["productVersion params [\"_name\", \"_nameShort\", \"_version\", \"_buildNumber\", \"_buildType\", \"_isModded\", \"_platform\", \"_architecture\", \"_steamBranchName\"];"]}],"see_also":["supportInfo","requiredVersion"]},{"name":"profileName","title":"profileName","type":"command","url":"https://community.bistudio.com/wiki/profileName","revid":310755,"updated":"2022-05-07T20:21:33Z","groups":["System"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns currently chosen user profile name. For Steam profile name see profileNameSteam.","syntaxes":[{"syntax":"profileName","params":[],"returns":{"type":"String","type_expr":"String"},"form":"nullary"}],"examples":[{"code":["_myInGameProfileName = profileName;"]}],"see_also":["profileNameSteam","name"]},{"name":"profileNamespace","title":"profileNamespace","type":"command","url":"https://community.bistudio.com/wiki/profileNamespace","revid":369330,"updated":"2024-09-03T18:43:00Z","groups":["Namespaces","Variables"],"status":"ok","games":{"tkoh":"1.00","arma2oa":"1.62","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","description":"Returns the global namespace attached to the active user profile. Use setVariable and getVariable to save and load data to and from this Namespace. A variable can be deleted by setting its value to nil. By default the variables set in this namespace will exist while the game is running, and variables are saved persistently when the game is closed. Saving can also be forced by using saveProfileNamespace to prevent data loss on e.g game crash.\nThe variables are stored next to the user profile in a file named `myUsername.vars.GAMENAME`.","syntaxes":[{"syntax":"profileNamespace","params":[],"returns":{"type":"Namespace","type_expr":"Namespace"},"form":"nullary"}],"examples":[{"code":["profileNamespace setVariable [\"TAG_kills\", 10000];\n// somewhere else in the code\n_kills = profileNamespace getVariable [\"TAG_kills\", 0];"]}],"see_also":["saveProfileNamespace","missionNamespace","uiNamespace","parsingNamespace","currentNamespace","localNamespace","allVariables","with","ArmA: Editing"],"notes":[{"user":"Joris","date":"2011-11-25T17:33:00Z","text":"The variables are loaded when the user profile is loaded or changed."}]},{"name":"profileNameSteam","title":"profileNameSteam","type":"command","url":"https://community.bistudio.com/wiki/profileNameSteam","revid":310745,"updated":"2022-05-07T20:21:28Z","groups":["System"],"status":"ok","games":{"arma3":"1.46"},"since":"arma3 1.46","arma3_since":"1.46","description":"Returns name of the current Steam profile. For currently chosen user profile name see profileName","syntaxes":[{"syntax":"profileNameSteam","params":[],"returns":{"type":"String","type_expr":"String"},"form":"nullary"}],"examples":[{"code":["_mySteamProfileName = profileNameSteam;"]}],"see_also":["profileName","getPlayerUID","name"]},{"name":"progressLoadingScreen","title":"progressLoadingScreen","type":"command","url":"https://community.bistudio.com/wiki/progressLoadingScreen","revid":376972,"updated":"2026-01-01T06:03:03Z","groups":["System"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"If loading screen is shown, sets progress bar to the given value (interval is from 0 to 1]).\n\n> [!NOTE]\n> **Arma 3:** The loading screen can be force-ended with the ENDLOAD cheat code.","syntaxes":[{"syntax":"progressLoadingScreen progress","params":[{"name":"progress","type":"Number in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"progress"}}],"examples":[{"text":"```sqf\nstartLoadingScreen [\"Loading My Mission\"];\n//\n// batch of code\n//\nprogressLoadingScreen 0.25;\n//\n// batch of code\n//\nprogressLoadingScreen 0.50;\n//\n// batch of code\n//\nprogressLoadingScreen 0.95;\n//\n// batch of code\n//\nendLoadingScreen;\n```","code":["startLoadingScreen [\"Loading My Mission\"];\n// \n// batch of code\n// \nprogressLoadingScreen 0.25;\n// \n// batch of code\n// \nprogressLoadingScreen 0.50;\n// \n// batch of code\n// \nprogressLoadingScreen 0.95;\n// \n// batch of code\n// \nendLoadingScreen;"]}],"see_also":["startLoadingScreen","endLoadingScreen","BIS_fnc_progressLoadingScreen"]},{"name":"progressPosition","title":"progressPosition","type":"command","url":"https://community.bistudio.com/wiki/progressPosition","revid":348954,"updated":"2023-11-08T14:45:39Z","groups":["GUI Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the current position in the progress bar.","syntaxes":[{"syntax":"progressPosition control","params":[{"name":"control","type":"Control","description":"progress bar","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number","description":"progress from 0 to 1"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_progress = progressPosition _control;"]}],"see_also":["progressSetPosition","ctrlScrollValues","sliderPosition","progressLoadingScreen"]},{"name":"progressSetPosition","title":"progressSetPosition","type":"command","url":"https://community.bistudio.com/wiki/progressSetPosition","revid":369221,"updated":"2024-09-03T10:34:54Z","groups":["GUI Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets progress position of a progress bar.","syntaxes":[{"syntax":"control progressSetPosition progress","params":[{"name":"control","type":"Control","description":"progress bar control","type_expr":"Control"},{"name":"progress","type":"Number","description":"0: no progress; 1: full progress","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"progress"}}],"examples":[{"code":["_control progressSetPosition 0.5;"]},{"text":"```sqf\nwith uiNamespace do {\n    bar = findDisplay 46 ctrlCreate [\"RscProgress\", -1];\n    bar ctrlSetPosition [0,0,1,0.01];\n    bar ctrlCommit 0;\n    bar progressSetPosition 0.75;\n};\n```","code":["with uiNamespace do {\n\tbar = findDisplay 46 ctrlCreate [\"RscProgress\", -1];\n\tbar ctrlSetPosition [0,0,1,0.01];\n\tbar ctrlCommit 0;\n\tbar progressSetPosition 0.75;\n};"]}],"see_also":["progressPosition","ctrlSetScrollValues","sliderSetPosition"]},{"name":"publicVariable","title":"publicVariable","type":"command","url":"https://community.bistudio.com/wiki/publicVariable","revid":343848,"updated":"2023-07-26T14:57:01Z","groups":["Multiplayer","Variables"],"status":"ok","games":{"ofp":"1.34","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.34","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Reliably broadcasts missionNamespace variable and its **current** value to all computers (server/client).\nVariables broadcast with publicVariable during a mission will be available to JIP clients with the value they held at the time.\nSuch variables are persistent and sent to the JIP client before the first batch of client-side Event Scripts (such as init.sqf) is run.\n\n> [!IMPORTANT]\n> Using publicVariable too frequently and/or with a lot of data can cause other aspects of the game to experience bandwidth problems.\n\nThe following Data Types are supported:\n\n|  |  |  |  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|---|---|---|\n| Type | Number | Boolean | Object | Group | String | Text | Array | Code | Nothing (nil) | HashMap |\n| Since | Operation Flashpoint v1.34 |  |  |  | Armed Assault v1.00 |  | Armed Assault v1.09 |  | Arma 3 v1.26 | Arma 3 v2.02 |\n\n> [!IMPORTANT]\n> It is not possible (and illogical) to transfer a local entity reference, such as scripts, displays or local objects.\n> Also, note that Team Member is not supported.","syntaxes":[{"syntax":"publicVariable varName","params":[{"name":"varName","type":"String","description":"the global variable's Identifier","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"varName"}}],"examples":[{"text":"```sqf\nTAG_MyPublicVariable = 0;\nTAG_MyPublicVariable = 1;\npublicVariable \"TAG_MyPublicVariable\";    // other clients will receive the \"TAG_MyPublicVariable\" variable with a 1 value\n\nTAG_MyPublicVariable = 2;                // needs to be broadcast again - synchronisation is not automatic\n```","code":["TAG_MyPublicVariable = 0;\nTAG_MyPublicVariable = 1;\npublicVariable \"TAG_MyPublicVariable\";\t// other clients will receive the \"TAG_MyPublicVariable\" variable with a 1 value\n\nTAG_MyPublicVariable = 2;\t\t\t\t// needs to be broadcast again - synchronisation is not automatic"]},{"text":"JIP example:\n\n```sqf\nif (isNil \"TAG_CurrentTarget\") then    // has the variable already been set and broadcast?\n{\n    TAG_CurrentTarget = objNull;    // if not, set it on the local machine\n};\n\nplayer doTarget TAG_CurrentTarget;\n```","code":["if (isNil \"TAG_CurrentTarget\") then\t// has the variable already been set and broadcast?\n{\n\tTAG_CurrentTarget = objNull;\t// if not, set it on the local machine\n};\n\nplayer doTarget TAG_CurrentTarget;"]},{"text":"```sqf\nTAG_BossName = \"EvilBigBoss\";\n\npublicVariable TAG_BossName;    // wrong - will try to publicVariable \"EvilBigBoss\" variable, that does not exist\npublicVariable \"TAG_BossName\";    // correct - important, do not forget the QUOTES\n```","code":["TAG_BossName = \"EvilBigBoss\";\n\npublicVariable TAG_BossName;\t// wrong - will try to publicVariable \"EvilBigBoss\" variable, that does not exist\npublicVariable \"TAG_BossName\";\t// correct - important, do not forget the QUOTES"]}],"see_also":["Multiplayer Scripting","Initialisation Order","addPublicVariableEventHandler","publicVariableClient","publicVariableServer","Variables","Event Scripts"]},{"name":"publicVariableClient","title":"publicVariableClient","type":"command","url":"https://community.bistudio.com/wiki/publicVariableClient","revid":379458,"updated":"2026-10-31T00:09:12Z","groups":["Multiplayer","Variables"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Send the variable value to the client computer - same limitations regarding variable type as publicVariable.\n\nThe Client ID is the temporary ID given to a connected client for that session. You can find out this ID with the owner command (using it on a player's character, for example, will give you that players client ID).\n\n> [!NOTE]\n> **Arma 3:** In Arma 3 it is possible to broadcast nil value","syntaxes":[{"syntax":"clientID publicVariableClient varName","params":[{"name":"clientID","type":"Number","type_expr":"Number"},{"name":"varName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"clientID"},"right":{"text":"varName"}}],"examples":[{"code":["3 publicVariableClient \"CTFscoreOne\";"]}],"see_also":["clientOwner","owner","publicVariable","publicVariableServer","addPublicVariableEventHandler","remoteExecutedOwner"],"notes":[{"user":"Kylania","date":"2012-08-24T00:00:00Z","text":"publicVariableServer (run on client)\npublicVariableClient (run on server)\n\nPublishes a variable (name as STRING) to a specific client, from the server. This is useful where you want to synchronize a variable with only a specific client.\n\nThis is a useful way to cut down on network traffic, as publicVariable commands are issued as a priority message. So use publicVariable sparingly, and these commands where they apply. - [Rocket](http://forums.bistudio.com/showthread.php?136494-ARMA-2-OA-beta-build-94209-(1-60-MP-compatible-build-post-1-60-release)&p=2179795&viewfull=1#post2179795)"},{"user":"Killzone_Kid","date":"2013-09-21T00:00:00Z","text":"While publicVariable is JIP compatible and persistent, publicVariableClient is not. If you log out then log in with the same owner id the public variable sent to your client prior will be nil.\n\n```sqf\n//server\npv = 123;\n3 publicVariableClient \"pv\";\n//connected client with id 3\nhint str pv; //123\n//\n//client log out/log in\n//\n//client id is still 3\nhint str pv; //error, undefined variable pv\n```"},{"user":"Killzone_Kid","date":"2015-04-12T09:27:00Z","text":"Tested in Arma 3 v1.43, publicVariableClient works client-to-client if owner id of the targeted client is known."}]},{"name":"publicVariableServer","title":"publicVariableServer","type":"command","url":"https://community.bistudio.com/wiki/publicVariableServer","revid":363982,"updated":"2024-04-29T23:08:24Z","groups":["Multiplayer","Variables"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Send the variable value to the server - same limitations regarding variable type as publicVariable.\n\n> [!NOTE]\n> **Arma 3:** In Arma 3 it is possible to broadcast the nil value.","syntaxes":[{"syntax":"publicVariableServer varName","params":[{"name":"varName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"varName"}}],"examples":[{"code":["publicVariableServer \"CTFscoreOne\";"]}],"see_also":["publicVariable","publicVariableClient","addPublicVariableEventHandler"],"notes":[{"user":"Kylania","date":"2012-08-24T02:06:00Z","text":"- publicVariableServer (run on client)\n- publicVariableClient (run on server)\n\nPublishes the variable (name as String) to the server only.\nUseful when you want to synchronise a variable with the server but not any other clients. - [Rocket](http://forums.bistudio.com/showthread.php?136494-ARMA-2-OA-beta-build-94209-(1-60-MP-compatible-build-post-1-60-release)&p=2179795&viewfull=1#post2179795)"}]},{"name":"pushBack","title":"pushBack","type":"command","url":"https://community.bistudio.com/wiki/pushBack","revid":377141,"updated":"2026-01-01T10:30:59Z","groups":["Arrays"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","description":"Insert an element to the back of the given array. This command modifies the original array. (see also: pushBackUnique)","syntaxes":[{"syntax":"array pushBack element","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"element","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Number","type_expr":"Number","description":"index of inserted element"},"form":"binary","left":{"text":"array"},"right":{"text":"element"}}],"examples":[{"code":["_arr = [1,2,3];\n_arr pushBack 4;\nhint str _arr; //[1,2,3,4]"]},{"code":["_arr = [1,[2,4],3];\n(_arr select 1) pushBack [5,6];\nhint str _arr //[1,[2,4,[5,6]],3]"]}],"see_also":["pushBackUnique","select","set","resize","reverse","count","find","in","forEach","deleteAt","deleteRange","append","sort","arrayIntersect","apply","BIS_fnc_arrayPushStack","BIS_fnc_arrayPush"],"notes":[{"user":"ffur2007slx2_5","date":"2014-08-01T21:15:00Z","text":"(A3 1.26) It is recommended to use pushBack instead of BIS_fnc_arrayPush.\n\n```sqf\n_array = [1,2,3];\n_array pushBack 4; //same as [_array, 4] call BIS_fnc_arrayPush;\n```"},{"user":"Skaronator","date":"2014-08-23T21:35:00Z","text":"It's highly recommended to use the new pushBack command, up to 43% faster than set and up to **11843%** faster a plus b!"},{"user":"DreadedEntity","date":"2014-11-26T18:25:00Z","text":"pushBack does not support nil while set and a plus b do. For example:\n\n```sqf\n_array = [];\nfor \"_i\" from 0 to 3 do\n{\n    _array pushBack nil;\n};\nhint str _array; //hint is []\n```"},{"user":"Killzone_Kid","date":"2015-05-21T10:52:00Z","text":"Array \"push\" implementation using pushBack, alternative to BIS_fnc_arrayPush\n\n```sqf\nKK_fnc_push = {\n    _this select 0 pushBack (_this select 1);\n    _this select 0\n};\n\n// Example\narr = [1,2,3];\n[arr, 4] call KK_fnc_push; //both arr and return of function are now [1,2,3,4]\n```"},{"user":"OOKexOo","date":"2016-10-05T02:19:00Z","text":"Note that pushBack does not create a new object.\nTherefore, if you edit an object that was pushed back to an array, it also affects the object in the array.\ne.g.\n\n```sqf\n_first_squence = [1,2,3];\n_second_squence = [5,4];\n\n_first_squence pushBack _second_squence;\nsystemChat str _first_squence // prints [1,2,3,[5,4]]]\n\nreverse _second_squence;\nsystemChat str _first_squence // prints [1,2,3,[4,5]]]\n```\n\nIf you pushBack an array for instance, you can just copy it to generate a new object.\ne.g.\n\n```sqf\n_first_squence pushBack +_second_squence;\n```"}]},{"name":"pushBackUnique","title":"pushBackUnique","type":"command","url":"https://community.bistudio.com/wiki/pushBackUnique","revid":377140,"updated":"2026-01-01T10:30:41Z","groups":["Arrays"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Adds element to the back of the given array but only if it is unique to the array. The index of the added element is returned upon success, otherwise -1. This command modifies the original array.\n\n> [!NOTE]\n> Adding string elements is **case sensitive**.","syntaxes":[{"syntax":"array pushBackUnique element","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"element","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Number","type_expr":"Number","description":"index of inserted element or -1"},"form":"binary","left":{"text":"array"},"right":{"text":"element"}}],"examples":[{"code":["_arr = [1,2,3];\n_index = _arr pushBackUnique 3;\nhint str [_index, _arr]; // [-1,[1,2,3]]"]},{"code":["_arr = [1,2,3];\n_index = _arr pushBackUnique 4;\nhint str [_index, _arr]; // [3,[1,2,3,4]]"]}],"see_also":["pushBack","select","set","resize","reverse","count","find","in","forEach","deleteAt","deleteRange","append","sort","arrayIntersect","apply","BIS_fnc_arrayPushStack","BIS_fnc_arrayPush"]},{"name":"putWeaponPool","title":"putWeaponPool","type":"command","url":"https://community.bistudio.com/wiki/putWeaponPool","revid":310280,"updated":"2022-05-05T13:11:24Z","groups":["Weapon Pool"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Transfers weapons and magazines from weapon pool into cargo of given object. Used in campaign to transfer weapons into next mission.","syntaxes":[{"syntax":"putWeaponPool object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["putWeaponPool player;"]}],"see_also":["pickWeaponPool"]},{"name":"pylonAction","title":"pylonAction","type":"command","url":"https://community.bistudio.com/wiki/pylonAction","revid":378897,"updated":"2026-08-11T14:56:32Z","groups":["Vehicle Loadouts"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"local","effect":"local"},"description":"Executes an action on a specific pylon. MP effect and locality depend on the specific action.\n\nComponents and their actions:\nCameraComponent\n\n- SetLightState (arg bool, ret none)\n- GetLightState (arg none, ret bool)\n\nTransportPylonsComponent (pylon index -1, no component name, no component index)\n\n- GetLastFiredPylonIndex (no arg, ret scalar), returns the pylon index (note this is script index, which is 1-based) that last fired the gun, or -1 if the last firing was not from a pylon (can be used in Fired eventhandler)\n\nAll pylons (Not on a component)\n\n- animateSource - Arg local, effect global. See animateSource pylonAction [vehicle player, 1, \"animateSource\", [\"extendBoxSource\", 1]];","syntaxes":[{"syntax":"pylonAction [vehicle, pylon, actionPath(, arguments)]","params":[{"name":"vehicle","type":"Object","description":"The object carrying the pylon","type_expr":"Object"},{"name":"pylon","type":"Number or String","description":"pylon index (index starts from 1) or pylon name (see Example 1). Or -1 to access the TransportPylonsComponent of the vehicle","type_expr":"Number | String"},{"name":"actionPath","type":"String","description":"The path to reach the specific component to send the action to.\nactionPath is a \".\" delimited address of the component and action (like animation sources). Or (without a \".\" a command to the pylon directly)\narguments and return type depends on the final action\nActionPath examples\n\"CameraComponent.0.SetLightState\" with argument bool, returns nothing.\n\"CameraComponent.0.GetLightState\" with no argument, returns bool.\n\"CameraComponent.*.SetLightState\" wildcard executes the action all components of that type (if there are multiple). Note the return value will be the value of the last executed action","type_expr":"String"}],"returns":{"type":"Anything","type_expr":"Anything","description":"Depends on action"},"form":"unary","right":{"text":"[vehicle, pylon, actionPath(, arguments)]"}}],"see_also":["Arma 3: Vehicle Loadouts"]},{"name":"queryItemsPool","title":"queryItemsPool","type":"command","url":"https://community.bistudio.com/wiki/queryItemsPool","revid":319415,"updated":"2022-05-13T09:24:03Z","groups":["Weapon Pool"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","description":"Returns the number of items of type in the weapon pool (used in campaigns to transfer weapons to the next mission).","syntaxes":[{"syntax":"queryItemsPool name","params":[{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"name"}}],"examples":[{"code":["private _amountOfFAKgiven = queryItemsPool \"FirstAidKit\";"]}],"see_also":["queryWeaponPool"]},{"name":"queryMagazinePool","title":"queryMagazinePool","type":"command","url":"https://community.bistudio.com/wiki/queryMagazinePool","revid":319440,"updated":"2022-05-13T09:24:05Z","groups":["Weapon Pool"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Return number of magazines of type name in magazine pool (used in campaign to transfer magazines into next mission).","syntaxes":[{"syntax":"queryMagazinePool name","params":[{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"name"}}],"examples":[{"code":["_num = queryMagazinePool \"M16\";"]}],"see_also":["addMagazineGlobal","addMagazine","addMagazines","addMagazineCargo","addMagazineCargoGlobal","addMagazineTurret","addWeaponPool","clearMagazinePool","addMagazineAmmoCargo"]},{"name":"queryWeaponPool","title":"queryWeaponPool","type":"command","url":"https://community.bistudio.com/wiki/queryWeaponPool","revid":323019,"updated":"2022-06-28T21:43:07Z","groups":["Weapon Pool"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Return number of weapons of type name in weapon pool (used in campaign to transfer weapons into next mission).","syntaxes":[{"syntax":"queryWeaponPool name","params":[{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"name"}}],"examples":[{"code":["_num = queryWeaponPool \"M16\";"]}],"see_also":["queryItemsPool"]},{"name":"rad","title":"rad","type":"command","url":"https://community.bistudio.com/wiki/rad","revid":319456,"updated":"2022-05-13T09:24:06Z","groups":["Math - Geometry"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Converts given value in degrees to radians. 1 radian equals 180 degrees divided by pi.","syntaxes":[{"syntax":"rad value","params":[{"name":"value","type":"Number","description":"degrees","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"radians"},"form":"unary","right":{"text":"value"}}],"examples":[{"code":["_radians = rad 180; // returns 3.1415 (pi)"]}],"see_also":["pi","deg"]},{"name":"radioChannelAdd","title":"radioChannelAdd","type":"command","url":"https://community.bistudio.com/wiki/radioChannelAdd","revid":370595,"updated":"2025-01-14T13:03:39Z","groups":["Radio and Chat","Custom Radio and Chat"],"status":"ok","games":{"tkoh":"1.00","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Add the units to the custom channel.","syntaxes":[{"syntax":"customChannelID radioChannelAdd units","params":[{"name":"customChannelID","type":"Number","description":"custom channel ID returned by radioChannelCreate command","type_expr":"Number"},{"name":"units","type":"Array of Objects","description":"list of units","type_expr":"Array<Object>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"customChannelID"},"right":{"text":"units"}}],"examples":[{"code":["2 radioChannelAdd [player, unit1];"]}],"see_also":["radioChannelCreate","radioChannelRemove","radioChannelSetCallSign","radioChannelSetLabel"],"notes":[{"user":"Hypoxic125","date":"2022-11-01T06:36:41Z","text":"Units are removed from the chat channel on RESPAWN. Be sure to add units back to their custom chat channels upon respawn via onPlayerRespawn.sqf or Respawn Event Handler."}]},{"name":"radioChannelCreate","title":"radioChannelCreate","type":"command","url":"https://community.bistudio.com/wiki/radioChannelCreate","revid":378309,"updated":"2026-04-01T22:48:12Z","groups":["Radio and Chat","Custom Radio and Chat"],"status":"ok","games":{"tkoh":"1.00","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global","server_exec":true},"description":"Create a custom radio channel with the given color, label, call sign and registered characters.\nThe **custom channel ID** returned can be used to manipulate the created channel later.\nThere are **50** slots (10 slots before Arma 3 v2.22) for custom radio channels which would correspond to channels 6..15 and 26..65 (see getPlayerChannel).\nThe command will find an unused index in this range and create it when found.","syntaxes":[{"syntax":"radioChannelCreate [color, label, callSign, units, sentenceType]","params":[{"name":"color","type":"Array","description":"RGBA color values","type_expr":"Array"},{"name":"label","type":"String","description":"label","type_expr":"String"},{"name":"callSign","type":"String or Arma 3 v2.22 Array of Strings","description":"see radioChannelSetCallSign","type_expr":"String | Array<String>"},{"name":"units","type":"Array of Objects","description":"units in the channel","type_expr":"Array<Object>"},{"name":"sentenceType","type":"Boolean","optional":true,"default":"true","description":"true - use *Protocol* message color from `getArray (configFile >> \"RscChatListDefault\" >> \"colorMessageProtocol\")`\n- false - use *Normal* message color from `getArray (configFile >> \"RscChatListDefault\" >> \"colorMessage\")`","type_expr":"Boolean","text":"sentenceType: Boolean - (Optional, default true)\n\n- true - use *Protocol* message color from `getArray (configFile >> \"RscChatListDefault\" >> \"colorMessageProtocol\")`\n- false - use *Normal* message color from `getArray (configFile >> \"RscChatListDefault\" >> \"colorMessage\")`"}],"returns":{"type":"Number","type_expr":"Number","description":"created custom channel ID (used in customChat command), 0 if failed. (see BIS_fnc_channelNumToRadioChannelID, BIS_fnc_radioChannelIDToChannelNum)","text":"Number - created **custom channel ID** (used in customChat command), 0 if failed. (see BIS_fnc_channelNumToRadioChannelID, BIS_fnc_radioChannelIDToChannelNum)"},"form":"unary","right":{"text":"[color, label, callSign, units, sentenceType]"}}],"examples":[{"code":["_channelID = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], \"Q-dance Radio\", \"%UNIT_NAME\", [player1, player2]];"]},{"code":["_channelID = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], \"Q-dance Radio\", \"%UNIT_NAME\", [player1, player2], true];\n// using true also disables automatic quotes for chat in channel (Arma 3)"]},{"text":"Create custom channel and add all players to it, present and JIP:\n\n```sqf\nif (isServer) then\n{\n    private _channelName = \"Q-dance Radio\";\n    private _channelID = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], _channelName, \"%UNIT_NAME\", []];\n    if (_channelID == 0) exitWith {diag_log format [\"Custom channel '%1' creation failed!\", _channelName]};\n    [_channelID, {_this radioChannelAdd [player]}] remoteExec [\"call\", [0, -2] select isDedicated, _channelName];\n};\n```","code":["if (isServer) then\n{\n\tprivate _channelName = \"Q-dance Radio\";\n\tprivate _channelID = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], _channelName, \"%UNIT_NAME\", []];\n\tif (_channelID == 0) exitWith {diag_log format [\"Custom channel '%1' creation failed!\", _channelName]};\n\t[_channelID, {_this radioChannelAdd [player]}] remoteExec [\"call\", [0, -2] select isDedicated, _channelName];\n};"]}],"see_also":["radioChannelAdd","radioChannelRemove","radioChannelSetCallSign","radioChannelSetLabel","customChat","customRadio","setCurrentChannel","currentChannel","enableChannel","channelEnabled","getPlayerChannel","radioChannelInfo"],"notes":[{"user":"Killzone_Kid","date":"2016-01-21T13:30:00Z","text":"Make sure you add all units you intend to speak or receive messages on created custom channel to the channel."},{"user":"Hypoxic125","date":"2022-11-01T06:38:08Z","text":"Units are removed from the chat channel on RESPAWN. Be sure to add units back to their custom chat channels upon respawn via onPlayerRespawn.sqf or Respawn Event Handler."}]},{"name":"radioChannelInfo","title":"radioChannelInfo","type":"command","url":"https://community.bistudio.com/wiki/radioChannelInfo","revid":377628,"updated":"2026-01-02T08:52:11Z","groups":["Radio and Chat","Custom Radio and Chat"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Obtains custom radio channel's details. if 'customChannelID' is invalid, the return is either the first custom radio channel (customChannelID < firstCCChannel) or the last (customChannelID > lastCCChannel). 'inUse' true indicates if the channel was made available using radioChannelCreate, false means it can be created.","syntaxes":[{"syntax":"radioChannelInfo customChannelID","params":[{"name":"customChannelID","type":"Number","description":"custom channel ID returned by radioChannelCreate","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"with [colour, label, callSign, units, sentenceType, inUse, Arma 3 v2.22 callSignVoN] (see radioChannelCreate)","text":"Array with [colour, label, callSign, units, sentenceType, inUse, Arma 3 v2.22 callSignVoN] (see radioChannelCreate)"},"form":"unary","right":{"text":"customChannelID"}},{"syntax":"radioChannelInfo option","since":"arma3 2.22","params":[{"name":"option","type":"Boolean","description":"true to return only channels in use, false to return all available channels","type_expr":"Boolean"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"in format [ [colour, label, callSign, units, sentenceType, inUse, callSignVoN],....] (see radioChannelCreate)","text":"Array of Arrays in format [ [colour, label, callSign, units, sentenceType, inUse, callSignVoN],....] (see radioChannelCreate)"},"form":"unary","right":{"text":"option"}}],"examples":[{"code":["private _channelID = radioChannelCreate [[1, 0, 0.5, 0.8], \"Q-dance Radio\", \"%UNIT_NAME\", [u1, u2], false];\nradioChannelInfo _channelID; // returns [[1,0,0.5,0.8], \"Q-dance Radio\", \"%UNIT_NAME\", [u1, u2], false, true]"]}],"see_also":["radioChannelCreate","getPlayerChannel"]},{"name":"radioChannelRemove","title":"radioChannelRemove","type":"command","url":"https://community.bistudio.com/wiki/radioChannelRemove","revid":377811,"updated":"2026-01-03T04:09:28Z","groups":["Radio and Chat","Custom Radio and Chat"],"status":"ok","games":{"tkoh":"1.00","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","description":"Remove the units from the custom radio channel.","syntaxes":[{"syntax":"customChannelID radioChannelRemove units","params":[{"name":"customChannelID","type":"Number","description":"custom channel ID returned by radioChannelCreate command","type_expr":"Number"},{"name":"units","type":"Array of Objects","description":"units","type_expr":"Array<Object>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"customChannelID"},"right":{"text":"units"}}],"examples":[{"code":["3 radioChannelRemove [blufor_unit_1, blufor_unit_2];"]}],"see_also":["radioChannelAdd","radioChannelCreate","radioChannelSetCallSign","radioChannelSetLabel"]},{"name":"radioChannelSetCallSign","title":"radioChannelSetCallSign","type":"command","url":"https://community.bistudio.com/wiki/radioChannelSetCallSign","revid":378308,"updated":"2026-04-01T22:46:59Z","groups":["Radio and Chat","Custom Radio and Chat"],"status":"ok","games":{"tkoh":"1.00","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Set the custom radio chat channel's callsign / VoN callsign.","syntaxes":[{"syntax":"customChannelID radioChannelSetCallSign callSign","params":[{"name":"customChannelID","type":"Number","description":"custom channel ID returned by radioChannelCreate command","type_expr":"Number"},{"name":"callSign","type":"String or Arma 3 v2.22 Array","description":"custom chat callsign or [callSign, callSignVoN]. Available parameters:\n\n| Parameter | Description | Example |\n|---|---|---|\n| `%$KEY` | Reference a localised text | \"%$STR_Q_North\" → \"North\" |\n| `%CHANNEL_LABEL` | The channel's label - see radioChannelSetLabel | \"Q-dance Radio\" |\n| `%UNIT_SIDE` | Side's name, similar to sideRadio | \"BLUFOR\" |\n| `%UNIT_NAME` | The ***player***'s or AI's name - see name | \"John Doe\" |\n| `%UNIT_RANK` | A shorthand version of the unit's rank | \"Sgt\" |\n| `%UNIT_ID` | The unit's id in the group | \"1\" |\n| `%UNIT_REF` | The unit's log reference | \"Unit123456\" |\n| `%UNIT_GRP_NAME` | The group's name - see setGroupId | \"Alpha 1-1\" |\n| `%UNIT_GRP_LEADER` | Group leader mention (if the unit is its group's leader) | \", group leader\" |\n| `%UNIT_VEH_NAME` | Display name of the unit's vehicle | \"Hunter\" |\n| `%UNIT_VEH_POSITION` | Unit's vehicle position, similar to vehicleRadio | \"Gunner\" |\n| `%%` | To display a normal percentage sign | N/A |","type_expr":"String | Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"customChannelID"},"right":{"text":"callSign"}}],"examples":[{"code":["4 radioChannelSetCallSign \"(%UNIT_ID) %UNIT_RANK %UNIT_NAME%UNIT_GRP_LEADER\"; // (1) Sgt Ben Kelly, group leader"]},{"code":["4 radioChannelSetCallSign [\"%UNIT_VEH_POSITION, %UNIT_VEH_NAME\", \"%UNIT_NAME%UNIT_GRP_LEADER\"];"]}],"see_also":["radioChannelAdd","radioChannelCreate","radioChannelRemove","radioChannelSetLabel"]},{"name":"radioChannelSetLabel","title":"radioChannelSetLabel","type":"command","url":"https://community.bistudio.com/wiki/radioChannelSetLabel","revid":319392,"updated":"2022-05-13T09:24:00Z","groups":["Radio and Chat","Custom Radio and Chat"],"status":"ok","games":{"tkoh":"1.00","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","description":"Set the custom radio channel's label.","syntaxes":[{"syntax":"customChannelID radioChannelSetLabel label","params":[{"name":"customChannelID","type":"Number","description":"custom channel ID returned by radioChannelCreate command","type_expr":"Number"},{"name":"label","type":"String","description":"label","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"customChannelID"},"right":{"text":"label"}}],"examples":[{"code":["5 radioChannelSetLabel \"Q-dance Radio\";"]}],"see_also":["radioChannelAdd","radioChannelCreate","radioChannelRemove","radioChannelSetCallSign"]},{"name":"radioEnabled","title":"radioEnabled","type":"command","url":"https://community.bistudio.com/wiki/radioEnabled","revid":349010,"updated":"2023-11-08T14:47:05Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"A getter for enableRadio.","syntaxes":[{"syntax":"radioEnabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if radio is enabled"},"form":"nullary"}],"examples":[{"code":["if (radioEnabled) then { enableRadio false };"]}],"see_also":["enableRadio"]},{"name":"radioVolume","title":"radioVolume","type":"command","url":"https://community.bistudio.com/wiki/radioVolume","revid":376982,"updated":"2026-01-01T06:23:17Z","groups":["Sounds"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Returns the current radio volume (set by fadeRadio).","syntaxes":[{"syntax":"radioVolume","params":[],"returns":{"type":"Number","type_expr":"Number","description":"in range 0..2","text":"Number in range 0..2"},"form":"nullary"}],"examples":[{"code":["hint str radioVolume;"]}],"see_also":["fadeRadio","soundVolume","musicVolume","speechVolume","environmentVolume","getAudioOptionVolumes"]},{"name":"rain","title":"rain","type":"command","url":"https://community.bistudio.com/wiki/rain","revid":348549,"updated":"2023-11-08T13:10:02Z","groups":["Environment"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the current value of rain density.","syntaxes":[{"syntax":"rain","params":[],"returns":{"type":"Number","type_expr":"Number","description":"in range 0..1","text":"Number in range 0..1"},"form":"nullary"}],"examples":[{"code":["_rainLevel = rain;"]}],"multiplayer":"Pre-Arma 3, each client and the server could have different rain values. Since Arma 3 the value is synced over network.","see_also":["setRain","fog"]},{"name":"rainbow","title":"rainbow","type":"command","url":"https://community.bistudio.com/wiki/rainbow","revid":310802,"updated":"2022-05-07T20:21:58Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns the current rainbow intensity.","syntaxes":[{"syntax":"rainbow","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["private _intensity = rainbow;"]}],"see_also":["setRainbow"]},{"name":"rainParams","title":"rainParams","type":"command","url":"https://community.bistudio.com/wiki/rainParams","revid":377674,"updated":"2026-01-02T09:02:36Z","groups":["Environment"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","description":"Returns currently set RainParticles params, custom or default.","syntaxes":[{"syntax":"rainParams","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [rainDropTexture, texDropCount, minRainDensity, effectRadius, windCoef, dropSpeed, rndSpeed, rndDir, dropWidth, dropHeight, dropColor, lumSunFront, lumSunBack, refractCoef, refractSaturation, snow, dropColorStrong]\n- rainDropTexture: String - texDropCount: Number - minRainDensity: Number - effectRadius: Number - windCoef: Number - dropSpeed: Number - rndSpeed: Number - rndDir: Number - dropWidth: Number - dropHeight: Number - dropColor: Color (RGBA) - lumSunFront: Number - lumSunBack: Number - refractCoef: Number - refractSaturation: Number - snow: Boolean - dropColorStrong: Boolean > [!NOTE] > See RainParticles for more information.","text":"Array with [rainDropTexture, texDropCount, minRainDensity, effectRadius, windCoef, dropSpeed, rndSpeed, rndDir, dropWidth, dropHeight, dropColor, lumSunFront, lumSunBack, refractCoef, refractSaturation, snow, dropColorStrong]\n\n- rainDropTexture: String\n- texDropCount: Number\n- minRainDensity: Number\n- effectRadius: Number\n- windCoef: Number\n- dropSpeed: Number\n- rndSpeed: Number\n- rndDir: Number\n- dropWidth: Number\n- dropHeight: Number\n- dropColor: Color (RGBA)\n- lumSunFront: Number\n- lumSunBack: Number\n- refractCoef: Number\n- refractSaturation: Number\n- snow: Boolean\n- dropColorStrong: Boolean\n\n> [!NOTE]\n> See RainParticles for more information."},"form":"nullary"}],"examples":[{"text":"```sqf\nprivate _rainParams = rainParams;\n// or\nrainParams params [\n    \"_rainDropTexture\",\n    \"_texDropCount\",\n    \"_minRainDensity\",\n    \"_effectRadius\",\n    \"_windCoef\",\n    \"_dropSpeed\",\n    \"_rndSpeed\",\n    \"_rndDir\",\n    \"_dropWidth\",\n    \"_dropHeight\",\n    \"_dropColor\",\n    \"_lumSunFront\",\n    \"_lumSunBack\",\n    \"_refractCoef\",\n    \"_refractSaturation\",\n    \"_snow\",\n    \"_dropColorStrong\"\n];\n```","code":["private _rainParams = rainParams;\n// or\nrainParams params [\n\t\"_rainDropTexture\",\n\t\"_texDropCount\",\n\t\"_minRainDensity\",\n\t\"_effectRadius\",\n\t\"_windCoef\",\n\t\"_dropSpeed\",\n\t\"_rndSpeed\",\n\t\"_rndDir\",\n\t\"_dropWidth\",\n\t\"_dropHeight\",\n\t\"_dropColor\",\n\t\"_lumSunFront\",\n\t\"_lumSunBack\",\n\t\"_refractCoef\",\n\t\"_refractSaturation\",\n\t\"_snow\",\n\t\"_dropColorStrong\"\n];"]}],"multiplayer":"> [!IMPORTANT]\n> - Rain particle params are **local**\n> - If used on a dedicated server, this command returns an empty array.","see_also":["setRain","fogParams","overcast","humidity","wind","forceWeatherChange"]},{"name":"random","title":"random","type":"command","url":"https://community.bistudio.com/wiki/random","revid":377710,"updated":"2026-01-02T09:03:49Z","groups":["Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"|  |  |\n|---|---|\n|  |  |\n\n|  |  |\n|---|---|\n| Syntax 1 | generates a random floating point value |\n| Syntax 2 | generates a [Gaussian Distribution](https://en.wikipedia.org/wiki/Normal_distribution) (ref: Technically, it is a rescaled [Bates distribution](https://en.wikipedia.org/wiki/Bates_distribution) with n = 4.<br>The distribution is split in two at its midpoint and scaled linearly such that its maximum lies at the specified midpoint.). It uses the same method as setTriggerTimeout command and is quite useful for e.g spawning loot, making more valuable items more rare |\n| Syntax 3 | generates a [seed-based](https://en.wikipedia.org/wiki/Random_seed) random number |\n| Syntax 4 | generates a [seed-based](https://en.wikipedia.org/wiki/Random_seed) random noise (**not** Perlin) texture based on provided seed and returning the value at supplied coordinates |","syntaxes":[{"syntax":"random x","params":[{"name":"x","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"from 0 (included) to x, excluded\n> [!IMPORTANT] > x was accidentally included due to a bug introduced in Arma 2 v1.00 and fixed in Arma 3 v2.18.","text":"Number from 0 (included) to *x*, **ex**cluded\n\n> [!IMPORTANT]\n> *x* was accidentally **in**cluded due to a bug introduced in Arma 2 v1.00 and fixed in Arma 3 v2.18."},"form":"unary","right":{"text":"x"}},{"syntax":"random [min, mid, max]","since":"arma3 1.56","params":[{"name":"min","type":"Number","type_expr":"Number"},{"name":"mid","type":"Number","type_expr":"Number"},{"name":"max","type":"Number","type_expr":"Number"}],"returns":{"type":"Number in range from min to max, weighted by mid","type_expr":"Number","description":"can be higher than max (maximum value is `min + max - mid`)","text":"Number in range from *min* to *max*, weighted by *mid* - **can** be higher than max (maximum value is `min + max - mid`)"},"form":"unary","right":{"text":"[min, mid, max]"}},{"syntax":"seed random x","since":"arma3 1.68","params":[{"name":"seed","type":"Number","description":"an **integer**. Any float value will be truncated (e.g -0.9, -0.1, 0.1 or 0.9 will be read as **0**)","type_expr":"Number"},{"name":"x","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"from 0 (included) to x (included)","text":"Number from 0 (included) to *x* (**in**cluded)"},"form":"binary","left":{"text":"seed"},"right":{"text":"x"}},{"syntax":"seed random [x, y]","since":"arma3 1.68","params":[{"name":"seed","type":"Number","type_expr":"Number"},{"name":"x","type":"Number","description":"x texture position","type_expr":"Number"},{"name":"y","type":"Number","description":"y texture position","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"from 0 (included) to 1 (excluded)","text":"Number from 0 (included) to 1 (**ex**cluded)"},"form":"binary","left":{"text":"seed"},"right":{"text":"[x, y]"}}],"examples":[{"code":["_rNumber = random 1;"]},{"code":["_rNumber = random -10;"]},{"text":"Generate a random position inside a circle (see also Example Code: Random Area Distribution)\n\n```sqf\n_center getPos [_radius * sqrt random 1, random 360];\n```","code":["_center getPos [_radius * sqrt random 1, random 360];"]},{"text":"Select a random value from an array:\n\n```sqf\n_array = [\"apples\", \"pears\", \"bananas\", \"M16\"];\n\n_random = _array select floor random count _array;    // before Arma 2\n_random = _array call BIS_fnc_selectRandom;            // since Arma 2\n_random = selectRandom _array;                        // since Arma 3 v1.56\n```","code":["_array = [\"apples\", \"pears\", \"bananas\", \"M16\"];\n\n_random = _array select floor random count _array;\t// before Arma 2\n_random = _array call BIS_fnc_selectRandom;\t\t\t// since Arma 2\n_random = selectRandom _array;\t\t\t\t\t\t// since Arma 3 v1.56"]},{"text":"Visualisation of Syntax 4 (warning, it takes a bit to execute and draw):\n\n```sqf\nprivate _parent = call BIS_fnc_displayMission;\nif (is3DEN) then { _parent = findDisplay 313 };\nprivate _display = _parent createDisplay \"RscDisplayEmpty\";\nprivate _background = _disp ctrlCreate [\"RscBackground\", -1];\n\nprivate _coef = 0.1;\n\nfor \"_x\" from 1 to 100 do\n{\n    for \"_y\" from 1 to 100 do\n    {\n        private _random = 0 random [_x * _coef, _y * _coef];\n        private _dot = _display ctrlCreate [\"RscBackground\", -1];\n\n        _dot ctrlSetPosition [0.5 + pixelW * _x, 0.5 + pixelH * _y, pixelW, pixelH];\n        _dot ctrlSetBackgroundColor [_random, _random, _random, 1];\n        _dot ctrlCommit 0;\n    };\n};\n```","code":["private _parent = call BIS_fnc_displayMission;\nif (is3DEN) then { _parent = findDisplay 313 };\nprivate _display = _parent createDisplay \"RscDisplayEmpty\";\nprivate _background = _disp ctrlCreate [\"RscBackground\", -1];\n\nprivate _coef = 0.1;\n\nfor \"_x\" from 1 to 100 do\n{\n\tfor \"_y\" from 1 to 100 do\n\t{\n\t\tprivate _random = 0 random [_x * _coef, _y * _coef];\n\t\tprivate _dot = _display ctrlCreate [\"RscBackground\", -1];\n\n\t\t_dot ctrlSetPosition [0.5 + pixelW * _x, 0.5 + pixelH * _y, pixelW, pixelH];\n\t\t_dot ctrlSetBackgroundColor [_random, _random, _random, 1];\n\t\t_dot ctrlCommit 0;\n\t};\n};"]}],"see_also":["selectRandom","selectRandomWeighted","Example Code: Random Area Distribution"],"notes":[{"user":"Hcpookie","date":"2015-07-12T20:32:00Z","text":"Random selections including negative numbers can be obtained via:\n\n```sqf\n_xRnd = round (random 200) - 100;\n```\n\nThis will yield numbers between -100 and 100.\n\n- Be careful using random numbers in multiplayer, each client will come up with a different result. See multiplayer tutorials for more general information about locality.\n- The number returned is unlikely to be a whole number.\n\nTo return a whole number use either **round**, **ceil** or **floor** together with random\n\n```sqf\nx = round    (random 5) // will return 0, 1, 2, 3, 4 or 5.    (non-uniform distribution, 0 and 5 are half as likely to be selected than any of the other numbers)\nx = floor    (random 5) // will return 0, 1, 2, 3 or 4.        (uniform distribution, all numbers have the same probability of being selected)\nx = ceil    (random 5) // will return 0, 1, 2, 3, 4 or 5.    (0 is very unlikely, but possible, as ceil 0 is 0)\n```"},{"user":"Lou Montana","date":"2018-07-22T12:58:00Z","text":"**Repartition comparison**\n\n| Formula | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |\n|---|---|---|---|---|---|---|---|---|---|---|\n| `floor random 10` | 10% | 10% | 10% | 10% | 10% | 10% | 10% | 10% | 10% | 10% |\n| `floor random [0, 5, 10]` | 0% | 2% | 7% | 17% | 25% | 25% | 17% | 7% | 2% | 0% |\n| `floor random [0, 10, 0]` | 0% | 0% | 1% | 2% | 5% | 9% | 14% | 19% | 24% | 26% |\n| `floor random [0, 10, 5]` | 0% | 0% | 0% | 1% | 2% | 5% | 9% | 16% | 28% | 38% |"}]},{"name":"rank","title":"rank","type":"command","url":"https://community.bistudio.com/wiki/rank","revid":337318,"updated":"2023-01-16T09:46:20Z","groups":["Unit Identity"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the rank of the given unit. Rank can be one of the following:\n\n- `\"PRIVATE\"`\n- `\"CORPORAL\"`\n- `\"SERGEANT\"`\n- `\"LIEUTENANT\"`\n- `\"CAPTAIN\"`\n- `\"MAJOR\"`\n- `\"COLONEL\"`","syntaxes":[{"syntax":"rank unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_rank = rank player;"]}],"see_also":["rankId","rating","addRating","setUnitRank","ArmA: Rating Values"]},{"name":"rankId","title":"rankId","type":"command","url":"https://community.bistudio.com/wiki/rankId","revid":319405,"updated":"2022-05-13T09:24:01Z","groups":["Unit Identity"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Return the rank of the given unit for comparison.\n\nValue may be:\n\n- **0** - Private\n- **1** - Corporal\n- **2** - Sergeant\n- **3** - Lieutenant\n- **4** - Captain\n- **5** - Major\n- **6** - Colonel","syntaxes":[{"syntax":"rankId unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_myIdRank = rankId player;"]}],"see_also":["rank"]},{"name":"rating","title":"rating","type":"command","url":"https://community.bistudio.com/wiki/rating","revid":341627,"updated":"2023-06-12T19:02:54Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Check unit rating. Rating is increased for killing enemies, decreased for killing friendlies (see Rating Values). Can be changed via addRating by the mission designer.\n\nThe rating of the player is displayed as the \"score\" at the end of the mission. Via Description.ext one can define how many points it takes to get a perfect score, as well as the number of stars.","syntaxes":[{"syntax":"rating unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["_score = rating player;"]}],"see_also":["Side Relations","ArmA: Rating Values","addRating","rank","setUnitRank"],"notes":[{"user":"Leo15745","date":"2011-01-06T13:19:00Z","text":"In ArmA 1.18 rating does only return rating levels for units that are local."}]},{"name":"rectangular","title":"rectangular","type":"command","url":"https://community.bistudio.com/wiki/rectangular","revid":319430,"updated":"2022-05-13T09:24:03Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Checks if a location is rectangular (returns true) or elliptical (returns false).","syntaxes":[{"syntax":"rectangular location","params":[{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"location"}}],"examples":[{"code":["_isRect = rectangular myLocation;"]}],"see_also":["setText","nearestLocation","nearestLocations","locationPosition","nearestLocationWithDubbing","setRectangular","createLocation"]},{"name":"regexFind","title":"regexFind","type":"command","url":"https://community.bistudio.com/wiki/regexFind","revid":369430,"updated":"2024-09-03T18:48:53Z","groups":["Strings - Regular Expression"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Searches in a string with a regular expression.\n\n> [!NOTE]\n> See Arma 3: Regular Expressions.","syntaxes":[{"syntax":"haystack regexFind [pattern, startOffset]","params":[{"name":"haystack","type":"String","type_expr":"String"},{"name":"pattern","type":"String","description":"format regex pattern","type_expr":"String"},{"name":"startOffset","type":"Number","optional":true,"default":"0","description":"has to be in range from 0 to `count haystack` (*haystack*'s length)","type_expr":"Number","text":"startOffset: Number - (Optional, default 0) has to be in range from 0 to `count haystack` (*haystack*'s length)"}],"returns":{"type_expr":"Array","description":"- 0: String - match - 1: Number - offset of given match relative to haystack beginning (the provided offset is ignored)","text":"Array of nested arrays. Each lowest level array in format:\n\n- 0: String - match\n- 1: Number - offset of given match relative to *haystack* beginning (the provided *offset* is ignored)"},"form":"binary","left":{"text":"haystack"},"right":{"text":"[pattern, startOffset]"}}],"examples":[{"code":["\"wooKie boOkie cookie\" regexFind [\".ookie/gio\"]; // [[[\"wooKie\", 0]], [[\"boOkie\", 7]], [[\"cookie\", 14]]]"]},{"code":["\"wooKie boOkie cookie\" regexFind [\".ookie/i\"]; // [[[\"wooKie\",0]]]"]},{"code":["\"wooKie boOkie cookie\" regexFind [\".ookie/\"]; // [[[\"cookie\", 14]]]"]},{"text":"Multiline example:\n\n```sqf\n\"co1kie2\nco2kie\" regexFind [\"^co.kie$\"]; // [[[\"co2kie\",9]]]\n```","code":["\"co1kie2\nco2kie\" regexFind [\"^co.kie$\"]; // [[[\"co2kie\",9]]]"]},{"code":["\"I'm a cookie clicker\" regexFind [\"c(.*?)k(.*?)e/i\"]; // [[[\"cookie\",6], [\"oo\", 7], [\"i\", 10]]]"]},{"code":["\"I'm a cookie clicker\" regexFind [\"c(.*?)k(.*?)e\"]; // [[[\"cookie\", 6], [\"oo\", 7], [\"i\", 10]], [[\"clicke\", 13], [\"lic\", 14], [\"\", 18]]]"]}],"see_also":["regexMatch","regexReplace"]},{"name":"regexMatch","title":"regexMatch","type":"command","url":"https://community.bistudio.com/wiki/regexMatch","revid":369126,"updated":"2024-09-03T10:34:33Z","groups":["Strings - Regular Expression"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Returns whether the *haystack* matches the *pattern*.","syntaxes":[{"syntax":"haystack regexMatch pattern","params":[{"name":"haystack","type":"String","type_expr":"String"},{"name":"pattern","type":"String","description":"in format regex pattern","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if match was found, otherwise false"},"form":"binary","left":{"text":"haystack"},"right":{"text":"pattern"}}],"examples":[{"code":["\"I'm a coOkIe clicker\" regexMatch \".*cookie.*\"; // true"]},{"code":["\"I'm a coOkIe clicker\" regexMatch \".*cookie.*/\"; // false, empty flags == case sensitive"]},{"code":["forceUnicode 1;\n\"I'm a coÖkIe clicker\" regexMatch \".*coökie.*\";"]},{"code":["\"Cookie clicker\" regexMatch \"cookie/i\"; // false, pattern does not fully match the haystack"]}],"see_also":["regexFind","regexReplace"]},{"name":"regexReplace","title":"regexReplace","type":"command","url":"https://community.bistudio.com/wiki/regexReplace","revid":349515,"updated":"2023-11-08T17:14:41Z","groups":["Strings - Regular Expression"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Searches given *haystack* with given *pattern* and replaces all matches with given *replaceString*.","syntaxes":[{"syntax":"haystack regexReplace [pattern, replaceString]","params":[{"name":"haystack","type":"String","type_expr":"String"},{"name":"pattern","type":"String","description":"format regex pattern","type_expr":"String"},{"name":"replaceString","type":"String","description":"[Reference](https://www.boost.org/doc/libs/1_76_0/libs/regex/doc/html/boost_regex/format/perl_format.html)","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"modified text"},"form":"binary","left":{"text":"haystack"},"right":{"text":"[pattern, replaceString]"}}],"examples":[{"text":"```sqf\n\"wookie boOkie cookie\" regexReplace [\".oo/gio\", \"[$']\"];                        // \"[kie boOkie cookie]kie [kie cookie]kie [kie]kie\"\n```","code":["\"wookie boOkie cookie\" regexReplace [\".oo/gio\", \"[$']\"];\t\t\t\t\t\t// \"[kie boOkie cookie]kie [kie cookie]kie [kie]kie\""]},{"text":"```sqf\n\"wookie boOkie cookie\" regexReplace [\".oo/gio\", \"[$&]\"];                        // \"[woo]kie [boO]kie [coo]kie\"\n```","code":["\"wookie boOkie cookie\" regexReplace [\".oo/gio\", \"[$&]\"];\t\t\t\t\t\t// \"[woo]kie [boO]kie [coo]kie\""]},{"text":"```sqf\n\"wook1e boOk2e cook3e\" regexReplace [\".oo/gio\", \"[$`]\"];                        // \"[]kie [k1e ]k2e [k2e ]k3e\"\n```","code":["\"wook1e boOk2e cook3e\" regexReplace [\".oo/gio\", \"[$`]\"];\t\t\t\t\t\t// \"[]kie [k1e ]k2e [k2e ]k3e\""]},{"text":"```sqf\n\"wook1e boOk2e cook3e\" regexReplace [\".(oo)(.*?)e\", \"[$2]\"];                    // \"[k1] [k2] [k3]\"\n```","code":["\"wook1e boOk2e cook3e\" regexReplace [\".(oo)(.*?)e\", \"[$2]\"];\t\t\t\t\t// \"[k1] [k2] [k3]\""]},{"text":"```sqf\n\"wOokie boOkie cookie\" regexReplace [\".(?<test>oo)kie/gio\", \"[$+{test}]\"];    // \"[oo] [oO] [oo]\"\n```","code":["\"wOokie boOkie cookie\" regexReplace [\".(?<test>oo)kie/gio\", \"[$+{test}]\"];\t// \"[oo] [oO] [oo]\""]},{"code":["// Make captured group all lower case '\\L' (lower case) or '\\U' (upper case)\n\"ArmA 3 is so awesome!\" regexReplace [\"(rmA 3)\", \"\\L$1\"]; // \"Arma 3 is so awesome!\""]}],"see_also":["regexMatch","regexFind"]},{"name":"registeredTasks","title":"registeredTasks","type":"command","url":"https://community.bistudio.com/wiki/registeredTasks","revid":378146,"updated":"2026-02-25T18:55:11Z","groups":["Briefing","Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns array with all registered task types for the given agent.\nThe values are the names set in `CfgTasks` classes `name` property and are the same names used for unregisterTask.","syntaxes":[{"syntax":"registeredTasks teamMember","params":[{"name":"teamMember","type":"Team Member","description":"teamMember agent","type_expr":"Team Member"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"names of tasks"},"form":"unary","right":{"text":"teamMember"}}],"examples":[{"code":["tasklist = registeredTasks teamMember _agent;"]},{"code":["_rabbit = createAgent [\"Rabbit_F\", position player,[], 0, \"None\"];\nhint str registeredTasks teamMember _rabbit; // shows [\"Animal Main Task\"] in Arma 3"]}],"see_also":["registerTask","unregisterTask","sendTask","createTask","currentTasks","taskCompleted"]},{"name":"registerTask","title":"registerTask","type":"command","url":"https://community.bistudio.com/wiki/registerTask","revid":319377,"updated":"2022-05-13T09:23:58Z","groups":["Briefing","Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Registers a new task type. Parameters are defined in the given config class (subclass of `CfgTasks`)","syntaxes":[{"syntax":"teamMember registerTask entryName","params":[{"name":"teamMember","type":"Team Member","description":"teamMember agent","type_expr":"Team Member"},{"name":"entryName","type":"String","description":"`CfgTasks` classname","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success"},"form":"binary","left":{"text":"teamMember"},"right":{"text":"entryName"}}],"examples":[{"code":["teamMember _agent registerTask \"MyTask\";"]}],"see_also":["registeredTasks","unregisterTask","sendTask","createTask","currentTasks","taskCompleted"]},{"name":"reload","title":"reload","type":"command","url":"https://community.bistudio.com/wiki/reload","revid":347639,"updated":"2023-10-03T09:06:43Z","groups":["Weapons"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Main syntax: Reload first found muzzle that needs reloading (with some inconsistencies).\nAlternative syntax: this syntax allows to reload given muzzle with given magazine while playing proper animation.\nIf *param* is omitted or is empty string, default value is used. The default behaviour is to find the best matching magazine for the provided muzzle from the pool of available magazines.\nIf specific magazine is requested, the reload will fail if unit has run out of this type of magazines. If an empty array `[]` is given, the behaviour is similar to pressing the \"Reload\" key.\nThe command reloads the given muzzle but does not select it. In case of throwable muzzles, each throwable has its own muzzle, they are autoreloaded after throw.\nUsing reload on the throwable muzzle will just swap throwable for another one of the same type from inventory.","syntaxes":[{"syntax":"reload unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unitName"}},{"syntax":"unit reload [muzzle, magazine]","since":"arma3 2.08","params":[{"name":"unit","type":"Object","description":"person","type_expr":"Object"},{"name":"muzzle","type":"String","optional":true,"default":"currentMuzzle","description":"muzzle name or \"\" for the current muzzle.","type_expr":"String","text":"muzzle: String - (Optional, default currentMuzzle) muzzle name or \"\" for the current muzzle."},{"name":"magazine","type":"String","optional":true,"default":"given muzzle magazine","description":"magazine name or \"\" for given muzzle's magazine. If given muzzle is currentMuzzle then currentMagazine","type_expr":"String","text":"magazine: String - (Optional, default given muzzle magazine) magazine name or \"\" for given muzzle's magazine. If given muzzle is currentMuzzle then currentMagazine"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success"},"form":"binary","left":{"text":"unit"},"right":{"text":"[muzzle, magazine]"}}],"examples":[{"code":["if (needReload player == 1) then { reload player };"]},{"code":["player reload [\"GL_3GL_F\", \"1Rnd_HE_Grenade_shell\"];"]},{"text":"Reload current muzzle:\n\n```sqf\nplayer reload [];\n```","code":["player reload [];"]}],"see_also":["reloadEnabled","needReload","enableReload","setWeaponReloadingTime"]},{"name":"reloadEnabled","title":"reloadEnabled","type":"command","url":"https://community.bistudio.com/wiki/reloadEnabled","revid":370147,"updated":"2024-11-02T13:33:13Z","groups":["Weapons"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"A getter for enableReload. The value returned is wether or not auto-reload is enabled for current client only.","syntaxes":[{"syntax":"reloadEnabled unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["private _aiCanReload = reloadEnabled _unit1;"]}],"see_also":["enableReload","reload","needReload"]},{"name":"remoteControl","title":"remoteControl","type":"command","url":"https://community.bistudio.com/wiki/remoteControl","revid":373364,"updated":"2025-04-30T13:23:33Z","groups":["Remote Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Switches on remote control of the unit. The command was Global argument prior to Arma 3 v2.14). For more info see Remote Control Tutorial.\n\nIf the drone is remote it will get transferred to the player's PC.\n\n> [!NOTE]\n> See also remoteControlled, isRemoteControlling, and Example 4 for a getter workaround for earlier game versions.\n\n> [!WARNING]\n> Always use switchCamera first (when needed) before using remoteControl as doing it after may lead to unpredictable results.","syntaxes":[{"syntax":"who remoteControl whom","params":[{"name":"who","type":"Object","description":"controlling unit","type_expr":"Object"},{"name":"whom","type":"Object","description":"controlled unit","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"who"},"right":{"text":"whom"}}],"examples":[{"text":"Set player remote control of driver:\n\n```sqf\ndriver UAV switchCamera \"Internal\"; // switchCamera required\nplayer remoteControl driver UAV;\n// sometimes switchCamera is not needed\nplayer remoteControl driver UAV;\n```","code":["driver UAV switchCamera \"Internal\"; // switchCamera required\nplayer remoteControl driver UAV;\n// sometimes switchCamera is not needed\nplayer remoteControl driver UAV;"]},{"text":"Return control to player:\n\n> [!IMPORTANT]\n> This method will not work if unit is dead, use the method in Example 3 instead\n\n```sqf\nobjNull remoteControl driver UAV;\n```","code":["objNull remoteControl driver UAV;"]},{"text":"Arma 3 v2.14 Return control to player:\n\n```sqf\nplayer remoteControl objNull;\n```","code":["player remoteControl objNull;"]},{"text":"A dirty hack to return controlling unit because of the absence of dedicated getter:\n\n```sqf\nSQF_fnc_remoteControlledBy =\n{\n    params [\"_obj\"];\n    if (!isNull objectParent _obj) exitWith { UAVControl _obj select 0 };\n    private _res = [objNull];\n    isNil\n    {\n        private _pos = getPosWorld _obj;\n        private _dirUp = [vectorDirVisual _obj, vectorUpVisual _obj];\n        private _anim = animationState _obj;\n        private _dummy = \"PaperCar\" createVehicleLocal [0,0,0];\n        _obj moveInAny _dummy;\n        _res = uavControl _dummy;\n        _obj setPosWorld _pos;\n        _obj setVectorDirAndUp _dirUp;\n        _obj switchMove _anim;\n        deleteVehicle _dummy;\n    };\n    _res select 0\n};\n```\n\nUsage (could be scheduled or unscheduled):\n\n```sqf\n0 spawn\n{\n    player remoteControl bob;\n    systemChat str (bob call SQF_fnc_remoteControlledBy); // B Alpha 1-1:1 (KK)\n    objNull remoteControl bob;\n    systemChat str (bob call SQF_fnc_remoteControlledBy); // <NULL-object>\n};\n```","code":["SQF_fnc_remoteControlledBy =\n{\n\tparams [\"_obj\"];\n\tif (!isNull objectParent _obj) exitWith { UAVControl _obj select 0 };\n\tprivate _res = [objNull];\n\tisNil\n\t{\n\t\tprivate _pos = getPosWorld _obj;\n\t\tprivate _dirUp = [vectorDirVisual _obj, vectorUpVisual _obj];\n\t\tprivate _anim = animationState _obj;\n\t\tprivate _dummy = \"PaperCar\" createVehicleLocal [0,0,0];\n\t\t_obj moveInAny _dummy;\n\t\t_res = uavControl _dummy;\n\t\t_obj setPosWorld _pos;\n\t\t_obj setVectorDirAndUp _dirUp;\n\t\t_obj switchMove _anim;\n\t\tdeleteVehicle _dummy;\n\t};\n\t_res select 0\n};","0 spawn\n{\n\tplayer remoteControl bob;\n\tsystemChat str (bob call SQF_fnc_remoteControlledBy); // B Alpha 1-1:1 (KK)\n\tobjNull remoteControl bob;\n\tsystemChat str (bob call SQF_fnc_remoteControlledBy); // <NULL-object>\n};"]}],"see_also":["switchCamera","selectPlayer","UAVControl","remoteControlled","isRemoteControlling","cameraOn","focusOn"],"notes":[{"user":"TeRp","date":"2009-06-04T18:55:00Z","text":"You must use switchCamera in order to remote control a unit.\nYou can only remoteControl characters, e.g. if yo want to remote control a car, you have to add a driver and use\n\n```sqf\nplayer remoteControl driver someVehicle\n```"},{"user":"Lou Montana","date":"2010-01-25T14:35:00Z","text":"**Arma 2 v1.05**:\n\n- You can remoteControl multiple units at the same time.\n- It is not needed to switchCamera to the unit to be able to control it - it is needed to be able to fire with.\n- The switchCamera is fixed : the player can't change internal/external/optics view.\n- Do not think about it like a selectPlayer: it is used to give the control to **the vehicle role the unit is in**.\n- switchCamera to the **vehicle** the unit is in; the camera will go depending the role you are remoteControlling.\n- The AI driver won't follow your vehicle move orders.\n- If the player dies, the death screen will appear, not automatically turning back to the player.\n- If you want to stop the remote control, use objNull as remote controller.\n- Example:\n\n```sqf\nplayer remoteControl driver jeep1;        // will remoteControl it, you still will have full control of the player\njeep1 switchCamera \"internal\";            // fix the camera to the vehicle and not to driver jeep1!\nwaitUntil { !(alive jeep1) || !(alive player) };\nobjNull remoteControl driver jeep1;        // removes the remoteControlling\nplayer switchCamera \"internal\";            // returns to the player\n```"},{"user":"thedawnofallwars","date":"2020-09-17T03:01:00Z","text":"Far and away the easiest way to check the unit remote controlling an AI through Zeus' Remote Control module is using BIS_fnc_moduleRemoteControl_owner\nThis will return the unit in question which you can then run name on to find the controller's name.\n\n```sqf\nprivate _name = \"-\";\n_who = _unit getVariable [\"BIS_fnc_moduleRemoteControl_owner\", objNull];\nif (!isNull _who) then\n{\n    _name = name _who;\n};\n```"}]},{"name":"remoteControlled","title":"remoteControlled","type":"command","url":"https://community.bistudio.com/wiki/remoteControlled","revid":349626,"updated":"2023-11-16T13:24:07Z","groups":["Remote Control"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","locality":{"argument":"local"},"description":"Returns the player controlling the given unit if the argument is the unit, or the unit controlled by the player if the argument is the player.\n\n> [!IMPORTANT]\n> See also Remote Control Tutorial.","syntaxes":[{"syntax":"remoteControlled unitOrPlayer","params":[{"name":"unitOrPlayer","type":"Object","description":"unit under remote control or the player controlling a unit","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"the person controlling the unit or the unit controlled by the player; objNull if not applicable"},"form":"unary","right":{"text":"unitOrPlayer"}}],"examples":[{"code":["private _controllingPlayer = remoteControlled _dronePilot;"]},{"code":["private _dronePilot = remoteControlled _controllingPlayer;"]}],"see_also":["remoteControl","isRemoteControlling"]},{"name":"remoteExec","title":"remoteExec","type":"command","url":"https://community.bistudio.com/wiki/remoteExec","revid":379298,"updated":"2026-10-30T23:47:54Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","description":"Asks the server to execute the given function or script command on the given target machine(s).\n\n- Functions are executed in the scheduled environment; suspension is allowed.\n- Script commands are executed in the unscheduled environment; suspension is not allowed (see Example 7).\n\nRead Arma 3: Remote Execution for more information about remote execution, security features and JIP techniques.\n\n> [!NOTE]\n> remoteExec/remoteExecCall can be used in single player as well, as it is considered as player-hosted multiplayer.\n\n> [!IMPORTANT]\n> The direct execution of call or spawn via remoteExec (or remoteExecCall) should be avoided to prevent issues in cases where the remote execution of call or spawn is blocked by CfgRemoteExec. It is instead recommended to create a function to be itself remote-executed.\n\n> [!WARNING]\n> The order of persistent remote execution for JIP players is not guaranteed, i.e. the order in which multiple calls are added is not necessarily the order they will be executed for joining player.","syntaxes":[{"syntax":"params remoteExec [order, targets, JIP]","params":[{"name":"params","type":"Anything but Structured Text","description":"*order*'s parameter\n\n> [!IMPORTANT]\n> Structured Text is **not** meant to be sent over network.","type_expr":"Anything","text":"**params**: Anything **but** Structured Text - *order*'s parameter\n\n> [!IMPORTANT]\n> Structured Text is **not** meant to be sent over network."},{"name":"order","type":"String","description":"function or command name; while any function or command can be used here, only those allowed by CfgRemoteExec will actually be executed","type_expr":"String","text":"**order**: String - function or command name; while any function or command can be used here, only those allowed by CfgRemoteExec will actually be executed"},{"name":"targets","type":"Number, Object, String, Side, Group or Array","optional":true,"default":"0","description":"Number (See also Machine network ID):\n  - **0:** the order will be executed globally, i.e. on the server and every connected client, including the machine where remoteExec originated\n  - **2:** the order will only be executed on the server - is both dedicated and hosted server. See for more info\n  - **Other number:** the order will be executed on the machine where clientOwner matches the given number\n  - **Negative number:** the effect is inverted: **-2** means every client but not the server, **-12** means the server and every client, except for the client where clientOwner returns 12\n- Object - the order will be executed where the given object is local\n- String - interpreted as an Identifier (variable name); the function / command will be executed where the object or group identified by the variable with the provided name is local\n- Side - the order will be executed on machines where the player is on the specified side\n- Group - the order will be executed on machines **where the player is in the specified group** (**not** where said group is local!)\n- Array - array of any combination of the types listed above","type_expr":"Number | Object | String | Side | Group | Array","text":"**targets**: Number, Object, String, Side, Group or Array - (Optional, default 0)\n\n- Number (See also Machine network ID):\n  - **0:** the order will be executed globally, i.e. on the server and every connected client, including the machine where remoteExec originated\n  - **2:** the order will only be executed on the server - is both dedicated and hosted server. See for more info\n  - **Other number:** the order will be executed on the machine where clientOwner matches the given number\n  - **Negative number:** the effect is inverted: **-2** means every client but not the server, **-12** means the server and every client, except for the client where clientOwner returns 12\n- Object - the order will be executed where the given object is local\n- String - interpreted as an Identifier (variable name); the function / command will be executed where the object or group identified by the variable with the provided name is local\n- Side - the order will be executed on machines where the player is on the specified side\n- Group - the order will be executed on machines **where the player is in the specified group** (**not** where said group is local!)\n- Array - array of any combination of the types listed above"},{"name":"JIP","type":"Boolean, String or Object","optional":true,"default":"false","description":"Boolean - if true, a unique JIP ID is generated and the remoteExec statement is added to the JIP queue from which it will be executed for every JIP\n- String:\n  - if the string is empty, it is interpreted as false\n  - if the string is in format \"Number:Number\" (e.g. \"0:0\"), it is interpreted as a netId (see below)\n  - else the string is treated as a custom JIP ID and the remoteExec statement is added to the JIP queue, replacing statements that have the same JIP ID\n- Object, Group or netId - the persistent execution of the remoteExec statement is attached to the given object or group, replacing any previous statement that has the same JIP ID.\n  When the object / group is deleted, the remoteExec statement is automatically removed from the JIP queue\n\nThe **JIP** parameter can only be used if the **targets** parameter is 0 or a negative number.\nSee also Example 3 on how to remove statements from the JIP queue.","type_expr":"Boolean | String | Object","text":"**JIP**: Boolean, String or Object - (Optional, default false)\n\n- Boolean - if true, a unique JIP ID is generated and the remoteExec statement is added to the JIP queue from which it will be executed for every JIP\n- String:\n  - if the string is empty, it is interpreted as false\n  - if the string is in format \"Number:Number\" (e.g. \"0:0\"), it is interpreted as a netId (see below)\n  - else the string is treated as a custom JIP ID and the remoteExec statement is added to the JIP queue, replacing statements that have the same JIP ID\n- Object, Group or netId - the persistent execution of the remoteExec statement is attached to the given object or group, replacing any previous statement that has the same JIP ID.\n  When the object / group is deleted, the remoteExec statement is automatically removed from the JIP queue\n\nThe **JIP** parameter can only be used if the **targets** parameter is 0 or a negative number.\nSee also Example 3 on how to remove statements from the JIP queue."}],"returns":{"types":["Nothing"],"type_expr":"Nothing | String","description":"- nil - In case of error. - String - In case of success (see remoteExecutedJIPID). - If the JIP parameter was false or an empty string, the return value is \"\". - If the JIP parameter was true or a custom JIP ID, the JIP ID is returned. - If the JIP parameter was an Object, a Group or a netId, the (corresponding) netId is returned.","text":"- nil - In case of error.\n- String - In case of success (see remoteExecutedJIPID).\n  - If the **JIP** parameter was false or an empty string, the return value is \"\".\n  - If the **JIP** parameter was true or a custom JIP ID, the JIP ID is returned.\n  - If the **JIP** parameter was an Object, a Group or a netId, the (corresponding) netId is returned."},"form":"binary","left":{"text":"params"},"right":{"text":"[order, targets, JIP]"}},{"syntax":"remoteExec [functionName, targets, JIP]","params":[{"name":"functionName","type":"String","description":"see the main syntax above for more details.","type_expr":"String","text":"**functionName**: String - see the main syntax above for more details."},{"name":"targets","type":"Number, Object, String, Side, Group or Array","optional":true,"default":"0","description":"see the main syntax above for more details.","type_expr":"Number | Object | String | Side | Group | Array","text":"**targets**: Number, Object, String, Side, Group or Array - (Optional, default 0) see the main syntax above for more details."},{"name":"JIP","type":"Boolean, String, Object, Group or netId","optional":true,"default":"false","description":"see the main syntax above for more details.","type_expr":"Boolean | String | Object | Group","text":"**JIP**: Boolean, String, Object, Group or netId - (Optional, default false) see the main syntax above for more details."}],"returns":{"type":"nil or String","type_expr":"Nothing | String","description":"see the main syntax above for more details."},"form":"unary","right":{"text":"[functionName, targets, JIP]"}}],"examples":[{"text":"How to write remoteExec/remoteExecCall with arguments - note the colours:\n\n```\nhint \"Hello\";\n// becomes\n[\"Hello\"] remoteExec [\"hint\"];\n\"Hello\" remoteExec [\"hint\"]; // alternatively\n```\n\n```\nunit1 setFace \"Miller\";\n// becomes\n[unit1, \"Miller\"] remoteExec [\"setFace\"];\n```\n\n```\ncutRsc [\"\", \"BLACK OUT\"];\n// becomes\n[[\"\", \"BLACK OUT\"]] remoteExec [\"cutRsc\"]; // double brackets are needed as the unary command takes an array\n```\n\n```\n// functions, however, do not need double squared brackets\n[\"line 1\", \"line 2\"] spawn BIS_fnc_infoText;\n// becomes\n[\"line 1\", \"line 2\"] remoteExec [\"BIS_fnc_infoText\"];\n```"},{"text":"send an order to specific machines:\n\n```sqf\n\"message\" remoteExec [\"hint\"];                    // sends a hint message to everyone\n\"message\" remoteExec [\"hint\", 0];                // sends a hint message to everyone, identical to \"message\" remoteExec [\"hint\"]\n\"message\" remoteExec [\"hint\", -2];                // sends a hint message to everybody but the server (also not hosted server)\n\"message\" remoteExec [\"hint\", myCar];            // sends a hint message where myCar is local\n\"message\" remoteExec [\"hint\", -clientOwner];    // sends a hint message to everybody but the current machine\n```","code":["\"message\" remoteExec [\"hint\"];\t\t\t\t\t// sends a hint message to everyone\n\"message\" remoteExec [\"hint\", 0];\t\t\t\t// sends a hint message to everyone, identical to \"message\" remoteExec [\"hint\"]\n\"message\" remoteExec [\"hint\", -2];\t\t\t\t// sends a hint message to everybody but the server (also not hosted server)\n\"message\" remoteExec [\"hint\", myCar];\t\t\t// sends a hint message where myCar is local\n\"message\" remoteExec [\"hint\", -clientOwner];\t// sends a hint message to everybody but the current machine"]},{"text":"Add statements to the JIP queue:\n\n```sqf\nprivate _jipId = [\"mission state: the car is broken\"] remoteExec [\"systemChat\", 0, true]; // adds the hint to the JIP queue and returns the JIP queue order id\nwaitUntil { canMove _car };\nremoteExec [\"\", _jipId]; // the systemChat order is removed from the JIP queue\n```\n\n```sqf\n[\"mission state: the car is broken\"] remoteExec [\"systemChat\", 0, _queueObject];\n// ...\nremoteExec [\"\", _queueObject]; // the order attached to _queueObject is removed\n```\n\n```sqf\nprivate _jipId = [\"mission state: the car is broken\"] remoteExec [\"systemChat\", 0, \"MY_JIP_ID\"]; // _jipId is actually \"MY_JIP_ID\" now\nwaitUntil { canMove _car };\n[\"mission state: the car is repaired\"] remoteExec [\"systemChat\", 0, \"MY_JIP_ID\"]; // this order replaces the previous one\n// ...\nremoteExec [\"\", \"MY_JIP_ID\"]; // the \"MY_JIP_ID\" order is removed from the JIP queue\n```","code":["private _jipId = [\"mission state: the car is broken\"] remoteExec [\"systemChat\", 0, true]; // adds the hint to the JIP queue and returns the JIP queue order id\nwaitUntil { canMove _car };\nremoteExec [\"\", _jipId]; // the systemChat order is removed from the JIP queue","[\"mission state: the car is broken\"] remoteExec [\"systemChat\", 0, _queueObject];\n// ...\nremoteExec [\"\", _queueObject]; // the order attached to _queueObject is removed","private _jipId = [\"mission state: the car is broken\"] remoteExec [\"systemChat\", 0, \"MY_JIP_ID\"]; // _jipId is actually \"MY_JIP_ID\" now\nwaitUntil { canMove _car };\n[\"mission state: the car is repaired\"] remoteExec [\"systemChat\", 0, \"MY_JIP_ID\"]; // this order replaces the previous one\n// ...\nremoteExec [\"\", \"MY_JIP_ID\"]; // the \"MY_JIP_ID\" order is removed from the JIP queue"]},{"text":"Some more complex examples:\n\n```sqf\n[\"Open\", true] remoteExec [\"BIS_fnc_arsenal\", MyTargetPlayer];\n[MyCurator, [[MyObject1, MyObject2], false]] remoteExec [\"addCuratorEditableObjects\", 2];\n```","code":["[\"Open\", true] remoteExec [\"BIS_fnc_arsenal\", MyTargetPlayer];\n[MyCurator, [[MyObject1, MyObject2], false]] remoteExec [\"addCuratorEditableObjects\", 2];"]},{"text":"A tricky example: executing `player setAmmo [primaryWeapon player, 1];` (on machines where the player is in MyGroup):\n\n```sqf\n[player, [primaryWeapon player, 1]] remoteExec [\"setAmmo\", MyGroup];            // WRONG:    the local player object is used here!\n[{ player setAmmo [primaryWeapon player, 1]; }] remoteExec [\"call\", MyGroup];    // CORRECT:    the remote player object is used here\n```","code":["[player, [primaryWeapon player, 1]] remoteExec [\"setAmmo\", MyGroup];\t\t\t// WRONG:\tthe local player object is used here!\n[{ player setAmmo [primaryWeapon player, 1]; }] remoteExec [\"call\", MyGroup];\t// CORRECT:\tthe remote player object is used here"]},{"text":"**Multiplayer Scripting \"performance trick\"**\nThis `[0, -2] select isDedicated` check is worth it to avoid **function** server-side calculations only. See also Example 9 for an advanced solution.\n\n```sqf\n[\"message\"] remoteExec [\"BIS_fnc_infoText\"];                                // not ideal - the function will still run on the dedicated server for nothing\n[\"message\"] remoteExec [\"BIS_fnc_infoText\", [0, -2] select isDedicated];    // ideal - the dedicated server will not run the code, a player-hosted server will\n\n[\"message\"] remoteExec [\"hint\", [0, -2] select isDedicated];    // the check is too expensive to be worthy - it becomes worthy if the server logs an RPT warning\n[\"message\"] remoteExec [\"hint\"];                                // the (dedicated) server will automatically ditch hint usage due to it not having an interface\n\nprivate _allPlayersTarget = [0, -2] select isDedicated;            // caching the result for multiple usages makes it worthy - think of headless clients as well\n[\"message 1\"] remoteExec [\"hint\", _allPlayersTarget];\n[\"message 2\"] remoteExec [\"hint\", _allPlayersTarget];\n```\n\n> [!NOTE]\n> See Example 9 below for an advanced example.","code":["[\"message\"] remoteExec [\"BIS_fnc_infoText\"];\t\t\t\t\t\t\t\t// not ideal - the function will still run on the dedicated server for nothing\n[\"message\"] remoteExec [\"BIS_fnc_infoText\", [0, -2] select isDedicated];\t// ideal - the dedicated server will not run the code, a player-hosted server will\n\n[\"message\"] remoteExec [\"hint\", [0, -2] select isDedicated];\t// the check is too expensive to be worthy - it becomes worthy if the server logs an RPT warning\n[\"message\"] remoteExec [\"hint\"];\t\t\t\t\t\t\t\t// the (dedicated) server will automatically ditch hint usage due to it not having an interface\n\nprivate _allPlayersTarget = [0, -2] select isDedicated;\t\t\t// caching the result for multiple usages makes it worthy - think of headless clients as well\n[\"message 1\"] remoteExec [\"hint\", _allPlayersTarget];\n[\"message 2\"] remoteExec [\"hint\", _allPlayersTarget];"]},{"text":"As said in the description: **commands** will be executed in an unscheduled environment\n\n```sqf\n[{ sleep 1 }] remoteExec [\"call\"]; // will throw an error: it is forbidden to use sleep (or waitUntil, etc) in unscheduled environment\n```","code":["[{ sleep 1 }] remoteExec [\"call\"]; // will throw an error: it is forbidden to use sleep (or waitUntil, etc) in unscheduled environment"]},{"code":["\"Message 1\" remoteExec [\"systemChat\"];\n\"Message 2\" remoteExec [\"systemChat\"];\n// will result in\n// \"Message 1\"\n// \"Message 2\"\n// in this exact order on clients"]},{"text":"It is possible to create a \"to all players\" remote exec target variable:\n\n```sqf\nif (isServer) then\n{\n    TO_ALL_PLAYERS = [0, -2] select isDedicated;\n    publicVariable \"TO_ALL_PLAYERS\";\n};\n```\n\nIf Headless Clients are involved:\n\n```sqf\nif (isServer) then\n{\n    TO_ALL_PLAYERS = [0, -2] select isDedicated;\n\n    private _allNegativeHCs = allPlayers apply { getPlayerID _x } select { _x != \"-1\" }    // all valid playerIDs\n        apply { getUserInfo _x } select { _x select 7 }                                    // filter by HC\n        apply { -(_x select 1) };                                                        // get negative network ID\n\n    if (_allNegativeHCs isNotEqualTo []) then\n    {\n        TO_ALL_PLAYERS = [TO_ALL_PLAYERS] + _allNegativeHCs;\n    };\n\n    publicVariable \"TO_ALL_PLAYERS\";\n\n    addMissionEventHandler [\"OnUserConnected\", {\n        params [\"_networkId\"];\n        private _userInfo = getUserInfo _networkId;\n        if !(_userInfo select 7) exitWith {};    // not a HC\n\n        if (TO_ALL_PLAYERS isEqualType 0) then    // number to array conversion\n        {\n            if (TO_ALL_PLAYERS == 0) then        // player-hosted\n            {\n                TO_ALL_PLAYERS = [-(_userInfo select 1)];\n            }\n            else                                // -2, dedicated server\n            {\n                TO_ALL_PLAYERS = [TO_ALL_PLAYERS, -(_userInfo select 1)];\n            };\n        }\n        else                                    // already an array\n        {\n            TO_ALL_PLAYERS pushBackUnique -(_userInfo select 1);\n        };\n\n        publicVariable \"TO_ALL_PLAYERS\";\n    }];\n};\n```\n\n```sqf\n// client or server will always target the good machines\n[\"Yay!\"] remoteExec [\"hint\", TO_ALL_PLAYERS];\n```","code":["if (isServer) then\n{\n\tTO_ALL_PLAYERS = [0, -2] select isDedicated;\n\tpublicVariable \"TO_ALL_PLAYERS\";\n};","if (isServer) then\n{\n\tTO_ALL_PLAYERS = [0, -2] select isDedicated;\n\n\tprivate _allNegativeHCs = allPlayers apply { getPlayerID _x } select { _x != \"-1\" }\t// all valid playerIDs\n\t\tapply { getUserInfo _x } select { _x select 7 }\t\t\t\t\t\t\t\t\t// filter by HC\n\t\tapply { -(_x select 1) };\t\t\t\t\t\t\t\t\t\t\t\t\t\t// get negative network ID\n\n\tif (_allNegativeHCs isNotEqualTo []) then\n\t{\n\t\tTO_ALL_PLAYERS = [TO_ALL_PLAYERS] + _allNegativeHCs;\n\t};\n\n\tpublicVariable \"TO_ALL_PLAYERS\";\n\n\taddMissionEventHandler [\"OnUserConnected\", {\n\t\tparams [\"_networkId\"];\n\t\tprivate _userInfo = getUserInfo _networkId;\n\t\tif !(_userInfo select 7) exitWith {};\t// not a HC\n\n\t\tif (TO_ALL_PLAYERS isEqualType 0) then\t// number to array conversion\n\t\t{\n\t\t\tif (TO_ALL_PLAYERS == 0) then\t\t// player-hosted\n\t\t\t{\n\t\t\t\tTO_ALL_PLAYERS = [-(_userInfo select 1)];\n\t\t\t}\n\t\t\telse\t\t\t\t\t\t\t\t// -2, dedicated server\n\t\t\t{\n\t\t\t\tTO_ALL_PLAYERS = [TO_ALL_PLAYERS, -(_userInfo select 1)];\n\t\t\t};\n\t\t}\n\t\telse\t\t\t\t\t\t\t\t\t// already an array\n\t\t{\n\t\t\tTO_ALL_PLAYERS pushBackUnique -(_userInfo select 1);\n\t\t};\n\n\t\tpublicVariable \"TO_ALL_PLAYERS\";\n\t}];\n};","// client or server will always target the good machines\n[\"Yay!\"] remoteExec [\"hint\", TO_ALL_PLAYERS];"]}],"multiplayer":"Remote executions are queued and are therefore executed in the same order on remote clients (see Example 8).","see_also":["Multiplayer Scripting","remoteExecCall","remoteExecutedOwner","isRemoteExecuted","isRemoteExecutedJIP","Arma 3: Remote Execution","canSuspend","BIS_fnc_MP","remoteExecutedJIPID"],"notes":[{"user":"AgentRev","date":"2015-12-29T20:28:00Z","text":"remoteExec and remoteExecCall are currently filtered by BattlEye's remoteexec.txt, the string analyzed by BE is formatted the same way as the following example's output:\n\n```sqf\nformat [\"%1 %2\", functionName, str params]\n```\n\nIf CfgRemoteExec `class Functions` is set to `mode = 1;`, the following remoteexec.txt exclusion can be used to safely allow all whitelisted *_fnc_* functions taking an array as parameter to go through:\n\n```sqf\n!=\"\\w+?_fnc_\\w+? \\[[\\S\\s]*\\]\"\n```\n\nAny attempt to exploit this exclusion using other RE methods like createUnit will run into \"Error Missing ;\" without any malicious code being executed. Mod makers should refrain from remote-executing raw commands from clients, as they require individual exclusions, and instead use *_fnc_* functions taking an array as parameter, which are covered by the above exclusion."},{"user":"Pierre MGI","date":"2017-01-30T18:35:00Z","text":"```sqf\n[someArgs] remoteExec ['someCommand', 2, true];\n```\n\nwill fail, as you can't use JIP and remoteExec on server only\n\n```sqf\n[someArgs] remoteExec ['someCommand', 2]; // works\n```"},{"user":"7erra","date":"2021-03-05T00:48:00Z","text":"The remoteExec'ed function only has to exist on the target machine. For example:\n\n```sqf\n// initPlayerLocal.sqf\nTAG_fnc_testRemote = {\n    hint \"Remote Exec Received\";\n};\n```\n\n```sqf\n// executed on a DEDICATED server\nremoteExec [\"TAG_fnc_testRemote\", -2];\n```\n\nWill display a hint for every client. This is especially useful for when the server is running a mod that is not required by clients."},{"user":"Sa-Matra","date":"2024-09-19T08:33:05Z","text":"It is not possible to use two negative owners to exclude two clients, you'll end up REing all clients:\n\n```sqf\nargs remoteExec [\"func\", [-2, -3]]; // Doesn't work, gonna execute on every client\n```"}],"categories_extra":["Arma 3: Remote Execution"]},{"name":"remoteExecCall","title":"remoteExecCall","type":"command","url":"https://community.bistudio.com/wiki/remoteExecCall","revid":369336,"updated":"2024-09-03T18:43:00Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","description":"Unscheduled version of remoteExec. The only difference between remoteExec and remoteExecCall is that remoteExecCall will run **functions** in unscheduled environment.\n\n> [!IMPORTANT]\n> The \"Call\" in remoteExecCall only means that the remote execution will take place in unscheduled environment and does **not** mean it will happen right away (see Example 3).","syntaxes":[{"syntax":"see remoteExec","params":[{"name":"see remoteExec"}],"returns":{"type":"see remoteExec"}}],"examples":[{"text":"```sqf\n[\"hello\"] remoteExec [\"hint\"];        // runs unscheduled\n[\"hello\"] remoteExecCall [\"hint\"];    // no difference at all\n```","code":["[\"hello\"] remoteExec [\"hint\"];\t\t// runs unscheduled\n[\"hello\"] remoteExecCall [\"hint\"];\t// no difference at all"]},{"text":"```sqf\n[\"my message\"] remoteExec [\"BIS_fnc_infoText\"];        // correct\n[\"my message\"] remoteExecCall [\"BIS_fnc_infoText\"];    // wrong - BIS_fnc_infoText needs a scheduled environment, see its spawn need\n```","code":["[\"my message\"] remoteExec [\"BIS_fnc_infoText\"];\t\t// correct\n[\"my message\"] remoteExecCall [\"BIS_fnc_infoText\"];\t// wrong - BIS_fnc_infoText needs a scheduled environment, see its spawn need"]},{"text":"```sqf\nremoteExecCall [\"fnc1\"];\ncall fnc2;    // fnc1 may or may not be executed after fnc2\n\ncall fnc1;\ncall fnc2;    // fnc2 will be executed after fnc1\n```","code":["remoteExecCall [\"fnc1\"];\ncall fnc2;\t// fnc1 may or may not be executed after fnc2\n\ncall fnc1;\ncall fnc2;\t// fnc2 will be executed after fnc1"]}],"see_also":["remoteExec","remoteExecutedOwner","isRemoteExecuted","isRemoteExecutedJIP","Arma 3: Remote Execution","canSuspend","BIS_fnc_MP","remoteExecutedJIPID"],"categories_extra":["Arma 3: Remote Execution"]},{"name":"remoteExecutedJIPID","title":"remoteExecutedJIPID","type":"command","url":"https://community.bistudio.com/wiki/remoteExecutedJIPID","revid":369745,"updated":"2024-10-08T15:06:58Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns JIP ID of the persistent call generated from JIP queue for the joining player (see remoteExec).","syntaxes":[{"syntax":"remoteExecutedJIPID","params":[],"returns":{"type":"String","type_expr":"String","description":"JIP ID"},"form":"nullary"}],"examples":[{"code":["_jipid = remoteExecutedJIPID;"]},{"text":"```sqf\n/*\nHave mission with 2 players.\nFirst player starts local server and executes given code\nSecond player joins the server and sees the 'all good' message\nSecond player logs out\nFirst player kills 'bob'\nSecond player joins back and sees 'removing JIP call' message\nSecond player logs out then joins back in, no message as call was removed\n*/\n\nprivate _fnc =\n{\n    if (isRemoteExecutedJIP) then\n    {\n        remoteExecutedJIPID splitString \"|\" params [\"_myID\", \"_netID\"];\n        private _obj = objectFromNetId _netID;\n        if (!alive _obj) then\n        {\n            hint \"object is dead or deleted, removing JIP call\";\n            remoteExec [\"\", remoteExecutedJIPID];\n        }\n        else\n        {\n            hint \"JIP call, all good, doing something\";\n        };\n    };\n};\n\nprivate _bob = group player createUnit [typeOf player, position player, [], 0, \"NONE\"];\nprivate _myID = \"lalala\";\nprivate _jipID = [_myID, netId _bob] joinString \"|\";\n[[], _fnc] remoteExec [\"call\", 0, _jipId];\n```","code":["/* \nHave mission with 2 players.\nFirst player starts local server and executes given code\nSecond player joins the server and sees the 'all good' message\nSecond player logs out \nFirst player kills 'bob'\nSecond player joins back and sees 'removing JIP call' message\nSecond player logs out then joins back in, no message as call was removed\n*/\n\nprivate _fnc = \n{\n\tif (isRemoteExecutedJIP) then\n\t{\n\t\tremoteExecutedJIPID splitString \"|\" params [\"_myID\", \"_netID\"];\n\t\tprivate _obj = objectFromNetId _netID;\n\t\tif (!alive _obj) then\n\t\t{\n\t\t\thint \"object is dead or deleted, removing JIP call\";\n\t\t\tremoteExec [\"\", remoteExecutedJIPID];\n\t\t}\n\t\telse\n\t\t{\n\t\t\thint \"JIP call, all good, doing something\";\n\t\t};\n\t};\n};\n\nprivate _bob = group player createUnit [typeOf player, position player, [], 0, \"NONE\"];\nprivate _myID = \"lalala\";\nprivate _jipID = [_myID, netId _bob] joinString \"|\";\n[[], _fnc] remoteExec [\"call\", 0, _jipId];"]}],"see_also":["remoteExecutedOwner","isRemoteExecuted","isRemoteExecutedJIP","remoteExec","remoteExecCall","canSuspend","publicVariableClient","admin","owner","clientOwner","groupOwner","didJIPOwner"]},{"name":"remoteExecutedOwner","title":"remoteExecutedOwner","type":"command","url":"https://community.bistudio.com/wiki/remoteExecutedOwner","revid":365035,"updated":"2024-07-14T12:57:10Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Returns the machine network ID of the client that initiated Remote Execution.\n\n> [!IMPORTANT]\n> Running this command\n>\n> - in a Single Player environment\n> - outside of a remote-executed context\n> - in a remote-executed context received from a Headless Client\n>\n> will return **0** by design. To check if the context is remote executed, use isRemoteExecuted or isRemoteExecutedJIP.","syntaxes":[{"syntax":"remoteExecutedOwner","params":[],"returns":{"type":"Number","type_expr":"Number","description":"returns zero in the specific cases listed in the Description"},"form":"nullary"}],"examples":[{"code":["private _callerRE = remoteExecutedOwner;"]},{"text":"Send request to the server and get immediate response:\n\n```sqf\n{\n    // in this scope, the remoteExecutedOwner equals clientOwner of the sender\n    // so using it as target in remoteExec will send response right back at him\n    [\n        time, // mission time value on the server\n        {\n            hint format\n            [\n                \"Request received!\\nMission time value on the server is: %1\",\n                _this\n            ];\n        }\n    ]\n    remoteExec [\"call\", remoteExecutedOwner]; // server response to the sender\n}\nremoteExec [\"call\", 2]; // send request to server\n```","code":["{\n\t// in this scope, the remoteExecutedOwner equals clientOwner of the sender\n\t// so using it as target in remoteExec will send response right back at him\n\t[\n\t\ttime, // mission time value on the server\n\t\t{\n\t\t\thint format\n\t\t\t[\n\t\t\t\t\"Request received!\\nMission time value on the server is: %1\",\n\t\t\t\t_this\n\t\t\t];\n\t\t}\n\t]\n\tremoteExec [\"call\", remoteExecutedOwner]; // server response to the sender\n} \nremoteExec [\"call\", 2]; // send request to server"]}],"see_also":["isRemoteExecuted","isRemoteExecutedJIP","remoteExecutedJIPID","remoteExec","remoteExecCall","canSuspend","publicVariableClient","admin","owner","clientOwner","groupOwner","didJIPOwner"],"notes":[{"user":"Demellion","date":"2017-09-11T09:31:00Z","text":"Always be sure to check if the remoteExecutedOwner is not equal to 0 when sending a remoteExec/remoteExecCall packet back, as this will result in sending packet to ANYONE (0):\n\n```sqf\nif (remoteExecutedOwner isEqualTo 0) exitWith {}; // invalid RE owner\n_gearArray remoteExecCall ['someGearFunction', remoteExecutedOwner];\n```\n\nWill prevent from code being accidentally sent to everyone on the server."}],"categories_extra":["Arma 3: Remote Execution"]},{"name":"remove3DENConnection","title":"remove3DENConnection","type":"command","url":"https://community.bistudio.com/wiki/remove3DENConnection","revid":379534,"updated":"2026-10-31T00:51:38Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Removes connection between entities.","syntaxes":[{"syntax":"remove3DENConnection [type, from, to]","params":[{"name":"type","type":"String","description":"connection class from *Cfg3DEN >> Connections*","type_expr":"String"},{"name":"from","type":"Array of Eden Entities","description":"entities which has a connection","type_expr":"Array<Eden Entity>"},{"name":"to","type":"Eden Entity","description":"connection target","type_expr":"Eden Entity"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[type, from, to]"}}],"examples":[{"code":["remove3DENConnection [\"RandomStart\", get3DENSelected \"Object\", \"marker_0\"];// Remove random start on marker \"marker_0\" from all selected objects."]}],"see_also":["add3DENConnection","get3DENConnections"]},{"name":"remove3DENEventHandler","title":"remove3DENEventHandler","type":"command","url":"https://community.bistudio.com/wiki/remove3DENEventHandler","revid":369147,"updated":"2024-09-03T10:34:38Z","groups":["Eden Editor","Event Handlers"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Removes Eden Editor event handler of given type and ID.\n\nSee the list of all Eden Editor Event Handlers.","syntaxes":[{"syntax":"remove3DENEventHandler [type,id]","params":[{"name":"type","type":"String","description":"name of event handler","type_expr":"String"},{"name":"id","type":"Number","description":"ID of event handler, returned by add3DENEventHandler","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[type,id]"}}],"examples":[{"code":["eh = add3DENEventHandler [\"onUndo\",{systemChat \"Zip...\"}];\nremove3DENEventHandler [\"onUndo\",eh];"]}],"see_also":["add3DENEventHandler","removeAll3DENEventHandlers"]},{"name":"remove3DENLayer","title":"remove3DENLayer","type":"command","url":"https://community.bistudio.com/wiki/remove3DENLayer","revid":351677,"updated":"2023-12-20T10:39:52Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Remove Eden Editor editing layer.\n\n> [!NOTE]\n> delete3DENEntities seems to be more reliable.","syntaxes":[{"syntax":"remove3DENLayer layerID","params":[{"name":"layerID","type":"Number","description":"layer ID as returned by add3DENLayer command","type_expr":"Number","text":"layerID : Number - layer ID as returned by add3DENLayer command"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the layer was removed successfully (i.e., correct layer ID was used)"},"form":"unary","right":{"text":"layerID"}}],"examples":[{"code":["private _myLayer = -1 add3DENLayer \"Enemy Base\";\nremove3DENLayer _myLayer;"]}],"see_also":["add3DENLayer","set3DENLayer","get3DENLayerEntities"]},{"name":"removeAction","title":"removeAction","type":"command","url":"https://community.bistudio.com/wiki/removeAction","revid":348246,"updated":"2023-11-08T11:40:32Z","groups":["Interaction"],"status":"ok","games":{"ofp":"1.20","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.20","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Removes user added action with given ID. This only removes actions added with the addAction command. You cannot remove default game actions, such as reload.","syntaxes":[{"syntax":"unit removeAction actionID","params":[{"name":"unit","type":"Object","description":"unit, vehicle or static object","type_expr":"Object"},{"name":"actionID","type":"Number","description":"action ID returned by addAction","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"actionID"}}],"examples":[{"code":["player removeAction 0;"]}],"see_also":["actionIDs","actionParams","addAction","setUserActionText","inGameUISetEventHandler","showHUD","inputAction","removeAllActions","action"]},{"name":"removeAll3DENEventHandlers","title":"removeAll3DENEventHandlers","type":"command","url":"https://community.bistudio.com/wiki/removeAll3DENEventHandlers","revid":342137,"updated":"2023-07-09T12:26:45Z","groups":["Eden Editor","Event Handlers"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Removes all Eden Editor event handlers of given type.\n\nSee the list of all Eden Editor Event Handlers.","syntaxes":[{"syntax":"removeAll3DENEventHandlers type","params":[{"name":"type","type":"String","description":"name of event handler","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"type"}}],"examples":[{"code":["removeAll3DENEventHandlers \"onUndo\";"]}],"see_also":["add3DENEventHandler","remove3DENEventHandler"]},{"name":"removeAllActions","title":"removeAllActions","type":"command","url":"https://community.bistudio.com/wiki/removeAllActions","revid":329338,"updated":"2022-07-27T10:37:51Z","groups":["Interaction"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Removes all unit's user added actions.\n\n> [!NOTE]\n> This command's syntax was `unit removeAllActions number` from Arma 3 v0.50 to v1.06.\n\n> [!IMPORTANT]\n> Usage of this command is usually a bad practice unless justified by the situation; removing all actions in order to remove all actions that *one* added is not a good method as a mod or another script could have added its own actions as well and see them removed. Instead, store the action id returned by addAction either in a script variable or using setVariable.","syntaxes":[{"syntax":"removeAllActions obj","params":[{"name":"obj","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"obj"}}],"examples":[{"code":["removeAllActions player;"]},{"text":"Do\n\n```sqf\nprivate _actionId = player addAction [\"Heal self\", { player setDamage 0; }];\n// ...\nplayer removeAction _actionId;\n```\n\nDon't\n\n```sqf\nplayer addAction [\"Heal self\", { player setDamage 0; }];\n// ...\nremoveAllActions player;\n```","code":["private _actionId = player addAction [\"Heal self\", { player setDamage 0; }];\n// ...\nplayer removeAction _actionId;","player addAction [\"Heal self\", { player setDamage 0; }];\n// ...\nremoveAllActions player;"]},{"text":"Do\n\n```sqf\nplayer addAction [\"Heal self (once)\", {\n    params [\"_target\", \"\", \"_actionId\"];\n    _target setDamage 0;\n    _target removeAction _actionId;\n}];\n```\n\nDon't\n\n```sqf\nplayer addAction [\"Heal self (once)\", {\n    player setDamage 0;\n    removeAllActions player;\n}];\n```","code":["player addAction [\"Heal self (once)\", {\n\tparams [\"_target\", \"\", \"_actionId\"];\n\t_target setDamage 0;\n\t_target removeAction _actionId;\n}];","player addAction [\"Heal self (once)\", {\n\tplayer setDamage 0;\n\tremoveAllActions player;\n}];"]}],"see_also":["actionIDs","actionParams","addAction","setUserActionText","inGameUISetEventHandler","showHUD","inputAction","removeAction","action"]},{"name":"removeAllAssignedItems","title":"removeAllAssignedItems","type":"command","url":"https://community.bistudio.com/wiki/removeAllAssignedItems","revid":352419,"updated":"2024-02-09T15:26:08Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Unassigns and deletes all linked items from inventory.\nThe commands operates on assignedItems array, which does not include goggles or headgear but includes binoculars, which is a weapon.\nUse removeGoggles and removeHeadgear for those.","syntaxes":[{"syntax":"removeAllAssignedItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}},{"syntax":"removeAllAssignedItems [unit, allItems, includeBinocs]","since":"arma3 2.14","params":[{"name":"unit","type":"Object","description":"soldier","type_expr":"Object"},{"name":"allItems","type":"Boolean","description":"true to include all slot items, false exclude goggles and headgear","type_expr":"Boolean"},{"name":"includeBinocs","type":"Boolean","description":"true to include binoculars (which is a weapon), false to exclude it","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[unit, allItems, includeBinocs]"}}],"examples":[{"code":["removeAllAssignedItems player;"]}],"see_also":["assignedItems","linkItem","unlinkItem","assignItem","unassignItem","addItem","removeItem","removeAllContainers"]},{"name":"removeAllBinocularItems","title":"removeAllBinocularItems","type":"command","url":"https://community.bistudio.com/wiki/removeAllBinocularItems","revid":310163,"updated":"2022-05-05T13:07:56Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","locality":{"argument":"local","effect":"global"},"description":"Removes all items from binocular weapon, except magazine.","syntaxes":[{"syntax":"removeAllBinocularItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeAllBinocularItems player;"]}],"see_also":["addBinocularItem","removeBinocularItem","removeAllPrimaryWeaponItems","removeAllSecondaryWeaponItems","removeAllHandgunItems"]},{"name":"removeAllContainers","title":"removeAllContainers","type":"command","url":"https://community.bistudio.com/wiki/removeAllContainers","revid":338829,"updated":"2023-04-10T10:24:35Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Removes all containers (vest, uniform, backpack) from the provided unit.","syntaxes":[{"syntax":"removeAllContainers unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeAllContainers player;"]}],"see_also":["removeAllAssignedItems","removeGoggles","removeHeadgear","removeItem","removeItems","removeUniform","removeVest"]},{"name":"removeAllCuratorAddons","title":"removeAllCuratorAddons","type":"command","url":"https://community.bistudio.com/wiki/removeAllCuratorAddons","revid":348433,"updated":"2023-11-08T13:00:12Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Restrict access to all addons for given curator.","syntaxes":[{"syntax":"removeAllCuratorAddons curatorObj","params":[{"name":"curatorObj","type":"Object","description":"curator module","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"curatorObj"}}],"examples":[{"code":["removeAllCuratorAddons myCurator;"]}],"see_also":["Arma 3: Curator","addCuratorAddons","removeAllCuratorAddons","curatorAddons"]},{"name":"removeAllCuratorCameraAreas","title":"removeAllCuratorCameraAreas","type":"command","url":"https://community.bistudio.com/wiki/removeAllCuratorCameraAreas","revid":348361,"updated":"2023-11-08T12:59:53Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Delete all curator camera areas.","syntaxes":[{"syntax":"removeAllCuratorCameraAreas curatorObj","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"curatorObj"}}],"examples":[{"code":["removeAllCuratorCameraAreas myCurator;"]}],"see_also":["Arma 3: Curator","addCuratorCameraArea","removeCuratorCameraArea","curatorCameraArea"]},{"name":"removeAllCuratorEditingAreas","title":"removeAllCuratorEditingAreas","type":"command","url":"https://community.bistudio.com/wiki/removeAllCuratorEditingAreas","revid":348470,"updated":"2023-11-08T13:00:25Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Delete all curator edit areas.","syntaxes":[{"syntax":"removeAllCuratorEditingAreas curatorObj","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"curatorObj"}}],"examples":[{"code":["removeAllCuratorEditingAreas myCurator;"]}],"see_also":["Arma 3: Curator","addCuratorEditingArea","removeCuratorEditingArea","curatorEditingArea"]},{"name":"removeAllEventHandlers","title":"removeAllEventHandlers","type":"command","url":"https://community.bistudio.com/wiki/removeAllEventHandlers","revid":349140,"updated":"2023-11-08T14:49:47Z","groups":["Event Handlers"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","locality":{"effect":"local"},"description":"Removes all event handlers of given type that were added by addEventHandler **and** resets event handler's creation index to 0.","syntaxes":[{"syntax":"target removeAllEventHandlers handlerType","params":[{"name":"target","type":"Object or Arma 3 v2.10 Group","type_expr":"Object | Group"},{"name":"handlerType","type":"String","description":"see Event Handlers","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"target"},"right":{"text":"handlerType"}}],"examples":[{"code":["player removeAllEventHandlers \"Killed\";"]}],"see_also":["removeEventHandler","addEventHandler","removeMissionEventHandler"]},{"name":"removeAllHandgunItems","title":"removeAllHandgunItems","type":"command","url":"https://community.bistudio.com/wiki/removeAllHandgunItems","revid":310238,"updated":"2022-05-05T13:11:00Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.70"},"since":"arma3 0.70","arma3_since":"0.70","locality":{"argument":"local","effect":"global"},"description":"Removes all items from handgunWeapon, except magazine.","syntaxes":[{"syntax":"removeAllHandgunItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeAllHandgunItems player;"]}],"see_also":["addHandgunItem","removeHandgunItem","removeAllPrimaryWeaponItems","removeAllSecondaryWeaponItems","removeAllBinocularItems"]},{"name":"removeAllItems","title":"removeAllItems","type":"command","url":"https://community.bistudio.com/wiki/removeAllItems","revid":378942,"updated":"2026-08-26T10:51:46Z","groups":["Unit Inventory"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Removes all special items from the unit.","syntaxes":[{"syntax":"removeAllItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeAllItems unitName;"]}],"see_also":["removeAllWeapons","removeMagazines"],"notes":[{"user":"DarkDruid","date":"2013-06-18T15:35:00Z","text":"Arma 3, version 0.70 - removes only items listed by command items."}]},{"name":"removeAllItemsWithMagazines","title":"removeAllItemsWithMagazines","type":"command","url":"https://community.bistudio.com/wiki/removeAllItemsWithMagazines","revid":310275,"updated":"2022-05-05T13:11:22Z","groups":["Unit Inventory","Containers"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Removes all itemsWithMagazines from the uniform, vest and backpack. Command essentially clears all unit's containers.","syntaxes":[{"syntax":"removeAllItemsWithMagazines unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeAllItemsWithMagazines player;"]}],"see_also":["itemsWithMagazines","items"]},{"name":"removeAllMagazines","title":"removeAllMagazines","type":"command","url":"https://community.bistudio.com/wiki/removeAllMagazines","revid":373492,"updated":"2025-05-16T14:39:26Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.20"},"since":"arma3 2.20","arma3_since":"2.20","locality":{"argument":"local","effect":"global"},"description":"Removes all magazines from the unit.","syntaxes":[{"syntax":"removeAllMagazines unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeAllMagazines player;"]}],"see_also":["removeMagazines","addMagazine","magazines","removeMagazine","removeWeapon","removeMagazinesTurret","removeAllMagazinesTurret","removeMagazineTurret","setVehicleAmmo"]},{"name":"removeAllMagazinesTurret","title":"removeAllMagazinesTurret","type":"command","url":"https://community.bistudio.com/wiki/removeAllMagazinesTurret","revid":378391,"updated":"2026-04-04T07:52:47Z","groups":["Turrets"],"status":"ok","games":{"arma3":"2.20"},"since":"arma3 2.20","arma3_since":"2.20","locality":{"argument":"local","effect":"global"},"description":"Removes all magazines from the given turret or from all turrets. Use turret path [-1] for driver's turret or [] for all turrets.","syntaxes":[{"syntax":"vehicle removeAllMagazinesTurret turretPath","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","description":"[-1] for driver's turret or [] for all turrets","type_expr":"Turret Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}}],"examples":[{"code":["vehicle player removeAllMagazinesTurret [-1];"]},{"code":["_tank removeAllMagazinesTurret [];"]}],"see_also":["removeMagazinesTurret","addMagazineTurret","removeAllMagazines","magazinesTurret","removeMagazineTurret","weaponsTurret","addWeaponTurret","removeWeaponTurret","turretLocal"]},{"name":"removeAllMissionEventHandlers","title":"removeAllMissionEventHandlers","type":"command","url":"https://community.bistudio.com/wiki/removeAllMissionEventHandlers","revid":319390,"updated":"2022-05-13T09:23:59Z","groups":["Event Handlers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Removes all mission event handlers of the given type which were added by addMissionEventHandler.\n\n> [!IMPORTANT]\n> Prior to Arma 3 v2.08 this command would also reset the Event Handler creation index to 0.","syntaxes":[{"syntax":"removeAllMissionEventHandlers type","params":[{"name":"type","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"type"}}],"examples":[{"code":["removeAllMissionEventHandlers \"Loaded\";"]}],"see_also":["removeMissionEventHandler","addMissionEventHandler"]},{"name":"removeAllMPEventHandlers","title":"removeAllMPEventHandlers","type":"command","url":"https://community.bistudio.com/wiki/removeAllMPEventHandlers","revid":321196,"updated":"2022-05-13T15:24:42Z","groups":["Multiplayer"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes all MP event handlers of the given type which were added by addMPEventHandler. Command needs to be executed only on one PC for MP event handler to be removed globally.","syntaxes":[{"syntax":"objectName removeAllMPEventHandlers event","params":[{"name":"objectName","type":"Object","type_expr":"Object"},{"name":"event","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"objectName"},"right":{"text":"event"}}],"examples":[{"code":["player removeAllMPEventHandlers \"MPKilled\";"]}],"see_also":["addMPEventHandler","removeMPEventHandler"]},{"name":"removeAllMusicEventHandlers","title":"removeAllMusicEventHandlers","type":"command","url":"https://community.bistudio.com/wiki/removeAllMusicEventHandlers","revid":322941,"updated":"2022-06-28T21:42:45Z","groups":["Event Handlers","Sounds"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Removes all music track event handlers of given type.","syntaxes":[{"syntax":"removeAllMusicEventHandlers type","params":[{"name":"type","type":"String","description":"\"MusicStart\" or \"MusicStop\"","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"type"}}],"examples":[{"code":["removeAllMusicEventHandlers \"MusicStart\";"]},{"code":["removeAllMusicEventHandlers \"MusicStop\";"]}],"see_also":["addMusicEventHandler","setMusicEventHandler","removeMusicEventHandler","playMusic"]},{"name":"removeAllOwnedMines","title":"removeAllOwnedMines","type":"command","url":"https://community.bistudio.com/wiki/removeAllOwnedMines","revid":310204,"updated":"2022-05-05T13:10:41Z","groups":["Mines"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Removes ownership of all owned mines/explosive devices of the given unit","syntaxes":[{"syntax":"removeAllOwnedMines unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeAllOwnedMines player;"]}],"see_also":["allMines","createMine","detectedMines","mineActive","removeOwnedMine","addOwnedMine"]},{"name":"removeAllPrimaryWeaponItems","title":"removeAllPrimaryWeaponItems","type":"command","url":"https://community.bistudio.com/wiki/removeAllPrimaryWeaponItems","revid":310215,"updated":"2022-05-05T13:10:44Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.70"},"since":"arma3 0.70","arma3_since":"0.70","locality":{"argument":"local","effect":"global"},"description":"Removes all items from primaryWeapon, except magazine.","syntaxes":[{"syntax":"removeAllPrimaryWeaponItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeAllPrimaryWeaponItems player;"]}],"see_also":["addPrimaryWeaponItem","removePrimaryWeaponItem","removeAllSecondaryWeaponItems","removeAllHandgunItems","removeAllBinocularItems"]},{"name":"removeAllSecondaryWeaponItems","title":"removeAllSecondaryWeaponItems","type":"command","url":"https://community.bistudio.com/wiki/removeAllSecondaryWeaponItems","revid":310170,"updated":"2022-05-05T13:10:24Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","locality":{"argument":"local","effect":"global"},"description":"Removes all items from secondaryWeapon, except magazine.","syntaxes":[{"syntax":"removeAllSecondaryWeaponItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeAllSecondaryWeaponItems player;"]}],"see_also":["addSecondaryWeaponItem","removeSecondaryWeaponItem","removeAllPrimaryWeaponItems","removeAllHandgunItems","removeAllBinocularItems"]},{"name":"removeAllUserActionEventHandlers","title":"removeAllUserActionEventHandlers","type":"command","url":"https://community.bistudio.com/wiki/removeAllUserActionEventHandlers","revid":322842,"updated":"2022-06-27T07:33:49Z","groups":["Event Handlers"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"effect":"local"},"description":"Removes all UserAction event handlers of the given type which were added by addUserActionEventHandler.\n\n> [!IMPORTANT]\n> This command also resets the Event Handler creation index to 0.","syntaxes":[{"syntax":"removeAllUserActionEventHandlers [keyName, eventType]","params":[{"name":"keyName","type":"String","description":"see inputAction/actions","type_expr":"String"},{"name":"eventType","type":"String","description":"event name; see UserAction Event Handlers. Can be one of:\n\n- \"Activate\"\n- \"Deactivate\"\n- \"Analog\"","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[keyName, eventType]"}}],"examples":[{"code":["removeAllUserActionEventHandlers [\"Reload\", \"Activate\"];"]}],"see_also":["addUserActionEventHandler","removeUserActionEventHandler","Arma 3: Event Handlers"]},{"name":"removeAllWeapons","title":"removeAllWeapons","type":"command","url":"https://community.bistudio.com/wiki/removeAllWeapons","revid":352410,"updated":"2024-02-09T15:16:20Z","groups":["Unit Inventory"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Removes all weapons and magazines from the given unit. Does not remove items like map, compass, radio (see removeWeapon for this).\n\n> [!NOTE]\n> Does not quite work with vehicles. If you need to remove all weapons from a vehicle, remove each weapon individually (see removeWeapon).","syntaxes":[{"syntax":"removeAllWeapons unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeAllWeapons player;"]}],"see_also":["removeWeapon","setVehicleAmmo","clearWeaponCargo","clearMagazineCargo","removeAllItems","removeBackpack"]},{"name":"removeBackpack","title":"removeBackpack","type":"command","url":"https://community.bistudio.com/wiki/removeBackpack","revid":319442,"updated":"2022-05-13T09:24:04Z","groups":["Containers"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Removes unit's backpack","syntaxes":[{"syntax":"removeBackpack unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeBackpack this;"]},{"code":["removeBackpack mySoldierDude;"]}],"see_also":["removeBackpackGlobal","backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack"]},{"name":"removeBackpackGlobal","title":"removeBackpackGlobal","type":"command","url":"https://community.bistudio.com/wiki/removeBackpackGlobal","revid":379367,"updated":"2026-10-30T23:57:04Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global","effect":"global"},"description":"Removes backpack from a unit. (even non-local)","syntaxes":[{"syntax":"removeBackpackGlobal unit","params":[{"name":"unit","type":"Object","description":"soldier","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeBackpackGlobal player;"]}],"see_also":["removeBackpack","backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack"],"notes":[{"user":"Nelis75733126","date":"2016-05-08T18:00:00Z","text":"Because of AG (Arguments Global), you can use this command to remove the backpack from UNITS that are local as well as REMOTE.\n\n```sqf\nremoveBackpackGlobal UNIT;\n```\n\nwhere UNIT can be a local and/or REMOTE player and/or AI"}]},{"name":"removeBinocularItem","title":"removeBinocularItem","type":"command","url":"https://community.bistudio.com/wiki/removeBinocularItem","revid":310306,"updated":"2022-05-05T13:24:30Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","locality":{"argument":"local","effect":"global"},"description":"Removes given weapon item, including magazine, from the binocular weapon.","syntaxes":[{"syntax":"unit removeBinocularItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player removeBinocularItem \"Laserbatteries\";"]}],"see_also":["addBinocularItem","binocularItems","removeAllBinocularItems","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeHandgunItem"]},{"name":"removeCuratorAddons","title":"removeCuratorAddons","type":"command","url":"https://community.bistudio.com/wiki/removeCuratorAddons","revid":377139,"updated":"2026-01-01T10:30:26Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Restrict curator use of given addons.","syntaxes":[{"syntax":"curatorObj removeCuratorAddons addons","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"},{"name":"addons","type":"Array of Strings","type_expr":"Array<String>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"addons"}}],"examples":[{"code":["curatorModule removeCuratorAddons [addon1, addon2];"]}],"see_also":["Arma 3: Curator","addCuratorAddons","removeAllCuratorAddons","curatorAddons"]},{"name":"removeCuratorCameraArea","title":"removeCuratorCameraArea","type":"command","url":"https://community.bistudio.com/wiki/removeCuratorCameraArea","revid":348426,"updated":"2023-11-08T13:00:09Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Removes curator camera area.","syntaxes":[{"syntax":"curatorObj removeCuratorCameraArea cameraAreaID","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"},{"name":"cameraAreaID","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"cameraAreaID"}}],"examples":[{"code":["myCurator removeCuratorCameraArea 3;"]}],"see_also":["Arma 3: Curator","addCuratorCameraArea","removeAllCuratorCameraAreas","curatorCameraArea"]},{"name":"removeCuratorEditableObjects","title":"removeCuratorEditableObjects","type":"command","url":"https://community.bistudio.com/wiki/removeCuratorEditableObjects","revid":377069,"updated":"2026-01-01T09:30:27Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Unregister objects which can be edited by a curator.","syntaxes":[{"syntax":"curatorObj removeCuratorEditableObjects [objects, removeCrew]","params":[{"name":"curatorObj","type":"Object","description":"curator module","type_expr":"Object"},{"name":"objects","type":"Array of Objects","type_expr":"Array<Object>"},{"name":"removeCrew","type":"Boolean","optional":true,"default":"true","type_expr":"Boolean","text":"removeCrew: Boolean - (Optional, default true)"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"[objects, removeCrew]"}}],"examples":[{"code":["curatorModule removeCuratorEditableObjects [[cursorTarget], true];"]}],"see_also":["Arma 3: Curator","addCuratorEditableObjects","curatorEditableObjects"]},{"name":"removeCuratorEditingArea","title":"removeCuratorEditingArea","type":"command","url":"https://community.bistudio.com/wiki/removeCuratorEditingArea","revid":348385,"updated":"2023-11-08T12:59:59Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Removes editing area for given curator.","syntaxes":[{"syntax":"curatorObj removeCuratorEditingArea editAreaID","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"},{"name":"editAreaID","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"editAreaID"}}],"examples":[{"code":["myCurator removeCuratorEditingArea 3;"]}],"see_also":["Arma 3: Curator","addCuratorAddons","removeAllCuratorAddons","curatorAddons"]},{"name":"removeDiaryRecord","title":"removeDiaryRecord","type":"command","url":"https://community.bistudio.com/wiki/removeDiaryRecord","revid":340844,"updated":"2023-05-10T15:17:04Z","groups":["Briefing"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","locality":{"effect":"local"},"description":"Remove a log record.","syntaxes":[{"syntax":"unit removeDiaryRecord [subject, diaryRecord]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"subject","type":"String","type_expr":"String"},{"name":"diaryRecord","type":"Diary Record","type_expr":"Diary Record"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[subject, diaryRecord]"}}],"examples":[{"code":["private _diaryRecord = player createDiaryRecord [\"Diary\", [\"Subject\", \"Text\"]];\n// ...\nplayer removeDiaryRecord [\"Diary\", _diaryRecord];"]}],"see_also":["createDiaryRecord","removeDiarySubject"]},{"name":"removeDiarySubject","title":"removeDiarySubject","type":"command","url":"https://community.bistudio.com/wiki/removeDiarySubject","revid":309156,"updated":"2022-05-03T14:17:34Z","groups":["Briefing"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","locality":{"effect":"local"},"description":"Removes a page and all its subjects from the Diary.","syntaxes":[{"syntax":"player removeDiarySubject diaryPage","params":[{"name":"player","type":"Object","type_expr":"Object"},{"name":"diaryPage","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"player"},"right":{"text":"diaryPage"}}],"examples":[{"code":["player removeDiarySubject \"myPage\";"]}],"see_also":["createDiarySubject","diarySubjectExists","selectDiarySubject","removeDiaryRecord","allDiarySubjects"]},{"name":"removeDrawIcon","title":"removeDrawIcon","type":"command","url":"https://community.bistudio.com/wiki/removeDrawIcon","revid":363580,"updated":"2024-04-07T14:47:33Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Removes an icon for an editor object.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map removeDrawIcon [object, string identifier]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"object","type":"Object","type_expr":"Object"},{"name":"string identifier","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[object, string identifier]"}}],"examples":[{"text":"-"}]},{"name":"removeDrawLinks","title":"removeDrawLinks","type":"command","url":"https://community.bistudio.com/wiki/removeDrawLinks","revid":363290,"updated":"2024-03-26T10:51:58Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Remove all drawn links for the given editor object for the given editor,object type. Pass an empty string as param type to remove all draw,links for an object.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map removeDrawLinks [from,param type]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"[from,param type]","type":"Array","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[from,param type]"}}],"examples":[{"text":"-"}]},{"name":"removeEventHandler","title":"removeEventHandler","type":"command","url":"https://community.bistudio.com/wiki/removeEventHandler","revid":369196,"updated":"2024-09-03T10:34:47Z","groups":["Event Handlers"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Removes a given Event Handler that was added with addEventHandler.","syntaxes":[{"syntax":"target removeEventHandler [type, index]","params":[{"name":"target","type":"Object or Arma 3 v2.10 Group","type_expr":"Object | Group"},{"name":"type","type":"String","description":"see Event Handlers for the full list of available options","type_expr":"String"},{"name":"index","type":"Number","description":"the value originally returned by addEventHandler","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"target"},"right":{"text":"[type, index]"}}],"examples":[{"code":["player removeEventHandler [\"Killed\", 0];"]},{"text":"The Magic Variables `_thisEvent` and `_thisEventHandler` can be used to easily remove an Event Handler:\n\n```sqf\nplayer addEventHandler [\"FiredNear\", {\n    systemChat \"This Event Handler is now removing itself!\";\n    player removeEventHandler [_thisEvent, _thisEventHandler];\n}];\n```","code":["player addEventHandler [\"FiredNear\", {\n\tsystemChat \"This Event Handler is now removing itself!\";\n\tplayer removeEventHandler [_thisEvent, _thisEventHandler];\n}];"]}],"see_also":["addEventHandler","removeAllEventHandlers","removeMPEventHandler","removeMissionEventHandler"]},{"name":"removeFromRemainsCollector","title":"removeFromRemainsCollector","type":"command","url":"https://community.bistudio.com/wiki/removeFromRemainsCollector","revid":377097,"updated":"2026-01-01T09:56:53Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global","effect":"global"},"description":"Removes vehicles/units from the garbage collector, so they do not get deleted automatically; added earlier with addToRemainsCollector.","syntaxes":[{"syntax":"removeFromRemainsCollector remains","params":[{"name":"remains","type":"Array of Objects","type_expr":"Array<Object>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"remains"}}],"examples":[{"code":["removeFromRemainsCollector [unit1, unit2, vehicle1];"]}],"see_also":["addToRemainsCollector","isInRemainsCollector","diag_remainsCollector"]},{"name":"removeGoggles","title":"removeGoggles","type":"command","url":"https://community.bistudio.com/wiki/removeGoggles","revid":309949,"updated":"2022-05-05T12:17:00Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes goggles from unit (diver goggles for example). This command does not remove NVGoggles. Use unassignItem and removeItem or just unlinkItem for latter.","syntaxes":[{"syntax":"removeGoggles unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeGoggles assaultDiver;"]}],"see_also":["goggles","addGoggles"]},{"name":"removeGroupIcon","title":"removeGroupIcon","type":"command","url":"https://community.bistudio.com/wiki/removeGroupIcon","revid":363186,"updated":"2024-03-25T09:04:50Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Remove icon with given ID from group.","syntaxes":[{"syntax":"group removeGroupIcon iconID","params":[{"name":"group","type":"Group","type_expr":"Group"},{"name":"iconID","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"iconID"}}],"examples":[{"code":["_target removeGroupIcon (_target getVariable \"hc_attackicon\");"]}],"see_also":["addGroupIcon","clearGroupIcons","getGroupIcon","getGroupIconParams","groupIconSelectable","groupIconsVisible","onGroupIconClick","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible"]},{"name":"removeHandgunItem","title":"removeHandgunItem","type":"command","url":"https://community.bistudio.com/wiki/removeHandgunItem","revid":348319,"updated":"2023-11-08T12:59:40Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.70"},"since":"arma3 0.70","arma3_since":"0.70","locality":{"argument":"local","effect":"global"},"description":"Removes given weapon item, including magazine, from the handgunWeapon","syntaxes":[{"syntax":"unit removeHandgunItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","description":"config class","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player removeHandgunItem \"muzzle_snds_L\";"]}],"see_also":["addHandgunItem","removeAllHandgunItems","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeBinocularItem"]},{"name":"removeHeadgear","title":"removeHeadgear","type":"command","url":"https://community.bistudio.com/wiki/removeHeadgear","revid":379368,"updated":"2026-10-30T23:57:12Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes headgear from a unit. If unit has no headgear command quietly fails.","syntaxes":[{"syntax":"removeHeadgear unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeHeadgear player;"]}],"see_also":["headgear","addHeadgear"],"notes":[{"user":"Lucky44","date":"2016-08-05T16:08:00Z","text":"To clarify, this command effectively DELETES the headgear. It does not simply remove it from unit's head and move it into inventory."}]},{"name":"removeItem","title":"removeItem","type":"command","url":"https://community.bistudio.com/wiki/removeItem","revid":351753,"updated":"2024-01-03T10:47:47Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes item from the inventory. The removal order by containers is uniform → vest → backpack.","syntaxes":[{"syntax":"unit removeItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["bluforUnit unassignItem \"NVGoggles\";\nbluforUnit removeItem \"NVGoggles\";\nopforUnit unassignItem \"NVGoggles_OPFOR\";\nopforUnit removeItem \"NVGoggles_OPFOR\";\nindependentUnit unassignItem \"NVGoggles_INDEP\";\nindependentUnit removeItem \"NVGoggles_INDEP\";"]}],"see_also":["removeItems","unassignItem","addItem","assignItem","assignedItems","linkItem","unlinkItem","removeAllAssignedItems"]},{"name":"removeItemFromBackpack","title":"removeItemFromBackpack","type":"command","url":"https://community.bistudio.com/wiki/removeItemFromBackpack","revid":319517,"updated":"2022-05-13T09:24:13Z","groups":["Containers"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","locality":{"argument":"global","effect":"global"},"description":"Removes item from soldier's backpack.","syntaxes":[{"syntax":"unit removeItemFromBackpack item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player removeItemFromBackpack \"itemGPS\";"]}],"see_also":["removeItemFromUniform","removeItemFromVest","removeItemFromPrimaryWeapon","backpackContainer","firstBackpack","unitBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","everyBackpack"]},{"name":"removeItemFromUniform","title":"removeItemFromUniform","type":"command","url":"https://community.bistudio.com/wiki/removeItemFromUniform","revid":376273,"updated":"2025-09-23T06:13:21Z","groups":["Containers"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","locality":{"argument":"global","effect":"global"},"description":"Removes item from soldier's uniform. Can be used with magazines and weapons too.","syntaxes":[{"syntax":"unit removeItemFromUniform item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player removeItemFromUniform \"FirstAidKit\";"]}],"see_also":["addItemToUniform","removeItemFromVest","removeItemFromBackpack","removeItemFromPrimaryWeapon"]},{"name":"removeItemFromVest","title":"removeItemFromVest","type":"command","url":"https://community.bistudio.com/wiki/removeItemFromVest","revid":376274,"updated":"2025-09-23T06:13:45Z","groups":["Containers"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","locality":{"argument":"global","effect":"global"},"description":"Removes item from soldier's vest.","syntaxes":[{"syntax":"unit removeItemFromVest item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player removeItemFromVest \"itemWatch\";"]}],"see_also":["addItemToVest","removeItemFromUniform","removeItemFromBackpack","removeItemFromPrimaryWeapon"]},{"name":"removeItems","title":"removeItems","type":"command","url":"https://community.bistudio.com/wiki/removeItems","revid":319499,"updated":"2022-05-13T09:24:12Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes all items with given class name from the inventory.","syntaxes":[{"syntax":"unit removeItems item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player removeItems \"FirstAidKit\";"]}],"see_also":["removeItem","removeAllAssignedItems","unassignItem","assignItem","assignedItems","addItem","linkItem","unlinkItem"]},{"name":"removeMagazine","title":"removeMagazine","type":"command","url":"https://community.bistudio.com/wiki/removeMagazine","revid":370164,"updated":"2024-11-02T23:35:39Z","groups":["Unit Inventory"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local"},"description":"Remove magazine from the unit or static weapon.","syntaxes":[{"syntax":"unitName removeMagazine magazineName","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"magazineName","type":"String","description":"see weapons","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"magazineName"}}],"examples":[{"code":["player removeMagazine \"M16\";"]}],"see_also":["removeMagazines","removeWeapon","removeMagazinesTurret","removeMagazineTurret","setVehicleAmmo"]},{"name":"removeMagazineGlobal","title":"removeMagazineGlobal","type":"command","url":"https://community.bistudio.com/wiki/removeMagazineGlobal","revid":319326,"updated":"2022-05-13T09:23:53Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.76"},"since":"arma3 0.76","arma3_since":"0.76","locality":{"argument":"global","effect":"global"},"description":"Removes the magazine from the unit.","syntaxes":[{"syntax":"unit removeMagazineGlobal magazineName","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"magazineName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"magazineName"}}],"examples":[{"code":["player removeMagazineGlobal \"30Rnd_65x39_caseless_mag\";"]}],"see_also":["removeMagazine","removeMagazines"]},{"name":"removeMagazines","title":"removeMagazines","type":"command","url":"https://community.bistudio.com/wiki/removeMagazines","revid":373502,"updated":"2025-05-18T11:00:18Z","groups":["Unit Inventory"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Removes all magazines of given type from the unit. If magazine class does not exist, nothing happens, not even .rpt message, unlike with addMagazine command.","syntaxes":[{"syntax":"unitName removeMagazines magazineName","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"magazineName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"magazineName"}}],"examples":[{"code":["player removeMagazines \"30Rnd_556x45_Stanag\";"]}],"see_also":["removeAllMagazines","addMagazine","magazines","removeMagazine","removeWeapon","removeMagazinesTurret","removeMagazineTurret","setVehicleAmmo"],"notes":[{"user":"Pyro05x","date":"2007-01-27T03:46:00Z","text":"Though BIS did not provide a command to remove **all** magazines of every type, it can still be accomplished using forEach magazines.\nexample:\n\n```sqf\n{ player removeMagazine _x } forEach magazines player;\n```\n\n**edit:** `removeAllMagazines player;` now exists since Arma 3 v2.20."}]},{"name":"removeMagazinesTurret","title":"removeMagazinesTurret","type":"command","url":"https://community.bistudio.com/wiki/removeMagazinesTurret","revid":377499,"updated":"2026-01-02T06:49:26Z","groups":["Turrets"],"status":"ok","games":{"arma2oa":"1.52","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.52","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Removes all magazines of the given type from given vehicle. Use turret path [-1] for driver's turret.","syntaxes":[{"syntax":"vehicle removeMagazinesTurret [magazineName, turretPath]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"magazineName","type":"String","type_expr":"String"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[magazineName, turretPath]"}}],"examples":[{"code":["vehicle player removeMagazinesTurret [\"60rnd_CMFlareMagazine\", [-1]];"]},{"code":["_tank removeMagazinesTurret [\"20Rnd_120mmSABOT_M1A2\", [0]];"]}],"see_also":["removeAllMagazinesTurret","addMagazineTurret","removeAllMagazines","magazinesTurret","removeMagazineTurret","weaponsTurret","addWeaponTurret","removeWeaponTurret","turretLocal"],"notes":[{"user":"Kylania","date":"2011-07-30T18:42:00Z","text":"Here's how you would remove all machine gun ammo from an M1A2 TUSK:\nremove the gunner's M240 ammo.\n\n```sqf\nthis removeMagazinesTurret [\"1200Rnd_762x51_M240\", [0]];\n```\n\nremove the commander's M2 ammo.\n\n```sqf\nthis removeMagazinesTurret [\"100Rnd_127x99_M2\", [0, 0]];\n```\n\nremove the loader's M240 ammo.\n\n```sqf\nthis removeMagazinesTurret [\"100Rnd_762x51_M240\", [0, 1]];\n```"}]},{"name":"removeMagazineTurret","title":"removeMagazineTurret","type":"command","url":"https://community.bistudio.com/wiki/removeMagazineTurret","revid":377469,"updated":"2026-01-02T06:48:35Z","groups":["Turrets"],"status":"ok","games":{"arma2oa":"1.52","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.52","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Removes the magazine from the turret. Use turret path [-1] for driver's turret.\n\nNote: you may create invalid combinations by using this function. When doing so, application behaviour is undefined.","syntaxes":[{"syntax":"vehicle removeMagazineTurret [magazineName, turretPath]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"magazineName","type":"String","type_expr":"String"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[magazineName, turretPath]"}}],"examples":[{"code":["vehicle player removeMagazineTurret [\"60rnd_cmflaremagazine\",[-1]];"]},{"code":["_tank removeMagazineTurret [\"20Rnd_120mmSABOT_M1A2\",[0]];"]}],"see_also":["addMagazineTurret","magazinesTurret","removeMagazinesTurret","weaponsTurret","addWeaponTurret","removeWeaponTurret","turretLocal","removeMagazine"]},{"name":"removeMenuItem","title":"removeMenuItem","type":"command","url":"https://community.bistudio.com/wiki/removeMenuItem","revid":363243,"updated":"2024-03-26T10:51:18Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Removes a previously added menu item.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map removeMenuItem index","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"index","type":"Number","description":"index of menu item to delete","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"index"}}],"examples":[{"text":"-"}]},{"name":"removeMissionEventHandler","title":"removeMissionEventHandler","type":"command","url":"https://community.bistudio.com/wiki/removeMissionEventHandler","revid":379369,"updated":"2026-10-30T23:57:20Z","groups":["Event Handlers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Removes mission event handler added by addMissionEventHandler.","syntaxes":[{"syntax":"removeMissionEventHandler [type, index]","params":[{"name":"type","type":"String","type_expr":"String"},{"name":"index","type":"Number","description":"index is returned by addMissionEventHandler.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[type, index]"}}],"examples":[{"code":["private _eventHandlerId = addMissionEventHandler [\"Ended\", { diag_log \"mission complete\"; }];\n// ...\nremoveMissionEventHandler [\"Ended\", _eventHandlerId];"]},{"text":"```sqf\nfor \"_i\" from 0 to 4 do {\n    missionNamespace setVariable [format [\"handler%1\",_i], addMissionEventHandler [\"Loaded\",\"hint \"\"_i\"\";\"]];\n};\nremoveMissionEventHandler [\"Loaded\", handler2]; // Remove the third index under type \"Loaded\"\n```","code":["for \"_i\" from 0 to 4 do {\n\tmissionNamespace setVariable [format [\"handler%1\",_i], addMissionEventHandler [\"Loaded\",\"hint \"\"_i\"\";\"]];\n};\nremoveMissionEventHandler [\"Loaded\", handler2]; // Remove the third index under type \"Loaded\""]},{"code":["addMissionEventHandler [\"entityKilled\",{hint \"First kill!\"; removeMissionEventHandler [\"entityKilled\", _thisEventHandler]; }];"]}],"see_also":["addMissionEventHandler","removeAllMissionEventHandlers"],"notes":[{"user":"SilentSpike","date":"2015-08-06T22:02:00Z","text":"As of Arma 3 version 1.38 you can safely remove mission event handlers without worrying about decrementing higher indices.\n**EDIT:** this command used to decrement other EH ids above the deleted one (e.g EH 0,1,2,3, delete EH 1, EH would be 0,1,2 now and not 0,2,3) - Lou Montana (talk) 19:29, 25 June 2020 (CEST)"}]},{"name":"removeMPEventHandler","title":"removeMPEventHandler","type":"command","url":"https://community.bistudio.com/wiki/removeMPEventHandler","revid":364089,"updated":"2024-05-03T19:34:19Z","groups":["Multiplayer","Event Handlers"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes MP event handler added by addMPEventHandler.","syntaxes":[{"syntax":"unitName removeMPEventHandler [event, index]","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"event","type":"String","type_expr":"String"},{"name":"index","type":"Number","description":"index returned by addMPEventHandler","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"[event, index]"}}],"examples":[{"code":["player removeMPEventHandler [\"MPKilled\", 0];"]}],"see_also":["addMPEventHandler","removeAllMPEventHandlers"],"notes":[{"user":".kju","date":"2011-07-25T19:41:00Z","text":"At least for MPKilled it needs to be executed where the target unit is local. The effect (the removal) is global."}]},{"name":"removeMusicEventHandler","title":"removeMusicEventHandler","type":"command","url":"https://community.bistudio.com/wiki/removeMusicEventHandler","revid":369308,"updated":"2024-09-03T18:42:54Z","groups":["Event Handlers","Sounds"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Removes specified music track event handler. See Arma 3: Event Handlers - Music Event Handlers.","syntaxes":[{"syntax":"removeMusicEventHandler [type, id]","params":[{"name":"type","type":"String","description":"\"MusicStart\" or \"MusicStop\"","type_expr":"String"},{"name":"id","type":"Number","description":"event handler id","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[type, id]"}}],"examples":[{"code":["removeMusicEventHandler [\"MusicStart\", 12];"]},{"code":["removeMusicEventHandler [\"MusicStop\", 12];"]},{"code":["private _stopMusicEH = addMusicEventHandler [\"MusicStop\", {}];\n// ...\nremoveMusicEventHandler [\"MusicStop\", _stopMusicEH];"]}],"see_also":["addMusicEventHandler","setMusicEventHandler","removeAllMusicEventHandlers","playMusic"]},{"name":"removeOwnedMine","title":"removeOwnedMine","type":"command","url":"https://community.bistudio.com/wiki/removeOwnedMine","revid":347976,"updated":"2023-11-08T09:47:29Z","groups":["Mines"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Removes ownership over a remotely detonatable mine from the unit.","syntaxes":[{"syntax":"unit removeOwnedMine mine","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"mine","type":"Object","description":"the mine object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"mine"}}],"examples":[{"code":["player removeOwnedMine SuperMine;"]}],"see_also":["allMines","createMine","detectedMines","mineActive","getAllOwnedMines","addOwnedMine","removeAllOwnedMines"]},{"name":"removePrimaryWeaponItem","title":"removePrimaryWeaponItem","type":"command","url":"https://community.bistudio.com/wiki/removePrimaryWeaponItem","revid":347501,"updated":"2023-09-24T01:03:45Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.70"},"since":"arma3 0.70","arma3_since":"0.70","locality":{"argument":"local","effect":"global"},"description":"Removes given weapon item, including magazine, from the primaryWeapon.","syntaxes":[{"syntax":"unit removePrimaryWeaponItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player removePrimaryWeaponItem \"acc_flashlight\";"]}],"see_also":["addPrimaryWeaponItem","removeAllPrimaryWeaponItems","removeSecondaryWeaponItem","removeHandgunItem","removeBinocularItem"]},{"name":"removeSecondaryWeaponItem","title":"removeSecondaryWeaponItem","type":"command","url":"https://community.bistudio.com/wiki/removeSecondaryWeaponItem","revid":319509,"updated":"2022-05-13T09:24:13Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.38"},"since":"arma3 1.38","arma3_since":"1.38","locality":{"argument":"local","effect":"global"},"description":"Removes given weapon item, including magazine, from the secondaryWeapon.","syntaxes":[{"syntax":"unit removeSecondaryWeaponItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player removeSecondaryWeaponItem (secondaryWeaponItems player select 0);"]}],"see_also":["addSecondaryWeaponItem","removePrimaryWeaponItem","removeHandgunItem","removeBinocularItem"]},{"name":"removeSimpleTask","title":"removeSimpleTask","type":"command","url":"https://community.bistudio.com/wiki/removeSimpleTask","revid":353336,"updated":"2024-03-15T17:11:51Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Remove a simple task from the list of simple tasks.\n\n> [!NOTE]\n> If the Task to be removed is a child to some parent task and at the same time the parent to some child task, the child of this task gets orphaned and is listed in the root of Tasks tree (Tasks menu), retaining tree structure of its children.","syntaxes":[{"syntax":"person removeSimpleTask task","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"task"}}],"examples":[{"code":["player removeSimpleTask _tskKillSpongebob;"]}],"see_also":["Tasks","createSimpleTask","setSimpleTaskDescription","setSimpleTaskDestination","setTaskState","setTaskResult","taskState"]},{"name":"removeSwitchableUnit","title":"removeSwitchableUnit","type":"command","url":"https://community.bistudio.com/wiki/removeSwitchableUnit","revid":309935,"updated":"2022-05-05T12:16:59Z","groups":["Team Switch","Multiplayer"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Remove a unit from the list of units available for Team Switch.","syntaxes":[{"syntax":"removeSwitchableUnit unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["removeSwitchableUnit _unit1;"]}],"see_also":["Team Switch","addSwitchableUnit"]},{"name":"removeTeamMember","title":"removeTeamMember","type":"command","url":"https://community.bistudio.com/wiki/removeTeamMember","revid":310128,"updated":"2022-05-05T12:25:41Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Remove given member from given team. Effect is local, unless both member and team are local to PC on which command is executed, then effect is global.","syntaxes":[{"syntax":"team removeTeamMember member","params":[{"name":"team","type":"Team Member","type_expr":"Team Member"},{"name":"member","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"team"},"right":{"text":"member"}}],"examples":[{"code":["_team removeTeamMember _teamMember;"]}],"see_also":["addTeamMember","createTeam","deleteTeam","forEachMemberTeam","teamMember","teamMemberNull","teamName","teams","teamType"]},{"name":"removeUniform","title":"removeUniform","type":"command","url":"https://community.bistudio.com/wiki/removeUniform","revid":310201,"updated":"2022-05-05T13:10:40Z","groups":["Containers","Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes uniform from unit.","syntaxes":[{"syntax":"removeUniform unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeUniform player;"]}],"see_also":["addUniform","forceAddUniform","isUniformAllowed","uniform","removeVest","removeBackpack"]},{"name":"removeUserActionEventHandler","title":"removeUserActionEventHandler","type":"command","url":"https://community.bistudio.com/wiki/removeUserActionEventHandler","revid":364189,"updated":"2024-05-05T10:46:49Z","groups":["Event Handlers"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"effect":"local"},"description":"Removes a UserAction event handler. For a list of available UserAction event handlers, see: Arma 3: Mission Event Handlers.","syntaxes":[{"syntax":"removeUserActionEventHandler [keyName, event, index]","params":[{"name":"keyName","type":"String","description":"action key name; see inputAction/actions","type_expr":"String"},{"name":"event","type":"String","description":"event name - see UserAction Event Handlers. Can be one of:\n\n- \"Activate\"\n- \"Deactivate\"\n- \"Analog\"","type_expr":"String"},{"name":"index","type":"Number","description":"index returned by addUserActionEventHandler","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[keyName, event, index]"}}],"examples":[{"code":["removeUserActionEventHandler [\"Reload\", \"Activate\", _reloadUAEH];"]}],"see_also":["addUserActionEventHandler","removeAllUserActionEventHandlers","Arma 3: Event Handlers"]},{"name":"removeVest","title":"removeVest","type":"command","url":"https://community.bistudio.com/wiki/removeVest","revid":310183,"updated":"2022-05-05T13:10:31Z","groups":["Containers","Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes vest from unit.","syntaxes":[{"syntax":"removeVest unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["removeVest player;"]}],"see_also":["addVest","vest","removeUniform","removeBackpack"]},{"name":"removeWeapon","title":"removeWeapon","type":"command","url":"https://community.bistudio.com/wiki/removeWeapon","revid":376459,"updated":"2025-10-14T22:27:24Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Remove weapon from a unit. The unit must be local to the computer where command is executed.\nFor a global version of this command, see removeWeaponGlobal.\n\n> [!NOTE]\n> It is possible to create invalid combinations with this command (e.g attempting to remove a weapon that a unit does not possess).\n> When doing so, application behaviour is undefined.","syntaxes":[{"syntax":"unit removeWeapon weapon","params":[{"name":"unit","type":"Object","description":"unit or vehicle","type_expr":"Object"},{"name":"weapon","type":"String","description":"weapon class name","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"weapon"}},{"syntax":"object removeWeapon [weapon, autoselect]","since":"arma3 2.20","params":[{"name":"object","type":"Object","description":"unit or vehicle","type_expr":"Object"},{"name":"weapon","type":"String","description":"weapon class name","type_expr":"String"},{"name":"autoselect","type":"String","optional":true,"default":"true","description":"false to abort weapon autoselection when removing primary weapon.","type_expr":"String","text":"autoselect: String - (Optional, default true) false to abort weapon autoselection when removing primary weapon."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[weapon, autoselect]"}}],"examples":[{"code":["player removeWeapon \"BAF_L85A2_RIS_SUSAT\";"]},{"code":["An_2 removeWeapon \"M240_veh\";"]}],"see_also":["removeWeaponGlobal","addWeapon","removeAllWeapons"],"notes":[{"user":"zGuba","date":"2009-05-27T14:30:00Z","text":"CTD may occur in certain conditions: when shooter is AI and is currently shooting at target in some proximity (tested with M136 on ACE 1.08 and Compact Fix 1.14H+). Even \"dropweapon\" action may cause CTD with AI."}]},{"name":"removeWeaponAttachmentCargo","title":"removeWeaponAttachmentCargo","type":"command","url":"https://community.bistudio.com/wiki/removeWeaponAttachmentCargo","revid":352122,"updated":"2024-02-01T23:25:04Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Remove attachment linked to a weapon from the vehicle cargo space.\n\n> [!WARNING]\n> This is unofficial documentation. All Information here is as it exists in the Engine. It might not reflect the reality.","syntaxes":[{"syntax":"object removeWeaponAttachmentCargo [weaponID,creatorID,attachment]","params":[{"name":"object","type":"Object","description":"vehicle or ammo box","type_expr":"Object"},{"name":"weaponID","type":"Number","type_expr":"Number"},{"name":"creatorID","type":"Number","type_expr":"Number"},{"name":"attachment","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[weaponID,creatorID,attachment]"}}],"examples":[{"code":["rearmTruckOne removeWeaponAttachmentCargo [weaponID, creatorID, \"attachment\"];"]}],"see_also":["removeWeaponCargo","weaponAccessoriesCargo"]},{"name":"removeWeaponCargo","title":"removeWeaponCargo","type":"command","url":"https://community.bistudio.com/wiki/removeWeaponCargo","revid":352183,"updated":"2024-02-01T23:25:50Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Remove weapon from the vehicle cargo space.\n\n> [!WARNING]\n> This is unofficial documentation. All Information here is as it exists in the Engine. It might not reflect the reality.","syntaxes":[{"syntax":"object removeWeaponCargo [weaponID,creatorID]","params":[{"name":"object","type":"Object","description":"vehicle or ammo box","type_expr":"Object"},{"name":"weaponID","type":"Number","type_expr":"Number"},{"name":"creatorID","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[weaponID,creatorID]"}}],"examples":[{"code":["rearmTruckOne removeWeaponCargo [19, 1];"]}],"see_also":["removeWeaponAttachmentCargo","weaponAccessoriesCargo"]},{"name":"removeWeaponGlobal","title":"removeWeaponGlobal","type":"command","url":"https://community.bistudio.com/wiki/removeWeaponGlobal","revid":373147,"updated":"2025-04-04T06:15:31Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"arma3":"0.76"},"since":"arma3 0.76","arma3_since":"0.76","locality":{"argument":"global","effect":"global"},"description":"Remove a weapon from a unit. An attempt to remove a weapon, which is not in unit's possession, is simply ignored.","syntaxes":[{"syntax":"unit removeWeaponGlobal weapon","params":[{"name":"unit","type":"Object","description":"unit or vehicle","type_expr":"Object"},{"name":"weapon","type":"String","description":"weapon class name","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"weapon"}},{"syntax":"object removeWeaponGlobal [weapon, autoselect]","since":"arma3 2.20","params":[{"name":"object","type":"Object","description":"unit or vehicle","type_expr":"Object"},{"name":"weapon","type":"String","description":"weapon class name","type_expr":"String"},{"name":"autoselect","type":"String","optional":true,"default":"true","description":"false to abort weapon autoselection when removing primary weapon.","type_expr":"String","text":"autoselect: String - (Optional, default true) false to abort weapon autoselection when removing primary weapon."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[weapon, autoselect]"}}],"examples":[{"text":"```sqf\n{\n    _x removeWeaponGlobal \"Laserdesignator\";\n} forEach allUnits;\n```","code":["{\n\t_x removeWeaponGlobal \"Laserdesignator\";\n} forEach allUnits;"]},{"text":"```sqf\n{\n    if (typeOf _x == \"O_Heli_Attack_02_black_F\") then {\n        _x removeWeaponGlobal \"rockets_Skyfire\";\n    };\n} forEach vehicles;\n```","code":["{\n\tif (typeOf _x == \"O_Heli_Attack_02_black_F\") then {\n\t\t_x removeWeaponGlobal \"rockets_Skyfire\";\n\t};\n} forEach vehicles;"]}],"see_also":["addWeaponGlobal","removeWeapon","removeMagazine","removeMagazineGlobal","removeAllWeapons"]},{"name":"removeWeaponItem","title":"removeWeaponItem","type":"command","url":"https://community.bistudio.com/wiki/removeWeaponItem","revid":376149,"updated":"2025-09-06T17:37:00Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"local","effect":"global"},"description":"Removes magazine from the specified muzzle.\nIt is possible to remove magazine directly from 'Throw' muzzle provided it is configured with `keepInInventory = 0;`.\n\n> [!NOTE]\n> To add such magazine, see addWeaponItem.","syntaxes":[{"syntax":"unit removeWeaponItem [muzzle, magazine]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"muzzle","type":"String","description":"name of the muzzle to add magazine to","type_expr":"String"},{"name":"magazine","type":"String","description":"class name of the magazine to remove","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[muzzle, magazine]"}}],"examples":[{"code":["player removeWeaponItem [\"arifle_MX_GL_ACO_F\", \"1Rnd_HE_Grenade_shell\"];"]}],"see_also":["addWeaponItem","addPrimaryWeaponItem","addSecondaryWeaponItem","addHandgunItem","addBinocularItem","weaponsItems","handgunItems","primaryWeaponItems","secondaryWeaponItems","binocularItems","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeHandgunItem","removeBinocularItem"]},{"name":"removeWeaponTurret","title":"removeWeaponTurret","type":"command","url":"https://community.bistudio.com/wiki/removeWeaponTurret","revid":377481,"updated":"2026-01-02T06:48:57Z","groups":["Turrets"],"status":"ok","games":{"arma3":"1.32","arma2oa":"1.64"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"local","effect":"global"},"description":"Removes weapon from the turret. Use turret path [-1] for driver's turret.","syntaxes":[{"syntax":"vehicle removeWeaponTurret [weaponName, turretPath]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"weaponName","type":"String","type_expr":"String"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[weaponName, turretPath]"}}],"examples":[{"code":["_tank removeWeaponTurret [\"LMG_M200\", [0,0]];"]},{"code":["vehicle player removeWeaponTurret [\"SportCarHorn\", [-1]];"]}],"see_also":["addWeaponTurret","turretLocal","addMagazineTurret","magazinesTurret","removeMagazinesTurret","removeMagazineTurret","weaponsTurret","currentMagazineDetailTurret","currentMagazineTurret","currentWeaponTurret","selectWeaponTurret"]},{"name":"reportRemoteTarget","title":"reportRemoteTarget","type":"command","url":"https://community.bistudio.com/wiki/reportRemoteTarget","revid":310923,"updated":"2022-05-07T20:45:37Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local"},"description":"Shares the target vehicle via datalink to the Side center for a given time.","syntaxes":[{"syntax":"side reportRemoteTarget [target, time]","params":[{"name":"side","type":"Side","type_expr":"Side"},{"name":"target","type":"Object","type_expr":"Object"},{"name":"time","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"side"},"right":{"text":"[target, time]"}}],"examples":[{"code":["blufor reportRemoteTarget [vehicle player, 60];"]}],"see_also":["setVehicleRadar","vehicleReportRemoteTargets","setVehicleReportRemoteTargets","vehicleReceiveRemoteTargets","setVehicleReceiveRemoteTargets","vehicleReportOwnPosition","setVehicleReportOwnPosition"],"notes":[{"user":"Freddo3000","date":"2021-02-14T11:05:00Z","text":"This command cannot be used on projectiles, such as IR Grenades."}]},{"name":"requiredVersion","title":"requiredVersion","type":"command","url":"https://community.bistudio.com/wiki/requiredVersion","revid":379459,"updated":"2026-10-31T00:09:20Z","groups":["System"],"status":"ok","games":{"ofp":"1.21","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.21","arma3_since":"0.50","description":"Check if version of application is available. If the current version is older than the required one, a warning message is shown and false is returned.\n\nVersion of format **Major.Minor**, e.g. **1.30**","syntaxes":[{"syntax":"requiredVersion version","params":[{"name":"version","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"version"}}],"examples":[{"code":["if !(requiredVersion \"1.09\") exitWith {};"]}],"see_also":["productVersion","supportInfo"],"notes":[{"user":"Kronzky","date":"2008-03-12T00:00:00Z","text":"If the script contains a command that was introduced *after* the required version, it will still generate a syntax error, even if this test is done at the top of the script (as the whole script is parsed before execution)."}]},{"name":"resetCamShake","title":"resetCamShake","type":"command","url":"https://community.bistudio.com/wiki/resetCamShake","revid":321939,"updated":"2022-05-22T12:55:05Z","groups":["Camera Control"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Stops any ongoing camera shake effects. Does not prevent new effects from being created. To disallow new effects altogether, enableCamShake should be used.","syntaxes":[{"syntax":"resetCamShake","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["resetCamShake;"]}],"see_also":["enableCamShake","addCamShake","setCamShakeDefParams","setCamShakeParams"]},{"name":"resetSubgroupDirection","title":"resetSubgroupDirection","type":"command","url":"https://community.bistudio.com/wiki/resetSubgroupDirection","revid":321292,"updated":"2022-05-13T19:08:11Z","groups":["Groups"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Sets formation direction of a group relative to current direction of the group leader. The group units will change their positions to form new formation if new formation direction is different (approx +/- 15 degrees). Does the same as:\n\n```sqf\n_grp setFormDir getDir leader _grp;\n```","syntaxes":[{"syntax":"resetSubgroupDirection unit","params":[{"name":"unit","type":"Object","description":"any member of the Group","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["resetSubgroupDirection myUnit;"]}],"see_also":["setFormDir","group","leader","formation","formationLeader","formationMembers","formationTask","formationDirection","formationPosition"]},{"name":"resistance","title":"resistance","type":"command","url":"https://community.bistudio.com/wiki/resistance","revid":308939,"updated":"2022-04-18T19:51:00Z","groups":["Sides"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Pre-defined variable for the resistance side.","syntaxes":[{"syntax":"resistance","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (side _unit == resistance) then\n{\n    hint \"This is a resistance unit!\";\n};\n```","code":["if (side _unit == resistance) then\n{\n\thint \"This is a resistance unit!\";\n};"]},{"code":["hint format [\"%1\", resistance]; // Returns \"GUER\""]}],"aliases":["independent"],"see_also":["side","west","east","civilian","sideEmpty","sideAmbientLife"]},{"name":"resize","title":"resize","type":"command","url":"https://community.bistudio.com/wiki/resize","revid":364809,"updated":"2024-06-15T13:16:01Z","groups":["Arrays"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Changes the size of the given array. The command does not return new array, it resizes the source array to the desired number of elements.\nIf the new size is bigger than the current size, the new places are filled with nil. The alternative syntax allows to fill resized positions with a given value. Array and HashMap values are copied.","syntaxes":[{"syntax":"array resize count","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"count","type":"Number","description":"the new array size","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"array"},"right":{"text":"count"}},{"syntax":"array resize [count, fill]","since":"arma3 2.10","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"count","type":"Number","description":"the new array size","type_expr":"Number"},{"name":"fill","type":"Anything","description":"value to fill added positions","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"array"},"right":{"text":"[count, fill]"}}],"examples":[{"code":["_arrayNum = [0,1,2,3,4];\n_arrayNum resize 2; // _arrayNum is now [0, 1]\n_arrayNum resize 5; // _arrayNum is now [0, 1, nil, nil, nil]"]},{"code":["private _array = [0, 1, 2];\n_array resize [5, -1]; // _array is now [0, 1, 2, -1, -1]\n\nprivate _array = [0, 1, 2];\n_array resize [1, -1]; // _array is now [0]\n\nprivate _array = [0, 1, 2];\n_array resize [4, \"something\"]; // _array is now [0, 1, 2, \"something\"]"]}],"see_also":["set","reverse","deleteAt","deleteRange"],"notes":[{"user":"DreadedEntity","date":"2014-11-13T06:26:00Z","text":"Use this number to resize the array to the number of elements desired, not the desired index of the final element.\nresize cannot be used to create a new array."}]},{"name":"resources","title":"resources","type":"command","url":"https://community.bistudio.com/wiki/resources","revid":319310,"updated":"2022-05-13T09:23:51Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Returns the resources of a team member. Results are local to the PC on which command was executed.","syntaxes":[{"syntax":"resources member","params":[{"name":"member","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"Array","type_expr":"Array"},"form":"unary","right":{"text":"member"}}],"examples":[{"code":["resources teamMember _unit;"]}],"see_also":["addResources","deleteResources"]},{"name":"respawnVehicle","title":"respawnVehicle","type":"command","url":"https://community.bistudio.com/wiki/respawnVehicle","revid":379370,"updated":"2026-10-30T23:57:28Z","groups":["Multiplayer"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets vehicle as respawnable in MP game (see Vehicle Respawn). The vehicle will be spawned at the locality and coordinates it was prior to destruction.\nIf respawn type is set to base respawn (type 3) and vehicle respawn marker is provided (respawn_vehicle_SIDEXXX), vehicle will spawn on the marker. The command must be executed where vehicle is local. If the vehicle is in respawn queue, as long as the vehicle is local it should be possible to update params of the respawning vehicle, i.e change delay, disable respawn, etc.","syntaxes":[{"syntax":"vehicle respawnVehicle [respawnDelay, respawnCount, deleteOldWreck, respawnOnServer, respawnFlying, respawnUnit, respawnMode, respawnSide, useRespawnMarkerDir]","params":[{"name":"vehicle","type":"Object","description":"transport","type_expr":"Object"},{"name":"respawnDelay","type":"Number","optional":true,"default":"-1","description":"delay in seconds between respawns. (-1 to use 3DEN vehicle respawn delay or *respawnVehicleDelay* from description.ext)","type_expr":"Number","optional_since":"arma3 2.18","text":"respawnDelay: Number - (Optional since 2.18, default -1) delay in seconds between respawns. (-1 to use 3DEN vehicle respawn delay or *respawnVehicleDelay* from description.ext)"},{"name":"respawnCount","type":"Number","optional":true,"default":"unlimited respawns","description":"how many times to respawn vehicle in total. (since 2.18 -1 unlimited respawns, 0 stop respawning)","type_expr":"Number","text":"respawnCount: Number - (Optional, default unlimited respawns) how many times to respawn vehicle in total. (since 2.18 -1 unlimited respawns, 0 stop respawning)"},{"name":"deleteOldWreck","type":"Boolean","optional":true,"default":"false","description":"deletes old wreck automatically after vehicle respawns","type_expr":"Boolean","since":"arma3 2.18","text":"deleteOldWreck: Boolean - (Optional, default false) - deletes old wreck automatically after vehicle respawns"},{"name":"respawnOnServer","type":"Boolean","optional":true,"default":"false","description":"wreck is always transferred to the server and the new vehicle always respawns on server","type_expr":"Boolean","since":"arma3 2.18","text":"respawnOnServer: Boolean - (Optional, default false) - wreck is always transferred to the server and the new vehicle always respawns on server"},{"name":"respawnFlying","type":"Boolean","optional":true,"default":"false","description":"by default all vehicles placed on the ground, true overrides this","type_expr":"Boolean","since":"arma3 2.18","text":"respawnFlying: Boolean - (Optional, default false) - by default all vehicles placed on the ground, true overrides this"},{"name":"respawnUnit","type":"Object","optional":true,"default":"objNull","description":"unit that would be put in the driver seat after vehicle respawns","type_expr":"Object","since":"arma3 2.18","text":"respawnUnit: Object - (Optional, default objNull) - unit that would be put in the driver seat after vehicle respawns"},{"name":"respawnMode","type":"Number or String","optional":true,"default":"-1","description":"overrides vehicle respawn mode. Available modes are: 2 or \"INSTANT\" and 3 or \"BASE\". -1 use description.ext value.","type_expr":"Number | String","since":"arma3 2.18","text":"respawnMode: Number or String - (Optional, default -1) - overrides vehicle respawn mode. Available modes are: 2 or \"INSTANT\" and 3 or \"BASE\". -1 use description.ext value."},{"name":"respawnSide","type":"Side","optional":true,"default":"typical vehicle side","description":"sets respawn side for the purpouse of selecting respawn marker","type_expr":"Side","since":"arma3 2.18","text":"respawnSide: Side - (Optional, default typical vehicle side) - sets respawn side for the purpouse of selecting respawn marker"},{"name":"useRespawnMarkerDir","type":"Boolean","optional":true,"default":"false","description":"respawn vehicle matches respawn marker direction or the old wreck direction. false - random direction.","type_expr":"Boolean","since":"arma3 2.18","text":"useRespawnMarkerDir: Boolean - (Optional, default false) - respawn vehicle matches respawn marker direction or the old wreck direction. false - random direction."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[respawnDelay, respawnCount, deleteOldWreck, respawnOnServer, respawnFlying, respawnUnit, respawnMode, respawnSide, useRespawnMarkerDir]"}}],"examples":[{"code":["car respawnVehicle [5, 3]; // 'car' will respawn at the predefined marker for the side after 5 seconds. The unit will respawn 3 times."]},{"code":["car respawnVehicle [30]; // 'car' will respawn at the predefined marker for the side after 30 seconds. The unit will respawn an unlimited number of times."]}],"see_also":["Vehicle Respawn","getRespawnVehicleInfo","playerRespawnTime","setPlayerRespawnTime"],"notes":[{"user":"Sy","date":"2007-05-28T14:38:00Z","text":"For this command to work (in MP) you need the appropriate markers in the mission.\nThe markers are...\n\n- \"respawn_vehicle_west\"\n- \"respawn_vehicle_east\"\n- \"respawn_vehicle_guerilla\"\n- \"respawn_vehicle_civilian\"\n\nAlso, by default it will use respawnDelay from the description.ext as mentioned unless you specify\n\n```cpp\nrespawnVehicleDelay = x;\n```\n\nWhere x is delay in seconds.\n\n---\n\nIn Multiplayer the respawned vehicle remains local to the client who was the last driver of the vehicle or the client who was the leader of the last AI driver of the vehicle.\nIf the vehicle has yet to be driven or the AI driver is local to the Server then the respawned vehicle will be local to the Server."}]},{"name":"restartEditorCamera","title":"restartEditorCamera","type":"command","url":"https://community.bistudio.com/wiki/restartEditorCamera","revid":353393,"updated":"2024-03-15T17:12:01Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Restarts the mission editor camera (if it was deleted by a script,for example).\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"restartEditorCamera map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"map"}}],"examples":[{"text":"-"}]},{"name":"reveal","title":"reveal","type":"command","url":"https://community.bistudio.com/wiki/reveal","revid":379460,"updated":"2026-10-31T00:09:28Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Reveals a target to a group. If *toWhom* is a unit, unit's group is considered. If *toWhom* is a vehicle, vehicle commander's group is considered. The knowledge value will be set to the highest level any unit of the revealing side has about the revealed target. If the revealing side has *no* knowledge about the revealed target, the value will be set to 1.\n\n> [!NOTE]\n> The knowledge level can only be increased by this command, not decreased. Use forgetTarget first if you need to decrease value.","syntaxes":[{"syntax":"toWhom reveal target","params":[{"name":"toWhom","type":"Object or Group","description":"which receives revealing information","type_expr":"Object | Group"},{"name":"target","type":"Object","description":"which is revealed","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"toWhom"},"right":{"text":"target"}},{"syntax":"toWhom reveal [target, accuracy]","since":"arma2oa 1.60","params":[{"name":"toWhom","type":"Object or Group","description":"which receives revealing information","type_expr":"Object | Group"},{"name":"target","type":"Object","description":"which is revealed","type_expr":"Object"},{"name":"accuracy","type":"Number","description":"knowledge value, clamped to 0..4 range","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"toWhom"},"right":{"text":"[target, accuracy]"}}],"examples":[{"code":["_soldierOne reveal _soldierTwo; // soldierOne knowsAbout information about soldierTwo is updated"]},{"code":["player reveal cursorObject; // player knowsAbout information about object under cursor is updated"]},{"code":["_soldierOne reveal [_soldierTwo, 1.5];"]}],"multiplayer":"targetKnowledge and knowsAbout information only get updated on the PC where this command was executed.","see_also":["nearTargets","knowsAbout","forgetTarget","ignoreTarget"],"notes":[{"user":"Ceeeb","date":"2007-01-15T00:00:00Z","text":"In **OFP v1.96**, When a target is revealed to a unit, its knowsAbout rating is set to 1, unless it was already more than 1 in which case reveal does nothing. See knowsAbout for more details about knowsAbout ratings and limitations."},{"user":"Doolittle","date":"2008-01-24T00:00:00Z","text":"Use reveal to allow client to *see* a created vehicle faster - the associated menu interaction will become available therefore, like the player has option to get in sooner.\n\n```sqf\n_tank = \"M1A1\" createVehicle (position player);\nplayer reveal _tank;\n// get in user actions become available instantly\n```"},{"user":".kju","date":"2012-01-15T00:00:00Z","text":"The same idea from Doolittle's note applies to beaming of units. If you setPos an unit or a player, reveal (all) nearby objects and vehicles to make the interaction possible a lot quicker."},{"user":".kju","date":"2012-01-15T00:00:00Z","text":"Revealing a targetUnit will also add it to nearTargets database of the given sourceUnit. The quality/detail level of the info depends on the knowsAbout value used with reveal. More detail in the nearTargets page."},{"user":"Killzone_Kid","date":"2014-10-21T15:37:00Z","text":"Units that have been previously subjected to enableSimulation false; or enableSimulationGlobal false; may stay unrecognised for a long time even after simulation was re-enabled, returning objNull as cursorTarget. Force revealing units with reveal command usually solves the problem. For example:\n\n```sqf\n{player reveal _x} forEach allUnits;\n```"}]},{"name":"revealMine","title":"revealMine","type":"command","url":"https://community.bistudio.com/wiki/revealMine","revid":379371,"updated":"2026-10-30T23:57:36Z","groups":["Mines"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Sets given mine as known to the side. (Knowledge about a mine is always shared across all units in a side.)","syntaxes":[{"syntax":"side revealMine mine","params":[{"name":"side","type":"Side","type_expr":"Side"},{"name":"mine","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"side"},"right":{"text":"mine"}}],"examples":[{"code":["west revealMine _mine;"]}],"see_also":["allMines","detectedMines","mineDetectedBy","createMine","mineActive"],"notes":[{"user":"AgentRev","date":"2017-09-10T21:59:00Z","text":"Manual mine detection introduced in A3 v1.76 can be overridden with something like this:\n\n```sqf\n0 spawn\n{\n    while {true} do\n    {\n        if (\"MineDetector\" in items player) then\n        {\n            {\n                if (mineActive _x && !(_x mineDetectedBy playerSide)) then\n                {\n                    playerSide revealMine _x;\n                };\n            } forEach (player nearObjects [\"MineBase\", 10]);\n\n            uiSleep 0.1;\n        }\n        else\n        {\n            uiSleep 3;\n        };\n    };\n};\n```"}]},{"name":"reverse","title":"reverse","type":"command","url":"https://community.bistudio.com/wiki/reverse","revid":377138,"updated":"2026-01-01T10:29:57Z","groups":["Arrays"],"status":"ok","games":{"arma3":"1.24"},"since":"arma3 1.24","arma3_since":"1.24","description":"Reverses given array by reference (modifies the original array, just like resize). The alternative syntax can be used to reverse a ANSI string. If Unicode support is desired, see forceUnicode.","syntaxes":[{"syntax":"reverse array","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"array"}},{"syntax":"reverse string","since":"arma3 2.02","params":[{"name":"string","type":"String","description":"string to be reversed","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"reversed string"},"form":"unary","right":{"text":"string"}}],"examples":[{"code":["_arr = [1,2,3];\nreverse _arr;\nhint str _arr; // [3,2,1]"]},{"code":["_wordArr = toArray \"gateman\";\nreverse _wordArr;\nhint toString _wordArr; // nametag"]},{"code":["reverse \"treboR\"; // Returns \"Robert\""]}],"see_also":["set","resize","select","in","find","toArray","toString","forEach","count","pushBack","pushBackUnique","apply","append","sort","param","params","arrayIntersect","splitString","joinString","forceUnicode"]},{"name":"reversedMouseY","title":"reversedMouseY","type":"command","url":"https://community.bistudio.com/wiki/reversedMouseY","revid":319719,"updated":"2022-05-13T09:24:45Z","groups":["System"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns true if mouse vertical axe is inverted.","syntaxes":[{"syntax":"reversedMouseY","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (reversedMouseY) then { hint \"Dude!\" };"]}],"see_also":["setMousePosition","getMousePosition"]},{"name":"roadAt","title":"roadAt","type":"command","url":"https://community.bistudio.com/wiki/roadAt","revid":377838,"updated":"2026-01-03T04:32:28Z","groups":["Roads and Airports"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","locality":{"argument":"global"},"description":"Returns a road segment containing given position, objNull otherwise. Same as isOnRoad only returns the actual road object instead of boolean.","syntaxes":[{"syntax":"roadAt position","params":[{"name":"position","type":"Object or PositionAGL (especially on bridges) or Arma 3 v2.00 Position2D","description":"array, in which case Z will be automatically deduced as the height of the road surface","type_expr":"Object | PositionAGL | Position2D"}],"returns":{"type":"Object","type_expr":"Object","description":"road segment or objNull"},"form":"unary","right":{"text":"position"}}],"examples":[{"code":["_road = roadAt ASLToAGL getPosASL player;"]},{"code":["_isOnRoad = !isNull roadAt player;"]},{"text":"For detecting bridges, for example:\n\n```sqf\ngetModelInfo (roadAt ASLToAGL getPosASL player); // [\"bridgesea_01_f.p3d\", \"a3\\structures_f_exp\\infrastructure\\bridges\\bridgesea_01_f.p3d\", true]\n```","code":["getModelInfo (roadAt ASLToAGL getPosASL player); // [\"bridgesea_01_f.p3d\", \"a3\\structures_f_exp\\infrastructure\\bridges\\bridgesea_01_f.p3d\", true]"]}],"see_also":["nearRoads","roadsConnectedTo","isOnRoad","surfaceIsWater","getRoadInfo","nearestTerrainObjects"],"notes":[{"user":"OOKexOo","date":"2016-12-30T21:40:00Z","text":"This command does not necessarily return the segment which center is the closest to the given position.\nIn order to get such segment use nearRoads.\n\n```sqf\n_closest_road = (_pos nearRoads 0.1) select 0;\n```"}]},{"name":"roadsConnectedTo","title":"roadsConnectedTo","type":"command","url":"https://community.bistudio.com/wiki/roadsConnectedTo","revid":369200,"updated":"2024-09-03T10:34:49Z","groups":["Roads and Airports"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Find the road segments connected to the given road segment.\n\n> [!IMPORTANT]\n> - Pedestrian roads such as `\"TRAIL\"`s are missing connection information by design, therefore the primary syntax will return empty array for those - use the alternative syntax to return pedestrian roads.\n> - Road connection is not bidirectional; e.g road segment Y can be connected to road segment Z, but road segment Z can lack a connection with road segment Y.","syntaxes":[{"syntax":"roadsConnectedTo roadSegment","params":[{"name":"roadSegment","type":"Object","description":"road segment","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"connected road segments"},"form":"unary","right":{"text":"roadSegment"}},{"syntax":"roadsConnectedTo [roadSegment, extended]","since":"arma3 2.00","params":[{"name":"roadSegment","type":"Object","description":"road segment","type_expr":"Object"},{"name":"extended","type":"Boolean","optional":true,"default":"false","description":"when true, performs a more thorough search on top of base behaviour, slower but returns pedestrian and other missing road segments","type_expr":"Boolean","text":"extended: Boolean - (Optional, default false) when true, performs a more thorough search on top of base behaviour, slower but returns pedestrian and other missing road segments"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"connected road segments"},"form":"unary","right":{"text":"[roadSegment, extended]"}}],"examples":[{"code":["_road = (player nearRoads 50) select 0;\n_connectedRoads = roadsConnectedTo _road;"]},{"code":["_road = (player nearRoads 50) select 0;\n_connectedRoadsIncPedestrian = roadsConnectedTo [_road, true];"]}],"see_also":["nearRoads","isOnRoad","roadAt","surfaceIsWater","getRoadInfo","nearestTerrainObjects"]},{"name":"roleDescription","title":"roleDescription","type":"command","url":"https://community.bistudio.com/wiki/roleDescription","revid":329074,"updated":"2022-07-21T23:46:21Z","groups":["Object Manipulation","Multiplayer"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","description":"Returns unit description set in the editor and visible on role selection screen in multiplayer.","syntaxes":[{"syntax":"roleDescription unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_playerRole = roleDescription player;"]}],"problems":"**Does not** work in single player.","see_also":["name","getPlayerUID","vehicleVarName","worldName","briefingName","missionName","serverName"],"notes":[{"user":"Killzone_Kid","date":"2015-06-29T12:05:00Z","text":"One thing you should know about roles. When switching to units placed in editor on the fly in MP, it could mess up the role of the player. Could be bug, could be intended, but I would not recommend doing this. Create new unit dynamically if you need to switch to. Anyway, if role of the unit is messed up so is roleDescription."},{"user":"Pierre MGI","date":"2017-05-26T01:10:00Z","text":"roleDescription works for playableUnits only. That means not on AI disabled in lobby and not in SP (even for player)."}]},{"name":"ropeAttachedObjects","title":"ropeAttachedObjects","type":"command","url":"https://community.bistudio.com/wiki/ropeAttachedObjects","revid":377098,"updated":"2026-01-01T09:57:17Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns an array of all entities that are attached to the transport with ropes. This command is the opposite of ropeAttachedTo.","syntaxes":[{"syntax":"ropeAttachedObjects ropesOwner","params":[{"name":"ropesOwner","type":"Object","description":"transport from which a single or multiple ropes are originating","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"array of attached entities on ropes"},"form":"unary","right":{"text":"ropesOwner"}}],"examples":[{"code":["_cargoArray = ropeAttachedObjects heli1;"]}],"see_also":["ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachTo","ropeDestroy","ropeLength","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind","setSlingLoad","slingLoadAssistantShown"]},{"name":"ropeAttachedTo","title":"ropeAttachedTo","type":"command","url":"https://community.bistudio.com/wiki/ropeAttachedTo","revid":350037,"updated":"2023-11-20T22:12:04Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns the owner of the first rope - the transport to which other entities are attached with ropes. This command is the opposite of ropeAttachedObjects. To return all owners see ropesAttachedTo.","syntaxes":[{"syntax":"ropeAttachedTo cargo","params":[{"name":"cargo","type":"Object","description":"entity attached to the end of the first rope","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"a transport from which the first rope originates, the rope owner"},"form":"unary","right":{"text":"cargo"}}],"examples":[{"code":["_heli = ropeAttachedTo veh1;"]}],"see_also":["ropesAttachedTo","ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeLength","ropeUnwound","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind","setSlingLoad","slingLoadAssistantShown"]},{"name":"ropeAttachEnabled","title":"ropeAttachEnabled","type":"command","url":"https://community.bistudio.com/wiki/ropeAttachEnabled","revid":309984,"updated":"2022-05-05T12:17:03Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns true if entity can be attached to a rope end.","syntaxes":[{"syntax":"ropeAttachEnabled entity","params":[{"name":"entity","type":"Object","description":"entity to check","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if allowed"},"form":"unary","right":{"text":"entity"}}],"examples":[{"code":["ropeAttachEnabled veh1;"]}],"see_also":["ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeLength","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeCut","ropeEndPosition","ropeUnwind","setSlingLoad","slingLoadAssistantShown"]},{"name":"ropeAttachTo","title":"ropeAttachTo","type":"command","url":"https://community.bistudio.com/wiki/ropeAttachTo","revid":329674,"updated":"2022-08-01T01:24:20Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Attaches entity to the rope end with optional offset. For detach operation use ropeDetach.","syntaxes":[{"syntax":"[entity, toPoint, ropeEndDownVector] ropeAttachTo rope","params":[{"name":"entity","type":"Object","description":"entity to be attached to the end of rope","type_expr":"Object"},{"name":"toPoint","type":"String or Array","optional":true,"description":"position for the rope end, either a memory point String or relative offset Array","type_expr":"String | Array","text":"toPoint: String or Array - (Optional) position for the rope end, either a memory point String or relative offset Array"},{"name":"ropeEndDownVector","type":"String or Array","optional":true,"default":"[0,0,-1]","description":"either a memory point String or relative vector Array. If String is given, then `ropeEndDownVector` is calculated from `toPoint` towards `ropeEndDownVector` memory point","type_expr":"String | Array","text":"ropeEndDownVector: String or Array - (Optional, default [0,0,-1]) either a memory point String or relative vector Array. If String is given, then `ropeEndDownVector` is calculated from `toPoint` towards `ropeEndDownVector` memory point"},{"name":"rope","type":"Object","description":"the rope to which entity will be attached to","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"[entity, toPoint, ropeEndDownVector]"},"right":{"text":"rope"}},{"syntax":"entity ropeAttachTo rope","since":"arma3 2.10","params":[{"name":"entity","type":"Object","description":"entity to be attached to the end of rope","type_expr":"Object"},{"name":"rope","type":"Object","description":"the rope to which entity will be attached to","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"entity"},"right":{"text":"rope"}}],"examples":[{"code":["[veh1, [0,0,0], [0,0,-1]] ropeAttachTo (ropes heli1 select 0);"]}],"see_also":["ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeDestroy","ropeLength","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind","setSlingLoad","slingLoadAssistantShown"]},{"name":"ropeCreate","title":"ropeCreate","type":"command","url":"https://community.bistudio.com/wiki/ropeCreate","revid":377047,"updated":"2026-01-01T08:54:21Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","locality":{"effect":"global"},"description":"Creates a PhysX rope with given params. Since Arma 3 v2.14 the optional arguments can be skipped by setting them to nil.\n\n> [!NOTE]\n> - *fromObject* has to be transport vehicle, alive with rope attachment enabled, *toObject* has to be an entity, alive with rope attachment enabled.\n> - `ropeEndType` is defined in config under `\"CfgNonAIVehicles\" >> \"RopeEnd\"`; see Arma 3: Ropes. Currently this is a hook that will be created on the end of the rope, and `ropeEndDownVector` is its orientation, [0,0,-1] for example. The `\"RopeEnd\"` is only shown when the rope is created object to object, it does not show on the open ended rope for some reason. There is currently no `\"RopeStart\"`.\n> - The rope creation is limited to 63 segments.","syntaxes":[{"syntax":"ropeCreate [fromObject, fromPoint, toObject, toPoint, length, ropeStart, ropeEnd, ropeType, nSegments]","params":[{"name":"fromObject","type":"Object","description":"transport where the rope originates and which fly behavior will be affected","type_expr":"Object"},{"name":"fromPoint","type":"String or Array","description":"position for the rope start, either a memory point String or relative offset Array","type_expr":"String | Array"},{"name":"toObject","type":"Object","description":"entity which is automatically attached to the end of the rope","type_expr":"Object"},{"name":"toPoint","type":"String or Array","description":"position for the rope end, either a memory point String or relative offset Array","type_expr":"String | Array"},{"name":"length","type":"Number","optional":true,"default":"-1","description":"rope length in meters","type_expr":"Number","text":"length: Number - (Optional, default -1) rope length in meters"},{"name":"ropeStart","type":"Array with [ropeStartType, ropeStartDownVector]","optional":true,"default":"[\"\", [0,0,-1]]","description":"ropeStartType: String - type of the rope start (see description)\n- ropeStartDownVector: String or Array, either a memory point String or relative vector Array. If String is given, then `ropeStartDownVector` is calculated from `fromPoint` towards `ropeStartDownVector` memory point","type_expr":"Array","text":"ropeStart: Array with [ropeStartType, ropeStartDownVector] - (Optional, default [\"\", [0,0,-1]])\n\n- ropeStartType: String - type of the rope start (see description)\n- ropeStartDownVector: String or Array, either a memory point String or relative vector Array. If String is given, then `ropeStartDownVector` is calculated from `fromPoint` towards `ropeStartDownVector` memory point"},{"name":"ropeEnd","type":"Array with [ropeEndType, ropeEndDownVector]","optional":true,"default":"[\"\", [0,0,-1]]","description":"ropeEndType: String - type of the rope end (see description)\n- ropeEndDownVector: String or Array, either a memory point String or relative vector Array. If String is given, then `ropeEndDownVector` is calculated from `toPoint` towards `ropeEndDownVector` memory point","type_expr":"Array","text":"ropeEnd: Array with [ropeEndType, ropeEndDownVector] - (Optional, default [\"\", [0,0,-1]]):\n\n- ropeEndType: String - type of the rope end (see description)\n- ropeEndDownVector: String or Array, either a memory point String or relative vector Array. If String is given, then `ropeEndDownVector` is calculated from `toPoint` towards `ropeEndDownVector` memory point"},{"name":"ropeType","type":"String","optional":true,"default":"\"Rope\"","description":"rope type, `CfgVehicles`' classname","type_expr":"String","since":"arma3 2.06","text":"ropeType: String - (Optional, default \"Rope\") - rope type, `CfgVehicles`' classname"},{"name":"nSegments","type":"Number","optional":true,"default":"-1","description":"number of rope segments (max 63)","type_expr":"Number","since":"arma3 2.14","text":"nSegments: Number - (Optional, default -1) - number of rope segments (max 63)"}],"returns":{"type":"Object","type_expr":"Object","description":"created rope or objNull on failure"},"form":"unary","right":{"text":"[fromObject, fromPoint, toObject, toPoint, length, ropeStart, ropeEnd, ropeType, nSegments]"}},{"syntax":"ropeCreate [fromObject, fromPoint, length, ropeStart, ropeEnd, ropeType, nSegments]","params":[{"name":"fromObject","type":"Object","description":"transport where the rope originates and which fly behavior will be affected","type_expr":"Object"},{"name":"fromPoint","type":"String or Array","description":"position for the rope start, either a memory point String or relative offset Array","type_expr":"String | Array"},{"name":"length","type":"Number","description":"rope length in meters","type_expr":"Number"},{"name":"ropeStart","type":"Array with [ropeStartType, ropeStartDownVector]","optional":true,"default":"[\"\", [0,0,-1]]","description":"ropeStartType: String - type of the rope start (see description)\n- ropeStartDownVector: String or Array, either a memory point String or relative vector Array. If String is given, then `ropeStartDownVector` is calculated from `fromPoint` towards `ropeStartDownVector` memory point","type_expr":"Array","text":"ropeStart: Array with [ropeStartType, ropeStartDownVector] - (Optional, default [\"\", [0,0,-1]])\n\n- ropeStartType: String - type of the rope start (see description)\n- ropeStartDownVector: String or Array, either a memory point String or relative vector Array. If String is given, then `ropeStartDownVector` is calculated from `fromPoint` towards `ropeStartDownVector` memory point"},{"name":"ropeEnd","type":"Array with [ropeEndType, ropeEndDownVector]","optional":true,"default":"[\"\", [0,0,-1]]","description":"ropeEndType: String - type of the rope end (see description)\n- ropeEndDownVector: Array - relative vector","type_expr":"Array","text":"ropeEnd: Array with [ropeEndType, ropeEndDownVector] - (Optional, default [\"\", [0,0,-1]])\n\n- ropeEndType: String - type of the rope end (see description)\n- ropeEndDownVector: Array - relative vector"},{"name":"ropeType","type":"String","optional":true,"default":"\"Rope\"","description":"rope type, `CfgVehicles`' classname","type_expr":"String","since":"arma3 2.06","text":"ropeType: String - (Optional, default \"Rope\") - rope type, `CfgVehicles`' classname"},{"name":"nSegments","type":"Number","optional":true,"default":"-1","description":"number of rope segments (max 63)","type_expr":"Number","since":"arma3 2.14","text":"nSegments: Number - (Optional, default -1) - number of rope segments (max 63)"}],"returns":{"type":"Object","type_expr":"Object","description":"created rope or objNull on failure"},"form":"unary","right":{"text":"[fromObject, fromPoint, length, ropeStart, ropeEnd, ropeType, nSegments]"}}],"examples":[{"code":["myRope = ropeCreate [vehicle player, \"slingload0\", myCargo, [0, 0, 0], 10];"]},{"code":["myRope = ropeCreate [veh1, [0, 0, -2], veh2, [0, 0, 0], 10];"]},{"text":"Free end rope (Alt Syntax):\n\n```sqf\nmyRope = ropeCreate [vehicle player, [0, 0, 0], 10];\n```","code":["myRope = ropeCreate [vehicle player, [0, 0, 0], 10];"]},{"text":"A rope with a hook on the end:\n\n```sqf\nmyRope = ropeCreate [heli, \"slingload0\", player, [0, 0, 2], 20, [], [\"RopeEnd\", [0, 0, -1]]];\n```","code":["myRope = ropeCreate [heli, \"slingload0\", player, [0, 0, 2], 20, [], [\"RopeEnd\", [0, 0, -1]]];"]},{"text":"Since 2.14:\n\n```sqf\nmyRope = ropeCreate [vehicle player, [0, 0, 0], 10, nil, nil, nil, 50];\n```","code":["myRope = ropeCreate [vehicle player, [0, 0, 0], 10, nil, nil, nil, 50];"]}],"see_also":["Arma 3: Ropes","ropeDestroy","ropeDetach","ropes","ropeSegments"],"notes":[{"user":"Tajin","date":"2014-11-08T14:57:00Z","text":"Doesn't work well for towing vehicles on the ground.\nTheir wheels don't turn freely and have a LOT of friction. You'll most likely end up flipping the vehicle over if you try to tow it.\n\nAlso note that ropes can be destroyed/cut by shooting at them.\n**Edit:** see setTowParent since Arma 3 v2.06!"},{"user":"Feint","date":"2015-01-04T03:24:00Z","text":"Pay special attention to what is your **fromObject** and what is your **toObject** as this will have an impact on the physics of the rope.\n\n*For example:* If you want to tow an Assault CRRC from a heavier Speedboat Minigun, attach two boats together with a rope. If you drive the Speedboat Minigun and set the CRRC as the fromObject, the rope will have almost no elasticity and the CRRC will yank around as you tow it. However, if you set the CRRC as the toObject, the rope will have more elasticity and will be a little friendlier for the CRRC when you are towing it."},{"user":"Sa-Matra","date":"2024-05-22T04:20:07Z","text":"Following simulations are considered transports by that transport config list:\n\n```sqf\n\"motorcycle\"\n\"car\"\n\"carx\"\n\"tankx\"\n\"airplanex\"\n\"helicopterrtd\"\n\"shipx\"\n\"submarinex\"\n\"paraglide\"\n\"parachute\"\n```\n\nThere could be more but unlisted there, but these should cover majority of the vehicles in all mods."}],"categories_extra":["Introduced with Take On Helicopters version 1.00","Take On Helicopters: New Scripting Commands","Take On Helicopters: Scripting Commands"]},{"name":"ropeCut","title":"ropeCut","type":"command","url":"https://community.bistudio.com/wiki/ropeCut","revid":353360,"updated":"2024-03-15T17:11:55Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Cuts the given rope to the specified length. If some entity was attached to the end of the rope, it will be detached. The rope remains attached to its parent transport and if the length is set to 0 or even negative does not get destroyed. Use ropeDestroy to remove it completely.\n\n> [!NOTE]\n> The rope could only be shortened. If the cut length is greater than current rope length, nothing happens","syntaxes":[{"syntax":"ropeCut [rope, length]","params":[{"name":"rope","type":"Object","description":"rope object obtained from ropeCreate","type_expr":"Object"},{"name":"length","type":"Number","description":"length of the rope in meters after the cut","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[rope, length]"}}],"examples":[{"code":["ropeCut [ropes heli1 select 0, 5];"]}],"see_also":["ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeLength","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeEndPosition","ropeUnwind","setSlingLoad","slingLoadAssistantShown"]},{"name":"ropeDestroy","title":"ropeDestroy","type":"command","url":"https://community.bistudio.com/wiki/ropeDestroy","revid":309944,"updated":"2022-05-05T12:16:59Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Destroys the given rope. If the rope is attached to a vehicle, it will be detached and then destroyed.","syntaxes":[{"syntax":"ropeDestroy rope","params":[{"name":"rope","type":"Object","description":"rope object returned by ropeCreate command","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"rope"}}],"examples":[{"code":["ropeDestroy myRope;"]}],"see_also":["ropeCreate","ropeDetach","ropeSetCargoMass","ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeLength","ropeUnwound","ropeAttachedTo","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind"]},{"name":"ropeDetach","title":"ropeDetach","type":"command","url":"https://community.bistudio.com/wiki/ropeDetach","revid":319665,"updated":"2022-05-13T09:24:40Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Detaches attached object from rope (i.e. detaches rope end from attached to it entity). See ropeAttachTo for attach operation.","syntaxes":[{"syntax":"attachedObject ropeDetach rope","params":[{"name":"attachedObject","type":"Object","description":"entity attached to the end of rope","type_expr":"Object"},{"name":"rope","type":"Object","description":"rope object to which entity is attached","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"attachedObject"},"right":{"text":"rope"}}],"examples":[{"code":["vehicle player ropeDetach myRope;"]}],"see_also":["ropeCreate","ropeDestroy","ropeSetCargoMass","ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeLength","ropeUnwound","ropeAttachedTo","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind"]},{"name":"ropeEndPosition","title":"ropeEndPosition","type":"command","url":"https://community.bistudio.com/wiki/ropeEndPosition","revid":377646,"updated":"2026-01-02T09:01:47Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns start and end positions for the given rope. If command fails, empty array `[]` is returned.","syntaxes":[{"syntax":"ropeEndPosition rope","params":[{"name":"rope","type":"Object","description":"rope object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [startPos, endPos]\n- startPos: PositionAGL - endPos: PositionAGL","text":"Array with [startPos, endPos]\n\n- startPos: PositionAGL\n- endPos: PositionAGL"},"form":"unary","right":{"text":"rope"}}],"examples":[{"code":["_ends = ropeEndPosition (ropes heli1 select 0);\n_start = _ends select 0;\n_end = _ends select 1;"]}],"see_also":["ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeLength","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeUnwind","setSlingLoad","slingLoadAssistantShown"]},{"name":"ropeLength","title":"ropeLength","type":"command","url":"https://community.bistudio.com/wiki/ropeLength","revid":364981,"updated":"2024-07-04T19:58:04Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Return rope length in meters (set by ropeCreate, ropeCut, ropeUnwind).\n\n> [!NOTE]\n> Returned rope length will remain the same, even if the rope is stretched.","syntaxes":[{"syntax":"ropeLength rope","params":[{"name":"rope","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"rope"}}],"examples":[{"code":["_length = ropeLength (ropes heli1 select 0);"]}],"see_also":["ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind","setSlingLoad","slingLoadAssistantShown"],"notes":[{"user":"Sa-Matra","date":"2024-06-08T04:40:02Z","text":"Returns 0 for rope segments. To get length of individual segment, do `vectorMagnitude vectorUpVisual _segment * 0.3`. 0.3 is model height of `RopeSegment`, you can calculate it using boundingBox for other rope types."}]},{"name":"ropes","title":"ropes","type":"command","url":"https://community.bistudio.com/wiki/ropes","revid":340878,"updated":"2023-05-13T21:30:53Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns all ropes attached to a ropes owner transport vehicle.","syntaxes":[{"syntax":"ropes ropesOwner","params":[{"name":"ropesOwner","type":"Object","description":"a transport from which the ropes originate","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"array of the actual rope objects"},"form":"unary","right":{"text":"ropesOwner"}}],"examples":[{"code":["hint str (ropes vehicle player);"]},{"code":["_rope1 = (ropes heli1) select 0;"]}],"see_also":["canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeLength","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind","setSlingLoad","slingLoadAssistantShown"],"notes":[{"user":"Waffle SS.","date":"2014-10-13T02:05:00Z","text":"The ropes command seems to return each individual sling load rope.\nropes will return an empty Array if the sling load ropes are not deployed.\nRopes as of A3 1.33 have a cfgVehicles classname of \"Rope\"."}]},{"name":"ropesAttachedTo","title":"ropesAttachedTo","type":"command","url":"https://community.bistudio.com/wiki/ropesAttachedTo","revid":352477,"updated":"2024-02-11T23:39:44Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns the owners of all ropes attached to the cargo - the transports to which other entities are attached with ropes.","syntaxes":[{"syntax":"ropesAttachedTo cargo","params":[{"name":"cargo","type":"Object","description":"entity attached to the ends of the ropes","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"which are transports from which the ropes originate, the ropes owners","text":"Array of Objects which are transports from which the ropes originate, the ropes owners"},"form":"unary","right":{"text":"cargo"}}],"examples":[{"code":["r1 = ropeCreate [car1, [0,0,0], car3, [0,0,0], 10];\nr2 = ropeCreate [car2, [0,0,0], car3, [0,0,0], 10];\nropesAttachedTo car3; // [car1,car2]"]}],"see_also":["ropeAttachedTo","ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeLength","ropeUnwound","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind","setSlingLoad","slingLoadAssistantShown"]},{"name":"ropeSegments","title":"ropeSegments","type":"command","url":"https://community.bistudio.com/wiki/ropeSegments","revid":364777,"updated":"2024-06-10T12:28:27Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","description":"Returns provided rope's segments.\nArma 3 v2.12 use objectParent to return the rope parent from a rope segment.","syntaxes":[{"syntax":"ropeSegments rope","params":[{"name":"rope","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"the rope's segments"},"form":"unary","right":{"text":"rope"}}],"examples":[{"code":["private _segments = ropeSegments _myRope;"]}],"see_also":["ropeCreate","ropeLength","ropeCut","ropeEndPosition"]},{"name":"ropeUnwind","title":"ropeUnwind","type":"command","url":"https://community.bistudio.com/wiki/ropeUnwind","revid":363666,"updated":"2024-04-14T18:49:41Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","locality":{"argument":"local","effect":"global"},"description":"Increases or decreases the rope length by the given amount. Use relative parameter for changing rope length +/- from current length.\n\n> [!NOTE]\n> Rope length can be in range 0.5..100 metres.","syntaxes":[{"syntax":"ropeUnwind [rope, speed, length, relative]","params":[{"name":"rope","type":"Object","description":"rope object","type_expr":"Object"},{"name":"speed","type":"Number","description":"animation speed in m/s with which to lengthen or shorten the rope, in range 0.01..20","type_expr":"Number"},{"name":"length","type":"Number","description":"the amount of length change in meters, in range: 0.1..100","type_expr":"Number"},{"name":"relative","type":"Boolean","optional":true,"description":"true will add or subtract given length from current rope length, false will resize the rope to the given length","type_expr":"Boolean","text":"relative: Boolean - (Optional) true will add or subtract given length from current rope length, false will resize the rope to the given length"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[rope, speed, length, relative]"}}],"examples":[{"code":["ropeUnwind [ropes heli1 select 0, 3, 10]; // set rope length to 10m at 3m/s"]},{"code":["ropeUnwind [ropes heli1 select 0, 3, -5, true]; // decrease rope length by 5m at 3m/s"]}],"see_also":["ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeLength","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","setSlingLoad","slingLoadAssistantShown"],"notes":[{"user":"Tajin","date":"2014-11-08T15:28:00Z","text":"Unwinding speed is not linear but instead automatically accelerates at the beginning and slows down at the end.\nThe speed also only seems to have no effect when pulling the rope in. (unless the end of the rope is not attached to anything)\nHigh unwinding speeds (over ~250) can cause your cargo to get stuck in midair."}]},{"name":"ropeUnwound","title":"ropeUnwound","type":"command","url":"https://community.bistudio.com/wiki/ropeUnwound","revid":369179,"updated":"2024-09-03T10:34:44Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns false if rope length changing animation is in progress. Returns true if animation is done.","syntaxes":[{"syntax":"ropeUnwound rope","params":[{"name":"rope","type":"Object","description":"given rope object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if unwinding is complete"},"form":"unary","right":{"text":"rope"}}],"examples":[{"code":["waitUntil { ropeUnwound (ropes heli1 select 0) };\nhint \"Unwinding Complete\";"]}],"see_also":["ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeLength","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind","setSlingLoad","slingLoadAssistantShown"]},{"name":"rotorsForcesRTD","title":"rotorsForcesRTD","type":"command","url":"https://community.bistudio.com/wiki/rotorsForcesRTD","revid":377137,"updated":"2026-01-01T10:28:59Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns force produced by rotors.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"rotorsForcesRTD helicopter","params":[{"name":"helicopter","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Array of Numbers","type_expr":"Array<Array<Number>>"},"form":"unary","right":{"text":"helicopter"}}],"examples":[{"code":["_rotorForces = rotorsForcesRTD _taru; // Returns [[-465.981,351.941,45960.5],[-469.079,397.451,46933.3]]"]}],"see_also":["rotorsRpmRTD","weightRTD","wingsForcesRTD","airDensityRTD"],"notes":[{"user":"Benargee","date":"2014-11-04T02:00:00Z","text":"There is no official information I can find on what these values mean. According to my testing on the Mi-290 Taru, here is what I have come up with:\n\n```\n[\n    [rotor 1 roll +right/-left, rotor 1 pitch +down/-up, rotor 1 collective +up/-down],\n    [rotor 2 roll +right/-left, rotor 2 pitch +down/-up, rotor 2 collective +up/-down]\n]\n```\n\nWhen yawing left and right, rotor 1 and 2 collective differ from each other. This is normal behaviour with coaxial rotors. Yawing right increase rotor 1 collective and decreases rotor 2 collective. Yawing left does the opposite. Rotor 1 in this example seems to be the bottom rotor."}]},{"name":"rotorsRpmRTD","title":"rotorsRpmRTD","type":"command","url":"https://community.bistudio.com/wiki/rotorsRpmRTD","revid":377136,"updated":"2026-01-01T10:28:32Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns rotors RPM.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"rotorsRpmRTD RTD_helicopter","params":[{"name":"RTD_helicopter","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"unary","right":{"text":"RTD_helicopter"}}],"examples":[{"code":["_mh9_main = (rotorsRpmRTD _MH9) select 0;//main rotor\n_mh9_tail = (rotorsRpmRTD _MH9) select 1;//tail rotor"]}],"see_also":["rotorsForcesRTD","weightRTD","wingsForcesRTD","airDensityRTD"]},{"name":"round","title":"round","type":"command","url":"https://community.bistudio.com/wiki/round","revid":319690,"updated":"2022-05-13T09:24:42Z","groups":["Math"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Rounds the provided value to the closest integer.","syntaxes":[{"syntax":"round value","params":[{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"value"}}],"examples":[{"code":["round 5.25; // returns 5"]},{"code":["round -5.25; // returns -5"]}],"see_also":["floor","ceil","linearConversion"]},{"name":"runInitScript","title":"runInitScript","type":"command","url":"https://community.bistudio.com/wiki/runInitScript","revid":347552,"updated":"2023-09-28T09:35:18Z","groups":["System"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Fades in mission screen and re-executes init.sqf and init.sqs scripts. In Eden Editor the code inside the \"Init\" mission attribute is executed.","syntaxes":[{"syntax":"runInitScript","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["runInitScript;"]}],"see_also":["Event Scripts"]},{"name":"safeZoneH","title":"safeZoneH","type":"command","url":"https://community.bistudio.com/wiki/safeZoneH","revid":369130,"updated":"2024-09-03T10:34:34Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the height of the screen in screen measurement units.\nTaken from top left corner of the default viewport (0,0) of the screen and going in the same direction as the Y axis, the value will be positive but resulting Y will end up beyond the bottom border.\nTherefore in order to calculate Y of the bottom screen border, the length of safeZoneY must be subtracted from safeZoneH, but because it is negative, it must be added instead.\n`_screenBottomBorderY = safeZoneH + safeZoneY`. The measurement units depend on the current screen resolution getResolution. See also SafeZone.","syntaxes":[{"syntax":"safeZoneH","params":[],"returns":{"type":"Number","type_expr":"Number","description":"height of the screen in screen measurement units"},"form":"nullary"}],"examples":[{"code":["_screenHeight = safeZoneH;"]},{"code":["_screenTopBorderY = safeZoneY;\n_screenBottomBorderY = safeZoneH + safeZoneY;"]},{"text":"Create control 50% wide, 30% tall, centered on screen:\n\n```sqf\nprivate _ctrl = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscText\", -1];\n_ctrl ctrlSetBackgroundColor [1,0,0,0.5];\nprivate _ctrlWidth = 0.5 * safeZoneW; // 50% of screen width\nprivate _ctrlHeight = 0.3 * safeZoneH; // 30% of screen height\n_ctrl ctrlSetPositionW _ctrlWidth;\n_ctrl ctrlSetPositionH _ctrlHeight;\n_ctrl ctrlSetPositionX ((safeZoneW - _ctrlWidth) / 2 + safeZoneX); // center it horizontally\n_ctrl ctrlSetPositionY ((safeZoneH - _ctrlHeight) / 2 + safeZoneY); // center it vertically\n_ctrl ctrlCommit 0;\n```","code":["private _ctrl = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscText\", -1];\n_ctrl ctrlSetBackgroundColor [1,0,0,0.5];\nprivate _ctrlWidth = 0.5 * safeZoneW; // 50% of screen width\nprivate _ctrlHeight = 0.3 * safeZoneH; // 30% of screen height\n_ctrl ctrlSetPositionW _ctrlWidth;\n_ctrl ctrlSetPositionH _ctrlHeight;\n_ctrl ctrlSetPositionX ((safeZoneW - _ctrlWidth) / 2 + safeZoneX); // center it horizontally\n_ctrl ctrlSetPositionY ((safeZoneH - _ctrlHeight) / 2 + safeZoneY); // center it vertically\n_ctrl ctrlCommit 0;"]}],"see_also":["SafeZone","safeZoneX","safeZoneY","safeZoneW","safeZoneXAbs","safeZoneWAbs"]},{"name":"safeZoneW","title":"safeZoneW","type":"command","url":"https://community.bistudio.com/wiki/safeZoneW","revid":349848,"updated":"2023-11-20T22:10:41Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the width of the screen in screen measurement units.\nTaken from top left corner of the default viewport (0,0) of the screen and going in the same direction as the X axis, the value will be positive but resulting X will end up beyond the right border.\nTherefore in order to calculate X of the right screen border, the length of safeZoneX must be subtracted from safeZoneW, but because it is negative, it must be added instead.\n`_screenRightBorderX = safeZoneW + safeZoneX`. The measurement units depend on the current screen resolution getResolution. See also SafeZone.","syntaxes":[{"syntax":"safeZoneW","params":[],"returns":{"type":"Number","type_expr":"Number","description":"screen width in screen measurement units"},"form":"nullary"}],"examples":[{"code":["_screenWidth = safeZoneW;"]},{"code":["_screenLeftBorderX = safeZoneX;\n_screenRightBorderX = safeZoneW + safeZoneX;"]},{"text":"Create control 50% wide, 30% tall, centered on screen:\n\n```sqf\nprivate _ctrl = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscText\", -1];\n_ctrl ctrlSetBackgroundColor [1,0,0,0.5];\nprivate _ctrlWidth = 0.5 * safeZoneW; // 50% of screen width\nprivate _ctrlHeight = 0.3 * safeZoneH; // 30% of screen height\n_ctrl ctrlSetPositionW _ctrlWidth;\n_ctrl ctrlSetPositionH _ctrlHeight;\n_ctrl ctrlSetPositionX ((safeZoneW - _ctrlWidth) / 2 + safeZoneX); // center it horizontally\n_ctrl ctrlSetPositionY ((safeZoneH - _ctrlHeight) / 2 + safeZoneY); // center it vertically\n_ctrl ctrlCommit 0;\n```","code":["private _ctrl = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscText\", -1];\n_ctrl ctrlSetBackgroundColor [1,0,0,0.5];\nprivate _ctrlWidth = 0.5 * safeZoneW; // 50% of screen width\nprivate _ctrlHeight = 0.3 * safeZoneH; // 30% of screen height\n_ctrl ctrlSetPositionW _ctrlWidth;\n_ctrl ctrlSetPositionH _ctrlHeight;\n_ctrl ctrlSetPositionX ((safeZoneW - _ctrlWidth) / 2 + safeZoneX); // center it horizontally\n_ctrl ctrlSetPositionY ((safeZoneH - _ctrlHeight) / 2 + safeZoneY); // center it vertically\n_ctrl ctrlCommit 0;"]}],"see_also":["SafeZone","safeZoneX","safeZoneY","safeZoneH","safeZoneXAbs","safeZoneWAbs"]},{"name":"safeZoneWAbs","title":"safeZoneWAbs","type":"command","url":"https://community.bistudio.com/wiki/safeZoneWAbs","revid":349758,"updated":"2023-11-20T22:10:03Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma2":"1.03","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.03","arma3_since":"0.50","description":"Returns absolute safeZoneW including all monitors.","syntaxes":[{"syntax":"safeZoneWAbs","params":[],"returns":{"type":"Number","type_expr":"Number","description":"screen width including multiple monitors in screen measurement units"},"form":"nullary"}],"examples":[{"code":["_szW = safeZoneWAbs;"]}],"see_also":["safeZoneXAbs","SafeZone","safeZoneH","safeZoneX","safeZoneY","safeZoneW"]},{"name":"safeZoneX","title":"safeZoneX","type":"command","url":"https://community.bistudio.com/wiki/safeZoneX","revid":349941,"updated":"2023-11-20T22:11:22Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the X of the left border of the screen, which is also a distance in screen measurement units from top left corner of the default viewport (0,0) of the screen to the left border of the screen.\n\nSince it is going in opposite way of the X axis, the value is negative. The measurement units depend on the current screen resolution getResolution. See also SafeZone.","syntaxes":[{"syntax":"safeZoneX","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_screenLeftBorderX = safeZoneX; // returns a float value < 0"]},{"text":"Create control 50% wide, 30% tall, centered on screen:\n\n```sqf\nprivate _ctrl = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscText\", -1];\n_ctrl ctrlSetBackgroundColor [1,0,0,0.5];\nprivate _ctrlWidth = 0.5 * safeZoneW; // 50% of screen width\nprivate _ctrlHeight = 0.3 * safeZoneH; // 30% of screen height\n_ctrl ctrlSetPositionW _ctrlWidth;\n_ctrl ctrlSetPositionH _ctrlHeight;\n_ctrl ctrlSetPositionX ((safeZoneW - _ctrlWidth) / 2 + safeZoneX); // center it horizontally\n_ctrl ctrlSetPositionY ((safeZoneH - _ctrlHeight) / 2 + safeZoneY); // center it vertically\n_ctrl ctrlCommit 0;\n```","code":["private _ctrl = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscText\", -1];\n_ctrl ctrlSetBackgroundColor [1,0,0,0.5];\nprivate _ctrlWidth = 0.5 * safeZoneW; // 50% of screen width\nprivate _ctrlHeight = 0.3 * safeZoneH; // 30% of screen height\n_ctrl ctrlSetPositionW _ctrlWidth;\n_ctrl ctrlSetPositionH _ctrlHeight;\n_ctrl ctrlSetPositionX ((safeZoneW - _ctrlWidth) / 2 + safeZoneX); // center it horizontally\n_ctrl ctrlSetPositionY ((safeZoneH - _ctrlHeight) / 2 + safeZoneY); // center it vertically\n_ctrl ctrlCommit 0;"]}],"see_also":["SafeZone","safeZoneY","safeZoneW","safeZoneH","safeZoneXAbs","safeZoneWAbs"]},{"name":"safeZoneXAbs","title":"safeZoneXAbs","type":"command","url":"https://community.bistudio.com/wiki/safeZoneXAbs","revid":349882,"updated":"2023-11-20T22:10:54Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma2":"1.03","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.03","arma3_since":"0.50","description":"Returns absolute safeZoneX including all monitors.","syntaxes":[{"syntax":"safeZoneXAbs","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_szX = safeZoneXAbs;"]}],"see_also":["safeZoneWAbs","SafeZone","safeZoneH","safeZoneX","safeZoneY","safeZoneW"]},{"name":"safeZoneY","title":"safeZoneY","type":"command","url":"https://community.bistudio.com/wiki/safeZoneY","revid":350006,"updated":"2023-11-20T22:11:49Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the Y of the top border of the screen, which is also a distance in screen measurement units from top left corner of the default viewport (0,0) of the screen to the top border of the screen.\n\nSince it is going in opposite way of the Y axis, the value is negative. The measurement units depend on the current screen resolution getResolution. See also SafeZone.","syntaxes":[{"syntax":"safeZoneY","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_screenTopBorderY = safeZoneY; // returns a float value < 0"]},{"text":"Create control 50% wide, 30% tall, centered on screen:\n\n```sqf\nprivate _ctrl = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscText\", -1];\n_ctrl ctrlSetBackgroundColor [1,0,0,0.5];\nprivate _ctrlWidth = 0.5 * safeZoneW; // 50% of screen width\nprivate _ctrlHeight = 0.3 * safeZoneH; // 30% of screen height\n_ctrl ctrlSetPositionW _ctrlWidth;\n_ctrl ctrlSetPositionH _ctrlHeight;\n_ctrl ctrlSetPositionX ((safeZoneW - _ctrlWidth) / 2 + safeZoneX); // center it horizontally\n_ctrl ctrlSetPositionY ((safeZoneH - _ctrlHeight) / 2 + safeZoneY); // center it vertically\n_ctrl ctrlCommit 0;\n```","code":["private _ctrl = findDisplay 46 createDisplay \"RscDisplayEmpty\" ctrlCreate [\"RscText\", -1];\n_ctrl ctrlSetBackgroundColor [1,0,0,0.5];\nprivate _ctrlWidth = 0.5 * safeZoneW; // 50% of screen width\nprivate _ctrlHeight = 0.3 * safeZoneH; // 30% of screen height\n_ctrl ctrlSetPositionW _ctrlWidth;\n_ctrl ctrlSetPositionH _ctrlHeight;\n_ctrl ctrlSetPositionX ((safeZoneW - _ctrlWidth) / 2 + safeZoneX); // center it horizontally\n_ctrl ctrlSetPositionY ((safeZoneH - _ctrlHeight) / 2 + safeZoneY); // center it vertically\n_ctrl ctrlCommit 0;"]}],"see_also":["SafeZone","safeZoneX","safeZoneW","safeZoneH","safeZoneXAbs","safeZoneWAbs"]},{"name":"save3DENInventory","title":"save3DENInventory","type":"command","url":"https://community.bistudio.com/wiki/save3DENInventory","revid":330340,"updated":"2022-08-31T21:24:40Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Saves the current state of entities' inventory to the Mission.sqm.","syntaxes":[{"syntax":"save3DENInventory entities","params":[{"name":"entities","type":"Array of Eden Entity or Eden ID","type_expr":"Array<Eden Entity | Eden ID>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"entities"}}],"examples":[{"code":["save3DENInventory [_soldier1, _soldier2];"]},{"code":["save3DENInventory [11234, 21251];"]}],"see_also":["clear3DENInventory","get3DENEntityID","collect3DENHistory"]},{"name":"save3DENPreferences","title":"save3DENPreferences","type":"command","url":"https://community.bistudio.com/wiki/save3DENPreferences","revid":369740,"updated":"2024-10-08T15:05:37Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Saves current 3DEN preferences into .3den.Arma3Profile file.","syntaxes":[{"syntax":"save3DENPreferences","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success"},"form":"nullary"}],"examples":[{"code":["\"Preferences\" set3DENMissionAttribute [\"SaveBinarized\", true];\nsave3DENPreferences;"]}],"see_also":["saveProfileNamespace","saveMissionProfileNamespace"]},{"name":"saveGame","title":"saveGame","type":"command","url":"https://community.bistudio.com/wiki/saveGame","revid":311106,"updated":"2022-05-10T14:30:26Z","groups":["Mission Information"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Autosaves the game (used for Retry). The saving is not started immediately, the request for autosave is made instead. To check the status of the request, use isSaving. The game can then be loaded from the last autosave with loadGame. Will not save if the player is null or dead.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.88 a `\"OnSaveGame\"` scripted event handler is available.","syntaxes":[{"syntax":"saveGame","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["saveGame;"]}],"see_also":["isSaving","enableSaving","loadGame","savingEnabled"]},{"name":"saveIdentity","title":"saveIdentity","type":"command","url":"https://community.bistudio.com/wiki/saveIdentity","revid":379461,"updated":"2026-10-31T00:09:36Z","groups":["Unit Identity"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Saves units's identity to Objects.sav file in campaign directory as entry name.","syntaxes":[{"syntax":"unit saveIdentity name","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if successful, otherwise false"},"form":"binary","left":{"text":"unit"},"right":{"text":"name"}}],"examples":[{"code":["_successful = player saveIdentity \"playerid\";"]}],"see_also":["loadIdentity"],"notes":[{"user":"Str","date":"2006-08-12T17:17:00Z","text":"Can be also used in singleplayer missions to save player status before cutscenes and load it to player's double."}]},{"name":"saveJoysticks","title":"saveJoysticks","type":"command","url":"https://community.bistudio.com/wiki/saveJoysticks","revid":319552,"updated":"2022-05-13T09:24:28Z","groups":["System"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Saves joysticks key mappings into the joysticks.cfg file. Engine add these joysticks to the Joystick Scheme mapping dialog in options controls section.","syntaxes":[{"syntax":"saveJoysticks","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["saveJoysticks;"]}],"see_also":["saveProfileNamespace"]},{"name":"saveMissionProfileNamespace","title":"saveMissionProfileNamespace","type":"command","url":"https://community.bistudio.com/wiki/saveMissionProfileNamespace","revid":353417,"updated":"2024-03-18T11:29:33Z","groups":["Namespaces","Variables"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","locality":{"effect":"local"},"description":"missionProfileNamespace provides long-term storage solution for mission variables.\nWhen this namespace has variables set with setVariable and is saved, the variables are saved into `missionName.vars` file into the current player's profileName folder.\nNext time when the same mission is loaded by the client with the same player profile, the saved variables can be read normally with getVariable command.\nThis way each mission maker can create persistent data that is both mission and player profile specific. The file is only created when the save operation is invoked with this command.\n\nIt is also possible to share the same mission profile variables between several missions.\nTo override the default behaviour, create a `missionGroup` entry in Description.ext, for example `missionGroup = \"TAG_MyMissionCollectionName\";`.\nThis will create `TAG_MyMissionCollectionName.vars` file instead of the default-named one, which would be loaded into every mission with a matching `missionGroup` entry.","syntaxes":[{"syntax":"saveMissionProfileNamespace","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true in case of success, false otherwise (e.g trying to save in Eden Editor or trying to save into existing save file but the file wasn't loaded yet)"},"form":"nullary"}],"examples":[{"code":["saveMissionProfileNamespace;"]}],"see_also":["missionProfileNamespace","isMissionProfileNamespaceLoaded","saveProfileNamespace","save3DENPreferences"]},{"name":"saveOverlay","title":"saveOverlay","type":"command","url":"https://community.bistudio.com/wiki/saveOverlay","revid":363296,"updated":"2024-03-26T10:52:01Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Save the current overlay.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"saveOverlay map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"map"}}],"examples":[{"code":["saveOverlay _map;"]}]},{"name":"saveProfileNamespace","title":"saveProfileNamespace","type":"command","url":"https://community.bistudio.com/wiki/saveProfileNamespace","revid":369335,"updated":"2024-09-03T18:43:00Z","groups":["Namespaces","Variables"],"status":"ok","games":{"tkoh":"1.00","arma2oa":"1.62","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","description":"Saves all variables stored in profileNamespace to the active Profile.\n\n> [!NOTE]\n> This command should be used when it is likely that the game will not be closed the usual way (e.g. via <kbd>Alt</kbd> + <kbd>F4</kbd>) or when the data is important and must not be lost due to a game crash.\n\n> [!WARNING]\n> - This command triggers a file operation. As file operations are slow (even on SSDs), it is not recommended to use this command too frequently (i.e. several times per second).\n> - Do not save large amounts of data to the profile; the larger the profile file gets, the slower it loads!\n> - The profileNamespace is saved automatically when the game is closed.\n\n> [!NOTE]\n> **Take On Helicopters:** Heliport status, used in the Career mode for example, is stored in the file that is modified by this command, so be mindful of this to avoid losing data and progress.","syntaxes":[{"syntax":"saveProfileNamespace","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["profileNamespace setVariable [\"TAG_lastPlayerLocation\", getPosASL player];\nsaveProfileNamespace; // Optional since namespace is saved when game is closed"]}],"see_also":["saveMissionProfileNamespace","save3DENPreferences","profileNamespace","Profile"]},{"name":"saveStatus","title":"saveStatus","type":"command","url":"https://community.bistudio.com/wiki/saveStatus","revid":337534,"updated":"2023-02-06T23:57:52Z","groups":["Weapon Pool","Mission Information"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Saves object's properties to Objects.sav file in campaign directory as entry name.","syntaxes":[{"syntax":"object saveStatus name","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if successful, otherwise false"},"form":"binary","left":{"text":"object"},"right":{"text":"name"}}],"examples":[{"code":["player saveStatus \"playerstate\";"]}],"see_also":["loadStatus","saveVar"]},{"name":"saveVar","title":"saveVar","type":"command","url":"https://community.bistudio.com/wiki/saveVar","revid":379372,"updated":"2026-10-30T23:57:44Z","groups":["Variables"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Save variable value into the campaign space.\nThis variable is available to all following missions in the campaign.","syntaxes":[{"syntax":"saveVar varname","params":[{"name":"varname","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"varname"}}],"examples":[{"code":["saveVar \"varOne\";"]}],"see_also":["isNil","missionNamespace","saveStatus"],"notes":[{"user":"Wolfrug","date":"2009-01-28T21:56:00Z","text":"If you try to saveVar a vehicle saved in your variable (SavedVars = [Car1]; saveVar \"SavedVars\"), then Car1 will not be properly \"saved\", refering to ObjNull if you try to use it in subsequent missions, even if a vehicle with the same vehicle varname exists. To get around this, save the vehicle's varname as a string (SavedVars = [str(Car1)]) and then when you need it just use call compile to \"unstring\" the varname (_car = call compile (SavedVars select 0);)."}]},{"name":"savingEnabled","title":"savingEnabled","type":"command","url":"https://community.bistudio.com/wiki/savingEnabled","revid":342154,"updated":"2023-07-09T12:26:50Z","groups":["Mission Information"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Check if saving the game is enabled.\n\n> [!NOTE]\n> **Arma 3:** If saving is disabled by Eden Editor mission attribute, this command will still return true.","syntaxes":[{"syntax":"savingEnabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (savingEnabled) then\n{\n    hint \"Saving is enabled!\";\n};\n```","code":["if (savingEnabled) then\n{\n\thint \"Saving is enabled!\";\n};"]}],"see_also":["enableSaving","loadGame","saveGame","isSaving"]},{"name":"say","title":"say","type":"command","url":"https://community.bistudio.com/wiki/say","revid":338267,"updated":"2023-02-25T14:17:50Z","groups":["Sounds"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Make unit say given sound. The sound is defined in CfgSounds.\nIf the unit is a person, it will also perform the corresponding lipsync effect provided an appropriate .lip file has been created for this sound.\n\n- A dead or non-existent unit obviously cannot say anything.\n- If the camera is not within given range, title is not shown and the sound will not be heard.\n- See also playSound in order to play a sound wherever the camera/player is.\n\n> [!NOTE]\n> say will mimic either say2D or say3D depending on whether it is executed in a cutscene or in a game scene.","syntaxes":[{"syntax":"from say sound","params":[{"name":"from","type":"Object or Array of Objects","description":"Object or Array of Objects\n\n- Object - the sound source\n- Array - format [from, to]:\n  - from: Object - sound source\n  - to: Object - target","type_expr":"Object | Array<Object>","text":"from: Object or Array of Objects\n\n- Object - the sound source\n- Array - format [from, to]:\n  - from: Object - sound source\n  - to: Object - target"},{"name":"sound","type":"String or Array","description":"String or Array\n\n- String - class name of the sound to be played. Defined in CfgSounds including Description.ext\n- Array - format [sound, maxTitlesDistance, speed]:\n  - sound: String - class name of the sound to be played. Defined in CfgSounds including Description.ext\n  - maxTitlesDistance: Number (Optional, default 100) - max. distance in meters at which the sound can be heard\n  - speed: Number (Optional, default 1) - pitch of the sound","type_expr":"String | Array","text":"sound: String or Array\n\n- String - class name of the sound to be played. Defined in CfgSounds including Description.ext\n- Array - format [sound, maxTitlesDistance, speed]:\n  - sound: String - class name of the sound to be played. Defined in CfgSounds including Description.ext\n  - maxTitlesDistance: Number (Optional, default 100) - max. distance in meters at which the sound can be heard\n  - speed: Number (Optional, default 1) - pitch of the sound"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"from"},"right":{"text":"sound"}}],"examples":[{"code":["(units player select 1) say [\"whisper1\", 5];"]},{"code":["player say \"scuba_breath\"; // Arma 3 vanilla sound"]}],"see_also":["say3D","say2D","playSound","createSoundSource","playSoundUI"]},{"name":"say2D","title":"say2D","type":"command","url":"https://community.bistudio.com/wiki/say2D","revid":379299,"updated":"2026-10-30T23:48:02Z","groups":["Sounds"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Plays given sound in 2D.","syntaxes":[{"syntax":"from say2D sound","params":[{"name":"from","type":"Object or Array","description":"Object or Array\n\n- Object - the sound source\n- Array with [from, to]\n  - from: Object - sound source\n  - to: Object - target","type_expr":"Object | Array","text":"from: Object or Array\n\n- Object - the sound source\n- Array with [from, to]\n  - from: Object - sound source\n  - to: Object - target"},{"name":"sound","type":"String or Array","description":"String or Array\n\n- String - class name of the sound to be played. Defined in CfgSounds including Description.ext\n- Array with [sound, maxTitlesDistance, speed]\n  - sound: String - class name of the sound to be played. Defined in CfgSounds including Description.ext\n  - maxTitlesDistance: Number (Optional, default 100) - max. distance in meters at which the sound can be heard\n  - speed: Number (Optional, default 1) - pitch of the sound","type_expr":"String | Array","text":"sound: String or Array\n\n- String - class name of the sound to be played. Defined in CfgSounds including Description.ext\n- Array with [sound, maxTitlesDistance, speed]\n  - sound: String - class name of the sound to be played. Defined in CfgSounds including Description.ext\n  - maxTitlesDistance: Number (Optional, default 100) - max. distance in meters at which the sound can be heard\n  - speed: Number (Optional, default 1) - pitch of the sound"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"from"},"right":{"text":"sound"}}],"examples":[{"code":["player say2D \"HelloThere\";"]},{"code":["[player, _officer] say2D [\"HelloThere\", 50, 0.9];"]}],"see_also":["say","say3D","playSound","createSoundSource","playSoundUI"]},{"name":"say3D","title":"say3D","type":"command","url":"https://community.bistudio.com/wiki/say3D","revid":379095,"updated":"2026-09-27T21:30:33Z","groups":["Sounds"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Lets an object say given sound in 3D space.\nThis allows broadcasting of positional music or sound from a source, without having to script a fade sound or music command. The source has to be alive.\nCompare this with say2D which will always play a sound at the location of the player after he has been in the vicinity of a broadcasting sound.\nSound is defined in \"CfgSounds\" of the Description.ext or main config.\n\n> [!NOTE]\n> The name of the command is the clue to its usage. It is meant for playing short sounds within short range. Consecutive execution of the command queues the sounds, the next sound would not start until the previous sound is finished, hence the need for the short sounds. The simulation of speed of sound would delay next sound and might mess with the timing of the queued sounds, especially if used globally. Additionally the sounds are not synced for JIP players. A long playing sound will not be heard by newly joined payers. To summarise:\n>\n> - An object can only \"say\" **one** sound at a time\n> - In order to stop a say3D sound: delete the returned **sound source** with deleteVehicle, or kill the **sound source** with e.g setDamage.\n> - Forcing the speed of sound simulation may delay the queued sound to play right after the previous sound, even if the second sound does not simulate sound delay (e.g sound 1 plays with a 5s delay, ends, *then* sound 2 plays). If the queued sound uses speed of sound simulation, it will be delayed from the end of the first sound (they will not follow \"as expected\"). Makes the *offset* parameter ignored.\n> - **Do use** it for short distance short sounds with speed of sound simulation off.\n> - When used with 'isGlobal' option, a null NetObject is returned. To stop such sound globally, destroy the sound source 'from' object.","syntaxes":[{"syntax":"from say3D sound","params":[{"name":"from","type":"Object or Array of Objects","description":"Object or Array of Objects\n\n- Object - origin of the sound\n- Array with [from, to]\n  - from: Object - origin of the sound\n  - to: Object - (Optional, default objNull) target","type_expr":"Object | Array<Object>","text":"from: Object or Array of Objects\n\n- Object - origin of the sound\n- Array with [from, to]\n  - from: Object - origin of the sound\n  - to: Object - (Optional, default objNull) target"},{"name":"sound","type":"String or Array","description":"String or Array\n\n- String - classname of the sound to be played. Defined in CfgSounds including Description.ext\n- Array with [sound, maxDistance, pitchCoef, isSpeech, offset, simulateSpeedOfSound, playMode, isGlobal]\n  - sound: String - classname of the sound to be played. Defined in CfgSounds including Description.ext\n  - maxDistance: Number - (Optional, default 100) maximum distance in meters at which the sound can be heard. -1 to use the maxDistance from the sound config\n  - pitchCoef: Number - (Optional, default 1) **multiplier** to the CfgSounds defined pitch. The final audio pitch is clipped between 0.5 and 2.0\n  - Arma 3 v1.92 isSpeech: Boolean or Arma 3 v2.04 Number - (Optional, default false)\n    - 0/false = play as sound (fadeSound applies)\n    - 1/true = play as speech (fadeSpeech applies), filters are not applied to it (i.e. house or vehicle interior one)\n    - 2 = play as sound (fadeSound applies) without interior/vehicle muffling\n  - Arma 3 v2.00 offset: Number - (Optional, default 0) offset in seconds; ignored when *simulateSpeedOfSound* is used\n  - Arma 3 v2.18 simulateSpeedOfSound: Boolean - (Optional, default false) true to simulate speed of sound (see description note)\n  - Arma 3 v2.24 isInside: Boolean - (Optional, default false) true if the sound is well audible inside the source (only for 'isSpeech' 0/false)\n  - Arma 3 v2.24 playMode: Number - (Optional, default 0) Could be one of the following:\n    - 0 - queued sound playback. The same source plays queued sounds in sequence\n    - 1 - single sound playback. The queue is cleared and a single sound is played instantly\n    - 2 - multiple sounds playback. The same source can play multiple sounds simultaneously and instantly\n  - Arma 3 v2.24 isGlobal: Boolean - (Optional, default false) true to play the sound on every client currently in game","type_expr":"String | Array","text":"sound: String or Array\n\n- String - classname of the sound to be played. Defined in CfgSounds including Description.ext\n- Array with [sound, maxDistance, pitchCoef, isSpeech, offset, simulateSpeedOfSound, playMode, isGlobal]\n  - sound: String - classname of the sound to be played. Defined in CfgSounds including Description.ext\n  - maxDistance: Number - (Optional, default 100) maximum distance in meters at which the sound can be heard. -1 to use the maxDistance from the sound config\n  - pitchCoef: Number - (Optional, default 1) **multiplier** to the CfgSounds defined pitch. The final audio pitch is clipped between 0.5 and 2.0\n  - Arma 3 v1.92 isSpeech: Boolean or Arma 3 v2.04 Number - (Optional, default false)\n    - 0/false = play as sound (fadeSound applies)\n    - 1/true = play as speech (fadeSpeech applies), filters are not applied to it (i.e. house or vehicle interior one)\n    - 2 = play as sound (fadeSound applies) without interior/vehicle muffling\n  - Arma 3 v2.00 offset: Number - (Optional, default 0) offset in seconds; ignored when *simulateSpeedOfSound* is used\n  - Arma 3 v2.18 simulateSpeedOfSound: Boolean - (Optional, default false) true to simulate speed of sound (see description note)\n  - Arma 3 v2.24 isInside: Boolean - (Optional, default false) true if the sound is well audible inside the source (only for 'isSpeech' 0/false)\n  - Arma 3 v2.24 playMode: Number - (Optional, default 0) Could be one of the following:\n    - 0 - queued sound playback. The same source plays queued sounds in sequence\n    - 1 - single sound playback. The queue is cleared and a single sound is played instantly\n    - 2 - multiple sounds playback. The same source can play multiple sounds simultaneously and instantly\n  - Arma 3 v2.24 isGlobal: Boolean - (Optional, default false) true to play the sound on every client currently in game"}],"returns":{"type":"Object","type_expr":"Object","description":"the sound source or NetObject - when 'isGlobal' is true"},"form":"binary","left":{"text":"from"},"right":{"text":"sound"}}],"examples":[{"text":"All possible combinations:\n\n```sqf\nhelicopter1 say3D \"FortunateSon\";\nhelicopter1 say3D [\"FortunateSon\", 500, 1, 0, 0, true];\n[helicopter1, player] say3D \"FortunateSon\";\n[helicopter1, player] say3D [\"FortunateSon\", 500, 1, 0, 0, true];\n```","code":["helicopter1 say3D \"FortunateSon\";\nhelicopter1 say3D [\"FortunateSon\", 500, 1, 0, 0, true];\n[helicopter1, player] say3D \"FortunateSon\";\n[helicopter1, player] say3D [\"FortunateSon\", 500, 1, 0, 0, true];"]},{"text":"Workaround for dead bodies:\n\n```sqf\nprivate _dummy = \"#particlesource\" createVehicleLocal ASLToAGL getPosWorld _corpse;\n_dummy say3D \"whatever\";\n_dummy spawn {\n    sleep 5; // at least the length of your sound\n    deleteVehicle _this;\n};\n```","code":["private _dummy = \"#particlesource\" createVehicleLocal ASLToAGL getPosWorld _corpse;\n_dummy say3D \"whatever\";\n_dummy spawn {\n\tsleep 5; // at least the length of your sound\n\tdeleteVehicle _this;\n};"]},{"code":["// Since Arma 3 v2.00, the sound source is returned and can be deleted directly\n_soundSrc = helicopter1 say3D \"Fortunateson\";\nsleep 5;\ndeleteVehicle _soundSrc; // stop the sound after ~5 seconds"]}],"see_also":["say","say2D","playSound","playSound3D","createSoundSource","playSoundUI","setRandomLip","stopSound","soundParams"],"notes":[{"user":"Rocket","date":"2013-03-07T13:17:00Z","text":"The only difference with this command and say is during cutscenes (when some camera effect is active). In cutscenes, say3D is 3D, say is not."},{"user":"Benargee","date":"2015-06-19T21:26:00Z","text":"In Arma 2 1.63, the object this command is assigned to must be alive for the sound to broadcast. If the object is killed while the sound is still playing, the sound will stop immediately.\nHere is [a link to the forum](http://forums.bistudio.com/showthread.php?146122-Making-a-dead-soldier-play-a-sound-in-3d) to get around this issue.\nI have not tested this in Arma 3 yet."},{"user":"Killzone_Kid","date":"2017-03-11T14:43:00Z","text":"This command creates sound object \"#soundonvehicle\" which can be detected with allMissionObjects\n\n```sqf\nonEachFrame { hintSilent str allMissionObjects \"#soundonvehicle\" };\n0 spawn { sleep 1; player say3D \"Alarm\" };\n```"}]},{"name":"scopeName","title":"scopeName","type":"command","url":"https://community.bistudio.com/wiki/scopeName","revid":363355,"updated":"2024-03-27T12:05:28Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Defines name of current scope. Name is visible in debugger, and name is also used as reference in some commands like breakOut and breakTo.\nScope name should be defined only once per scope. Trying to set a different name on the scope that has already defined scope name will result in error.","syntaxes":[{"syntax":"scopeName name","params":[{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"name"}}],"examples":[{"text":"```sqf\nscopeName \"main\";\nwhile { sleep 0.1; true } do\n{\n    scopeName \"loop1\";\n\n    while { sleep 0.1; true } do\n    {\n        scopeName \"loop2\";\n\n        // ...\n    };\n};\n```","code":["scopeName \"main\";\nwhile { sleep 0.1; true } do\n{\n\tscopeName \"loop1\";\n\n\twhile { sleep 0.1; true } do\n\t{\n\t\tscopeName \"loop2\";\n\n\t\t// ...\n\t};\n};"]},{"text":"```sqf\nif (true) then\n{\n    scopeName \"mainScope\";\n    scopeName \"main_scope\"; // error\n};\n```","code":["if (true) then\n{\n\tscopeName \"mainScope\";\n\tscopeName \"main_scope\"; // error\n};"]}],"see_also":["breakOut","breakTo"]},{"name":"score","title":"score","type":"command","url":"https://community.bistudio.com/wiki/score","revid":352995,"updated":"2024-03-09T10:17:34Z","groups":["Multiplayer"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the person's score in MP.","syntaxes":[{"syntax":"score unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_pScore = score player;"]}],"see_also":["addScore","scoreSide","addScoreSide","getPlayerScores"],"notes":[{"user":"Aimgame","date":"2024-03-09T10:17:34Z","text":"In MP **score player** returns only the score of player in faction he joined first (within one server session).\nI.e. if he first logged for WEST faction and then relogged for another faction, **score player** will show his score when he was WEST, no matter what real score is in current faction.\nIn this regard it is better to use getPlayerScores:\n\n```sqf\n(getPlayerScores player) select (count (getPlayerScores player) - 1)\n```\n\nor\n\n```sqf\n(getPlayerScores player) select 5\n```\n\n- it will always return the player's actual score in the current faction."}]},{"name":"scoreSide","title":"scoreSide","type":"command","url":"https://community.bistudio.com/wiki/scoreSide","revid":321011,"updated":"2022-05-13T11:05:55Z","groups":["Multiplayer","Sides"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Returns score for the given side. MP Only.","syntaxes":[{"syntax":"scoreSide side","params":[{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"side"}}],"examples":[{"code":["_number = scoreSide west;"]}],"see_also":["score","addScore","addScoreSide","getPlayerScores"]},{"name":"screenshot","title":"screenshot","type":"command","url":"https://community.bistudio.com/wiki/screenshot","revid":373186,"updated":"2025-04-11T09:26:12Z","groups":["System"],"status":"ok","games":{"arma3":"1.60"},"since":"arma3 1.60","arma3_since":"1.60","description":"| Post-Process Effect | Active in<br>screenshot |\n|---|---|\n| ColorInversion | ✗ |\n| FilmGrain | ✗ |\n| ColorCorrections | ✗ |\n| DynamicBlur | ✓ |\n| WetDistortion | ✓ |\n| ChromaticAberration | ✓ |\n| RadialBlur | ✓ |\n| SSAO | Unknown |\n| Resolution | ✓ |\n\nTakes a screenshot of the 3D scene and saves it to the provided filename.\n\n- Only the 3D scene is captured, no GUI/cursor\n- Sampling is taken in consideration: a 200% sampling value on a 1920x1080 resolution takes a 3840x2160 screenshot\n- PNG is the only available format\n\nThe file is saved in the *Screenshots* folder in the Profile directory. The folder is by default limited to **250 MB** to prevent abuse.\nTo increase the limit, add the following line at the end of the profile file:\n\n```cpp\nmaxScreenShotFolderSizeMB = 2000; // 2 GB\n```","syntaxes":[{"syntax":"screenshot filename","params":[{"name":"filename","type":"String","description":"**must** have `.png` extension; desired path and name relative to `<PROFILEDIR>\\Screenshots\\` (see Profile).\nIf empty string `\"\"` used, the filename will be autogenerated in format: `YYYY_MM_DD_hh_mm_ss.png`","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if success"},"form":"unary","right":{"text":"filename"}}],"examples":[{"code":["screenshot \"\";"]},{"code":["screenshot \"testFile.png\";"]},{"text":"The following code will result in the screenshot being placed in `\\Documents\\Arma 3\\Screenshots\\any\\where\\you\\want.png`:\n\n```sqf\nscreenshot \"any\\where\\you\\want.png\";\n```","code":["screenshot \"any\\where\\you\\want.png\";"]}],"see_also":["BIS_fnc_exportEditorPreviews","Eden Editor: Configuring Asset Previews"],"notes":[{"user":"Komachi","date":"2018-03-20T15:29:00Z","text":"The command will silently fail if your profiles folder is configured to be somewhere else (`-profiles` parameter), or if your HDR setting is below 16 (configurable in arma3.cfg or medium and above in in-game settings)\n\nFor full reference on recommended settings consult Eden Editor: Configuring Asset Previews."}]},{"name":"screenToWorld","title":"screenToWorld","type":"command","url":"https://community.bistudio.com/wiki/screenToWorld","revid":379229,"updated":"2026-10-30T23:01:48Z","groups":["Positions"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the position on landscape (PositionAGL) corresponding to the given point on screen (in UI coordinates).\n\n> [!NOTE]\n> This command performs an intersection with the ground/water surface, from the camera position along the screenToWorldDirection vector up to `viewDistance` for terrain intersection and `2 * viewDistance` for water intersection. In other words, it is similar to doing:\n>\n> ```sqf\n> private _p1 = AGLToASL positionCameraToWorld [0, 0, 0];                    // camera position ASL\n> private _vector = screenToWorldDirection _screenPos;                    // \"aim\" vector\n> private _p2 = _p1 vectorAdd (_vector vectorMultiply viewDistance * 2);    // the ray does not go beyond 2 * view distance\n> ASLToAGL terrainIntersectAtASL [_p1, _p2]\n> ```","syntaxes":[{"syntax":"screenToWorld screen","params":[{"name":"screen","type":"Array with [x, y]","description":"screen position, see SafeZone for more information\n\n- x: Number\n- y: Number","type_expr":"Array"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"world position on surface [x, y, 0]","text":"PositionAGL, world position on surface [x, y, 0]"},"form":"unary","right":{"text":"screen"}},{"syntax":"camera screenToWorld position","since":"arma3 2.18","params":[{"name":"camera","type":"Object","description":"camera object","type_expr":"Object"},{"name":"position","type":"Array with [x, y]","description":"screen position, see SafeZone for more information\n\n- x: Number\n- y: Number","type_expr":"Array"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"world position on surface [x,y,0]","text":"PositionAGL, world position on surface [x,y,0]"},"form":"binary","left":{"text":"camera"},"right":{"text":"position"}}],"examples":[{"code":["private _wPos = screenToWorld [0.5, 0.5];"]},{"code":["private _wPos = _myCamera screenToWorld [0.5, 0.5]; // since Arma 3 2.18"]}],"see_also":["SafeZone","worldToScreen","screenToWorldDirection"]},{"name":"screenToWorldDirection","title":"screenToWorldDirection","type":"command","url":"https://community.bistudio.com/wiki/screenToWorldDirection","revid":378361,"updated":"2026-04-03T16:05:32Z","groups":["Positions"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns the 3D vector in world corresponding to the given point on the screen (in UI coordinates), as if the vector was aiming from the camera to the screen position.","syntaxes":[{"syntax":"screenToWorldDirection screen","params":[{"name":"screen","type":"Array","description":"screen position [x,y] (see SafeZone for more info)","type_expr":"Array"}],"returns":{"type":"Vector3D","type_expr":"Vector3D","description":"world vector"},"form":"unary","right":{"text":"screen"}},{"syntax":"camera screenToWorldDirection position","params":[{"name":"camera","type":"Object","description":"camera object","type_expr":"Object"},{"name":"position","type":"Array","description":"screen position [x,y] (see SafeZone for more info)","type_expr":"Array"}],"returns":{"type":"Vector3D","type_expr":"Vector3D","description":"world vector"},"form":"binary","left":{"text":"camera"},"right":{"text":"position"}}],"examples":[{"code":["private _vec = screenToWorldDirection [0.5, 0.5]; // a vector pointing to the front of the camera"]}],"see_also":["SafeZone","worldToScreen","screenToWorld"]},{"name":"scriptDone","title":"scriptDone","type":"command","url":"https://community.bistudio.com/wiki/scriptDone","revid":321342,"updated":"2022-05-13T19:10:40Z","groups":["Program Flow"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Check if a script is finished running using the Script Handle returned by execVM or spawn.","syntaxes":[{"syntax":"scriptDone handle","params":[{"name":"handle","type":"Script Handle","description":"handle returned by spawn or execVM","type_expr":"Script Handle"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"handle"}}],"examples":[{"code":["_scriptHandle = [\"arguments\"] execVM \"scriptname.sqf\";\nwaitUntil { scriptDone _scriptHandle };"]}],"see_also":["execVM","spawn","terminate","scriptNull"],"notes":[{"user":"Bn880","date":"2009-09-11T03:54:00Z","text":"A Null Script handle can be created in this manner:\n\n```sqf\n_handle = 0 spawn {};\n```\n\nThat is what any Script Handle becomes when a script is finished running, meaning it will test as true with:\n\n```sqf\nscriptDone _handle;\n```\n\nand it returns \"<NULL-script>\" when converted to string.\nThis in turn lets you initialize the variable with a completed Script Handle and lets you test the variable even though nothing else may have set the handle by creating a script with spawn or execVM.\nIt also lets you store and manage script handles in arrays, and a few other sexy things."}]},{"name":"scriptName","title":"scriptName","type":"command","url":"https://community.bistudio.com/wiki/scriptName","revid":369379,"updated":"2024-09-03T18:43:13Z","groups":["Program Flow"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Assign a user friendly name to the VM script this command is executed from.\n\n> [!IMPORTANT]\n> Once a name is assigned, it cannot be changed.","syntaxes":[{"syntax":"scriptName name","params":[{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"name"}}],"examples":[{"code":["scriptName \"leetScript.sqf\";"]},{"code":["scriptName format [\"%1ARTY\\data\\scripts\\ARTY_sadarmDeploy.sqf (_this: %1)\", _this];"]}],"see_also":["spawn","execVM","scriptDone"],"notes":[{"user":"PhilippRauch","date":"2009-06-13T17:39:00Z","text":"scriptName is good when you want to load the handle of some spawn or call with some name:\n\n```sqf\nexample_scripthandle = 0 spawn {\n    scriptName \"Example\";\n    systemChat str example_scripthandle; // System: Example\n}\n```"}]},{"name":"scriptNull","title":"scriptNull","type":"command","url":"https://community.bistudio.com/wiki/scriptNull","revid":363804,"updated":"2024-04-21T18:03:23Z","groups":["Variables"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","description":"A non-existing or completed Script Handle. To compare non-existent scripts use isNull or isEqualTo:\n\n```sqf\nscriptNull == scriptNull;            // ERROR! == cannot be used with script object\nisNull scriptNull;                    // true\nscriptNull isEqualTo scriptNull;    // true\n```","syntaxes":[{"syntax":"scriptNull","params":[],"returns":{"type":"Script Handle","type_expr":"Script Handle","description":"NULL script"},"form":"nullary"}],"examples":[{"text":"Wait until previous script is finished before starting a new one:\n\n```sqf\n0 spawn\n{\n    _script = scriptNull;\n    for \"_i\" from 1 to 10 do\n    {\n        waitUntil { isNull _script };\n        _script = _i spawn\n        {\n            hint format [\"script %1 started\", _this];\n            sleep 1;\n            hint format [\"script %1 finished\", _this];\n            sleep 0.2;\n        };\n    };\n};\n```","code":["0 spawn\n{\n\t_script = scriptNull;\n\tfor \"_i\" from 1 to 10 do\n\t{\n\t\twaitUntil { isNull _script };\n\t\t_script = _i spawn\n\t\t{\n\t\t\thint format [\"script %1 started\", _this];\n\t\t\tsleep 1;\n\t\t\thint format [\"script %1 finished\", _this];\n\t\t\tsleep 0.2;\n\t\t};\n\t};\n};"]},{"text":"```sqf\nif (scriptDone (_obj getVariable [\"TAG_objScript\", scriptNull])) then\n{\n    _scriptHandle = _obj spawn { waitUntil { damage _this > 0.9 }; hint \"Critical Damage!\"; };\n    _obj setVariable [\"TAG_objScript\", _scriptHandle];\n};\n```","code":["if (scriptDone (_obj getVariable [\"TAG_objScript\", scriptNull])) then\n{\n\t_scriptHandle = _obj spawn { waitUntil { damage _this > 0.9 }; hint \"Critical Damage!\"; };\n\t_obj setVariable [\"TAG_objScript\", _scriptHandle];\n};"]},{"code":["str scriptNull; // <NULL-script>"]}],"see_also":["controlNull","displayNull","grpNull","locationNull","objNull","taskNull","teamMemberNull","configNull","typeName","isNull","scriptDone","spawn","execVM"]},{"name":"scudState","title":"scudState","type":"command","url":"https://community.bistudio.com/wiki/scudState","revid":379462,"updated":"2026-10-31T00:09:44Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.30","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.30","arma3_since":"0.50","description":"Return the current state of given Scud launcher.","syntaxes":[{"syntax":"scudState scudName","params":[{"name":"scudName","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"can be one of:\n- 0 - No activity - 1 - Launch preparation - 2 - Launch prepared - 3 - Ignition - 4 - Launched","text":"Number - can be one of:\n\n- 0 - No activity\n- 1 - Launch preparation\n- 2 - Launch prepared\n- 3 - Ignition\n- 4 - Launched"},"form":"unary","right":{"text":"scudName"}}],"examples":[{"code":["waitUntil { sleep 1; scudState _scud > 2 };\nguba say \"MasterPlanCompletion\";"]}],"see_also":["action","Arma 3: Actions"],"notes":[{"user":"Hardrock","date":"2006-08-04T10:58:00Z","text":"This command checks the scud status (Non-integral values are used to indicate transition between states).\nTo make the scud be upright, launch or cancel launch you need to use actions.\n\n```sqf\nscud1 action [\"scudLaunch\", scud1];    // rise the missile\nscud1 action [\"scudStart\", scud1];    // launch the missile\nscud1 action [\"scudCancel\", scud1];    // down the missile\n```\n\n(Make sure either the scud launcher has a crew inside or you use the game logic to perform actions)."}]},{"name":"secondaryWeapon","title":"secondaryWeapon","type":"command","url":"https://community.bistudio.com/wiki/secondaryWeapon","revid":348320,"updated":"2023-11-08T12:59:40Z","groups":["Unit Inventory"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Returns the name of a unit's secondary weapon (launcher). To detect the weapon which is **currently** being used by the unit use currentWeapon.","syntaxes":[{"syntax":"secondaryWeapon unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"class name of the secondary weapon or `\"\"` if none available"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _secondaryWeapon = secondaryWeapon player;"]},{"code":["hint secondaryWeapon player; // \"launch_NLAW_F\""]}],"see_also":["secondaryWeaponMagazine","secondaryWeaponItems","addSecondaryWeaponItem","primaryWeapon","handgunWeapon","currentWeapon","weapons"]},{"name":"secondaryWeaponItems","title":"secondaryWeaponItems","type":"command","url":"https://community.bistudio.com/wiki/secondaryWeaponItems","revid":320949,"updated":"2022-05-13T10:04:45Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns array with all items assigned to the secondaryWeapon except magazines. Use secondaryWeaponMagazine command for the latter. This command is used for infantry weapons only.","syntaxes":[{"syntax":"secondaryWeaponItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"[silencer, laserpointer/flashlight, optics, bipod]"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["secondaryWeaponItems player; //[\"\",\"\",\"\",\"\"]"]}],"see_also":["addSecondaryWeaponItem","weaponAccessories","weaponAccessoriesCargo","handgunItems","primaryWeaponItems","binocularItems","weaponsItems","weaponsItemsCargo"]},{"name":"secondaryWeaponMagazine","title":"secondaryWeaponMagazine","type":"command","url":"https://community.bistudio.com/wiki/secondaryWeaponMagazine","revid":377135,"updated":"2026-01-01T10:28:04Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.70"},"since":"arma3 0.70","arma3_since":"0.70","description":"Collects all loaded magazines from all secondaryWeapon muzzles and returns them in Array, otherwise it returns []. This command is used for infantry weapons only.","syntaxes":[{"syntax":"secondaryWeaponMagazine unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hint str secondaryWeaponMagazine player; //[\"NLAW_F\"]"]},{"text":"```sqf\n_array = secondaryWeaponMagazine player;\nif (count _array > 0) then {\n    hint (\"Secondary weapon is loaded with \" + (_array select 0) + \"!\");\n} else {\n    if (secondaryWeapon player != \"\") then {\n        hint \"Secondary weapon is not loaded!\";\n    } else {\n        hint \"Player doesn't have a secondary weapon!\";\n    };\n};\n```","code":["_array = secondaryWeaponMagazine player;\nif (count _array > 0) then {\n\thint (\"Secondary weapon is loaded with \" + (_array select 0) + \"!\");\n} else {\n\tif (secondaryWeapon player != \"\") then {\n\t\thint \"Secondary weapon is not loaded!\";\n\t} else {\n\t\thint \"Player doesn't have a secondary weapon!\";\n\t};\n};"]}],"see_also":["secondaryWeapon","secondaryWeaponItems","addSecondaryWeaponItem","primaryWeaponMagazine","handgunMagazine","binocularMagazine"]},{"name":"select","title":"select","type":"command","url":"https://community.bistudio.com/wiki/select","revid":377134,"updated":"2026-01-01T10:27:32Z","groups":["Arrays","Strings","Config"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Selects an element from an array, config entry from Config or substring from a string or a range from an array.","syntaxes":[{"syntax":"array select index","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"index","type":"Number","description":"index 0 denotes the first element, 1 the second, etc. If index has decimal places it gets rounded down for fractions less than or equal .5, otherwise it gets rounded up.\nArma 3 v2.12 negative index can be used to select from the end of the array, i.e. -1 means last array element.","type_expr":"Number"}],"returns":{"type":"Anything","type_expr":"Anything","description":"a reference to the array element given by its index\n> [!IMPORTANT] > When the index equals the size of the array, there is no error for out of range selection and nil is returned - see Example 8.","text":"Anything - a reference to the array element given by its index\n\n> [!IMPORTANT]\n> When the index equals the size of the array, there is no error for out of range selection and nil is returned - see Example 8."},"form":"binary","left":{"text":"array"},"right":{"text":"index"}},{"syntax":"array select boolean","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"boolean","type":"Boolean","description":"false selects the **first** element of the Array, true the **second** one","type_expr":"Boolean"}],"returns":{"type":"Anything","type_expr":"Anything","description":"a reference to the array element"},"form":"binary","left":{"text":"array"},"right":{"text":"boolean"}},{"syntax":"config select index","since":"arma1 1.00","params":[{"name":"config","type":"Config","type_expr":"Config"},{"name":"index","type":"Number","description":"index 0 denotes the first element, 1 the second, etc. If index has decimal places it gets rounded down for fractions less than or equal .5, otherwise it gets rounded up","type_expr":"Number"}],"returns":{"type":"Config","type_expr":"Config"},"form":"binary","left":{"text":"config"},"right":{"text":"index"}},{"syntax":"string select [start, length]","since":"arma3 1.28","params":[{"name":"string","type":"String","type_expr":"String"},{"name":"start","type":"Number","description":"string position to start selection from. 0 denotes the first character of the string, 1 the second, etc. If passed number has decimal places it gets rounded down for fractions less than or equal .5, otherwise it gets rounded up","type_expr":"Number"},{"name":"length","type":"Number","optional":true,"default":"string's length","description":"number of characters to select","type_expr":"Number","text":"length: Number - (Optional, default *string*'s length) number of characters to select"}],"returns":{"type":"String","type_expr":"String","description":"> [!NOTE] > Substring version of select operates with the ANSI charset; if Unicode support is desired, see forceUnicode.","text":"String\n\n> [!NOTE]\n> Substring version of select operates with the ANSI charset; if Unicode support is desired, see forceUnicode."},"form":"binary","left":{"text":"string"},"right":{"text":"[start, length]"}},{"syntax":"array select [start, count]","since":"arma3 1.32","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"start","type":"Number","description":"array index to start selection from","type_expr":"Number"},{"name":"count","type":"Number","optional":true,"description":"number of array elements to select. If the selected range exceeds source array boundaries, selection will be made up to the last element of the array.\n\n> [!NOTE]\n> Since v2.14 'count' is optional, if omitted the selection is made from *start* until the end of the array.","type_expr":"Number","optional_since":"arma3 2.14","text":"count: Number - (Optional after Arma 3 v2.14) number of array elements to select. If the selected range exceeds source array boundaries, selection will be made up to the last element of the array.\n\n> [!NOTE]\n> Since v2.14 'count' is optional, if omitted the selection is made from *start* until the end of the array."}],"returns":{"type":"Array","type_expr":"Array","description":"a new array from selection"},"form":"binary","left":{"text":"array"},"right":{"text":"[start, count]"}},{"syntax":"array select expression","since":"arma3 1.56","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"expression","type":"Code","description":"expression that is expected to return Boolean or Nothing.\nIf true is returned, the original array value of currently tested element _x will be added to the output array","type_expr":"Code"}],"returns":{"type":"Array","type_expr":"Array","description":"a new array of all elements from the original array that satisfied expression condition"},"form":"binary","left":{"text":"array"},"right":{"text":"expression"}}],"examples":[{"text":"```sqf\n[\"a\", \"b\", \"c\", \"d\"] select 2;    // result is \"c\"\nposition player select 2;        // result is Z coordinate of player position\n```","code":["[\"a\", \"b\", \"c\", \"d\"] select 2;\t// result is \"c\"\nposition player select 2;\t\t// result is Z coordinate of player position"]},{"code":["[\"\", currentWeapon player] select alive player; // if player is dead, \"\" is selected"]},{"code":["(configFile >> \"cfgVehicles\" >> typeOf vehicle player >> \"Turrets\") select 0 >> \"gunnerAction\";"]},{"text":"```sqf\nhint str (\"japa is the man!\" select [8]);        // the man!\nhint str (\"japa is the man!\" select [0, 7]);    // japa is\n```","code":["hint str (\"japa is the man!\" select [8]);\t\t// the man!\nhint str (\"japa is the man!\" select [0, 7]);\t// japa is"]},{"code":["hint str ([1,2,3,4,5,6] select [1, 4]); // [2,3,4,5]"]},{"code":["_even = [1,2,3,4,5,6,7,8,9,0] select { _x % 2 == 0 }; // returns [2, 4, 6, 8, 0]"]},{"text":"JavaScript endsWith() alternative:\n\n```sqf\nprivate _fnc_endsWith =\n{\n    params [\"_string\", \"_endswith\"];\n    _string select [count _string - count _endswith] isEqualTo _endswith\n};\n\n[\"Arma 3\", \"3\"] call _fnc_endsWith; // true\n[\"Arma 3\", \"4\"] call _fnc_endsWith; // false\n```","code":["private _fnc_endsWith = \n{\n\tparams [\"_string\", \"_endswith\"];\n\t_string select [count _string - count _endswith] isEqualTo _endswith\n};\n\n[\"Arma 3\", \"3\"] call _fnc_endsWith; // true\n[\"Arma 3\", \"4\"] call _fnc_endsWith; // false"]},{"text":"select index traps:\n\n```sqf\nprivate _array = [\"a\", \"b\", \"c\", \"d\"];\n_array select 0; // \"a\"\n_array select 3; // \"d\"\n_array select 4; // nil - no error shown\n_array select 5; // error\n\n// can sometimes be useful\nprivate _firstEnemyNearMe = units opfor select { player distance _x < 10 } select 0; // nil if no enemies nearby\nif (isNil \"_firstEnemyNearMe\") exitWith { systemChat \"no enemy found\" };\nsystemChat format [\"enemy found: %1\", name _firstEnemyNearMe];\n\n// get the last element properly\n_array select (count _array);        // wrong - nil is returned\n_array select (count _array - 1);    // correct - \"d\" is returned\n```","code":["private _array = [\"a\", \"b\", \"c\", \"d\"];\n_array select 0; // \"a\"\n_array select 3; // \"d\"\n_array select 4; // nil - no error shown\n_array select 5; // error\n\n// can sometimes be useful\nprivate _firstEnemyNearMe = units opfor select { player distance _x < 10 } select 0; // nil if no enemies nearby\nif (isNil \"_firstEnemyNearMe\") exitWith { systemChat \"no enemy found\" };\nsystemChat format [\"enemy found: %1\", name _firstEnemyNearMe];\n\n// get the last element properly\n_array select (count _array);\t\t// wrong - nil is returned\n_array select (count _array - 1);\t// correct - \"d\" is returned"]},{"text":"> [!NOTE]\n> **Arma 3:** Since Arma 3 v2.12 `-1` can be used to select the last element of an array.\n\n```sqf\nprivate _array = [1, 2, 3, 4, 5];\nhint str (_array select -1); // 5\n```","code":["private _array = [1, 2, 3, 4, 5];\nhint str (_array select -1); // 5"]}],"see_also":["a hash b","selectRandom","selectRandomWeighted","set","resize","reverse","in","find","findIf","toArray","toString","forEach","count","deleteAt","deleteRange","append","sort","param","params","splitString","joinString","pushBack","pushBackUnique","apply","forceUnicode"],"notes":[{"user":"General Barron","date":"2009-03-03T02:02:00Z","text":"When combined with the count command, this can be used to read all entries out of a config; even when you don't know exactly how many entries there will be.\nSee the notes under count for more info."},{"user":"Killzone_Kid","date":"2013-09-28T00:53:00Z","text":"Rounding of fractions with select is not the same as when you use round command:\n\n```sqf\n_roundThis = 0.5;\nhint str ([0,1] select _roundThis);            // 0\nhint str ([0,1] select round _roundThis);    // 1\n```"},{"user":"Pierre MGI","date":"2016-07-14T04:18:00Z","text":"You can substract array from array using select:\n\n```sqf\n_array = [[1], [2], [3]];\n_sub = [2];\n_array - _sub; // [[1], [2], [3]]\n_array select { !(_x isEqualTo _sub) }; // [[1], [3]]\n[[1],[2],[2],[2],[2],[3]] select { !(_x isEqualTo _sub) }; // [[1], [3]]\n```"},{"user":"Commy2","date":"2016-11-12T22:36:00Z","text":"It is not safe to escape the code block of alternative syntax #5 with exitWith, breakOut etc:\n\n```sqf\nx3 = [1,2,3,4,5] select {\n    if (_x == 3) exitWith\n    {\n        false;\n    };\n    true\n};\n// could be expected to be: x3 = [1,2,4,5]\n// actual result: x3 = false\n```"},{"user":"Igneous01","date":"2017-02-14T16:26:00Z","text":"Syntax 5 is the equivalent of passing in a predicate that returns a boolean. In SQF, a piece of code will always return what the last executed command returned.\n\n```sqf\nmyAliveUnits = allUnits select { alive _x };    // alive returns a boolean, the last statement run was alive _x,\n                                                // therefore this piece of code will return a true/false to the select command\nmyEastGroups = allGroups select { side _x == east };                    // returns all east groups\nmy4ManGroups = allGroups select { count units _x == 4 };                // returns all groups that have 4 men in them\nunitsThatDetectedMe = allUnits select { _x knowsAbout player > 0.1 };    // returns a list of units that have detected the player\n```"}]},{"name":"selectBestPlaces","title":"selectBestPlaces","type":"command","url":"https://community.bistudio.com/wiki/selectBestPlaces","revid":377620,"updated":"2026-01-02T08:51:55Z","groups":["Mission Information"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Find the places with the maximum value of *expression* in the given area. Places can be on water. Results are sorted by value. Search pattern is randomised every command execution.","syntaxes":[{"syntax":"selectBestPlaces [position, radius, expression, precision, sourcesCount]","params":[{"name":"position","type":"Object, Position3D or Position2D","type_expr":"Object | Position3D | Position2D"},{"name":"radius","type":"Number","type_expr":"Number"},{"name":"expression","type":"String","description":"arithmetic expression. Simple expression var names containing values from 0 to 1 depending on location (see also Ambient Parameters):\n\n- forest\n- trees\n- meadow\n- hills\n- houses\n- sea\n- coast\n- night\n- rain\n- windy\n- deadBody\n- waterDepth\n- camDepth","type_expr":"String"},{"name":"precision","type":"Number","type_expr":"Number"},{"name":"sourcesCount","type":"Number","description":"max results to return. The maximum possible is the number of random samples, which is **n = (2 * radius / precision)^2**","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"with [[position: Position2D, expressionResult: Number], ...]","text":"Array with [[position: Position2D, expressionResult: Number], ...]"},"form":"unary","right":{"text":"[position, radius, expression, precision, sourcesCount]"}}],"examples":[{"code":["myPlaces = selectBestPlaces [position player, 50, \"meadow + 2*hills\", 1, 5];"]}],"see_also":["getEnvSoundController","getAllEnvSoundControllers","findEmptyPosition","isFlatEmpty","Ambient Parameters"],"notes":[{"user":"Rübe","date":"2010-07-17T18:39:00Z","text":"see http://forums.bistudio.com/showthread.php?t=93897 for some more information (though neither official, nor complete).\nThe most important information is the list of useable keywords for the expression which is: **forest, trees, meadow, hills, houses, sea, night, rain, windy** and **deadBody**.\nThe keyword will be replaced by the actual value at the given sample position and thus the expression gets evaluated.\nFor example the following expression (which returns high values in forest) *\"forest + trees - meadow - houses - (10 * sea)\"* might be transformed to *0 + 0.1 - 0.7 - 0 - (10 * 0)* which is - with it is result of -0.6 - not in the forest, though there are some tree(s) around. You get the idea.\nAlso note that you may aswell check such an expression value at a single position by passing a low radius and a sourceCount of 1, which is often just as useful as retrieving multiple (and already sorted) positions.\nAlso do not underestimate the keywords *night*, *rain* or *windy*, for if you couple them with the other keywords, you can easily get a highly dynamic system at a very low cost.\n(this, btw., is how animals \"choose\" where and when to spawn)"},{"user":"ffur2007slx2_5","date":"2014-04-03T16:10:00Z","text":"In Arma 3 ver 1.14 Two new expressions are available: **waterDepth**(0-1) and **camDepth**(0-1), along with three simple operators: **interpolate**, **randomGen** and **factor** that can be used together with expressions. E.g.\n\n```sqf\np = selectBestPlaces [\n    position player,\n    500,\n    \"(2 * (waterDepth interpolate [1,16,0,1]) * ((0.1+houses factor [0.1,0.8]) * (randomGen 1 + houses)))\",\n    1,\n    1\n];\n```\n\n**A**lgorithm randomGen:\n\n```\nrandomGen A(number): randomly generate a float number from 0 - A\n```\n\n**A**lgorithm factor:\n\n```\nA(number) factor [p,q] =\np< A <q: [(A -p)/(q-p)]\n```\n\n**A**lgorithm interpolate:\n\n```\nA(number) interpolate [p,q,r,s] =\nA <=p:r\nA >=q:s\np< A <q: [(A -p)/(q-p)]*(s-r) +r\n```"},{"user":"Killzone_Kid","date":"2015-06-15T13:27:00Z","text":"*precision* seems to have range 0 - 100. At very low values the command is extremely slow. 100 makes it quite fast. It looks like *precision* is some kind of grid search size.\nLarge chunks make the search faster but less accurate.\n\nResulting array is [] if *sourcesCount* is 0 or *expression* is \"\". In all other cases it seems that result is array of arrays of the set max count.\nThe sole indication of successful search is *expressionResult* value when it is > 0."},{"user":"Tankbuster","date":"2017-06-04T20:51:00Z","text":"Results are sorted by value, that is, the result of the expression.\nThey are sorted in descending order, so in the case of waterdepth, the deepest water will be found at the locations at the start of the returned array and the shallowest water will be found at the locations at the end."}]},{"name":"selectDiarySubject","title":"selectDiarySubject","type":"command","url":"https://community.bistudio.com/wiki/selectDiarySubject","revid":349165,"updated":"2023-11-08T14:49:52Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Selects a subject page in the diary. The subject page is selected but the command does not open the map by default, which could be opened with openMap if necessary.","syntaxes":[{"syntax":"player selectDiarySubject subject","params":[{"name":"player","type":"Object","description":"player","type_expr":"Object"},{"name":"subject","type":"String","description":"subject name, for example \"Diary\" (see also Diary).\n\n> [!NOTE]\n> In order to open a specific record inside a subject one can append `:Record#` to the subject name.\n>\n> ```sqf\n> player selectDiarySubject \"Diary:Record0\"; // selects the first record in the diary subject (from bottom to top)\n> player selectDiarySubject \"Diary:Record1\"; // selects the second record\n> ```","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if subject was successfully selected"},"form":"binary","left":{"text":"player"},"right":{"text":"subject"}}],"examples":[{"code":["openMap true;\nplayer selectDiarySubject \"Diary\";"]}],"see_also":["processDiaryLink","createDiaryLink","createDiarySubject","diarySubjectExists","allDiarySubjects"]},{"name":"selectedEditorObjects","title":"selectedEditorObjects","type":"command","url":"https://community.bistudio.com/wiki/selectedEditorObjects","revid":377133,"updated":"2026-01-01T10:26:59Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns a list of currently selected editor objects.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"selectedEditorObjects map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"map"}}],"examples":[{"code":["_selObjects = selectedEditorObjects _map; // result can be: [\"_vehicle_0\",\"_vehicle_9\",\"_vehicle_11\"]"]}],"see_also":["get3DENSelected"]},{"name":"selectEditorObject","title":"selectEditorObject","type":"command","url":"https://community.bistudio.com/wiki/selectEditorObject","revid":363240,"updated":"2024-03-26T10:51:18Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Select an editor object. Does not un-select previously selected objects.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map selectEditorObject object","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"object","type":"String","type_expr":"String"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"map"},"right":{"text":"object"}}],"examples":[{"text":"-"}]},{"name":"selectionNames","title":"selectionNames","type":"command","url":"https://community.bistudio.com/wiki/selectionNames","revid":376409,"updated":"2025-10-11T01:01:13Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns the list of model selections. When using default syntax, the named selections are returned from the first LOD only (LOD index 0).\nAlternative syntax allows to select LOD by name or by LOD resolution.\n\n> [!IMPORTANT]\n> Sometimes internally \"ViewGeometry\" can be equal to \"Geometry\", and \"FireGeometry\" could be equal to \"ViewGeometry\".\n> In order to pinpoint the actual LOD, use allLODs and LOD resolution as argument for selecting the LOD.","syntaxes":[{"syntax":"selectionNames object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"selection names"},"form":"unary","right":{"text":"object"}},{"syntax":"object selectionNames LOD","since":"arma3 2.00","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"LOD","type":"String or Number","description":"String or Number\n\n- String - LOD name; can be one of:\n  - \"Memory\"\n  - \"Geometry\"\n  - \"FireGeometry\"\n  - \"LandContact\"\n  - \"HitPoints\"\n  - Arma 3 v2.06 \"ViewGeometry\"\n- Number - LOD resolution; command searches for a LOD with the similar resolution","type_expr":"String | Number","text":"LOD: String or Number\n\n- String - LOD name; can be one of:\n  - \"Memory\"\n  - \"Geometry\"\n  - \"FireGeometry\"\n  - \"LandContact\"\n  - \"HitPoints\"\n  - Arma 3 v2.06 \"ViewGeometry\"\n- Number - LOD resolution; command searches for a LOD with the similar resolution"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"selection names"},"form":"binary","left":{"text":"object"},"right":{"text":"LOD"}}],"examples":[{"text":"```sqf\nprivate _result = \"Land_i_House_Small_02_V3_F\" createVehicle _pos;\nselectionNames _house;\n/*\n[\n    \"door_1\",\"door_2\",\"damt_1\",\"door_handle_1\",\"door_handle_2\",\"glass_1_hide\",\"glass_2_hide\",\"glass_3_hide\",\n    \"glass_1_unhide\",\"glass_2_unhide\",\"glass_3_unhide\",\"glass_4_hide\",\"glass_4_unhide\"\n]\n*/\n```","code":["private _result = \"Land_i_House_Small_02_V3_F\" createVehicle _pos;\nselectionNames _house;\n/*\n[\n\t\"door_1\",\"door_2\",\"damt_1\",\"door_handle_1\",\"door_handle_2\",\"glass_1_hide\",\"glass_2_hide\",\"glass_3_hide\",\n\t\"glass_1_unhide\",\"glass_2_unhide\",\"glass_3_unhide\",\"glass_4_hide\",\"glass_4_unhide\"\n]\n*/"]},{"text":"```sqf\nselectionNames player;\n/*\n[\n    \"spine\",\"spine1\",\"spine2\",\"spine3\",\"head\",\n    \"leftshoulder\",\"leftarm\",\"leftarmroll\",\"leftforearm\",\"leftforearmroll\",\"lefthand\",\"rightshoulder\",\"rightarm\",\"rightarmroll\",\"rightforearm\",\"rightforearmroll\",\"righthand\",\n    \"pelvis\",\"leftupleg\",\"leftuplegroll\",\"leftleg\",\"leftlegroll\",\"leftfoot\",\"lefttoebase\",\"rightupleg\",\"rightuplegroll\",\"rightleg\",\"rightlegroll\",\"rightfoot\",\"righttoebase\",\"weapon\",\n    \"proxy:\\a3\\characters_f\\proxies\\weapon.001\",\"proxy:\\a3\\characters_f\\proxies\\pistol.001\",\n    \"proxy:\\a3\\characters_f\\proxies\\binoculars.001\",\n    \"proxy:\\a3\\characters_f\\proxies\\launcher.001\",\n    \"launcher\",\"nvg\",\"proxy:\\a3\\characters_f\\proxies\\nvg.001\",\n    \"proxy:\\a3\\characters_f\\proxies\\flag.001\",\n    \"proxy:\\a3\\characters_f\\proxies\\equipment.001\",\n    \"proxy:\\a3\\characters_f\\proxies\\backpack.001\",\n    \"proxy:\\a3\\characters_f\\proxies\\pistol_holstered.001\",\n    \"proxy:\\a3\\characters_f\\proxies\\head_male.001\",\n    \"proxy:\\a3\\characters_f\\proxies\\glasses.001\",\n    \"proxy:\\a3\\characters_f\\proxies\\headgear.001\",\n    \"proxy:\\a3\\characters_f\\proxies\\hair.001\",\n    \"proxy:\\a3\\characters_f\\proxies\\backpack2.001\",\n    \"proxy:\\a3\\characters_f\\proxies\\radio.001\",\n    \"body_proxy\",\"head_proxy\",\n    \"lefthandindex1\",\"lefthandindex2\",\"lefthandindex3\",\"lefthandmiddle1\",\"lefthandmiddle2\",\"lefthandmiddle3\",\"lefthandring\",\"lefthandpinky1\",\"lefthandpinky2\",\"lefthandpinky3\",\n    \"lefthandring1\",\"lefthandring2\",\"lefthandring3\",\"lefthandthumb1\",\"lefthandthumb2\",\"lefthandthumb3\",\n    \"righthandindex1\",\"righthandindex2\",\"righthandindex3\",\"righthandmiddle1\",\"righthandmiddle2\",\"righthandmiddle3\",\"righthandring\",\"righthandpinky1\",\"righthandpinky2\",\"righthandpinky3\",\n    \"righthandring1\",\"righthandring2\",\"righthandring3\",\"righthandthumb1\",\"righthandthumb2\",\"righthandthumb3\",\n    \"injury_hands\",\n    \"camo\",\n    \"proxy:\\a3\\characters_f\\heads\\bysta.001\",\n    \"injury_legs\",\n    \"proxy:\\a3\\characters_f\\proxies\\hmd.001\",\n    \"hl\",\"insignia\",\"injury_body\",\"clan\"\n]\n*/\n```","code":["selectionNames player;\n/*\n[\n\t\"spine\",\"spine1\",\"spine2\",\"spine3\",\"head\",\n\t\"leftshoulder\",\"leftarm\",\"leftarmroll\",\"leftforearm\",\"leftforearmroll\",\"lefthand\",\"rightshoulder\",\"rightarm\",\"rightarmroll\",\"rightforearm\",\"rightforearmroll\",\"righthand\",\n\t\"pelvis\",\"leftupleg\",\"leftuplegroll\",\"leftleg\",\"leftlegroll\",\"leftfoot\",\"lefttoebase\",\"rightupleg\",\"rightuplegroll\",\"rightleg\",\"rightlegroll\",\"rightfoot\",\"righttoebase\",\"weapon\",\n\t\"proxy:\\a3\\characters_f\\proxies\\weapon.001\",\"proxy:\\a3\\characters_f\\proxies\\pistol.001\",\n\t\"proxy:\\a3\\characters_f\\proxies\\binoculars.001\",\n\t\"proxy:\\a3\\characters_f\\proxies\\launcher.001\",\n\t\"launcher\",\"nvg\",\"proxy:\\a3\\characters_f\\proxies\\nvg.001\",\n\t\"proxy:\\a3\\characters_f\\proxies\\flag.001\",\n\t\"proxy:\\a3\\characters_f\\proxies\\equipment.001\",\n\t\"proxy:\\a3\\characters_f\\proxies\\backpack.001\",\n\t\"proxy:\\a3\\characters_f\\proxies\\pistol_holstered.001\",\n\t\"proxy:\\a3\\characters_f\\proxies\\head_male.001\",\n\t\"proxy:\\a3\\characters_f\\proxies\\glasses.001\",\n\t\"proxy:\\a3\\characters_f\\proxies\\headgear.001\",\n\t\"proxy:\\a3\\characters_f\\proxies\\hair.001\",\n\t\"proxy:\\a3\\characters_f\\proxies\\backpack2.001\",\n\t\"proxy:\\a3\\characters_f\\proxies\\radio.001\",\n\t\"body_proxy\",\"head_proxy\",\n\t\"lefthandindex1\",\"lefthandindex2\",\"lefthandindex3\",\"lefthandmiddle1\",\"lefthandmiddle2\",\"lefthandmiddle3\",\"lefthandring\",\"lefthandpinky1\",\"lefthandpinky2\",\"lefthandpinky3\",\n\t\"lefthandring1\",\"lefthandring2\",\"lefthandring3\",\"lefthandthumb1\",\"lefthandthumb2\",\"lefthandthumb3\",\n\t\"righthandindex1\",\"righthandindex2\",\"righthandindex3\",\"righthandmiddle1\",\"righthandmiddle2\",\"righthandmiddle3\",\"righthandring\",\"righthandpinky1\",\"righthandpinky2\",\"righthandpinky3\",\n\t\"righthandring1\",\"righthandring2\",\"righthandring3\",\"righthandthumb1\",\"righthandthumb2\",\"righthandthumb3\",\n\t\"injury_hands\",\n\t\"camo\",\n\t\"proxy:\\a3\\characters_f\\heads\\bysta.001\",\n\t\"injury_legs\",\n\t\"proxy:\\a3\\characters_f\\proxies\\hmd.001\",\n\t\"hl\",\"insignia\",\"injury_body\",\"clan\"\n]\n*/"]},{"text":"HitPart hit selections only:\n\n```sqf\nselectionNames player select { !(player selectionPosition [_x, \"HitPoints\"] isEqualTo [0,0,0]) };\n/*\n[\n    \"spine1\",\"spine2\",\"spine3\",\"head\",\"leftarm\",\"leftarmroll\",\"leftforearm\",\"rightarm\",\"rightarmroll\",\"rightforearm\",\n    \"pelvis\",\"leftupleg\",\"leftuplegroll\",\"leftlegroll\",\"leftfoot\",\"rightupleg\",\"rightuplegroll\",\"rightleg\",\"rightlegroll\",\"rightfoot\"\n]\n*/\n```","code":["selectionNames player select { !(player selectionPosition [_x, \"HitPoints\"] isEqualTo [0,0,0]) };\n/*\n[\n\t\"spine1\",\"spine2\",\"spine3\",\"head\",\"leftarm\",\"leftarmroll\",\"leftforearm\",\"rightarm\",\"rightarmroll\",\"rightforearm\",\n\t\"pelvis\",\"leftupleg\",\"leftuplegroll\",\"leftlegroll\",\"leftfoot\",\"rightupleg\",\"rightuplegroll\",\"rightleg\",\"rightlegroll\",\"rightfoot\"\n]\n*/"]},{"text":"Copy 5 LODs' selections:\n\n```sqf\nprivate _car = \"B_MRAP_01_F\" createVehicle getPos player;\nprivate _return = [];\n{\n    _return pushBack (_x + \": \" + str (_car selectionNames _x));\n} forEach [\"Memory\", \"Geometry\", \"FireGeometry\", \"LandContact\", \"HitPoints\"];\ncopyToClipboard (_return joinString endl);\n/*\n    Memory: [\"light_r_end\",\"drivewheel_axis\",\"posun wheel_1_1\",\"posun wheel_1_2\",\"posun wheel_2_1\",\"posun wheel_2_2\",\"wheel_1_1_steering_axis\",\"wheel_2_1_steering_axis\",\"wheel_2_1_axis\",\"wheel_2_2_axis\",\"wheel_1_2_axis\",\"wheel_1_1_axis\",\"basic_damper_destruct_axis\",\"pos cargo\",\"pos cargo dir\",\"pos driver\",\"pos driver dir\",\"circulumreference\",\"zamerny\",\"doplnovani\",\"light_l_end\",\"light_r\",\"light_l\",\"stopa pll\",\"stopa plp\",\"stopa ppl\",\"stopa ppp\",\"stopa zll\",\"stopa zlp\",\"stopa zpl\",\"stopa zpp\",\"exhaust_dir\",\"exhaust_pos\",\"osaveze\",\"mph_axis\",\"rpm_axis\",\"fuel_axis\",\"temp2_axis\",\"temp_axis\",\"pip1_pos\",\"pip1_dir\",\"pip4_dir\",\"pip6_dir\",\"pip5_dir\",\"pip7_dir\",\"pip4_pos\",\"pip6_pos\",\"pip7_pos\",\"pip5_pos\",\"dustfrontright\",\"dustfrontleft\",\"dustbackleft\",\"dustbackright\",\"light_r_flare\",\"light_l_flare\",\"light_r_flare2\",\"light_l_flare2\",\"wheel_1_1_bound\",\"wheel_1_2_bound\",\"wheel_2_1_bound\",\"wheel_2_2_bound\",\"door_1_axis\",\"door_2_axis\",\"door_3_axis\",\"door_4_axis\",\"pedal_thrust_axis\",\"pedal_brake_axis\",\"slingloadcargo1\",\"slingloadcargo2\",\"slingloadcargo3\",\"slingloadcargo4\",\"tow_front_l\",\"tow_rear_r\",\"tow_front_r\",\"tow_rear_l\",\"taskmarker_1_pos\",\"bbox_1_2_pos\",\"bbox_1_1_pos\",\"bbox_2_1_pos\",\"bbox_2_2_pos\",\"pip_1_tl\",\"pip_1_tr\",\"pip_1_bl\",\"pip_1_br\",\"pip_4_tl\",\"pip_4_tr\",\"pip_4_bl\",\"pip_4_br\",\"pip_5_tl\",\"pip_5_tr\",\"pip_5_br\",\"pip_5_bl\"]\n    Geometry: [\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.001\",\"wheel_1_1_unhide\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.002\",\"wheel_1_2_unhide\",\"wheel_2_1_unhide\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.003\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.004\",\"wheel_2_2_unhide\",\"damagehide\",\"wheel_1_2_damper\",\"wheel_1_1_damper\",\"wheel_2_2_damper\",\"wheel_2_1_damper\"]\n    FireGeometry: [\"wheel_2_2_hide\",\"wheel_1_2_hide\",\"wheel_1_1_hide\",\"wheel_2_1_hide\",\"damagehide\",\"glass2\",\"glass3\",\"glass1\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.001\",\"wheel_1_1_unhide\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.002\",\"wheel_1_2_unhide\",\"wheel_2_1_unhide\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.003\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.004\",\"wheel_2_2_unhide\",\"proxy:\\a3\\data_f\\proxies\\passenger_mrap_01_back\\cargo.002\",\"proxy:\\a3\\data_f\\proxies\\passenger_generic01_foldhands\\cargo.003\",\"proxy:\\a3\\data_f\\proxies\\passenger_mrap_01_front\\cargo.001\",\"proxy:\\a3\\data_f\\proxies\\driver_offroad\\driver.001\",\"reserve_wheel\",\"zbytek\",\"glass4\",\"glass5\",\"glass6\",\"hit_engine\",\"hit_fuel\",\"hit_hull\",\"door_1_hide\",\"door_3_hide\"]\n    LandContact: [\"wheel_2_1_damper_land\",\"wheel_1_2_damper_land\",\"wheel_2_2_damper_land\",\"wheel_1_1_damper_land\"]\n    HitPoints: [\"wheel_2_1_steering\",\"wheel_2_2_steering\",\"wheel_1_2_steering\",\"wheel_1_1_steering\",\"motor\",\"karoserie\",\"light_r\",\"light_l\",\"glass2\",\"palivo\",\"glass3\",\"glass1\",\"wheel_reserve_hit\",\"light_r2\",\"light_l2\",\"zbytek\",\"door_1\",\"door_2\",\"door_3\",\"door_4\",\"glass4\",\"glass5\",\"glass6\",\"hit_engine_point\",\"hit_fuel_point\",\"hit_hull_point\"]\n*/\n```","code":["private _car = \"B_MRAP_01_F\" createVehicle getPos player;\nprivate _return = [];\n{\n\t_return pushBack (_x + \": \" + str (_car selectionNames _x));\n} forEach [\"Memory\", \"Geometry\", \"FireGeometry\", \"LandContact\", \"HitPoints\"];\ncopyToClipboard (_return joinString endl);\n/*\n\tMemory: [\"light_r_end\",\"drivewheel_axis\",\"posun wheel_1_1\",\"posun wheel_1_2\",\"posun wheel_2_1\",\"posun wheel_2_2\",\"wheel_1_1_steering_axis\",\"wheel_2_1_steering_axis\",\"wheel_2_1_axis\",\"wheel_2_2_axis\",\"wheel_1_2_axis\",\"wheel_1_1_axis\",\"basic_damper_destruct_axis\",\"pos cargo\",\"pos cargo dir\",\"pos driver\",\"pos driver dir\",\"circulumreference\",\"zamerny\",\"doplnovani\",\"light_l_end\",\"light_r\",\"light_l\",\"stopa pll\",\"stopa plp\",\"stopa ppl\",\"stopa ppp\",\"stopa zll\",\"stopa zlp\",\"stopa zpl\",\"stopa zpp\",\"exhaust_dir\",\"exhaust_pos\",\"osaveze\",\"mph_axis\",\"rpm_axis\",\"fuel_axis\",\"temp2_axis\",\"temp_axis\",\"pip1_pos\",\"pip1_dir\",\"pip4_dir\",\"pip6_dir\",\"pip5_dir\",\"pip7_dir\",\"pip4_pos\",\"pip6_pos\",\"pip7_pos\",\"pip5_pos\",\"dustfrontright\",\"dustfrontleft\",\"dustbackleft\",\"dustbackright\",\"light_r_flare\",\"light_l_flare\",\"light_r_flare2\",\"light_l_flare2\",\"wheel_1_1_bound\",\"wheel_1_2_bound\",\"wheel_2_1_bound\",\"wheel_2_2_bound\",\"door_1_axis\",\"door_2_axis\",\"door_3_axis\",\"door_4_axis\",\"pedal_thrust_axis\",\"pedal_brake_axis\",\"slingloadcargo1\",\"slingloadcargo2\",\"slingloadcargo3\",\"slingloadcargo4\",\"tow_front_l\",\"tow_rear_r\",\"tow_front_r\",\"tow_rear_l\",\"taskmarker_1_pos\",\"bbox_1_2_pos\",\"bbox_1_1_pos\",\"bbox_2_1_pos\",\"bbox_2_2_pos\",\"pip_1_tl\",\"pip_1_tr\",\"pip_1_bl\",\"pip_1_br\",\"pip_4_tl\",\"pip_4_tr\",\"pip_4_bl\",\"pip_4_br\",\"pip_5_tl\",\"pip_5_tr\",\"pip_5_br\",\"pip_5_bl\"]\n\tGeometry: [\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.001\",\"wheel_1_1_unhide\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.002\",\"wheel_1_2_unhide\",\"wheel_2_1_unhide\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.003\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.004\",\"wheel_2_2_unhide\",\"damagehide\",\"wheel_1_2_damper\",\"wheel_1_1_damper\",\"wheel_2_2_damper\",\"wheel_2_1_damper\"]\n\tFireGeometry: [\"wheel_2_2_hide\",\"wheel_1_2_hide\",\"wheel_1_1_hide\",\"wheel_2_1_hide\",\"damagehide\",\"glass2\",\"glass3\",\"glass1\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.001\",\"wheel_1_1_unhide\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.002\",\"wheel_1_2_unhide\",\"wheel_2_1_unhide\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.003\",\"proxy:\\a3\\data_f\\proxies\\damagewheel\\damagewheel_1.004\",\"wheel_2_2_unhide\",\"proxy:\\a3\\data_f\\proxies\\passenger_mrap_01_back\\cargo.002\",\"proxy:\\a3\\data_f\\proxies\\passenger_generic01_foldhands\\cargo.003\",\"proxy:\\a3\\data_f\\proxies\\passenger_mrap_01_front\\cargo.001\",\"proxy:\\a3\\data_f\\proxies\\driver_offroad\\driver.001\",\"reserve_wheel\",\"zbytek\",\"glass4\",\"glass5\",\"glass6\",\"hit_engine\",\"hit_fuel\",\"hit_hull\",\"door_1_hide\",\"door_3_hide\"]\n\tLandContact: [\"wheel_2_1_damper_land\",\"wheel_1_2_damper_land\",\"wheel_2_2_damper_land\",\"wheel_1_1_damper_land\"]\n\tHitPoints: [\"wheel_2_1_steering\",\"wheel_2_2_steering\",\"wheel_1_2_steering\",\"wheel_1_1_steering\",\"motor\",\"karoserie\",\"light_r\",\"light_l\",\"glass2\",\"palivo\",\"glass3\",\"glass1\",\"wheel_reserve_hit\",\"light_r2\",\"light_l2\",\"zbytek\",\"door_1\",\"door_2\",\"door_3\",\"door_4\",\"glass4\",\"glass5\",\"glass6\",\"hit_engine_point\",\"hit_fuel_point\",\"hit_hull_point\"]\n*/"]},{"text":"Select \"Memory\" LOD by its resolution:\n\n```sqf\nprivate _memoryLODNamedSelections = player selectionNames 1e15;\n```","code":["private _memoryLODNamedSelections = player selectionNames 1e15;"]}],"see_also":["getBoneNames","createSimpleObject","hideSelection","selectionPosition","namedProperties","animationNames","allLODs","LOD resolutions"]},{"name":"selectionPosition","title":"selectionPosition","type":"command","url":"https://community.bistudio.com/wiki/selectionPosition","revid":379300,"updated":"2026-10-30T23:48:10Z","groups":["Object Manipulation","Render Time Scope"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns selection position in model space pertaining to the current animation in render time scope.\nWhen the default syntax is used, command searches first in Memory LOD, then in Geometry LOD, FireGeometry LOD, LandContact LOD, HitPoints LOD and finally in ViewGeometry LOD and returns the first matching find.\nThe second syntax allows to specify which one of these LODs to search in instead.\n\n> [!IMPORTANT]\n> Sometimes internally \"ViewGeometry\" could be equal to \"Geometry\", and \"FireGeometry\" could be equal to \"ViewGeometry\".\n>\n> In order to pinpoint the actual LOD, use allLODs and LOD resolution as argument for selecting the LOD.\n>\n> Also note that similar models can have different LOD indexes, for example a soldier model differs from a model of civilian in this regard.","syntaxes":[{"syntax":"object selectionPosition selectionName","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"selectionName","type":"String","type_expr":"String"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative","description":"If selection does not exist, [0, 0, 0] is returned."},"form":"binary","left":{"text":"object"},"right":{"text":"selectionName"}},{"syntax":"object selectionPosition [selectionName, LOD, returnMode]","since":"arma3 1.50","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"selectionName","type":"String","type_expr":"String"},{"name":"LOD","type":"String or Number","description":"can be one of:\n\n- `\"Memory\"`\n- `\"Geometry\"`\n- `\"FireGeometry\"`\n- `\"LandContact\"`\n- `\"HitPoints\"`\n- Arma 3 v2.06 `\"ViewGeometry\"`\n\nWhen Number is used, command searches for a LOD with the similar LOD resolution","type_expr":"String | Number","since":"arma3 2.06"},{"name":"returnMode","type":"String","optional":true,"default":"`\"FirstPoint\"`","description":"can be one of:\n\n- `\"FirstPoint\"`\n- `\"AveragePoint\"`\n- `\"BoundingBox\"`","type_expr":"String","since":"arma3 2.08","text":"returnMode: String - (Optional, default `\"FirstPoint\"`) can be one of:\n\n- `\"FirstPoint\"`\n- `\"AveragePoint\"`\n- `\"BoundingBox\"`"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative","description":"If selection does not exist, [0, 0, 0] is returned. If returnMode is `\"BoundingBox\"`, Array of Arrays"},"form":"binary","left":{"text":"object"},"right":{"text":"[selectionName, LOD, returnMode]"}},{"syntax":"selectionPosition [object, selectionName, LODIndex, isVisual, returnMode]","since":"arma3 2.06","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"selectionName","type":"String","type_expr":"String"},{"name":"LODIndex","type":"Number","description":"the index of the target LOD (see allLODs)","type_expr":"Number"},{"name":"isVisual","type":"Boolean","optional":true,"default":"true","description":"true for Render, false for Simulation time scope","type_expr":"Boolean","text":"isVisual: Boolean - (Optional, default true) true for Render, false for Simulation time scope"},{"name":"returnMode","type":"String","optional":true,"default":"`\"FirstPoint\"`","description":"can be one of:\n\n- `\"FirstPoint\"`\n- `\"AveragePoint\"`\n- `\"BoundingBox\"`","type_expr":"String","since":"arma3 2.08","text":"returnMode: String - (Optional, default `\"FirstPoint\"`) can be one of:\n\n- `\"FirstPoint\"`\n- `\"AveragePoint\"`\n- `\"BoundingBox\"`"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative","description":"If selection does not exist, [0, 0, 0] is returned. If returnMode is `\"BoundingBox\"`, Array of Arrays"},"form":"unary","right":{"text":"[object, selectionName, LODIndex, isVisual, returnMode]"}}],"examples":[{"code":["_inModelPosition = player selectionPosition \"head_hit\";"]},{"code":["_inModelPosition = player selectionPosition \"pelvis\";"]},{"code":["_inModelPosition = player selectionPosition \"head\";"]},{"code":["_inModelPosition = player selectionPosition \"camera\";"]},{"text":"```sqf\nstomper selectionPosition [\"wheel_1_1\", \"HitPoints\", \"FirstPoint\"];    // [-0.774058,0.860854,-1.40365]\nstomper selectionPosition [\"wheel_1_1\", \"HitPoints\", \"AveragePoint\"];    // [-0.597142,1.35486,-1.58345]\nstomper selectionPosition [\"wheel_1_1\", \"HitPoints\", \"BoundingBox\"];    // [[-0.774058,0.860854,-2.07746],[-0.420225,1.84887,-1.08944]]\n```","code":["stomper selectionPosition [\"wheel_1_1\", \"HitPoints\", \"FirstPoint\"];\t// [-0.774058,0.860854,-1.40365]\nstomper selectionPosition [\"wheel_1_1\", \"HitPoints\", \"AveragePoint\"];\t// [-0.597142,1.35486,-1.58345]\nstomper selectionPosition [\"wheel_1_1\", \"HitPoints\", \"BoundingBox\"];\t// [[-0.774058,0.860854,-2.07746],[-0.420225,1.84887,-1.08944]]"]}],"see_also":["selectionVectorDirAndUp","modelToWorld","selectionNames","getAllHitPointsDamage","allLODs","LOD resolutions"],"notes":[{"user":"Killzone_Kid","date":"2017-06-25T15:13:00Z","text":"Do use the filter that comes with Syntax 2 to suit your needs. For example player has 3 selections called \"head\" and their selectionPositions are quite different from each other:\n\n```sqf\nplayer selectionPosition [\"head\", \"Memory\"];        // [0.173798,0.330415,1.37783]\nplayer selectionPosition [\"head\", \"FireGeometry\"];    // [0.14375,0.206039,1.44689]\nplayer selectionPosition [\"head\", \"HitPoints\"];    // [0.144257,0.306769,1.53471]\n```"}]},{"name":"selectionVectorDirAndUp","title":"selectionVectorDirAndUp","type":"command","url":"https://community.bistudio.com/wiki/selectionVectorDirAndUp","revid":377722,"updated":"2026-01-02T09:17:58Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"argument":"global"},"description":"Searches for selection in the object model's LOD level, and returns the Direction and Up vectors in model space.","syntaxes":[{"syntax":"object selectionVectorDirAndUp [selectionName, LOD]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"selectionName","type":"String","description":"selection name (see selectionNames)","type_expr":"String"},{"name":"LOD","type":"String or Number","description":"the LOD that contains the selection:\n\n- String - can be one of:\n  - \"Memory\"\n  - \"Geometry\"\n  - \"FireGeometry\"\n  - \"LandContact\"\n  - \"HitPoints\"\n  - \"ViewGeometry\"\n- Number - command searches for a LOD with the similar resolution (see allLODs).","type_expr":"String | Number"}],"returns":{"type":"Array","type_expr":"Array","description":"with [vectorDir, vectorUp] - vectors are in model space\n- vectorDir: Vector3D - vectorUp: Vector3D","text":"Array with [vectorDir, vectorUp] - vectors are in model space\n\n- vectorDir: Vector3D\n- vectorUp: Vector3D"},"form":"binary","left":{"text":"object"},"right":{"text":"[selectionName, LOD]"}}],"examples":[{"code":["vehicle player selectionVectorDirAndUp [\"drivewheel_axis\", \"FireGeometry\"] params [\"_axisVectorDir\", \"_axisVectorUp\"];"]},{"text":"Get the player's barrel end (`_p1` being muzzle end's ASL position):\n\n```sqf\nonEachFrame {\n    private _weapon = currentWeapon player;\n    if (_weapon == \"\") exitWith {};\n\n    // update weapon info upon weapon switch\n    if (_weapon != player getVariable [\"last_weapon\", \"?\"]) then\n    {\n        private _cfg = configFile >> \"CfgWeapons\" >> _weapon;\n        private _model = getText(_cfg >> \"model\");\n        private _simpleObject = createSimpleObject [_model, [0,0,0], true];\n        private _offset = _simpleObject selectionPosition [getText (_cfg >> \"muzzlePos\"), \"memory\"];\n        _offset = _offset apply { [_x] };\n        deleteVehicle _simpleObject;\n        player setVariable [\"offset\", _offset];\n        player setVariable [\"last_weapon\", _weapon];\n        player setVariable [\"proxy\",\n            [\n                \"proxy:\\a3\\characters_f\\proxies\\pistol.001\",\n                \"proxy:\\a3\\characters_f\\proxies\\weapon.001\",\n                \"proxy:\\a3\\characters_f\\proxies\\launcher.001\",\n                \"proxy:\\a3\\characters_f\\proxies\\binoculars.001\"\n            ] select (([1, 4, 4096] find getNumber (_cfg >> \"type\")) + 1)\n        ];\n    };\n\n    _offset = player getVariable [\"offset\", []];\n    private _proxy = player getVariable [\"proxy\", \"\"];\n    // using LOD resolution 1 (and lod index 0) - this is not always reliable\n    // you should manually check allLODs and find the most suitable LOD (smallest res LOD usually has the best accuracy, but it might be slow too)\n    player selectionVectorDirAndUp [_proxy, 1] params [\"_vy\", \"_vz\"];\n    private _pos = selectionPosition [player, _proxy, 0];\n    private _vx = _vy vectorCrossProduct _vz;\n\n    private _mat = matrixTranspose [_vx, _vy, _vz];\n    _pos = _pos vectorAdd flatten (_mat matrixMultiply _offset);\n\n    private _p1 = player modelToWorldVisualWorld _pos;\n    private _p2 = _p1 vectorAdd (player vectorModelToWorldVisual (_vx vectorMultiply -1000));\n    drawLine3D [ASLToAGL _p1, ASLToAGL _p2, [1,0,0,1]];\n};\n```","code":["onEachFrame {\n\tprivate _weapon = currentWeapon player;\n\tif (_weapon == \"\") exitWith {};\n\n\t// update weapon info upon weapon switch\n\tif (_weapon != player getVariable [\"last_weapon\", \"?\"]) then\n\t{\n\t\tprivate _cfg = configFile >> \"CfgWeapons\" >> _weapon;\n\t\tprivate _model = getText(_cfg >> \"model\");\n\t\tprivate _simpleObject = createSimpleObject [_model, [0,0,0], true];\n\t\tprivate _offset = _simpleObject selectionPosition [getText (_cfg >> \"muzzlePos\"), \"memory\"];\n\t\t_offset = _offset apply { [_x] };\n\t\tdeleteVehicle _simpleObject;\n\t\tplayer setVariable [\"offset\", _offset];\n\t\tplayer setVariable [\"last_weapon\", _weapon];\n\t\tplayer setVariable [\"proxy\",\n\t\t\t[\n\t\t\t\t\"proxy:\\a3\\characters_f\\proxies\\pistol.001\",\n\t\t\t\t\"proxy:\\a3\\characters_f\\proxies\\weapon.001\",\n\t\t\t\t\"proxy:\\a3\\characters_f\\proxies\\launcher.001\",\n\t\t\t\t\"proxy:\\a3\\characters_f\\proxies\\binoculars.001\"\n\t\t\t] select (([1, 4, 4096] find getNumber (_cfg >> \"type\")) + 1)\n\t\t];\n\t};\n\n\t_offset = player getVariable [\"offset\", []];\n\tprivate _proxy = player getVariable [\"proxy\", \"\"];\n\t// using LOD resolution 1 (and lod index 0) - this is not always reliable\n\t// you should manually check allLODs and find the most suitable LOD (smallest res LOD usually has the best accuracy, but it might be slow too)\n\tplayer selectionVectorDirAndUp [_proxy, 1] params [\"_vy\", \"_vz\"];\n\tprivate _pos = selectionPosition [player, _proxy, 0];\n\tprivate _vx = _vy vectorCrossProduct _vz;\n\n\tprivate _mat = matrixTranspose [_vx, _vy, _vz];\n\t_pos = _pos vectorAdd flatten (_mat matrixMultiply _offset);\n\n\tprivate _p1 = player modelToWorldVisualWorld _pos;\n\tprivate _p2 = _p1 vectorAdd (player vectorModelToWorldVisual (_vx vectorMultiply -1000));\n\tdrawLine3D [ASLToAGL _p1, ASLToAGL _p2, [1,0,0,1]];\n};"]}],"see_also":["selectionPosition","selectionNames","allLODs"]},{"name":"selectLeader","title":"selectLeader","type":"command","url":"https://community.bistudio.com/wiki/selectLeader","revid":321115,"updated":"2022-05-13T14:14:32Z","groups":["Groups"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Select the group's leader. Group locality can be checked with local command and group ownership with groupOwner command.\n\n> [!IMPORTANT]\n> An invalid combination can be provided to this command, e.g *unitName* **not** being part of *group*. In that case:\n>\n> - *unitName* will be leader of *group*, but will not be able to command them\n> - if *unitName* is deleted or killed, leader of *group* will be objNull and will not automatically be reassigned.","syntaxes":[{"syntax":"group selectLeader unitName","params":[{"name":"group","type":"Group","type_expr":"Group"},{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"unitName"}}],"examples":[{"code":["group player selectLeader player;"]},{"text":"Make unit a leader from server:\n\n```sqf\n[group _unit, _unit] remoteExec [\"selectLeader\", groupOwner group _unit];\n```","code":["[group _unit, _unit] remoteExec [\"selectLeader\", groupOwner group _unit];"]}],"see_also":["commandFollow","doFollow","formationLeader","formLeader","isFormationLeader","leader","setLeader"]},{"name":"selectMax","title":"selectMax","type":"command","url":"https://community.bistudio.com/wiki/selectMax","revid":379373,"updated":"2026-10-30T23:57:52Z","groups":["Arrays"],"status":"ok","games":{"arma3":"1.66"},"since":"arma3 1.66","arma3_since":"1.66","description":"Returns the array element with maximum numerical value. Engine solution to BIS_fnc_greatestNum and BIS_fnc_findExtreme. Therefore it is expected that supplied array consists of Numbers only. Booleans however are also supported and will be evaluated as Numbers: true - 1, false - 0. nil value treated as 0.\n\n> [!WARNING]\n> Other non Number elements (not recommended) will be evaluated as 0 and **Bad conversion: scalar** message will be logged into .rpt.","syntaxes":[{"syntax":"selectMax array","params":[{"name":"array","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Number","type_expr":"Number","description":"element with maximum numerical value"},"form":"unary","right":{"text":"array"}}],"examples":[{"code":["_max = selectMax [1,2,3,4,5]; //5"]},{"text":"```sqf\n// Same as, for example:\n_max = _a max _b max _c max _d;\n// Only faster:\n_max = selectMax [_a,_b,_c,_d];\n```","code":["// Same as, for example: \n_max = _a max _b max _c max _d;\n// Only faster:\n_max = selectMax [_a,_b,_c,_d];"]}],"see_also":["selectMin","min","max","selectRandom","select","selectRandomWeighted"],"notes":[{"user":"Longbow","date":"2016-12-19T02:05:00Z","text":"Returns either number or boolean value, in case max value in array 0, command will return either 0 or false, which ever comes first.\nSame for 1 and true values.\n\n```sqf\nselectMax [false,0] // returns false\nselectMax [0,false] // returns 0\nselectMax [true,1] // returns true\nselectMax [1,true] // returns 1\n```\n\nin case all values are equal or less than zero, command may also return other type of values\n\n```sqf\nselectMax [\"\",false,0,-1] // returns \"\"\n```\n\nif nil value appears in array, other values are equal or less than zero, command returns nil"}]},{"name":"selectMin","title":"selectMin","type":"command","url":"https://community.bistudio.com/wiki/selectMin","revid":377100,"updated":"2026-01-01T09:58:18Z","groups":["Arrays"],"status":"ok","games":{"arma3":"1.66"},"since":"arma3 1.66","arma3_since":"1.66","description":"Returns the array element with minimum numerical value. Engine solution to BIS_fnc_lowestNum and BIS_fnc_findExtreme. Therefore it is expected that supplied array consists of Numbers only. Booleans however are also supported and will be evaluated as Numbers: true - 1, false - 0. nil value treated as 0.\n\n> [!WARNING]\n> Other non Number elements (not recommended) will be evaluated as 0 and **Bad conversion: scalar** message will be logged into .rpt.","syntaxes":[{"syntax":"selectMin array","params":[{"name":"array","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Number","type_expr":"Number","description":"element with minimum numerical value"},"form":"unary","right":{"text":"array"}}],"examples":[{"code":["_min = selectMin [1,2,3,4,5]; //1"]},{"text":"```sqf\n// Same as, for example:\n_min = _a min _b min _c min _d;\n// Only faster:\n_min = selectMin [_a,_b,_c,_d];\n```","code":["// Same as, for example: \n_min = _a min _b min _c min _d;\n// Only faster:\n_min = selectMin [_a,_b,_c,_d];"]}],"see_also":["selectMax","min","max","selectRandom","select","selectRandomWeighted"]},{"name":"selectNoPlayer","title":"selectNoPlayer","type":"command","url":"https://community.bistudio.com/wiki/selectNoPlayer","revid":379374,"updated":"2026-10-30T23:58:00Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Switches player to no unit, makes player return objNull.","syntaxes":[{"syntax":"selectNoPlayer","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"text":"Single player:\n\n```sqf\nselectNoPlayer;\nhint str player; // <NULL-object>\n```\n\nRough multiplayer emulation:\n\n```sqf\n_noPlayer = createGroup sideLogic createUnit [\n    \"Logic\",\n    [0,0,1000],\n    [],\n    0,\n    \"NONE\"\n];\nselectPlayer _noPlayer;\nhint str player; // L Charlie 4-3:1 (KK)\n```","code":["selectNoPlayer;\nhint str player; // <NULL-object>","_noPlayer = createGroup sideLogic createUnit [\n\t\"Logic\",\n\t[0,0,1000],\n\t[],\n\t0,\n\t\"NONE\"\n];\nselectPlayer _noPlayer;\nhint str player; // L Charlie 4-3:1 (KK)"]}],"multiplayer":"Does **not** work in multiplayer.","see_also":["selectPlayer"],"notes":[{"user":"Worldeater","date":"2010-10-15T07:48:00Z","text":"player returns objNull after this command has been used. It also has at least the following side effects: closeDialog won't work anymore and onKeyDown event handlers cease to detect the ESC key. In order to get things back to normal a new player object has to be set with selectPlayer. Using objNull won't cut it in this case."}]},{"name":"selectPlayer","title":"selectPlayer","type":"command","url":"https://community.bistudio.com/wiki/selectPlayer","revid":363391,"updated":"2024-03-29T17:43:01Z","groups":["Object Manipulation","Multiplayer"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Move player into given unit. Some usage advices:\n\n- Avoid using selectPlayer on editor-placed units in multiplayer, as it may, on occasion, lead to some undefined behaviour.\n- If you need to selectPlayer into another unit, consider creating a unit dynamically.\n\n  > [!NOTE]\n  > Before Arma 3 it was possible to selectPlayer another player-controlled unit, leading to control issues.\n\n> [!WARNING]\n> Creating and immediately selecting player into newly created unit could cause all sort of problems due to possible delay in unit initialisation.\n> Give the unit some time to propagate properly on the network before using this command on it.","syntaxes":[{"syntax":"selectPlayer unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["selectPlayer bob;"]}],"see_also":["selectNoPlayer","remoteControl","Team Switch","switchCamera","teamSwitch","enableTeamSwitch"],"notes":[{"user":"Killzone_Kid","date":"2015-06-24T23:34:00Z","text":"> [!IMPORTANT]\n> Most of the notes below do not apply to Arma 3 anymore."},{"user":"SnowSky","date":"2010-03-02T23:09:00Z","text":"**This command has significant effects on locality**!\nNotes on locality issues with selectPlayer in multiplayer environments:\n\n1) If you switch to a unit that's not local, control over movement will not be given to you immediately. For example, if you switch to an AI unit whose leader is a player, you will not be able to control the movement of your new avatar, as its control remains with the leader unit. You will however be able to look around while the unit walks automatically.\n\n2) The identity of units are not transferred properly: If your old unit dies, this will count for your stats. Your old unit might remain identifiable as you (if you aim at the unit you see your own name). Your new unit will keep it is name, face and voice (face can be set dynamically, but name, voice and glasses have to be defined before mission start in the description.ext). When chatting, not the name of your original identity, but the identity of the transferred to person will show.\n\nThose 2 Points were for ArmA I, I am currently analyzing the behaviour in Arma 2 with version 1.08 + OA 1.57\nSo with Arma 2, you still have to keep an eye on locality (otherwise the AI will controll the unit you are), but there are cool possibilities now: if you do a \"selectPlayer unitVarName\",the unit takes your identity (with name, voice, face and glasses) - and your identity is also visible on other clients!\n\nBut you have to remember that your old unit will stay with your Identity. Dies the old unit, the stats count it. An other thing you have to pay attention is the Death for your new unit - you have to register an EventHandler, otherwise you will stay in your dead unit, and also the MenuOption Respawn won't help you out! 3.Jan. 2011\n\n3) If you do a selectPlayer call, join,joinSilent,joinAs,joinAsSilent wont work anymore correctly. Means: Your unit joins the other group AND your unit will be local to the other group. so at the moment you can use selectPlayer only as a single human player in a group. In the later day I will try what happens if both human players are units by selectPlayer, and both join the same group (till yet tried with one selectPlayer unit and one originUnit)\n14.May 2011\n\nTried to create ingame a group with a selectPlayer Unit (on both clients), and joint the new squad. The result was, the group was local to the client who created the group, so after that, all other units that join that Group are - as you may think already, local to that single client. 18.May 2011"},{"user":"Besselinksjm","date":"2010-06-17T16:19:00Z","text":"4) After switching to a unit that's not local, the unit will remain local to you after switching back. For example, if we have units A and B, and a client starts as unit A and unit B is AI under server control. If you switch to unit B, it will take some time, but eventually you can control the movement of unit B (see (1) above). Now if you switch back to unit A, unit B will remain local to you, the player. Any server-side scripts which try to execute local arguments – such as doMove – will fail."},{"user":"Kju","date":"2010-06-17T17:20:00Z","text":"A working implementation can be found at *A&S ProMode dev-heaven repo* (dead link), acc guest, pw guest or at *pastebin* (dead link).\nBe careful to learn all the pitfalls and things you need to take into consideration to have this working in MP."},{"user":"EUTWtrnapster","date":"2014-03-09T19:06:00Z","text":"Arma 3 (v1.13): In MP the Identity and the name carries over to the new Unit but not in SP. Use setName+profileName to set the name in SP."}]},{"name":"selectRandom","title":"selectRandom","type":"command","url":"https://community.bistudio.com/wiki/selectRandom","revid":377101,"updated":"2026-01-01T09:58:32Z","groups":["Arrays"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns a random element from the given array. Engine solution to BIS_fnc_selectRandom","syntaxes":[{"syntax":"selectRandom array","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"}],"returns":{"type":"Anything","type_expr":"Anything","description":"random selected value or Nothing if array is empty"},"form":"unary","right":{"text":"array"}}],"examples":[{"code":["_randomElement = selectRandom [1,2,3,4,5];"]}],"see_also":["selectRandomWeighted","random","select","selectMin","selectMax"]},{"name":"selectRandomWeighted","title":"selectRandomWeighted","type":"command","url":"https://community.bistudio.com/wiki/selectRandomWeighted","revid":377677,"updated":"2026-01-02T09:02:40Z","groups":["Arrays"],"status":"ok","games":{"arma3":"1.76"},"since":"arma3 1.76","arma3_since":"1.76","description":"Returns a random element from the given array according to assigned weights. Engine solution to BIS_fnc_selectRandomWeighted. A few notes:\n\n- Negative weights are not supported\n- If an item's weight is 0, the item is ignored\n- The weights don't have to total to 1\n- If numbers of items and weights do not match, the shortest array is used\n- A single array Syntax is slightly faster than Alt Syntax","syntaxes":[{"syntax":"selectRandomWeighted valuesAndWeights","params":[{"name":"valuesAndWeights","type":"Array with [valueN, weightN]","description":"Array with [valueN, weightN]\n\n- valueN: Anything - weighted value\n- weightN: Number - values relative weight","type_expr":"Array","text":"valuesAndWeights: Array with [valueN, weightN]\n\n- valueN: Anything - weighted value\n- weightN: Number - values relative weight"}],"returns":{"type":"Anything","type_expr":"Anything","description":"random weighted value or Nothing if array is empty or all weights are 0"},"form":"unary","right":{"text":"valuesAndWeights"}},{"syntax":"values selectRandomWeighted weights","params":[{"name":"values","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"weights","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Anything","type_expr":"Anything","description":"random weighted value or Nothing if any of arrays is empty or all weights are 0"},"form":"binary","left":{"text":"values"},"right":{"text":"weights"}}],"examples":[{"code":["private _randomWeightedElement = selectRandomWeighted [1,0.1,2,0.2,3,1.3,4,2.4,5,7.5];"]},{"code":["private _randomWeightedElement = [1,2,3,4,5] selectRandomWeighted [0.1,0.2,1.3,2.4,7.5];"]}],"see_also":["random","select","selectRandom","selectMin","selectMax"],"notes":[{"user":"Killzone_Kid","date":"2017-06-26T19:17:00Z","text":"A 100000 runs of the following code:\n\n```sqf\n_values = [0,1,2,3,4,5,6,7,8,9];\n_weights = [0.109,0.65,0.01,1.01,1.24,0,1.59,0.09,1.15,0.55];\n_result = _values selectRandomWeighted _weights;\n```\n\nGave this result:\n\n```\n0 - 0\n0.01 - 144\n0.09 - 1409\n0.109 - 1633\n0.55 - 8673\n0.65 - 10127\n1.01 - 15668\n1.15 - 18059\n1.24 - 19518\n1.59 - 24769\n```"}]},{"name":"selectThrowable","title":"selectThrowable","type":"command","url":"https://community.bistudio.com/wiki/selectThrowable","revid":369741,"updated":"2024-10-08T15:05:51Z","groups":["Weapons","Unit Inventory"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Selects current throwable, which will be launched if the user presses <kbd>G</kbd>.","syntaxes":[{"syntax":"unit selectThrowable throwable","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"throwable","type":"String","description":"either the name of the throwable magazine or the name of the throwable muzzle","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success"},"form":"binary","left":{"text":"unit"},"right":{"text":"throwable"}}],"examples":[{"code":["player selectThrowable \"SmokeShellGreen\";"]},{"code":["player selectThrowable \"SmokeShellGreenMuzzle\";"]}],"see_also":["throwables","isThrowable","currentThrowable","selectWeapon","currentWeapon","currentMagazine","currentMuzzle","BIS_fnc_isThrowable"]},{"name":"selectWeapon","title":"selectWeapon","type":"command","url":"https://community.bistudio.com/wiki/selectWeapon","revid":373007,"updated":"2025-03-11T23:11:21Z","groups":["Weapons"],"status":"ok","games":{"ofp":"1.27","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.27","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Selects the given weapon.\n\n> [!NOTE]\n> Passing empty string will not deselect current weapon. Use 'SwitchWeapon' action instead:\n>\n> ```sqf\n> player action [\"SwitchWeapon\", player, player, -1]\n> ```","syntaxes":[{"syntax":"unitName selectWeapon muzzleName","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"muzzleName","type":"String","description":"name of the weapon or muzzle\n\n> [!IMPORTANT]\n> For weapons that have **more than one muzzle**, you have to input the **muzzleName** and not the **weaponName**.\n>\n> - In Operation Flashpoint, in most cases, both names are the same. But check.\n> - In Armed Assault the weaponNames and muzzleNames are different.\n> - For muzzle names see CfgWeapons.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"muzzleName"}},{"syntax":"unit selectWeapon [weapon, muzzle, firemode]","since":"arma3 2.08","params":[{"name":"unit","type":"Object","description":"person. This argument has to be local, or it can be remote when executed on the server","type_expr":"Object"},{"name":"weapon","type":"String","description":"name of the weapon, personal or vehicle's weapon (see weaponState)","type_expr":"String"},{"name":"muzzle","type":"String","description":"name of the selected muzzle (see weaponState)","type_expr":"String"},{"name":"firemode","type":"String","description":"name of the firemode (see weaponState)","type_expr":"String"}],"returns":{"type":"Boolean or Nothing","type_expr":"Boolean | Nothing","description":"true on success, false on failure, Nothing when the call to the command is dispatched over network"},"form":"binary","left":{"text":"unit"},"right":{"text":"[weapon, muzzle, firemode]"}}],"examples":[{"code":["_soldier1 selectWeapon \"LAWLauncher\";"]},{"code":["player selectWeapon \"M203Muzzle\";"]},{"code":["player selectWeapon [\"arifle_MX_GL_ACO_F\", \"arifle_MX_GL_ACO_F\", \"FullAuto\"];"]}],"see_also":["fire","forceWeaponFire","primaryWeapon","handgunWeapon","secondaryWeapon","weapons","ArmA: Actions","isSwitchingWeapon"],"notes":[{"user":"Dr_Eyeball","date":"2008-08-05T09:49:00Z","text":"Rather than simply using selectWeapon to select your default weapon after adding them to your player, it is recommended you use a script instead similar to the following, which caters for multiple muzzles:\nSelectWeapon.sqf\n\n```sqf\n// Desc: select default weapon & handle multiple muzzles\nif (count weapons player > 0) then\n{\n    private ['_type', '_muzzles'];\n\n    _type = ((weapons player) select 0);\n    // check for multiple muzzles (eg: GL)\n    _muzzles = getArray (configFile >> \"cfgWeapons\" >> _type >> \"muzzles\");\n\n    if (count _muzzles > 1) then\n    {\n        player selectWeapon (_muzzles select 0);\n    }\n    else\n    {\n        player selectWeapon _type;\n    };\n};\n```"},{"user":"MaestrO.fr","date":"2010-03-22T15:45:00Z","text":"Can be used with primaryWeapon to select the primary weapon.\nAn example with muzzle care (see Dr_EyeBall note) :\n\n```sqf\nif ((primaryWeapon player) != \"\") then\n{\n    private ['_type', '_muzzles'];\n\n    _type = primaryWeapon player;\n    // check for multiple muzzles (eg: GL)\n    _muzzles = getArray (configFile >> \"cfgWeapons\" >> _type >> \"muzzles\");\n\n    if (count _muzzles > 1) then\n    {\n        player selectWeapon (_muzzles select 0);\n    }\n    else\n    {\n        player selectWeapon _type;\n    };\n};\n```"}]},{"name":"selectWeaponTurret","title":"selectWeaponTurret","type":"command","url":"https://community.bistudio.com/wiki/selectWeaponTurret","revid":377503,"updated":"2026-01-02T06:49:33Z","groups":["Turrets"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","description":"Selects the given weapon on the specified turret. Use turret path [-1] for the driver's turret.","syntaxes":[{"syntax":"vehicle selectWeaponTurret [weapon, turretPath, muzzle, firemode]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"weapon","type":"String","description":"weapon class name or (since Arma 3 v1.64) muzzle class name","type_expr":"String"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"},{"name":"muzzle","type":"String","optional":true,"description":"muzzle name","type_expr":"String","since":"arma3 2.08","text":"muzzle: String - (Optional) muzzle name"},{"name":"firemode","type":"String","optional":true,"description":"firemode name","type_expr":"String","since":"arma3 2.08","text":"firemode: String - (Optional) firemode name"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[weapon, turretPath, muzzle, firemode]"}}],"examples":[{"code":["MBT_Kuma selectWeaponTurret [\"LMG_coax\",[0]];"]},{"code":["Kamysh selectWeaponTurret [\"missiles_titan\", [0], \"missiles_titan\", \"topdown\"];"]}],"see_also":["removeWeaponTurret","weaponState","turretLocal","addMagazineTurret","magazinesTurret","removeMagazinesTurret","removeMagazineTurret","weaponsTurret","currentMagazineDetailTurret","currentMagazineTurret","currentWeaponTurret","addWeaponTurret"],"notes":[{"user":"Killzone_Kid","date":"2017-02-13T16:54:00Z","text":"The command will treat weapon or muzzle param like a weapon first. If no such weapon is found then it will try to find muzzle with such name. For example AMV-7 Marshall APC has main gun \"autocannon_40mm_CTWS\" which has 2 muzzles \"HE\" and \"AP\". Default muzzle is \"HE\". So if you try to select weapon by the name \"autocannon_40mm_CTWS\" you will always get \"HE\" muzzle selected. However if you pass \"AP\" as param, it will correctly select \"AP\" muzzle, since no \"AP\" weapon exists on this turret it will continue searching for a muzzle with this name and will find it eventually."}]},{"name":"sendAUMessage","title":"sendAUMessage","type":"command","url":"https://community.bistudio.com/wiki/sendAUMessage","revid":321116,"updated":"2022-05-13T14:14:53Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Send the command to the list of clients.","syntaxes":[{"syntax":"sendAUMessage [clientList, command]","params":[{"name":"clientList","type":"Array","type_expr":"Array"},{"name":"command","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[clientList, command]"}}],"examples":[{"code":["sendAUMessage [[dpnid1, dpnid2], \"ConnectTo: 192.168.1.66\"];"]}],"see_also":["sendUDPMessage"]},{"name":"sendSimpleCommand","title":"sendSimpleCommand","type":"command","url":"https://community.bistudio.com/wiki/sendSimpleCommand","revid":336305,"updated":"2022-12-21T11:10:14Z","groups":["Unit Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Sends a simple command to the vehicle's driver / gunner (air vehicles ignore it). See also vehicleMoveInfo.\n\n> [!IMPORTANT]\n> Doesn't seem to work if AI driver is alone, needs another unit in the vehicle (could be another AI or player) that is set as setEffectiveCommander. If driver is effectiveCommander it will refuse any drive commands.\n\n> [!NOTE]\n> **Arma 3:** Due to some sort of a bug when vehicle is ordered turning (\"LEFT\" or \"RIGHT\"), it locks the vehicle ability to respond to any other commands properly. Always use \"STOPTURNING\" to cancel turning before issuing other move commands\n\n| Gunner commands | Driver Move commands | Driver Turn commands |\n|---|---|---|\n| - `\"FIRE\"`<br>- `\"CEASE FIRE\"`<br>- `\"MANUAL FIRE\"`<br>- `\"CANCEL MANUAL FIRE\"`<br>- `\"KEY FIRE\"` | - `\"FORWARD\"` - move forward<br>- `\"FAST\"` - move forward, fast<br>- `\"SLOW\"` - move forward, slow<br>- `\"STOP\"` - stop moving forward or backward<br>- `\"BACK\"` - move backward<br>- `\"KEY UP\"`<br>- `\"KEY DOWN\"`<br>- `\"KEY FAST\"`<br>- `\"KEY SLOW\"` | - `\"LEFT\"` - turn left, while moving or not<br>- `\"RIGHT\"` - turn right, while moving or not<br>- Arma 3 v1.78 `\"STOPTURNING\"` cancel turning (special case, normally would be called by the engine when LEFT or RIGHT turn key is released by the player) |","syntaxes":[{"syntax":"vehicleName sendSimpleCommand command","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"},{"name":"command","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"command"}}],"examples":[{"code":["vehicle player sendSimpleCommand \"STOP\";"]}],"see_also":["vehicleMoveInfo","useAISteeringComponent","effectiveCommander","setEffectiveCommander","enableAI","disableAI","enableAIFeature","enableSentences"],"notes":[{"user":"Ceeeb","date":"2007-04-16T04:52:00Z","text":"Valid commands include: \"FORWARD\", \"SLOW\", \"FAST\" \"BACK\", \"LEFT\", \"RIGHT\", \"STOP\", \"FIRE\", \"CEASE FIRE\", \"MANUAL FIRE\", \"CANCEL MANUAL FIRE\". There may be more.\n\nOnly vehicles crewed by a player can use sendSimpleCommand."},{"user":"Killzone_Kid","date":"2014-01-26T15:58:00Z","text":"Other commands that work: \"KEY FIRE\", \"KEY FAST\", \"KEY SLOW\", \"KEY DOWN\", \"KEY UP\". These will simulate key presses.\n\nIn Arma 3 player doesn't always need to be in the vehicle to give commands."}]},{"name":"sendTask","title":"sendTask","type":"command","url":"https://community.bistudio.com/wiki/sendTask","revid":330641,"updated":"2022-10-03T11:04:22Z","groups":["Briefing","Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Create a new AI task (subtask of parentTask). Type is name of registered task type.","syntaxes":[{"syntax":"sender sendTask [receiver,[type] or [type,parentTask],priority,name1,value1,name2,value2,...]","params":[{"name":"sender","type":"Team Member","type_expr":"Team Member"},{"name":"[receiver,[type] or [type,parentTask],priority,name1,value1,name2,value2,...]: Array","type_expr":"Array"}],"returns":{"type":"Task","type_expr":"Task"},"form":"binary","left":{"text":"sender"},"right":{"text":"[receiver,[type] or [type,parentTask],priority,name1,value1,name2,value2,...]"}}]},{"name":"sendTaskResult","title":"sendTaskResult","type":"command","url":"https://community.bistudio.com/wiki/sendTaskResult","revid":363249,"updated":"2024-03-26T10:51:23Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Send a result of the task to the task sender.","syntaxes":[{"syntax":"task sendTaskResult [state,result,sentence]","params":[{"name":"task","type":"Task","type_expr":"Task"},{"name":"[state,result,sentence]","type":"Array","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"task"},"right":{"text":"[state,result,sentence]"}}]},{"name":"sendUDPMessage","title":"sendUDPMessage","type":"command","url":"https://community.bistudio.com/wiki/sendUDPMessage","revid":351538,"updated":"2023-12-06T23:45:43Z","groups":["Multiplayer"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Send message to given address using UDP protocol. Returns false if the message has not been delivered\n\n> [!WARNING]\n> Disabled in retail version (see the talk page for more info).","syntaxes":[{"syntax":"sendUDPMessage [ip, port, message]","params":[{"name":"ip","type":"String","type_expr":"String"},{"name":"port","type":"Number","type_expr":"Number"},{"name":"message","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"[ip, port, message]"}}],"examples":[{"code":["_bool = sendUDPMessage [\"192.168.0.1\", 2302, \"Here goes you message...\"];"]}],"see_also":["sendAUMessage"]},{"name":"sentencesEnabled","title":"sentencesEnabled","type":"command","url":"https://community.bistudio.com/wiki/sentencesEnabled","revid":349008,"updated":"2023-11-08T14:47:05Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"A getter for enableSentences.","syntaxes":[{"syntax":"sentencesEnabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if sentences are enabled"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (sentencesEnabled) then\n{\n    hint \"sentences are enabled; changing that now\";\n    enableSentences false;\n};\n```","code":["if (sentencesEnabled) then\n{\n\thint \"sentences are enabled; changing that now\";\n\tenableSentences false;\n};"]}],"see_also":["enableSentences"]},{"name":"serverCommand","title":"serverCommand","type":"command","url":"https://community.bistudio.com/wiki/serverCommand","revid":377886,"updated":"2026-01-04T16:30:46Z","groups":["Multiplayer"],"status":"ok","games":{"arma2":"1.05","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.05","arma3_since":"0.50","description":"Executes the given server command. Requires you to be **logged-in** admin as client to execute on a client, or provide the **serverCommandPassword** with the serverCommand execution as client/server to basically also get logged in admin permissions.\n\n> [!NOTE]\n> - Available commands for execution can be found with serverCommandAvailable\n> - Commands that can be executed can be found with serverCommandExecutable\n\n> [!IMPORTANT]\n> If serverCommand is executed on a client, it must be executed from UI context, such as \"onButtonDown\" or similar events (see User Interface Event Handlers).","syntaxes":[{"syntax":"serverCommand command","params":[{"name":"command","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"false if a non valid command is used (\"#blah\"), false otherwise (was always true before Arma 3 v1.40)"},"form":"unary","right":{"text":"command"}},{"syntax":"password serverCommand command","since":"arma3 1.40","server_exec":true,"params":[{"name":"password","type":"String","description":"case-sensitive password defined in server config with `serverCommandPassword` param","type_expr":"String"},{"name":"command","type":"String","description":"server command","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"false if command failed at some stage. true doesn't mean that command succeeded."},"form":"binary","left":{"text":"password"},"right":{"text":"command"}}],"examples":[{"code":["serverCommand \"#logout\";"]},{"text":"Create button on the main map which will show userlist to anyone who clicks on it:\n\n```sqf\nwith uiNamespace do\n{\n    private _ctrl = findDisplay 12 ctrlCreate [\"RscButton\", -1];\n    _ctrl ctrlSetPosition [0,0,0.5,0.1];\n    _ctrl ctrlSetText \"USERLIST\";\n    _ctrl ctrlCommit 0;\n    _ctrl ctrlAddEventHandler [\"ButtonDown\",\n    {\n        serverCommand \"#userlist\";\n    }];\n};\n```","code":["with uiNamespace do \n{\n\tprivate _ctrl = findDisplay 12 ctrlCreate [\"RscButton\", -1];\n\t_ctrl ctrlSetPosition [0,0,0.5,0.1];\n\t_ctrl ctrlSetText \"USERLIST\";\n\t_ctrl ctrlCommit 0;\n\t_ctrl ctrlAddEventHandler [\"ButtonDown\", \n\t{\n\t\tserverCommand \"#userlist\";\n\t}];\n};"]},{"code":["serverCommand format [\"#kick %1\",_name];"]},{"code":["private _passwordWasOK = \"MyServerCommandPassword\" serverCommand \"#lock\";"]}],"see_also":["serverCommandAvailable","serverCommandExecutable","admin","isUIContext"],"categories_extra":["Introduced with Arma 3 version 1.40","Scripting Commands: Server Execution"]},{"name":"serverCommandAvailable","title":"serverCommandAvailable","type":"command","url":"https://community.bistudio.com/wiki/serverCommandAvailable","revid":370060,"updated":"2024-10-29T14:40:43Z","groups":["Multiplayer"],"status":"ok","games":{"arma2":"1.05","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.05","arma3_since":"0.50","description":"Returns true if given serverCommand is available on current machine, false if not.\n\n> [!NOTE]\n> Execution via RCon is basically being **logged-in** as admin in terms of permissions.\n\n| Arma 3 Multiplayer Server Commands | Available to |  |  |  |\n|---|---|---|---|---|\n| Arma 3 Multiplayer Server Commands | Client | Voted Admin | Logged Admin | Server Host |\n| `#login`, `#userlist`, `#beclient`, `#vote` | ✓ | ✓ | ✓ | ✓ |\n| `#kick`, `#debug` | ✗ | ✓ | ✓ | ✓ |\n| `#lock`, `#unlock`, `#maxping`, `#maxdesync`, `#maxpacketloss` | ✗ | ✗ | ✓ | ✓ |\n| `#logout`, `#restart`, `#mission`, `#missions`, `#reassign`, `#monitor`, `#init` | ✗ | ✓ | ✓ | ✗ |\n| `#shutdown`, `#restartserver`, `#restartserveraftermission`, `#shutdownaftermission`, `#dctimeout`, `#exec`, `#monitords`, `#beserver` | ✗ | ✗ | ✓ | ✗ |\n| `#logentities`, `#exportjipqueue` | ✗ | ✗ | ✓ | ✓ |\n| Profiling type builds only: `#captureframe`, `#captureslowframe` | ✗ | ✗ | ✓ | ✓ |\n\nTo check if a server command can be executed in the current environment, use serverCommandExecutable.\n\n> [!NOTE]\n> The table above does not apply to the command's password variant on a dedicated server as everything is available to it.","syntaxes":[{"syntax":"serverCommandAvailable command","params":[{"name":"command","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"command"}}],"examples":[{"code":["_can = serverCommandAvailable \"#kick\";"]},{"text":"```sqf\nif (serverCommandAvailable \"#logout\") then\n{\n    hint \"You are a some sort of admin\";\n};\n```","code":["if (serverCommandAvailable \"#logout\") then \n{\n\thint \"You are a some sort of admin\";\n};"]}],"see_also":["serverCommand","serverCommandExecutable","admin","isServer","Multiplayer Server Commands"]},{"name":"serverCommandExecutable","title":"serverCommandExecutable","type":"command","url":"https://community.bistudio.com/wiki/serverCommandExecutable","revid":369186,"updated":"2024-09-03T10:34:46Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns true if the serverCommand can be performed on the machine and in this exact environment, otherwise false. serverCommand can be executed only from User Interface Event Handlers, and this command also checks if that's the case.","syntaxes":[{"syntax":"serverCommandExecutable command","params":[{"name":"command","type":"String","description":"see Multiplayer Server Commands for all available commands","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"command"}}],"examples":[{"code":["_canKick = serverCommandAvailable \"#kick\";"]},{"text":"Add button to the main map to lock server, which could only be activated by admin:\n\n```sqf\nwith uiNamespace do {\n    ctrl = findDisplay 12 ctrlCreate [\"RscButton\", -1];\n    ctrl ctrlSetPosition [0, 0, 0.5, 0.1];\n    ctrl ctrlCommit 0;\n    ctrl ctrlSetText \"LOCK SERVER\";\n    ctrl ctrlAddEventHandler [\"ButtonDown\",\n    {\n        if (serverCommandExecutable \"#lock\") then {\n            serverCommand \"#lock\";\n        } else {\n            hint \"You need to be logged in as admin to do this\";\n        };\n    }];\n};\n```","code":["with uiNamespace do {\n\tctrl = findDisplay 12 ctrlCreate [\"RscButton\", -1];\n\tctrl ctrlSetPosition [0, 0, 0.5, 0.1];\n\tctrl ctrlCommit 0;\n\tctrl ctrlSetText \"LOCK SERVER\";\n\tctrl ctrlAddEventHandler [\"ButtonDown\",\n\t{\t\n\t\tif (serverCommandExecutable \"#lock\") then {\n\t\t\tserverCommand \"#lock\";\n\t\t} else {\n\t\t\thint \"You need to be logged in as admin to do this\";\n\t\t};\n\t}];\n};"]}],"see_also":["serverCommand","serverCommandAvailable","Multiplayer Server Commands"]},{"name":"serverName","title":"serverName","type":"command","url":"https://community.bistudio.com/wiki/serverName","revid":319671,"updated":"2022-05-13T09:24:40Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","description":"Returns name of the hosting server in MP, \"\" in SP.","syntaxes":[{"syntax":"serverName","params":[],"returns":{"type":"String","type_expr":"String"},"form":"nullary"}],"examples":[{"code":["hint format [\"Welcome to the %1 server!\", serverName];"]}],"see_also":["worldName","briefingName","missionName","worldSize"]},{"name":"serverNamespace","title":"serverNamespace","type":"command","url":"https://community.bistudio.com/wiki/serverNamespace","revid":351793,"updated":"2024-01-11T04:51:36Z","groups":["Namespaces","Variables","Multiplayer"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"server_exec":true},"description":"Returns server's namespace.\nThis namespace is only available on the server for the server's uptime duration (same as uiNamespace).\nAll server event handlers, which are available in server config, use this namespace.","syntaxes":[{"syntax":"serverNamespace","params":[],"returns":{"type":"Namespace","type_expr":"Namespace | Nothing","description":"on the server, Nothing on clients or in single-player.","text":"Namespace on the server, Nothing on clients or in single-player."},"form":"nullary"}],"examples":[{"text":"```sqf\nif (isServer) then\n{\n    hint str allVariables serverNamespace;\n}\nelse\n{\n    hint \"you do not have permission!\";\n};\n```","code":["if (isServer) then\n{\n\thint str allVariables serverNamespace;\n}\nelse\n{\n\thint \"you do not have permission!\";\n};"]}],"see_also":["missionNamespace","setVariable","getVariable","allVariables"]},{"name":"serverTime","title":"serverTime","type":"command","url":"https://community.bistudio.com/wiki/serverTime","revid":364976,"updated":"2024-07-04T17:33:25Z","groups":["Time","Mission Information","Multiplayer"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Returns the time since latest server (re)start in seconds.\n\n> [!IMPORTANT]\n> The time returned is different to the time returned by time and diag_tickTime commands on server.\n\n> [!NOTE]\n> Known issues before Arma 3 v1.86:\n> both server and clients showed the same value when synced, but the only time it was not synced was on the server, right after server restart and only for the first 300 seconds. Client-side it was synced from the start.","syntaxes":[{"syntax":"serverTime","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["hint format [\"Synced server time : %1\", serverTime];"]}],"multiplayer":"- In singleplayer: Arma 3 v2.18 returns the same value as diag_tickTime, the time since game launch (returned 0 before v2.18)\n- In multiplayer: It is synced to all clients both at mission start and when a new client connects to it, and every 5 minutes. Synchronisation can be forced by executing the estimatedTimeLeft command.","see_also":["time","diag_tickTime","date","missionStart","estimatedTimeLeft","estimatedEndServerTime","systemTime","systemTimeUTC"]},{"name":"set","title":"set","type":"command","url":"https://community.bistudio.com/wiki/set","revid":377132,"updated":"2026-01-01T10:26:06Z","groups":["Arrays","HashMap"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Changes the element at the given zero-based index of the array.\n\n> [!NOTE]\n> If the index is out of bounds, the array will resize to incorporate the index as its last value, padding with nil as necessary (see Example 4).","syntaxes":[{"syntax":"array set [index, value]","params":[{"name":"array","type":"Array of Anything","type_expr":"Array<Anything>"},{"name":"index","type":"Number","description":"0-based array index. Arma 3 v2.12 negative index can be used to select from the end of the array, i.e. -1 means last array element.","type_expr":"Number"},{"name":"value","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"array"},"right":{"text":"[index, value]"}},{"syntax":"hashMap set [key, value, insertOnly]","since":"arma3 2.02","params":[{"name":"hashMap","type":"HashMap","type_expr":"HashMap"},{"name":"key","type":"HashMapKey","type_expr":"HashMapKey"},{"name":"value","type":"Anything","type_expr":"Anything"},{"name":"insertOnly","type":"Boolean","optional":true,"default":"false","description":"if set to true, set the value only if the key does not exist already","type_expr":"Boolean","since":"arma3 2.08","text":"insertOnly: Boolean - (Optional, default false) if set to true, set the value only if the key does not exist already"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"false if the key is new to the hashmap, true if a value got overwritten"},"form":"binary","left":{"text":"hashMap"},"right":{"text":"[key, value, insertOnly]"}}],"examples":[{"code":["_arrayOne set [0, \"Hello\"];"]},{"text":"Append \"Bye\" as last element to `_arrayTwo`:\n\n```sqf\n_arrayTwo set [count _arrayTwo, \"Bye\"];\n```","code":["_arrayTwo set [count _arrayTwo, \"Bye\"];"]},{"text":"Replace the last element of `_arrayThree` with 23:\n\n```sqf\n_arrayThree set [(count _arrayThree) - 1, 23];\n```","code":["_arrayThree set [(count _arrayThree) - 1, 23];"]},{"text":"Using set with an index that is out of bounds:\n\n```sqf\nprivate _array = [\"A\"];\n_array set [2, \"C\"]; // _array is now [\"A\", nil, \"C\"]\n_array set [1, \"B\"]; // _array is now [\"A\", \"B\", \"C\"]\n```","code":["private _array = [\"A\"];\n_array set [2, \"C\"]; // _array is now [\"A\", nil, \"C\"]\n_array set [1, \"B\"]; // _array is now [\"A\", \"B\", \"C\"]"]},{"code":["private _myHashMap = createHashMap;\n_myHashMap set [\"key\", \"value1\", true]; // \"key\" value is set to \"value1\"\n_myHashMap set [\"key\", \"value2\", true]; // \"key\" value is still \"value1\" as \"key\" already exists in the hashmap"]}],"see_also":["resize","reverse","select","deleteAt","deleteRange"]},{"name":"set3DENAttachedCursorEntity","title":"set3DENAttachedCursorEntity","type":"command","url":"https://community.bistudio.com/wiki/set3DENAttachedCursorEntity","revid":369759,"updated":"2024-10-08T15:08:56Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Attach an entity to the Eden Editor cursor.","syntaxes":[{"syntax":"set3DENAttachedCursorEntity entityHashMap","params":[{"name":"entityHashMap","type":"HashMap","description":"in format [[\"type\", entityType], otherOptions] where *entityType* can be one of:\n\n| type | options<br>case-sensitive! |\n|---|---|\n| \"object\" | - \"classname\": String - object classname; see Arma 3: Assets |\n| \"marker\" | - \"classname\": String - see marker classes<br>- \"markershape\": String - can be one of:<br>  - \"icon\"<br>  - \"rectangle\"<br>  - \"ellipse\"<br>    > [!IMPORTANT]<br>    > \"polyline\" is **not** supported. |\n| \"trigger\" | - \"classname\": String - object classname; from CfgNonAIVehicles with simulation=\"detector\". Usually \"EmptyDetector\" |\n| \"module\" | - \"classname\": String - object classname; |\n| \"waypoint\" | - \"classname\": String - classname; from CfgWaypoints |","type_expr":"HashMap"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"entityHashMap"}}],"examples":[{"code":["set3DENAttachedCursorEntity createHashMapFromArray [[\"type\", \"object\"], [\"classname\", \"B_Survivor_F\"]];"]},{"code":["set3DENAttachedCursorEntity createHashMapFromArray [[\"type\", \"marker\"], [\"classname\", \"mil_pickup\"], [\"markertype\", \"icon\"]];"]}],"see_also":["Eden Editor: Object","typeOf"]},{"name":"set3DENAttribute","title":"set3DENAttribute","type":"command","url":"https://community.bistudio.com/wiki/set3DENAttribute","revid":348910,"updated":"2023-11-08T14:40:02Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Sets one of entity attributes. For the list of all attributes with their properties see Setting Attributes.\n\n> [!IMPORTANT]\n> Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!","syntaxes":[{"syntax":"entity set3DENAttribute [class, value]","params":[{"name":"entity","type":"Eden Entity or Eden ID","type_expr":"Eden Entity | Eden ID"},{"name":"class","type":"String","description":"attribute name","type_expr":"String"},{"name":"value","type":"Anything","description":"new attribute value","type_expr":"Anything"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true If the value was set"},"form":"binary","left":{"text":"entity"},"right":{"text":"[class, value]"}}],"examples":[{"code":["player set3DENAttribute [\"allowDamage\", false]; // Mark player as invincible"]}],"see_also":["set3DENAttributes","get3DENAttribute"]},{"name":"set3DENAttributes","title":"set3DENAttributes","type":"command","url":"https://community.bistudio.com/wiki/set3DENAttributes","revid":321117,"updated":"2022-05-13T14:15:26Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Set entity attributes.\nAn attribute is identified by its `property` (`data` when it is engine-drive attribute) value in config.\nFor the list of all attributes with their properties, see Setting Attributes.\n\n> [!IMPORTANT]\n> Attributes are available only within the Eden Editor workspace and cannot be accessed in scenario preview or exported scenario!","syntaxes":[{"syntax":"set3DENAttributes [[entities1, class1, value1], [entities2, class2, value2], ...]","params":[{"name":"entitiesN","type":"Array of Eden Entity or Eden ID","type_expr":"Array<Eden Entity | Eden ID>"},{"name":"classN","type":"String","description":"attribute name","type_expr":"String"},{"name":"valueN","type":"Anything","description":"new attribute value","type_expr":"Anything"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the value was set"},"form":"unary","right":{"text":"[[entities1, class1, value1], [entities2, class2, value2], ...]"}}],"examples":[{"code":["// Set all selected objects as playable\nset3DENAttributes [[get3DENSelected \"Object\", \"ControlMP\", true]];"]}],"see_also":["get3DENAttribute","clear3DENAttribute"]},{"name":"set3DENGrid","title":"set3DENGrid","type":"command","url":"https://community.bistudio.com/wiki/set3DENGrid","revid":353050,"updated":"2024-03-12T12:23:19Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Sets the grid increment for the given transformation type.","syntaxes":[{"syntax":"set3DENGrid [type, value]","params":[{"name":"type","type":"String","description":"name of transformation type. Can be:\n\n- `\"r\"` - Rotation\n- `\"t\"` - Translation\n- `\"s\"` - Scale","type_expr":"String"},{"name":"value","type":"Number","description":"transformation increment","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[type, value]"}}],"examples":[{"code":["set3DENGrid [\"t\", 100]; // 100m movement increment"]}],"see_also":["get3DENGrid"]},{"name":"set3DENIconsVisible","title":"set3DENIconsVisible","type":"command","url":"https://community.bistudio.com/wiki/set3DENIconsVisible","revid":342174,"updated":"2023-07-09T12:26:58Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Toggle visibility of Eden Editor icons.","syntaxes":[{"syntax":"set3DENIconsVisible [showMap, showScene]","params":[{"name":"showScene","type":"Boolean","description":"visibility in the scene","type_expr":"Boolean"},{"name":"showMap","type":"Boolean","description":"visibility in the map","type_expr":"Boolean","text":"showMap : Boolean - visibility in the map"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[showMap, showScene]"}}],"examples":[{"code":["set3DENIconsVisible [false, false]; // Hide all icons"]}],"see_also":["get3DENIconsVisible","set3DENLinesVisible","get3DENLinesVisible","set3DENModelsVisible"]},{"name":"set3DENLayer","title":"set3DENLayer","type":"command","url":"https://community.bistudio.com/wiki/set3DENLayer","revid":377849,"updated":"2026-01-03T11:30:21Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Set layer for Eden Entity.","syntaxes":[{"syntax":"entity set3DENLayer layerID","params":[{"name":"entity","type":"Eden Entity","type_expr":"Eden Entity"},{"name":"layerID","type":"Number","description":"layer ID as returned by add3DENLayer command","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the entity was moved succesfully"},"form":"binary","left":{"text":"entity"},"right":{"text":"layerID"}}],"examples":[{"code":["private _myLayer = -1 add3DENLayer \"CTRG\";\nplayer set3DENLayer _myLayer;"]},{"code":["player set3DENLayer -1; // Move to root"]}],"see_also":["add3DENLayer","remove3DENLayer","get3DENLayerEntities"]},{"name":"set3DENLinesVisible","title":"set3DENLinesVisible","type":"command","url":"https://community.bistudio.com/wiki/set3DENLinesVisible","revid":342208,"updated":"2023-07-09T12:27:19Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Toggle visibility of Eden Editor lines.","syntaxes":[{"syntax":"set3DENLinesVisible [showMap, showScene]","params":[{"name":"showScene","type":"Boolean","description":"visibility in the scene","type_expr":"Boolean"},{"name":"showMap","type":"Boolean","description":"visibility in the map","type_expr":"Boolean","text":"showMap : Boolean - visibility in the map"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[showMap, showScene]"}}],"examples":[{"code":["set3DENLinesVisible [false, false];// Hide all lines"]}],"see_also":["get3DENLinesVisible","set3DENIconsVisible","get3DENIconsVisible"]},{"name":"set3DENLogicType","title":"set3DENLogicType","type":"command","url":"https://community.bistudio.com/wiki/set3DENLogicType","revid":310924,"updated":"2022-05-07T20:45:59Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Sets the new type of Logic object(s). For other objects use set3DENObjectType.","syntaxes":[{"syntax":"objects set3DENLogicType classname","params":[{"name":"objects","type":"Array of Objects","type_expr":"Array<Object>"},{"name":"classname","type":"String","description":"name of the cfgVehicles class","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"objects"},"right":{"text":"classname"}}],"examples":[{"code":["[get3DENSelected \"logic\" select 0] set3DENLogicType \"MiscOR_F\";"]}],"see_also":["set3DENObjectType","get3DENMouseOver","add3DENConnection","add3DENEventHandler","all3DENEntities","collect3DENHistory","create3DENComposition","create3DENEntity","current3DENOperation","delete3DENEntities","do3DENAction","get3DENActionState","get3DENAttribute","get3DENCamera","get3DENConnections","get3DENEntityID","get3DENGrid","get3DENIconsVisible","get3DENLinesVisible","get3DENSelected","is3DEN","is3DENMultiplayer","move3DENCamera","remove3DENConnection","remove3DENEventHandler","removeAll3DENEventHandlers","set3DENAttributes","set3DENGrid","set3DENIconsVisible","set3DENLinesVisible"]},{"name":"set3DENMissionAttribute","title":"set3DENMissionAttribute","type":"command","url":"https://community.bistudio.com/wiki/set3DENMissionAttribute","revid":351680,"updated":"2023-12-20T14:55:30Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Set scenario attribute.\nAn attribute is identified by its `property` (`data` when it is engine-drive attribute) value in config. For the list of all attributes with their properties, see Setting Attributes.\n\n> [!IMPORTANT]\n> Attributes are available only within the Eden Editor workspace. They cannot be accessed in scenario preview or exported scenario!\n\n> [!IMPORTANT]\n> Changing the value of an attribute will also execute the expression defined in its config.","syntaxes":[{"syntax":"section set3DENMissionAttribute [class, value]","params":[{"name":"section","type":"String","description":"attribute section. See Sections & Properties","type_expr":"String"},{"name":"class","type":"String","description":"attribute name","type_expr":"String"},{"name":"value","type":"Anything","description":"new attribute value","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"section"},"right":{"text":"[class, value]"}}],"examples":[{"code":["\"Multiplayer\" set3DENMissionAttribute [\"respawn\", 3]; // Set respawn type to 3"]}],"see_also":["get3DENMissionAttribute","set3DENMissionAttributes"]},{"name":"set3DENMissionAttributes","title":"set3DENMissionAttributes","type":"command","url":"https://community.bistudio.com/wiki/set3DENMissionAttributes","revid":364856,"updated":"2024-06-25T09:27:10Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Set scenario attributes.\nAn attribute is identified by its `property` (`data` when it is an engine-driven attribute) value in config.\nFor the list of all attributes with their properties, see Mission Attributes.\n\n> [!IMPORTANT]\n> Attributes are available only within the Eden Editor workspace. You cannot access them in scenario preview or exported scenario!","syntaxes":[{"syntax":"set3DENMissionAttributes [[section1, class1, value1], ...]","params":[{"name":"sectionN","type":"String","description":"attribute section. See Sections & Properties","type_expr":"String"},{"name":"classN","type":"String","description":"attribute name","type_expr":"String"},{"name":"valueN","type":"Anything","description":"new attribute value","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[[section1, class1, value1], ...]"}}],"examples":[{"code":["// set respawn type to 3 and respawn delay to 10 seconds\nset3DENMissionAttributes [[\"Multiplayer\", \"respawn\", 3], [\"Multiplayer\", \"respawnDelay\", 10]];"]}],"see_also":["get3DENMissionAttribute","set3DENMissionAttribute"],"notes":[{"user":"R3vo","date":"2019-01-02T12:09:00Z","text":"Usually, the attributes value can be received by\n\n```sqf\n_sectionName get3DENMissionAttribute _attributeName; // See example above\n```\n\nHowever, if the attribute was not changed and it is default value is used get3DENMissionAttribute might return Nothing, even though in Eden Editor the attribute has got a value. In that case the attribute's config name is not identical to the 'property' or 'data' config value. To get the right values in these cases one has to do:\n\n```sqf\n_sectionName get3DENMissionAttribute _propertyName;\n// or\n_sectionName get3DENMissionAttribute _dataName;\n```"}]},{"name":"set3DENModelsVisible","title":"set3DENModelsVisible","type":"command","url":"https://community.bistudio.com/wiki/set3DENModelsVisible","revid":351312,"updated":"2023-11-27T04:55:31Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Enables or disables trigger area visibility.","syntaxes":[{"syntax":"set3DENModelsVisible [map, scene]","params":[{"name":"map","type":"Boolean","type_expr":"Boolean"},{"name":"scene","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[map, scene]"}}],"examples":[{"code":["set3DENModelsVisible [true, true];"]}],"see_also":["get3DENLinesVisible","get3DENIconsVisible"]},{"name":"set3DENObjectType","title":"set3DENObjectType","type":"command","url":"https://community.bistudio.com/wiki/set3DENObjectType","revid":364151,"updated":"2024-05-05T10:44:17Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Sets the classname of one or more given Eden Editor objects. For Logic objects use set3DENLogicType.","syntaxes":[{"syntax":"objects set3DENObjectType classname","params":[{"name":"objects","type":"Array of Objects","type_expr":"Array<Object>"},{"name":"classname","type":"String","description":"name of the cfgVehicles class","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"objects"},"right":{"text":"classname"}}],"examples":[{"code":["[get3DENMouseOver select 1] set3DENObjectType \"B_crew_F\"; // turns object under cursor into a blufor crewman"]}],"see_also":["set3DENLogicType","get3DENMouseOver","add3DENConnection","add3DENEventHandler","all3DENEntities","collect3DENHistory","create3DENComposition","create3DENEntity","current3DENOperation","delete3DENEntities","do3DENAction","get3DENActionState","get3DENAttribute","get3DENCamera","get3DENConnections","get3DENEntityID","get3DENGrid","get3DENIconsVisible","get3DENLinesVisible","get3DENSelected","is3DEN","is3DENMultiplayer","move3DENCamera","remove3DENConnection","remove3DENEventHandler","removeAll3DENEventHandlers","set3DENAttributes","set3DENGrid","set3DENIconsVisible","set3DENLinesVisible"]},{"name":"set3DENSelected","title":"set3DENSelected","type":"command","url":"https://community.bistudio.com/wiki/set3DENSelected","revid":352152,"updated":"2024-02-01T23:25:20Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Changes selection in Eden Editor to what is inside entities array.\n\n> [!WARNING]\n> This command will trigger the 3DEN event handler **\"OnSelectionChange\"**. Do not use it inside this event handler!","syntaxes":[{"syntax":"set3DENSelected entities","params":[{"name":"entities","type":"Array of Eden Entity or Eden ID","type_expr":"Array<Eden Entity | Eden ID>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"entities"}}],"examples":[{"code":["set3DENSelected [0,5,3,6,7,12];"]}],"see_also":["get3DENMouseOver","all3DENEntities","collect3DENHistory","get3DENEntityID","get3DENSelected","set3DENObjectType"]},{"name":"setAccTime","title":"setAccTime","type":"command","url":"https://community.bistudio.com/wiki/setAccTime","revid":338949,"updated":"2023-04-18T01:26:22Z","groups":["Time"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Set simulation acceleration coefficient. May also be used to slow time in cutscenes.","syntaxes":[{"syntax":"setAccTime accFactor","params":[{"name":"accFactor","type":"Number","description":"time factor; 2 will make time go twice as fast, 0.5 half of it, etc","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"accFactor"}}],"examples":[{"code":["setAccTime 0.1;"]}],"multiplayer":"Command is disabled in multiplayer.","problems":"This command is **not** clamped and incorrect values may be entered (negative values, high values, etc - game behaviour is then undefined).","see_also":["accTime","setTimeMultiplier","timeMultiplier","useAudioTimeForMoves"],"notes":[{"user":"Hardrock","date":"2006-08-04T10:58:00Z","text":"*Notes from before the conversion:*\n\nA good habit to get into is setting the accTime to 1 at the start of all cutscenes, in case the player is running at 4x speed when the scene starts."}]},{"name":"setActualCollectiveRTD","title":"setActualCollectiveRTD","type":"command","url":"https://community.bistudio.com/wiki/setActualCollectiveRTD","revid":377779,"updated":"2026-01-03T01:32:34Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Sets the collective pitch control to a specific position, regardless of input devices (until those are changed).\n\n- 0: collective fully down\n- ~0.7: approximate stable hover position\n- 1: collective fully up\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"helicopterRTD setActualCollectiveRTD value","params":[{"name":"helicopterRTD","type":"ObjectRTD","description":"helicopter","type_expr":"Object","text":"helicopterRTD : ObjectRTD - helicopter"},{"name":"value","type":"Number","description":"collective position","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"helicopterRTD"},"right":{"text":"value"}}],"examples":[{"code":["myHelicopterRTD setActualCollectiveRTD 0.7;"]}],"see_also":["collectiveRTD"]},{"name":"setAirplaneThrottle","title":"setAirplaneThrottle","type":"command","url":"https://community.bistudio.com/wiki/setAirplaneThrottle","revid":310925,"updated":"2022-05-07T20:46:43Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local"},"description":"Sets a wanted throttle position - works only on player's vehicle.","syntaxes":[{"syntax":"airplane setAirplaneThrottle value","params":[{"name":"airplane","type":"Object","type_expr":"Object"},{"name":"value","type":"Number","description":"wanted throttle","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"airplane"},"right":{"text":"value"}}],"examples":[{"code":["vehicle player setAirplaneThrottle 0.5;"]}],"see_also":["airplaneThrottle"]},{"name":"setAirportSide","title":"setAirportSide","type":"command","url":"https://community.bistudio.com/wiki/setAirportSide","revid":322975,"updated":"2022-06-28T21:42:54Z","groups":["Roads and Airports","Sides"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Set owning side of the airport. ID is the number to identify which airport on the island you want to check.","syntaxes":[{"syntax":"id setAirportSide side","params":[{"name":"id","type":"Number","type_expr":"Number"},{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"id"},"right":{"text":"side"}},{"syntax":"target setAirportSide side","since":"arma3 1.68","params":[{"name":"target","type":"Object","type_expr":"Object"},{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"target"},"right":{"text":"side"}}],"examples":[{"code":["0 setAirportSide east;"]}],"see_also":["airportSide","landAt","land","assignToAirport","allAirports","Arma: Airport IDs"]},{"name":"setAmmo","title":"setAmmo","type":"command","url":"https://community.bistudio.com/wiki/setAmmo","revid":369275,"updated":"2024-09-03T18:42:45Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets custom ammo count in the currently loaded magazine of the specified weapon or muzzle.","syntaxes":[{"syntax":"unit setAmmo [weaponOrMuzzle, count]","params":[{"name":"unit","type":"Object","description":"gunner or vehicle.","type_expr":"Object"},{"name":"weaponOrMuzzle","type":"String","description":"weapon name. Muzzle name in case the weapon has more than one muzzle, e.g. weapon with grenade launcher. See CfgWeapons for muzzle names","type_expr":"String"},{"name":"count","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[weaponOrMuzzle, count]"}}],"examples":[{"text":"Set player's handgun magazine ammo count to 10 rounds:\n\n```sqf\nplayer setAmmo [handgunWeapon player, 10];\n```","code":["player setAmmo [handgunWeapon player, 10];"]},{"text":"Set player's current weapon magazine ammo count to 1 round:\n\n```sqf\nplayer setAmmo [currentWeapon player, 1];\n```","code":["player setAmmo [currentWeapon player, 1];"]},{"text":"If player is a gunner in a vehicle, set current weapon magazine ammo count to 5 rounds:\n\n```sqf\nif (local vehicle player) then {\n    vehicle player setAmmo [currentWeapon vehicle player, 5];\n} else {\n    hint \"Vehicle must be local to this machine for 'setAmmo' to work\";\n};\n```","code":["if (local vehicle player) then {\n\tvehicle player setAmmo [currentWeapon vehicle player, 5];\n} else {\n\thint \"Vehicle must be local to this machine for 'setAmmo' to work\";\n};"]},{"text":"If you try to set more ammo than the magazine can hold, it will be clipped at default magazine capacity:\n\n```sqf\nplayer setAmmo [primaryWeapon player, 1000000]; // full mag with default ammo count\n```","code":["player setAmmo [primaryWeapon player, 1000000]; // full mag with default ammo count"]},{"text":"Some weapons has more than one muzzles:\n\n```sqf\n_marshall setAmmo [\"autocannon_40mm_CTWS\", 0];// won't work\n_marshall setAmmo [\"HE\", 0];// works\n```","code":["_marshall setAmmo [\"autocannon_40mm_CTWS\", 0];// won't work\n_marshall setAmmo [\"HE\", 0];// works"]}],"see_also":["ammo","setVehicleAmmo","setFuel","setHit"]},{"name":"setAmmoCargo","title":"setAmmoCargo","type":"command","url":"https://community.bistudio.com/wiki/setAmmoCargo","revid":379463,"updated":"2026-10-31T00:09:52Z","groups":["Vehicle Inventory"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Set amount of ammo resources in cargo space of a rearm vehicle. Ammo resource is used to resupply vehicles that take ammo. Soldiers use individual magazines instead.\n\nThe actual **quantity** to work with is determined by the model's class in CfgVehicles","syntaxes":[{"syntax":"vehicleName setAmmoCargo ammoCargo","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"},{"name":"ammoCargo","type":"Number in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"ammoCargo"}}],"examples":[{"code":["_ammoTruck1 setAmmoCargo 0.5;"]}],"see_also":["getAmmoCargo","setFuelCargo","setRepairCargo"],"notes":[{"user":"PlacidBox","date":"2011-08-31T00:00:00Z","text":"While the amount of total 'ammo' that can be reloaded is defined in the truck/supply point's CfgVehicles entry, the amount each round of ammunition takes from that total is defined in the CfgAmmo 'Cost' entry for that round.\n\nYour typical truck has 300000 ammo capacity, and the tunguska's missiles have a Cost of 50000. So the tunguska can reload a total of 6 missiles from the ammo truck before the ammo capacity is depleted and needs to be set with setAmmoCargo.\n\nA similar thing applies with a vehicle's cfgVehicle Cost entry for repairing, and the vehicle's fuelCapacity entry when refuelling."},{"user":"Waffle SS.","date":"2015-07-10T19:27:00Z","text":"(Arma 3 1.44) **setAmmoCargo** will have no effect if the vehicle doesn't support getAmmoCargo."}]},{"name":"setAmmoOnPylon","title":"setAmmoOnPylon","type":"command","url":"https://community.bistudio.com/wiki/setAmmoOnPylon","revid":310926,"updated":"2022-05-07T20:47:37Z","groups":["Vehicle Loadouts"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Set count of ammo in magazine on pylon (supports pylon name since Arma 3 v1.94)","syntaxes":[{"syntax":"vehicle setAmmoOnPylon [pylon, ammocount]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"pylon","type":"Number or String","description":"pylon index (index starts from 1) or pylon name (see getCompatiblePylonMagazines Example 4)","type_expr":"Number | String"},{"name":"ammocount","type":"Number","description":"ammo count","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[pylon, ammocount]"}}],"examples":[{"code":["vehicle player setAmmoOnPylon [1, 12];"]},{"code":["vehicle player setAmmoOnPylon [\"pylon1\", 12];"]}],"see_also":["Arma 3: Vehicle Loadouts","getCompatiblePylonMagazines","getPylonMagazines","animatePylon","animateBay","setPylonsPriority","setPylonLoadout","setMagazineTurretAmmo"],"notes":[{"user":"Commy2","date":"2017-08-18T14:20:00Z","text":"The pylon indices start at 1 and not at 0."}]},{"name":"setAngularVelocity","title":"setAngularVelocity","type":"command","url":"https://community.bistudio.com/wiki/setAngularVelocity","revid":377432,"updated":"2026-01-02T06:46:18Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"local","effect":"global"},"description":"Sets the angular velocity of the object in world space as a 3D vector. The units are in Rad/s and rotations are clockwise.\n\n> [!IMPORTANT]\n> Angular velocity is limited to a range of +-1000 Rad/s.","syntaxes":[{"syntax":"obj setAngularVelocity vector","params":[{"name":"obj","type":"Object","type_expr":"Object"},{"name":"vector","type":"Vector3D","description":"angular velocity of the object in world space.","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"obj"},"right":{"text":"vector"}}],"examples":[{"code":["myHeli setAngularVelocity [0,0,1]; // will cause the helicopter to spin around a vertical line passing through its center"]}],"see_also":["setVelocity","setAngularVelocityModelSpace","angularVelocity"]},{"name":"setAngularVelocityModelSpace","title":"setAngularVelocityModelSpace","type":"command","url":"https://community.bistudio.com/wiki/setAngularVelocityModelSpace","revid":377262,"updated":"2026-01-02T06:33:08Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"local","effect":"global"},"description":"Sets the angular velocity of the object in model space as a 3D vector. The units are in Rad/s and rotations are clockwise.\n\n> [!IMPORTANT]\n> Angular velocity is limited to a range of +-1000 Rad/s.","syntaxes":[{"syntax":"obj setAngularVelocityModelSpace vector","params":[{"name":"obj","type":"Object","type_expr":"Object"},{"name":"vector","type":"Vector3D","description":"angular velocity of the object in model space","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"obj"},"right":{"text":"vector"}}],"examples":[{"code":["myHeli setAngularVelocityModelSpace [0,0,1]; // will cause the helicopter to spin around its main rotor shaft"]}],"see_also":["setVelocity","setAngularVelocity","angularVelocity","angularVelocityModelSpace"]},{"name":"setAnimSpeedCoef","title":"setAnimSpeedCoef","type":"command","url":"https://community.bistudio.com/wiki/setAnimSpeedCoef","revid":379464,"updated":"2026-10-31T00:10:00Z","groups":["Animations","Stamina System"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","locality":{"argument":"global","effect":"local"},"description":"Sets a coefficient for animation speed (0.5 will play animations half the speed, 2 twice the speed).\nDoesn't affect upper body animations (reloading, etc.)","syntaxes":[{"syntax":"unit setAnimSpeedCoef coef","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"coef","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"coef"}}],"examples":[{"code":["player setAnimSpeedCoef 0.75;"]}],"see_also":["Arma 3: Stamina","getAnimSpeedCoef","setAccTime"],"notes":[{"user":"Demellion","date":"2016-11-14T03:30:00Z","text":"Increasing animation speed of a unit also increases its run/walk speed (thanks to Killzone_Kid)"},{"user":"Demellion","date":"2016-11-27T02:02:00Z","text":"Setting negative values with this makes animations act in reverse or make you stuck sliding in unknown directions."},{"user":"DrSova","date":"2018-11-07T08:39:00Z","text":"Didn't work on animals (A3 1.84.144923)"},{"user":"nomisum","date":"2019-11-14T14:09:00Z","text":"Must be executed on all clients to work properly in MP (otherwise only movement speed is adjusted, not animation itself)"},{"user":"Waffle SS.","date":"2021-10-30T19:41:02Z","text":"For animation speed to control unit speed, this must be executed on the local client.\nNon-local clients can set a speed less than the local client's.\nNon-local clients using an animation speed greater than the local client's may result in the animation freezing."}]},{"name":"setAperture","title":"setAperture","type":"command","url":"https://community.bistudio.com/wiki/setAperture","revid":340862,"updated":"2023-05-12T17:05:48Z","groups":["Camera Control","Lights"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets custom eye accommodation camera aperture.\n\n> [!NOTE]\n> If HDR is enabled, when setAperture `value` is used it also forces setApertureNew to the following values: [`value`, `value`, `value`, 1].\n> Execute setApertureNew after setAperture to override this default mechanic.\n\n> [!IMPORTANT]\n> The aperture is set to default by the engine at the mission start. If you set it before the mission started it will reset like it never happened.\n> Make sure you set it at the right time (see Example 2).","syntaxes":[{"syntax":"setAperture aperture","params":[{"name":"aperture","type":"Number","description":"aperture value; a value `<= 0` will set the aperture automatically. Maximum value which has an effect seems to be `100`.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"aperture"}}],"examples":[{"code":["setAperture 0.3;"]},{"code":["0 spawn { sleep 0.1; setAperture 100 };"]}],"see_also":["setApertureNew","apertureParams"],"notes":[{"user":"Namikaze","date":"2009-03-17T19:43:00Z","text":"The aperture value to simulate typical daylight (outdoor) conditions is 50. The aperture value to simulate typical daylight (indoor) conditions is 30.\nSetting the value to less than 20 will result in a very bright scene, suitable for night conditions.\nThe closer the number is to 0, the more light will be let into the lens, to carry on the aperture metaphor.\nDifferent lighting/weather conditions can change the actual indoor and outdoor aperture values. Experiment and test to be sure."}]},{"name":"setApertureNew","title":"setApertureNew","type":"command","url":"https://community.bistudio.com/wiki/setApertureNew","revid":379301,"updated":"2026-10-30T23:48:18Z","groups":["Camera Control","Lights"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets custom camera aperture when HDR is enabled. Provided values should be set such as *minimum* &lte; *standard* &lte; *maximum*.\n\n> [!NOTE]\n> - This command has to be executed after mission start: be sure to use e.g `sleep 0.1;` for it to take effect.\n> - If HDR is enabled (it is by default), when setAperture `value` is used it also forces setApertureNew to the following values: [`value`, `value`, `value`, 1]. Execute setApertureNew *after* setAperture to override this default mechanic.","syntaxes":[{"syntax":"setApertureNew [minimum, standard, maximum, luminance]","params":[{"name":"minimum","type":"Number","description":"minimum aperture","type_expr":"Number"},{"name":"standard","type":"Number","description":"standard aperture","type_expr":"Number"},{"name":"maximum","type":"Number","description":"maximum aperture","type_expr":"Number"},{"name":"luminance","type":"Number","description":"standard luminance","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[minimum, standard, maximum, luminance]"}},{"syntax":"setApertureNew [reset]","params":[{"name":"reset","type":"Number","description":"reset to default with -1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[reset]"}}],"examples":[{"text":"```sqf\nsetApertureNew [0.1, 0.2, 0.3, 1];\nsetApertureNew [-1];                // reset to default\n```","code":["setApertureNew [0.1, 0.2, 0.3, 1];\nsetApertureNew [-1];\t\t\t\t// reset to default"]},{"text":"Simulate eye adjustment at night:\n\n```sqf\nsetDate [2016, 8, 10, 4, 0];\nsetApertureNew [2, 8, 14, 0.9];\n```","code":["setDate [2016, 8, 10, 4, 0];\nsetApertureNew [2, 8, 14, 0.9];"]},{"text":"Narrower range for a subtler effect:\n\n```sqf\nsetDate [2016, 8, 10, 4, 0];\nsetApertureNew [2, 5, 9, 0.8];\n```","code":["setDate [2016, 8, 10, 4, 0];\nsetApertureNew [2, 5, 9, 0.8];"]}],"see_also":["setAperture","apertureParams"],"notes":[{"user":"Tofof","date":"2016-10-30T04:54:00Z","text":"Some notes on Example 2 - try it outdoors on a piece of ground with high contrasting areas. I suggest the end of a runway, standing among the white painted triangles.\n\nLook up about 60 degrees above the horizon and toggle between `setApertureNew [2, 8, 14, .9];` and the default setting of `setAperture -1;`. There should be little change -- at least on the date in the example.\n\nReset again to `setApertureNew [2, 8, 14, .9];` and then pan slowly down until you're basically looking at your feet. The less sky (the main outdoor light source) you see, the 'wider' (toward the 'min' number) the aperture will become. Looking at the ground on a runway, for example, you should be able to easily distinguish the painted white triangles from the unpainted pavement. Again, toggle back to the default aperture. The view should get much darker.\n\nThis setting allows for some natural adjustment based on the amount of visible light in the scene, and is highly encouraged over the default fixed aperature for night missions. When you're standing in the beam of a lighthouse, for example (try near the 'Spartan' on Stratis), you will be basically unable to see anything not illuminated by the beam. Once the beam passes and your vision returns to normal, your immediate surroundings will be dimmer, of course, but you'll be able to see further out."}]},{"name":"setArmoryPoints","title":"setArmoryPoints","type":"command","url":"https://community.bistudio.com/wiki/setArmoryPoints","revid":319633,"updated":"2022-05-13T09:24:36Z","groups":["System"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Stores passed number into [USERNAME].ArmaXProfile file, where it assigns it as a value to *armoryPoints* entry. If entry doesn't exist, it is created.","syntaxes":[{"syntax":"setArmoryPoints points","params":[{"name":"points","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"points"}}],"examples":[{"code":["setArmoryPoints (armoryPoints + 20);"]},{"code":["setArmoryPoints 3.14;"]}],"see_also":["armoryPoints"]},{"name":"setAttributes","title":"setAttributes","type":"command","url":"https://community.bistudio.com/wiki/setAttributes","revid":351277,"updated":"2023-11-27T02:34:49Z","groups":["Strings","Structured Text"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Returns a Structured Text created from the given structured text and sets attributes to the given values.\n\n> [!IMPORTANT]\n> Even though command accepts plain String too, the argument should be Structured Text in order for the set attributes to have an effect.\n> Additionally the result of the command should be fed to composeText (See Example 1) or formatText.","syntaxes":[{"syntax":"text setAttributes [name1, value1, name2, value2, ...]","params":[{"name":"text","type":"String or Structured Text","description":"only passing Structured Text has any effect","type_expr":"String | Structured Text"},{"name":"nameN","type":"String","description":"name of the attribute","type_expr":"String"},{"name":"valueN","type":"String","description":"value of the attribute","type_expr":"String"}],"returns":{"type":"Structured Text","type_expr":"Structured Text"},"form":"binary","left":{"text":"text"},"right":{"text":"[name1, value1, name2, value2, ...]"}}],"examples":[{"code":["_txt = text \"Red text, right align\";\n_txt setAttributes [\"color\", \"#FF0000\", \"align\", \"right\"];\nhint composeText [_txt];"]}],"see_also":["composeText","formatText","parseText","text","ctrlSetStructuredText"]},{"name":"setAutonomous","title":"setAutonomous","type":"command","url":"https://community.bistudio.com/wiki/setAutonomous","revid":364993,"updated":"2024-07-04T19:58:05Z","groups":["Remote Control"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"argument":"global","effect":"local"},"description":"Sets UAV autonomous mode.","syntaxes":[{"syntax":"uav setAutonomous bool","params":[{"name":"uav","type":"Object","type_expr":"Object"},{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"whether the operation was successful. Returns false when the object is not a uav."},"form":"binary","left":{"text":"uav"},"right":{"text":"bool"}}],"examples":[{"code":["uav setAutonomous true;"]}],"see_also":["isAutonomous","disableAI","enableAI","checkAIFeature"],"notes":[{"user":"Sa-Matra","date":"2023-04-30T04:00:28Z","text":"This command effectively does disableAI on this list of features: `[\"ANIM\",\"AUTOTARGET\",\"CHECKVISIBLE\",\"FSM\",\"MOVE\",\"PATH\",\"TARGET\",\"WEAPONAIM\"]`, the effect is local, just like disableAI. If at least one of these AI features is disabled, then \"Autonomous\" checkbox in UAV Terminal will be turned off, isAutonomous will return false, you won't be able to give it waypoints, despite UAV still being mostly autonomous."}]},{"name":"setBehaviour","title":"setBehaviour","type":"command","url":"https://community.bistudio.com/wiki/setBehaviour","revid":364537,"updated":"2024-05-16T20:46:45Z","groups":["Groups","AI Behaviour"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets individual unit behaviour **on every unit in a group**.\n\n> [!IMPORTANT]\n> This command doesn't set AI Group behaviour, see setCombatBehaviour or setBehaviourStrong for this.\n\n> [!NOTE]\n> See AI Behaviour for details of the effect of this command on AI units.\n\n| Command | Applies To |\n|---|---|\n| setBehaviour | **Every unit** in the group, but **not the group** itself |\n| setBehaviourStrong | **Every unit** in the group, and the **group** itself |\n| setCombatBehaviour | If argument is Object, only that **unit**, and if argument is Group, the **group** itself (not its units) |","syntaxes":[{"syntax":"groupOrUnit setBehaviour behaviour","params":[{"name":"groupOrUnit","type":"Group or Object","description":"unit or a group","type_expr":"Group | Object","text":"groupOrUnit : Group or Object - unit or a group"},{"name":"behaviour","type":"String","description":"can be one of:\n\n- \"CARELESS\"\n- \"SAFE\"\n- \"AWARE\"\n- \"COMBAT\"\n- \"STEALTH\"","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"groupOrUnit"},"right":{"text":"behaviour"}}],"examples":[{"code":["_group1 setBehaviour \"SAFE\";"]}],"see_also":["setCombatBehaviour","combatBehaviour","AIBehaviour","behaviour","setBehaviourStrong","setWaypointBehaviour","combatMode","setCombatMode","skill","setSkill","Arma 3: AI Skill"],"notes":[{"user":"SNKMAN","date":"2009-01-03T15:57:00Z","text":"Warning! Since Armed Assault v.1.14 the command setBehaviour \"COMBAT\" does not work correctly any longer.\nUnits ( Groups ) which are using this behaviour and then get a move order will not move to the given position."},{"user":"MadRussian","date":"2010-02-14T08:19:00Z","text":"Although setBehaviour can be called on an individual unit, the entire group will be affected."},{"user":"MulleDK13","date":"2010-11-22T19:18:00Z","text":"If setting a behaviour on an individual unit is required, it can be achieved by creating a temporary group, use joinSilent to make the individual unit belong to that group, then change his behaviour, use joinSilent into the original group, then delete the temporary group."}]},{"name":"setBehaviourStrong","title":"setBehaviourStrong","type":"command","url":"https://community.bistudio.com/wiki/setBehaviourStrong","revid":364285,"updated":"2024-05-06T09:38:35Z","groups":["Groups","AI Behaviour"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","locality":{"argument":"local","effect":"global"},"description":"Sets individual unit behaviour on every unit in a group and additionally tries to force this behaviour to the unit's group. Alternatively see setCombatBehaviour.\n\n> [!NOTE]\n> See AI Behaviour for details of the effect of this command on AI units.\n\n| Command | Applies To |\n|---|---|\n| setBehaviour | **Every unit** in the group, but **not the group** itself |\n| setBehaviourStrong | **Every unit** in the group, and the **group** itself |\n| setCombatBehaviour | If argument is Object, only that **unit**, and if argument is Group, the **group** itself (not its units) |","syntaxes":[{"syntax":"groupName setBehaviourStrong behaviour","params":[{"name":"groupName","type":"Group or Object","description":"unit from the group","type_expr":"Group | Object"},{"name":"behaviour","type":"String","description":"can be one of:\n\n- \"CARELESS\"\n- \"SAFE\"\n- \"AWARE\"\n- \"COMBAT\"\n- \"STEALTH\"","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"groupName"},"right":{"text":"behaviour"}}],"examples":[{"code":["_group1 setBehaviourStrong \"SAFE\";"]}],"see_also":["setCombatBehaviour","combatBehaviour","AIBehaviour","behaviour","setBehaviour","setWaypointBehaviour","combatMode","setCombatMode","skill","setSkill","Arma 3: AI Skill"]},{"name":"setBleedingRemaining","title":"setBleedingRemaining","type":"command","url":"https://community.bistudio.com/wiki/setBleedingRemaining","revid":321008,"updated":"2022-05-13T11:02:28Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Sets for how many seconds injured unit leaves blood trail.\nThe unit damage must be >= 0.1 for this command to have an effect, otherwise, the getBleedingRemaining will return 0 and no blood trail is left behind.","syntaxes":[{"syntax":"unit setBleedingRemaining time","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"time","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"time"}}],"examples":[{"code":["_unit setBleedingRemaining 60;"]},{"code":["player setDamage 0.25;\nplayer setBleedingRemaining 120;"]}],"see_also":["getBleedingRemaining","isBurning","isBleeding"]},{"name":"setBrakesRTD","title":"setBrakesRTD","type":"command","url":"https://community.bistudio.com/wiki/setBrakesRTD","revid":377777,"updated":"2026-01-03T01:32:30Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Enable landing gear wheel brakes for a helicopter.\n\n- value 0: brakes off\n- value 1: brakes on\n\n- index 1: left wheels\n- index 2: right wheels\n- index 3: both sides\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.\n\n> [!NOTE]\n> This command is implemented, but not fully supported.","syntaxes":[{"syntax":"helicopterRTD setBrakesRTD [value, wheelIndex]","params":[{"name":"helicopterRTD","type":"ObjectRTD","description":"helicopter","type_expr":"Object"},{"name":"value","type":"Number","description":"value of the brakes","type_expr":"Number"},{"name":"wheelIndex","type":"Number","description":"wheel index","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"helicopterRTD"},"right":{"text":"[value, wheelIndex]"}}],"examples":[{"code":["myHelicopterRTD setBrakesRTD [1, 3];"]}]},{"name":"setCameraInterest","title":"setCameraInterest","type":"command","url":"https://community.bistudio.com/wiki/setCameraInterest","revid":310118,"updated":"2022-05-05T12:25:32Z","groups":["Camera Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Set camera interest for given entity. Camera interest is by default 0. Any unit which is speaking has its camera interest raised to 50. Camera interest is used to focus camera to control depth of field in cutscenes. Combination of camera interest, unit position of the screen, unit movement, unit type, and some other properties is used to determine which unit to focus at. Higher camera interest increases the chance of the unit being focused.","syntaxes":[{"syntax":"entity setCameraInterest interest","params":[{"name":"entity","type":"Object","type_expr":"Object"},{"name":"interest","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"entity"},"right":{"text":"interest"}}],"examples":[{"code":["_soldier setCameraInterest 50;"]}],"see_also":["cameraInterest"]},{"name":"setCamShakeDefParams","title":"setCamShakeDefParams","type":"command","url":"https://community.bistudio.com/wiki/setCamShakeDefParams","revid":379375,"updated":"2026-10-30T23:58:08Z","groups":["Camera Control"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets camera shake default parameters.","syntaxes":[{"syntax":"setCamShakeDefParams [power, duration, frequency, minSpeed, minMass, caliberCoefHit, vehicleCoef]","params":[{"name":"power","type":"Number","type_expr":"Number"},{"name":"duration","type":"Number","type_expr":"Number"},{"name":"frequency","type":"Number","type_expr":"Number"},{"name":"minSpeed","type":"Number","type_expr":"Number"},{"name":"minMass","type":"Number","type_expr":"Number"},{"name":"caliberCoefHit","type":"Number","type_expr":"Number"},{"name":"vehicleCoef","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[power, duration, frequency, minSpeed, minMass, caliberCoefHit, vehicleCoef]"}}],"examples":[{"code":["setCamShakeDefParams [1, 2, 3, 4, 5, .5, .5];"]},{"code":["setCamShakeDefParams [100, 10, 10, 4, 5, 1, 1];"]}],"see_also":["enableCamShake","addCamShake","setCamShakeParams","resetCamShake"],"notes":[{"user":"Waffle SS.","date":"2014-12-01T03:35:00Z","text":"Does not appear to have an effect in Arma 3."}]},{"name":"setCamShakeParams","title":"setCamShakeParams","type":"command","url":"https://community.bistudio.com/wiki/setCamShakeParams","revid":364174,"updated":"2024-05-05T10:46:45Z","groups":["Camera Control"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets camera shake parameters. Will not have any effect until shake is started via addCamShake.","syntaxes":[{"syntax":"setCamShakeParams [posCoef, vertCoef, horzCoef, bankCoef, interpolation]","params":[{"name":"posCoef","type":"Number","description":"strength of positional movement (how far the whole position can change in X,Y&Z). Should not be bigger than **0.1** to prevent the camera from moving into or behind the player","type_expr":"Number"},{"name":"vertCoef","type":"Number","description":"strength of vertical camera pan (up/down), practical range: 0..10","type_expr":"Number"},{"name":"horzCoef","type":"Number","description":"strength of horizontal camera pan (left/right), practical range: 0..10","type_expr":"Number"},{"name":"bankCoef","type":"Number","description":"strength of camera tilt/bank, practical range: 0..20","type_expr":"Number"},{"name":"interpolation","type":"Boolean","description":"if true, then transitions in the different shaking directions will be smoother","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[posCoef, vertCoef, horzCoef, bankCoef, interpolation]"}}],"examples":[{"code":["setCamShakeParams [0.1, 1, 1, 1, true];"]}],"see_also":["setCamShakeDefParams","addCamShake","enableCamShake","resetCamShake"]},{"name":"setCamUseTI","title":"setCamUseTI","type":"command","url":"https://community.bistudio.com/wiki/setCamUseTI","revid":369156,"updated":"2024-09-03T10:34:40Z","groups":["Camera Control"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Sets thermal vision mode for currently used camera. This command only works with camCreate created camera that is currently the main camera for the player (see Example 2).","syntaxes":[{"syntax":"state setCamUseTI modeIndex","params":[{"name":"state","type":"Boolean","description":"true to enable, false to disable the effect","type_expr":"Boolean"},{"name":"modeIndex","type":"Number","description":"TI mode. Can be:\n\n- 0 - White Hot\n- 1 - Black Hot\n- 2 - Light Green Hot / Darker Green cold\n- 3 - Black Hot / Darker Green cold\n- 4 - Light Red Hot /Darker Red Cold\n- 5 - Black Hot / Darker Red Cold\n- 6 - White Hot . Darker Red Cold\n- 7 - Thermal (Shade of Red and Green, Bodies are white)","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"state"},"right":{"text":"modeIndex"}}],"examples":[{"code":["true setCamUseTI 1;"]},{"text":"*Predator* vision:\n\n```sqf\n_cam = \"camera\" camCreate [0, 0, 0];\n_cam camSetTarget player;\n_cam camSetRelPos [0, 1, 1.5];\n_cam cameraEffect [\"Internal\", \"Back\"];\n_cam camCommit 0;\ntrue setCamUseTI 7;\n```","code":["_cam = \"camera\" camCreate [0, 0, 0];\n_cam camSetTarget player;\n_cam camSetRelPos [0, 1, 1.5];\n_cam cameraEffect [\"Internal\", \"Back\"];\n_cam camCommit 0;\ntrue setCamUseTI 7;"]}],"see_also":["camUseNVG","disableTIEquipment"]},{"name":"setCaptive","title":"setCaptive","type":"command","url":"https://community.bistudio.com/wiki/setCaptive","revid":338620,"updated":"2023-03-24T10:44:44Z","groups":["Object Manipulation","Sides"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Mark a unit as captive. If unit is a vehicle, commander is marked. A captive unit:\n\n- is seen as belonging to the civilian Side\n- will not be fired upon\n- will still shoot at its real side's enemies\n- will make its killer earn/lose score/rating as usual\n- will not get its weapons removed (see removeAllWeapons)\n- will not trigger \"detected by\" conditions for its original Side.\n\n> [!NOTE]\n> The number used as status can be retrieved by captiveNum to keep track of the captivity status at a finer resolution (e.g. handcuffed, grouped, etc).","syntaxes":[{"syntax":"unitName setCaptive status","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"status","type":"Boolean","description":"true means captive","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"status"}},{"syntax":"unitName setCaptive statusNumber","since":"arma2 1.00","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"statusNumber","type":"Number","description":"zero means non-captive, a non-zero value means captive; see captiveNum","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"statusNumber"}}],"examples":[{"text":"```sqf\n_soldier1 setCaptive true;\nside _soldier1;            // returns civilian\nside group _soldier1;    // returns e.g blufor\n```","code":["_soldier1 setCaptive true;\nside _soldier1;\t\t\t// returns civilian\nside group _soldier1;\t// returns e.g blufor"]},{"text":"```sqf\n_soldier1 setCaptive 1;\ncaptive _soldier1;        // returns true\n\n_soldier1 setCaptive 42;\ncaptive _soldier1;        // returns true\n\n_soldier1 setCaptive 0;\ncaptive _soldier1;        // returns false\n```","code":["_soldier1 setCaptive 1;\ncaptive _soldier1;\t\t// returns true\n\n_soldier1 setCaptive 42;\ncaptive _soldier1;\t\t// returns true\n\n_soldier1 setCaptive 0;\ncaptive _soldier1;\t\t// returns false"]}],"see_also":["captive","captiveNum"],"notes":[{"user":"Talkingtoaj","date":"2011-01-01T13:11:00Z","text":"If you change a unit from captive to no longer captive (for example, to \"reveal\" an undercover unit), enemy units that already have prior knowledge of the unit as a captive will only partially engage, making it very easy for the undercover unit. This seems to be a bug.\n\nHowever other enemy unit the unit later encounters will engage freely with full force."},{"user":"Lou Montana","date":"2017-11-19T10:58:00Z","text":"**Talkingtoaj**'s note does not apply to Arma 3 anymore (earlier than 1.76)\nA captive unit will immediately be shot (after a normal \"human\" reaction time from the AI)"},{"user":"DreadedEntity","date":"2022-04-26T01:15:28Z","text":"In **A3 2.08.149102**, entering an empty vehicle with the same side as the player as defined in `configFile >> \"CfgVehicles\" >> _vehicleClassname >> \"side\"` will briefly switch the side of the vehicle to the side of the player soldier (specifically, while the get in animation is playing), even if captive. Once exiting the vehicle, it will retain that side until the player enters a new vehicle or, seemingly arbitrarily, moves more than 100 meters away from the vehicle `player distance _vehicle > 100`. If the player gets within 100 meters of the vehicle without entering a new vehicle, it will again switch to the players side. This is probably a bug, in my opinion"}]},{"name":"setCenterOfMass","title":"setCenterOfMass","type":"command","url":"https://community.bistudio.com/wiki/setCenterOfMass","revid":379465,"updated":"2026-10-31T00:10:08Z","groups":["PhysX"],"status":"ok","games":{"arma3":"1.02"},"since":"arma3 1.02","arma3_since":"1.02","locality":{"argument":"local","effect":"global"},"description":"Changes the center of mass of an object smoothly during the given time (in seconds). A time of zero (or using the alternative syntax) means an immediate change.","syntaxes":[{"syntax":"myObject setCenterOfMass [centerOfMass, time]","params":[{"name":"myObject","type":"Object","type_expr":"Object"},{"name":"centerOfMass","type":"PositionRelative","description":"relative to the model centre","type_expr":"PositionRelative"},{"name":"time","type":"Number","description":"transition time, 0 for instant center of mass transfer","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"myObject"},"right":{"text":"[centerOfMass, time]"}},{"syntax":"myObject setCenterOfMass centerOfMass","params":[{"name":"myObject","type":"Object","type_expr":"Object"},{"name":"centerOfMass","type":"PositionRelative","description":"relative to the model centre","type_expr":"PositionRelative"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"myObject"},"right":{"text":"centerOfMass"}}],"examples":[{"code":["myObject setCenterOfMass [[0,-1,0], 0.5];"]},{"code":["myObject setCenterOfMass [0,-1,0];"]}],"see_also":["getCenterOfMass","setMass","getMass"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-20T12:50:00Z","text":"Arma 3 v1.22 A quick reference:\n\n| category | setMass | setCenterOfMass |\n|---|---|---|\n| unit | The larger the mass is, the easier a unit will physically fatigued | N/A |\n| aircraft | The larger the mass is, the more sensitive an aircraft will react to joystick, vice versa. | Aircraft slant due to center change accordingly, and the position of the camera view will be altered relatively at the same time. (3rd person view) |\n| vehicle | The larger the mass is, the slower a vehicle drives (Ships will sink), vice versa. (Land vehicle performs like a bouncing ball while ships accelerated pretty speedy.) | Vehicle slant due to center change accordingly. |"}]},{"name":"setCollisionLight","title":"setCollisionLight","type":"command","url":"https://community.bistudio.com/wiki/setCollisionLight","revid":319554,"updated":"2022-05-13T09:24:28Z","groups":["Lights"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"local","effect":"global"},"description":"Switches collision lights of a vehicle on/off.","syntaxes":[{"syntax":"vehicle setCollisionLight set","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"set","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"set"}}],"examples":[{"code":["heli setCollisionLight true;"]}],"see_also":["isLightOn","isCollisionLightOn","setPilotLight","isIRLaserOn","engineOn","isEngineOn"]},{"name":"setCombatBehaviour","title":"setCombatBehaviour","type":"command","url":"https://community.bistudio.com/wiki/setCombatBehaviour","revid":321904,"updated":"2022-05-22T11:02:37Z","groups":["AI Behaviour","Groups"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","locality":{"argument":"local","effect":"global"},"description":"Sets an individual unit entity behaviour (main syntax) or a group entity behaviour (alternative syntax). The group in this case is a Group entity and not a simple collection of units. To retrieve unit or group behaviour see combatBehaviour. The behaviour is one of:\n\n- \"CARELESS\"\n- \"SAFE\"\n- \"AWARE\"\n- \"COMBAT\"\n- \"STEALTH\"\n\n> [!NOTE]\n> See AI Behaviour for details of the effect of this command on AI units. Group behaviour usually is \"CARELESS\" or \"SAFE\"\n\n| Command | Applies To |\n|---|---|\n| setBehaviour | **Every unit** in the group, but **not the group** itself |\n| setBehaviourStrong | **Every unit** in the group, and the **group** itself |\n| setCombatBehaviour | If argument is Object, only that **unit**, and if argument is Group, the **group** itself (not its units) |","syntaxes":[{"syntax":"unit setCombatBehaviour behaviour","params":[{"name":"unit","type":"Object","description":"AI unit","type_expr":"Object"},{"name":"behaviour","type":"String","description":"see description","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"behaviour"}},{"syntax":"group setCombatBehaviour behaviour","params":[{"name":"group","type":"Group","description":"AI group","type_expr":"Group"},{"name":"behaviour","type":"String","description":"see description","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"behaviour"}}],"examples":[{"code":["unit1 setCombatBehaviour \"SAFE\";"]},{"code":["group1 setCombatBehaviour \"CARELESS\";"]}],"see_also":["AIBehaviour","combatBehaviour","behaviour","setBehaviour","setBehaviourStrong","setWaypointBehaviour","combatMode","setCombatMode","skill","setSkill"]},{"name":"setCombatMode","title":"setCombatMode","type":"command","url":"https://community.bistudio.com/wiki/setCombatMode","revid":364240,"updated":"2024-05-06T09:38:16Z","groups":["Groups","AI Behaviour"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets AI group combat mode (engagement rules). For individual unit's combat mode see setUnitCombatMode. Mode may be one of the following:\n\n- `\"BLUE\"` : Never fire, keep formation\n- `\"GREEN\"` : Hold fire, keep formation\n- `\"WHITE\"` : Hold fire, engage at will/loose formation\n- `\"YELLOW\"` : Fire at will, keep formation\n- `\"RED\"` : Fire at will, engage at will/loose formation\n\nSee Combat Modes for more information on combat modes.","syntaxes":[{"syntax":"group setCombatMode mode","params":[{"name":"group","type":"Group or Object","description":"if the argument is unit Object, unit's current group is used.","type_expr":"Group | Object"},{"name":"mode","type":"String","description":"see description","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"mode"}}],"examples":[{"code":["_group1 setCombatMode \"BLUE\";"]}],"see_also":["Combat Modes","Mission Editor: Waypoints","combatMode","behaviour","setBehaviour","skill","setSkill","Arma 3: AI Skill","setUnitCombatMode","unitCombatMode","setCombatBehaviour","combatBehaviour"],"notes":[{"user":".kju","date":"2020-01-01T07:35:00Z","text":"- Combat mode can only be changed via scripting/waypoints - not by player radio commands for an AI group.\n\n- \"Engage at will\" means AI can form subgroups and break off to engage known or assigned enemies. These AI will then act largely on their own.\n- As player one can use the \"engage at will\" radio command to achieve the same/similar behavior. However this will not change the unit's combat mode. Yet one can override the \"keep/loose formation\" status of combat mode with radio commands.\n\n- \"Never fire\" means AI will actually never fire. Whereas under \"Hold fire\", AI will shoot back if getting fired upon, hostiles get too close, or they get a target explicitly assigned by the (sub)group leader.\n- As player, one can override the fire status with radio commands (\"Hold fire\", \"Open fire\", \"Fire\"). However this will not change the unit's combat mode.\n- \"Never fire\"/combat mode blue cannot be overridden by group leader target assignment. One needs to command \"Open fire\" or switch to a different combat mode (with \"Hold fire\") to be able to do so.\n\n- Applying combat mode blue, clears the attack target commands from AI subgroups. Might be useful in combination with doFollow/commandFollow. Note: It will not affect assignedTargets."}]},{"name":"setCompassDeclination","title":"setCompassDeclination","type":"command","url":"https://community.bistudio.com/wiki/setCompassDeclination","revid":377875,"updated":"2026-01-04T13:22:06Z","groups":["Interaction"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"effect":"local"},"description":"Sets the [declination angle](https://en.wikipedia.org/wiki/Magnetic_declination) of player's compass, which is the difference between magnetic north and true north.","syntaxes":[{"syntax":"setCompassDeclination angleRad","params":[{"name":"angleRad","type":"Number","description":"Declination angle in radians. Use 0 to reset it to default.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"angleRad"}}],"examples":[{"code":["setCompassDeclination rad 10; // declination angle is 10 degrees"]}],"see_also":["setCompassOscillation"]},{"name":"setCompassOscillation","title":"setCompassOscillation","type":"command","url":"https://community.bistudio.com/wiki/setCompassOscillation","revid":351911,"updated":"2024-01-25T09:37:29Z","groups":["Interaction"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"This command sets random heading on the player's compass (both in map and in 3D view) with given frequency, which is also randomised.","syntaxes":[{"syntax":"setCompassOscillation [angle, frequencyMin, frequencyMax]","params":[{"name":"angle","type":"Number","description":"heading deviation angle in radians; the random angle will be picked up from `[-angle...+angle]` range","type_expr":"Number"},{"name":"frequencyMin","type":"Number","description":"lower bound of heading change in seconds","type_expr":"Number"},{"name":"frequencyMax","type":"Number","description":"higher bound of heading change in seconds","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[angle, frequencyMin, frequencyMax]"}}],"examples":[{"text":"Set compass to oscillate every second within -90/+90 degrees:\n\n```sqf\nsetCompassOscillation [rad 90, 1, 1];\n```","code":["setCompassOscillation [rad 90, 1, 1];"]},{"text":"Change heading every 60 to 90 seconds:\n\n```sqf\nsetCompassOscillation [rad 180, 60, 90];\n```","code":["setCompassOscillation [rad 180, 60, 90];"]},{"text":"Make compass go crazy:\n\n```sqf\nsetCompassOscillation [rad 360, 0.1, 0.2];\n```","code":["setCompassOscillation [rad 360, 0.1, 0.2];"]},{"text":"Reset to default behaviour:\n\n```sqf\nsetCompassOscillation [-1, 0, 0];\n```","code":["setCompassOscillation [-1, 0, 0];"]}],"see_also":["visibleCompass","shownCompass","shownCuratorCompass","showCompass","showCuratorCompass","setCompassDeclination"]},{"name":"setConvoySeparation","title":"setConvoySeparation","type":"command","url":"https://community.bistudio.com/wiki/setConvoySeparation","revid":376358,"updated":"2025-10-07T21:39:25Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"Sets the distance to keep to the vehicle which is **in front**.\n\n- This command has to be applied to all vehicles in a convoy in order to have a separation of, for example, 50 m.\n- Vehicles in a convoy can also have different distances.\n- It's recommended that small values (<10m) should only be used for slowly moving convoys, otherwise AI driven vehicles will leave the road frequently to avoid collisions","syntaxes":[{"syntax":"vehicle setConvoySeparation distance","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"distance","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"distance"}}],"examples":[{"code":["cursorObject setConvoySeparation 20;"]}],"see_also":["forceFollowRoad","useAISteeringComponent"]},{"name":"setCruiseControl","title":"setCruiseControl","type":"command","url":"https://community.bistudio.com/wiki/setCruiseControl","revid":377946,"updated":"2026-01-13T17:58:44Z","groups":["Unit Control","Object Manipulation"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"argument":"local","effect":"local"},"description":"Limits or sets **local player-controlled** vehicle's speed through cruise control.\n\n> [!NOTE]\n> - this command only works on CarX, TankX, ShipX simulation vehicles\n> - this command is implemented using a PID controller overwriting the vehicle's thrust/brakes input\n\n| Speed Limiter | Cruise Control |\n|---|---|\n| - the vehicle does not accelerate by itself<br>- manually accelerating is required to move forward<br>- accelerating beyond set speed limit is restricted by the PID controller<br>- applying brakes does not disable Speed Limiter<br>- behaviour:<br>  - if the speed is over 120% the set limit, the vehicle will apply 100% of braking and limit acceleration to 0%<br>  - if the speed is below 80% the set limit, the acceleration and braking are untouched<br>  - between 80 and 120%, the PID controller limits the acceleration and applies brakes if required | - the vehicle accelerates by itself<br>- manually accelerating is possible<br>- accelerating above set speed limit is possible<br>- applying brakes disables Cruise Control<br>- behaviour:<br>  - if the speed is over 120% the set limit, the vehicle will apply 100% of braking<br>  - if the speed is below 80% the set limit, the vehicle will apply 100% of acceleration<br>  - between 80 and 120%, the PID controller manages the speed |\n\n> [!IMPORTANT]\n> This command should only be called to *change* values and **not** be called every frame, as it resets the PID controller.","syntaxes":[{"syntax":"vehicle setCruiseControl [speed, autoThrust]","params":[{"name":"vehicle","type":"Object","description":"the vehicle to limit; local player's vehicle (`vehicle player`)","type_expr":"Object"},{"name":"speed","type":"Number","description":"desired/top speed in km/h. 0 to disable any setting. Only positives values are valid, negative values will make the vehicle unable to move forward","type_expr":"Number"},{"name":"autoThrust","type":"Boolean","description":"Boolean\n\n- true - Cruise Control: the vehicle will maintain this speed until brakes is applied or driver dies or leaves the vehicle\n- false - Speed Limiter: the vehicle will not accelerate above set speed","type_expr":"Boolean","text":"autoThrust: Boolean\n\n- true - Cruise Control: the vehicle will maintain this speed until brakes is applied or driver dies or leaves the vehicle\n- false - Speed Limiter: the vehicle will not accelerate above set speed"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[speed, autoThrust]"}}],"examples":[{"code":["vehicle player setCruiseControl [50, true]; // sets cruise control to 50 km/h"]},{"code":["vehicle player setCruiseControl [5, false]; // limits player's vehicle speed to 5 km/h"]}],"see_also":["getCruiseControl","limitSpeed","forceSpeed","setAirplaneThrottle"]},{"name":"setCuratorCameraAreaCeiling","title":"setCuratorCameraAreaCeiling","type":"command","url":"https://community.bistudio.com/wiki/setCuratorCameraAreaCeiling","revid":339085,"updated":"2023-04-26T10:54:07Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Sets maximal (ATL) height to which curator camera can move.","syntaxes":[{"syntax":"curatorObj setCuratorCameraAreaCeiling height","params":[{"name":"curatorObj","type":"Object","description":"Curator module","type_expr":"Object"},{"name":"height","type":"Number","description":"ATL, in metres","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"height"}}],"examples":[{"code":["myCurator setCuratorCameraAreaCeiling 50;"]}],"see_also":["Arma 3 Curator","addCuratorCameraArea","removeCuratorCameraArea","removeAllCuratorCameraAreas","curatorCameraArea"]},{"name":"setCuratorCoef","title":"setCuratorCoef","type":"command","url":"https://community.bistudio.com/wiki/setCuratorCoef","revid":348442,"updated":"2023-11-08T13:00:15Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Sets coef for some action (coef have to be bigger than -1 000 000, anything lower is considered as disabled action).","syntaxes":[{"syntax":"curatorObj setCuratorCoef [action, coef]","params":[{"name":"curatorObj","type":"Object","description":"curator module","type_expr":"Object"},{"name":"action","type":"String","description":"can be one of:\n\n- \"Place\"\n- \"Edit\"\n- \"Delete\"\n- \"Destroy\"\n- \"Group\"\n- \"Synchronize\"","type_expr":"String"},{"name":"coef","type":"Number or Boolean","type_expr":"Number | Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"[action, coef]"}}],"examples":[{"code":["curatorModule setCuratorCoef [\"Place\", 1];"]},{"code":["curatorModule setCuratorCoef [\"Delete\", -1e10];"]}],"see_also":["Arma 3: Curator"]},{"name":"setCuratorEditingAreaType","title":"setCuratorEditingAreaType","type":"command","url":"https://community.bistudio.com/wiki/setCuratorEditingAreaType","revid":348452,"updated":"2023-11-08T13:00:17Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Set whether curator can edit in all editing areas (true) or outside of them (false).","syntaxes":[{"syntax":"curatorObj setCuratorEditingAreaType bool","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"},{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"bool"}}],"examples":[{"code":["curatorModule setCuratorEditingAreaType true;"]}],"see_also":["Arma 3: Curator","addCuratorEditingArea","removeCuratorEditingArea","removeAllCuratorEditingAreas","curatorEditingArea"]},{"name":"setCuratorSelected","title":"setCuratorSelected","type":"command","url":"https://community.bistudio.com/wiki/setCuratorSelected","revid":378373,"updated":"2026-04-03T16:53:54Z","groups":["Curator"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","description":"Clear and set the curator selected items. Leave the items array empty to clear curator selection.","syntaxes":[{"syntax":"setCuratorSelected items","params":[{"name":"items","type":"Array of Objects, Groups, Waypoints, or Strings","description":"flat array of items to set; strings are marker names","type_expr":"Array<Object | Group | Waypoint | String>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"items"}}],"examples":[{"code":["setCuratorSelected [unit1, group1, [group1, waypointIndex], markerName1];"]},{"code":["setCuratorSelected [vehicle1, unit1, unit2, unit3, unit4, group1];"]}],"see_also":["curatorMouseOver","curatorSelected","addCuratorSelected","curatorEditableObjects","Arma 3: Curator"]},{"name":"setCuratorSelectionPreset","title":"setCuratorSelectionPreset","type":"command","url":"https://community.bistudio.com/wiki/setCuratorSelectionPreset","revid":377070,"updated":"2026-01-01T09:30:47Z","groups":["Curator"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","description":"Set the list of objects in the given selection preset. Only Object is supported in selection presets, unlike curatorSelected which also returns the selected Group, Waypoint, and Marker String","syntaxes":[{"syntax":"numkey setCuratorSelectionPreset objects","params":[{"name":"numkey","type":"Number","description":"number key under which the selection preset is saved","type_expr":"Number"},{"name":"objects","type":"Array of Objects","description":"objects to save to the selection preset","type_expr":"Array<Object>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"numkey"},"right":{"text":"objects"}}],"examples":[{"code":["1 setCuratorSelectionPreset [object1, object2];"]}],"see_also":["curatorSelectionPreset","loadCuratorSelectionPreset","curatorSelected","setCuratorSelected","addCuratorSelected","Arma 3: Curator"]},{"name":"setCuratorWaypointCost","title":"setCuratorWaypointCost","type":"command","url":"https://community.bistudio.com/wiki/setCuratorWaypointCost","revid":348446,"updated":"2023-11-08T13:00:16Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Sets cost of waypoints (used for placing, editing and deleting).","syntaxes":[{"syntax":"curatorObj setCuratorWaypointCost cost","params":[{"name":"curatorObj","type":"Object","description":"curator module","type_expr":"Object"},{"name":"cost","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"curatorObj"},"right":{"text":"cost"}}],"examples":[{"code":["myCurator setCuratorWaypointCost 0.1;"]}],"see_also":["Arma 3: Curator"]},{"name":"setCurrentChannel","title":"setCurrentChannel","type":"command","url":"https://community.bistudio.com/wiki/setCurrentChannel","revid":376800,"updated":"2025-11-20T17:47:43Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","locality":{"effect":"local"},"description":"Sets given channel as current chat channel. Scripted way of selecting desired channel on the UI.\nThe given channel may be disabled (see enableChannel), this is why this command returns boolean, true on success or false on failure.\n\n| channel ID number correspondence |  |  |  |  |  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|---|---|---|---|---|\n| N/A | Global | Side | Command | Group | Vehicle | Direct | Custom1 | .. | Custom10 | Arma 3 v2.22 Custom11 | .. | Custom50 |\n| -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | .. | 15 | 26 | .. | 65 |","syntaxes":[{"syntax":"setCurrentChannel channelID","params":[{"name":"channelID","type":"Number","description":"channel ID","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success"},"form":"unary","right":{"text":"channelID"}}],"examples":[{"code":["_isDirectSelected = setCurrentChannel 5; // sets Direct channel as current active"]}],"see_also":["getPlayerChannel","currentChannel","enableChannel","channelEnabled","radioChannelCreate"]},{"name":"setCurrentTask","title":"setCurrentTask","type":"command","url":"https://community.bistudio.com/wiki/setCurrentTask","revid":319791,"updated":"2022-05-13T09:24:54Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Set the task as a current task of the person.","syntaxes":[{"syntax":"object setCurrentTask task","params":[{"name":"object","type":"Object","description":"the unit having the task","type_expr":"Object"},{"name":"task","type":"Task","description":"the task you want to select","type_expr":"Task"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"task"}}],"examples":[{"code":["player setCurrentTask tskKillSpongebob;"]}],"see_also":["createSimpleTask","simpleTasks","currentTask"]},{"name":"setCurrentWaypoint","title":"setCurrentWaypoint","type":"command","url":"https://community.bistudio.com/wiki/setCurrentWaypoint","revid":379230,"updated":"2026-10-30T23:04:20Z","groups":["Waypoints"],"status":"ok","games":{"arma1":"1.05","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.05","arma3_since":"0.50","locality":{"argument":"local"},"description":"Sets the currently active waypoint for a group.","syntaxes":[{"syntax":"groupName setCurrentWaypoint waypoint","params":[{"name":"groupName","type":"Group","type_expr":"Group"},{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"groupName"},"right":{"text":"waypoint"}}],"examples":[{"code":["_grp setCurrentWaypoint [_grp, 1];"]}],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed"],"notes":[{"user":"Way","date":"2007-08-27T00:00:00Z","text":"(A1 1.08) Does not seem to work with Game Logic. Crashes to desktop."},{"user":"Ceeeb","date":"2008-11-26T00:00:00Z","text":"Note that a waypoints number as seen in the mission editor is not the same as it is waypoint number using this command. In the mission editor, waypoint 0 refers to the first placed waypoint, whereas waypoint 0 with the setCurrentWaypoint command refers to the unit's initial position waypoint."},{"user":"Galzohar","date":"2010-01-17T00:00:00Z","text":"(A2 1.05) This command may crash the game to desktop if you call it from the on act field of a waypoint that belongs to that same unit."},{"user":"Igneous01","date":"2012-08-13T00:00:00Z","text":"Using this command forces the last waypoint to complete. Any code in the on Act of that waypoint will run."}]},{"name":"setCustomAimCoef","title":"setCustomAimCoef","type":"command","url":"https://community.bistudio.com/wiki/setCustomAimCoef","revid":319776,"updated":"2022-05-13T09:24:52Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","locality":{"argument":"local","effect":"local"},"description":"Set custom aim precision coefficient for weapon sway","syntaxes":[{"syntax":"unit setCustomAimCoef coef","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"coef","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"coef"}}],"examples":[{"code":["player setCustomAimCoef 3;"]}],"see_also":["Arma 3: Stamina","getCustomAimCoef","getWeaponSway"]},{"name":"setCustomMissionData","title":"setCustomMissionData","type":"command","url":"https://community.bistudio.com/wiki/setCustomMissionData","revid":377102,"updated":"2026-01-01T09:58:54Z","groups":["Diagnostic"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Defines custom mission text that is sent to Arma 3: Analytics.","syntaxes":[{"syntax":"setCustomMissionData data","params":[{"name":"data","type":"Array of Strings","description":"A maximum of five strings is allowed, each string with a maximum length of 16 characters","type_expr":"Array<String>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"data"}}],"examples":[{"code":["setCustomMissionData [\"someData\", \"someMoreData\"];"]}]},{"name":"setCustomSoundController","title":"setCustomSoundController","type":"command","url":"https://community.bistudio.com/wiki/setCustomSoundController","revid":309208,"updated":"2022-05-03T22:18:23Z","groups":["Sounds"],"status":"ok","games":{"arma3":"1.86"},"since":"arma3 1.86","arma3_since":"1.86","description":"Sets value of the specified custom sound controller to be used in simple expressions in config. Returns true if value was set to the controller, false if command fails, for example if vehicle is not a transport or controller name is not recognised.\n\n> [!IMPORTANT]\n> Custom sound controller name is case sensitive and of the following format:\n>\n> ```sqf\n> format [\"CustomSoundController%1\", _number];\n> ```\n>\n> Where `_number` is a number from 1 to getCustomSoundControllerCount (currently 32)","syntaxes":[{"syntax":"setCustomSoundController [vehicle, controller, value]","params":[{"name":"vehicle","type":"Object","description":"a transport type vehicle. Does not work on characters or buildings","type_expr":"Object"},{"name":"controller","type":"String","description":"name of the custom sound controller - needs to be full string e.g \"CustomSoundController1\". It goes from \"CustomSoundController1\" to \"CustomSoundController32\"","type_expr":"String"},{"name":"value","type":"Number","description":"desired value","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success"},"form":"unary","right":{"text":"[vehicle, controller, value]"}}],"examples":[{"text":"Change value of CustomSoundController1 to 12\n\n```sqf\nsetCustomSoundController [vehicle player, \"CustomSoundController1\", 12];\n```","code":["setCustomSoundController [vehicle player, \"CustomSoundController1\", 12];"]}],"see_also":["Arma 3: Sound","getCustomSoundController","getCustomSoundControllerCount","getSoundController","getSoundControllerResult","getAllSoundControllers","getEnvSoundController","getAllEnvSoundControllers"]},{"name":"setCustomWeightRTD","title":"setCustomWeightRTD","type":"command","url":"https://community.bistudio.com/wiki/setCustomWeightRTD","revid":379376,"updated":"2026-10-30T23:58:16Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Add virtual custom weight to a helicopter's center of gravity. This can be used to simulate added internal payload for specific scenarios, and affects the flight model.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"helicopterRTD setCustomWeightRTD weight","params":[{"name":"helicopterRTD","type":"ObjectRTD","description":"helicopter","type_expr":"Object","text":"helicopterRTD : ObjectRTD - helicopter"},{"name":"weight","type":"Number","description":"weight (kilograms)","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"helicopterRTD"},"right":{"text":"weight"}}],"examples":[{"code":["myHelicopterRTD setCustomWeightRTD 120;"]}],"see_also":["weightRTD"],"notes":[{"user":"Benargee","date":"2014-11-04T06:41:00Z","text":"Value can be negative. Do not set negative value lower than helicopter's total weight."}]},{"name":"setDamage","title":"setDamage","type":"command","url":"https://community.bistudio.com/wiki/setDamage","revid":379302,"updated":"2026-10-30T23:48:26Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":null,"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"| Event Handler | Triggered |\n|---|---|\n| `Hit` | ✗ |\n| `HandleDamage` | ✗ |\n| `Killed` | ✓ |\n| `MPKilled` | ✓ |\n\nSets the damage (or lack thereof) of an object/unit. The alternative syntax allows to skip destruction effects for vehicles and buildings and set a tree/pole/wall fall direction (away from *killer*).","syntaxes":[{"syntax":"object setDamage damage","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"damage","type":"Number","description":"range 0..1, 0 = pristine/healthy condition, 1 = entirely destroyed/killed","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"damage"}},{"syntax":"object setDamage [damage, useEffects, killer, instigator, allowResurrection]","since":"arma3 1.68","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"damage","type":"Number","description":"range 0..1, 0 = pristine/healthy condition, 1 = entirely destroyed/killed","type_expr":"Number"},{"name":"useEffects","type":"Boolean","optional":true,"default":"true","description":"false to skip destruction effects","type_expr":"Boolean","text":"useEffects: Boolean (Optional, default true) - false to skip destruction effects"},{"name":"killer","type":"Object","optional":true,"default":"objNull","description":"Server execution the entity that caused the damage (can be anything). If the damage leads to the death of the unit, the killer will be used as the object that caused the kill.\n\n- it can be used to show \"killed by player\" in debriefing statistics and kill messages in the chat (if death messages are enabled).\n- it will alter the killer's rating as if the killer directly killed the unit\n- it will be listed as `_killer` parameter in the Killed event handler\n- it influences a tree/pole/wall fall direction (it will fall *away* from *killer*)\n- *killer* is ignored if setDamage is called on a player client machine unless *object* is one of these three entity types - see Example 3\n- MP restricted similar to setShotParents, will be ignored unless executed on the server or headless client in MP","type_expr":"Object","since":"arma3 2.12","text":"killer: Object - (Optional, default objNull) Server execution the entity that caused the damage (can be anything). If the damage leads to the death of the unit, the killer will be used as the object that caused the kill.\n\n- it can be used to show \"killed by player\" in debriefing statistics and kill messages in the chat (if death messages are enabled).\n- it will alter the killer's rating as if the killer directly killed the unit\n- it will be listed as `_killer` parameter in the Killed event handler\n- it influences a tree/pole/wall fall direction (it will fall *away* from *killer*)\n- *killer* is ignored if setDamage is called on a player client machine unless *object* is one of these three entity types - see Example 3\n- MP restricted similar to setShotParents, will be ignored unless executed on the server or headless client in MP"},{"name":"instigator","type":"Object","optional":true,"default":"objNull","description":"Server execution the person that instigated the damage.\n\n- if a tank is a killer, the tank gunner that pulled the trigger is instigator\n- it will be listed as `_instigator` parameter in the Killed event handler\n- MP restricted similar to setShotParents, will be ignored unless executed on the server or headless client in MP\n  - the above MP restriction does not apply to trees, poles and walls","type_expr":"Object","since":"arma3 2.12","text":"instigator: Object - (Optional, default objNull) Server execution the person that instigated the damage.\n\n- if a tank is a killer, the tank gunner that pulled the trigger is instigator\n- it will be listed as `_instigator` parameter in the Killed event handler\n- MP restricted similar to setShotParents, will be ignored unless executed on the server or headless client in MP\n  - the above MP restriction does not apply to trees, poles and walls"},{"name":"allowResurrection","type":"Boolean","optional":true,"default":"false","description":"Will re-set alive state of previously dead object.","type_expr":"Boolean","since":"arma3 2.22","text":"allowResurrection: Boolean - (Optional, default false) - Will re-set alive state of previously dead object."},{"name":"shot","type":"Object","optional":true,"default":"objNull","description":"shot that caused the damage.","type_expr":"Object","since":"arma3 2.22","text":"shot: Object - (Optional, default objNull) - shot that caused the damage."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[damage, useEffects, killer, instigator, allowResurrection]"}}],"examples":[{"code":["_soldier1 setDamage 1;"]},{"code":["_house1 setDamage [1, false];"]},{"text":"```sqf\n// executed on a client\n_remoteVehicle setDamage [1, true, player];    // killer (here, player) is not considered if the command is not called on the server\n                                            // the vehicle still gets destroyed\n\n_tree setDamage [1, true, player];            // the tree is destroyed and falls away from the player\n_pole setDamage [1, true, player];            // these three cases are the only ones where killer is considered\n_wall setDamage [1, true, player];            // when setDamage is called on a non-server machine (neither server or headless client)\n```","code":["// executed on a client\n_remoteVehicle setDamage [1, true, player];\t// killer (here, player) is not considered if the command is not called on the server\n\t\t\t\t\t\t\t\t\t\t\t// the vehicle still gets destroyed\n\n_tree setDamage [1, true, player];\t\t\t// the tree is destroyed and falls away from the player\n_pole setDamage [1, true, player];\t\t\t// these three cases are the only ones where killer is considered\n_wall setDamage [1, true, player];\t\t\t// when setDamage is called on a non-server machine (neither server or headless client)"]}],"aliases":["setDammage"],"see_also":["setVehicleArmor","damage","setHit","getHit","getHitIndex","setHitIndex","getHitPointDamage","setHitPointDamage"],"notes":[{"user":"Fragorl","date":"2006-04-17T07:36:00Z","text":"In **Operation Flashpoint**, setting a unit's damage to a negative value will set it is health to full, but impair their aim."},{"user":"KamikazeXeX","date":"2015-05-29T11:23:00Z","text":"Using this possible overrides individual hit damages such as setHitPointDamage [\"HitHead\", _value]; if you're having issues try setting hitdamage *after* setdamage."},{"user":"Sarogahtyp","date":"2021-06-24T10:31:00Z","text":"You are able to repair buildings with this command if you just store the original object and use setDamage on this and not on the wreck which is shown after the building was destroyed. This works in debug console when pointing a house:\n\n```sqf\n0 spawn\n{\n    private _house = cursorObject;\n    _house setDamage 1;\n    sleep 5;\n    _house setDamage 0;\n};\n```"}]},{"name":"setDammage","title":"setDammage","type":"command","url":"https://community.bistudio.com/wiki/setDammage","revid":379231,"updated":"2026-10-30T23:09:04Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Entirely identical to setDamage that was introduced to fix a typographical error in the command's name.\n\n> [!NOTE]\n> See setDamage for this command's documentation.","syntaxes":[{"syntax":"object setDammage damage","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"damage","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"damage"}}],"examples":[{"text":"-"}],"aliases":["setDamage"],"see_also":["setDamage"],"notes":[{"user":"Fragorl","date":"2006-04-17T07:39:00Z","text":"In **Operation Flashpoint**, setting a unit's damage to a negative value will set it is health to full, but impair their aim."}]},{"name":"setDate","title":"setDate","type":"command","url":"https://community.bistudio.com/wiki/setDate","revid":377265,"updated":"2026-01-02T06:34:05Z","groups":["Mission Information","Environment"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets mission date and time. Players joining after mission start will get the current server date including the year.\n\n> [!IMPORTANT]\n> While the game creates February 29th in a leap year, it removes December 31st.\n> For example, `setDate [1980,12,31,12,0]` will result in the game jumping to [1981,1,1,12,0] as 1980 is a leap year.","syntaxes":[{"syntax":"setDate date","params":[{"name":"date","type":"Date","type_expr":"Date"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"date"}}],"examples":[{"code":["setDate [1986, 2, 25, 16, 0]; // 4:00pm February 25, 1986"]},{"text":"```sqf\n// Set the real date:\nif (isServer) then\n{\n    waitUntil { time > 0 };\n    [systemTime select [0, 5]] remoteExec [\"setDate\"];\n};\n```","code":["// Set the real date:\nif (isServer) then\n{\n\twaitUntil { time > 0 };\n\t[systemTime select [0, 5]] remoteExec [\"setDate\"];\n};"]},{"text":"Using setDate with an incorrect (like negative or exceeding) value will still work properly:\n\n```sqf\nprivate _date = date;\n_date set [3, 25];    // set hour to 25\nsetDate _date;        // date = next day 1am\n```","code":["private _date = date;\n_date set [3, 25];\t// set hour to 25\nsetDate _date;\t\t// date = next day 1am"]}],"multiplayer":"> [!NOTE]\n> **Arma 3:** Clients' local date is automatically and periodically synchronised with the server date.\n> In order to change the date without waiting for automatic synchronisation, use remote execution: `[[2001,6,22,12,0]] remoteExec [\"setDate\"];`.","see_also":["date","skipTime","numberToDate","dateToNumber"],"notes":[{"user":"Alpha","date":"2012-12-07T11:10:00Z","text":"This command sets the date for the southern hemisphere only, i.e. when the map is in northern hemisphere a date [2010,12,7,17,0] is in day light and and date [2010,6,7,17,0] is in darkness."},{"user":"Osmo","date":"2011-10-31T21:07:00Z","text":"In multiplayer, the effect of this command is local, not global. The date from the server is synchronized with clients when they join the game (including start of the mission and joining in progress). E.g. if this command is executed on server in the init.sqf before the mission starts, every client will be synchronized with server as mission is started. However, if you run this command in the middle of the mission, effect is local."},{"user":"MulleDK13","date":"2014-10-04T17:43:00Z","text":"Since an unknown version of Arma 3, this command now has global effect when executed on the server."},{"user":"OOKexOo","date":"2017-04-23T02:58:00Z","text":"Regarding execution in the middle of a session, the post of MulleDK13 is not entirely true. If you don't change the year, you are perfectly fine when executing the command on the server only. However, the server does not sync the year. Hence, if you do change the year, you have to execute the command on the server, clients and JIP to account for the missing sync. e.g.\n\n```sqf\n[[], { setDate [1986, 2, 25, 16, 0] }] remoteExec [\"call\", 0, \"JIP_id_setDate\"];\n```"}]},{"name":"setDebriefingText","title":"setDebriefingText","type":"command","url":"https://community.bistudio.com/wiki/setDebriefingText","revid":363195,"updated":"2024-03-25T16:31:09Z","groups":["Briefing"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Sets debriefing title, text, subtitle, picture and background for a mission ending.\nThe end type could be the engine-defined (\"CONTINUE\", \"KILLED\", \"LOSER\", \"END1\", \"END2\", \"END3\", \"END4\", \"END5\", \"END6\"), config-defined (see CfgDebriefing) or, with an alternative syntax of this command, any String.\nGiven texts will be used to replace the corresponding texts on the debriefing screen.\n\n> [!IMPORTANT]\n> In order to benefit from alternative syntax functionality, there will have to be at least **three** arguments passed to the command; **two** arguments will trigger the old behaviour.","syntaxes":[{"syntax":"endType setDebriefingText [title, description]","params":[{"name":"endType","type":"String","description":"engine type","type_expr":"String"},{"name":"title","type":"String","description":"title text on the debriefing screen","type_expr":"String"},{"name":"description","type":"String","description":"description text on the debriefing screen","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"endType"},"right":{"text":"[title, description]"}},{"syntax":"endType setDebriefingText [title, description, subtitle, picture, background]","since":"arma3 2.06","params":[{"name":"endType","type":"String","description":"any name","type_expr":"String"},{"name":"title","type":"String","description":"title text on the debriefing screen","type_expr":"String"},{"name":"description","type":"String","description":"description text on the debriefing screen","type_expr":"String"},{"name":"subtitle","type":"String","description":"subtitle text on the debriefing screen (**must** be defined in order to trigger this syntax of the command)","type_expr":"String"},{"name":"picture","type":"String","optional":true,"description":"title picture","type_expr":"String","text":"picture: String - (Optional) title picture"},{"name":"background","type":"String","optional":true,"description":"background picture","type_expr":"String","text":"background: String - (Optional) background picture"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"endType"},"right":{"text":"[title, description, subtitle, picture, background]"}}],"examples":[{"code":["_currentObjective = (taskDescription currentTask player) select 2;\n\"endDeath\" setDebriefingText [\"You Lose\", \"All of your men were killed while assaulting the \" + _currentObjective];"]}],"see_also":["getDebriefingText","disableDebriefingStats","enableDebriefingStats","endMission","failMission","missionEnd"]},{"name":"setDefaultCamera","title":"setDefaultCamera","type":"command","url":"https://community.bistudio.com/wiki/setDefaultCamera","revid":377593,"updated":"2026-01-02T06:59:17Z","groups":["Camera Control"],"status":"ok","games":{"arma3":"1.10"},"since":"arma3 1.10","arma3_since":"1.10","description":"Sets the position and direction for the camera used after camera is set on no object (log out view when leaving MP game for example)","syntaxes":[{"syntax":"setDefaultCamera [position, direction]","params":[{"name":"position","type":"PositionASL","description":"position of the camera","type_expr":"PositionASL"},{"name":"direction","type":"Vector3D","description":"direction of the camera","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[position, direction]"}}],"examples":[{"code":["setDefaultCamera [[5000, 5000, 200], [1, 1, -1]];"]},{"text":"Lift camera 100m up above current player position and point downwards:\n\n```sqf\nsetDefaultCamera [ATLToASL (player modelToWorld [0, 0, 100]), [0, 0, -1]];\n```","code":["setDefaultCamera [ATLToASL (player modelToWorld [0, 0, 100]), [0, 0, -1]];"]}],"see_also":["camCreate","cameraOn","cameraView","cameraEffect","cameraEffectEnableHUD","switchCamera","positionCameraToWorld","cameraInterest","setCameraInterest","getEditorCamera","mapCenterOnCamera","preloadCamera","restartEditorCamera"]},{"name":"setDestination","title":"setDestination","type":"command","url":"https://community.bistudio.com/wiki/setDestination","revid":377507,"updated":"2026-01-02T06:50:09Z","groups":["Unit Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Set the destination for path planning of the pilot.\n\nPossible values for planningMode are:\n\n- \"DoNotPlan\" - used when not moving\n- \"DoNotPlanFormation\" - used in formation when simple path testing is used\n- \"LEADER PLANNED\" - used for formation leader (full path finding used)\n- \"LEADER DIRECT\" - used for DirectGo (like getin, supply)\n- \"FORMATION PLANNED\" - used in formation when full path finding is used\n- \"VEHICLE PLANNED\" - used for vehicle driver\n\nWorks best when used on agents. Using \"LEADER PLANNED\" will trigger `\"PathCalculated\"` Event Handler","syntaxes":[{"syntax":"object setDestination [position, planningMode, forceReplan]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"position","type":"Position","type_expr":"Position"},{"name":"planningMode","type":"String","type_expr":"String"},{"name":"forceReplan","type":"Boolean","description":"specifies if replanning of the path should be forced.","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[position, planningMode, forceReplan]"}}],"examples":[{"code":["bob setDestination [screenToWorld [0.5,0.5], \"LEADER PLANNED\", true];"]}],"see_also":["expectedDestination","doMove","calculatePath"]},{"name":"setDetailMapBlendPars","title":"setDetailMapBlendPars","type":"command","url":"https://community.bistudio.com/wiki/setDetailMapBlendPars","revid":321456,"updated":"2022-05-14T14:48:21Z","groups":["System"],"status":"ok","games":{"arma3":"1.02"},"since":"arma3 1.02","arma3_since":"1.02","locality":{"effect":"local"},"description":"Sets the detail texture map blend pars. Allows for smooth transition between detailed and undetailed terrain texture at distance.\n\n- If *noDetail* > *fullDetail*, the texture detail will incur smooth transition in the area between the thresholds.\n- If *noDetail* <= *fullDetail*, there will be obvious visible edge between texture detail changes at *fullDetail* distance.","syntaxes":[{"syntax":"setDetailMapBlendPars [fullDetail, noDetail]","params":[{"name":"fullDetail","type":"Number","description":"threshold distance in metres up to which the terrain will have full texture detail","type_expr":"Number"},{"name":"noDetail","type":"Number","description":"threshold distance in metres after which the texture detail will be switched off","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[fullDetail, noDetail]"}}],"examples":[{"code":["setDetailMapBlendPars [20, 50];"]},{"code":["setDetailMapBlendPars ([[20, 50], [300, 600]] select (currentWeapon player in [\"Binocular\", \"Rangefinder\", \"Laserdesignator\"]));"]},{"text":"Reset to default:\n\n```sqf\nsetDetailMapBlendPars [-1, -1];\n```","code":["setDetailMapBlendPars [-1, -1];"]}],"see_also":["setViewDistance","viewDistance","setTerrainGrid","getObjectViewDistance","setObjectViewDistance"]},{"name":"setDiaryRecordText","title":"setDiaryRecordText","type":"command","url":"https://community.bistudio.com/wiki/setDiaryRecordText","revid":379303,"updated":"2026-10-30T23:48:34Z","groups":["Briefing"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","description":"Set text of a log record.","syntaxes":[{"syntax":"unit setDiaryRecordText [[subject, diaryRecord], [title, text, icon]]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"subject","type":"String","type_expr":"String"},{"name":"diaryRecord","type":"Diary Record","type_expr":"Diary Record"},{"name":"title","type":"String","type_expr":"String"},{"name":"text","type":"String","type_expr":"String"},{"name":"icon","type":"String","optional":true,"description":"icon to show next to the title. \"\" to remove.","type_expr":"String","since":"arma3 2.10","text":"icon: String - (Optional) icon to show next to the title. \"\" to remove."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[[subject, diaryRecord], [title, text, icon]]"}}],"examples":[{"code":["player setDiaryRecordText [[\"diary\", _diaryRec], [\"Kill all enemies.\", \"The enemies are the bad guys. Kill them because you are the good guy.\"]];"]}],"see_also":["allDiaryRecords","processDiaryLink","createDiaryRecord","createDiarySubject","diarySubjectExists"]},{"name":"setDiarySubjectPicture","title":"setDiarySubjectPicture","type":"command","url":"https://community.bistudio.com/wiki/setDiarySubjectPicture","revid":349299,"updated":"2023-11-08T14:52:18Z","groups":["Briefing"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","locality":{"argument":"global","effect":"local"},"description":"Sets a picture to be displayed on the right of the Diary subject. The picture can also be set during custom Diary subject creation, but this command also allows to change icon for the fixed subjects, like \"Tasks\", \"Diary\", \"Units\", \"Players\" and \"Statistics\".","syntaxes":[{"syntax":"unit setDiarySubjectPicture [subject, picture]","params":[{"name":"unit","type":"Object","description":"unit","type_expr":"Object"},{"name":"subject","type":"String","description":"diary subject (see Diary)","type_expr":"String"},{"name":"picture","type":"String","description":"icon path","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[subject, picture]"}}],"examples":[{"code":["player setDiarySubjectPicture [\"Diary\", \"\\A3\\ui_f\\data\\map\\markers\\nato\\o_mech_inf.paa\"];"]}],"see_also":["createDiarySubject","removeDiarySubject","selectDiarySubject","diarySubjectExists","allDiarySubjects","Diary"]},{"name":"setDir","title":"setDir","type":"command","url":"https://community.bistudio.com/wiki/setDir","revid":373376,"updated":"2025-05-04T21:12:49Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets object heading. Angles are measured in degrees clockwise from north; the regular range goes from 0 to 360 (0° = N, 90° = E, 180° = S, 270° = W). Negative angles represent counter-clockwise angles.\n\n> [!IMPORTANT]\n> This command resets the object's velocity and vectorUp!\n\n> [!NOTE]\n> In *some* earlier titles (Operation Flashpoint?), this command was Local effect.","syntaxes":[{"syntax":"object setDir heading","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"heading","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"heading"}}],"examples":[{"code":["myUnit setDir 45; // will set myUnit to face North-East"]},{"code":["myUnit setDir -675; // will also set myUnit to face North-East (= 45-360-360)"]},{"code":["MyUnit setDir 30;\nMyUnit setFormDir 30; // needed for AI to keep the given direction"]},{"code":["// provided _myMine is local\n_myMine setDir 45;\n_myMine setPosWorld getPosWorld _myMine;\n\n// or\n[_myMine, 45] remoteExec [\"setDir\"];"]},{"code":["// sets the direction of an object relative to a parent object's direction\n_child setDir (_parentDir + (_childDir - _parentDir));"]}],"multiplayer":"See the Notes below","problems":"- The effect is Local effect when using setDir on a mine. Use a position modification to broadcast setDir's change (see Example 4)\n- setting direction *after* position may lead to weird behaviours - see Notes","see_also":["getDir","direction","setFormDir","setVectorDir","setVectorDirAndUp"],"notes":[{"user":"Manny","date":"2007-05-09T20:43:00Z","text":"Though effects of this command remain local, you can do a setPos* afterwards to synchronize the direction on all machines in MP.\n\n```sqf\nmyObj setDir 90;\nmyObj setPosASL getPosASL myObj;\n```"},{"user":".kju","date":"2001-04-05T10:54:00Z","text":"In Arma 2: Operation Arrowhead 1.59 the comment of Manny still holds true for createVehicle'd empty vehicles by the server.\nFor the player object a local setDir alone is enough."},{"user":"Killzone_Kid","date":"2013-11-25T11:47:00Z","text":"In Arma 3, setDir affects vectorUp, vectorDir and velocity of the object it applied to. While this is not noticeable with stationary objects, a moving objects will have its orientation and velocity reset. So if you are planning on using setDir on a moving object, make sure you read the velocity value before and restore it after if you want the object to continue to move.\n\n```sqf\n_vel = velocity _object;\n_object setDir 45;\n_object setVelocity _vel;\n```\n\nWith orientation it is a bit more complicated. setDir resets vectorUp to [0,0,1] and changes vectorDir accordingly to accommodate set direction. If your object's vectorUp is not [0,0,1] and you want to keep it this way, then you have to use setVectorDirAndUp to change object's direction not setDir. This is also the reason why it is better to use setVectorDirAndUp instead of setDir on attached objects for a better control of object's orientation."},{"user":"Killzone_Kid","date":"2013-11-27T23:09:00Z","text":"Make sure you setDir BEFORE you set position. **Setting direction after set position could lead to unpredictable behaviour**. For example main part of the hospital building in Arma 3 can lose collision detection near both side entrances. AI will also get confused and will stop detecting obstacles if setDir is called after setPos."}]},{"name":"setDirection","title":"setDirection","type":"command","url":"https://community.bistudio.com/wiki/setDirection","revid":376967,"updated":"2026-01-01T05:58:28Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Sets the orientation of a location. The location's area and map icon (if its type uses an icon) will be rotated to this orientation.","syntaxes":[{"syntax":"location setDirection direction","params":[{"name":"location","type":"Location","type_expr":"Location"},{"name":"direction","type":"Number in range 0..360","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"location"},"right":{"text":"direction"}}],"examples":[{"code":["_location = createLocation [\"VegetationPalm\", getPos player, 200, 200];\n_location setText \"Benargee's Palm Tree\";\n_location setDirection 45;"]}],"see_also":["createLocation","setText","direction"]},{"name":"setDrawIcon","title":"setDrawIcon","type":"command","url":"https://community.bistudio.com/wiki/setDrawIcon","revid":363270,"updated":"2024-03-26T10:51:39Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Set the icon to be shown in 2D editor for the specified editor object. If maintain size is false,icon will not scale depending on the scale,of the map. If maintain size is a number,the icon will maintain size,if map scale is below that number. is3D,show line and priority are,optional.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map setDrawIcon [object,texture,color,offset,width,height,maintain size?,angle,string identifier,shadow,is3D,draw line?,priority]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"[object,texture,color,offset,width,height,maintain size?,angle,string identifier,shadow,is3D,draw line?,priority]: Array","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[object,texture,color,offset,width,height,maintain size?,angle,string identifier,shadow,is3D,draw line?,priority]"}}],"examples":[{"text":"-"}]},{"name":"setDriveOnPath","title":"setDriveOnPath","type":"command","url":"https://community.bistudio.com/wiki/setDriveOnPath","revid":347683,"updated":"2023-10-10T16:57:57Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"Sets the path to follow for AI driver. Note that unitReady will return true even if AI is still driving through the points.\nUsing any other *move* command (e.g `_vehicle move getPosATL _vehicle`) or doStop will stop the effect of this command.\n\n> [!IMPORTANT]\n> This command does **not** work if the vehicle doesn't have an AI steering component defined in its config, or if the component is disabled. Thus, it never works on air vehicles and boats which don't use steering components. Only land vehicles may be compatible. (cars, tanks, APCs, etc.)\n\n> [!NOTE]\n> For the command to work properly, the unit must either be an agent, or in the case of normal AI, have been stopped using doStop.","syntaxes":[{"syntax":"vehicleName setDriveOnPath points","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"},{"name":"points","type":"Array","description":"list of Positions to format [x,y,z] OR to format [x,y,z, speed], speed being **in m/s**.","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"points"}}],"examples":[{"code":["myVehicle setDriveOnPath [getMarkerPos \"wp1\", getMarkerPos \"wp2\"];"]},{"code":["private _points = allMapMarkers apply { getMarkerPos _x; }; // getting all marker positions\n{ _x pushBack 15; } forEach _points; // setting speed\nmyVehicle setDriveOnPath _points;"]}],"see_also":["move","forceSpeed","limitSpeed","Waypoint","useAISteeringComponent"],"notes":[{"user":"Leopard20","date":"2021-06-25T07:42:00Z","text":"To use this command, the AI must not have a formLeader. The easiest way to achieve this is to use doStop to stop the AI (warning! it'll break the AI waypoints)"}]},{"name":"setDropInterval","title":"setDropInterval","type":"command","url":"https://community.bistudio.com/wiki/setDropInterval","revid":336719,"updated":"2023-01-04T15:24:43Z","groups":["Particles"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Set interval of emitting particles from particle source. In Arma 3 hardcoded limit of how many particles can exist at the same time is [18000](http://forums.bistudio.com/showthread.php?177797-Ruin-your-copy-of-Arma-and-your-PC#post2691090). Correspondence between CfgCloudlets class param name and command param:\n\n```sqf\nparticleSource setDropInterval interval;\n```","syntaxes":[{"syntax":"particleSource setDropInterval interval","params":[{"name":"particleSource","type":"Object","type_expr":"Object"},{"name":"interval","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"particleSource"},"right":{"text":"interval"}}],"examples":[{"code":["_source setDropInterval 0.05;"]}],"see_also":["drop","setParticleParams","setParticleRandom","setParticleFire","setParticleCircle"]},{"name":"setDynamicSimulationDistance","title":"setDynamicSimulationDistance","type":"command","url":"https://community.bistudio.com/wiki/setDynamicSimulationDistance","revid":363576,"updated":"2024-04-07T11:30:33Z","groups":["Dynamic Simulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"Sets activation distance of Arma 3: Dynamic Simulation for given category.","syntaxes":[{"syntax":"category setDynamicSimulationDistance distance","params":[{"name":"category","type":"String","description":"can be one of:\n\n- `\"Group\"` - infantry units. Set to a reasonable distance, player should not see disabled infantry units. Default value 500m\n- `\"Vehicle\"` - vehicles with crew. Set to a reasonable distance, player should not see disabled vehicles. Default value 350m\n- `\"EmptyVehicle\"` - all vehicles without crew. Separated from Props as Empty Vehicles have often more complex damage states and selective destruction. Their activation distance should be larger than the one used for Props. Default value 250m\n- `\"Prop\"` - static objects. Anything from a small tin can to a building. Default value 50m","type_expr":"String"},{"name":"distance","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"category"},"right":{"text":"distance"}}],"examples":[{"code":["\"Group\" setDynamicSimulationDistance 1000;"]}],"see_also":["Arma 3: Dynamic Simulation","dynamicSimulationDistance","setDynamicSimulationDistanceCoef","dynamicSimulationDistanceCoef"],"notes":[{"user":"Demellion","date":"2017-03-19T19:52:00Z","text":"Desired distances for \"Group\" and \"Vehicle\" must be based on viewDistance and fog to exclude any rendering problems with frequently moving objects. Example:\n\n```sqf\n\"Group\" setDynamicSimulationDistance ((viewDistance * 0.8) - (viewDistance * fog)); // 80% of maximum rendering and fog distance\n```\n\nBut that might impair objects simulation if you are using long-scope optics, so there's an even better solution using cameraView with it:\n\n```sqf\n0 spawn {\n    while { true } do\n    {\n        if (cameraView isEqualTo \"GUNNER\") then\n        {\n            \"Group\" setDynamicSimulationDistance (viewDistance - (viewDistance * fog));\n            // Scoped\n        }\n        else\n        {\n            \"Group\" setDynamicSimulationDistance ((viewDistance * 0.8) - (viewDistance * fog));\n            // Not scoped\n        };\n\n        uiSleep 0.25;\n    };\n};\n```"}]},{"name":"setDynamicSimulationDistanceCoef","title":"setDynamicSimulationDistanceCoef","type":"command","url":"https://community.bistudio.com/wiki/setDynamicSimulationDistanceCoef","revid":348832,"updated":"2023-11-08T14:39:08Z","groups":["Dynamic Simulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"Sets activation distance multiplier of Arma 3: Dynamic Simulation for the given class","syntaxes":[{"syntax":"class setDynamicSimulationDistanceCoef multiplier","params":[{"name":"class","type":"String","description":"multiplier class, currently only:\n\n- `\"IsMoving\"` - Multiplies the entity activation distance by set value if the entity is moving. Default: 2","type_expr":"String"},{"name":"multiplier","type":"Number","description":"distance multiplier","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"class"},"right":{"text":"multiplier"}}],"examples":[{"code":["\"IsMoving\" setDynamicSimulationDistanceCoef 3;"]}],"see_also":["enableDynamicSimulationSystem","dynamicSimulationSystemEnabled","enableDynamicSimulation","dynamicSimulationEnabled","setDynamicSimulationDistance","dynamicSimulationDistance","dynamicSimulationDistanceCoef","triggerDynamicSimulation","canTriggerDynamicSimulation","enableSimulation","simulationEnabled","enableSimulationGlobal","Arma 3: Dynamic Simulation"]},{"name":"setEditorMode","title":"setEditorMode","type":"command","url":"https://community.bistudio.com/wiki/setEditorMode","revid":363278,"updated":"2024-03-26T10:51:48Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets map mode to MAP,3D or PREVIEW.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map setEditorMode mode","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"mode","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"mode"}}],"examples":[{"text":"-"}]},{"name":"setEditorObjectScope","title":"setEditorObjectScope","type":"command","url":"https://community.bistudio.com/wiki/setEditorObjectScope","revid":363242,"updated":"2024-03-26T10:51:18Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"This command defines the level of access a user has to editor objects.\n\n\"objects\" is an array of either Editor Objects (eg [\"_unit_0\"]) or actual Game Objects (eg [player]). If the array is empty then the command will automatically parse all editor objects.\n\n\"editorType\" is the editor type to effect (eg \"unit\", \"vehicle\", \"center\") or \"\" for all types.\n\n\"condition\" is an executable string that must evaluate to true or false. If true, the scope of the evaluated editor object will be modified. \"_x\" can be used in the string as reference to the ingame representation of the currently processed array member.\n\n\"scope\" is one of \"HIDE\", \"VIEW\", \"SELECT\", \"LINKTO\", \"LINKFROM\", \"ALLNODRAG\", \"ALLNOTREE\", \"ALLNOCOPY\", \"ALLNOSELECT\" or \"ALL\".\n\n\"subordinatesAlso\" is a boolean value. If true then subordinates in the editor will be assigned the same scope as the parent.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map setEditorObjectScope [objects, editorType, condition, scope, subordinatesAlso]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"[objects, editorType, condition, scope, subordinatesAlso]","type":"Array","type_expr":"Array"},{"name":"objects","type":"Array of Objects and/or Editor Objects","type_expr":"Array<Object | Editor Object>"},{"name":"editorType","type":"String","type_expr":"String"},{"name":"condition","type":"String","type_expr":"String"},{"name":"scope","type":"String","type_expr":"String"},{"name":"subordinatesAlso","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[objects, editorType, condition, scope, subordinatesAlso]"}}],"examples":[{"code":["_map setEditorObjectScope [[],\"vehicle\", \"side effectiveCommander _x != side player\", \"HIDE\", false];"]},{"code":["((findDisplay 128) displayCtrl 51) setEditorObjectScope [[\"_unit_0\"], \"\", \"true\", \"ALLNODRAG\", false];"]}],"see_also":["addEditorObject","deleteEditorObject","findEditorObject","getEditorObjectScope","insertEditorObject"]},{"name":"setEffectCondition","title":"setEffectCondition","type":"command","url":"https://community.bistudio.com/wiki/setEffectCondition","revid":377586,"updated":"2026-01-02T06:56:46Z","groups":["Triggers"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"The statement is executed when the trigger or waypoint is activated and the effects are launched depending on the result.\n\n- If the result is a boolean and true, the effect is launched.\n- If the result is an object, the effect is launched if the result is the player or the player vehicle.\n- If the result is an array, the effect is launched if the result contains the player or the player vehicle.","syntaxes":[{"syntax":"trigger setEffectCondition statement","params":[{"name":"trigger","type":"Object","type_expr":"Object"},{"name":"statement","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"trigger"},"right":{"text":"statement"}},{"syntax":"waypoint setEffectCondition statement","params":[{"name":"waypoint","type":"Waypoint","description":"Waypoint","type_expr":"Waypoint"},{"name":"statement","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"statement"}}],"examples":[{"code":["_triggerObj setEffectCondition \"thisList\";"]}],"see_also":["createTrigger"]},{"name":"setEffectiveCommander","title":"setEffectiveCommander","type":"command","url":"https://community.bistudio.com/wiki/setEffectiveCommander","revid":322840,"updated":"2022-06-26T21:14:08Z","groups":["Unit Control"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","locality":{"argument":"global","effect":"local"},"description":"Sets effectiveCommander of the given vehicle. Effective commander is the person who commands the vehicle, i.e. gives commands to the driver.\nEvery time a person gets in or out of a vehicle, effective commander eligibility is recalculated by the engine based on the current crew.\nUse this command to force desired effective commander.","syntaxes":[{"syntax":"vehicle setEffectiveCommander person","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"person","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"person"}}],"examples":[{"code":["vehicle player setEffectiveCommander player;"]}],"multiplayer":"In multiplayer, execute globally.","see_also":["effectiveCommander","commander","vehicleMoveInfo"]},{"name":"setEngineRpmRTD","title":"setEngineRpmRTD","type":"command","url":"https://community.bistudio.com/wiki/setEngineRpmRTD","revid":349351,"updated":"2023-11-08T15:35:07Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Sets the RPM of given engines.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"helicopter setEngineRpmRTD [rpm, engineIndex]","params":[{"name":"helicopter","type":"Object","type_expr":"Object"},{"name":"rpm","type":"Number","description":"wanted RPM","type_expr":"Number"},{"name":"engineIndex","type":"Number","description":"index of the engine\n\n- engine index 0: engine #1\n- engine index 1: engine #2\n- engine index 2: engine #3\n- engine index -1: all engines","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"helicopter"},"right":{"text":"[rpm, engineIndex]"}}],"examples":[{"code":["myHelicopter setEngineRpmRTD [1337, -1];"]}],"see_also":["setWantedRPMRTD","rotorsRpmRTD","enginesRpmRTD"]},{"name":"setFace","title":"setFace","type":"command","url":"https://community.bistudio.com/wiki/setFace","revid":369847,"updated":"2024-10-16T13:51:59Z","groups":["Unit Identity"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Set person's face. For a list of available faces, check CfgIdentities Category or `CfgFaces` config.\nIf the face is non-existent, the face is set to 'Default' and the error is logged in the .rpt file.\n\n- Operation Flashpoint faces\n- Armed Assault faces\n- Arma 2 faces\n- Arma 3 faces\n- Take On Helicopters faces","syntaxes":[{"syntax":"person setFace face","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"face","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"face"}}],"examples":[{"code":["soldier1 setFace \"WhiteHead_02\";"]},{"text":"Set persistent face for a unit in multiplayer:\n\n```sqf\nthis setFace \"AsianHead_A3_02\"; // in the init field if the unit already exists in Eden Editor\n```\n\n```sqf\nif (isServer) then { [_unit, \"AsianHead_A3_02\"] remoteExec [\"setFace\", 0, _unit] };\n// if the unit is created later in the game.\n// This only works with stock faces; when a player joins with a custom face into this unit,\n// all current players need to be force-updated to the desired face as custom face overwrites current face.\n// Use BIS_fnc_setIdentity for persistent identity.\n```","code":["this setFace \"AsianHead_A3_02\"; // in the init field if the unit already exists in Eden Editor","if (isServer) then { [_unit, \"AsianHead_A3_02\"] remoteExec [\"setFace\", 0, _unit] }; \n// if the unit is created later in the game.\n// This only works with stock faces; when a player joins with a custom face into this unit, \n// all current players need to be force-updated to the desired face as custom face overwrites current face.\n// Use BIS_fnc_setIdentity for persistent identity."]}],"see_also":["face","setIdentity","setSpeaker","hasCustomFace"]},{"name":"setFaceAnimation","title":"setFaceAnimation","type":"command","url":"https://community.bistudio.com/wiki/setFaceAnimation","revid":340876,"updated":"2023-05-13T21:15:37Z","groups":["Animations","Broken Commands"],"status":"broken","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Sets facial animation phase (eye blinking).\n\n> [!NOTE]\n> This command is not functional in Arma 3.","syntaxes":[{"syntax":"unit setFaceAnimation blink","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"blink","type":"Number","description":"range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"blink"}}],"examples":[{"code":["_soldier1 setFaceAnimation 0.5;"]}],"see_also":["setRandomLip","setMimic","animate","animationPhase","animateDoor"],"notes":[{"user":"Lou Montana","date":"2008-12-23T09:01:00Z","text":"Setting face animation to 4 will give \"devilish\" features (Armed Assault)"}]},{"name":"setFatigue","title":"setFatigue","type":"command","url":"https://community.bistudio.com/wiki/setFatigue","revid":379466,"updated":"2026-10-31T00:10:16Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sets the person's fatigue, from 0 to 1.","syntaxes":[{"syntax":"unit setFatigue value","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"value","type":"Number","description":"in 0..1 *available* fatigue range: 0 is fully energised, 1 is fully exhausted","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"value"}}],"examples":[{"code":["player setFatigue 1;"]}],"see_also":["Arma 3: Stamina","getFatigue","enableFatigue","setStamina","getStamina","enableStamina"],"notes":[{"user":"Killzone_Kid","date":"2014-04-05T00:00:00Z","text":"setFatigue will affect fatigue of a local unit only. If you execute it on remote unit, the getFatigue value will only change locally with no effect on remote unit. Scripted setFatigue changes don't broadcast at all. In short, use setFatigue on local units only."}]},{"name":"setFeatureType","title":"setFeatureType","type":"command","url":"https://community.bistudio.com/wiki/setFeatureType","revid":378060,"updated":"2026-02-04T23:41:20Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","locality":{"argument":"global","effect":"local"},"description":"Enable/disable object as a feature/landmark. Possible feature types:\n\n- 0 - Feature disabled\n- 1 - Object is always visible within object view distance\n- 2 - Object is always visible within terrain view distance\n\n> [!IMPORTANT]\n> The limit is **500** map/static objects and **200** dynamic objects including config features and auto features (flying helicopters, airplanes).\n> The command returns false if the related limit is reached.","syntaxes":[{"syntax":"object setFeatureType type","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"type","type":"Number","description":"the desired feature type","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the feature is set, false otherwise (limit reached)"},"form":"binary","left":{"text":"object"},"right":{"text":"type"}}],"examples":[{"text":"Set a building to be always rendered:\n\n```sqf\nbuilding setFeatureType 2;\n```","code":["building setFeatureType 2;"]}],"see_also":["setViewDistance","setObjectViewDistance"],"notes":[{"user":"Waffle SS.","date":"2017-10-10T16:18:00Z","text":"For world objects, command effect persists **after mission restart**. Map must be reloaded to automatically revert setting."}]},{"name":"setFlagAnimationPhase","title":"setFlagAnimationPhase","type":"command","url":"https://community.bistudio.com/wiki/setFlagAnimationPhase","revid":348703,"updated":"2023-11-08T14:29:28Z","groups":["Flags"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","locality":{"argument":"global","effect":"local"},"description":"Sets flag position on the flag pole. To animate flag use BIS_fnc_animateFlag.","syntaxes":[{"syntax":"flag setFlagAnimationPhase phase","params":[{"name":"flag","type":"Object","description":"flag pole of the type `\"FlagCarrier\"`","type_expr":"Object"},{"name":"phase","type":"Number","description":"flag position on the flag pole according to the given animation phase, where 0 is the bottom of the flag pole, 1 is the top of the flag pole.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"flag"},"right":{"text":"phase"}}],"examples":[{"code":["_flag1 setFlagAnimationPhase 0.5;"]}],"see_also":["flagAnimationPhase","Arma 3: Flag Textures"]},{"name":"setFlagOwner","title":"setFlagOwner","type":"command","url":"https://community.bistudio.com/wiki/setFlagOwner","revid":369375,"updated":"2024-09-03T18:43:13Z","groups":["Flags","Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Sets flag owner. When owner is set to objNull or any object other than a unit of class man or logic, flag is returned to the flagpole. A flag owned by a logic has no visual representation.","syntaxes":[{"syntax":"flag setFlagOwner owner","params":[{"name":"flag","type":"Object","type_expr":"Object"},{"name":"owner","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"flag"},"right":{"text":"owner"}}],"examples":[{"code":["_flag1 setFlagOwner _soldier1;"]},{"text":"To return the flag back to the flag pole:\n\n```sqf\n//Method 1: (set owner null)\nflag _flagCarrier setFlagOwner objNull;\n//Method 2: (set the flag mast as the owner)\nflag _flagCarrier setFlagOwner flag _flagCarrier;\n```","code":["//Method 1: (set owner null)\nflag _flagCarrier setFlagOwner objNull;\n//Method 2: (set the flag mast as the owner)\nflag _flagCarrier setFlagOwner flag _flagCarrier;"]}],"see_also":["flag","flagOwner","setFlagSide","setFlagTexture","flagSide","flagTexture","forceFlagTexture","getForcedFlagTexture"],"notes":[{"user":"Bdfy","text":"Since flags can not be owned by vehicles, use *\"flag setFlagOwner driver tank1\"* or *\"flag1 setFlagOwner tank1D\"* to assign the flag to the vehicle's driver. The second method will only work if *tank1* is the name of a unit, not a variable refering to it. True for OFP&Arma"}]},{"name":"setFlagSide","title":"setFlagSide","type":"command","url":"https://community.bistudio.com/wiki/setFlagSide","revid":369359,"updated":"2024-09-03T18:43:06Z","groups":["Flags"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets flag Side. A flag may be taken by any unit that is enemy to the side that owns the flag. Just like with setFlagTexture, if the command executed where unit is local effect of the command will be global and JIP compatible.","syntaxes":[{"syntax":"flag setFlagSide side","params":[{"name":"flag","type":"Object","type_expr":"Object"},{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"flag"},"right":{"text":"side"}}],"examples":[{"code":["_flag1 setFlagSide east;"]},{"text":"Capturable OPFOR flag:\n\n```sqf\nprivate _flag = \"FlagPole_F\" createVehicle position player;\n_flag setFlagTexture \"\\A3\\Data_F\\Flags\\Flag_CSAT_CO.paa\";\n_flag setFlagSide east;\n```","code":["private _flag = \"FlagPole_F\" createVehicle position player;\n_flag setFlagTexture \"\\A3\\Data_F\\Flags\\Flag_CSAT_CO.paa\";\n_flag setFlagSide east;"]}],"see_also":["flag","flagOwner","setFlagOwner","setFlagTexture","flagSide","flagTexture","setFlagAnimationPhase","flagAnimationPhase","forceFlagTexture","getForcedFlagTexture"]},{"name":"setFlagTexture","title":"setFlagTexture","type":"command","url":"https://community.bistudio.com/wiki/setFlagTexture","revid":378480,"updated":"2026-04-24T11:57:06Z","groups":["Flags"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets flag texture.","syntaxes":[{"syntax":"flag setFlagTexture texture","params":[{"name":"flag","type":"Object","description":"a flag pole","type_expr":"Object"},{"name":"texture","type":"String","description":"flag texture. If texture is `\"\"`, flag is not drawn. Custom texture can be used:\n\n- Prior Arma 3: Dimension 200×200, file extension .jpg\n- Since Arma 3: Dimension 512×256, file extension .paa","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"flag"},"right":{"text":"texture"}}],"examples":[{"code":["_flagE setFlagTexture \"\\ca\\misc\\data\\sever_vlajka.paa\";"]},{"code":["_flagW setFlagTexture \"\\ca\\misc\\data\\usa_vlajka.paa\";"]},{"code":["flag1 setFlagTexture \"\\A3\\Data_F\\Flags\\Flag_red_CO.paa\";"]},{"code":["_customFlag setFlagTexture \"myMissionFlag.paa\";"]},{"code":["_flag_Arma_3 setFlagTexture \"\\a3\\ui_f\\data\\Logos\\arma3_expansion_ca.paa\";"]},{"text":"Capturable OPFOR flag:\n\n```sqf\nprivate _flag = \"FlagPole_F\" createVehicle position player;\n_flag setFlagTexture \"\\A3\\Data_F\\Flags\\Flag_CSAT_CO.paa\";\n_flag setFlagSide east;\n```","code":["private _flag = \"FlagPole_F\" createVehicle position player;\n_flag setFlagTexture \"\\A3\\Data_F\\Flags\\Flag_CSAT_CO.paa\";\n_flag setFlagSide east;"]}],"see_also":["flag","flagOwner","setFlagOwner","setFlagSide","setObjectTexture","setObjectTextureGlobal","flagSide","flagTexture","setFlagAnimationPhase","flagAnimationPhase","forceFlagTexture","getForcedFlagTexture"]},{"name":"setFog","title":"setFog","type":"command","url":"https://community.bistudio.com/wiki/setFog","revid":379150,"updated":"2026-10-17T01:44:03Z","groups":["Environment"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"global","server_exec":true},"description":"Smoothly change the fog over given time (in seconds). See also fogParams.\n\n> [!NOTE]\n> This command is MP synchronised, if executed on server, the changes will propagate globally. If executed on client effect is temporary as it will soon change to the server setting.","syntaxes":[{"syntax":"time setFog fog","params":[{"name":"time","type":"Number","description":"transition time to the new value","type_expr":"Number"},{"name":"fog","type":"Number","description":"fog density in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"fog"}},{"syntax":"time setFog [fogValue, fogDecay, fogBase]","since":"arma3 0.50","params":[{"name":"time","type":"Number","description":"transition time to the new value","type_expr":"Number"},{"name":"fogValue","type":"Number","description":"normal fog value that represents fog density at *fogBase* level, in range 0..1","type_expr":"Number"},{"name":"fogDecay","type":"Number","description":"decay of fog density with altitude, in range -1..1; a negative value means a \"ceiling\" fog","type_expr":"Number"},{"name":"fogBase","type":"Number","description":"base altitude (ASL) of fog (in meters), in range -5000..5000","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"[fogValue, fogDecay, fogBase]"}}],"examples":[{"code":["15 setFog 0.5;"]},{"text":"Force no fog:\n\n```sqf\n0 setFog 0;\n// forceWeatherChange; // change is immediate\n999999 setFog 0;\n```","code":["0 setFog 0;\n// forceWeatherChange; // change is immediate\n999999 setFog 0;"]},{"text":"```sqf\n// Arma 3 examples:\n0 setFog [1, 0.01, 0];\n0 setFog [1, -1, 70];    // mountain fog, starts from 70m ASL and thickens the higher you climb\n0 setFog [1, 1, 60];    // valley fog, starts from 60m ASL and thickens the lower you descend\n0 setFog [1, 1, 0];        // fooooog on the waaaater\n```","code":["// Arma 3 examples:\n0 setFog [1, 0.01, 0];\n0 setFog [1, -1, 70];\t// mountain fog, starts from 70m ASL and thickens the higher you climb\n0 setFog [1, 1, 60];\t// valley fog, starts from 60m ASL and thickens the lower you descend\n0 setFog [1, 1, 0];\t\t// fooooog on the waaaater"]}],"multiplayer":"Before Arma 3, server and clients could have each a different (local) fog value.","see_also":["Arma 3: Improved Fog","fog","fogParams","fogForecast","nextWeatherChange","forceWeatherChange","setRain"],"notes":[{"user":"Ceeeb","date":"2007-04-20T04:25:00Z","text":"Only one script command induced weather change (either setOvercast or setFog) can be happening at a time.\nStarting a new weather change will immediately halt the current weather change.\nsetRain changes are independent and can occur simultaneously to a weather change."},{"user":"Zapat","date":"2015-12-15T14:32:00Z","text":"setTimeMultiplier DOES affect transition time."},{"user":"Killzone_Kid","date":"2019-01-10T10:23:00Z","text":"A little information about how Alt Syntax works.\nThe *fogValue* is normal fog value that could be set independently with original setFog command.\n*fogBase* is the ASL altitude at which the fog will start. 0 is the sea level. *fogDecay* is how defined the fog start is. The more defined, the denser is the fog.\n1 (or -1) are the max values. If it is positive the fog will be generated below *fogBase* line, if negative, above it.\nIf *fogDecay* is small, the fog will transition more smoothly from no fog to full fog, and because of that it will cross *fogBase* line by quite a lot, depending on how small is *fogDecay* value.\nCurrent values of *fogDecay* and *fogBase* can be retrieved with fogParams."},{"user":"Sa-Matra","date":"2022-07-05T05:29:31Z","text":"Few notes about network behavior of the fog:\n\n- Fog is the only weather parameter that is *almost* properly network-synchronized by the engine. You can rely on it for both connected players and JIP players without jumping through hoops like other weather commands.\n- *time* is not synchronized over the network exactly, fog values changes will be linear over time where you run the command, while network-synced *time* will be non-linear, but in the end fog is still will be somewhat close between clients and servers, so its not much of a game breaker.\n- Say fog all 0 on both server and client, instantly setting fog on the server with `0 setFog 1` or even `0 setFog [1,1,1]` will not set it instantly on clients, but rather interpolate it there over few seconds (~10-15), non-linearly (slower the closer it gets to server values)\n- Setting *fogValue* to values above 1 is allowed where you run the command, but network sync will still clamp it to 1, so if you do `0 setFog 100`, clients will still interpolate *fogValue* to 1, including JIP, so make sure you don't set it above 1 if you expect consistent values between server and client for some calculations."},{"user":"Sa-Matra","date":"2022-08-01T09:43:29Z","text":"Be aware that this command is affected by setWindStr and windStr! Max fogValue = 1 - windStr, so if you do `0 setWindStr 1`, setting any fog with time>0 will actually set fog to 0! Doing instant fog changes with time=0 strangely still works though."},{"user":"OverlordZorn","date":"2026-10-17T01:44:03Z","text":"Tested in Arma 3 v2.22:\n\n- Confirming the note about `windStr`: with `0 setWindStr 0.6`, `30 setFog 1` clamps `fogForecast` to 0.4 right away, and fog stops at 0.4.\n- `setWind` (even with forced = true) does not change `windStr`, so it does not limit fog.\n- `setFog` sets `nextWeatherChange` to the given transition time. When it runs out, the engine picks a new random forecast (e.g. fog 0.4 → 0.362 with a new `nextWeatherChange` of ~3300s)."}]},{"name":"setForceGeneratorRTD","title":"setForceGeneratorRTD","type":"command","url":"https://community.bistudio.com/wiki/setForceGeneratorRTD","revid":351296,"updated":"2023-11-27T03:20:18Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34","tkoh":"1.00"},"since":"arma3 1.34","arma3_since":"1.34","description":"> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"value setForceGeneratorRTD arr","params":[{"name":"value","type":"Number","type_expr":"Number"},{"name":"arr","type":"Array","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"value"},"right":{"text":"arr"}}],"examples":[{"code":["something1 setForceGeneratorRTD something2;"]}],"see_also":["clearForcesRTD","forceGeneratorRTD","addForceGeneratorRTD"],"categories_extra":["Stubs"]},{"name":"setFormation","title":"setFormation","type":"command","url":"https://community.bistudio.com/wiki/setFormation","revid":379535,"updated":"2026-10-31T00:51:46Z","groups":["Groups"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Set group formation.","syntaxes":[{"syntax":"group setFormation formation","params":[{"name":"group","type":"Object, Group or Team Member","type_expr":"Object | Group | Team Member"},{"name":"formation","type":"String","description":"can be one of:\n\n- \"COLUMN\"\n- \"STAG COLUMN\"\n- \"WEDGE\"\n- \"ECH LEFT\"\n- \"ECH RIGHT\"\n- \"VEE\"\n- \"LINE\"\n- Armed Assault v1.00 \"FILE\"\n- Armed Assault v1.00 \"DIAMOND\"","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"formation"}}],"examples":[{"code":["_groupOne setFormation \"LINE\";"]}],"see_also":["Mission Editor: Waypoints","formation"]},{"name":"setFormationTask","title":"setFormationTask","type":"command","url":"https://community.bistudio.com/wiki/setFormationTask","revid":379377,"updated":"2026-10-30T23:58:24Z","groups":["Unit Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Set the current task of the formation member.\n\n> [!NOTE]\n> This command is not available in Arma 2.","syntaxes":[{"syntax":"unit setFormationTask task","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"task","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"task"}}],"examples":[{"code":["_unit setFormationTask \"MOVE\";"]}],"see_also":["formationTask"],"notes":[{"user":"Donnervogel","date":"2007-03-02T15:57:00Z","text":"The argument for *task* can be any String value. This can effectively be used to store a property in String format an retrieve it with formationTask in FSM scripts. By using it outside of FSM scripts you're risking to get it overwritten by other running FSM scripts."}]},{"name":"setFormDir","title":"setFormDir","type":"command","url":"https://community.bistudio.com/wiki/setFormDir","revid":379378,"updated":"2026-10-30T23:58:32Z","groups":["Groups"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets group formation heading. Accepted heading range is 0 to 360. Formation is facing this direction unless enemy is seen. When group is moving, this value is overridden by movement direction. If the new direction is noticeably different from the old direction (approx +/- 15 degrees), units will change positions changing formationDirection.","syntaxes":[{"syntax":"group setFormDir heading","params":[{"name":"group","type":"Object or Group","type_expr":"Object | Group"},{"name":"heading","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"heading"}}],"examples":[{"code":["_group1 setFormDir 180;"]},{"code":["_unit1 setFormDir random 360;"]},{"code":["//center the main turret\n(group BIS_Crew1) setFormDir (getDir BIS_Armor);"]}],"see_also":["setDir","setVectorDir","setVectorDirAndUp","resetSubgroupDirection","formation","formationLeader","formationMembers","formationTask","formationDirection","formationPosition"],"notes":[{"user":"Killzone_Kid","date":"2014-11-22T20:03:00Z","text":"When applied to AI, setFormDir will set unit formation direction, which in turn will force unit to change direction to match formation direction, however unit will stop turning as soon as unit direction is +/- 30 degrees of the formation direction. To precisely match formation direction, additional setDir is required:\n\n```sqf\n_unit setFormDir 45;\n_unit setDir 45;\nhint str direction _unit; //45\n```"}]},{"name":"setFriend","title":"setFriend","type":"command","url":"https://community.bistudio.com/wiki/setFriend","revid":341629,"updated":"2023-06-12T19:02:54Z","groups":["Sides"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"effect":"global","server_exec":true},"description":"Sets how friendly a side is with another. The friendliness is set for one side, not for the other. See also Side Relations.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 this command can be used mid-mission. Before that it was intended to be used on mission start only, as changing value during mission could cause unexpected errors in AI behaviour (especially for groups already knowing about \"switched to enemy\" groups).","syntaxes":[{"syntax":"side1 setFriend [side2, value]","params":[{"name":"side1","type":"Side","type_expr":"Side"},{"name":"side2","type":"Side","type_expr":"Side"},{"name":"value","type":"Number","description":"a value smaller than 0.6 results in being enemy, otherwise *side1* is friendly to *side2*","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"side1"},"right":{"text":"[side2, value]"}}],"examples":[{"code":["west setFriend [resistance, 0]; // west will not like resistance from now on"]},{"code":["resistance setFriend [east, 0];\neast setFriend [resistance, 0]; // both are enemies\n\nresistance setFriend [east, 1];\neast setFriend [resistance, 0]; // resistance likes east, but east does not like resistance"]},{"code":["west setFriend [west, 0]; // free for all deathmatch! works with west/blufor, east/opfor, independent/resistance and civilian"]}],"see_also":["getFriend","BIS_fnc_sideIsFriendly","BIS_fnc_sideIsEnemy","Side Relations"],"notes":[{"user":"Ceeeb","date":"2007-11-30T11:25:00Z","text":"Setting the civilian side to be the enemy of any other side will result in the other side attacking inanimate mission editor placed objects such as empty vehicles and static objects, since these objects belong to the civilian side."}]},{"name":"setFromEditor","title":"setFromEditor","type":"command","url":"https://community.bistudio.com/wiki/setFromEditor","revid":322969,"updated":"2022-06-28T21:42:52Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Set if given team member was inserted directly from editor.","syntaxes":[{"syntax":"teamMember setFromEditor fromEditor","params":[{"name":"teamMember","type":"Team Member","type_expr":"Team Member"},{"name":"fromEditor","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"teamMember"},"right":{"text":"fromEditor"}}],"examples":[{"code":["_teamMember setFromEditor true;"]}]},{"name":"setFSMVariable","title":"setFSMVariable","type":"command","url":"https://community.bistudio.com/wiki/setFSMVariable","revid":330070,"updated":"2022-08-15T16:49:43Z","groups":["System"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Set variable to given value in the variable space of given FSM.\nThe FSM handle is the number returned by the execFSM command.","syntaxes":[{"syntax":"handle setFSMVariable [name, value]","params":[{"name":"handle","type":"Number","description":"FSM handle","type_expr":"Number"},{"name":"name","type":"String","description":"name of the FSM variable","type_expr":"String"},{"name":"value","type":"Anything","description":"new value of the FSM variable","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"handle"},"right":{"text":"[name, value]"}}],"examples":[{"code":["_handle = execFSM \"test.fsm\";\n_handle setFSMVariable [\"_foo\", 23]; // sets variable _foo in the FSM to 23"]}],"see_also":["FSM","commandFSM","completedFSM","doFSM","execFSM","getFSMVariable"],"notes":[{"user":"Master85","date":"2014-03-23T00:53:00Z","text":"If the variable is not yet defined within the FSM it will be created."}]},{"name":"setFuel","title":"setFuel","type":"command","url":"https://community.bistudio.com/wiki/setFuel","revid":376981,"updated":"2026-01-01T06:22:22Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets fuel level.","syntaxes":[{"syntax":"vehicle setFuel amount","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"amount","type":"Number in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"amount"}}],"examples":[{"code":["_jeepOne setFuel 0.5;"]}],"see_also":["fuel","getFuelCargo","setFuelCargo","setHit","setAmmo"]},{"name":"setFuelCargo","title":"setFuelCargo","type":"command","url":"https://community.bistudio.com/wiki/setFuelCargo","revid":379379,"updated":"2026-10-30T23:58:40Z","groups":["Vehicle Inventory"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets fuel amount in cargo space of refuel vehicles. Note that the carrying capacity of each side's refuel trucks differ.","syntaxes":[{"syntax":"vehicle setFuelCargo amount","params":[{"name":"vehicle","type":"Object","type_expr":"Object","text":"vehicle : Object"},{"name":"amount","type":"Number in range 0..1","type_expr":"Number","text":"amount : Number in range 0..1"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"amount"}}],"examples":[{"code":["_refuelTruck setFuelCargo 0;"]}],"see_also":["getFuelCargo","fuel","setFuel","setAmmoCargo","setRepairCargo"],"notes":[{"user":"Waffle SS.","date":"2015-07-10T19:33:00Z","text":"Arma 3 v1.44 **setFuelCargo** will have no effect if the vehicle doesn't support getFuelCargo."}]},{"name":"setFuelConsumptionCoef","title":"setFuelConsumptionCoef","type":"command","url":"https://community.bistudio.com/wiki/setFuelConsumptionCoef","revid":377716,"updated":"2026-01-02T09:11:12Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.16"},"since":"arma3 2.16","arma3_since":"2.16","locality":{"argument":"local","effect":"global"},"description":"Sets the fuel consumption coefficient, which is a multiplier of the fuel consumption rate in config. It doesn't affect fuel leakage or refueling.","syntaxes":[{"syntax":"vehicle setFuelConsumptionCoef coef","params":[{"name":"vehicle","type":"Object","type_expr":"Object","text":"vehicle : Object"},{"name":"coef","type":"Number in range 0..1000","description":"Values larger than 1 increase fuel consumption, and values between 0 and 1 decrease fuel consumption. 0 disables fuel consumption","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"coef"}}],"examples":[{"code":["myTank setFuelConsumptionCoef 10; // consume 10x more fuel than default"]}],"see_also":["getFuelConsumptionCoef"]},{"name":"setGroupIcon","title":"setGroupIcon","type":"command","url":"https://community.bistudio.com/wiki/setGroupIcon","revid":376586,"updated":"2025-10-29T23:11:37Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets group icon properties. Since Arma 3 v2.22 the offset can be set separately for 2d and 3d.","syntaxes":[{"syntax":"group setGroupIcon [id, icon, offset]","params":[{"name":"group","type":"Group","type_expr":"Group"},{"name":"id","type":"Number","description":"the icon ID returned by addGroupIcon","type_expr":"Number"},{"name":"icon","type":"String","description":"class name of desired icon from CfgGroupIcons","type_expr":"String"},{"name":"offset","type":"Array","optional":true,"default":"[0,0]","description":"X and Y offsets of the icon in form [offsetX, offsetY, (offsetX3d), (offsetY3d)]","type_expr":"Array","text":"offset: Array - (Optional, default [0,0]) X and Y offsets of the icon in form [offsetX, offsetY, (offsetX3d), (offsetY3d)]"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"[id, icon, offset]"}}],"examples":[{"code":["_target setGroupIcon [_icon, \"hc_selectedEnemy\"];\n_target setGroupIcon [_icon, \"flag\"];\n\n_group setGroupIcon [_icon, _iconsClass, _offset];"]}],"see_also":["addGroupIcon","clearGroupIcons","getGroupIcon","getGroupIcons","getGroupIconParams","groupIconSelectable","groupIconsVisible","onGroupIconClick","removeGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible"]},{"name":"setGroupIconParams","title":"setGroupIconParams","type":"command","url":"https://community.bistudio.com/wiki/setGroupIconParams","revid":377887,"updated":"2026-01-04T16:31:07Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Set group icons parameters.","syntaxes":[{"syntax":"group setGroupIconParams properties","params":[{"name":"group","type":"Group","type_expr":"Group"},{"name":"properties","type":"Array with [color, text, scale, visibility, WPvisibility, WPcolor]","description":"Array with [color, text, scale, visibility, WPvisibility, WPcolor]\n\n- color: Color (RGBA)\n- text: String\n- scale: Number\n- visibility: Boolean\n- WPvisibility: Boolean\n- WPcolor: Color (RGBA)","type_expr":"Array","text":"properties: Array with [color, text, scale, visibility, WPvisibility, WPcolor]\n\n- color: Color (RGBA)\n- text: String\n- scale: Number\n- visibility: Boolean\n- WPvisibility: Boolean\n- WPcolor: Color (RGBA)"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"properties"}}],"examples":[{"code":["_grp setGroupIconParams [[0.9,0,0,1], \"The Group\", 1.25, false];"]}],"see_also":["addGroupIcon","clearGroupIcons","getGroupIcon","getGroupIconParams","groupIconSelectable","groupIconsVisible","onGroupIconClick","removeGroupIcon","setGroupIcon","setGroupIconsSelectable","setGroupIconsVisible"]},{"name":"setGroupIconsSelectable","title":"setGroupIconsSelectable","type":"command","url":"https://community.bistudio.com/wiki/setGroupIconsSelectable","revid":349137,"updated":"2023-11-08T14:49:45Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets if group icons raise onGroupIconClick, onGroupIconOverEnter and onGroupIconOverLeave events.","syntaxes":[{"syntax":"setGroupIconsSelectable selectable","params":[{"name":"selectable","type":"Boolean","description":"setting to true makes the icon selectable","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing","description":"(objNull prior to Arma 3 v1.92)","text":"Nothing (objNull prior to Arma 3 v1.92)"},"form":"unary","right":{"text":"selectable"}}],"examples":[{"code":["setGroupIconsSelectable true;"]}],"see_also":["groupIconSelectable"]},{"name":"setGroupIconsVisible","title":"setGroupIconsVisible","type":"command","url":"https://community.bistudio.com/wiki/setGroupIconsVisible","revid":369184,"updated":"2024-09-03T10:34:45Z","groups":["High Command"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets if group icons added with addGroupIcon are visible on map and in the HUD.","syntaxes":[{"syntax":"setGroupIconsVisible [showOnMap, showOnHUD]","params":[{"name":"showOnMap","type":"Boolean","description":"true to show on map. Default is false","type_expr":"Boolean"},{"name":"showOnHUD","type":"Boolean","description":"true to show on HUD. Default is false","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing","description":"(prior to Arma 3 v1.94 this command returned Object of null value)","text":"Nothing (prior to Arma 3 v1.94 this command returned Object of null value)"},"form":"unary","right":{"text":"[showOnMap, showOnHUD]"}}],"examples":[{"code":["setGroupIconsVisible [true, true];\n(group player) addGroupIcon [\"b_inf\", [0, 0]];"]}],"see_also":["addGroupIcon","clearGroupIcons","getGroupIcon","getGroupIconParams","groupIconSelectable","groupIconsVisible","onGroupIconClick","removeGroupIcon","setGroupIcon","setGroupIconParams","setGroupIconsSelectable"],"notes":[{"user":"Larrow","date":"2022-02-06T09:59:20Z","text":"If enabling for MARTA (Military Symbols) and using teamSwitch this command needs to be run again once switched to the new unit.\nPossibly do it in a mission eventHandler of TeamSwitch."}]},{"name":"setGroupId","title":"setGroupId","type":"command","url":"https://community.bistudio.com/wiki/setGroupId","revid":376660,"updated":"2025-11-03T17:32:23Z","groups":["Groups"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sets the group radio callsign, how it will be displayed in radio chat. Two groups on the same side **cannot** have the same callsign (possible on different sides) - see Example 4.\nThe identity setup can consist of format keywords (marked with **%**) and param keywords taken from **CfgWorlds** config.\nFormatting is almost like using the format command but with some special group keywords (see Example 2).\n\n| %GroupSquad | %GroupPlatoon | %GroupCompany | %GroupNames | %GroupColors |\n|---|---|---|---|---|\n| - \"Squad1\" → 1<br>- \"Squad2\" → 2<br>- \"Squad3\" → 3<br>- \"Squad4\" → 4 | - \"Platoon1\" → 1<br>- \"Platoon2\" → 2<br>- \"Platoon3\" → 3<br>- \"Platoon4\" → 4 | - \"CompanyAlpha\" → Alpha<br>- \"CompanyBravo\" → Bravo<br>- \"CompanyCharlie\" → etc.<br>- \"CompanyDelta\"<br>- \"CompanyEcho\"<br>- \"CompanyFoxtrot\"<br>- \"CompanyGolf\"<br>- \"CompanyHotel\"<br>- \"CompanyIndia\"<br>- \"CompanyKilo\"<br>- \"CompanyLima\"<br>- \"CompanyMike\"<br>- \"CompanyNovember\"<br>- \"CompanyOscar\"<br>- \"CompanyPapa\"<br>- \"CompanyQuebec\"<br>- \"CompanyRomeo\"<br>- \"CompanySierra\"<br>- \"CompanyTango\"<br>- \"CompanyUniform\"<br>- \"CompanyVictor\"<br>- \"CompanyWhiskey\"<br>- \"CompanyXray\" → X-Ray<br>- \"CompanyYankee\"<br>- \"CompanyZulu\" | - \"Alpha\"<br>- \"Bravo\"<br>- \"Charlie\"<br>- \"Delta\"<br>- \"Echo\"<br>- \"Foxtrot\"<br>- \"Golf\"<br>- \"Hotel\"<br>- \"November\"<br>- \"Kilo\"<br>- \"Yankee\"<br>- \"Zulu\"<br>- \"Convoy\"<br>- \"Buffalo\"<br>- \"Guardian\"<br>- \"Two\"<br>- \"Three\"<br>- \"Fox\" | - \"GroupColor0\" → (nothing)<br>- \"GroupColor1\" → Black<br>- \"GroupColor2\" → Red<br>- \"GroupColor3\" → Green<br>- \"GroupColor4\" → Blue<br>- \"GroupColor5\" → Yellow<br>- \"GroupColor6\" → Orange<br>- \"GroupColor7\" → Pink<br>- \"Six\" → Six |\n\n| Letter | Colour |\n|---|---|\n| - \"Alpha\"<br>- \"Bravo\"<br>- \"Charlie\"<br>- \"Delta\"<br>- \"Echo\"<br>- \"Foxtrot\"<br>- \"Golf\"<br>- \"Hotel\"<br>- \"Kilo\"<br>- \"Yankee\"<br>- \"Zulu\"<br>- \"Buffalo\"<br>- \"Convoy\"<br>- \"Guardian\"<br>- \"November\"<br>- \"Two\"<br>- \"Three\"<br>- \"Fox\" | - \"GroupColor0\" → (nothing)<br>- \"GroupColor1\" → Black<br>- \"GroupColor2\" → Red<br>- \"GroupColor3\" → Green<br>- \"GroupColor4\" → Blue<br>- \"GroupColor5\" → Yellow<br>- \"GroupColor6\" → Orange<br>- \"GroupColor7\" → Pink<br>- \"Six\" → Six |\n\n> [!NOTE]\n> **Operation Flashpoint:**\n>\n> - In **Operation Flashpoint**, the group ID cannot be freely decided and format must be [letter, colour, picture] or [letter, colour] - *nameFormat* **cannot** be a custom text - see Example 3.\n> - The radio callsign strings can be overwritten in a mission by writing Stringtable entries of the same name. Some entry names:\n>   - STR_CFG_*GRPNAMES*_**ALPHA**\n>   - STR_CFG_*GRPNAMES*_**FOX**\n>   - STR_CFG_*GRPCOL*_**BLACK**\n>   - STR_CFG_*GRPNAMES*_**SIX** (unlike its name suggests, this is a \"group colour\")\n>   - STR_CFG_FIREFLYBASE\n>   - STR_CFG_PAPABEAR\n>   - STR_CFG_HQ_BASE","syntaxes":[{"syntax":"group setGroupId [nameFormat, nameParam1, nameParam2, ...]","params":[{"name":"group","type":"Object or Group","type_expr":"Object | Group"},{"name":"nameFormat","type":"String","description":"format template (%keyword1 - %keyword2...etc)","type_expr":"String"},{"name":"nameParamN","type":"String","description":"param keyword","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"[nameFormat, nameParam1, nameParam2, ...]"}}],"examples":[{"text":"**Arma 3**:\n\n```sqf\ngroup player setGroupId [\"Some name for the group\"];\nhint groupId group player;    // \"Some name for the group\"\nplayer sideChat \"lalala\";    // Some name for the group (KK): \"lalala\"\n```","code":["group player setGroupId [\"Some name for the group\"];\nhint groupId group player;\t// \"Some name for the group\"\nplayer sideChat \"lalala\";\t// Some name for the group (KK): \"lalala\""]},{"text":"**Arma 3**:\n\n```sqf\ngroup player setGroupId [\"%GroupNames :=: %GroupColors\", \"Alpha\", \"GroupColor2\"];\nhint groupId group player;    // \"Alpha :=: Red\"\nplayer sideChat \"lalala\";    // Alpha :=: Red (KK): \"lalala\"\n```","code":["group player setGroupId [\"%GroupNames :=: %GroupColors\", \"Alpha\", \"GroupColor2\"];\nhint groupId group player;\t// \"Alpha :=: Red\"\nplayer sideChat \"lalala\";\t// Alpha :=: Red (KK): \"lalala\""]},{"text":"**Armed Assault / Arma 2 / Arma 3**:\n\n```sqf\ngroup player setGroupId [\"First Assault Recon Team\"];\n```\n\n**Operation Flashpoint**:\n\n```sqf\n_group1 setGroupId [\"Delta\", \"GroupColor4\"]\n```","code":["group player setGroupId [\"First Assault Recon Team\"];","_group1 setGroupId [\"Delta\", \"GroupColor4\"]"]},{"text":"When trying to apply the same callsign to two groups of the same side, the callsigns will simply be swapped, e.g:\n\n```sqf\ngroup1 setGroupId [\"Active Group\"];\ngroup2 setGroupId [\"Inactive Group\"];\ngroup2 setGroupId [\"Active Group\"]; // group1 is \"Inactive Group\" now\n```","code":["group1 setGroupId [\"Active Group\"];\ngroup2 setGroupId [\"Inactive Group\"];\ngroup2 setGroupId [\"Active Group\"]; // group1 is \"Inactive Group\" now"]}],"multiplayer":"For the global variant of this command see setGroupIdGlobal.","see_also":["setGroupIdGlobal","groupId","group"],"notes":[{"user":"Killzone_Kid","date":"2015-04-21T23:21:00Z","text":"> [!NOTE]\n> Extraction script can be found on the Biki Export Scripts page."}]},{"name":"setGroupIdGlobal","title":"setGroupIdGlobal","type":"command","url":"https://community.bistudio.com/wiki/setGroupIdGlobal","revid":369314,"updated":"2024-09-03T18:42:56Z","groups":["Groups"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","locality":{"argument":"global","effect":"global"},"description":"A global equivalent of setGroupId.","syntaxes":[{"syntax":"group setGroupIdGlobal [format, keyword1, keyword2, ...]","params":[{"name":"group","type":"Object or Group","type_expr":"Object | Group"},{"name":"format","type":"String","description":"format template (e.g \"%keyword1 - %keyword2 / %keyword4 (%keyword3)\")","type_expr":"String"},{"name":"keywordN","type":"String","description":"keyword value","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"group"},"right":{"text":"[format, keyword1, keyword2, ...]"}}],"examples":[{"code":["group player setGroupIdGlobal [\"PAPA BEAR\"];\nhint groupId group player; // \"PAPA BEAR\""]}],"see_also":["setGroupId","groupId","group"]},{"name":"setGroupOwner","title":"setGroupOwner","type":"command","url":"https://community.bistudio.com/wiki/setGroupOwner","revid":364895,"updated":"2024-06-29T14:38:33Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.40"},"since":"arma3 1.40","arma3_since":"1.40","locality":{"server_exec":true},"description":"Changes the ownership of a group (and all its units) to a given client. The group leader must not be a player. This command only works when called from the server. Returns true if locality was changed. For agents use setOwner command.","syntaxes":[{"syntax":"group setGroupOwner clientID","params":[{"name":"group","type":"Group","type_expr":"Group"},{"name":"clientID","type":"Number","description":"the machine network ID of the new owner.","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"group"},"right":{"text":"clientID"}}],"examples":[{"code":["_localityChanged = _someGroup setGroupOwner (owner _playerObject);"]}],"see_also":["owner","setOwner","groupOwner"],"notes":[{"user":"Nelis75733126","date":"2015-07-30T12:49:00Z","text":"In Arma 3 1.48, setGroupOwner only works if the group has units in it."},{"user":"TMZulu","date":"2020-04-28T22:58:00Z","text":"The setGroupOwner command will dismount the unit leader of a vehicle if the vehicle is stationary, likely due to the dummy waypoint used in the transfer.\nLocking the vehicle during transfer can counter this behavior."},{"user":"TMZulu","date":"2020-04-30T21:15:00Z","text":"Using **setGroupOwner** may cause AI to have their loadout removed. This typically occurs when transferring multiple groups in sequence without delay. This occurs on seemingly random AI in groups. The simple but finicky solution to this is to add a sufficient delay between the transfer of groups. Alternatively, one could have the units' loadouts saved and then reloaded if the unit is shown as naked. Both of these methods may be combined as well."},{"user":"TMZulu","date":"2020-04-30T21:58:00Z","text":"Locality dependent commands such as **forceSpeed** will no longer work after transfer and must be reapplied on the owning client."}]},{"name":"setGusts","title":"setGusts","type":"command","url":"https://community.bistudio.com/wiki/setGusts","revid":376959,"updated":"2026-01-01T05:50:49Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Changes the gusts value smoothly during the given time (in seconds). A time of zero means there will be an immediate change.","syntaxes":[{"syntax":"time setGusts value","params":[{"name":"time","type":"Number","type_expr":"Number"},{"name":"value","type":"Number in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"value"}}],"examples":[{"code":["60 setGusts 0.75;"]}],"see_also":["gusts","wind","setWind"],"notes":[{"user":"Sa-Matra","date":"2022-07-06T04:17:09Z","text":"Unlike most of weather commands, this one does not set gusts instantly but on next frame (in 2 frames in practice), so running it multiple times will overwrite each other. setRainbow has same behavior. In order to set gusts to some value and then have it change to another over time, you need to first do `0 setGusts 0` and then `100 setGusts 1` after 2 frames. Example:\n\n```sqf\n// Initial gusts you want\n0 setGusts 0;\n\n// A thread to wait for 2 frames\n(diag_frameNo + 2) spawn {\n    waitUntil {\n        // Code in braces is not executed until wanted frame is reached because of lazy evaluation\n        diag_frameNo >= _this && {\n            100 setGusts 1;\n            true; // positive condition result to end waitUntil and spawned thread\n        };\n    };\n};\n```"}]},{"name":"setHideBehind","title":"setHideBehind","type":"command","url":"https://community.bistudio.com/wiki/setHideBehind","revid":352191,"updated":"2024-02-01T23:25:57Z","groups":["Broken Commands"],"status":"broken","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Sets the data for hiding. objectWhereHide can be taken using findCover. hidePosition can be taken using getHideFrom. Command is not functional in Arma 2.\n\n> [!WARNING]\n> This command is not implemented!","syntaxes":[{"syntax":"object setHideBehind [objectWhereHide, hidePosition]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"objectWhereHide","type":"Object","type_expr":"Object"},{"name":"hidePosition","type":"Array","description":"format getHideFrom","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[objectWhereHide, hidePosition]"}}],"examples":[{"text":"-"}],"see_also":["getHideFrom","findCover","isHidden"]},{"name":"setHit","title":"setHit","type":"command","url":"https://community.bistudio.com/wiki/setHit","revid":369851,"updated":"2024-10-16T13:52:03Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"| Event Handler | Triggered |\n|---|---|\n| `Hit` | ✗ |\n| `HandleDamage` | ✗ |\n| `Killed` | ✓ |\n| `MPKilled` | ✓ |\n\nSet damage on a part of an object.\n\n> [!NOTE]\n> Some part names are in Czech; see the translation table.","syntaxes":[{"syntax":"object setHit [part, damage, useEffects, killer, instigator, breakRotor]","params":[{"name":"object","type":"Object","description":"local object","type_expr":"Object"},{"name":"part","type":"String","description":"name of the part (selection name)","type_expr":"String"},{"name":"damage","type":"Number","description":"damage value ranging 0..1, 0 being fully functional, 1 being destroyed","type_expr":"Number"},{"name":"useEffects","type":"Boolean","optional":true,"default":"true","description":"false to skip destruction effects","type_expr":"Boolean","since":"arma3 1.68","text":"useEffects: Boolean - (Optional, default true) false to skip destruction effects"},{"name":"killer","type":"Object","optional":true,"default":"objNull","description":"the entity that caused the damage. If the damage leads to the death of the unit, the killer will be used as the object that caused the kill.\n\n- it can be used to show \"killed by player\" in debriefing statistics and kill messages in the chat (if death messages are enabled).\n- it will alter the killer's rating as if the killer directly killed the unit.\n- it will be listed as `_killer` parameter in the Killed event handler.","type_expr":"Object","since":"arma3 2.08","text":"killer: Object - (Optional, default objNull) the entity that caused the damage. If the damage leads to the death of the unit, the killer will be used as the object that caused the kill.\n\n- it can be used to show \"killed by player\" in debriefing statistics and kill messages in the chat (if death messages are enabled).\n- it will alter the killer's rating as if the killer directly killed the unit.\n- it will be listed as `_killer` parameter in the Killed event handler."},{"name":"instigator","type":"Object","optional":true,"default":"objNull","description":"the person that instigated the damage.\n\n- if a tank is a killer, the tank gunner that pulled the trigger is instigator\n- it will be listed as `_instigator` parameter in the Killed event handler.","type_expr":"Object","since":"arma3 2.12","text":"instigator: Object - (Optional, default objNull) the person that instigated the damage.\n\n- if a tank is a killer, the tank gunner that pulled the trigger is instigator\n- it will be listed as `_instigator` parameter in the Killed event handler."},{"name":"breakRotor","type":"Boolean","optional":true,"default":"false","description":"if the hitpoint is rotor on a helicopter, true will break the rotor as well as play corresponding sound if 'useEffects' is also true.","type_expr":"Boolean","since":"arma3 2.18","text":"breakRotor: Boolean - (Optional, default false) if the hitpoint is rotor on a helicopter, true will break the rotor as well as play corresponding sound if 'useEffects' is also true."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[part, damage, useEffects, killer, instigator, breakRotor]"}}],"examples":[{"code":["vehicle player setHit [\"motor\", 1];"]},{"code":["vehicle player setHit [\"mala vrtule\", 0.95];"]},{"text":"```sqf\nif (local _heli) then\n{\n    _heli setHit [\"velka vrtule\", 0];\n}\nelse\n{\n    hint (\"Vehicle \" + str _heli + \" must be local to this machine to do that!\");\n};\n```","code":["if (local _heli) then\n{\n\t_heli setHit [\"velka vrtule\", 0];\n}\nelse\n{\n\thint (\"Vehicle \" + str _heli + \" must be local to this machine to do that!\");\n};"]}],"see_also":["getHit","getHitPointDamage","setHitPointDamage","damage","setDamage","setFuel","setAmmo","getHitIndex","setHitIndex","forceHitPointsDamageSync"],"notes":[{"user":"Deadfast","date":"2009-08-24T11:09:00Z","text":"Damaging specific parts of the vehicle will not update its overall damage value (as of v1.03):\n\n```sqf\nplayer setHit [\"hands\", 0.9];\nhint str (damage player); // will return 0\n```"},{"user":"DenV","date":"2011-03-29T14:25:00Z","text":"Direct use of the names of sections of the model is likely a bad practice, and will not work on some addons.\nSo instead:\n\n```sqf\n_MH60S setHit [\"elektronika\", _hit];\n```\n\nshould be used:\n\n```sqf\n_MH60S setHit [getText (configFile >> \"cfgVehicles\" >> \"MH60S\" >> \"HitPoints\" >> \"HitAvionics\" >> \"name\"), _hit];\n```"}]},{"name":"setHitIndex","title":"setHitIndex","type":"command","url":"https://community.bistudio.com/wiki/setHitIndex","revid":377888,"updated":"2026-01-04T16:34:13Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","locality":{"argument":"local","effect":"global"},"description":"Sets the current level of damage for a specific Hit Point. All hit points can be obtained with getAllHitPointsDamage command.","syntaxes":[{"syntax":"vehicle setHitIndex [hitPartIndex, damage, useEffects, killer, instigator, breakRotor]","params":[{"name":"vehicle","type":"Object","description":"vehicle to be damaged","type_expr":"Object","text":"vehicle : Object - vehicle to be damaged"},{"name":"hitPartIndex","type":"Number","description":"hit part index of the Hit Point","type_expr":"Number"},{"name":"damage","type":"Number in range 0..1","description":"level of damage, 0 = no damage, 1 = full damage","type_expr":"Number"},{"name":"useEffects","type":"Boolean","optional":true,"default":"true","description":"false to skip destruction effects","type_expr":"Boolean","since":"arma3 1.68","text":"useEffects: Boolean - (Optional, default true) false to skip destruction effects"},{"name":"killer","type":"Object","optional":true,"default":"objNull","description":"the entity that caused the damage. If the damage leads to the death of the unit, the killer will be used as the object that caused the kill.\n\n- It can be used to show \"killed by player\" in debriefing statistics and kill messages in the chat (if death messages are enabled).\n- It will alter the killer's rating as if the killer directly killed the unit.\n- It will be listed as `_killer` parameter in the Killed event handler.","type_expr":"Object","since":"arma3 2.08","text":"killer: Object - (Optional, default objNull) the entity that caused the damage. If the damage leads to the death of the unit, the killer will be used as the object that caused the kill.\n\n- It can be used to show \"killed by player\" in debriefing statistics and kill messages in the chat (if death messages are enabled).\n- It will alter the killer's rating as if the killer directly killed the unit.\n- It will be listed as `_killer` parameter in the Killed event handler."},{"name":"instigator","type":"Object","optional":true,"default":"objNull","description":"the person that instigated the damage.\n\n- if a tank is a killer, the tank gunner that pulled the trigger is instigator\n- it will be listed as `_instigator` parameter in the Killed event handler.","type_expr":"Object","since":"arma3 2.12","text":"instigator: Object - (Optional, default objNull) the person that instigated the damage.\n\n- if a tank is a killer, the tank gunner that pulled the trigger is instigator\n- it will be listed as `_instigator` parameter in the Killed event handler."},{"name":"breakRotor","type":"Boolean","optional":true,"default":"false","description":"if the hitpoint is rotor on a helicopter, true will break the rotor as well as play corresponding sound if 'useEffects' is also true.","type_expr":"Boolean","since":"arma3 2.18","text":"breakRotor: Boolean - (Optional, default false) if the hitpoint is rotor on a helicopter, true will break the rotor as well as play corresponding sound if 'useEffects' is also true."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[hitPartIndex, damage, useEffects, killer, instigator, breakRotor]"}}],"examples":[{"code":["vehicle player setHitIndex [1, 1];"]},{"code":["player setHitIndex [7, 0.5];"]}],"see_also":["getAllHitPointsDamage","getHitIndex","getHitPointDamage","setHitPointDamage","setHit","getHit","setDamage","damage","forceHitPointsDamageSync"]},{"name":"setHitPointDamage","title":"setHitPointDamage","type":"command","url":"https://community.bistudio.com/wiki/setHitPointDamage","revid":369857,"updated":"2024-10-16T13:52:06Z","groups":["Object Manipulation"],"status":"ok","games":{"tkoh":"1.00","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"| Event Handler | Triggered |\n|---|---|\n| `Hit` | ✗ |\n| `HandleDamage` | ✗ |\n| `Killed` | ✓ |\n| `MPKilled` | ✓ |\n\nSet the current level of damage for a specific Hit Point (specified by its config class). This command has no effect when allowDamage is set to false.\n\n> [!NOTE]\n> See also BIS_fnc_setHitPointDamage for setting hit with dependency.","syntaxes":[{"syntax":"vehicle setHitPointDamage [hitPointName, damage, useEffects, killer, instigator, breakRotor]","params":[{"name":"vehicle","type":"Object","description":"vehicle to be damaged","type_expr":"Object"},{"name":"hitPointName","type":"String","description":"name of the Hit Point class","type_expr":"String"},{"name":"damage","type":"Number","description":"level of damage, in range 0..1","type_expr":"Number"},{"name":"useEffects","type":"Boolean","optional":true,"default":"true","description":"false to skip destruction effects","type_expr":"Boolean","since":"arma3 1.68","text":"useEffects: Boolean - (Optional, default true) false to skip destruction effects"},{"name":"killer","type":"Object","optional":true,"default":"objNull","description":"the entity that caused the damage. If the damage leads to the death of the unit, the killer will be used as the object that caused the kill.\n\n- It can be used to show \"killed by player\" in debriefing statistics and kill messages in the chat (if death messages are enabled).\n- It will alter the killer's rating as if the killer directly killed the unit.\n- It will be listed as `_killer` parameter in the Killed event handler.","type_expr":"Object","since":"arma3 2.08","text":"killer: Object - (Optional, default objNull) the entity that caused the damage. If the damage leads to the death of the unit, the killer will be used as the object that caused the kill.\n\n- It can be used to show \"killed by player\" in debriefing statistics and kill messages in the chat (if death messages are enabled).\n- It will alter the killer's rating as if the killer directly killed the unit.\n- It will be listed as `_killer` parameter in the Killed event handler."},{"name":"instigator","type":"Object","optional":true,"default":"objNull","description":"the person that instigated the damage.\n\n- if a tank is a killer, the tank gunner that pulled the trigger is instigator\n- it will be listed as `_instigator` parameter in the Killed event handler.","type_expr":"Object","since":"arma3 2.12","text":"instigator: Object - (Optional, default objNull) the person that instigated the damage.\n\n- if a tank is a killer, the tank gunner that pulled the trigger is instigator\n- it will be listed as `_instigator` parameter in the Killed event handler."},{"name":"breakRotor","type":"Boolean","optional":true,"default":"false","description":"if the hitpoint is rotor on a helicopter, true will break the rotor as well as play corresponding sound if 'useEffects' is also true.","type_expr":"Boolean","since":"arma3 2.18","text":"breakRotor: Boolean - (Optional, default false) if the hitpoint is rotor on a helicopter, true will break the rotor as well as play corresponding sound if 'useEffects' is also true."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[hitPointName, damage, useEffects, killer, instigator, breakRotor]"}}],"examples":[{"code":["vehicle player setHitPointDamage [\"hitEngine2\", 1.0];"]},{"code":["player setHitPointDamage [\"hitHead\", 0.5];\nplayer setHitPointDamage [\"hitBody\", 0.5];\nplayer setHitPointDamage [\"hitHands\", 0.5];\nplayer setHitPointDamage [\"hitLegs\", 0.5];"]}],"see_also":["getHitPointDamage","getAllHitPointsDamage","setHit","getHit","setDamage","damage","getHitIndex","setHitIndex","forceHitPointsDamageSync","BIS_fnc_setHitPointDamage"],"notes":[{"user":"Master85","date":"2012-08-30T13:54:00Z","text":"This command is using the Hit Points (defined in the `HitPoints` class in the config) while setHit is using Named Selections (defined in the model itself)."}]},{"name":"setHorizonParallaxCoef","title":"setHorizonParallaxCoef","type":"command","url":"https://community.bistudio.com/wiki/setHorizonParallaxCoef","revid":309900,"updated":"2022-05-05T12:16:47Z","groups":["Camera Control","System"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Sets coef used to shift horizon position based on camera height (use 0 to disable shifting).","syntaxes":[{"syntax":"setHorizonParallaxCoef coef","params":[{"name":"coef","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"coef"}}],"examples":[{"code":["setHorizonParallaxCoef 1;"]}]},{"name":"setHUDMovementLevels","title":"setHUDMovementLevels","type":"command","url":"https://community.bistudio.com/wiki/setHUDMovementLevels","revid":323045,"updated":"2022-06-28T21:43:09Z","groups":["Interaction"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Set min/max movement borders displayed in HUD gauges. Use -1 to skip some value.","syntaxes":[{"syntax":"setHUDMovementLevels [minSpeed, maxSpeed, minAlt, maxAlt, minDir, maxDir, targetOrPosition]","params":[{"name":"minSpeed","type":"Number","description":"in m/s","type_expr":"Number"},{"name":"maxSpeed","type":"Number","description":"in m/s","type_expr":"Number"},{"name":"minAlt","type":"Number","description":"in meters","type_expr":"Number"},{"name":"maxAlt","type":"Number","description":"in meters","type_expr":"Number"},{"name":"minDir","type":"Number","description":"in degrees","type_expr":"Number"},{"name":"maxDir","type":"Number","description":"in degrees","type_expr":"Number"},{"name":"targetOrPosition","type":"Object or Position","type_expr":"Object | Position"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[minSpeed, maxSpeed, minAlt, maxAlt, minDir, maxDir, targetOrPosition]"}}],"examples":[{"code":["setHUDMovementLevels [20, 30, -1, -1, 0.23, 2.1, [0,0,0]];"]},{"code":["setHUDMovementLevels [20, 30, -1, -1, 0.23, 2.1, player];"]}]},{"name":"setHumidity","title":"setHumidity","type":"command","url":"https://community.bistudio.com/wiki/setHumidity","revid":309121,"updated":"2022-05-03T10:45:24Z","groups":["Environment"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"effect":"local"},"description":"Sets surface humidity. Affects how footsteps sound (dry / wet). humidity is increasing when raining and decreasing when not raining. Exception is if the rain is set with 'snow' flag, then humidity is not updated.","syntaxes":[{"syntax":"setHumidity humidity","params":[{"name":"humidity","type":"Number","description":"surface humidity in the range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"humidity"}}],"examples":[{"code":["setHumidity 1;"]}],"see_also":["humidity","setRain"]},{"name":"setIdentity","title":"setIdentity","type":"command","url":"https://community.bistudio.com/wiki/setIdentity","revid":369141,"updated":"2024-09-03T10:34:36Z","groups":["Unit Identity"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sets identity of a person. The identities could be defined in a custom config in Description.ext or in the main config. For a list of available main config values see CfgIdentities.\n\nThis command is an aggregate of the following commands: setName, setFace, setSpeaker, setNameSound, setPitch, only the values are loaded from the given config. It also includes value for glasses for which currently there is no direct command, instead there is an inventory command addGoggles.","syntaxes":[{"syntax":"person setIdentity identity","params":[{"name":"person","type":"Object","description":"unit to which the identity will be applied","type_expr":"Object"},{"name":"identity","type":"String","description":"name of the subclass in CfgIdentities","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"identity"}}],"examples":[{"code":["_soldier1 setIdentity \"MyLittleSoldier\";"]},{"text":"Clone factory in MP:\n\n```sqf\nfor \"_i\" from 1 to 10 do\n{\n    _bob = group player createUnit [typeOf player, position player, [], 0, \"none\"];\n    [_bob, \"MyLittleSoldier\"] remoteExec [\"setIdentity\", 0, _bob];\n};\n```","code":["for \"_i\" from 1 to 10 do\n{\n\t_bob = group player createUnit [typeOf player, position player, [], 0, \"none\"];\n\t[_bob, \"MyLittleSoldier\"] remoteExec [\"setIdentity\", 0, _bob];\n};"]}],"see_also":["setFace","setName","setNameSound","setSpeaker","setPitch","addGoggles","loadIdentity","lockIdentity","Arma 3: Event Handlers","hasCustomFace"]},{"name":"setImportance","title":"setImportance","type":"command","url":"https://community.bistudio.com/wiki/setImportance","revid":310106,"updated":"2022-05-05T12:25:20Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Sets the importance value of location.","syntaxes":[{"syntax":"location setImportance value","params":[{"name":"location","type":"Location","type_expr":"Location"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"location"},"right":{"text":"value"}}],"examples":[{"code":["myLocation setImportance 2;"]}],"see_also":["importance"]},{"name":"setInfoPanel","title":"setInfoPanel","type":"command","url":"https://community.bistudio.com/wiki/setInfoPanel","revid":364317,"updated":"2024-05-06T09:38:47Z","groups":["Custom Panels"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Opens given component or first component of given component type on specified info panel.","syntaxes":[{"syntax":"setInfoPanel [infoPanelId, componentClassOrType]","params":[{"name":"infoPanelId","type":"String","description":"info panel classname, or \"left\" or \"right\"","type_expr":"String"},{"name":"componentClassOrType","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if panel was successfully opened, false otherwise (e.g. opening GPS on player without GPS item or setting panel to vehicle that doesn't have such capability configured)"},"form":"unary","right":{"text":"[infoPanelId, componentClassOrType]"}}],"examples":[{"code":["// opens slingload assistant on right panel\nprivate _result = setInfoPanel [\"VehicleSystemsDisplayManagerComponentRight\", \"SlingLoadDisplayComponent\"];\nif (!_result) then { hint \"could not open the slingload assistant, sorry\" };"]}],"see_also":["Arma 3: Custom Info","infoPanel","infoPanels","infoPanelComponents","enableInfoPanelComponent","infoPanelComponentEnabled"]},{"name":"setJointDriveAngularVelocity","title":"setJointDriveAngularVelocity","type":"command","url":"https://community.bistudio.com/wiki/setJointDriveAngularVelocity","revid":378905,"updated":"2026-08-11T14:56:34Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"local","effect":"local"},"description":"Requires that a swing+twist or SLERP \"drive\" has been configured in attachChild.\n\nSets the joints target angular velocity (orientation relative to the joint's own orientation).\nThe drive will then behave like a spring (springParameters are configured in the drive), trying to accelerate the child object to the desired velocity.","syntaxes":[{"syntax":"joint setJointDriveAngularVelocity velocity","params":[{"name":"joint","type":"Object or NetObject","description":"The parent vehicle that has a joint to a child, or the joint itself to be manipulated","type_expr":"Object | NetObject","text":"joint : Object or NetObject - The parent vehicle that has a joint to a child, or the joint itself to be manipulated"},{"name":"velocity","type":"Vector3D","description":"relative velocity vector","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"joint"},"right":{"text":"velocity"}}],"examples":[{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"}],"see_also":["attachChild","setJointDrivePosition","setJointDriveOrientation","setJointDriveLinearVelocity"],"categories_extra":["WIP"]},{"name":"setJointDriveLinearVelocity","title":"setJointDriveLinearVelocity","type":"command","url":"https://community.bistudio.com/wiki/setJointDriveLinearVelocity","revid":378899,"updated":"2026-08-11T14:56:33Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"local","effect":"local"},"description":"Requires that a linear \"drive\" has been configured in attachChild.\n\nSets the joints target velocity (orientation relative to the joint's own orientation).\nThe drive will then behave like a spring (springParameters are configured in the drive), trying to accelerate the child object to the desired velocity.\nSimilar to setVelocityModelSpace","syntaxes":[{"syntax":"joint setJointDriveLinearVelocity velocity","params":[{"name":"joint","type":"Object or NetObject","description":"The parent vehicle that has a joint to a child, or the joint itself to be manipulated","type_expr":"Object | NetObject","text":"joint : Object or NetObject - The parent vehicle that has a joint to a child, or the joint itself to be manipulated"},{"name":"velocity","type":"Vector3D","description":"relative velocity vector","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"joint"},"right":{"text":"velocity"}}],"examples":[{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"}],"see_also":["attachChild","setJointDrivePosition","setJointDriveOrientation","setJointDriveAngularVelocity"],"categories_extra":["WIP"]},{"name":"setJointDriveOrientation","title":"setJointDriveOrientation","type":"command","url":"https://community.bistudio.com/wiki/setJointDriveOrientation","revid":379088,"updated":"2026-09-27T09:40:35Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"local","effect":"local"},"description":"Requires that a swing+twist or SLERP \"drive\" has been configured in attachChild.\n\nSets the joints target orientation (relative to the joint's own orientation).\nThe drive will then behave like a spring (springParameters are configured in the drive), trying to pull the child object to the desired orientation.","syntaxes":[{"syntax":"joint setJointDriveOrientation [angle, axis]","params":[{"name":"joint","type":"Object or NetObject","description":"The parent vehicle that has a joint to a child, or the joint itself to be manipulated","type_expr":"Object | NetObject","text":"joint : Object or NetObject - The parent vehicle that has a joint to a child, or the joint itself to be manipulated"},{"name":"angle","type":"Number","description":"The angle (in radians to rotate around axis), clockwise","type_expr":"Number"},{"name":"axis","type":"Vector3D","description":"The vector around which to rotate","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"joint"},"right":{"text":"[angle, axis]"}},{"syntax":"joint setJointDriveOrientation [vectorDir, vectorUp]","params":[{"name":"joint","type":"Object or NetObject","description":"The parent vehicle that has a joint to a child, or the joint itself to be manipulated","type_expr":"Object | NetObject","text":"joint : Object or NetObject - The parent vehicle that has a joint to a child, or the joint itself to be manipulated"},{"name":"vectorDir","type":"Vector3D","description":"vectorDir","type_expr":"Vector3D"},{"name":"vectorUp","type":"Vector3D","description":"vectorUp","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"joint"},"right":{"text":"[vectorDir, vectorUp]"}}],"examples":[{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"}],"see_also":["attachChild","setJointDrivePosition","setJointDriveLinearVelocity","setJointDriveAngularVelocity"],"categories_extra":["WIP"]},{"name":"setJointDrivePosition","title":"setJointDrivePosition","type":"command","url":"https://community.bistudio.com/wiki/setJointDrivePosition","revid":378904,"updated":"2026-08-11T14:56:34Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"local","effect":"local"},"description":"Requires that a linear \"drive\" has been configured in attachChild.\n\nSets the joints target position (relative to the joint's own position).\nThe drive will then behave like a spring (springParameters are configured in the drive), trying to pull the child object to the desired position.","syntaxes":[{"syntax":"joint setJointDrivePosition pos","params":[{"name":"joint","type":"Object or NetObject","description":"The parent vehicle that has a joint to a child, or the joint itself to be manipulated","type_expr":"Object | NetObject","text":"joint : Object or NetObject - The parent vehicle that has a joint to a child, or the joint itself to be manipulated"},{"name":"pos","type":"Array","description":"target position in XYZ relative to the joint","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"joint"},"right":{"text":"pos"}}],"examples":[{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"},{"text":"-no SQF code provided-"}],"see_also":["attachChild","setJointDriveOrientation","setJointDriveLinearVelocity","setJointDriveAngularVelocity"],"categories_extra":["WIP"]},{"name":"setLeader","title":"setLeader","type":"command","url":"https://community.bistudio.com/wiki/setLeader","revid":330647,"updated":"2022-10-03T11:09:06Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"> [!IMPORTANT]\n> To set a Group leader, see selectLeader.\n\nSet the leader of the given Team. Effect is local, unless both leader unit and team are local to PC on which command is executed, then effect is global.","syntaxes":[{"syntax":"team setLeader leader","params":[{"name":"team","type":"Team Member","type_expr":"Team Member"},{"name":"leader","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"team"},"right":{"text":"leader"}}],"see_also":["commandFollow","doFollow","formationLeader","formLeader","isFormationLeader","leader","selectLeader"]},{"name":"setLightAmbient","title":"setLightAmbient","type":"command","url":"https://community.bistudio.com/wiki/setLightAmbient","revid":377373,"updated":"2026-01-02T06:42:43Z","groups":["Lights"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Set ambient color of light. This includes surfaces that **face away** from the light, unlike setLightColor.","syntaxes":[{"syntax":"light setLightAmbient color","params":[{"name":"light","type":"Object","type_expr":"Object"},{"name":"color","type":"Color (RGB)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"color"}}],"examples":[{"code":["myLight setLightAmbient [0.5,0,0]; // produces red light around the origin source"]}],"see_also":["setLightColor","setLightBrightness","lightAttachObject","lightDetachObject","setLightIntensity","setLightAttenuation","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightDayLight"],"notes":[{"user":"Feersum","date":"2006-12-01T16:42:00Z","text":"Light can be created with command createVehicleLocal with special vehicle class \"#lightpoint\".\nFor example:\n\n```sqf\n_light = \"#lightpoint\" createVehicleLocal pos;\n_light setLightBrightness 1.0;\n_light setLightAmbient [0.0, 1.0, 0.0];\n_light setLightColor [0.0, 1.0, 0.0];\n_light lightAttachObject [_object, [0,0,0]];\n```"},{"user":"ColonelSandersLite","date":"2007-08-17T07:15:00Z","text":"To clarify:\n\n- setLightAmbient - Terrain and surrounding objects are bathed in this colour.\n- setLightColor - Controls the \"haze\" seen around the lightsource (ex flares)."},{"user":"Ffur2007slx2_5","date":"2014-03-25T10:06:00Z","text":"When both setLightAmbient and setLightColor were [0,0,0], there won’t be any visual presentation on the light source."}]},{"name":"setLightAttenuation","title":"setLightAttenuation","type":"command","url":"https://community.bistudio.com/wiki/setLightAttenuation","revid":369342,"updated":"2024-09-03T18:43:02Z","groups":["Lights"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets attenuation of light. Standard method of attenuation (1 / (constant + linear*dist + quadratic*dist*dist)).\n*start* param represents distance where the attenuation starts to take effects (dist = distance - start).","syntaxes":[{"syntax":"light setLightAttenuation [start, constant, linear, quadratic, hardlimitstart, hardlimitend]","params":[{"name":"light","type":"Object","type_expr":"Object"},{"name":"start","type":"Number","description":"distance with 100% intensity, falloff starts here","type_expr":"Number"},{"name":"constant","type":"Number","description":"constant attenuation coef","type_expr":"Number"},{"name":"linear","type":"Number","description":"linear attenuation coef","type_expr":"Number"},{"name":"quadratic","type":"Number","description":"quadratic attenuation coef","type_expr":"Number"},{"name":"hardlimitstart","type":"Number","optional":true,"description":"max distance hard limit start (start of fading of intensity to 0) in m","type_expr":"Number","text":"hardlimitstart: Number - (Optional) max distance hard limit start (start of fading of intensity to 0) in m"},{"name":"hardlimitend","type":"Number","optional":true,"description":"max distance hard limit end (end of fading of intensity to 0) in m","type_expr":"Number","text":"hardlimitend: Number - (Optional) max distance hard limit end (end of fading of intensity to 0) in m"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"[start, constant, linear, quadratic, hardlimitstart, hardlimitend]"}}],"examples":[{"code":["myLight setLightAttenuation [2, 4, 4, 0, 9, 10];"]}],"see_also":["setLightAmbient","setLightColor","lightAttachObject","lightDetachObject","setLightBrightness","setLightIntensity","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightDayLight"],"notes":[{"user":"ffur2007slx2_5","date":"2014-03-25T12:31:00Z","text":"(A3 1.14) setLightAttenuation array will present fallowing visual effects:\n\n[start(SCALAR), constant(SCALAR), linear (SCALAR), quadratic(SCALAR)]\n\n**start(SCALAR)** – Number can be unlimited, this parameter determines the range that the light source takes effect. Terrain environmental color will be bathed by setLightAmbient within the range and its covered objects will reflect the color by setLightColor.\n\n**constant(SCALAR)** – Support signed number, this parameter determines the brightness proportion of the light source, higher the number is, less the brightness will be, vice versa. Any minus value passed will be treated as 0 (100% brightness). In other words, this parameter is related with setLightBrightness and setLightIntensity.\n\n**linear (SCALAR)** – Support signed number, effective range is from 0 ~ 100 (passed minus value will be treated as 0), this parameter determines the concentration of the light source, higher the number is, more will the light concentrate, vice versa. In other words, this parameter will turn the source into spotlight and sharpens its light circle border.\nPlease pay attention to a special value: **4.31918e-005**\ne.g.\n\n```sqf\n// This value will make the light source reach an ultra high effect range. Any initial param set before will be discarded and overwritten.\n_light setLightAttenuation [2, 4, 4.31918e-005, 0];\n```\n\n**quadratic(SCALAR)** – Support signed number (range unlimited, passed minus number will be treated as 0), this parameter determines the range that the light source is visible and its visual presentation looks similar to linear. 0 means the maximum visible range. In further explanation, a less bright source can’t be seen out of the range on the land but still visible on the sea, and a bright enough source won’t be effected by the passed range who is still visible out of the range.\nPlease pay attention to a special value: **4.31918e-005**\ne.g.\n\n```sqf\n// This value will make the light source reach an ultra high effect range. Any initial param set before will be discarded and overwritten.\n_light setLightAttenuation [6, 0, 0, 4.31918e-005];\n```"}]},{"name":"setLightBrightness","title":"setLightBrightness","type":"command","url":"https://community.bistudio.com/wiki/setLightBrightness","revid":376672,"updated":"2025-11-04T00:17:20Z","groups":["Lights"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Set brightness of light. Does nothing for light reflector, for light point the formula is setLightIntensity ((brightness * 50) ^ 2)\n\n> [!NOTE]\n> This command is outdated. Use setLightIntensity instead.","syntaxes":[{"syntax":"light setLightBrightness brightness","params":[{"name":"light","type":"Object","type_expr":"Object"},{"name":"brightness","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"brightness"}}],"examples":[{"code":["myLight setLightBrightness 2;"]}],"see_also":["setLightIntensity","setLightAmbient","setLightColor","lightAttachObject","lightDetachObject","setLightAttenuation","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightDayLight"],"notes":[{"user":"Feersum","date":"2006-12-01T16:42:00Z","text":"Light can be created with command createVehicleLocal with special vehicle class `\"#lightpoint\"`\nfor example:\n\n```sqf\n_light = \"#lightpoint\" createVehicleLocal _posAGL;\n_light setLightBrightness 1.0;\n_light setLightAmbient [0.0, 1.0, 0.0];\n_light setLightColor [0.0, 1.0, 0.0];\n_light lightAttachObject [_object, [0,0,0]];\n```"}]},{"name":"setLightColor","title":"setLightColor","type":"command","url":"https://community.bistudio.com/wiki/setLightColor","revid":309010,"updated":"2022-04-25T11:42:18Z","groups":["Lights"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Set diffuse color of light. Illuminates surfaces that are facing the light.","syntaxes":[{"syntax":"light setLightColor [r, g, b]","params":[{"name":"light","type":"Object","type_expr":"Object"},{"name":"r","type":"Number","description":"red value in range 0..1","type_expr":"Number"},{"name":"g","type":"Number","description":"green value in range 0..1","type_expr":"Number"},{"name":"b","type":"Number","description":"blue value in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"[r, g, b]"}}],"examples":[{"code":["myLight setLightColor [0.5,0,0]; // produces red"]}],"see_also":["setLightAmbient","setLightBrightness","lightAttachObject","lightDetachObject","setLightIntensity","setLightAttenuation","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightDayLight","setLightIR"],"notes":[{"user":"Feersum","date":"2006-12-01T16:42:00Z","text":"Light can be created with command createVehicleLocal with special vehicle class `\"#lightpoint\"`\nfor example:\n\n```sqf\n_light = \"#lightpoint\" createVehicleLocal pos;\n_light setLightBrightness 1.0;\n_light setLightAmbient [0.0, 1.0, 0.0];\n_light setLightColor [0.0, 1.0, 0.0];\n_light lightAttachObject [_object, [0,0,0]];\n```"},{"user":"ColonelSandersLite","date":"2017-08-17T07:15:00Z","text":"To clarify:\n\n- setLightAmbient - Terrain and surrounding objects are bathed in this colour.\n- setLightColor - Controls the \"haze\" seen around the lightsource (ex flares)."},{"user":"ffur2007slx2_5","date":"2014-03-24T23:58:00Z","text":"1. In Arma 3 ver 1.14 setLightColor will also change the color of the flare when setLightUseFlare, setLightFlareSize and setLightFlareMaxDistance were used on the same light source. For example:\n\n```sqf\n_light setLightUseFlare true;\n_light setLightFlareSize 2;\n_light setLightFlareMaxDistance 60;\n_light setLightColor [1, 1, 1];\n```\n\n2. When both setLightAmbient and setLightColor are [0,0,0], there won’t be any visual presentation on the light source."}]},{"name":"setLightConePars","title":"setLightConePars","type":"command","url":"https://community.bistudio.com/wiki/setLightConePars","revid":376693,"updated":"2025-11-05T22:52:10Z","groups":["Lights"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"argument":"local","effect":"local"},"description":"Sets the `#lightreflector`'s cone params.","syntaxes":[{"syntax":"lightReflector setLightConePars [outerAngle, innerAngle, fadeCoef]","params":[{"name":"lightReflector","type":"Object","description":"object of class `#lightreflector`","type_expr":"Object"},{"name":"outerAngle","type":"Number","type_expr":"Number"},{"name":"innerAngle","type":"Number","type_expr":"Number"},{"name":"fadeCoef","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"lightReflector"},"right":{"text":"[outerAngle, innerAngle, fadeCoef]"}}],"examples":[{"code":["_light setLightConePars [90, 45, 1];"]}],"see_also":["setLightColor","setLightAmbient","setLightBrightness","lightAttachObject","lightDetachObject","setLightIntensity","setLightAttenuation","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightDayLight","setLightIR"],"notes":[{"user":"Waffle SS.","date":"2022-07-20T07:26:12Z","text":"Responds to setLightIntensity, **not** setLightBrightness:\n\n```sqf\nprivate _light = \"#lightreflector\" createVehicleLocal (player modelToWorld [0, 0.5, 0]);\n_light setLightIntensity 3000;\n_light setLightAmbient [0, 1, 0];\n_light setLightColor [0, 1, 0];\n_light setLightConePars [45, 10, 1];\n```"}]},{"name":"setLightDayLight","title":"setLightDayLight","type":"command","url":"https://community.bistudio.com/wiki/setLightDayLight","revid":319755,"updated":"2022-05-13T09:24:49Z","groups":["Lights"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets if light can be used during the day.","syntaxes":[{"syntax":"light setLightDayLight bool","params":[{"name":"light","type":"Object","type_expr":"Object"},{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"bool"}}],"examples":[{"code":["myLight setLightDayLight true;"]}],"see_also":["setLightAmbient","setLightColor","lightAttachObject","lightDetachObject","setLightIntensity","setLightAttenuation","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightBrightness"]},{"name":"setLightFlareMaxDistance","title":"setLightFlareMaxDistance","type":"command","url":"https://community.bistudio.com/wiki/setLightFlareMaxDistance","revid":310082,"updated":"2022-05-05T12:25:10Z","groups":["Lights"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets max distance where the flare is visible.","syntaxes":[{"syntax":"light setLightFlareMaxDistance distance","params":[{"name":"light","type":"Object","type_expr":"Object"},{"name":"distance","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"distance"}}],"examples":[{"code":["myLight setLightFlareMaxDistance 500;"]}],"see_also":["setLightAmbient","setLightColor","lightAttachObject","lightDetachObject","setLightIntensity","setLightAttenuation","setLightUseFlare","setLightFlareSize","setLightBrightness","setLightDayLight"]},{"name":"setLightFlareSize","title":"setLightFlareSize","type":"command","url":"https://community.bistudio.com/wiki/setLightFlareSize","revid":310116,"updated":"2022-05-05T12:25:32Z","groups":["Lights"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets relative size of the flare for the light.","syntaxes":[{"syntax":"light setLightFlareSize size","params":[{"name":"light","type":"Object","type_expr":"Object"},{"name":"size","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"size"}}],"examples":[{"code":["myLight setLightFlareSize 5;"]}],"see_also":["setLightAmbient","setLightColor","lightAttachObject","lightDetachObject","setLightIntensity","setLightAttenuation","setLightUseFlare","setLightBrightness","setLightFlareMaxDistance","setLightDayLight"]},{"name":"setLightIntensity","title":"setLightIntensity","type":"command","url":"https://community.bistudio.com/wiki/setLightIntensity","revid":376690,"updated":"2025-11-05T22:15:14Z","groups":["Lights"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets intensity of light directly. setLightBrightness uses setLightIntensity internally, therefore avoid using setLightBrightness alltogether to avoid confusion\n\n> [!NOTE]\n> Intensity formula is as follows (IF SET VIA setLightBrightness):\n>\n> ```sqf\n> Intensity = Brightness ^ 2 * 2500;\n> ```\n>\n> ```sqf\n> [4096, 4096, 10] spawn {\n>     private _brightness = 1;\n>     private _intensity = _brightness ^ 2 * 2500;\n>\n>     private _obj = \"Sign_Sphere10cm_F\" createVehicleLocal _this;\n>     private _light = \"#lightpoint\" createVehicleLocal _this;\n>     _light setLightDayLight true;\n>     _light setLightAmbient [1, 1, 1];\n>     _light setLightColor [1, 1, 1];\n>\n>     _light setLightBrightness _brightness;\n>     sleep 0.2;\n>     _brightness = getLightingAt _obj select 3;\n>\n>     _light setLightIntensity _intensity;\n>     sleep 0.2;\n>     _intensity = getLightingAt _obj select 3;\n>\n>     systemChat format [\"%1 (%2, %3)\", _brightness == _intensity, _brightness, _intensity];\n>\n>     deleteVehicle _light;\n>     deleteVehicle _obj;\n> };\n> ```","syntaxes":[{"syntax":"light setLightIntensity value","params":[{"name":"light","type":"Object","type_expr":"Object"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"value"}}],"examples":[{"code":["myLight setLightIntensity 4;"]}],"see_also":["setLightAmbient","setLightColor","lightAttachObject","lightDetachObject","setLightBrightness","setLightAttenuation","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightDayLight","getLightInfo"],"notes":[{"user":"ffur2007slx2_5","date":"2014-03-24T23:37:00Z","text":"In Arma 3 ver1.14 setLightIntensity will overwrite the previous effect processed by setLightBrightness on the same light source, vice versa. And both of them currently play the same role on brightness, for example:\n\n```sqf\n_light setLightIntensity 3000;\n// same as\n_light setLightBrightness 1;\n```"}]},{"name":"setLightIR","title":"setLightIR","type":"command","url":"https://community.bistudio.com/wiki/setLightIR","revid":310362,"updated":"2022-05-05T17:39:18Z","groups":["Lights"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"argument":"local","effect":"local"},"description":"Sets lightpoint in infrared range.","syntaxes":[{"syntax":"light setLightIR value","params":[{"name":"light","type":"Object","description":"object of class `\"#lightpoint\"` or similar","type_expr":"Object"},{"name":"value","type":"Boolean","description":"true to make it visible *only* with night vision goggles, false to make it a normal light","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"value"}}],"examples":[{"code":["myLight setLightIR true; // visible with NVG only!"]}],"see_also":["setLightColor","setLightAmbient","setLightBrightness","lightAttachObject","lightDetachObject","setLightIntensity","setLightAttenuation","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightDayLight"]},{"name":"setLightnings","title":"setLightnings","type":"command","url":"https://community.bistudio.com/wiki/setLightnings","revid":349843,"updated":"2023-11-20T22:10:39Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Changes the lightnings value smoothly during the given time (in seconds). A time of zero means there will be an immediate change.\n\n**NOTE**: This command will have no effect (even though the value of lightnings changes) unless `Manual Override` option is selected in the editor in the Intel, which is normally off.","syntaxes":[{"syntax":"time setLightnings value","params":[{"name":"time","type":"Number","type_expr":"Number"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"value"}}],"examples":[{"code":["1800 setLightnings 0.7;"]}],"see_also":["lightnings","overcast","setWaves"]},{"name":"setLightUseFlare","title":"setLightUseFlare","type":"command","url":"https://community.bistudio.com/wiki/setLightUseFlare","revid":341209,"updated":"2023-05-13T22:45:31Z","groups":["Lights"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets if light has flare.","syntaxes":[{"syntax":"light setLightUseFlare bool","params":[{"name":"light","type":"Object","type_expr":"Object"},{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"light"},"right":{"text":"bool"}}],"examples":[{"code":["myLight setLightUseFlare true;"]}],"see_also":["setLightAmbient","setLightColor","lightAttachObject","lightDetachObject","setLightIntensity","setLightAttenuation","setLightBrightness","setLightFlareSize","setLightFlareMaxDistance","setLightDayLight"],"notes":[{"user":"ffur2007slx2_5","date":"2014-03-25T18:50:00Z","text":"1. In Arma 3 ver 1.14 flare color can be changed via setLightColor.\n1. Flare won't have visual presentation in daytime.\n1. setLightUseFlare needs to be used together with setLightFlareSize and setLightFlareMaxDistance so that a flare can be seen."}]},{"name":"setLightVolumeShape","title":"setLightVolumeShape","type":"command","url":"https://community.bistudio.com/wiki/setLightVolumeShape","revid":378534,"updated":"2026-05-04T02:22:29Z","groups":["Lights"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"argument":"local","effect":"local"},"description":"Sets the `#lightreflector`'s volume shape. An empty shape will switch the light off.","syntaxes":[{"syntax":"lightReflector setLightVolumeShape [shapePath, scale]","params":[{"name":"lightReflector","type":"Object","description":"object of class `#lightreflector`)","type_expr":"Object","text":"lightReflector : Object - object of class `#lightreflector`)"},{"name":"shapePath","type":"String","description":"\"\" to turn the light off","type_expr":"String"},{"name":"scale","type":"Array with [sizeX, sizeY, sizeZ]","description":"Array with [sizeX, sizeY, sizeZ]\n\n- sizeX: Number\n- sizeY: Number\n- sizeZ: Number","type_expr":"Array","text":"scale: Array with [sizeX, sizeY, sizeZ]\n\n- sizeX: Number\n- sizeY: Number\n- sizeZ: Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"lightReflector"},"right":{"text":"[shapePath, scale]"}}],"examples":[{"code":["_light setLightVolumeShape [\"a3\\data_f\\VolumeLightFlashlight.p3d\", [1, 1, 1]];"]}],"see_also":["setLightColor","setLightAmbient","setLightBrightness","lightAttachObject","lightDetachObject","setLightIntensity","setLightAttenuation","setLightUseFlare","setLightFlareSize","setLightFlareMaxDistance","setLightDayLight","setLightIR"]},{"name":"setLocalWindParams","title":"setLocalWindParams","type":"command","url":"https://community.bistudio.com/wiki/setLocalWindParams","revid":321461,"updated":"2022-05-14T14:53:34Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Sets parameters for helicopter rotor wash.\nIt affects the visual effect of a rotor's downwash, such as blown particles, vegetation wind effect and area size.","syntaxes":[{"syntax":"setLocalWindParams [strength, diameter]","params":[{"name":"strength","type":"Number","description":"down-force wind strength","type_expr":"Number"},{"name":"diameter","type":"Number","description":"area affected","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[strength, diameter]"}}],"examples":[{"code":["setLocalWindParams [10, 5];"]},{"text":"\"Disables\" the effects:\n\n```sqf\nsetLocalWindParams [0.0001, 0.0001]; // 0 values are ignored by the command\n```","code":["setLocalWindParams [0.0001, 0.0001]; // 0 values are ignored by the command"]},{"text":"Reset to default:\n\n```sqf\nsetLocalWindParams [1, 1];\n```","code":["setLocalWindParams [1, 1];"]}],"see_also":["setWind","wind","setWindStr","setWindDir","setWindForce","windDir","windStr","gusts","setGusts"]},{"name":"setMagazineTurretAmmo","title":"setMagazineTurretAmmo","type":"command","url":"https://community.bistudio.com/wiki/setMagazineTurretAmmo","revid":377488,"updated":"2026-01-02T06:49:09Z","groups":["Turrets"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Sets ammo count to given amount for given turret magazine.\n\n> [!NOTE]\n> Arma 3 v2.18 The magazine is first checked if it is loaded into the turret weapon, if not, the command falls back to old behaviour of selecting the first magazine from the list of available magazines.\n> In most cases it will be the loaded magazine.\n\n> [!IMPORTANT]\n> The turret itself **must** be local (see turretLocal, turretOwner).","syntaxes":[{"syntax":"vehicle setMagazineTurretAmmo [magazineClass, ammoCount, turretPath]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"magazineClass","type":"String","type_expr":"String"},{"name":"ammoCount","type":"Number","type_expr":"Number"},{"name":"turretPath","type":"Turret Path","description":"[-1] for driver turret is supported","type_expr":"Turret Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[magazineClass, ammoCount, turretPath]"}}],"examples":[{"code":["myMRAP setMagazineTurretAmmo [\"200Rnd_127x99_mag_Tracer_Red\", 30, [0]];"]},{"text":"Set ammo count on commander turret from server:\n\n```sqf\n_tank = tank;\n_turret = [0,0];\n_magazine = \"200Rnd_127x99_mag_Tracer_Red\";\n_ammo = 10;\n[_tank, [_magazine, _ammo, _turret]] remoteExec [\"setMagazineTurretAmmo\", _tank turretOwner _turret];\n```","code":["_tank = tank;\n_turret = [0,0];\n_magazine = \"200Rnd_127x99_mag_Tracer_Red\";\n_ammo = 10;\n[_tank, [_magazine, _ammo, _turret]] remoteExec [\"setMagazineTurretAmmo\", _tank turretOwner _turret];"]}],"see_also":["magazineTurretAmmo","setAmmoOnPylon","turretLocal","turretOwner"]},{"name":"setMarkerAlpha","title":"setMarkerAlpha","type":"command","url":"https://community.bistudio.com/wiki/setMarkerAlpha","revid":370054,"updated":"2024-10-29T12:41:35Z","groups":["Markers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Sets the marker alpha. This is a modifier to the existing markerColor and will be applied on top of the marker color alpha. The marker is modified on all computers in a network session.\n\nWhen alpha equals `1`, the marker is visible, but if alpha equals `0`, then the marker is invisible.\n\nAlpha can be numbers and fractions.\n\n> [!NOTE]\n> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.\n> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).","syntaxes":[{"syntax":"marker setMarkerAlpha alpha","params":[{"name":"marker","type":"String","type_expr":"String"},{"name":"alpha","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"marker"},"right":{"text":"alpha"}}],"examples":[{"code":["\"my_marker\" setMarkerAlpha 0.5;"]},{"code":["\"enemy_convoy_marker\" setMarkerAlpha 0;"]}],"see_also":["setMarkerAlphaLocal","setMarkerBrush","setMarkerColor","setMarkerDir","setMarkerPos","setMarkerShape","setMarkerSize","setMarkerText","setMarkerType","createMarker"]},{"name":"setMarkerAlphaLocal","title":"setMarkerAlphaLocal","type":"command","url":"https://community.bistudio.com/wiki/setMarkerAlphaLocal","revid":370053,"updated":"2024-10-29T12:41:01Z","groups":["Markers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets the marker alpha. See setMarkerAlpha.","syntaxes":[{"syntax":"marker setMarkerAlphaLocal alpha","params":[{"name":"marker","type":"String","type_expr":"String"},{"name":"alpha","type":"Number","description":"alpha value from 0 (invisible) to 1 (fully visible)","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"marker"},"right":{"text":"alpha"}}],"examples":[{"code":["\"my_marker\" setMarkerAlphaLocal 0.5;"]},{"code":["\"enemy_convoy_marker\" setMarkerAlphaLocal 0;"]}],"see_also":["setMarkerAlpha","markerAlpha"]},{"name":"setMarkerBrush","title":"setMarkerBrush","type":"command","url":"https://community.bistudio.com/wiki/setMarkerBrush","revid":370036,"updated":"2024-10-28T20:28:34Z","groups":["Markers"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Selects the fill texture for the marker (\"RECTANGLE\" or \"ELLIPSE\"). Brush is the name of the subclass in `CfgMarkerBrushes`.\n\n> [!NOTE]\n> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.\n> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).","syntaxes":[{"syntax":"markerName setMarkerBrush brush","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"brush","type":"String","description":"(case-insensitive) can be one of:\n\n- \"Solid\"\n- Arma 3 v0.50 \"SolidFull\"\n- \"Horizontal\"\n- \"Vertical\"\n- \"Grid\"\n- \"FDiagonal\"\n- \"BDiagonal\"\n- \"DiagGrid\"\n- \"Cross\"\n- Arma 2 v1.00 \"Border\"\n- Arma 2 v1.00 \"SolidBorder\"","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"brush"}}],"examples":[{"code":["\"Marker1\" setMarkerBrush \"DIAGGRID\";"]}],"see_also":["setMarkerAlpha","setMarkerAlphaLocal","setMarkerBrushLocal","setMarkerColor","setMarkerColorLocal","setMarkerDir","setMarkerDirLocal","setMarkerPos","setMarkerPosLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerSizeLocal","setMarkerText","setMarkerTextLocal","setMarkerType","setMarkerTypeLocal"]},{"name":"setMarkerBrushLocal","title":"setMarkerBrushLocal","type":"command","url":"https://community.bistudio.com/wiki/setMarkerBrushLocal","revid":319560,"updated":"2022-05-13T09:24:29Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.04","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.04","arma3_since":"0.50","locality":{"effect":"local"},"description":"Selects the fill texture for the marker (\"RECTANGLE\" or \"ELLIPSE\"). Brush is the name of the subclass in CfgMarkerBrushes.\n\n*brush* can be:\n\n- \"Solid\"\n- \"SolidFull\" (A3 only)\n- \"Horizontal\"\n- \"Vertical\"\n- \"Grid\"\n- \"FDiagonal\"\n- \"BDiagonal\"\n- \"DiagGrid\"\n- \"Cross\"\n- \"Border\" (A2/A3 only)\n- \"SolidBorder\" (OA/A3 only)","syntaxes":[{"syntax":"markerName setMarkerBrushLocal brush","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"brush","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"brush"}}],"examples":[{"code":["\"Marker1\" setMarkerBrushLocal \"DiagGrid\";"]}],"see_also":["setMarkerAlpha","setMarkerAlphaLocal","setMarkerBrush","setMarkerColor","setMarkerColorLocal","setMarkerDir","setMarkerDirLocal","setMarkerPos","setMarkerPosLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerSizeLocal","setMarkerText","setMarkerTextLocal","setMarkerType","setMarkerTypeLocal"]},{"name":"setMarkerColor","title":"setMarkerColor","type":"command","url":"https://community.bistudio.com/wiki/setMarkerColor","revid":370055,"updated":"2024-10-29T12:42:44Z","groups":["Markers"],"status":"ok","games":{"ofp":"1.21","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.21","arma3_since":"0.50","locality":{"effect":"global"},"description":"Set marker's colour. Arma 3's marker colour names and their corresponding RGBA values can be found here: Arma 3: CfgMarkerColors.\n\n> [!NOTE]\n> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.\n> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).","syntaxes":[{"syntax":"markerName setMarkerColor colour","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"colour","type":"String","description":"String\n\n- `CfgMarkerColors`'s class name\n- Arma 3 v2.20 direct colour definition in one of the following formats (values in range 0..1):\n  - \"#(r,g,b)\" (e.g `\"#(1,0,1)\"`, `#FF00FF` equivalent)\n  - \"#(r,g,b,a)\" (e.g `\"#(0.678,0.749,0.514,0.5)\"`, `#ADBF8380` equivalent). Alpha 'a' in this format is independent of markerAlpha","type_expr":"String","text":"colour: String\n\n- `CfgMarkerColors`'s class name\n- Arma 3 v2.20 direct colour definition in one of the following formats (values in range 0..1):\n  - \"#(r,g,b)\" (e.g `\"#(1,0,1)\"`, `#FF00FF` equivalent)\n  - \"#(r,g,b,a)\" (e.g `\"#(0.678,0.749,0.514,0.5)\"`, `#ADBF8380` equivalent). Alpha 'a' in this format is independent of markerAlpha"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"colour"}}],"examples":[{"code":["\"MarkerOne\" setMarkerColor \"ColorBlack\";"]},{"code":["\"MarkerOne\" setMarkerColor \"#(1,0,0,1)\"; // red color - since Arma 3 v2.20"]}],"see_also":["setMarkerColorLocal","markerColor","getMarkerColor","setMarkerBrush","createMarker","setMarkerDir","setMarkerPos","setMarkerShape","setMarkerSize","setMarkerText","setMarkerType","setMarkerAlpha"]},{"name":"setMarkerColorLocal","title":"setMarkerColorLocal","type":"command","url":"https://community.bistudio.com/wiki/setMarkerColorLocal","revid":370056,"updated":"2024-10-29T12:43:04Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.04","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.04","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Set marker's colour. Arma 3's marker colour names and their corresponding RGBA values can be found here: Arma 3: CfgMarkerColors.","syntaxes":[{"syntax":"markerName setMarkerColorLocal colour","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"colour","type":"String","description":"String\n\n- `CfgMarkerColors`'s class name\n- Arma 3 v2.20 direct colour definition in one of the following formats (values in range 0..1):\n  - \"#(r,g,b)\" (e.g `\"#(1,0,1)\"`, `#FF00FF` equivalent)\n  - \"#(r,g,b,a)\" (e.g `\"#(0.678,0.749,0.514,0.5)\"`, `#ADBF8380` equivalent). Alpha 'a' in this format is independent of markerAlpha","type_expr":"String","text":"colour: String\n\n- `CfgMarkerColors`'s class name\n- Arma 3 v2.20 direct colour definition in one of the following formats (values in range 0..1):\n  - \"#(r,g,b)\" (e.g `\"#(1,0,1)\"`, `#FF00FF` equivalent)\n  - \"#(r,g,b,a)\" (e.g `\"#(0.678,0.749,0.514,0.5)\"`, `#ADBF8380` equivalent). Alpha 'a' in this format is independent of markerAlpha"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"colour"}}],"examples":[{"code":["\"MarkerOne\" setMarkerColorLocal \"ColorBlack\";"]},{"code":["\"MarkerOne\" setMarkerColorLocal \"#(1,0,0,1)\"; // red color (since Arma 3 v2.20)"]}],"see_also":["markerColor","getMarkerColor","setMarkerAlpha","setMarkerAlphaLocal","setMarkerBrush","setMarkerBrushLocal","setMarkerColor","setMarkerDir","setMarkerDirLocal","setMarkerPos","setMarkerPosLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerSizeLocal","setMarkerText","setMarkerTextLocal","setMarkerType","setMarkerTypeLocal"]},{"name":"setMarkerDir","title":"setMarkerDir","type":"command","url":"https://community.bistudio.com/wiki/setMarkerDir","revid":370038,"updated":"2024-10-28T20:28:34Z","groups":["Markers"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Sets the orientation of the marker. Angle is in degrees.\n\n> [!NOTE]\n> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.\n> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).","syntaxes":[{"syntax":"markerName setMarkerDir angle","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"angle","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"angle"}}],"examples":[{"code":["\"Marker1\" setMarkerDir 90;"]}],"see_also":["markerDir","setMarkerBrush","createMarker","setMarkerColor","setMarkerPos","setMarkerShape","setMarkerSize","setMarkerText","setMarkerType","setMarkerAlpha"]},{"name":"setMarkerDirLocal","title":"setMarkerDirLocal","type":"command","url":"https://community.bistudio.com/wiki/setMarkerDirLocal","revid":348231,"updated":"2023-11-08T11:40:28Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.04","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.04","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets the orientation of the marker.","syntaxes":[{"syntax":"markerName setMarkerDirLocal angle","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"angle","type":"Number","description":"angle of the marker in degree","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"angle"}}],"examples":[{"code":["\"Marker1\" setMarkerDirLocal 90;"]}],"see_also":["setMarkerDir","markerDir"]},{"name":"setMarkerDrawPriority","title":"setMarkerDrawPriority","type":"command","url":"https://community.bistudio.com/wiki/setMarkerDrawPriority","revid":373673,"updated":"2025-06-09T15:29:58Z","groups":["Markers"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","locality":{"effect":"local"},"description":"Sets marker draw priority. Higher priority markers are drawn on top. Default priority is 0.\n\n> [!IMPORTANT]\n> Be aware that this command has **local** effect despite the command name missing the word **local**!","syntaxes":[{"syntax":"markerName setMarkerDrawPriority priority","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"priority","type":"Number","description":"draw priority","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"priority"}}],"examples":[{"code":["\"MarkerOne\" setMarkerDrawPriority 0.5;"]},{"code":["\"MarkerTwo\" setMarkerDrawPriority -2.1;"]}],"problems":"setMarkerDrawPriority sorts allMapMarkers from least to most priority. Before Arma 3 v2.18 createMarker/createMarkerLocal did **not** care about drawing priority and added the created marker to the end of the array, making it top priority. Running setMarkerDrawPriority again sorted this issue.","see_also":["markerDrawPriority","setMarkerType","setMarkerTypeLocal","markerType","setMarkerAlphaLocal","setMarkerBrush","setMarkerColor","setMarkerDir","setMarkerPos","setMarkerShape","setMarkerSize","setMarkerText","createMarker","CfgMarkers"]},{"name":"setMarkerPolyline","title":"setMarkerPolyline","type":"command","url":"https://community.bistudio.com/wiki/setMarkerPolyline","revid":370043,"updated":"2024-10-28T20:28:37Z","groups":["Markers"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","locality":{"effect":"global"},"description":"Sets a polyline marker's path.\n\n> [!NOTE]\n> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.\n> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).","syntaxes":[{"syntax":"marker setMarkerPolyline path","params":[{"name":"marker","type":"String","type_expr":"String"},{"name":"path","type":"Array of pairs Number, Number","description":"`[x1, y1, x2, y2, ... xn, yn]`\n\n> [!IMPORTANT]\n> Be aware that this command expects an array with a minimum array size of 4 and that the array count always needs to be dividable by 2 and return a whole number. Code:\n>\n> ```sqf\n> count path >= 4 && count path mod 2 == 0; // true → valid path\n> ```","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"marker"},"right":{"text":"path"}}],"examples":[{"text":"Changes `\"marker_1\"` into a polyline and draws a sine curve on player's position:\n\n```sqf\n// createMarker [\"marker_1\", [0,0,0]];\n\"marker_1\" setMarkerShape \"polyline\";\nprivate _return = [] ;\n\nfor \"_i\" from 0 to 100 step 0.1 do\n{\n    _return pushBack (_i + getPosASL player # 0);\n    _return pushBack ((sin (_i * 10)) * 10 + getPosASL player # 1);\n} ;\n\n\"marker_1\" setMarkerPolyline _return;\n```","code":["// createMarker [\"marker_1\", [0,0,0]];\n\"marker_1\" setMarkerShape \"polyline\";\nprivate _return = [] ;\n\nfor \"_i\" from 0 to 100 step 0.1 do\n{\n\t_return pushBack (_i + getPosASL player # 0);\n\t_return pushBack ((sin (_i * 10)) * 10 + getPosASL player # 1);\n} ;\n\n\"marker_1\" setMarkerPolyline _return;"]}],"see_also":["markerPolyline","setMarkerPolylineLocal"]},{"name":"setMarkerPolylineLocal","title":"setMarkerPolylineLocal","type":"command","url":"https://community.bistudio.com/wiki/setMarkerPolylineLocal","revid":378527,"updated":"2026-05-04T01:57:41Z","groups":["Markers"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","locality":{"effect":"local"},"description":"Sets a polyline marker's path. Works only on the computer that executes this command.","syntaxes":[{"syntax":"marker setMarkerPolylineLocal path","params":[{"name":"marker","type":"String","type_expr":"String"},{"name":"path","type":"Array of Numbers","description":"`[x1, y1, x2, y2, ... xn, yn]`","type_expr":"Array<Number>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"marker"},"right":{"text":"path"}}],"examples":[{"text":"Changes `\"marker_1\"` into a polyline and draws a sine curve on your position:\n\n```sqf\n\"marker_1\" setMarkerShape \"polyline\";\nprivate _return = [] ;\n\nfor \"_i\" from 0 to 100 step 0.1 do\n{\n    _return pushBack (_i + getPos player#0);\n    _return pushBack ((sin (_i*10))*10 + getPos player#1);\n} ;\n\n\"marker_1\" setMarkerPolylineLocal _return;\n```","code":["\"marker_1\" setMarkerShape \"polyline\";\nprivate _return = [] ;\n\nfor \"_i\" from 0 to 100 step 0.1 do\n{\n\t_return pushBack (_i + getPos player#0);\n\t_return pushBack ((sin (_i*10))*10 + getPos player#1);\n} ;\n\n\"marker_1\" setMarkerPolylineLocal _return;"]}],"see_also":["markerPolyline","setMarkerPolyline"]},{"name":"setMarkerPos","title":"setMarkerPos","type":"command","url":"https://community.bistudio.com/wiki/setMarkerPos","revid":377245,"updated":"2026-01-02T05:03:33Z","groups":["Markers"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Moves the marker. If position is given in 3D format, `z` coordinate is stored with the marker and will be used when marker is passed to commands like createVehicle, createUnit, createAgent, createMine, setVehiclePosition for example. In case of an object, the object's model [0,0,0] is used.\n\n> [!NOTE]\n> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.\n> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).","syntaxes":[{"syntax":"markerName setMarkerPos position","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"position","description":"Position2D or PositionAGL or Arma 3 v1.94 Object. In case of an object, the object's model [0,0,0] is used.","type_expr":"Position2D | PositionAGL | Object","text":"position: Position2D or PositionAGL or Arma 3 v1.94 Object. In case of an object, the object's model [0,0,0] is used."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"position"}}],"examples":[{"code":["\"MarkerOne\" setMarkerPos getMarkerPos \"MarkerTwo\";"]}],"see_also":["setMarkerPosLocal","setMarkerBrush","setMarkerColor","setMarkerDir","createMarker","setMarkerShape","setMarkerSize","setMarkerText","setMarkerType","setMarkerAlpha"],"notes":[{"user":"Pulverizer","date":"2007-03-23T23:47:00Z","text":"Effect is local in OFP."},{"user":"Dr Eyeball","date":"2009-08-07T02:03:00Z","text":"The marker position can actually be set in 3D. This has a benefit for respawn markers, when placed at the correct altitude ASL on the LHD, the correct altitude will be used for respawn.\nThere is no particular benefit for regular markers since markerPos will still return 0 for the altitude array element. // Tip obtained from Xeno"}]},{"name":"setMarkerPosLocal","title":"setMarkerPosLocal","type":"command","url":"https://community.bistudio.com/wiki/setMarkerPosLocal","revid":377550,"updated":"2026-01-02T06:54:46Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.04","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.04","arma3_since":"0.50","locality":{"effect":"local"},"description":"Moves the marker. If position is given in 3D format, `z` coordinate is stored with the marker and will be used when marker is passed to commands like createVehicle, createUnit, createAgent, createMine, setVehiclePosition for example. In case of an object, the object's model [0,0,0] is used.","syntaxes":[{"syntax":"markerName setMarkerPosLocal position","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"position","description":"Position2D, PositionAGL or Arma 3 v1.94 Object. In case of an object, the object's model [0,0,0] is used.","type_expr":"Position2D | PositionAGL | Object","text":"position: Position2D, PositionAGL or Arma 3 v1.94 Object. In case of an object, the object's model [0,0,0] is used."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"position"}}],"examples":[{"code":["\"MarkerOne\" setMarkerPosLocal getMarkerPos \"MarkerTwo\";"]}],"see_also":["setMarkerPos","setMarkerAlphaLocal","setMarkerBrushLocal","setMarkerColorLocal","setMarkerDirLocal","setMarkerShapeLocal","setMarkerSizeLocal","setMarkerTextLocal","setMarkerTypeLocal"]},{"name":"setMarkerShadow","title":"setMarkerShadow","type":"command","url":"https://community.bistudio.com/wiki/setMarkerShadow","revid":349188,"updated":"2023-11-08T14:50:39Z","groups":["Markers"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","locality":{"effect":"global"},"description":"Sets the shadow property of given marker.","syntaxes":[{"syntax":"marker setMarkerShadow shadowState","params":[{"name":"marker","type":"String","description":"the marker","type_expr":"String"},{"name":"shadowState","type":"Boolean","description":"true to enable the shadow, false to disable it","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"marker"},"right":{"text":"shadowState"}}],"examples":[{"code":["_myMarker setMarkerShadow true; // enable shadow"]}],"problems":"setMarkerType will reset the shadow value to the one defined in marker type.","see_also":["markerShadow","setMarkerShadowLocal"]},{"name":"setMarkerShadowLocal","title":"setMarkerShadowLocal","type":"command","url":"https://community.bistudio.com/wiki/setMarkerShadowLocal","revid":349276,"updated":"2023-11-08T14:51:11Z","groups":["Markers"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","locality":{"effect":"local"},"description":"Sets the shadow property of given marker.","syntaxes":[{"syntax":"marker setMarkerShadowLocal shadowState","params":[{"name":"marker","type":"String","description":"the marker","type_expr":"String"},{"name":"shadowState","type":"Boolean","description":"true to enable the shadow, false to disable it","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"marker"},"right":{"text":"shadowState"}}],"examples":[{"code":["_myMarker setMarkerShadowLocal true; // enable shadow"]}],"problems":"setMarkerType will reset the shadow value to the one defined in marker type.","see_also":["markerShadow","setMarkerShadow"]},{"name":"setMarkerShape","title":"setMarkerShape","type":"command","url":"https://community.bistudio.com/wiki/setMarkerShape","revid":370121,"updated":"2024-11-01T19:51:56Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Selects shape (actual type) of the marker. Non-existing marker shape defaults to \"RECTANGLE\".","syntaxes":[{"syntax":"markerName setMarkerShape shape","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"shape","type":"String","description":"the shape, can be one of:\n\n- `\"ICON\"`\n- `\"RECTANGLE\"`\n- `\"ELLIPSE\"`\n- Arma 3 v1.60 `\"POLYLINE\"`\n- Arma 3 v2.20 `\"TRIANGLE\"`\n- Arma 3 v2.20 `\"PENTAGON\"`\n- Arma 3 v2.20 `\"HEXAGON\"`\n- Arma 3 v2.20 `\"HEPTAGON\"`\n- Arma 3 v2.20 `\"OCTAGON\"`\n- Arma 3 v2.20 `\"NONAGON\"`\n- Arma 3 v2.20 `\"DECAGON\"`","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"shape"}}],"examples":[{"code":["\"Marker1\" setMarkerShape \"RECTANGLE\";"]}],"multiplayer":"> [!NOTE]\n> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.\n> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).","see_also":["markerShape","setMarkerShapeLocal"]},{"name":"setMarkerShapeLocal","title":"setMarkerShapeLocal","type":"command","url":"https://community.bistudio.com/wiki/setMarkerShapeLocal","revid":370123,"updated":"2024-11-01T19:52:42Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.04","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.04","arma3_since":"0.50","locality":{"effect":"local"},"description":"Selects shape (actual type) of the local marker. Non-existing marker shape defaults to \"RECTANGLE\".","syntaxes":[{"syntax":"markerName setMarkerShapeLocal shape","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"shape","type":"String","description":"the shape, can be one of:\n\n- `\"ICON\"`\n- `\"RECTANGLE\"`\n- `\"ELLIPSE\"`\n- Arma 3 v1.60 `\"POLYLINE\"`\n- Arma 3 v2.20 `\"TRIANGLE\"`\n- Arma 3 v2.20 `\"PENTAGON\"`\n- Arma 3 v2.20 `\"HEXAGON\"`\n- Arma 3 v2.20 `\"HEPTAGON\"`\n- Arma 3 v2.20 `\"OCTAGON\"`\n- Arma 3 v2.20 `\"NONAGON\"`\n- Arma 3 v2.20 `\"DECAGON\"`","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"shape"}}],"examples":[{"code":["\"Marker1\" setMarkerShapeLocal \"RECTANGLE\";"]}],"see_also":["setMarkerShape","markerShape"]},{"name":"setMarkerSize","title":"setMarkerSize","type":"command","url":"https://community.bistudio.com/wiki/setMarkerSize","revid":370044,"updated":"2024-10-28T20:28:37Z","groups":["Markers"],"status":"ok","games":{"ofp":"1.21","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.21","arma3_since":"0.50","locality":{"effect":"global"},"description":"Sets the marker's size.\n\n> [!NOTE]\n> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.\n> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).","syntaxes":[{"syntax":"markerName setMarkerSize [a-axis, b-axis]","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"a-axis","type":"Number","description":"1/2 width of marker","type_expr":"Number"},{"name":"b-axis","type":"Number","description":"1/2 height of marker","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"[a-axis, b-axis]"}}],"examples":[{"code":["\"MarkerOne\" setMarkerSize [100, 200];"]}],"see_also":["setMarkerSizeLocal","getMarkerSize","markerSize"]},{"name":"setMarkerSizeLocal","title":"setMarkerSizeLocal","type":"command","url":"https://community.bistudio.com/wiki/setMarkerSizeLocal","revid":330367,"updated":"2022-09-04T20:18:20Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.04","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.04","arma3_since":"0.50","locality":{"effect":"local"},"description":"Set marker size.","syntaxes":[{"syntax":"markerName setMarkerSizeLocal [axisA, axisB]","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"axisA","type":"Number","description":"1/2 width of marker","type_expr":"Number"},{"name":"axisB","type":"Number","description":"1/2 height of marker","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"[axisA, axisB]"}}],"examples":[{"code":["\"MarkerOne\" setMarkerSizeLocal [100, 200];"]}],"see_also":["setMarkerAlpha","setMarkerAlphaLocal","setMarkerBrush","setMarkerBrushLocal","setMarkerColor","setMarkerColorLocal","setMarkerDir","setMarkerDirLocal","setMarkerPos","setMarkerPosLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerText","setMarkerTextLocal","setMarkerType","setMarkerTypeLocal"]},{"name":"setMarkerText","title":"setMarkerText","type":"command","url":"https://community.bistudio.com/wiki/setMarkerText","revid":370039,"updated":"2024-10-28T20:28:34Z","groups":["Markers"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Sets the text label of an existing marker.\n\n> [!NOTE]\n> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.\n> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).","syntaxes":[{"syntax":"markerName setMarkerText text","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"text"}}],"examples":[{"code":["\"Marker1\" setMarkerText \"You are here.\";"]}],"see_also":["setMarkerBrush","setMarkerColor","setMarkerDir","setMarkerPos","setMarkerShape","setMarkerSize","setMarkerType","setMarkerAlpha"]},{"name":"setMarkerTextLocal","title":"setMarkerTextLocal","type":"command","url":"https://community.bistudio.com/wiki/setMarkerTextLocal","revid":319570,"updated":"2022-05-13T09:24:29Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.04","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.04","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets the text label of an existing marker.","syntaxes":[{"syntax":"markerName setMarkerTextLocal text","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"text"}}],"examples":[{"code":["\"Marker1\" setMarkerTextLocal \"You are here.\";"]}],"see_also":["setMarkerBrush","setMarkerColor","setMarkerDir","setMarkerPos","setMarkerShape","setMarkerSize","setMarkerType"]},{"name":"setMarkerType","title":"setMarkerType","type":"command","url":"https://community.bistudio.com/wiki/setMarkerType","revid":370037,"updated":"2024-10-28T20:28:34Z","groups":["Markers"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Sets marker type. Marker type is a class name from CfgMarkers.\n\n> [!NOTE]\n> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.\n> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).","syntaxes":[{"syntax":"markerName setMarkerType type","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"type","type":"String","description":"see CfgMarkers","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"type"}}],"examples":[{"code":["\"MarkerOne\" setMarkerType \"Warning\";"]}],"see_also":["CfgMarkers","setMarkerDrawPriority","setMarkerTypeLocal","markerType","setMarkerAlphaLocal","setMarkerBrush","setMarkerColor","setMarkerDir","setMarkerPos","setMarkerShape","setMarkerSize","setMarkerText","createMarker"]},{"name":"setMarkerTypeLocal","title":"setMarkerTypeLocal","type":"command","url":"https://community.bistudio.com/wiki/setMarkerTypeLocal","revid":349126,"updated":"2023-11-08T14:49:40Z","groups":["Markers"],"status":"ok","games":{"arma1":"1.04","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.04","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets marker type locally. Marker type is a class name in CfgMarkers.","syntaxes":[{"syntax":"markerName setMarkerTypeLocal type","params":[{"name":"markerName","type":"String","type_expr":"String"},{"name":"type","type":"String","description":"see CfgMarkers.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"markerName"},"right":{"text":"type"}}],"examples":[{"code":["\"MarkerOne\" setMarkerTypeLocal \"Warning\";"]}],"see_also":["CfgMarkers","setMarkerAlpha","setMarkerAlphaLocal","setMarkerBrush","setMarkerBrushLocal","setMarkerColor","setMarkerColorLocal","setMarkerDir","setMarkerDirLocal","setMarkerPos","setMarkerPosLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerSizeLocal","setMarkerText","setMarkerTextLocal","setMarkerType","markerType"]},{"name":"setMass","title":"setMass","type":"command","url":"https://community.bistudio.com/wiki/setMass","revid":379467,"updated":"2026-10-31T00:10:24Z","groups":["PhysX"],"status":"ok","games":{"arma3":"1.02"},"since":"arma3 1.02","arma3_since":"1.02","locality":{"argument":"local","effect":"global"},"description":"Changes the mass of a PhysX object. When using the alternative syntax the mass change is gradual during the given time. A time of zero means immediate change.\n\n> [!IMPORTANT]\n> When main syntax is used on local vehicle, the change is global. When alternative syntax is used with time transition on local vehicle, the gradual mass change doesn't happen on remote clients, only final mass is applied after the given time. If you need gradual change on remote clients too, remote execute setMass globally.","syntaxes":[{"syntax":"myObject setMass mass","params":[{"name":"myObject","type":"Object","type_expr":"Object"},{"name":"mass","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"myObject"},"right":{"text":"mass"}},{"syntax":"myObject setMass [mass, time]","params":[{"name":"myObject","type":"Object","type_expr":"Object"},{"name":"mass","type":"Number","type_expr":"Number"},{"name":"time","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"myObject"},"right":{"text":"[mass, time]"}}],"examples":[{"code":["myObject setMass [10, 0.5];"]},{"code":["myObject setMass 10;"]}],"see_also":["getMass","setCenterOfMass","getCenterOfMass"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-20T12:50:00Z","text":"Arma 3 v1.22 A quick reference:\n\n| category | setMass | setCenterOfMass |\n|---|---|---|\n| unit | The larger the mass is, the easier a unit will physically fatigued | N/A |\n| aircraft | The larger the mass is, the more sensitive an aircraft will react to joystick, vice versa (Except when AFM is enabled). | Aircraft slant due to center change accordingly, and the position of the camera view will be altered relatively at the same time. (3rd person view) |\n| vehicle | The larger the mass is, the slower a vehicle drives (Ships will sink), vice versa. (Land vehicle performs like a bouncing ball while ships accelerated pretty speedy.) | Vehicle slant due to center change accordingly. |"},{"user":"N3croo","date":"2015-03-26T15:02:00Z","text":"If you intend to use setMass in conjunction with ropeCreate in MP i highly recommend to first ropeCreate then setMass (on clientside).\nRopeCreate in MP will set the mass of the attached object to the server value upon execution."}]},{"name":"setMaxLoad","title":"setMaxLoad","type":"command","url":"https://community.bistudio.com/wiki/setMaxLoad","revid":309142,"updated":"2022-05-03T11:53:13Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"server_exec":true},"description":"Sets maximum load limit for a uniform/vest/backpack containers, vehicle cargo, supply boxes and weapon holders. In MP this command should be executed on the server and will persist on given container for JIP.\n\n> [!NOTE]\n> Cannot be set on a unit, as unit max load value is static config type","syntaxes":[{"syntax":"container setMaxLoad maxLoadValue","params":[{"name":"container","type":"Object","description":"uniform/vest/backpack container, vehicle cargo, supply box, weapon holder","type_expr":"Object"},{"name":"maxLoadValue","type":"Number","description":"max load limit","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"container"},"right":{"text":"maxLoadValue"}}],"examples":[{"code":["_yaMum setMaxLoad _maxLoad;"]}],"see_also":["maxLoad","load","loadAbs","loadBackpack","loadUniform","loadVest","getContainerMaxLoad"]},{"name":"setMimic","title":"setMimic","type":"command","url":"https://community.bistudio.com/wiki/setMimic","revid":341210,"updated":"2023-05-13T22:48:34Z","groups":["Object Manipulation","Unit Identity"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sets person's facial expression. To set it back to default, use \"\".\n\n> [!NOTE]\n> **Arma 3:** Prior to Arma 3 v2.01.146630 Mimics must be written in all lower case letters.","syntaxes":[{"syntax":"person setMimic mimic","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"mimic","type":"String","description":"can be one of:\n\n| Before Arma 2 OA v1.6x | Since Arma 2 OA v1.6x |\n|---|---|\n| - \"Default\"<br>- \"Normal\"<br>- \"Smile\"<br>- \"Hurt\"<br>- \"Ironic\"<br>- \"Sad\"<br>- \"Cynic\"<br>- \"Surprised\"<br>- \"Agresive\" [sic]<br>- \"Angry\" | - \"neutral\"<br>- \"dead\"<br>- \"danger\"<br>- \"hurt\"<br>- \"aware\"<br>- \"safe\"<br>- \"combat\"<br>- \"unconscious\" |","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"mimic"}}],"examples":[{"code":["_soldier1 setMimic \"hurt\";"]}],"see_also":["setIdentity","setFace","setFaceAnimation","enableMimics","setRandomLip"],"notes":[{"user":"Lou Montana","date":"2010-01-19T15:30:00Z","text":"Not working in **Arma 2 1.05**."}]},{"name":"setMissileTarget","title":"setMissileTarget","type":"command","url":"https://community.bistudio.com/wiki/setMissileTarget","revid":373564,"updated":"2025-05-22T22:04:50Z","groups":["Object Manipulation","Weapons"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Sets a guided missile target. Does not work for all types of missiles. If the target is dead, it is ignored. The target has to be inside the missile's configured targeting cone for the command to work.","syntaxes":[{"syntax":"munition setMissileTarget target","params":[{"name":"munition","type":"Object","description":"missile","type_expr":"Object"},{"name":"target","type":"Object","description":"valid missile target or objNull to cancel targeting","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if successful"},"form":"binary","left":{"text":"munition"},"right":{"text":"target"}},{"syntax":"munition setMissileTarget [target, force]","since":"arma3 2.18","params":[{"name":"munition","type":"Object","description":"missile","type_expr":"Object"},{"name":"target","type":"Object","description":"valid missile target or objNull to cancel targeting","type_expr":"Object"},{"name":"force","type":"Boolean","description":"true to force target (for example to target countermeasure flare object)","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if successful"},"form":"binary","left":{"text":"munition"},"right":{"text":"[target, force]"}}],"examples":[{"code":["missile1 setMissileTarget tank1;"]},{"text":"```sqf\nprivate _missile = createVehicle [\"Missile_AGM_01_F\", player modelToWorld [0,0,50], [], 0, \"CAN_COLLIDE\"];\n_missile setDir getDir player;\nprivate _target = createVehicle [\"O_APC_Wheeled_02_rcws_v2_F\", player modelToWorld [0,300,0], [], 0, \"CAN_COLLIDE\"];\n_target setVehicleTiPars [1, 1, 1];\n[_missile, _target] spawn {\n    params [\"_missile\", \"_target\"];\n    sleep 0.1;\n    _missile setMissileTarget _target;\n};\n```","code":["private _missile = createVehicle [\"Missile_AGM_01_F\", player modelToWorld [0,0,50], [], 0, \"CAN_COLLIDE\"];\n_missile setDir getDir player;\nprivate _target = createVehicle [\"O_APC_Wheeled_02_rcws_v2_F\", player modelToWorld [0,300,0], [], 0, \"CAN_COLLIDE\"];\n_target setVehicleTiPars [1, 1, 1];\n[_missile, _target] spawn {\n\tparams [\"_missile\", \"_target\"];\n\tsleep 0.1;\n\t_missile setMissileTarget _target;\n};"]},{"code":["_missile setMissileTarget objNull; // cancels targeting"]},{"code":["_missile setMissileTarget [flare1, true];"]}],"see_also":["missileTargetPos","setMissileTargetPos","missileTarget","missileState"]},{"name":"setMissileTargetPos","title":"setMissileTargetPos","type":"command","url":"https://community.bistudio.com/wiki/setMissileTargetPos","revid":377534,"updated":"2026-01-02T06:53:19Z","groups":["Object Manipulation","Weapons"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Sets a guided munition target position.\nThe munition must have `manualControl` config entry to use this command.\nThe target position has to be inside the missile's configured targeting cone for the command to work.","syntaxes":[{"syntax":"munition setMissileTargetPos position","params":[{"name":"munition","type":"Object","type_expr":"Object"},{"name":"position","type":"PositionATL","type_expr":"PositionATL"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"munition"},"right":{"text":"position"}}],"examples":[{"code":["missile1 setMissileTargetPos unitAimPosition tank1;"]},{"code":["private _missile = createVehicle [\"M_Scalpel_AT\", player modelToWorld [0,0,100], [], 0, \"CAN_COLLIDE\"];\n_missile setMissileTargetPos (player modelToWorld [0,100,0]);"]}],"see_also":["missileTargetPos","setMissileTarget","missileTarget","missileState"],"notes":[{"user":"Benargee","date":"2020-04-13T06:04:00Z","text":"To get list of compatible missiles with `manualControl = 1`, use the below script and paste the clipboard results to a text editor.\n\n```sqf\nprivate _cfgCount = count (configfile >> \"CfgAmmo\");\nprivate _pasteStr = \"\";\n\nfor \"_x\" from 0 to (_cfgCount - 1) do {\n    _cfg = (configFile >> \"CfgAmmo\") select _x;\n    _ammoClassName = configName _cfg;\n    private _manCtrl = getNumber (configFile >> \"CfgAmmo\" >> _ammoClassName >> \"manualControl\");\n    if (_manCtrl > 0) then {\n            _pasteStr = _pasteStr + _ammoClassName + endl;\n    };\n};\n\ncopyToClipboard _pasteStr;\n```"},{"user":"Lou Montana","date":"2022-08-12T22:06:00Z","text":"Tested with a player-controlled AH-99 firing DAGR, a civilian helicopter named `heli` above water/land, and the following code:\n\n```sqf\nif (!isNil \"EH\") then\n{\n    vehicle player removeEventHandler [\"Fired\", EH];\n};\nEH = vehicle player addEventHandler [\"Fired\", {\nparams [\"_unit\", \"_weapon\", \"_muzzle\", \"_mode\", \"_ammo\", \"_magazine\", \"_missile\", \"_gunner\"];\n    _missile setMissileTargetPos getPosATL heli; // changing here getPosATL / getPosASL / getPos\n    systemChat str [_missile, missileTarget _missile, missileTargetPos _missile];\n}];\n```"}]},{"name":"setMissionOptions","title":"setMissionOptions","type":"command","url":"https://community.bistudio.com/wiki/setMissionOptions","revid":378913,"updated":"2026-08-12T15:53:18Z","groups":["System"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"effect":"local"},"description":"Sets various mission options. The options are automatically reset between missions and are saved/restored with the save system.\nAvailable Options:\n\n- IgnoreNoDamage: Boolean - (default false) true to filter out no change in damage from HandleDamage calls\n- IgnoreFakeHeadHit: Boolean - (default false) true to filter out FakeHeadHit context from HandleDamage calls\n- IgnoreUpsideDownDamage: Boolean - (default false) true to ignore some minor upside down damage accumulation for a helicopter\n- Arma 3 v2.20 SnakesCanOpenDoors: Boolean - (default false) true to revert to legacy behaviour when snakes would open doors when entering houses\n- Arma 3 v2.20 AIThinkOnlyLocal: Boolean - (default false) true to disable processing targetting data for remote AI units, knowsAbout, targets and similar commands will cease to work on remote units. For a gain in client performance because they no longer have to calculate all AI units.\n- Arma 3 v2.24 MapSymbolIsHiddenWithTheObject: Boolean - (default true) true to hide map symbol when terrain object is hidden.\n- Arma 3 v2.24 MapHideForests: Boolean - (default false) true to hide map symbols for forests.\n- Arma 3 v2.24 MapHideRockFormations: Boolean - (default false) true to hide map symbols for rock formations.\n- Arma 3 v2.24 MapHideTowns: Boolean - (default false) true to hide map symbols for towns.\n- Arma 3 v2.24 MapHideRoads: Boolean - (default false) true to hide map symbols for roads.\n- Arma 3 v2.24 MapHideRivers: Boolean - (default false) true to hide map symbols for rivers.\n- Arma 3 v2.24 MapHideSigns: Boolean - (default false) true to hide map icons for objects.\n- Arma 3 v2.24 MapHideSmallSigns: Boolean - (default false) true to hide map icons for trees, bushes, rocks.\n- Arma 3 v2.24 MapHideLocations: Boolean - (default false) true to hide map icons for trees, bushes, rocks.\n\nProviding a empty HashMap will reset all options to defaults.","syntaxes":[{"syntax":"setMissionOptions options","params":[{"name":"options","type":"HashMap","description":"a HashMap containing all the options to be changed","type_expr":"HashMap"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"options"}}],"examples":[{"code":["setMissionOptions createHashMapFromArray [[\"IgnoreNoDamage\", true], [\"IgnoreFakeHeadHit\", true], [\"IgnoreUpsideDownDamage\", true]];"]},{"code":["setMissionOptions createHashMap; // reset options to default"]}],"see_also":["getMissionOptions","getResolution","getAudioOptionVolumes","getSubtitleOptions"]},{"name":"setMousePosition","title":"setMousePosition","type":"command","url":"https://community.bistudio.com/wiki/setMousePosition","revid":340820,"updated":"2023-05-07T11:05:54Z","groups":["GUI Control - Positioning"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Moves mouse pointer to specified position on the screen. **x** and **y** could be any number, but will be clipped so mouse never leaves the screen area.","syntaxes":[{"syntax":"setMousePosition [x, y]","params":[{"name":"x","type":"Number","description":"x in screen coordinates","type_expr":"Number"},{"name":"y","type":"Number","description":"y in screen coordinates","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[x, y]"}}],"examples":[{"code":["setMousePosition [0.5, 0.5];"]}],"see_also":["getMousePosition","ctrlSetMousePosition","ctrlMousePosition","ctrlMapCursor","reversedMouseY"]},{"name":"setMusicEffect","title":"setMusicEffect","type":"command","url":"https://community.bistudio.com/wiki/setMusicEffect","revid":377584,"updated":"2026-01-02T06:56:42Z","groups":["Sounds","Triggers","Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Defines a music track played on activation. If another track is playing already, this will stop it and start the new track.\n\nTrack is a subclass name of CfgMusic. In addition, \"$STOP$\" (stops the current music track) or use `playMusic \"\"`.\nWhen used in a trigger, the track starts on activation but does not automatically stop on deactivation.","syntaxes":[{"syntax":"trigger setMusicEffect track","params":[{"name":"trigger","type":"Object","type_expr":"Object"},{"name":"track","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"trigger"},"right":{"text":"track"}},{"syntax":"waypoint setMusicEffect track","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"track","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"track"}}],"examples":[{"code":["_trigger setMusicEffect \"Track1\";"]},{"code":["[_group1,1] setMusicEffect \"$STOP$\";"]}],"see_also":["createTrigger","setSoundEffect","setTitleEffect"]},{"name":"setMusicEventHandler","title":"setMusicEventHandler","type":"command","url":"https://community.bistudio.com/wiki/setMusicEventHandler","revid":379536,"updated":"2026-10-31T00:51:54Z","groups":["Event Handlers","Sounds"],"status":"deprecated","replaced_by":["addMusicEventHandler"],"games":{"arma3":"1.02"},"since":"arma3 1.02","arma3_since":"1.02","description":"Sets given music track event handler. Will overwrite other music event handlers.\n\n> [!CAUTION]\n> This information is **obsolete**. Reason: Use addMusicEventHandler instead as it can stack music event handlers.","syntaxes":[{"syntax":"setMusicEventHandler [type, function]","params":[{"name":"type","type":"String","description":"\"MusicStart\" or \"MusicStop\"","type_expr":"String"},{"name":"function","type":"String","description":"script to be executed. Passes params array 0: class name of the sound in CfgMusic, 1: event handler id","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[type, function]"}}],"examples":[{"code":["setMusicEventHandler [\"MusicStart\", \"hint str _this\"];"]},{"code":["setMusicEventHandler [\"MusicStop\", \"hint str _this\"];"]}],"see_also":["addMusicEventHandler","removeMusicEventHandler","playMusic","removeAllMusicEventHandlers"]},{"name":"setName","title":"setName","type":"command","url":"https://community.bistudio.com/wiki/setName","revid":370891,"updated":"2025-02-21T10:44:05Z","groups":["Unit Identity","Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sets the name of a location or a person (person only in single player).","syntaxes":[{"syntax":"thing setName name","params":[{"name":"thing","type":"Location or Arma 3 v1.02 Object","type_expr":"Location | Object"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"thing"},"right":{"text":"name"}},{"syntax":"unit setName [name, firstName, lastName]","since":"arma3 1.02","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"name","type":"String","type_expr":"String"},{"name":"firstName","type":"String","type_expr":"String"},{"name":"lastName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[name, firstName, lastName]"}}],"examples":[{"code":["myLocation setName \"My Location Name\";"]},{"code":["player setName \"New Name\";"]},{"code":["player setName [\"Ben Kerry\",\"Ben\",\"Kerry\"];"]}],"see_also":["name","nameSound","setNameSound","setIdentity"],"notes":[{"user":"Pierre MGI","date":"2014-08-18T22:15:00Z","text":"Only last name will appear in command bar i.e. `this setName _myNameArray` will display `_myNameArray select 2`.\nIf setName is used with a string e.g `this setName \"blah\"`, nothing occurs in the command bar and the default randomized name is displayed.\n\nDealing with the units' names in a script, _x (in a `forEach units _group`, for example) will return the \"object\" as `B ALFA 4-1:2` or the name written in ai unit name field in editor (if exists).\nThis context is rather a \"variable name\" for each object (ai) than an \"identity name\" as given via the setName command."}]},{"name":"setNameSound","title":"setNameSound","type":"command","url":"https://community.bistudio.com/wiki/setNameSound","revid":363769,"updated":"2024-04-19T09:01:30Z","groups":["Unit Identity"],"status":"ok","games":{"arma3":"1.02"},"since":"arma3 1.02","arma3_since":"1.02","locality":{"argument":"global","effect":"local"},"description":"Sets the nameSound of a person. By default, when giving orders, the units are addressed by their number.\nWhen nameSound is set, it will be used instead to address the unit. For example instead of \"Two, hold fire!\", one can have \"Miller, hold fire!\".\n\n> [!NOTE]\n> See Arma 3: CfgIdentities - NameSounds for common values.\n> Note that any word from `configFile >> \"RadioProtocolENG\" >> \"Words\"` is accepted (e.g `\"veh_infantry_Sniper_s\"`).","syntaxes":[{"syntax":"person setNameSound name","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"name"}}],"examples":[{"code":["unit1 setNameSound \"dixon\";"]},{"code":["unit1 setNameSound \"\"; // will reset to default behaviour"]},{"code":["_name = \"Masood\";\nunit1 setNameSound _name;\nunit1 setName _name;"]}],"see_also":["nameSound","name","setName","setIdentity"],"notes":[{"user":"Lou Montana","date":"2013-12-22T19:08:00Z","text":"setting an incorrect value like \"0\" or \"randomString\" will remove the callsign (\" */* 2, */* fall back\")"}]},{"name":"setObjectArguments","title":"setObjectArguments","type":"command","url":"https://community.bistudio.com/wiki/setObjectArguments","revid":363285,"updated":"2024-03-26T10:51:56Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Set object arguments in mission editor.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map setObjectArguments [object,[name1,value1,...]]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"[object,[name1,value1,...]]","type":"Array","type_expr":"Array"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"map"},"right":{"text":"[object,[name1,value1,...]]"}}],"examples":[{"text":"-"}]},{"name":"setObjectMaterial","title":"setObjectMaterial","type":"command","url":"https://community.bistudio.com/wiki/setObjectMaterial","revid":379304,"updated":"2026-10-30T23:48:42Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sets material of object selection. The selection number is defined through the hiddenselection[] = {} array in the vehicle's config (starting with 0).","syntaxes":[{"syntax":"obj setObjectMaterial [selectionNumber, material]","params":[{"name":"obj","type":"Object","type_expr":"Object"},{"name":"selectionNumber","type":"Number or Arma 3 v2.10 String","type_expr":"Number | String"},{"name":"material","type":"String","description":"material path. Since Arma 3 v2.20 using **\"#reset\"** would reset to default material.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"obj"},"right":{"text":"[selectionNumber, material]"}}],"examples":[{"code":["car setObjectMaterial [0,\"A3\\Structures_F\\Data\\Windows\\window_set.rvmat\"];\ncar setObjectMaterial [1,\"A3\\Structures_F\\Data\\Windows\\window_set.rvmat\"];"]}],"see_also":["getObjectMaterials","setObjectTextureGlobal","getObjectTextures","setObjectTexture","setObjectMaterialGlobal"]},{"name":"setObjectMaterialGlobal","title":"setObjectMaterialGlobal","type":"command","url":"https://community.bistudio.com/wiki/setObjectMaterialGlobal","revid":370027,"updated":"2024-10-27T23:19:13Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","locality":{"argument":"global","effect":"global"},"description":"Set the material of the given selection on all computers in a network session.","syntaxes":[{"syntax":"obj setObjectMaterialGlobal [selection, material]","params":[{"name":"obj","type":"Object","type_expr":"Object"},{"name":"selection","type":"Number or Arma 3 v2.10 String","type_expr":"Number | String"},{"name":"material","type":"String","description":"material path. Since Arma 3 v2.20 using **\"#reset\"** would reset to default material.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"obj"},"right":{"text":"[selection, material]"}}],"examples":[{"code":["player setObjectMaterialGlobal [0, \"A3\\Structures_F\\Data\\Windows\\window_set.rvmat\"];"]}],"see_also":["setObjectTexture","setObjectTextureGlobal","getObjectTextures","setObjectMaterial","getObjectMaterials"]},{"name":"setObjectProxy","title":"setObjectProxy","type":"command","url":"https://community.bistudio.com/wiki/setObjectProxy","revid":353301,"updated":"2024-03-15T17:11:43Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Set the proxy object associated with the given editor object.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map setObjectProxy [object, proxy]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"object","type":"String","type_expr":"String"},{"name":"proxy","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[object, proxy]"}}],"examples":[{"code":["_map setObjectProxy [\"_group_0\", vehicle (leader _group)];"]}],"see_also":["getObjectProxy"]},{"name":"setObjectScale","title":"setObjectScale","type":"command","url":"https://community.bistudio.com/wiki/setObjectScale","revid":364325,"updated":"2024-05-06T09:38:47Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","locality":{"argument":"local","effect":"global"},"description":"Scales an attached object or a Simple Object's model - see Example 3 for various configurations' examples.","syntaxes":[{"syntax":"object setObjectScale scale","params":[{"name":"object","type":"Object","description":"must be either an attached object or Simple Object - see Example 3","type_expr":"Object"},{"name":"scale","type":"Number","description":"in range 0.0001..65504, relative to the object model's normal scale","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"scale"}}],"examples":[{"code":["_vehicle attachTo [player, [0,0,0]];\n_vehicle setObjectScale 0.1;"]},{"code":["// select an object in Eden Editor and execute the following code in the Debug Console. When moving the object, the effect is reset!\nprivate _object = get3DENSelected \"Object\" select 0;\n_object setObjectScale 0.1;"]},{"code":["// multiple MP-compatible options\n\n// global simple object\nprivate _globalSimpleObject = createSimpleObject [\"C_Offroad_01_F\", getPosASL player, false];\n_globalSimpleObject setObjectScale 0.1; // once is enough as long as it is not moved\n\n// local normal object\nprivate _localNormalObject = \"C_Offroad_01_F\" createVehicleLocal getPosATL player;\n_localNormalObject attachTo [player, [0, 2, 1.5]]; // normal object must be attached\n_localNormalObject setObjectScale 0.1; // once is enough as long as it is not moved\n\n// local simple object\nprivate _localSimpleObject = createSimpleObject [\"C_Offroad_01_F\", getPosASL player, true];\n_localSimpleObject setObjectScale 0.1; // once is enough as long as it is not moved"]},{"text":"```sqf\n// a not-so-great EachFrame workaround for a non-attached object\n\n// a normal object that is not attached must be scaled each frame\n// make sure the object is LOCAL in order to not saturate the network!\nprivate _localNormalObject = \"C_Offroad_01_F\" createVehicleLocal getPosATL player;\n// the object is not attached to anything\naddMissionEventHandler [\n    \"EachFrame\",\n    { _thisArgs params [\"_obj\", \"_scale\"]; _obj setObjectScale _scale; },\n    [_localNormalObject, 0.1]\n];\n```","code":["// a not-so-great EachFrame workaround for a non-attached object\n\n// a normal object that is not attached must be scaled each frame\n// make sure the object is LOCAL in order to not saturate the network!\nprivate _localNormalObject = \"C_Offroad_01_F\" createVehicleLocal getPosATL player;\n// the object is not attached to anything\naddMissionEventHandler [\n\t\"EachFrame\",\n\t{ _thisArgs params [\"_obj\", \"_scale\"]; _obj setObjectScale _scale; },\n\t[_localNormalObject, 0.1]\n];"]},{"text":"```sqf\n// only do the following in single player;\n// NEVER do such EachFrame in multiplayer!!\n// the performance will be terrible, the network will be saturated, the scaling may desync and not be perfect\nprivate _globalNormalObject = \"C_Offroad_01_F\" createVehicle getPosATL player;\naddMissionEventHandler [\n    \"EachFrame\",\n    { _thisArgs params [\"_obj\", \"_scale\"]; _obj setObjectScale _scale; },\n    [_globalNormalObject, 0.1]\n];\n```","code":["// only do the following in single player;\n// NEVER do such EachFrame in multiplayer!!\n// the performance will be terrible, the network will be saturated, the scaling may desync and not be perfect\nprivate _globalNormalObject = \"C_Offroad_01_F\" createVehicle getPosATL player;\naddMissionEventHandler [\n\t\"EachFrame\",\n\t{ _thisArgs params [\"_obj\", \"_scale\"]; _obj setObjectScale _scale; },\n\t[_globalNormalObject, 0.1]\n];"]}],"problems":"The Arma 3 LOD limits still apply, meaning walkable surfaces can only be (~70?)m in size, and collision in general will only work up to (?)m from object center.\nThis command works on all objects in Eden Editor or scenario preview, but it will not save and will reset when objects get moved. Eden Editor support is only intended for artists.\n\n> [!NOTE]\n> Setting the scale of non-simple objects, such as vehicles with players/AI in them, static objects (`simulation = \"house\"` in config), etc. might be possible,\n> but not officially supported. You may encounter issues.\n\n> [!IMPORTANT]\n> Changing the direction of the object (e.g. using setDir, setVectorDir, etc.) will reset the object back to its original size (probably because the engine normalises the directions,\n> thus the scale in the transformation matrix becomes 1), so those commands should be run **before** resizing the object.","see_also":["getObjectScale","createVehicleLocal","createSimpleObject","BIS_fnc_createSimpleObject","Multiplayer Scripting"],"notes":[{"user":"P1ker1","date":"2022-01-04T22:17:33Z","text":"Note that\n\n```sqf\n_obj setObjectScale 2;\n```\n\ndoubles the scale factor of an object, not the volume. In the case of a cube this would be the length of an edge.\nIf you want to multiply the volume, raise the *scale* to the power of 1/3.\n\n```sqf\n// Example with 1x1x1 m^3 helper objects\n// vectorAdds elevate the cubes so they touch the ground after scaling.\n_cube1 = createSimpleObject [\"Land_VR_Shape_01_cube_1m_F\", getPosASL player vectorAdd [1,3,0.5]];\n_cube2 = createSimpleObject [\"Land_VR_Shape_01_cube_1m_F\", getPosASL player vectorAdd [3,1,0.5]];\n_cube3 = createSimpleObject [\"Land_VR_Shape_01_cube_1m_F\", getPosASL player vectorAdd [1.35,1.35,0.13]];\n\n// Double the side length. V=2^3=8\n_cube1 setObjectScale 2;\n\n// Octuple(8x) the volume.    V=(8^(1/3))^3=8\n_cube2 setObjectScale 8^(1/3);\n\n// Double the volume.        V=(2^(1/3))^3=2\n_cube3 setObjectScale 2^(1/3);\n```"}]},{"name":"setObjectTexture","title":"setObjectTexture","type":"command","url":"https://community.bistudio.com/wiki/setObjectTexture","revid":370028,"updated":"2024-10-27T23:20:14Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Applies given texture to object's selection. See also Procedural Textures and Retexturing with setObjectTexture.\n\n> [!NOTE]\n> - Not all objects can be textured this way. To find out, run getObjectTextures command on an object. Empty array `[]` usually indicates it cannot be textured.\n> - All textures must have a resolution of 2a × 2b (e.g. 16×16, 16×32, 64×256, 512×512, ...). The largest texture size supported by the RV engine is 4096×4096.\n> - Supported formats: .pac, .paa, .jpg, .jpeg, .ogg, .ogv","syntaxes":[{"syntax":"object setObjectTexture [selection, texture]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"selection","type":"Number or Arma 3 v2.10 String","description":"index of the selection. It is defined in the hiddenSelections array in the vehicle's config (starting with 0). If a string is given, it referes to a hiddenSelection name or clan selection instead of an index.","type_expr":"Number | String"},{"name":"texture","type":"String","description":"path to texture. Since Arma 3 v2.20 using **\"#reset\"** would reset to default texture.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[selection, texture]"}}],"examples":[{"code":["_objectname setObjectTexture [0, \"\\pboname\\texture.paa\"];\n_objectname setObjectTexture [1, \"\\pboname\\texture2.paa\"];"]},{"code":["_obj setObjectTexture [0, \"#(rgb,8,8,3)color(1,0,0,1)\"];"]},{"code":["_obj setObjectTexture [0, \"#(argb,512,512,1)r2t(rendersurface,1.333)\"];"]},{"text":"Disable randomization before applying a texture to a vehicle in the Editor (if it is a vehicle that supports randomization):\n\n```sqf\nthis setVariable [\"BIS_enableRandomization\", false];\nthis setObjectTexture [0,\"#(rgb,8,8,3)color(1,0,0,1)\"];\n```","code":["this setVariable [\"BIS_enableRandomization\", false];\nthis setObjectTexture [0,\"#(rgb,8,8,3)color(1,0,0,1)\"];"]},{"text":"The `\"clan\"` selection can be used to apply a texture to the areas that usually display the squad.xml logo:\n\n```sqf\nMyVehicle setObjectTexture [\"clan\", \"\\a3\\missions_f_epa\\data\\img\\orbat\\b_111_texture_ca.paa\"];\n```","code":["MyVehicle setObjectTexture [\"clan\", \"\\a3\\missions_f_epa\\data\\img\\orbat\\b_111_texture_ca.paa\"];"]}],"multiplayer":"See setObjectTextureGlobal.","see_also":["getObjectTextures","setObjectTextureGlobal","setObjectMaterial","getObjectMaterials","setObjectMaterialGlobal","forceFlagTexture"],"notes":[{"user":"Benargee","date":"2014-08-25T22:27:00Z","text":"Also works with absolute path and .jpg files.\n\n```sqf\n_obj setObjectTexture [0, \"C:\\Folder\\Folder\\Texture.paa\"];\n_obj setObjectTexture [0, \"C:\\Folder\\Folder\\Texture.jpg\"];\n```\n\nTexture can also be blank:\n\n```sqf\n_obj setObjectTexture [2,\"\"];\n```\n\nThis will make the texture selection invisible on certain units without an error message. In some cases this is a desirable effect"},{"user":"Longbow","date":"2015-03-18T03:09:00Z","text":"It is also possible to apply texture to unit's backpack, as it also has hidden selection (unfortunately does not work for vests)\n\n```sqf\nbackpackContainer player setObjectTexture [0,\"#(argb,8,8,3)color(0,0,0,1)\"]\n```\n\nAlso keep in mind that player's custom texture is being reset when you open BIS Arsenal (even without changing any gear)"},{"user":"Moerderhoschi","date":"2015-05-13T14:37:00Z","text":"You can also use the game's internal skins: [List of MH9 Skins](http://forums.bistudio.com/showthread.php?169734-paint-MH-9-different-colour)\n\n```sqf\n_obj setObjectTexture [0, \"\\a3\\air_f\\heli_light_01\\data\\skins\\heli_light_01_ext_digital_co.paa\"];\n```"},{"user":"Killzone_Kid","date":"2016-10-24T12:09:00Z","text":"Sometimes it could be necessary to set default material on an object for the texture to take effect:\n\n```sqf\n_block = createVehicle [\"Land_VR_Block_02_F\", player getPos [20, getDir player], [], 0, \"CAN_COLLIDE\"];\n_block setObjectMaterial [0, \"\\a3\\data_f\\default.rvmat\"];\n_block setObjectTexture [0, \"#(rgb,8,8,3)color(1,0,0,1)\"];\n```\n\nCourtesy of **Larrow**"}]},{"name":"setObjectTextureGlobal","title":"setObjectTextureGlobal","type":"command","url":"https://community.bistudio.com/wiki/setObjectTextureGlobal","revid":370029,"updated":"2024-10-27T23:21:01Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.06"},"since":"arma3 1.06","arma3_since":"1.06","locality":{"argument":"global","effect":"global"},"description":"Set the texture of the given selection on all computers in a network session.\n\n> [!NOTE]\n> - Not all objects can be textured this way. To find out, run getObjectTextures command on an object. Empty array `[]` usually indicates it cannot be textured.\n> - All textures must have a resolution of 2a × 2b (e.g. 16×16, 16×32, 64×256, 512×512, ...). The largest texture size supported by the RV engine is 4096×4096.\n> - Supported formats: .pac, .paa, .jpg, .jpeg, .ogg, .ogv","syntaxes":[{"syntax":"object setObjectTextureGlobal [selection, texture]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"selection","type":"Number or Arma 3 v2.10 String","description":"index of the selection. It is defined in the hiddenSelections array in the vehicle's config (starting with 0). If a string is given, it referes to a hiddenSelection name or clan selection instead of an index.","type_expr":"Number | String"},{"name":"texture","type":"String","description":"path to texture. Since Arma 3 v2.20 using **\"#reset\"** would reset to default texture.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[selection, texture]"}}],"examples":[{"code":["player setObjectTextureGlobal [0, \"\\MyAddon\\blue.paa\"];"]},{"text":"```sqf\n// Set up a persistent texture keeper\nplayer addEventHandler [\"Take\", {\n    (getObjectTextures player + [uniformContainer player getVariable \"texture\"])\n    params [\"_texUniform\", \"_texInsignia\", \"_texCustom\"];\n    if (isNil \"_texCustom\") exitWith {};\n    if (_texUniform == _texCustom) exitWith {};\n    player setObjectTextureGlobal [0, _texCustom];\n    false\n}];\n\n// Example: make current uniform persistently blue\n\nprivate _texture = \"#(rgb,8,8,3)color(0,0,1,1)\"; // blue texture\nplayer setObjectTextureGlobal [0, _texture]; // set it on player\nuniformContainer player setVariable [\"texture\", _texture, true]; // store it on uniform\n```","code":["// Set up a persistent texture keeper\nplayer addEventHandler [\"Take\", {\n\t(getObjectTextures player + [uniformContainer player getVariable \"texture\"])\n\tparams [\"_texUniform\", \"_texInsignia\", \"_texCustom\"];\n\tif (isNil \"_texCustom\") exitWith {};\n\tif (_texUniform == _texCustom) exitWith {};\n\tplayer setObjectTextureGlobal [0, _texCustom];\n\tfalse\n}];\n\n// Example: make current uniform persistently blue\n\nprivate _texture = \"#(rgb,8,8,3)color(0,0,1,1)\"; // blue texture\nplayer setObjectTextureGlobal [0, _texture]; // set it on player\nuniformContainer player setVariable [\"texture\", _texture, true]; // store it on uniform"]}],"multiplayer":"The effect is JIP compatible.","problems":"If executed from an object's init field (which should not be done anyway for Global effect commands), execution may happen too early and fail to broadcast over the network and to be JIP compatible.","see_also":["setObjectTexture","getObjectTextures","setObjectMaterial","forceFlagTexture"],"notes":[{"user":"Killzone_Kid","date":"2016-10-24T12:13:00Z","text":"Sometimes it could be necessary to set default material on an object for the texture to take effect:\n\n```sqf\nprivate _block = createVehicle [\"Land_VR_Block_02_F\", player getPos [20, getDir player], [], 0, \"CAN_COLLIDE\"];\n_block setObjectMaterialGlobal [0, \"\\a3\\data_f\\default.rvmat\"];\n_block setObjectTextureGlobal [0, \"#(rgb,8,8,3)color(1,0,0,1)\"];\n```\n\nCourtesy of **Larrow**"},{"user":"whiztler","date":"2022-09-13T21:04:01Z","text":"Following Killzone_Kid's note, a sleep after the setObjectMaterialGlobal and before the setObjectTextureGlobal command is sometimes needed to ensure the texture effect is carried out correctly.\n\n```sqf\nprivate _block = createVehicle [\"Land_VR_Block_02_F\", player getPos [20, getDir player], [], 0, \"CAN_COLLIDE\"];\n_block setObjectMaterialGlobal [0, \"\\a3\\data_f\\default.rvmat\"];\nsleep 0.01;\n_block setObjectTextureGlobal [0, \"#(rgb,8,8,3)color(1,0,0,1)\"];\n```\n\nNote that you need to run above code in a scheduled environment."}]},{"name":"setObjectViewDistance","title":"setObjectViewDistance","type":"command","url":"https://community.bistudio.com/wiki/setObjectViewDistance","revid":309992,"updated":"2022-05-05T12:19:42Z","groups":["System","Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets the rendering distance of objects and shadows.","syntaxes":[{"syntax":"setObjectViewDistance objectDistance","params":[{"name":"objectDistance","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"objectDistance"}},{"syntax":"setObjectViewDistance [objectDistance, shadowDistance]","params":[{"name":"objectDistance","type":"Number","type_expr":"Number"},{"name":"shadowDistance","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[objectDistance, shadowDistance]"}}],"examples":[{"code":["setObjectViewDistance 2000;"]},{"code":["setObjectViewDistance [2000, 800];"]}],"see_also":["getObjectViewDistance","setViewDistance","viewDistance","setDetailMapBlendPars","setTerrainGrid"]},{"name":"setOpticsMode","title":"setOpticsMode","type":"command","url":"https://community.bistudio.com/wiki/setOpticsMode","revid":377651,"updated":"2026-01-02T09:01:57Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Sets the optic mode of the current weapon to the given class name or the index.","syntaxes":[{"syntax":"unit setOpticsMode mode","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"mode","type":"String, Number or Array:","description":"String, Number or Array:\n\n- String - class name defined in the optic's `OpticsModes` config class\n- Number - 0-based index of the optic mode with 0 being the default optic mode\n- Array with [slotIndex, opticsModeIndexOrClassName]\n  - slotIndex: Number, can be one of:\n    - 0 - Current weapon\n    - 1 - Primary weapon\n    - 2 - Secondary weapon\n    - 3 - Handgun\n  - opticsModeIndexOrClassName: String or Number as above","type_expr":"String | Number | Array","text":"mode: String, Number or Array:\n\n- String - class name defined in the optic's `OpticsModes` config class\n- Number - 0-based index of the optic mode with 0 being the default optic mode\n- Array with [slotIndex, opticsModeIndexOrClassName]\n  - slotIndex: Number, can be one of:\n    - 0 - Current weapon\n    - 1 - Primary weapon\n    - 2 - Secondary weapon\n    - 3 - Handgun\n  - opticsModeIndexOrClassName: String or Number as above"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"mode"}}],"examples":[{"code":["player setOpticsMode \"Hamr2Scope\"; // Default optic mode for optic_Hamr"]},{"code":["player setOpticsMode 0;"]},{"code":["player setOpticsMode [1, 0]; // reset the optics mode of the player's primary weapon to the default"]}],"see_also":["getOpticsMode"]},{"name":"setOvercast","title":"setOvercast","type":"command","url":"https://community.bistudio.com/wiki/setOvercast","revid":379149,"updated":"2026-10-17T01:42:12Z","groups":["Environment"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Set overcast to given value smoothly during given time (in seconds). Zero time means immediate change.\nAn overcast setting of zero means clear (sunny) weather, and one means storms and rain are very likely. Higher overcast values also result in higher wind speeds.","syntaxes":[{"syntax":"time setOvercast overcast","params":[{"name":"time","type":"Number","description":"in seconds","type_expr":"Number"},{"name":"overcast","type":"Number","description":"in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"overcast"}}],"examples":[{"code":["60 setOvercast 0.5;"]}],"multiplayer":"**Pre Arma 3:** Each client and the server can have differing overcast values.\n\n> [!NOTE]\n> **Arma 3:** In Arma 3 weather values are periodically synchronised with the server.","see_also":["overcast","nextWeatherChange","simulSetHumidity"],"notes":[{"user":"Hardrock","date":"2006-08-04T14:00:00Z","text":"*Notes from before the conversion:*\n\nUse setRain if you want to make sure it rains."},{"user":"Ceeeb","date":"2007-04-20T04:24:00Z","text":"Only one script command induced weather change (either setOvercast or setFog) can be happening at a time. Starting a new weather change will immediately halt the current weather change. SetRain changes are independent and can occur simultaneously to a weather change."},{"user":"DnA","date":"2013-08-14T11:22:00Z","text":"Arma 3's volumetric clouds cannot be instantly changed (it would take up to a few seconds to do a full recompute). Therefore, *0 setOvercast 0* will not have the desired effect. You can use skipTime to get to the desired cloud coverage.\n\nNOTE: To get instant, seamless overcast change to overcast 1 advance the time 24 hours with skipTime while setting overcast transition time to 86400 seconds (24 hours) - Killzone_Kid (12:08, 15 August 2013)\n\n```sqf\n86400 setOvercast 1;\nskipTime 24;\n\n// to remain on the same date:\nskipTime -24;\n86400 setOvercast 1;\nskipTime 24;\n```"},{"user":"Killzone_Kid","date":"2013-10-28T11:06:00Z","text":"With removal of simulSetHumidity, in order to add instant cloud cover, execute simulWeatherSync with delay (for now):\n\n```sqf\nskipTime -24;\n86400 setOvercast 1;\nskipTime 24;\n0 spawn {\n    sleep 0.1;\n    simulWeatherSync;\n};\n```\n\nThere is slight freeze with simul command."},{"user":"Adanteh","date":"2015-08-21T19:58:00Z","text":"Delay in Arma 3 doesn't work for quick changes. Using 120 setOvercast 1 only reaches full overcast after about 50 minutes.\nUsing setTimeMultiplier does speed up the overcast, but it doesn't render any clouds.\nYou will need to skipTime or forceWeatherChange to render clouds if you want it to happen within the hour."},{"user":"AgentRev","date":"2016-05-05T00:41:00Z","text":"Actual transition time is inversely proportional to the timeMultiplier. For example, a time of 7200 (2 hours) and a timeMultiplier of 2 will result in a real-life transition time of 7200 / 2 = 3600 (1 hour).\nIn case of overcast, a timeMultiplier > 1 will cause gradual desyncing of the cloud cover with the overcast value, so it is advised that you multiply the transition time by the multiplier, i.e. :\n\n```sqf\n(7200 * timeMultiplier) setOvercast 1\n```"},{"user":"OverlordZorn","date":"2026-10-17T01:42:12Z","text":"Tested in 2.22:\n\n- The old note about only one weather change running at a time does not apply (anymore). `setOvercast` and `setFog` transitions run at the same time without interrupting each other, in either order.\n- `setOvercast` does not change `nextWeatherChange`. `setFog` does: it sets it to the transition time.\n- The transition time is not respected. After `120 setOvercast 1` (starting at 0), overcast rose by ~0.0014 every 5 seconds (0.017 after 60s), so a full change takes roughly an hour. `overcastForecast` reports the target (1) right away."}]},{"name":"setOwner","title":"setOwner","type":"command","url":"https://community.bistudio.com/wiki/setOwner","revid":379380,"updated":"2026-10-30T23:58:48Z","groups":["Multiplayer"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","locality":{"argument":"global","server_exec":true},"description":"From server machine, change the ownership of an object to a given client. Using command in an unintended way will log a message to .rpt file. To transfer ownership of all AI units in a group properly, use setGroupOwner instead.","syntaxes":[{"syntax":"object setOwner clientID","params":[{"name":"object","type":"Object","description":"object to transfer","type_expr":"Object"},{"name":"clientID","type":"Number","description":"the machine network ID of the new owner.","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if ownership was successfully transferred, otherwise false"},"form":"binary","left":{"text":"object"},"right":{"text":"clientID"}}],"examples":[{"code":["_someObject setOwner 12;"]},{"code":["_someObject setOwner (owner _playerObject);"]}],"problems":"> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.40, this command should not be used to transfer ownership of units with AI with the exception of agents.\n\n> [!IMPORTANT]\n> **Prior to Arma 3 v1.40** it was not possible to transfer the ownership from a client back to the server.","see_also":["owner","setGroupOwner","groupOwner","didJIPOwner"],"notes":[{"user":"Demellion","date":"2017-08-22T18:56:00Z","text":"**NOTE**: There are some interesting behaviour about the specific owner digits like **0** **-2** and **2**:\n\n1. Any mission objects (generated from SQM) initially have **0** owner state, but it is not local to ANYONE (0) like it is expected to be, but actually only to a SERVER (2). You can't make any object owner to be 0 once it was changed.\n1. Trying to change ownership to any negative digit will always result in attempt to transfer ownership to SERVER (2). Once it is unit (non-agent) it will fail and revert* to initial ownership.\n1. *Changing ownership of a unit (non-agent) actually gives a result for a brief time after this action is performed. What actually happens next - ownership is getting reverted with a message to RPT of a server. This can be seen by reading results of (owner _object) in really fast cycle."},{"user":"jonpas","date":"2019-02-12T01:15:00Z","text":"Prints RPT warning \"setGroupOwner should be used\" as soon as there is one unit inside the vehicle, but performs the action successfully."}]},{"name":"setOxygenRemaining","title":"setOxygenRemaining","type":"command","url":"https://community.bistudio.com/wiki/setOxygenRemaining","revid":377982,"updated":"2026-01-20T14:37:17Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Sets oxygen remaining. It has no effect when soldier is not diving.","syntaxes":[{"syntax":"unit setOxygenRemaining value","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"value","type":"Number in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"value"}}],"examples":[{"text":"```sqf\nif (!isAbleToBreathe player) then\n{\n    player setOxygenRemaining 0; // drowns player\n};\n```","code":["if (!isAbleToBreathe player) then\n{\n\tplayer setOxygenRemaining 0; // drowns player\n};"]}],"see_also":["isAbleToBreathe","getOxygenRemaining"]},{"name":"setParticleCircle","title":"setParticleCircle","type":"command","url":"https://community.bistudio.com/wiki/setParticleCircle","revid":378393,"updated":"2026-04-04T07:54:48Z","groups":["Particles"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Updates particle source, creates particles in circle with given radius. Velocity is transformed and added to total velocity. The random particle positioning is calculated in relation to the nearest surface. Since Arma 3 2.22, this could be overridden (will also override onSurface = true).","syntaxes":[{"syntax":"particleSource setParticleCircle [circleRadius, circleVelocity, ignoreSurfaces]","params":[{"name":"particleSource","type":"Object","type_expr":"Object"},{"name":"circleRadius","type":"Number","description":"the radius (x,y plain) in which particles are generated","type_expr":"Number"},{"name":"circleVelocity","type":"Vector3D","description":"direction and speed of particles movement","type_expr":"Vector3D"},{"name":"ignoreSurfaces","type":"Boolean","optional":true,"default":"false","description":"true to calculate particle position relative to the source position.","type_expr":"Boolean","since":"arma3 2.22","text":"ignoreSurfaces: Boolean - (Optional) true to calculate particle position relative to the source position. Default: false"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"particleSource"},"right":{"text":"[circleRadius, circleVelocity, ignoreSurfaces]"}}],"examples":[{"code":["_myParticleSource setParticleCircle [3, [0,0,5]];"]},{"code":["_myParticleSource setParticleCircle [3, [0,0,5], true];"]}],"see_also":["setParticleParams","setParticleRandom","ParticleTemplates","setParticleClass","particlesQuality","setParticleFire"]},{"name":"setParticleClass","title":"setParticleClass","type":"command","url":"https://community.bistudio.com/wiki/setParticleClass","revid":379381,"updated":"2026-10-30T23:58:56Z","groups":["Particles"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sets particle source parameters using existing particle config from `CfgCloudlets` class. Use setParticleParams subsequently if you need to overwrite some values.\n\n> [!IMPORTANT]\n> If `CfgCloudlets` class contains simple expressions, they will not be evaluated by this command, which might make the whole class unusable in script.","syntaxes":[{"syntax":"source setParticleClass className","params":[{"name":"source","type":"Object","description":"particle source","type_expr":"Object"},{"name":"className","type":"String","description":"CfgCloudlets class","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"source"},"right":{"text":"className"}}],"examples":[{"code":["_source01 = \"#particlesource\" createVehicleLocal _pos01;\n_source01 setParticleClass \"ObjectDestructionFire1Smallx\";\n_source01 attachTo [_object,[0,0,0]];"]}],"see_also":["Arma 3: Particle Effects","ParticleArray","setParticleParams","setParticleRandom","setParticleCircle","setParticleFire","setDropInterval","drop"],"notes":[{"user":"Waffle SS.","date":"2015-06-28T21:17:00Z","text":"This can be very useful for getting features that can't normally be added with commands, such as AI view blocking and particles that can only be above/underwater."}]},{"name":"setParticleFire","title":"setParticleFire","type":"command","url":"https://community.bistudio.com/wiki/setParticleFire","revid":330030,"updated":"2022-08-15T14:55:31Z","groups":["Particles"],"status":"ok","games":{"arma3":"1.08"},"since":"arma3 1.08","arma3_since":"1.08","locality":{"argument":"global","effect":"local"},"description":"Set fire parameters to particle effect.\n\nNote: You need to create emitter at first. Basic parameters of particle effect must be defined too. You can use script commands setParticleClass or setParticleParams to do so (see example). Correspondence between CfgCloudlets class param names and command array of params:\n\n```sqf\nparticleSource setParticleFire\n[\n    coreIntensity,\n    coreDistance,\n    damageTime\n];\n```","syntaxes":[{"syntax":"source setParticleFire [coreIntensity, coreDistance, damageTime]","params":[{"name":"source","type":"Object","type_expr":"Object"},{"name":"coreIntensity","type":"Number","description":"damage in the center of fire","type_expr":"Number"},{"name":"coreDistance","type":"Number","description":"how far can unit get damage","type_expr":"Number"},{"name":"damageTime","type":"Number","description":"how often is unit getting damage","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"source"},"right":{"text":"[coreIntensity, coreDistance, damageTime]"}}],"examples":[{"code":["_emitter = \"#particlesource\" createVehicleLocal (getPos player);\n_emitter setParticleClass \"MediumSmoke\";\n_emitter setParticleFire [0.3,1.0,0.1];"]}],"see_also":["Arma 3: Particle Effects","ParticleArray","setParticleParams","setParticleRandom","setParticleCircle","setDropInterval","drop","setParticleClass"],"notes":[{"user":"AgentRev","date":"2018-04-09T20:44:00Z","text":"Using this command on a dedicated server or headless client seems to have no effect on local AI units, they will walk thru the fire unscathed."}]},{"name":"setParticleParams","title":"setParticleParams","type":"command","url":"https://community.bistudio.com/wiki/setParticleParams","revid":377766,"updated":"2026-01-03T01:02:12Z","groups":["Particles"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Set parameters to particle source. Array is in format ParticleArray.\n\nSince Arma 3 version 1.11.114706 you can use this command to overwrite many values set by setParticleClass, particularity those defined in ParticleArray. Correspondence between CfgCloudlets class param names and command array of params:\n\n```sqf\nparticleSource setParticleParams\n[\n    /*\n        String or Array - If string then the name of the particleShape. And following default values are used:\n            particleFSNtieth = 1\n            particleFSIndex = 0\n            particleFSFrameCount = 1\n            particleFSLoop = 1\n    */\n    [\n        particleShape,            /* String */\n        particleFSNtieth,        /* Number */\n        particleFSIndex,        /* Number */\n        particleFSFrameCount,    /* Number */\n        particleFSLoop            /* Optional - Number. Default: 1 */\n    ],\n    animationName,                /* String */\n    particleType,                /* String - Enum: Billboard, SpaceObject */\n    timerPeriod,                /* Number */\n    lifeTime,                    /* Number */\n    pos3D,                        /* 3D Array of numbers as relative position to particleSource or (if object at index 18 is set) object.\n                                    Or (if object at index 18 is set) String as memoryPoint of object. */\n    moveVelocity,                /* 3D Array of numbers. */\n    rotationVelocity,            /* Number */\n    weight,                        /* Number */\n    volume,                        /* Number */\n    rubbing,                    /* Number */\n    sizeOverLifetime,            /* Array of Numbers */\n    color,                        /* Array of Array of RGBA Numbers */\n    animationSpeed,                /* Array of Number */\n    randomDirectionPeriod,        /* Number */\n    randomDirectionIntensity,    /* Number */\n    onTimerScript,                /* String */\n    beforeDestroyScript,        /* String */\n    obj,                        /* Object */\n    angle,                        /* Optional Number - Default: 0 */\n    onSurface,                    /* Optional Boolean - Default: true */\n    bounceOnSurface,            /* Optional Number - Default: -1 */\n    emissiveColor,                /* Optional Array of Array of RGBA Numbers - Default [0,0,0,0] */\n    vectorDirOrVectorDirAndUp    /* Optional vector dir or [vectorDir, vectorUp]\n        Since Arma 3 v1.92 it is possible to set the initial direction of the SpaceObject\n        Since Arma 3 v2.12 it is possible to use a [vectorDir, vectorUp] array */\n];\n```","syntaxes":[{"syntax":"particleSource setParticleParams array","params":[{"name":"particleSource","type":"Object","type_expr":"Object"},{"name":"array","type":"ParticleArray","type_expr":"ParticleArray"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"particleSource"},"right":{"text":"array"}}],"examples":[{"text":"see ParticleArray"}],"see_also":["Arma 3: Particle Effects","ParticleArray","setParticleClass","setParticleRandom","setParticleCircle","setParticleFire","setDropInterval","drop"]},{"name":"setParticleRandom","title":"setParticleRandom","type":"command","url":"https://community.bistudio.com/wiki/setParticleRandom","revid":378785,"updated":"2026-06-05T12:18:37Z","groups":["Particles"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sets randomization of particle source parameters. Correspondence between CfgCloudlets class param names and command array of params:\n\n```sqf\nparticleSource setParticleRandom\n[\n    lifeTimeVar,\n    positionVar,\n    moveVelocityVar,\n    rotationVelocityVar,\n    sizeVar,\n    colorVar,\n    randomDirectionPeriodVar,\n    randomDirectionIntensityVar,\n    angleVar,\n    bounceOnSurfaceVar\n];\n```","syntaxes":[{"syntax":"particleSource setParticleRandom [lifeTime, position, moveVelocity, rotationVelocity, size, color, directionPeriod, directionIntensity, angle, bounceOnSurface]","params":[{"name":"particleSource","type":"Object","type_expr":"Object"},{"name":"lifeTime","type":"Number","type_expr":"Number"},{"name":"position","type":"Array of Number","description":"in format [randomX, randomY, randomZ]","type_expr":"Array<Number>"},{"name":"moveVelocity","type":"Array of Number","description":"in format [randomX, randomY, randomZ]","type_expr":"Array<Number>"},{"name":"rotationVelocity","type":"Number","type_expr":"Number"},{"name":"size","type":"Number","type_expr":"Number"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"},{"name":"directionPeriod","type":"Number","type_expr":"Number"},{"name":"directionIntensity","type":"Number","type_expr":"Number"},{"name":"angle","type":"Number","optional":true,"type_expr":"Number","text":"angle: Number - (Optional)"},{"name":"bounceOnSurface","type":"Number","optional":true,"type_expr":"Number","since":"arma3 0.74","text":"bounceOnSurface: Number - (Optional)"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"particleSource"},"right":{"text":"[lifeTime, position, moveVelocity, rotationVelocity, size, color, directionPeriod, directionIntensity, angle, bounceOnSurface]"}}],"examples":[{"code":["_particleSource setParticleRandom [0, [0.1, 0.1, 0.1], [0, 0, 0.5], 0, 0.1, [0, 0, 0, 0], 0, 0, 45, 0];"]}],"see_also":["ParticleArray","setParticleCircle","setParticleParams","ParticleTemplates","setParticleClass","particlesQuality","setParticleFire"],"notes":[{"user":"DarkDruid","date":"2013-07-03T15:35:00Z","text":"Support of parameter *bounceOnSurface* (Number - 0-1) is in the game since Arma 3 version 0.74. It's variability in speed's loosing in collision with ground. Requires collisions with ground enabled by script command setParticleParams."}]},{"name":"setPhysicsCollisionFlag","title":"setPhysicsCollisionFlag","type":"command","url":"https://community.bistudio.com/wiki/setPhysicsCollisionFlag","revid":373888,"updated":"2025-06-26T10:59:15Z","groups":["PhysX"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","locality":{"argument":"global","effect":"local"},"description":"Sets physics collision flags for PhysX and geometry LODs. Roadway LOD interactions remain.\nFor example, if collision is disabled for a house, it is now possible to walk through its walls but still possible to walk on its floors.\n\n> [!NOTE]\n> Use the allLODs command to check if an object has a roadway LOD (normally, if an object is intended to be walkable, it does have a roadway LOD).","syntaxes":[{"syntax":"object setPhysicsCollisionFlag value","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"value","type":"Boolean","description":"true to enable collision, false to disable it","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"value"}}],"see_also":["hideObject","isObjectHidden","getPhysicsCollisionFlag","disableCollisionWith","enableCollisionWith"]},{"name":"setPilotCameraDirection","title":"setPilotCameraDirection","type":"command","url":"https://community.bistudio.com/wiki/setPilotCameraDirection","revid":377431,"updated":"2026-01-02T06:46:14Z","groups":["Pilot Camera"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","locality":{"argument":"local"},"description":"Sets the direction of airplane's or helicopter's pilotCamera.","syntaxes":[{"syntax":"object setPilotCameraDirection vector3D","params":[{"name":"object","type":"Object","description":"a vehicle equipped with pilot camera","type_expr":"Object"},{"name":"vector3D","type":"Vector3D","description":"in model space, relative to the model centre (In a similar fashion to PositionRelative)","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"vector3D"}}],"examples":[{"code":["vehicle player setPilotCameraDirection [0,1,0] // re-centers the camera"]}],"see_also":["hasPilotCamera","getPilotCameraPosition","getPilotCameraDirection","getPilotCameraRotation","getPilotCameraTarget","setPilotCameraRotation","setPilotCameraTarget"]},{"name":"setPilotCameraOpticsMode","title":"setPilotCameraOpticsMode","type":"command","url":"https://community.bistudio.com/wiki/setPilotCameraOpticsMode","revid":347224,"updated":"2023-09-05T17:11:27Z","groups":["Pilot Camera"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","locality":{"argument":"local"},"description":"Sets the optics mode index (zoom) for the pilotCamera","syntaxes":[{"syntax":"object setPilotCameraOpticsMode index","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"index"}}],"examples":[{"code":["vehicle player setPilotCameraOpticsMode 0"]}],"see_also":["getPilotCameraOpticsMode","hasPilotCamera","getPilotCameraPosition","getPilotCameraDirection","getPilotCameraRotation","setPilotCameraDirection","setPilotCameraRotation","setPilotCameraTarget","getPilotCameraTarget","getTurretOpticsMode","setTurretOpticsMode"]},{"name":"setPilotCameraRotation","title":"setPilotCameraRotation","type":"command","url":"https://community.bistudio.com/wiki/setPilotCameraRotation","revid":323076,"updated":"2022-06-28T21:43:12Z","groups":["Pilot Camera"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","locality":{"argument":"local"},"description":"Sets rotation (relative to the centered camera position) of the object airplane or helicopter pilotCamera .","syntaxes":[{"syntax":"object setPilotCameraRotation rotation","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"rotation","type":"Array","description":"[x,y] - format [yaw (turn), pitch (elevation)]. Values are in radians, positive values are left yaw and down pitch from the center.","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"rotation"}}],"examples":[{"code":["vehicle player setPilotCameraRotation [rad 90, rad 45];"]}],"see_also":["hasPilotCamera","getPilotCameraPosition","getPilotCameraDirection","getPilotCameraRotation","getPilotCameraTarget","setPilotCameraDirection","setPilotCameraTarget"]},{"name":"setPilotCameraTarget","title":"setPilotCameraTarget","type":"command","url":"https://community.bistudio.com/wiki/setPilotCameraTarget","revid":377764,"updated":"2026-01-03T01:00:05Z","groups":["Pilot Camera"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","locality":{"argument":"local"},"description":"Sets an area or target to be tracked by the object airplane or helicopter pilotCamera.\nTo track an object the vehicle has to have appropriate sensors (scanners) that can detect the given target type.\nUsing objNull will unlock the camera","syntaxes":[{"syntax":"object setPilotCameraTarget target","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"target","type":"Object or PositionASL","type_expr":"Object | PositionASL"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"object"},"right":{"text":"target"}}],"examples":[{"code":["_pilotCamTrack = vehicle player setPilotCameraTarget [2100,4200,4.2];"]},{"code":["_pilotCamTrack = vehicle player setPilotCameraTarget BIS_Edita;"]}],"see_also":["hasPilotCamera","getPilotCameraPosition","getPilotCameraDirection","getPilotCameraRotation","getPilotCameraTarget","setPilotCameraDirection","setPilotCameraRotation"]},{"name":"setPilotLight","title":"setPilotLight","type":"command","url":"https://community.bistudio.com/wiki/setPilotLight","revid":379382,"updated":"2026-10-30T23:59:04Z","groups":["Lights"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"local","effect":"global"},"description":"Switches headlights of a vehicle on/off. Note that the vehicle has to be local, for global variant use Arma 3: Actions \"LightOn\"/\"LightOff\"","syntaxes":[{"syntax":"vehicle setPilotLight set","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"set","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"set"}}],"examples":[{"code":["car setPilotLight true;"]}],"see_also":["isLightOn","isCollisionLightOn","setCollisionLight","isIRLaserOn"],"notes":[{"user":"HazJ","date":"2018-09-28T04:03:00Z","text":"This command will not work when using enableSimulation FALSE before this command is executed. However collision lights still do using setCollisionLight.\n\n```sqf\n// Workaround - Put in object init field\nthis setPilotLight true;\nthis setCollisionLight true;\n[this] spawn {\n    sleep 0.001;\n    (_this select 0) enableSimulation false;\n};\n```"}]},{"name":"setPiPEffect","title":"setPiPEffect","type":"command","url":"https://community.bistudio.com/wiki/setPiPEffect","revid":351291,"updated":"2023-11-27T03:13:48Z","groups":["Camera Control"],"status":"ok","games":{"tkoh":"1.00","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","description":"Sets Render Target's visual effect (Picture-in-Picture).\n\n| Mode | Description | Parameters |\n|---|---|---|\n| 0 | Normal | [0] |\n| 1 | Night Vision | [1] |\n| 2 | Thermal Imaging | [2] |\n| 3 | Color Correction | [3, enabled, brightness, contrast, offset, blend [r,g,b,a], lerp [r,g,b,a], rgb [r,g,b,a]] |\n| 7 | Alt. Thermal Imaging 1 (Inverted) | [7] |\n| 8 | Alt. Thermal Imaging 2 (Green) | [8] |\n| 9..70 | Arma 3 v2.10 Alt. Thermal Imaging 3..64 | *[n]* |","syntaxes":[{"syntax":"name setPiPEffect [effect, optionalParam1, optionalParam2, ...]","params":[{"name":"name","type":"String","description":"render surface reference from Render To Texture","type_expr":"String","text":"name : String - render surface reference from Render To Texture"},{"name":"effect","type":"Number","description":"effect type","type_expr":"Number","text":"effect : Number - effect type"},{"name":"optionalParamN","type":"Number","optional":true,"description":"parameters based on selected effect","type_expr":"Number","text":"optionalParamN: Number - (Optional) parameters based on selected effect"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"name"},"right":{"text":"[effect, optionalParam1, optionalParam2, ...]"}}],"examples":[{"code":["\"rendersurface\" setPiPEffect [0];"]},{"code":["\"rendertarget0\" setPiPEffect [3, 1, 1.0, 1.0, 0.0, [0.0, 1.0, 0.0, 0.25], [1.0, 0.0, 1.0, 1.0],  [0.199, 0.587, 0.114, 0.0]];"]},{"text":"```sqf\nprivate _cam = \"camera\" camCreate (player modelToWorld [0,-5,2]);\n_cam cameraEffect [\"internal\", \"back\", \"rtt\"];\n\"rtt\" setPiPEffect [2];\nwith uiNamespace do {\n    private _pic = findDisplay 46 ctrlCreate [\"RscPicture\", -1];\n    _pic ctrlSetPosition [0,0,1,1];\n    _pic ctrlCommit 0;\n    _pic ctrlSetText \"#(argb,512,512,1)r2t(rtt,1.0)\";\n};\n```","code":["private _cam = \"camera\" camCreate (player modelToWorld [0,-5,2]);\n_cam cameraEffect [\"internal\", \"back\", \"rtt\"];\n\"rtt\" setPiPEffect [2];\nwith uiNamespace do {\n\tprivate _pic = findDisplay 46 ctrlCreate [\"RscPicture\", -1];\n\t_pic ctrlSetPosition [0,0,1,1];\n\t_pic ctrlCommit 0;\n\t_pic ctrlSetText \"#(argb,512,512,1)r2t(rtt,1.0)\";\n};"]},{"text":"Black & White:\n\n```sqf\n\"rtt\" setPiPEffect [3, 1, 1.0, 0.4, 0, [0,0,0,0], [1,1,1,0], [1,1,1,1]];\n```","code":["\"rtt\" setPiPEffect [3, 1, 1.0, 0.4, 0, [0,0,0,0], [1,1,1,0], [1,1,1,1]];"]}],"see_also":["Procedural Textures","camCreate","cameraEffect","Post Process Effects"],"notes":[{"user":"Killzone_Kid","date":"2017-07-09T20:04:00Z","text":"If Color Corrections effect has been used, going back to Normal will have no effect. In order to unset Color Corrections, set the 2nd param in it (enable) to 0."}]},{"name":"setPiPViewDistance","title":"setPiPViewDistance","type":"command","url":"https://community.bistudio.com/wiki/setPiPViewDistance","revid":309141,"updated":"2022-05-03T11:52:25Z","groups":["System"],"status":"ok","games":{"arma3":"2.08"},"since":"arma3 2.08","arma3_since":"2.08","locality":{"effect":"local"},"description":"Set the PiP (Picture-in-Picture) view distance. This has no impact if PiP is disabled (see isPiPEnabled).","syntaxes":[{"syntax":"setPiPViewDistance distance","params":[{"name":"distance","type":"Number","description":"distance in meters, minimum value is 100, maximum is current view distance","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"distance"}}],"examples":[{"code":["setPiPViewDistance 100;"]},{"code":["setPiPViewDistance viewDistance;"]},{"code":["setPiPViewDistance getObjectViewDistance;"]}],"see_also":["getPiPViewDistance","setViewDistance","setObjectViewDistance","viewDistance","getObjectViewDistance"]},{"name":"setPitch","title":"setPitch","type":"command","url":"https://community.bistudio.com/wiki/setPitch","revid":319600,"updated":"2022-05-13T09:24:33Z","groups":["Unit Identity","Sounds"],"status":"ok","games":{"arma3":"1.02"},"since":"arma3 1.02","arma3_since":"1.02","locality":{"argument":"global","effect":"local"},"description":"Sets the pitch of a persons voice.","syntaxes":[{"syntax":"person setPitch pitch","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"pitch","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"pitch"}}],"examples":[{"code":["unit1 setPitch 0.5;"]}],"see_also":["pitch","setIdentity"]},{"name":"setPlateNumber","title":"setPlateNumber","type":"command","url":"https://community.bistudio.com/wiki/setPlateNumber","revid":353037,"updated":"2024-03-12T11:54:25Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.82"},"since":"arma3 1.82","arma3_since":"1.82","locality":{"argument":"local","effect":"global"},"description":"Change the license plates on any vehicle which has plates configured. Max 15 characters are allowed!","syntaxes":[{"syntax":"vehicle setPlateNumber string","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"string","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"string"}}],"examples":[{"code":["vehicle player setPlateNumber \"K2000\";"]},{"text":"Reset plate to the world's randomised template:\n\n```sqf\nprivate _return = \"\";\nprivate _cfg = (configFile >> \"CfgWorlds\" >> worldName);\n\n{\n    _return = _return + (call {\n        if (_x == \"$\") exitWith {\n            selectRandom (getText (_cfg >> \"plateLetters\") splitString \"\")\n        };\n        if (_x == \"#\") exitWith {\n            selectRandom [\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"]\n        };\n        _x\n    });\n} forEach (getText (_cfg >> \"plateFormat\") splitString \"\");\n\n_car setPlateNumber _return;\n```","code":["private _return = \"\";\nprivate _cfg = (configFile >> \"CfgWorlds\" >> worldName);\n\n{\n\t_return = _return + (call {\n\t\tif (_x == \"$\") exitWith {\n\t\t\tselectRandom (getText (_cfg >> \"plateLetters\") splitString \"\")\n\t\t};\n\t\tif (_x == \"#\") exitWith {\n\t\t\tselectRandom [\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"]\n\t\t};\n\t\t_x\n\t});\n} forEach (getText (_cfg >> \"plateFormat\") splitString \"\");\n\n_car setPlateNumber _return;"]}],"see_also":["getPlateNumber"],"notes":[{"user":"Demellion","date":"2018-04-19T05:34:00Z","text":"**NOTICE**: If this command is performed where the argument is remote, the plate will change and getPlateNumber will also return the new value, until vehicle owner sync it back to original in ~10 seconds after."}]},{"name":"setPlayable","title":"setPlayable","type":"command","url":"https://community.bistudio.com/wiki/setPlayable","revid":341452,"updated":"2023-05-30T10:27:23Z","groups":["Broken Commands","Multiplayer"],"status":"broken","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Create a multiplayer role for the unit. The roles created this way are used for Join In Progress and Team Switch.","syntaxes":[{"syntax":"setPlayable unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["setPlayable _aPerson;"]}],"problems":"> [!WARNING]\n> This command does not work as intended and currently does nothing in Arma 3.","see_also":["addSwitchableUnit"],"notes":[{"user":"Lou Montana","date":"2009-12-19T22:48:00Z","text":"If you want to add a TeamSwitchable unit (at least in Arma 2), better use addSwitchableUnit."}]},{"name":"setPlayerRespawnTime","title":"setPlayerRespawnTime","type":"command","url":"https://community.bistudio.com/wiki/setPlayerRespawnTime","revid":378018,"updated":"2026-01-22T12:47:44Z","groups":["Multiplayer"],"status":"ok","games":{"arma2oa":"1.57","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.57","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets the time interval (in seconds) that the player must wait before respawn, for the next respawn only.\nIt resets to mission default on mission start.\nIn Single Player or when respawn type is GROUP or SIDE in Multiplayer, setting player respawn time has no effect, and playerRespawnTime will always return -1.","syntaxes":[{"syntax":"setPlayerRespawnTime interval","params":[{"name":"interval","type":"Number","description":"respawn time in seconds","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"interval"}}],"examples":[{"code":["setPlayerRespawnTime 5; // next respawn (and only this one) will happen 5s after death"]},{"text":"Set the respawn duration through variable:\n\n```sqf\nplayer addEventHandler [\"Killed\", {\n    setPlayerRespawnTime (player getVariable [\"TAG_RespawnDelay\", 10]);\n}];\n```\n\nSomewhere else, e.g on objective completion:\n\n```sqf\nplayer setVariable [\"TAG_RespawnDelay\", 5];\n```\n\nor if that player is on another machine:\n\n```sqf\nwaitUntil { not alive _target };\n_thatPlayer setVariable [\"TAG_RespawnDelay\", 5, true];\n```","code":["player addEventHandler [\"Killed\", {\n\tsetPlayerRespawnTime (player getVariable [\"TAG_RespawnDelay\", 10]);\n}];","player setVariable [\"TAG_RespawnDelay\", 5];","waitUntil { not alive _target };\n_thatPlayer setVariable [\"TAG_RespawnDelay\", 5, true];"]},{"text":"Increase respawn duration every death:\n\n```sqf\nplayer addEventHandler [\"Killed\", {\n    private _respawnTime = player getVariable [\"TAG_RespawnDelay\", 8];\n    setPlayerRespawnTime _respawnTime;\n    player setVariable [\"TAG_RespawnDelay\", _respawnTime + 1]; // don't die too many times\n}];\n```","code":["player addEventHandler [\"Killed\", {\n\tprivate _respawnTime = player getVariable [\"TAG_RespawnDelay\", 8];\n\tsetPlayerRespawnTime _respawnTime;\n\tplayer setVariable [\"TAG_RespawnDelay\", _respawnTime + 1]; // don't die too many times\n}];"]}],"see_also":["playerRespawnTime","respawnVehicle"]},{"name":"setPlayerVoNVolume","title":"setPlayerVoNVolume","type":"command","url":"https://community.bistudio.com/wiki/setPlayerVoNVolume","revid":309265,"updated":"2022-05-04T11:09:04Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","locality":{"argument":"global","effect":"local"},"description":"Sets provided player's Voice over Network (VoN) volume.","syntaxes":[{"syntax":"unit setPlayerVoNVolume volume","params":[{"name":"unit","type":"Object","description":"the other player's unit","type_expr":"Object"},{"name":"volume","type":"Number","description":"the wanted volume","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"volume"}}],"examples":[{"code":["_loudPlayer setPlayerVoNVolume 0.5;"]}],"see_also":["getPlayerVoNVolume","fadeSound","fadeRadio","fadeMusic"]},{"name":"setPos","title":"setPos","type":"command","url":"https://community.bistudio.com/wiki/setPos","revid":377794,"updated":"2026-01-03T03:50:30Z","groups":["Positions"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Sets object position to format PositionAGLS (over surface). The Z value is used to calculate the nearest surface below the provided position. If the surface is close, it uses the Z position of the surface. Otherwise, Z value becomes the offset from that surface.\n\n> [!IMPORTANT]\n> It is recommended to **avoid** this command when placing objects above other objects, due to the unpredictable behavior described above.","syntaxes":[{"syntax":"object setPos pos","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"pos","type":"PositionAGL or Position2D","description":"if Position2D, Z will be set to 0","type_expr":"PositionAGL | Position2D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"pos"}}],"examples":[{"code":["player setPos [getPos player select 0, getPos player select 1, (getPos player select 2) +10];\n\n// the same as above using set (OFP:R v1.75)\n_pos = getPos player;\n_pos set [2, _pos select 2 + 10];\nplayer setPos _pos;\n\n// the same as above using modelToWorld (ArmA v1.00)\nplayer setPos (player modelToWorld [0,0,10]);\n\n// the same as above using vectorAdd (Arma 3 v1.22)\nplayer setPos (getPos player vectorAdd [0,0,10]);"]},{"code":["_obj setPos [getPos _obj select 0, getPos _obj select 1, -5];"]},{"code":["player setPos (getPos _obj);"]}],"multiplayer":"> [!NOTE]\n> **Armed Assault:** ArmA 1.00 to 1.06: this command has local effect, but some simulation types do synchronise their changes over the network whilst others do not.\n> So far, the only known simulation type that doesn't synchronise its position over the net is \"static\" (`simulation=\"house\"`).","see_also":["setPosASL","getPos","setVehiclePosition","Position"],"notes":[{"user":"Hduregger","date":"2011-02-06T20:20:00Z","text":"Calling setPos on an object can cause the object's orientation to change. This depends on the terrain and/or objects below the object. This was tested by calling setPos on a test object with the position of a helicopter (modelToWorld with some offset). When flying over land the orientation of the test object would rapidly change depending on the slope of the ground and objects beneath it.\nComment applicable to Ver **1.96** and **earlier**:\n\n```sqf\nobj1 setPos [x,y,z]\n```\n\nWill place most objects z metres above ground level (negative numbers for underground). But if obj1 is a trigger then it will be placed z metres above sea level. This can be very useful if you want to check a unit's height above sea level but it can be a problem if you want to move a trigger to create an explosion or a sound. To move a trigger to a location at ground level:\n\n```sqf\ntriggername setPos [x,y,0];\ntriggername setPos [x,y,abs(getPos triggername select 2)];\n```\n\nNote for ArmA: Using setPos for a trigger will work in exactly the same way that setPos works for other objects - namely that setPos [x,y,z] will place the trigger z metres above ground level.\nsetPos for static objects like an ammo crate do not work in MP."},{"user":"Tankbuster","date":"2012-11-23T13:06:00Z","text":"You can use getPos and setPos on triggers."}]},{"name":"setPosASL","title":"setPosASL","type":"command","url":"https://community.bistudio.com/wiki/setPosASL","revid":377438,"updated":"2026-01-02T06:46:46Z","groups":["Positions"],"status":"ok","games":{"ofpe":"1.00","ofp":"1.99","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Sets the object position above sea level. Given position must be in PositionASL format.","syntaxes":[{"syntax":"object setPosASL pos","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"pos","type":"PositionASL","type_expr":"PositionASL"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"pos"}}],"examples":[{"code":["player setPosASL [getPosASL player select 0, (getPosASL player select 1) + 10, getPosASL player select 2];"]},{"code":["_position = getPosASL _object;\n_position set [2, 10]; // 10m above sea level\n_object setPosASL _position;"]}],"see_also":["ASLToATL","ATLToASL","getPos","getPosASL","getPosATL","position","setPos","setPosASL2","setPosATL","getTerrainHeightASL","setPosWorld","setVehiclePosition"],"notes":[{"user":"Hypoxic125","date":"2023-02-26T03:59:06Z","text":"As of Verson 2.10, if you use setPosX commands on a remote unit within a vehicle, the unit will remain in the vehicle. In order to avoid this, remoteExec the command to the remote client.\n\n```sqf\nif !(isNull objectParent _unit) then {\n    [_unit, [0,0,0]] remoteExec [\"setPosASL\", _unit];\n};\n```"}]},{"name":"setPosASL2","title":"setPosASL2","type":"command","url":"https://community.bistudio.com/wiki/setPosASL2","revid":378100,"updated":"2026-02-13T10:46:49Z","groups":["Broken Commands","Positions"],"status":"broken","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets the object position. The pos array uses the PositionASL format.\nThe version of the command does not offset based on object center.\n\n> [!WARNING]\n> This command was deactivated and has no effect. Use setPosWorld instead.","syntaxes":[{"syntax":"obj setPosASL2 pos","params":[{"name":"obj","type":"Object","type_expr":"Object"},{"name":"pos","type":"PositionASL","type_expr":"PositionASL"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"obj"},"right":{"text":"pos"}}],"examples":[{"code":["private _aslPos = getPosASL player;\n_aslPos set [1, _aslPos select 1 + 10];\nplayer setPosASL2 _aslPos;"]}],"see_also":["setPosWorld","getPosWorld","setPosASL","getPosASL"],"notes":[{"user":"Killzone_Kid","date":"2013-08-21T20:07:00Z","text":"This command appears to do nothing in both Arma 2 and Arma 3."}]},{"name":"setPosASLW","title":"setPosASLW","type":"command","url":"https://community.bistudio.com/wiki/setPosASLW","revid":377592,"updated":"2026-01-02T06:59:02Z","groups":["Positions"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Sets the object position above sea surface. The pos array uses the PositionASLW format.","syntaxes":[{"syntax":"obj setPosASLW pos","params":[{"name":"obj","type":"Object","type_expr":"Object"},{"name":"pos","type":"PositionASLW","type_expr":"PositionASLW"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"obj"},"right":{"text":"pos"}}],"examples":[{"code":["_diver setPosASLW [(position _diver) select 0, (position _diver) select 1, -10];"]}],"see_also":["getPosASLW","setPosASL","setPosATL","setPos","setPosWorld"]},{"name":"setPosATL","title":"setPosATL","type":"command","url":"https://community.bistudio.com/wiki/setPosATL","revid":377533,"updated":"2026-01-02T06:53:18Z","groups":["Positions"],"status":"ok","games":{"arma2":"1.03","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.03","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Sets the position of an object relative to the terrain.","syntaxes":[{"syntax":"object setPosATL pos","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"pos","type":"PositionATL","type_expr":"PositionATL"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"pos"}}],"examples":[{"code":["player setPosATL [getPosATL player select 0, (getPosATL player select 1) - 10, getPosATL player select 2];"]}],"see_also":["getPosATL","getPos","getPosASL","setPos","setPosASL"],"notes":[{"user":"DreadedEntity","date":"2014-11-11T20:39:00Z","text":"If you plan on creating bases through script, setPosATL and getPosATL will be your friends. Other commands like getPos or getPosASL **will** return the position relative to any objects that are underneath / to the terrain.\nI wrote a base building helper script and through multiple tests, I have found that getPosATL is the absolute best way to get position for objects that are over land."},{"user":"Hypoxic125","date":"2022-09-30T04:03:03Z","text":"As of **Verson 2.10**, if you use **setPosX** commands on a remote unit within a vehicle, the unit will remain in the vehicle. In order to avoid this, **remoteExec** the command to the remote client.\n\n```sqf\nif !(isNull objectParent _unit) then {\n    [_unit, [0,0,0]] remoteExec [\"setPosATL\", _unit];\n};\n```"}]},{"name":"setPosition","title":"setPosition","type":"command","url":"https://community.bistudio.com/wiki/setPosition","revid":377520,"updated":"2026-01-02T06:52:07Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Sets the position of a location.","syntaxes":[{"syntax":"location setPosition pos","params":[{"name":"location","type":"Location","type_expr":"Location"},{"name":"pos","type":"Position","type_expr":"Position"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"location"},"right":{"text":"pos"}}],"examples":[{"code":["myLocation setPosition getPosATL player;"]}],"see_also":["locationPosition"]},{"name":"setPosWorld","title":"setPosWorld","type":"command","url":"https://community.bistudio.com/wiki/setPosWorld","revid":377460,"updated":"2026-01-02T06:47:29Z","groups":["Positions"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global","effect":"global"},"description":"Sets position of an object based on the model's centre position (see getPosWorld).","syntaxes":[{"syntax":"object setPosWorld position","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"position","type":"PositionASL","type_expr":"PositionASL"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"position"}}],"examples":[{"code":["_obj setPosWorld getPosWorld _obj;"]}],"see_also":["getPosWorld","setPos","setPosATL","setPosASL","setPosASLW","setMarkerPos","setVehiclePosition"]},{"name":"setPylonLoadout","title":"setPylonLoadout","type":"command","url":"https://community.bistudio.com/wiki/setPylonLoadout","revid":378820,"updated":"2026-07-01T10:02:12Z","groups":["Vehicle Loadouts"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"local","effect":"local"},"description":"Adds/overrides loadout to a vehicle pylon. `TransportPylonsComponent` in vehicle config and `pylonWeapon` in the magazine config are required to run.\n\n> [!NOTE]\n> This command also adds the corresponding weapon if the vehicle does not have one, but will not remove one that is no longer used.","syntaxes":[{"syntax":"vehicle setPylonLoadout [pylon, magazine, forced, turret]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"pylon","type":"Number or String","description":"pylon index (index starts from 1) or pylon name (see Example 1)","type_expr":"Number | String"},{"name":"magazine","type":"String","description":"magazine name","type_expr":"String"},{"name":"forced","type":"Boolean","optional":true,"default":"false","description":"true to force an incompatible magazine","type_expr":"Boolean","text":"forced: Boolean - (Optional, default false) true to force an incompatible magazine"},{"name":"turret","type":"Turret Path","optional":true,"default":"`[]`","description":"turret path","type_expr":"Turret Path","text":"turret: Turret Path - (Optional, default `[]`) turret path"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[pylon, magazine, forced, turret]"}}],"examples":[{"code":["vehicle player setPylonLoadout [\"pylon1\", \"\"];"]},{"text":"Make all of your pylon weapons Twin Cannon 30 mm:\n\n```sqf\nprivate _vehicle = vehicle player;\nprivate _pylonsIndices = getAllPylonsInfo _vehicle apply { _x select 0 };\n{\n    _vehicle setPylonLoadout [_x, \"PylonWeapon_300Rnd_20mm_shells\", true];\n} forEach _pylonsIndices;\n```","code":["private _vehicle = vehicle player;\nprivate _pylonsIndices = getAllPylonsInfo _vehicle apply { _x select 0 };\n{\n\t_vehicle setPylonLoadout [_x, \"PylonWeapon_300Rnd_20mm_shells\", true];\n} forEach _pylonsIndices;"]},{"text":"Showcase all possible magazines:\n\n```sqf\n0 spawn {\n    private _allPylonMagazines = \"getText (_x >> 'pylonWeapon') != ''\" configClasses (configFile >> \"CfgMagazines\");\n    private _vehicle = vehicle player;\n    private _pylonsIndices = getAllPylonsInfo _vehicle apply { _x select 0 };\n\n    {\n        private _configName = configName _x;\n        {\n            _vehicle setPylonLoadout [_x, _configName, true];\n        } forEach _pylonsIndices;\n\n        hint _configName;\n        sleep 1.5;\n    } forEach _allPylonMagazines;\n};\n```","code":["0 spawn {\n\tprivate _allPylonMagazines = \"getText (_x >> 'pylonWeapon') != ''\" configClasses (configFile >> \"CfgMagazines\");\n\tprivate _vehicle = vehicle player;\n\tprivate _pylonsIndices = getAllPylonsInfo _vehicle apply { _x select 0 };\n\n\t{\n\t\tprivate _configName = configName _x;\n\t\t{\n\t\t\t_vehicle setPylonLoadout [_x, _configName, true];\n\t\t} forEach _pylonsIndices;\n\n\t\thint _configName;\n\t\tsleep 1.5;\n\t} forEach _allPylonMagazines;\n};"]},{"text":"MP compatible usage:\n\n```sqf\n[myPlane, [1, \"PylonWeapon_300Rnd_20mm_shells\", true]] remoteExec [\"setPylonLoadout\", myPlane];\n```","code":["[myPlane, [1, \"PylonWeapon_300Rnd_20mm_shells\", true]] remoteExec [\"setPylonLoadout\", myPlane];"]}],"multiplayer":"> [!IMPORTANT]\n> This command should run locally to the vehicle itself or it will cause desync issue! (especially upon the locality change, e.g getting in the vehicle).\n> See Example 4 for an MP-compatible usage.","see_also":["Arma 3: Vehicle Loadouts","getCompatiblePylonMagazines","getPylonMagazines","setAmmoOnPylon","ammoOnPylon","animatePylon","animateBay","setPylonsPriority"],"notes":[{"user":"POLPOX","date":"2020-04-30T13:01:00Z","text":"**Before Arma 3 v2.02:** *turret* must be `[]` if you wanted to equip the magazine to the pilot. `[-1]` returns false and fails unlike other turret-related commands."}]},{"name":"setPylonsPriority","title":"setPylonsPriority","type":"command","url":"https://community.bistudio.com/wiki/setPylonsPriority","revid":310928,"updated":"2022-05-07T20:51:11Z","groups":["Vehicle Loadouts"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Overrides default pylons priorities.","syntaxes":[{"syntax":"vehicle setPylonsPriority priorities","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"priorities","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"priorities"}}],"examples":[{"code":["(vehicle player) setPylonsPriority [0,1,2,3,4,5,5,4,3,2,1,0];"]}],"see_also":["Arma 3: Vehicle Loadouts","getCompatiblePylonMagazines","getPylonMagazines","setAmmoOnPylon","ammoOnPylon","animatePylon","animateBay","setPylonLoadout"]},{"name":"setRadioMsg","title":"setRadioMsg","type":"command","url":"https://community.bistudio.com/wiki/setRadioMsg","revid":378813,"updated":"2026-06-30T23:28:57Z","groups":["Triggers","Interaction"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets radio trigger menu title text (0 -> 0 -> map radio). Use \"NULL\" to disable radio slot. Use \"\" to restore default title.\n\n> [!NOTE]\n> The same effect could be achieved by using setTriggerText (see Example 2)","syntaxes":[{"syntax":"index setRadioMsg text","params":[{"name":"index","type":"Number","description":"from 1 to 10\n\n- 1 - Alpha (key 1)\n- 2 - Bravo (key 2)\n- 3 - Charlie (key 3)\n- 4 - Delta (key 4)\n- 5 - Echo (key 5)\n- 6 - Foxtrot (key 6)\n- 7 - Golf (key 7)\n- 8 - Hotel (key 8)\n- 9 - India (key 9)\n- 10 - Juliet (key 0)","type_expr":"Number"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"index"},"right":{"text":"text"}}],"examples":[{"code":["1 setRadioMsg \"Click meeeeeeeeee\"; //changes title of radio Alpha"]},{"code":["_radioTrigger setTriggerText \"Click meeeeeeeeee\"; //changes title of whatever radio the trigger was set to"]}],"see_also":["createTrigger","setTriggerActivation","setTriggerText","showCommandingMenu"]},{"name":"setRain","title":"setRain","type":"command","url":"https://community.bistudio.com/wiki/setRain","revid":377884,"updated":"2026-01-04T16:27:04Z","groups":["Environment"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"effect":"global","server_exec":true},"description":"Sets rain density smoothly over the given transition time. A transition time of zero means an immediate change.\nA rain density of zero is no rain, one is maximum rain. Rain is not possible when overcast is less than 0.7.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 this command is multiplayer-synchronised:\n>\n> - if executed on the server, the changes will propagate globally.\n> - if executed on a client, the effect is local, temporary and will soon change to the server setting.\n>\n> Minimum overcast needed for rain in Arma 3 is **0.5**.\n\n> [!IMPORTANT]\n> Alternative syntaxes (Syntax 2 and Syntax 3):\n>\n> - set rain particle params. Rain particles params are client-side params and are ignored on dedicated server. Use helper function BIS_fnc_setRain if sync is needed in Multiplayer\n> - have a **local** Local effect effect","syntaxes":[{"syntax":"time setRain rain","params":[{"name":"time","type":"Number","description":"transition time in seconds to the new value","type_expr":"Number"},{"name":"rain","type":"Number in range 0..1","description":"new rain value","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"rain"}},{"syntax":"setRain rainParams","since":"arma3 2.08","effect":"local","params":[{"name":"rainParams","type":"Array of Anything","description":"custom `RainParticles` params - see rainParams. Use empty array [] to reset to default config values","type_expr":"Array<Anything>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"rainParams"}},{"syntax":"setRain config","since":"arma3 2.08","effect":"local","params":[{"name":"config","type":"Config","description":"config path to a custom class, which contains `RainParticles` class. Use configNull to reset to default config values","type_expr":"Config"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["60 setRain 1;"]},{"text":"Force no rain:\n\n```sqf\n0 setRain 0;\nforceWeatherChange;\n999999 setRain 0;\n```","code":["0 setRain 0;\nforceWeatherChange;\n999999 setRain 0;"]},{"text":"See also BIS_fnc_setRain since Arma 3 v2.10:\n\n```sqf\n0 setOvercast 1;\n0 setRain 1;\n0 setFog 0.1;        // snow affects visibility at distance\nsetHumidity 0.9;    // don't want to see dust clouds\nenableEnvironment [false, true];    // don't want to see snakes and butterflies either\nforceWeatherChange;\n[\n    \"a3\\data_f\\snowflake4_ca.paa\",    // rainDropTexture - 4 means it has 4 flakes in it. Other available textures: snowflake8_ca.paa, snowflake16_ca.paa\n    4,                // texDropCount - 4 because we are using texture with 4 flakes. Change to 8 or 16 in accordance with other textures used\n    0.01,            // minRainDensity\n    25,                // effectRadius\n    0.05,            // windCoef\n    2.5,            // dropSpeed\n    0.5,            // rndSpeed\n    0.5,            // rndDir\n    0.07,            // dropWidth\n    0.07,            // dropHeight\n    [1, 1, 1, 0.5],    // dropColor\n    0.0,            // lumSunFront\n    0.2,            // lumSunBack\n    0.5,            // refractCoef\n    0.5,            // refractSaturation\n    true,            // snow\n    false            // dropColorStrong\n]\ncall BIS_fnc_setRain;\n```","code":["0 setOvercast 1;\n0 setRain 1;\n0 setFog 0.1;\t\t// snow affects visibility at distance\nsetHumidity 0.9;\t// don't want to see dust clouds\nenableEnvironment [false, true];\t// don't want to see snakes and butterflies either\nforceWeatherChange;\n[\n\t\"a3\\data_f\\snowflake4_ca.paa\",\t// rainDropTexture - 4 means it has 4 flakes in it. Other available textures: snowflake8_ca.paa, snowflake16_ca.paa\n\t4,\t\t\t\t// texDropCount - 4 because we are using texture with 4 flakes. Change to 8 or 16 in accordance with other textures used\n\t0.01,\t\t\t// minRainDensity\n\t25,\t\t\t\t// effectRadius\n\t0.05,\t\t\t// windCoef\n\t2.5,\t\t\t// dropSpeed\n\t0.5,\t\t\t// rndSpeed\n\t0.5,\t\t\t// rndDir\n\t0.07,\t\t\t// dropWidth\n\t0.07,\t\t\t// dropHeight\n\t[1, 1, 1, 0.5],\t// dropColor\n\t0.0,\t\t\t// lumSunFront\n\t0.2,\t\t\t// lumSunBack\n\t0.5,\t\t\t// refractCoef\n\t0.5,\t\t\t// refractSaturation\n\ttrue,\t\t\t// snow\n\tfalse\t\t\t// dropColorStrong\n]\ncall BIS_fnc_setRain;"]}],"multiplayer":"Prior to Arma 3, each client and the server could have different rain values.","see_also":["rainParams","BIS_fnc_setRain","overcast","setOvercast","rain","nextWeatherChange","forceWeatherChange","setFog","setHumidity"],"notes":[{"user":"Zapat","date":"2015-12-15T14:31:00Z","text":"setTimeMultiplier does **not** affect transition time."},{"user":"Killzone_Kid","date":"2016-11-16T22:06:00Z","text":"Using Example 2 on dedicated server might need additional interference on JIP clients. The reason is that JIP has rain value > 0 slowly changing to 0. To force client to sync one can execute this on client:\n\n```sqf\nskipTime 1; skipTime -1;\n```"}]},{"name":"setRainbow","title":"setRainbow","type":"command","url":"https://community.bistudio.com/wiki/setRainbow","revid":379383,"updated":"2026-10-30T23:59:12Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Changes the rainbow value smoothly during the given time (in seconds). A time of zero means there will be an immediate change.","syntaxes":[{"syntax":"time setRainbow value","params":[{"name":"time","type":"Number","type_expr":"Number"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"value"}}],"examples":[{"code":["360 setRainbow 1;"]}],"see_also":["rainbow"],"notes":[{"user":"Benargee","date":"2015-04-24T00:32:00Z","text":"It should be known that this command does not create a rainbow in all conditions. As in real life, the rainbow can only appear after rainfall and opposite of the sun when it is low on the horizon."},{"user":"Sa-Matra","date":"2022-07-01T07:24:42Z","text":"This command seems to be completely local, no synchronization with other clients, no JIP, nothing, you have to do it all yourself."}]},{"name":"setRandomLip","title":"setRandomLip","type":"command","url":"https://community.bistudio.com/wiki/setRandomLip","revid":310244,"updated":"2022-05-05T13:11:05Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Enables/Disables random lip. When enabled, the unit continuously moves its lips as if it is talking.","syntaxes":[{"syntax":"unit setRandomLip bool","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"bool"}}],"examples":[{"code":["player setRandomLip true;"]}],"see_also":["say","setMimic","setFaceAnimation","setFace"]},{"name":"setRank","title":"setRank","type":"command","url":"https://community.bistudio.com/wiki/setRank","revid":340311,"updated":"2023-04-29T17:00:34Z","groups":["Unit Identity"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets rank of given unit.\n\n> [!NOTE]\n> **Arma 3:** Before Arma 3 v1.68 and in previous titles, this command was Global argument Local effect.","syntaxes":[{"syntax":"unitName setRank rank","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"rank","type":"String","description":"one of:\n\n- `\"PRIVATE\"`\n- `\"CORPORAL\"`\n- `\"SERGEANT\"`\n- `\"LIEUTENANT\"`\n- `\"CAPTAIN\"`\n- `\"MAJOR\"`\n- `\"COLONEL\"`","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"rank"}}],"examples":[{"code":["player setRank \"COLONEL\";"]}],"see_also":["rank","setUnitRank"],"notes":[{"user":"Wolfrug","date":"2009-03-26T19:24:00Z","text":"Changing a unit's rank using either setUnitRank or setRank will also REPLACE their current rating dependent on their new rank (colonels have a rating of 7500 etc).\nThat is to say REPLACE, not add to: the unit's old rating will disappear with the rank change."},{"user":"Waffle SS.","date":"2014-04-12T20:39:00Z","text":"Behavior when used on players in multiplayer seems unpredictable. (Arma 3 1.00)"}]},{"name":"setRectangular","title":"setRectangular","type":"command","url":"https://community.bistudio.com/wiki/setRectangular","revid":319790,"updated":"2022-05-13T09:24:53Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Set the shape of a location to be either rectangular or elliptical. Locations default shape is elliptical.","syntaxes":[{"syntax":"location setRectangular set","params":[{"name":"location","type":"Location","type_expr":"Location"},{"name":"set","type":"Boolean","description":"true set rectangular, false set elliptical","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"location"},"right":{"text":"set"}}],"examples":[{"code":["myLocation setRectangular true;"]}],"see_also":["setText","nearestLocation","nearestLocations","locationPosition","nearestLocationWithDubbing","createLocation","rectangular"]},{"name":"setRepairCargo","title":"setRepairCargo","type":"command","url":"https://community.bistudio.com/wiki/setRepairCargo","revid":379384,"updated":"2026-10-30T23:59:20Z","groups":["Vehicle Inventory"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Set amount of repair resources in cargo space of repair vehicle.\nAmount 1 is full cargo.","syntaxes":[{"syntax":"vehicleName setRepairCargo amount","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"},{"name":"amount","type":"Number in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"amount"}}],"examples":[{"code":["_repairTruck1 setRepairCargo 0;"]}],"see_also":["getRepairCargo","setAmmoCargo","setFuelCargo"],"notes":[{"user":"Waffle SS.","date":"2015-07-10T19:36:00Z","text":"(Arma 3 1.44) **setRepairCargo** will have no effect if the vehicle doesn't support getRepairCargo."}]},{"name":"setRotorBrakeRTD","title":"setRotorBrakeRTD","type":"command","url":"https://community.bistudio.com/wiki/setRotorBrakeRTD","revid":363578,"updated":"2024-04-07T14:41:13Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Toggles a helicopter's rotor brake.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"helicopterRTD setRotorBrakeRTD enable","params":[{"name":"helicopterRTD","type":"Object","description":"helicopter","type_expr":"Object","text":"helicopterRTD : Object - helicopter"},{"name":"enable","type":"Number","description":"can be:\n\n- 0: off\n- 1: on","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"helicopterRTD"},"right":{"text":"enable"}}],"examples":[{"code":["myHelicopterRTD setRotorBrakeRTD 1;"]}],"see_also":["getRotorBrakeRTD"]},{"name":"setShadowDistance","title":"setShadowDistance","type":"command","url":"https://community.bistudio.com/wiki/setShadowDistance","revid":321940,"updated":"2022-05-22T12:55:27Z","groups":["System","Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets the shadows rendering distance.","syntaxes":[{"syntax":"setShadowDistance value","params":[{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"value"}}],"examples":[{"code":["setShadowDistance 200;"]}],"see_also":["getShadowDistance","isPipEnabled"]},{"name":"setShotParents","title":"setShotParents","type":"command","url":"https://community.bistudio.com/wiki/setShotParents","revid":349182,"updated":"2023-11-08T14:50:39Z","groups":["Weapons"],"status":"ok","games":{"arma3":"1.66"},"since":"arma3 1.66","arma3_since":"1.66","locality":{"argument":"global","effect":"global","server_exec":true},"description":"Sets vehicle and instigator pair for the given projectile.","syntaxes":[{"syntax":"projectile setShotParents [vehicle, instigator]","params":[{"name":"projectile","type":"Object","description":"the actual projectile shot","type_expr":"Object"},{"name":"vehicle","type":"Object","description":"vehicle shooting projectile (appears as the 'killer' in \"Killed\" EH)","type_expr":"Object"},{"name":"instigator","type":"Object","description":"person pulling the trigger (appears as the 'instigator' in \"Killed\" EH)","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"projectile"},"right":{"text":"[vehicle, instigator]"}}],"examples":[{"code":["myProjectile setShotParents [vehicle bob, bob];"]},{"code":["tank addEventHandler [\"Fired\", {_this select 6 setShotParents [tank, commander tank]}];"]}],"see_also":["getShotParents"]},{"name":"setSide","title":"setSide","type":"command","url":"https://community.bistudio.com/wiki/setSide","revid":341632,"updated":"2023-06-12T19:02:54Z","groups":["Sides","Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Sets a location's side. The default side is Unknown.\n\n> [!IMPORTANT]\n> To change a *unit*'s side, see Notes.","syntaxes":[{"syntax":"location setSide side","params":[{"name":"location","type":"Location","type_expr":"Location"},{"name":"side","type":"Side","type_expr":"Side"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"location"},"right":{"text":"side"}}],"examples":[{"code":["_myLocation setSide resistance;"]}],"see_also":["Side","side","west","east","resistance","civilian","sideUnknown","sideFriendly","sideEnemy","playerSide","Side Relations","independent"],"notes":[{"user":"Ondřejkuzel","date":"2013-12-03T16:00:00Z","text":"For units, vehicles you can use: `_unitsArray joinSilent createGroup _side`, e.g. in init: `[this] joinSilent createGroup EAST;` *described in the note below*"},{"user":"Jtgibson","date":"2009-08-06T19:05:00Z","text":"This is a frequent question on OFPEC, but produced here because it was difficult to find an answer to. **setSide** does not work for men, vehicles, etc.: it is intended for locations (*i.e.*, territory). If you want to switch a unit's (*e.g.*, the player's) side in the middle of a battle, make the unit **joinSilent** a group on the given side instead. If you want the unit to become the group leader after joining, use **selectLeader**. I have not tested the idea of spawning a temporary unit of that side, assigning the player to that unit, setting the player as the leader, then deleting the original unit, but I don't see why it wouldn't work. (It begs the question why we don't have a setSide object function, though.)"}]},{"name":"setSimpleTaskAlwaysVisible","title":"setSimpleTaskAlwaysVisible","type":"command","url":"https://community.bistudio.com/wiki/setSimpleTaskAlwaysVisible","revid":304127,"updated":"2022-01-20T16:59:47Z","groups":["Briefing"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","locality":{"effect":"local"},"description":"Sets task's visibility.","syntaxes":[{"syntax":"taskID setSimpleTaskAlwaysVisible state","params":[{"name":"taskID","type":"Task","type_expr":"Task"},{"name":"state","type":"Boolean","description":"true for always visible, false for fade out","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"taskID"},"right":{"text":"state"}}],"examples":[{"text":"currentTask player setSimpleTaskAlwaysVisible true;"}],"see_also":["taskAlwaysVisible","createSimpleTask"]},{"name":"setSimpleTaskCustomData","title":"setSimpleTaskCustomData","type":"command","url":"https://community.bistudio.com/wiki/setSimpleTaskCustomData","revid":351289,"updated":"2023-11-27T03:11:48Z","groups":["Briefing"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Set custom data for the task. Tooltip will be drawn in task list on the right side. Description will be drawn in task description panel on the bottom.","syntaxes":[{"syntax":"task setSimpleTaskCustomData [iconPath, tooltip, description]","params":[{"name":"task","type":"Task","description":"task the custom data are being added to","type_expr":"Task"},{"name":"iconPath","type":"String","description":"icon path","type_expr":"String"},{"name":"tooltip","type":"String","description":"text displayed next to the icon; max. 3 charactersc","type_expr":"String"},{"name":"description","type":"String","description":"text displayed on the task description panel; html format","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"task"},"right":{"text":"[iconPath, tooltip, description]"}}],"examples":[{"code":["_task setSimpleTaskCustomData [\"\\A3\\Ui_f\\data\\IGUI\\Cfg\\simpleTasks\\letters\\h_ca.paa\", \"This is the tooltip\", \"This is the description\"];"]}],"see_also":["taskCustomData","setSimpleTaskType","taskType","Arma 3: Task Framework"]},{"name":"setSimpleTaskDescription","title":"setSimpleTaskDescription","type":"command","url":"https://community.bistudio.com/wiki/setSimpleTaskDescription","revid":330122,"updated":"2022-08-21T19:56:15Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Attach descriptions to the simple task.","syntaxes":[{"syntax":"task setSimpleTaskDescription [description, descriptionShort, descriptionHUD]","params":[{"name":"task","type":"Task","type_expr":"Task"},{"name":"description","type":"String","description":"task description","type_expr":"String"},{"name":"descriptionShort","type":"String","description":"task title","type_expr":"String"},{"name":"descriptionHUD","type":"String","description":"task waypoint description","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"task"},"right":{"text":"[description, descriptionShort, descriptionHUD]"}}],"examples":[{"code":["myTask setSimpleTaskDescription [\"Today you have to kill Spongebob\", \"Kill Spongebob\", \"There he is!\"];"]}],"see_also":["taskDescription","Tasks","createSimpleTask","removeSimpleTask","setSimpleTaskDestination","setTaskState","setTaskResult","taskState"]},{"name":"setSimpleTaskDestination","title":"setSimpleTaskDestination","type":"command","url":"https://community.bistudio.com/wiki/setSimpleTaskDestination","revid":377515,"updated":"2026-01-02T06:50:22Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Attach a destination to the simple task.\nOverrides setSimpleTaskTarget","syntaxes":[{"syntax":"task setSimpleTaskDestination pos","params":[{"name":"task","type":"Task","type_expr":"Task"},{"name":"pos","type":"Position","type_expr":"Position"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"task"},"right":{"text":"pos"}}],"examples":[{"code":["_tskGoHere setSimpleTaskDestination (getMarkerPos \"obj1\");"]}],"see_also":["Tasks","createSimpleTask","removeSimpleTask","setSimpleTaskDescription","setTaskState","setTaskResult","taskState","taskDestination","cancelSimpleTaskDestination"]},{"name":"setSimpleTaskTarget","title":"setSimpleTaskTarget","type":"command","url":"https://community.bistudio.com/wiki/setSimpleTaskTarget","revid":376222,"updated":"2025-09-20T13:11:55Z","groups":["Briefing"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","description":"Attach a target to the simple task.\nOverrides setSimpleTaskDestination.","syntaxes":[{"syntax":"task setSimpleTaskTarget [target, precisePosition]","params":[{"name":"task","type":"Task","type_expr":"Task"},{"name":"target","type":"Object","type_expr":"Object"},{"name":"precisePosition","type":"Boolean","description":"use exact position of the target for map marker / HUD indicator instead of the position known to the task's owner (depending on the unit's knowledge of the target)","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"task"},"right":{"text":"[target, precisePosition]"}}],"examples":[{"code":["_task setSimpleTaskTarget [targetVehicle, true];"]}],"see_also":["briefing","createSimpleTask","setSimpleTaskDestination"]},{"name":"setSimpleTaskType","title":"setSimpleTaskType","type":"command","url":"https://community.bistudio.com/wiki/setSimpleTaskType","revid":349265,"updated":"2023-11-08T14:51:08Z","groups":["Briefing"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Attach type to the simple task. See Default Task Types.","syntaxes":[{"syntax":"task setSimpleTaskType taskType","params":[{"name":"task","type":"Task","type_expr":"Task"},{"name":"taskType","type":"String","description":"type of task","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"task"},"right":{"text":"taskType"}}],"examples":[{"code":["(currentTask player) setSimpleTaskType \"attack\";"]}],"see_also":["taskType","currentTask","setSimpleTaskCustomData","taskCustomData","Arma 3 Tasks Overhaul"]},{"name":"setSimulWeatherLayers","title":"setSimulWeatherLayers","type":"command","url":"https://community.bistudio.com/wiki/setSimulWeatherLayers","revid":370511,"updated":"2024-12-30T12:00:46Z","groups":["Environment"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Sets number of simul weather layers, affects quality of simul weather clouds.","syntaxes":[{"syntax":"setSimulWeatherLayers layers","params":[{"name":"layers","type":"Number","description":"cloud layers. -1 to reset to defaults (since 2.20), 0 to disable simul weather.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"layers"}}],"examples":[{"code":["setSimulWeatherLayers 0; // Very flat clouds"]}],"problems":"Prior to Arma 3 v2.20 the effect of this command seems to be persistent across the game instance, e.g. restarting a mission will not reset it.","see_also":["simulCloudDensity","simulCloudOcclusion","simulInClouds"],"notes":[{"user":"Sa-Matra","date":"2022-08-01T12:09:41Z","text":"You can revert clouds back to volumetric ones by executing this script:\n\n```sqf\nprivate _display_menu = findDisplay 46 createDisplay \"RscDisplayInterrupt\"; // ESC menu\nctrlActivate (_display_menu displayCtrl 301); // Pressing \"Video\" button\nctrlActivate (findDisplay 5 displayCtrl 2); // Pressing \"Cancel\" in Video menu\n_display_menu closeDisplay 2; // Closing ESC menu\n```\n\nPressing \"Cancel\" button in Video menu makes engine re-init the clouds, reverting results of this command. Make sure its in unscheduled environment, otherwise players might see flashing menu and you'll have a serialization error message."}]},{"name":"setSize","title":"setSize","type":"command","url":"https://community.bistudio.com/wiki/setSize","revid":377130,"updated":"2026-01-01T10:24:37Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Sets the size (radius) of a location.\n\nThe width is 2 * x, the height is 2 * y.","syntaxes":[{"syntax":"location setSize [x,y]","params":[{"name":"location","type":"Location","type_expr":"Location"},{"name":"x","type":"Number","type_expr":"Number"},{"name":"y","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"location"},"right":{"text":"[x,y]"}}],"examples":[{"code":["myLocation setSize [10,30];"]}],"see_also":["size"]},{"name":"setSkill","title":"setSkill","type":"command","url":"https://community.bistudio.com/wiki/setSkill","revid":364244,"updated":"2024-05-06T09:38:17Z","groups":["AI Behaviour"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets the skill level of given unit. The value of a sub-skill is interpolated into a range defined in CfgAISkill.","syntaxes":[{"syntax":"unit setSkill skill","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"skill","type":"Number","description":"general skill in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"skill"}},{"syntax":"unit setSkill [skillName, value]","since":"arma1 1.00","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"skillName","type":"String","description":"available sub-skills are:\n\n- `\"general\"`\n- `\"courage\"`\n- `\"aimingAccuracy\"`\n- `\"aimingShake\"`\n- `\"aimingSpeed\"`\n- `\"commanding\"`\n- `\"endurance\"`\n- `\"spotDistance\"`\n- `\"spotTime\"`\n- `\"reloadSpeed\"`","type_expr":"String"},{"name":"value","type":"Number","description":"value in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[skillName, value]"}}],"examples":[{"code":["_hero setSkill 1;"]},{"code":["_finalBoss setSkill [\"reloadSpeed\", 0.8];\n_finalBoss setSkill [\"aimingSpeed\", 0.33];"]}],"see_also":["skill","setUnitAbility","Arma 3: AI Skill","Combat Modes","skillFinal"],"notes":[{"user":"Hardrock","date":"2006-08-04T12:01:00Z","text":"Approximate ranges are:\n\n- Novice < 0.25\n- Rookie >= 0.25 and <= 0.45\n- Recruit > 0.45 and <= 0.65\n- Veteran > 0.65 and <= 0.85\n- Expert > 0.85"},{"user":"Kronzky","date":"2007-06-30T21:16:00Z","text":"If \"SuperAI\" is turned on in the Difficulty Menu, the skill level is always 1, no matter what was defined in the editor or via this command."}],"categories_extra":["AI"]},{"name":"setSlingLoad","title":"setSlingLoad","type":"command","url":"https://community.bistudio.com/wiki/setSlingLoad","revid":379385,"updated":"2026-10-30T23:59:28Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Creates a sling loading from a helicopter to an entity if possible. To unload cargo, pass objNull as second param.\n\n> [!NOTE]\n> FROM object has to be a helicoper, alive with rope attachment enabled, TO object has to be an entity, alive with rope attachment enabled.","syntaxes":[{"syntax":"heli setSlingLoad cargo","params":[{"name":"heli","type":"Object","description":"the helicopter slinging the load","type_expr":"Object"},{"name":"cargo","type":"Object","description":"the cargo load entity","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success"},"form":"binary","left":{"text":"heli"},"right":{"text":"cargo"}}],"examples":[{"code":["_success = heli1 setSlingLoad veh1;"]},{"text":"To unload cargo:\n\n```sqf\n_success = heli setSlingLoad objNull;\n```","code":["_success = heli setSlingLoad objNull;"]}],"see_also":["ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeLength","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind","slingLoadAssistantShown"],"notes":[{"user":"Tajin","date":"2014-11-08T14:42:00Z","text":"\"... if possible \"\nFYI, that only means that 'vehicle' has to be able to lift 'cargo'. The position/distance does not matter, 'cargo' is automatically moved to a position that is close enough but doesn't doesn't collide with 'vehicle'. (can also be used if 'vehicle' is not flying, in which case 'cargo' will be placed and attached on the ground next to it)."}]},{"name":"setSoundEffect","title":"setSoundEffect","type":"command","url":"https://community.bistudio.com/wiki/setSoundEffect","revid":377738,"updated":"2026-01-03T00:57:45Z","groups":["Sounds","Triggers","Waypoints"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Defines the different sound effects for a trigger or a waypoint. To stop any sound, deactivate the trigger (might take up to 0.5 seconds to stop) or delete the trigger/waypoint (immediate).","syntaxes":[{"syntax":"trigger setSoundEffect [sound, voice, soundEnv, soundDet]","params":[{"name":"trigger","type":"Object","type_expr":"Object"},{"name":"sound","type":"String","description":"plays a 2D sound as if playSound was used from CfgSounds (mission or main config). Use `\"$NONE$\"` for an empty sound","type_expr":"String"},{"name":"voice","type":"String","description":"attaches a 3D sound from CfgSounds (mission or main config) to the object that activated the trigger and plays it as if say3D was used","type_expr":"String"},{"name":"soundEnv","type":"String","description":"plays an environmental sound from CfgEnvSounds (mission or main config)","type_expr":"String"},{"name":"soundDet","type":"String","description":"creates a dynamic sound object attached to a trigger defined in CfgSFX (mission or main config)","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"trigger"},"right":{"text":"[sound, voice, soundEnv, soundDet]"}},{"syntax":"waypoint setSoundEffect [sound, voice]","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"sound","type":"String","description":"plays a 2D sound as if playSound was used from CfgSounds (mission or main config)","type_expr":"String"},{"name":"voice","type":"String","description":"attaches a 3D sound from CfgSounds (mission or main config) to the object that activated the trigger and plays it as if say3D was used","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"[sound, voice]"}}],"examples":[{"code":["_trigger setSoundEffect [\"Alarm\", \"\", \"\", \"\"];"]},{"code":["[_group1, 2] setSoundEffect [\"Alarm\", \"\"];"]},{"code":["_trigger setSoundEffect [\"$NONE$\", \"Alarm\", \"\", \"\"];"]},{"code":["_trigger setSoundEffect [\"$NONE$\", \"\", \"BattlefieldExplosions3\", \"\"];"]},{"code":["_trigger setSoundEffect [\"$NONE$\", \"\", \"\", \"Owl\"];"]}],"see_also":["createTrigger","setMusicEffect","setTitleEffect"]},{"name":"setSpeaker","title":"setSpeaker","type":"command","url":"https://community.bistudio.com/wiki/setSpeaker","revid":379468,"updated":"2026-10-31T00:10:32Z","groups":["Unit Identity","Sounds"],"status":"ok","games":{"arma3":"1.02"},"since":"arma3 1.02","arma3_since":"1.02","locality":{"argument":"global","effect":"local"},"description":"Sets the speaker of a person.","syntaxes":[{"syntax":"person setSpeaker speaker","params":[{"name":"person","type":"Object","type_expr":"Object"},{"name":"speaker","type":"String","description":"the used voice type, see Arma 3 Speakers","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"speaker"}}],"examples":[{"code":["unit1 setSpeaker \"Male02GRE\";"]}],"multiplayer":"The command needs to run on every computer with exactly the same arguments, otherwise the speaking unit could appear silent on other PCs.","see_also":["speaker","disableConversation","enableRadio","enableSentences","showSubtitles","setIdentity","setFace","hasCustomFace"],"notes":[{"user":"Lou Montana","date":"2014-01-12T15:12:00Z","text":"**speakers available** in Arma 3 (v1.08):\n\n| Gender | Profile setting | US English<br>*(B) for EN-GB available* | Greek | Persian |\n|---|---|---|---|---|\n| Male | Male01_F | Male01ENG(B) | Male01GRE | Male01PER |\n| Male | Male02_F | Male02ENG(B) | Male02GRE | Male02PER |\n| Male | Male03_F | Male03ENG(B) | Male03GRE | Male03PER |\n| Male | Male04_F | Male04ENG(B) | Male04GRE | *Male01PER* |\n| Male | Male05_F | Male05ENG | Male05GRE | *Male02PER* |\n| Male | Male06_F | Male06ENG | *Male02GRE* | *Male03PER* |\n| Male | Male07_F | Male07ENG | *Male03GRE* | *Male01PER* |\n| Male | Male08_F | Male08ENG | *Male04GRE* | *Male02PER* |\n| Male | Male09_F | Male09ENG | *Male01GRE* | *Male03PER* |\n| Female | - | - | - | - |"},{"user":"Deadfast","date":"2014-11-10T22:07:00Z","text":"In order to stop a unit from talking you can use:\n\n```sqf\n_unit setSpeaker \"NoVoice\"\n```\n\nThis will have no negative effect on the ability to command the unit."}]},{"name":"setSpeech","title":"setSpeech","type":"command","url":"https://community.bistudio.com/wiki/setSpeech","revid":319558,"updated":"2022-05-13T09:24:28Z","groups":["Locations"],"status":"ok","games":{"arma3":"1.12"},"since":"arma3 1.12","arma3_since":"1.12","description":"Add speech to location.","syntaxes":[{"syntax":"location setSpeech speech","params":[{"name":"location","type":"Location","type_expr":"Location"},{"name":"speech","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"location"},"right":{"text":"speech"}}],"examples":[{"code":["_location setSpeech \"SomeSpeech\";"]}],"see_also":["nearestLocationWithDubbing"]},{"name":"setSpeedMode","title":"setSpeedMode","type":"command","url":"https://community.bistudio.com/wiki/setSpeedMode","revid":336415,"updated":"2023-01-02T16:21:11Z","groups":["Groups"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets group speed mode. If unit is passed as param, unit's group is used. Mode may be one of:\n\n- **\"UNCHANGED\"** (unchanged)\n- **\"LIMITED\"** (half speed)\n- **\"NORMAL\"** (full speed, maintain formation)\n- **\"FULL\"** (do not wait for any other units in formation)","syntaxes":[{"syntax":"groupName setSpeedMode mode","params":[{"name":"groupName","type":"Object or Group","type_expr":"Object | Group"},{"name":"mode","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"groupName"},"right":{"text":"mode"}}],"examples":[{"code":["_groupOne setSpeedMode \"LIMITED\";"]}],"see_also":["speedMode","getSpeed","forceSpeed"]},{"name":"setStamina","title":"setStamina","type":"command","url":"https://community.bistudio.com/wiki/setStamina","revid":379386,"updated":"2026-10-30T23:59:36Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","locality":{"argument":"local","effect":"local"},"description":"Set units' stamina (seconds until depletion)","syntaxes":[{"syntax":"unit setStamina stamina","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"stamina","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"stamina"}}],"examples":[{"code":["player setStamina 42;"]}],"see_also":["setStaminaScheme","getStamina","enableStamina","setFatigue","getFatigue","Arma 3: Stamina"],"notes":[{"user":"Molaron","date":"2015-12-30T01:50:00Z","text":"\"setStamina\" has the same effect as \"setFatigue\"."},{"user":"demellion","date":"2018-12-26T11:34:00Z","text":"Note that setStamina will not be able to exceed a 100% stamina value given by the engine. It will minimize to a maximum possible value, similar to application of the old command setFatigue in a range of **0..1**. Example:\n\n```sqf\ngetStamina player; // 8.58\ngetFatigue player; // 0\nplayer setStamina 50; // This will be minimized to 8.58 on next unit simulation cycle.\n```"}]},{"name":"setStaminaScheme","title":"setStaminaScheme","type":"command","url":"https://community.bistudio.com/wiki/setStaminaScheme","revid":364828,"updated":"2024-06-16T09:53:48Z","groups":["Stamina System"],"status":"ok","games":{"arma3":"1.54"},"since":"arma3 1.54","arma3_since":"1.54","description":"Sets the scheme used for the Stamina system.","syntaxes":[{"syntax":"setStaminaScheme scheme","params":[{"name":"scheme","type":"String Enum","description":"String Enum\n\n- \"Normal\"\n- \"FastDrain\"\n- \"Exhausted\"\n- \"Default\"","type_expr":"String","text":"scheme: String Enum\n\n- \"Normal\"\n- \"FastDrain\"\n- \"Exhausted\"\n- \"Default\""}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"scheme"}}],"examples":[{"code":["setStaminaScheme \"Default\";"]}],"see_also":["Arma 3: Stamina"]},{"name":"setStatValue","title":"setStatValue","type":"command","url":"https://community.bistudio.com/wiki/setStatValue","revid":319644,"updated":"2022-05-13T09:24:37Z","groups":["System"],"status":"ok","games":{"arma3":"1.18"},"since":"arma3 1.18","arma3_since":"1.18","description":"Sets a value to a given stat.\nA list of possible StatNames can be found here: Arma 3: Stat Names\nIts important to note that most Stats are restricted to scripts and missions in certain paths.\nFor example \"ExpWarlockDown\" is restricted to scripts in any subdirectory of `\"a3\\Missions_F_Exp\\Campaign\\Missions\\\"`","syntaxes":[{"syntax":"setStatValue [name, value]","params":[{"name":"name","type":"String","type_expr":"String"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"[name, value]"}}],"examples":[{"code":["setStatValue [\"ExpWarlockDown\", 1]; // Unlocks the \"Warlock Down\" Steam achivement"]}],"see_also":["getStatValue","Arma 3: Stat Names"]},{"name":"setSuppression","title":"setSuppression","type":"command","url":"https://community.bistudio.com/wiki/setSuppression","revid":376979,"updated":"2026-01-01T06:08:32Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","locality":{"argument":"local"},"description":"Sets the given suppression value for the given unit.","syntaxes":[{"syntax":"unit setSuppression value","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"value","type":"Number in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"value"}}],"examples":[{"code":["unit_1 setSuppression 1;"]}],"see_also":["getSuppression","suppressFor"]},{"name":"setSystemOfUnits","title":"setSystemOfUnits","type":"command","url":"https://community.bistudio.com/wiki/setSystemOfUnits","revid":339090,"updated":"2023-04-26T10:54:08Z","groups":["System","Broken Commands"],"status":"broken","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Set system of units. This will only impact gauges from advanced flight model.\n\n> [!IMPORTANT]\n> This command is buggy: any value other than 0 (metric) will display both units at the same time.","syntaxes":[{"syntax":"setSystemOfUnits value","params":[{"name":"value","type":"Number","description":"possible values are:\n\n- 0 - metric\n- 1 - mixed\n- 2 - imperial","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"value"}}],"examples":[{"code":["if (player in _myHelicopter) then { setSystemOfUnits 2; };"]}],"see_also":["Description.ext","Advanced Helicopter Flight Model in Arma3","systemOfUnits"]},{"name":"setTargetAge","title":"setTargetAge","type":"command","url":"https://community.bistudio.com/wiki/setTargetAge","revid":363641,"updated":"2024-04-09T21:20:52Z","groups":["Object Manipulation"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Sets how the target is known to the other centers. They behave like the target was seen age seconds ago.","syntaxes":[{"syntax":"object setTargetAge age","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"age","type":"String","description":"can be:\n\n- \"ACTUAL\"\n- \"5 MIN\"\n- \"10 MIN\"\n- \"15 MIN\"\n- \"30 MIN\"\n- \"60 MIN\"\n- \"120 MIN\"\n- \"UNKNOWN\"","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"age"}}],"examples":[{"code":["player setTargetAge \"10 MIN\";"]}],"see_also":["targets","targetsQuery","nearTargets","targetsAggregate","targetKnowledge","knowsAbout","reveal","forgetTarget","getHideFrom"]},{"name":"setTargetSize","title":"setTargetSize","type":"command","url":"https://community.bistudio.com/wiki/setTargetSize","revid":378903,"updated":"2026-08-11T14:56:33Z","groups":["Sensors"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"global","effect":"local"},"description":"Sets target size (see `irTargetSize` and others from vehicle config) override on vehicle.\n\n> [!NOTE]\n> Passing an empty array returns the current values without modifying them, so this commands works as both getter and setter.","syntaxes":[{"syntax":"vehicle setTargetSize [visualTargetSize, irTargetSize, radarTargetSize]","params":[{"name":"vehicle","type":"Object","description":"a transport vehicle","type_expr":"Object"},{"name":"visualTargetSize","type":"Number","description":"0..2 value, set to -1 to disable override and use config values","type_expr":"Number"},{"name":"irTargetSize","type":"Number","type_expr":"Number"},{"name":"radarTargetSize","type":"Number","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"with previous [visualTargetSize, irTargetSize, radarTargetSize] values","text":"Array with previous [visualTargetSize, irTargetSize, radarTargetSize] values"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[visualTargetSize, irTargetSize, radarTargetSize]"}}],"examples":[{"code":["private _previousSizes = vehicle player setTargetSize [0,0,0]; // set"]},{"code":["private _currentSizes = vehicle player setTargetSize []; // get"]}],"see_also":["getSensorTargets"]},{"name":"setTaskMarkerOffset","title":"setTaskMarkerOffset","type":"command","url":"https://community.bistudio.com/wiki/setTaskMarkerOffset","revid":379232,"updated":"2026-10-30T23:09:33Z","groups":["Briefing"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Sets the task marker position in model space.","syntaxes":[{"syntax":"obj setTaskMarkerOffset position","params":[{"name":"obj","type":"Object","type_expr":"Object"},{"name":"position","type":"PositionRelative","type_expr":"PositionRelative"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"obj"},"right":{"text":"position"}}],"examples":[{"code":["player setTaskMarkerOffset [0,0.5,1];"]}],"see_also":["taskMarkerOffset"]},{"name":"setTaskResult","title":"setTaskResult","type":"command","url":"https://community.bistudio.com/wiki/setTaskResult","revid":379211,"updated":"2026-10-30T21:16:57Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Set a result of the task.","syntaxes":[{"syntax":"task setTaskResult [state,result]","params":[{"name":"task","type":"Task","type_expr":"Task"},{"name":"state","type":"String","type_expr":"String"},{"name":"result","type":"Unknown","type_expr":"Unknown"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"task"},"right":{"text":"[state,result]"}}],"see_also":["Tasks","createSimpleTask","removeSimpleTask","setSimpleTaskDescription","setSimpleTaskDestination","setTaskState","taskState"]},{"name":"setTaskState","title":"setTaskState","type":"command","url":"https://community.bistudio.com/wiki/setTaskState","revid":349143,"updated":"2023-11-08T14:49:48Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Set the state of a given task.","syntaxes":[{"syntax":"task setTaskState state","params":[{"name":"task","type":"Task","type_expr":"Task"},{"name":"state","type":"String","description":"state value may be one of:\n\n- \"None\"\n- \"Created\"\n- \"Assigned\"\n- \"Succeeded\"\n- \"Failed\"\n- \"Canceled\"","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"task"},"right":{"text":"state"}}],"examples":[{"code":["_tskKillSpongebob setTaskState \"Succeeded\";"]}],"see_also":["Tasks","createSimpleTask","removeSimpleTask","setSimpleTaskDescription","setSimpleTaskDestination","setTaskResult","taskState"]},{"name":"setTerrainGrid","title":"setTerrainGrid","type":"command","url":"https://community.bistudio.com/wiki/setTerrainGrid","revid":364727,"updated":"2024-05-30T11:49:11Z","groups":["System","Environment"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets the desired terrain resolution in meters.","syntaxes":[{"syntax":"setTerrainGrid grid","params":[{"name":"grid","type":"Number","description":"for default landscapes the supported resolutions are:\n\n- **50** - smoothest, less lag\n- **25** - default in multiplayer\n- **12.5** - default in single player\n- **6.25**\n- **3.125** - bumpiest, higher lag\n\n> [!NOTE]\n> If unsupported resolution is selected, the nearest supported resolution is used instead. Higher number means less vertices are used for terrain rendering, making distant hills less smooth. Value 12.5 corresponds to selecting Terrain Detail Normal in Video options, 50 to Very Low, 3.125 to Very High. In older games like Armed Assault terrain resolution is fixed, determined by the world created.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"grid"}}],"examples":[{"code":["setTerrainGrid 12.5;"]}],"see_also":["getTerrainGrid","setViewDistance","viewDistance","setDetailMapBlendPars","getObjectViewDistance","setObjectViewDistance"],"notes":[{"user":"Hardrock","date":"2006-08-04T12:02:00Z","text":"*Notes from before the conversion:*\n\nThis is like opening up your video preferences and changing \"terrain detail\", i.e.: setTerrainGrid 50 = lowest detail\nsetTerrainGrid 3.125 = highest detail It is similar to the command setViewDistance."},{"user":"WGL.Q","date":"2007-08-18T09:46:00Z","text":"*Effects on grass:*\n\n- 50: disables/removes grass altogether.\n- 25: grass is visible.\n- Lower values make grass drawn a bit further at distance. However the effect is decreasing rapidly: Grass radius of 25 is 100%. 12.5 is now like 100% + 20%, 6.25 is like 100% + 20% + 5% and 3.125 is 100% + 20% + 5% + 1%. Note these are estimates!\n\n[Demo Mission Test_VD_TD.Sara.rar](http://ofpc.de/wargames//files/arma/biki/Test_VD_TD.Sara.rar): ViewDistance and TerrainGrid can be changed via RadioTriggers"},{"user":"Rommel","date":"2019-12-15T05:50:00Z","text":"*Arma 2 Supported Reso:*\n\nIn Arma 2 you are not stuck to 50, 25, 12 etc. 45 is a lower setting than 25!"},{"user":"Galzohar","date":"2013-03-13T17:05:00Z","text":"*Arma 3 Multiplayer default:*\n\nSome testing indicates that the default value for Arma 3 multiplayer is 10 - just like before. 10 is between \"Normal\" and \"High\".\n\nAn user's terrain detail setting is ignored in multiplayer just like in Arma 2."},{"user":"MrPineapple","date":"2014-11-19T17:44:00Z","text":"**TerrainGrid values for Arma 3 1.34:**\nLow = 50 (NoGrass)\nStandard = 25\nHigh = 12.5\nVery High = 6.25\nUltra = 3.125"}]},{"name":"setTerrainHeight","title":"setTerrainHeight","type":"command","url":"https://community.bistudio.com/wiki/setTerrainHeight","revid":377594,"updated":"2026-01-02T06:59:43Z","groups":["Positions"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","locality":{"effect":"global","server_exec":true},"description":"Set the current terrain's altitude on provided location(s).\n\n> [!IMPORTANT]\n> - Heightmap changes:\n>   - are internally converted (rounded) to heightmap coordinates\n>   - are stored in the JIP queue\n>   - are **not** removed from the JIP queue if the values are set back to terrain's default value\n>   - are updated in the JIP queue for updated positions **if** the same group of positions are edited (order does not matter, but amount does);\n>     editing positions by terrain *sections* is good for multiplayer optimisation (see Example 2)\n>   - are **not** updated and sent twice (old one then new one) if position edits are not exactly the same (see point above and Example 2).\n> - Edited terrain heights are **not** saved inside savegames, they need to be restored manually on savegame load.\n> - Known issues:\n>   - Terrain sections can become invisible if the change is too extreme\n>   - Walking on the edge of extreme height changes can catapult the player away","syntaxes":[{"syntax":"setTerrainHeight [positionAndAltitudeArray, adjustObjects]","params":[{"name":"positionAndAltitudeArray","type":"Array of PositionASL","description":"[[x1, y1, newASLHeight1], [x2, y2, newASLHeight2], ...]","type_expr":"Array<PositionASL>"},{"name":"adjustObjects","type":"Boolean","optional":true,"default":"true","description":"if true then objects on modified points are moved up/down to keep the same ATL height\n\n> [!IMPORTANT]\n> **All** objects above modified terrain will be adjusted, even flying ones.","type_expr":"Boolean","text":"adjustObjects: Boolean - (Optional, default true) if true then objects on modified points are moved up/down to keep the same ATL height\n\n> [!IMPORTANT]\n> **All** objects above modified terrain will be adjusted, even flying ones."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[positionAndAltitudeArray, adjustObjects]"}}],"examples":[{"text":"```sqf\nprivate _fnc_flattenTerrain =\n{\n    params [\"_start\", \"_a\", \"_b\", \"_h\"];\n    private _newPositions = [];\n\n    for \"_xStep\" from 0 to _a do\n    {\n        for \"_yStep\" from 0 to _b do\n        {\n            private _newHeight = _start vectorAdd [_xStep, _yStep, 0];\n            _newHeight set [2, _h];\n            _newPositions pushBack _newHeight;\n        };\n    };\n\n    _newPositions;\n};\n\nprivate _desiredTerrainHeight = 150;\nprivate _positionsAndHeights = [getPosWorld player, 50, 50, _desiredTerrainHeight] call _fnc_flattenTerrain;\nsetTerrainHeight [_positionsAndHeights, true];\n```","code":["private _fnc_flattenTerrain =\n{\n\tparams [\"_start\", \"_a\", \"_b\", \"_h\"];\n\tprivate _newPositions = [];\n\n\tfor \"_xStep\" from 0 to _a do\n\t{\n\t\tfor \"_yStep\" from 0 to _b do\n\t\t{\n\t\t\tprivate _newHeight = _start vectorAdd [_xStep, _yStep, 0];\n\t\t\t_newHeight set [2, _h];\n\t\t\t_newPositions pushBack _newHeight;\n\t\t};\n\t};\n\n\t_newPositions;\n};\n\nprivate _desiredTerrainHeight = 150;\nprivate _positionsAndHeights = [getPosWorld player, 50, 50, _desiredTerrainHeight] call _fnc_flattenTerrain;\nsetTerrainHeight [_positionsAndHeights, true];"]},{"text":"Bad example:\n\n```sqf\n// first update\nsetTerrainHeight [[[1000, 1000, 25], [1005, 1000, 25], [1000, 1005, 25], [1005, 1005, 25]]];\n\n// second update - this will make the JIP queue keep both messages\nsetTerrainHeight [[[1005, 1000, 50]]];\n```\n\nGood example:\n\n```sqf\n// first update\nsetTerrainHeight [[[1000, 1000, 25], [1005, 1000, 25], [1000, 1005, 25], [1005, 1005, 25]]];\n\n// second update - this will update the JIP queue properly\nsetTerrainHeight [[[1000, 1000, 25], [1005, 1000, 50], [1000, 1005, 25], [1005, 1005, 25]]];\n```","code":["// first update\nsetTerrainHeight [[[1000, 1000, 25], [1005, 1000, 25], [1000, 1005, 25], [1005, 1005, 25]]];\n\n// second update - this will make the JIP queue keep both messages\nsetTerrainHeight [[[1005, 1000, 50]]];","// first update\nsetTerrainHeight [[[1000, 1000, 25], [1005, 1000, 25], [1000, 1005, 25], [1005, 1005, 25]]];\n\n// second update - this will update the JIP queue properly\nsetTerrainHeight [[[1000, 1000, 25], [1005, 1000, 50], [1000, 1005, 25], [1005, 1005, 25]]];"]}],"see_also":["getTerrainInfo","getTerrainHeight"]},{"name":"setText","title":"setText","type":"command","url":"https://community.bistudio.com/wiki/setText","revid":322962,"updated":"2022-06-28T21:42:51Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Sets the text associated with a location. This text will be displayed on the game map at the location's position.","syntaxes":[{"syntax":"location setText text","params":[{"name":"location","type":"Location","type_expr":"Location"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"location"},"right":{"text":"text"}}],"examples":[{"code":["myLocation setText \"Rahmadi Village\";"]}],"see_also":["text","createLocation"]},{"name":"setTimeMultiplier","title":"setTimeMultiplier","type":"command","url":"https://community.bistudio.com/wiki/setTimeMultiplier","revid":378416,"updated":"2026-04-04T08:44:07Z","groups":["Time","Mission Information","Environment"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","locality":{"effect":"global","server_exec":true},"description":"Sets a time multiplier for in-game time. The command range is capped at 0.1 - 120 to avoid performance problems.","syntaxes":[{"syntax":"setTimeMultiplier value","params":[{"name":"value","description":"Number in range 0.1 .. 120","type_expr":"Number","text":"value: Number in range 0.1 .. 120"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"value"}}],"examples":[{"code":["setTimeMultiplier 60;"]},{"code":["setTimeMultiplier 0.5;"]}],"see_also":["timeMultiplier","skipTime","setAccTime","accTime","time","serverTime","date","dayTime"],"notes":[{"user":"Hypoxic125","date":"2023-02-14T17:07:34Z","text":"**timeMultiplier = 24 / IRL Hours per Game Day**\n\nDesired: 4 IRL Hours for Full In-Game Day\n\ntimeMultiplier = 24 / 4\n\ntimeMultiplier = 6"}]},{"name":"setTIParameter","title":"setTIParameter","type":"command","url":"https://community.bistudio.com/wiki/setTIParameter","revid":330291,"updated":"2022-08-30T11:36:06Z","groups":["Environment"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Sets the provided Thermal Imaging parameter's value.\n\n> [!IMPORTANT]\n> The settings are **not** saved in savegame and must be reapplied after loading.","syntaxes":[{"syntax":"setTIParameter [paramName, newValue]","params":[{"name":"paramName","type":"String","description":"the parameter name. See getTIParameters for a list of possible values","type_expr":"String"},{"name":"newValue","type":"Number","description":"the set number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[paramName, newValue]"}}],"examples":[{"code":["setTIParameter [\"OutputRangeStart\", 0];\nsetTIParameter [\"OutputRangeWidth\", 1];"]}],"see_also":["getTIParameters","setCamUseTI","disableTIEquipment"]},{"name":"setTitleEffect","title":"setTitleEffect","type":"command","url":"https://community.bistudio.com/wiki/setTitleEffect","revid":377582,"updated":"2026-01-02T06:56:39Z","groups":["Triggers","Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Defines the title effect to show on activation via [Type, Effect, Text] where\n\n'Type'\n\nThe title effect does not disappear on deactivation, this should be done manually if required.","syntaxes":[{"syntax":"triggerOrWaypoint setTitleEffect [type, effect, text]","params":[{"name":"triggerOrWaypoint","type":"Object or Waypoint","type_expr":"Object | Waypoint"},{"name":"type","type":"String","description":"defines Title Effect Type when not NONE, can be one of:\n\n- \"NONE\"\n- \"OBJECT\" - *text* defines the shown object , a subclass of `CfgTitles` (see cutObj)\n- \"RES\" - *text* defines a resource class, a subclass of RscTitles (see cutRsc)\n- \"TEXT\" - *text* defines text string to show (see cutText)","type_expr":"String"},{"name":"effect","type":"String","type_expr":"String"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"triggerOrWaypoint"},"right":{"text":"[type, effect, text]"}}],"examples":[{"code":["_trigger setTitleEffect [\"TEXT\", \"PLAIN DOWN\", \"Hello world.\"];"]}],"see_also":["createTrigger","setSoundEffect","setMusicEffect"]},{"name":"setTowParent","title":"setTowParent","type":"command","url":"https://community.bistudio.com/wiki/setTowParent","revid":373896,"updated":"2025-06-26T11:04:54Z","groups":["PhysX","Ropes and Sling Loading"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"argument":"local","effect":"global"},"description":"| Simulation | Towable | Can Tow |\n|---|---|---|\n| CarX | ✓ | ✓ |\n| TankX | ✗ | ✓ |\n| AirplaneX | ✗ | ✗ |\n| BoatX | ✗ | ✗ |\n\nAllows a vehicle to be towed by another. This loosens the towed vehicle's brakes and turns its steering wheels toward the towing vehicle.\nSupposed to be used together with a rope connecting both vehicles.","syntaxes":[{"syntax":"towedVehicle setTowParent towingVehicle","params":[{"name":"towedVehicle","type":"Object","description":"vehicle of type CarX (no tanks, no aircrafts, no boats)","type_expr":"Object"},{"name":"towingVehicle","type":"Object","description":"vehicle of type CarX or TankX (no aircrafts, no boats)","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"towedVehicle"},"right":{"text":"towingVehicle"}}],"examples":[{"text":"```sqf\n{ moveOut _x } forEach crew _towedVehicle;    // make sure nobody is in the towed vehicle\n_towedVehicle lock true;                    // make sure everybody stays out of it\nropeCreate [_bobcat, [0,-5,0], _towedVehicle, [0,2,0]];\n_towedVehicle setTowParent _bobcat;\n```","code":["{ moveOut _x } forEach crew _towedVehicle;\t// make sure nobody is in the towed vehicle\n_towedVehicle lock true;\t\t\t\t\t// make sure everybody stays out of it\nropeCreate [_bobcat, [0,-5,0], _towedVehicle, [0,2,0]];\n_towedVehicle setTowParent _bobcat;"]}],"multiplayer":"> [!WARNING]\n> If a player enters the towing vehicle, the towed one will try to change its locality to be local to that player. This might be problematic if there is another player already in the towed vehicle. It is recommended to not have anyone in the towed vehicle!","see_also":["getTowParent","ropeCreate"]},{"name":"setTrafficDensity","title":"setTrafficDensity","type":"command","url":"https://community.bistudio.com/wiki/setTrafficDensity","revid":310000,"updated":"2022-05-05T12:20:39Z","groups":["Environment"],"status":"ok","games":{"tkoh":"1.01","arma3":"0.50"},"since":"tkoh 1.01","arma3_since":"0.50","description":"Set the density of ambient cars in a rectangle (in cars per kilometer).\n\n> [!NOTE]\n> This command does nothing in Arma 3.","syntaxes":[{"syntax":"setTrafficDensity [density, xMin, xMax, zMin, zMax]","params":[{"name":"density","type":"Number","description":"density (in cars per kilometer)","type_expr":"Number"},{"name":"xMin","type":"Number","description":"western border of the affected rectangle","type_expr":"Number"},{"name":"xMax","type":"Number","description":"eastern border of the affected rectangle","type_expr":"Number"},{"name":"zMin","type":"Number","description":"southern border of the affected rectangle","type_expr":"Number"},{"name":"zMax","type":"Number","description":"northern border of the affected rectangle","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[density, xMin, xMax, zMin, zMax]"}}],"examples":[{"code":["setTrafficDensity [40, 31000, 32000, 30000, 32000];"]}],"see_also":["enableTraffic","setTrafficDistance","setTrafficGap","setTrafficSpeed"]},{"name":"setTrafficDistance","title":"setTrafficDistance","type":"command","url":"https://community.bistudio.com/wiki/setTrafficDistance","revid":379469,"updated":"2026-10-31T00:10:40Z","groups":["Environment"],"status":"ok","games":{"tkoh":"1.01","arma3":"0.50"},"since":"tkoh 1.01","arma3_since":"0.50","description":"Set maximum ambient traffic draw distance (in 2D).\n\n> [!NOTE]\n> This command does nothing in Arma 3.","syntaxes":[{"syntax":"setTrafficDistance distance","params":[{"name":"distance","type":"Number","description":"draw distance (in meter)","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"distance"}}],"examples":[{"code":["setTrafficDistance 1000;"]}],"see_also":["enableTraffic","setTrafficDensity","setTrafficGap","setTrafficSpeed"],"notes":[{"user":"Master85","date":"2011-12-02T10:58:00Z","text":"The distance is not to the drawn traffic itself but to the road section - i.e. the ambient traffic on a long road section which is only partially within the drawing distance is drawn entirely."}]},{"name":"setTrafficGap","title":"setTrafficGap","type":"command","url":"https://community.bistudio.com/wiki/setTrafficGap","revid":319775,"updated":"2022-05-13T09:24:52Z","groups":["Environment"],"status":"ok","games":{"tkoh":"1.01","arma3":"0.50"},"since":"tkoh 1.01","arma3_since":"0.50","description":"Set the average gap between ambient cars in a rectangle (in meters).\n\n> [!NOTE]\n> This command does nothing in Arma 3.","syntaxes":[{"syntax":"setTrafficGap [gap, xMin, xMax, zMin, zMax]","params":[{"name":"gap","type":"Number","description":"average gap between ambient cars (in meters)","type_expr":"Number"},{"name":"xMin","type":"Number","description":"western border of the affected rectangle","type_expr":"Number"},{"name":"xMax","type":"Number","description":"eastern border of the affected rectangle","type_expr":"Number"},{"name":"zMin","type":"Number","description":"southern border of the affected rectangle","type_expr":"Number"},{"name":"zMax","type":"Number","description":"northern border of the affected rectangle","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[gap, xMin, xMax, zMin, zMax]"}}],"examples":[{"code":["setTrafficGap [50, 31000, 32500, 28000, 32000];"]}],"see_also":["enableTraffic","setTrafficDensity","setTrafficDistance","setTrafficSpeed"]},{"name":"setTrafficSpeed","title":"setTrafficSpeed","type":"command","url":"https://community.bistudio.com/wiki/setTrafficSpeed","revid":310009,"updated":"2022-05-05T12:20:43Z","groups":["Environment"],"status":"ok","games":{"tkoh":"1.01","arma3":"0.50"},"since":"tkoh 1.01","arma3_since":"0.50","description":"Set ambient traffic speed in a rectangle (in kilometers per hour).\n\n> [!NOTE]\n> This command does nothing in Arma 3.","syntaxes":[{"syntax":"setTrafficSpeed [speed, xMin, xMax, zMin, zMax]","params":[{"name":"speed","type":"Number","description":"traffic speed (in kilometers per hour)","type_expr":"Number"},{"name":"xMin","type":"Number","description":"western border of the affected rectangle","type_expr":"Number"},{"name":"xMax","type":"Number","description":"eastern border of the affected rectangle","type_expr":"Number"},{"name":"zMin","type":"Number","description":"southern border of the affected rectangle","type_expr":"Number"},{"name":"zMax","type":"Number","description":"northern border of the affected rectangle","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[speed, xMin, xMax, zMin, zMax]"}}],"examples":[{"code":["setTrafficSpeed [50, _xMin, _xMax, _zMin, _zMax];"]}],"see_also":["enableTraffic","setTrafficDensity","setTrafficDistance","setTrafficGap"]},{"name":"setTriggerActivation","title":"setTriggerActivation","type":"command","url":"https://community.bistudio.com/wiki/setTriggerActivation","revid":378817,"updated":"2026-07-01T00:11:02Z","groups":["Triggers"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Defines the trigger activation type.\n\nSee ArmA:Mission Editor - Triggers for a thorough overview of triggers and its fields for activation, effects, etc.","syntaxes":[{"syntax":"trigger setTriggerActivation [by, type, repeating, persistent]","params":[{"name":"trigger","type":"Object","description":"trigger object","type_expr":"Object"},{"name":"by","type":"String","description":"who activates trigger. Can be `\"NONE\"`, or:\n\n| Side | Radio | Object | Status |\n|---|---|---|---|\n| - `\"EAST\"`<br>- `\"WEST\"`<br>- `\"GUER\"`<br>- `\"CIV\"`<br>- `\"LOGIC\"`<br>- `\"ANY\"`<br>- Arma 3 v1.68 `\"ANYPLAYER\"` | - `\"ALPHA\"`<br>- `\"BRAVO\"`<br>- `\"CHARLIE\"`<br>- `\"DELTA\"`<br>- `\"ECHO\"`<br>- `\"FOXTROT\"`<br>- `\"GOLF\"`<br>- `\"HOTEL\"`<br>- `\"INDIA\"`<br>- `\"JULIET\"` | - `\"STATIC\"`<br>- `\"VEHICLE\"`<br>- `\"GROUP\"`<br>- `\"LEADER\"`<br>- `\"MEMBER\"` | - `\"WEST SEIZED\"`<br>- `\"EAST SEIZED\"`<br>- `\"GUER SEIZED\"` |","type_expr":"String"},{"name":"type","type":"String","description":"how trigger is it activated. Can be:\n\n| Presence | Detection |\n|---|---|\n| - `\"PRESENT\"`<br>- `\"NOT PRESENT\"` | - `\"WEST D\"`<br>- `\"EAST D\"`<br>- `\"GUER D\"`<br>- `\"CIV D\"` |","type_expr":"String"},{"name":"repeating","type":"Boolean","description":"activation can happen repeatedly","type_expr":"Boolean"},{"name":"persistent","type":"Boolean","optional":true,"default":"true","description":"when false stops persistent condition execution and vehicle list building on non-repeating trigger; is ignored in radio and repeating triggers.","type_expr":"Boolean","since":"arma3 2.24","text":"persistent (Optional): Boolean - when false stops persistent condition execution and vehicle list building on non-repeating trigger; is ignored in radio and repeating triggers. Default: true"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"trigger"},"right":{"text":"[by, type, repeating, persistent]"}}],"examples":[{"code":["_trigger setTriggerActivation [\"WEST\", \"EAST D\", true];"]}],"multiplayer":"Activation changes are local.","see_also":["triggerActivation","triggerActivated","createTrigger","setTriggerArea","setTriggerStatements","setTriggerText","setTriggerTimeout","setTriggerType","triggerAttachVehicle","triggerAttachObject","triggerInterval","setTriggerInterval","enableSimulation","simulationEnabled"]},{"name":"setTriggerArea","title":"setTriggerArea","type":"command","url":"https://community.bistudio.com/wiki/setTriggerArea","revid":364460,"updated":"2024-05-16T20:41:48Z","groups":["Triggers"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Defines the area monitored by the given trigger. The area could be either rectangular or elliptical.\n\n> [!NOTE]\n> Just like with a and b dimensions, c dimension will alter area in opposite directions from the trigger position along z axis. Therefore if the trigger position is on the surface, half of the trigger area will be above the surface and half below. To place the whole area above the surface, adjust trigger position (move it up c meters). If c is not specified or <= 0, the trigger's height is considered infinite like 2D triggers.","syntaxes":[{"syntax":"trigger setTriggerArea [a, b, angle, isRectangle, c]","params":[{"name":"trigger","type":"Object","description":"object of the type \"EmptyDetector\"","type_expr":"Object"},{"name":"a","type":"Number","description":"trigger area X size / 2, in meters","type_expr":"Number"},{"name":"b","type":"Number","description":"trigger area Y size / 2, in meters","type_expr":"Number"},{"name":"angle","type":"Number","description":"trigger area rotation in degrees","type_expr":"Number"},{"name":"isRectangle","type":"Boolean","description":"true if rectangle","type_expr":"Boolean"},{"name":"c","type":"Number","optional":true,"default":"-1","description":"trigger area Z size / 2, in meters. -1 for infinite height","type_expr":"Number","since":"arma3 1.60","text":"c: Number - (Optional, default -1) trigger area Z size / 2, in meters. -1 for infinite height"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"trigger"},"right":{"text":"[a, b, angle, isRectangle, c]"}}],"examples":[{"code":["_trigger setTriggerArea [100, 50, 45, false];"]},{"code":["_trigger setTriggerArea [100, 50, 45, false, 100];"]},{"code":["_trg = createTrigger [\"EmptyDetector\", getPos player, false];\n_trg setTriggerArea [5, 5, 0, false];\n_trg setTriggerActivation [\"CIV\", \"PRESENT\", true];\n_trg setTriggerStatements [\"this\", \"hint 'Civilian near player'\", \"hint 'no civilian near'\"];"]}],"see_also":["triggerArea","createTrigger","setTriggerActivation","setTriggerStatements","setTriggerText","setTriggerTimeout","setTriggerType","inArea","inAreaArray","triggerInterval","setTriggerInterval","enableSimulation","simulationEnabled"]},{"name":"setTriggerInterval","title":"setTriggerInterval","type":"command","url":"https://community.bistudio.com/wiki/setTriggerInterval","revid":353312,"updated":"2024-03-15T17:11:45Z","groups":["Triggers"],"status":"ok","games":{"arma3":"1.98"},"since":"arma3 1.98","arma3_since":"1.98","locality":{"argument":"global","effect":"local"},"description":"Sets the interval in seconds for trigger condition check.\n\n> [!NOTE]\n> Triggers are configured to check condition approx. every 0.5 second by default. This command allows either to slow down or to speed up default check interval per trigger. Setting interval to 0 will make the trigger check its condition every frame. However, when trigger is attached to some object, the trigger will inherit the simulation frequency of the object it is attached to. This command cannot change the interval of the attached trigger. The trigger can also be \"frozen\" with enableSimulation command.","syntaxes":[{"syntax":"trigger setTriggerInterval interval","params":[{"name":"trigger","type":"Object","description":"trigger object","type_expr":"Object"},{"name":"interval","type":"Number","description":"interval in seconds with which trigger condition is checked","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"trigger"},"right":{"text":"interval"}}],"examples":[{"code":["_trigger setTriggerInterval 5;"]}],"multiplayer":"Interval changes are local.","see_also":["triggerInterval","triggerActivation","triggerActivated","createTrigger","setTriggerActivation","setTriggerArea","setTriggerStatements","setTriggerText","setTriggerTimeout","setTriggerType","triggerAttachVehicle","triggerAttachObject","enableSimulation","simulationEnabled"]},{"name":"setTriggerStatements","title":"setTriggerStatements","type":"command","url":"https://community.bistudio.com/wiki/setTriggerStatements","revid":378812,"updated":"2026-06-30T19:31:33Z","groups":["Triggers"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Defines trigger condition, activation and deactivation statements. Trigger condition has to return Boolean. true will activate the trigger, false will deactivate it (only if activation is set to repeat). thisList returns the same result as list command, which includes all entities in the trigger area that are capable of activating the trigger. Dead entities are excluded as well as crew in vehicles, vehicles themselves are included.","syntaxes":[{"syntax":"trigger setTriggerStatements [condition, activation, deactivation]","params":[{"name":"trigger","type":"Object","description":"trigger object","type_expr":"Object"},{"name":"condition","type":"String","description":"code containing trigger condition. Special variables available here:\n\n- this (Boolean) - detection event\n- thisTrigger (Object) - trigger instance\n- thisList (Array) - array of all detected entities","type_expr":"String"},{"name":"activation","type":"String","description":"code that is executed when the trigger is activated. Special variables available here:\n\n- thisTrigger (Object) - trigger instance\n- thisList (Array) - array of all detected entities\n- thisActivator (Object) Arma 3 v2.22 - what or who activated the trigger, default: thisTrigger","type_expr":"String"},{"name":"deactivation","type":"String","description":"code that is executed when the trigger is deactivated. Special variable available here:\n\n- thisTrigger (Object) - trigger instance","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"trigger"},"right":{"text":"[condition, activation, deactivation]"}}],"examples":[{"code":["_trg setTriggerStatements [\"this\", \"hint 'trigger on'\", \"hint 'trigger off'\"];"]},{"text":"Since Arma 3 v2.22:\n\n```sqf\n_trg setTriggerStatements [\"this\", \"hint ('Activated by ' + str thisActivator)\", \"\"];\n```","code":["_trg setTriggerStatements [\"this\", \"hint ('Activated by ' + str thisActivator)\", \"\"];"]}],"see_also":["triggerStatements","createTrigger","setTriggerActivation","setTriggerArea","setTriggerText","setTriggerTimeout","setTriggerType","Magic Variables","thisList","thisTrigger","triggerInterval","setTriggerInterval","enableSimulation","simulationEnabled"],"notes":[{"user":"Scifer","date":"2011-03-14T20:52:00Z","text":"An array with three arguments is mandatory for this function."},{"user":"Heeeere's Johnny!","date":"2014-09-16T17:41:00Z","text":"Magic variable *thisList* does not contain dead units."}]},{"name":"setTriggerText","title":"setTriggerText","type":"command","url":"https://community.bistudio.com/wiki/setTriggerText","revid":319703,"updated":"2022-05-13T09:24:44Z","groups":["Triggers"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sets the text label attached to the trigger object. This is used for example as a radio slot label for radio activated triggers.","syntaxes":[{"syntax":"trigger setTriggerText text","params":[{"name":"trigger","type":"Object","type_expr":"Object"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"trigger"},"right":{"text":"text"}}],"examples":[{"code":["trigger setTriggerText \"Call for support\";"]}],"see_also":["triggerText","createTrigger","setTriggerActivation","setTriggerArea","setTriggerStatements","setTriggerTimeout","setTriggerType","triggerInterval","setTriggerInterval","enableSimulation","simulationEnabled"]},{"name":"setTriggerTimeout","title":"setTriggerTimeout","type":"command","url":"https://community.bistudio.com/wiki/setTriggerTimeout","revid":337985,"updated":"2023-02-23T21:11:05Z","groups":["Triggers"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Defines the time between condition satisfaction and trigger activation (randomly from min to max, with an average value mid). If the last argument is true, the condition must be fullfilled all the time.\n\nFor a normal trigger, *min*, *mid* and *max* are used to generate random duration according to [Gaussian Distribution](https://en.wikipedia.org/wiki/Normal_distribution) (ref: Technically, it is a rescaled [Bates distribution](https://en.wikipedia.org/wiki/Bates_distribution) with n = 4. The distribution is split in two at its midpoint and scaled linearly such that its maximum lies at the specified midpoint.). For a \"Seized\" type of trigger, the duration value is generated using side ruling power","syntaxes":[{"syntax":"trigger setTriggerTimeout [min, mid, max, interruptable]","params":[{"name":"trigger","type":"Object","type_expr":"Object"},{"name":"min","type":"Number","type_expr":"Number"},{"name":"mid","type":"Number","type_expr":"Number"},{"name":"max","type":"Number","type_expr":"Number"},{"name":"interruptable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"trigger"},"right":{"text":"[min, mid, max, interruptable]"}}],"examples":[{"code":["_trigger setTriggerTimeout [5, 10, 7, false];"]}],"see_also":["triggerTimeout","triggerTimeoutCurrent","createTrigger","setTriggerActivation","setTriggerArea","setTriggerStatements","setTriggerText","setTriggerType","triggerInterval","setTriggerInterval","enableSimulation","simulationEnabled"]},{"name":"setTriggerType","title":"setTriggerType","type":"command","url":"https://community.bistudio.com/wiki/setTriggerType","revid":323090,"updated":"2022-06-28T21:43:14Z","groups":["Triggers"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sets the type of action processed by the trigger after activation (no action, a waypoints switch or an end of mission):\n\n- `\"NONE\"`\n- `\"EAST G\"` - Guarded by OPFOR - (It is better to use createGuardedPoint instead)\n- `\"WEST G\"` - Guarded by BLUFOR - (It is better to use createGuardedPoint instead)\n- `\"GUER G\"` - Guarded by Independent - (It is better to use createGuardedPoint instead)\n- `\"SWITCH\"` - Switch waypoints/break loop (see Triggers)\n- `\"END1\"` - End #1\n- `\"END2\"` - End #2\n- `\"END3\"` - End #3\n- `\"END4\"` - End #4\n- `\"END5\"` - End #5\n- `\"END6\"` - End #6\n- `\"LOOSE\"` - (Meant to say LOSE but is misspelt in the game engine).\n- `\"WIN\"` - (Not in editor. Valid enum name but when set, defaults to `\"END1\"`)","syntaxes":[{"syntax":"trigger setTriggerType action","params":[{"name":"trigger","type":"Object","type_expr":"Object"},{"name":"action","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"trigger"},"right":{"text":"action"}}],"examples":[{"code":["_trigger setTriggerType \"END1\";"]}],"see_also":["triggerType","createTrigger","setTriggerActivation","setTriggerArea","setTriggerStatements","setTriggerText","setTriggerTimeout","createGuardedPoint","triggerInterval","setTriggerInterval","enableSimulation","simulationEnabled"]},{"name":"setTurretLimits","title":"setTurretLimits","type":"command","url":"https://community.bistudio.com/wiki/setTurretLimits","revid":379305,"updated":"2026-10-30T23:48:50Z","groups":["Turrets"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","locality":{"argument":"local","effect":"global"},"description":"Sets the rotation and elevation limits for the given turret. The limits are relative to model orientation of the turret. For example to allow 360 degree turning it is enough to set turn limits to (-180, 180). The limits can only be set within the limits defined in config and cannot exceed them. To reset to config defaults pass the turret argument only (Example 2).","syntaxes":[{"syntax":"vehicle setTurretLimits [turret, minTurn, maxTurn, minElev, maxElev, soft]","params":[{"name":"vehicle","type":"Object","description":"vehicle the turret belongs to","type_expr":"Object"},{"name":"turret","type":"Turret Path","description":"turret path","type_expr":"Turret Path"},{"name":"minTurn","type":"Number","description":"from 0 to -angle in degrees (left)","type_expr":"Number"},{"name":"maxTurn","type":"Number","description":"from 0 to +angle in degrees (right)","type_expr":"Number"},{"name":"minElev","type":"Number","description":"from 0 to -angle in degrees (down)","type_expr":"Number"},{"name":"maxElev","type":"Number","description":"from 0 to +angle in degrees (up)","type_expr":"Number"},{"name":"soft","type":"Boolean","optional":true,"default":"false","description":"true to gradually move turret to the new limits (if turret is currenty oriented out of new limts). false to snap to the new limits.","type_expr":"Boolean","since":"arma3 2.22","text":"soft: Boolean - (Optional) true to gradually move turret to the new limits (if turret is currenty oriented out of new limts). false to snap to the new limits. Default: false"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[turret, minTurn, maxTurn, minElev, maxElev, soft]"}},{"syntax":"vehicle setTurretLimits [turret]","params":[{"name":"vehicle","type":"Object","description":"vehicle the turret belongs to","type_expr":"Object"},{"name":"turret","type":"Turret Path","description":"turret path (to reset)","type_expr":"Turret Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[turret]"}}],"examples":[{"code":["m2 setTurretLimits [[0], -45, 45, -10, 10];"]},{"code":["m2 setTurretLimits [[0]]; //reset"]},{"code":["m2 setTurretLimits [[0], -45, 45, -10, 10, true];"]}],"see_also":["getTurretLimits","setTurretOpticsMode","turretLocal","selectWeaponTurret","lockCameraTo"]},{"name":"setTurretOpticsMode","title":"setTurretOpticsMode","type":"command","url":"https://community.bistudio.com/wiki/setTurretOpticsMode","revid":377497,"updated":"2026-01-02T06:49:23Z","groups":["Turrets"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","locality":{"argument":"local","effect":"local"},"description":"Set the current optics mode of the optics in the turret occupied by the specified unit. Alternatively, you can specify a vehicle and turret path instead of a unit. Optic modes refer to the different fields of view (FOV) or zoom levels of an optic.","syntaxes":[{"syntax":"obj setTurretOpticsMode mode","params":[{"name":"obj","type":"Object","type_expr":"Object"},{"name":"mode","type":"Number","description":"optic mode index","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"obj"},"right":{"text":"mode"}},{"syntax":"obj setTurretOpticsMode [turretPath, opticModeIndex]","params":[{"name":"obj","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"},{"name":"opticModeIndex","type":"Number","description":"optic mode index","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"obj"},"right":{"text":"[turretPath, opticModeIndex]"}}],"examples":[{"code":["player setTurretOpticsMode 0;"]},{"code":["myTank setTurretOpticsMode [[-1], 1];"]},{"code":["myAircraft setTurretOpticsMode [[0, 0], 0];"]}],"see_also":["getTurretOpticsMode","turretLocal","selectWeaponTurret","getPilotCameraOpticsMode","setPilotCameraOpticsMode"]},{"name":"setType","title":"setType","type":"command","url":"https://community.bistudio.com/wiki/setType","revid":323021,"updated":"2022-06-28T21:43:07Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Changes a location to the specified class. Location classes are defined in CfgLocationTypes.","syntaxes":[{"syntax":"location setType name","params":[{"name":"location","type":"Location","type_expr":"Location"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"location"},"right":{"text":"name"}}],"examples":[{"code":["myLocation setType \"RockArea\";"]}],"see_also":["type"]},{"name":"setUnconscious","title":"setUnconscious","type":"command","url":"https://community.bistudio.com/wiki/setUnconscious","revid":310114,"updated":"2022-05-05T12:25:30Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"In Arma 2 and since Arma 3 v1.64, this command sets unit into incapacitated state.\nlifeState results:\n\n- Arma 2: \"UNCONSCIOUS\"\n- Arma 3: \"INCAPACITATED\"\n\n> [!NOTE]\n> **Arma 3:** The unit goes in ragdoll mode and animation played while incapacitated depends on the injuries received.","syntaxes":[{"syntax":"unit setUnconscious set","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"set","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"set"}}],"examples":[{"code":["_unit setUnconscious true;"]}],"see_also":["lifeState","incapacitatedState"]},{"name":"setUnitAbility","title":"setUnitAbility","type":"command","url":"https://community.bistudio.com/wiki/setUnitAbility","revid":379387,"updated":"2026-10-30T23:59:44Z","groups":["AI Behaviour"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Sets skill of given unit. Unlike setSkill, setUnitAbility can set values > 1. Even though the skill command will correctly return set value, the actual unit ability will be capped to max available.","syntaxes":[{"syntax":"unit setUnitAbility value","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"value"}}],"examples":[{"code":["_unit setUnitAbility 1;"]},{"code":["bob setUnitAbility -log 0;\nhint str skill bob; //1.#INF"]}],"see_also":["skill","setSkill","CfgAISkill","Combat Modes"],"notes":[{"user":"Dwarden","date":"2014-10-08T09:20:00Z","text":"AFAIK not used in Arma 3 anymore (or equals to setSkill)"}],"categories_extra":["AI"]},{"name":"setUnitCombatMode","title":"setUnitCombatMode","type":"command","url":"https://community.bistudio.com/wiki/setUnitCombatMode","revid":322932,"updated":"2022-06-28T21:42:41Z","groups":["AI Behaviour"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Sets **unit's** combat mode (engagement rules). For AI group combat mode see setCombatMode. Mode may be one of the following:\n\n- `\"BLUE\"` : Never fire, keep formation\n- `\"GREEN\"` : Hold fire, keep formation\n- `\"WHITE\"` : Hold fire, engage at will/loose formation\n- `\"YELLOW\"` : Fire at will, keep formation\n- `\"RED\"` : Fire at will, engage at will/loose formation\n\nSee Combat Modes for more information on combat modes.","syntaxes":[{"syntax":"unit setUnitCombatMode mode","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"mode","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"mode"}}],"examples":[{"code":["_unit setUnitCombatMode \"YELLOW\";"]}],"see_also":["unitCombatMode","setCombatMode","combatMode"]},{"name":"setUnitFreefallHeight","title":"setUnitFreefallHeight","type":"command","url":"https://community.bistudio.com/wiki/setUnitFreefallHeight","revid":364759,"updated":"2024-06-07T23:35:13Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","locality":{"argument":"local","effect":"global"},"description":"Sets minimum freefall height AGL per unit, at which the unit assumes HALO pose. Engine default is 100m. Use -1 to reset the height to default.","syntaxes":[{"syntax":"unit setUnitFreefallHeight minHeight","params":[{"name":"unit","type":"Object","description":"unit","type_expr":"Object"},{"name":"minHeight","type":"Number","description":"min freefall height, -1 to set default","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"minHeight"}}],"examples":[{"code":["player setUnitFreefallHeight 1000;"]}],"see_also":["getUnitFreefallInfo","getPosASL","ASLToAGL"],"notes":[{"user":"Hypoxic125","date":"2024-06-07T23:35:13Z","text":"For player units, you must reapply setUnitFreefallHeight upon respawning."}]},{"name":"setUnitLoadout","title":"setUnitLoadout","type":"command","url":"https://community.bistudio.com/wiki/setUnitLoadout","revid":370162,"updated":"2024-11-02T23:29:35Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","locality":{"argument":"global","effect":"global"},"description":"Creates a loadout from given inventory structure and applies it to a unit.\nWhen String for class name is supplied, the command will search `CfgVehicles` for the given class in order to extract the loadout from config.\nIf Config is given, it will search given config (including mission config) for the loadout information.\nIn either case, the config should contain the following entries, which is standard for any unit class, for example:\n\n```cpp\nclass MyLoadout\n{\n    uniformClass = \"U_B_CombatUniform_mcam\";\n    backpack = \"B_AssaultPack_mcamo\";\n    linkedItems[] = { \"V_PlateCarrier1_rgr\", \"H_HelmetB\", \"ItemCompass\", \"ItemWatch\", \"ItemRadio\", \"NVGoggles\" };\n    weapons[] = { \"arifle_MX_ACO_pointer_F\", \"hgun_P07_F\" };\n    items[] = { \"FirstAidKit\", \"FirstAidKit\", \"FirstAidKit\" };\n    magazines[] = {\n        \"30Rnd_65x39_caseless_mag\", \"16Rnd_9x21_Mag\", \"SmokeShell\",\n        \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\",\n        \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\",\n        \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\",\n        \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\",\n        \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\"\n    };\n};\n```\n\n> [!IMPORTANT]\n> Since Arma 3 v2.20 if the command is executed while the unit is in the process of switching weapon, the command will be aborted. To check if unit is switching weapon use isSwitchingWeapon.","syntaxes":[{"syntax":"unit setUnitLoadout loadout","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"loadout","type":"Array","description":"Unit Loadout Array","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"loadout"}},{"syntax":"unit setUnitLoadout [loadout, fullMagazines]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"loadout","type":"Array","description":"Unit Loadout Array","type_expr":"Array"},{"name":"fullMagazines","type":"Boolean","description":"partially emptied magazines will be refilled when the loadout is applied","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[loadout, fullMagazines]"}},{"syntax":"unit setUnitLoadout name","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"name","type":"String","description":"class name (see description)","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"name"}},{"syntax":"unit setUnitLoadout config","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"config","type":"Config","description":"config class (see description)","type_expr":"Config"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"config"}}],"examples":[{"text":"```sqf\n_unit setUnitLoadout \"B_Soldier_F\";                                        // by class name\n_unit setUnitLoadout (configFile >> \"CfgVehicles\" >> \"B_Soldier_F\");    // by config entry\n_unit setUnitLoadout (missionConfigFile >> \"MyLoadout\");                // (also works for mission config)\n_unit setUnitLoadout getUnitLoadout _otherUnit;                            // by loadout array\n```","code":["_unit setUnitLoadout \"B_Soldier_F\";\t\t\t\t\t\t\t\t\t\t// by class name\n_unit setUnitLoadout (configFile >> \"CfgVehicles\" >> \"B_Soldier_F\");\t// by config entry\n_unit setUnitLoadout (missionConfigFile >> \"MyLoadout\");\t\t\t\t// (also works for mission config)\n_unit setUnitLoadout getUnitLoadout _otherUnit;\t\t\t\t\t\t\t// by loadout array"]},{"text":"```sqf\nplayer_2 setUnitLoadout (getUnitLoadout player_1);            // Copies loadout from player_1 and applies it to player_2\nplayer_2 setUnitLoadout [getUnitLoadout player_1, true];    // Copies loadout from player_1 and applies it to player_2 while topping up all magazines\n```","code":["player_2 setUnitLoadout (getUnitLoadout player_1);\t\t\t// Copies loadout from player_1 and applies it to player_2\nplayer_2 setUnitLoadout [getUnitLoadout player_1, true];\t// Copies loadout from player_1 and applies it to player_2 while topping up all magazines"]},{"text":"Strip unit of everything:\n\n```sqf\n_unit setUnitLoadout (configFile >> \"EmptyLoadout\");\n```","code":["_unit setUnitLoadout (configFile >> \"EmptyLoadout\");"]},{"text":"Make sure the unit is not switching weapon:\n\n```sqf\nplayer spawn\n{\n    waitUntil {!isSwitchingWeapon _this};\n    _this setUnitLoadout (configFile >> \"EmptyLoadout\");\n};\n```","code":["player spawn \n{\n\twaitUntil {!isSwitchingWeapon _this};\n\t_this setUnitLoadout (configFile >> \"EmptyLoadout\");\n};"]}],"problems":"> [!IMPORTANT]\n> If this command is used on the player, it makes the inventory window bug (if opened) - vest and backpack tabs disappear. Closing and re-opening the inventory solves the issue.","see_also":["getUnitLoadout","isSwitchingWeapon"],"notes":[{"user":"Demellion","date":"2019-12-17T23:08:00Z","text":"Empty or used magazines in loadouts will be refilled under specific circumstance, even if the refill argument is false. This seems to happen if amount of used magazines is 2 or more.\n\n```sqf\nplayer setUnitLoadout [\n    [\"arifle_MX_ACO_pointer_F\", \"\", \"acc_pointer_IR\", \"optic_Aco\", [], [], \"\"],\n    [],\n    [\"hgun_P07_F\", \"\", \"\", \"\", [\"16Rnd_9x21_Mag\", 16], [], \"\"],\n    [\"U_B_CombatUniform_mcam\", [[\"30Rnd_65x39_caseless_mag\", 1, 1]]],\n    [\"V_PlateCarrier1_rgr\", []],\n    [\"B_AssaultPack_mcamo_Ammo\", []],\n    \"H_HelmetB_grass\", \"\", [], [\"ItemMap\", \"\", \"ItemRadio\", \"ItemCompass\", \"ItemWatch\", \"NVGoggles\"]\n];\n```\n\nWill result in 30Rnd magazine with one bullet in it.\n\n```sqf\nplayer setUnitLoadout [\n    [\"arifle_MX_ACO_pointer_F\", \"\", \"acc_pointer_IR\", \"optic_Aco\", [], [], \"\"],\n    [],\n    [\"hgun_P07_F\", \"\", \"\", \"\", [\"16Rnd_9x21_Mag\", 16], [], \"\"],\n    [\"U_B_CombatUniform_mcam\", [[\"30Rnd_65x39_caseless_mag\", 2, 1]]],\n    [\"V_PlateCarrier1_rgr\", []],\n    [\"B_AssaultPack_mcamo_Ammo\", []],\n    \"H_HelmetB_grass\", \"\", [], [\"ItemMap\", \"\", \"ItemRadio\", \"ItemCompass\", \"ItemWatch\", \"NVGoggles\"]\n];\n```\n\nWill result in 2 magazines but full, 30 rounds in it. This applies to any magazines count >2. They will never be with specified amount of rounds, even if you force the refill argument to false."},{"user":"Andrew_S90","date":"2020-10-23T21:16:00Z","text":"Here is a command I wrote up that provides a fix for the ammo bug described by Demellion above.\nhttps://pastebin.com/SHX41Jkk\nPass a loadout to your compiled command and it will provide one back that will not refill ammo."},{"user":"POLPOX","date":"2022-08-23T08:27:09Z","text":"```sqf\nplayer setUnitLoadout [\n    nil, nil, nil, nil, nil,\n    [\"B_Bergen_sgg\", nil],\n    nil, nil, nil, nil\n];\n```\n\nYou can use nil to skip some desired parameter. The skipped part will be ignored and remain the same with old loadout.\nThis method is *very slightly* faster than the latter method:\n\n```sqf\nprivate _loadout = getUnitLoadout player;\n_loadout#5 set [0, \"B_Bergen_mcamo_F\"];\nplayer setUnitLoadout _loadout;\n```"}]},{"name":"setUnitPos","title":"setUnitPos","type":"command","url":"https://community.bistudio.com/wiki/setUnitPos","revid":379470,"updated":"2026-10-31T00:10:48Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Set unit position rules. This command will not change the stance of the human player, even though it will change the output of unitPos command. To change player stance use playAction or playActionNow:\n\n```sqf\nplayer playAction \"PlayerProne\"; // DOWN\nplayer playAction \"PlayerStand\"; // UP\nplayer playAction \"PlayerCrouch\"; // MIDDLE\n```","syntaxes":[{"syntax":"unit setUnitPos mode","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"mode","type":"String","description":"can be:\n\n- \"DOWN\" - Unit goes prone and stays prone.\n- \"UP\" - Unit stands and stays standing.\n- \"MIDDLE\" - Kneel Position. Armed Assault v1.04 - Unit will not kneel if it is unarmed\n- \"AUTO\" - Unit chooses mode according to circumstances.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"mode"}}],"examples":[{"code":["_soldier setUnitPos \"UP\";"]}],"see_also":["setUnitPosWeak","unitPos"],"notes":[{"user":"Dwarden","date":"2008-09-18T00:00:00Z","text":"Command most likely only works if run before join into group after createUnit."},{"user":".kju","date":"2011-03-11T00:00:00Z","text":"The above comment by Dwarden about 'an additional join required' is no longer true for Operation Arrowhead."},{"user":"Katulobotomia","date":"2013-09-26T00:00:00Z","text":"A unit might not always go prone when ordered to setUnitPos \"DOWN\", if the unit doesn't agree with the command. To force the unit to go prone, stop the unit from firing by setCombatMode \"BLUE\" and then order the unit to prone."}]},{"name":"setUnitPosWeak","title":"setUnitPosWeak","type":"command","url":"https://community.bistudio.com/wiki/setUnitPosWeak","revid":369195,"updated":"2024-09-03T10:34:47Z","groups":["Unit Control"],"status":"ok","games":{"arma1":"1.04","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.04","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Set unit position rules. This command is the lowest level of priority for setting unit position and to be used in scripted\nFSM's. Priorities are:\n\n1. Unit pos commanded (from the commanding menu, higher priority).\n1. Unit pos scripted (from setUnitPos scripting command, medium priority).\n1. Unit pos FSM / **setUnitPosWeak** (used in the formation FSM, lowest priority).","syntaxes":[{"syntax":"unit setUnitPosWeak mode","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"mode","type":"String","description":"can be:\n\n- \"DOWN\" - Unit goes prone and stays prone.\n- \"UP\" - Unit stands and stays standing.\n- \"MIDDLE\" - Kneel Position. Armed Assault v1.04 - Unit will not kneel if it is unarmed\n- \"AUTO\" - Unit chooses mode according to circumstances.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"mode"}}],"examples":[{"code":["_soldier disableAI \"FSM\";\n_soldier setUnitPosWeak \"DOWN\";"]}],"see_also":["FSM","doFSM","setUnitPos","unitPos"]},{"name":"setUnitRank","title":"setUnitRank","type":"command","url":"https://community.bistudio.com/wiki/setUnitRank","revid":340312,"updated":"2023-04-29T17:03:09Z","groups":["Unit Identity"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Sets rank of given unit.\n\nPossible rank values, and the associated rating that is **set** (not added, the value replaces previous rating) with it:\n\n| Ranks |  | PRIVATE | CORPORAL | SERGEANT | LIEUTENANT | CAPTAIN | MAJOR | COLONEL |\n|---|---|---|---|---|---|---|---|---|\n| Ratings | ArmA<br>Arma 2<br>Arma 2:OA<br>TKOH | 0 | 500 | 1500 | 2500 | 3500 | 5000 | 7500 |\n| Ratings | Arma 3 (ca 2015) | 0 | 50 | 150 | 250 | 350 | 500 | 750 |\n| Ratings | Arma 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |\n\n> [!NOTE]\n> **Arma 3:** Before Arma 3 v1.68 and in previous titles, this command was Global argument Local effect.","syntaxes":[{"syntax":"unitName setUnitRank rank","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"rank","type":"String","description":"see above. If a wrong string is provided, the command errors and reverts to using \"PRIVATE\"","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"rank"}}],"examples":[{"code":["player setUnitRank \"COLONEL\";"]}],"see_also":["ArmA: Armed Assault: Rating Values","rating","addRating","rank","setRank"]},{"name":"setUnitRecoilCoefficient","title":"setUnitRecoilCoefficient","type":"command","url":"https://community.bistudio.com/wiki/setUnitRecoilCoefficient","revid":379388,"updated":"2026-10-30T23:59:52Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Proportionaly increase/decrease unit's recoil. Drives muzzle up with every shot when supplied positive number and down when negative. 0 cancels recoil.","syntaxes":[{"syntax":"unitName setUnitRecoilCoefficient coefficient","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"coefficient","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"coefficient"}}],"examples":[{"code":["player setUnitRecoilCoefficient 10;"]}],"see_also":["unitRecoilCoefficient"],"notes":[{"user":"Benargee","date":"2015-03-28T11:50:00Z","text":"Doesnt seem to work on AI or remote controlled units. Setting the value too high, positive or negative produces some interesting recoil animations."}]},{"name":"setUnitTrait","title":"setUnitTrait","type":"command","url":"https://community.bistudio.com/wiki/setUnitTrait","revid":379077,"updated":"2026-09-26T23:03:38Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","locality":{"argument":"local","effect":"global"},"description":"Enables or disables a trait or alters a trait of the given unit. Unit traits consist of unit abilities, which are Booleans and modifiers, which are Numbers. Custom trait can only be a bool.\n\n> [!NOTE]\n> The command can also be used on vehicles (and drones), and it will get applied to the effectiveCommander of the vehicle. In addition, if the effectiveCommander has a trait, it will get applied to the entire vehicle (for example, the vehicle can become harder to spot due to low **camouflageCoef**)\n\nAbilities:\n\n- Boolean **engineer** - Ability to partially repair vehicles with toolkit, equivalent to `engineer = 1;` in CfgVehicles\n- Boolean **explosiveSpecialist** - Ability to defuse mines with toolkit, equivalent to `canDeactivateMines = 1;` in CfgVehicles\n- Boolean **medic** - Ability to treat self and others with medikit, equivalent to `attendant = 1;` in CfgVehicles\n- Boolean **UAVHacker** - Ability to hack enemy and friendly drones, equivalent to `uavHacker = 1;` in CfgVehicles\n\nModifiers:\n\n- Number **audibleCoef** - A lower value means the unit is harder to hear\n- Number **camouflageCoef** - A lower value means the unit is harder to spot\n- Number **loadCoef** - Equipment weight multiplier affecting stamina regeneration and max stamina\n- Number **staminaDrainCoef** - Since Arma 3 v2.22, Influences how quickly stamina is drained. **Do not set negative values!**","syntaxes":[{"syntax":"unit setUnitTrait [skillName, value, isCustom]","params":[{"name":"unit","type":"Object","description":"the unit whose trait should be set","type_expr":"Object"},{"name":"skillName","type":"String","description":"name of the skill","type_expr":"String"},{"name":"value","type":"Boolean or Number","description":"value (see above)","type_expr":"Boolean | Number"},{"name":"isCustom","type":"Boolean","optional":true,"description":"Must be set to true in case of custom","type_expr":"Boolean","text":"isCustom: Boolean - (Optional) Must be set to true in case of custom"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[skillName, value, isCustom]"}}],"examples":[{"code":["player setUnitTrait [\"Medic\", true];"]}],"see_also":["getUnitTrait","getAllUnitTraits"],"notes":[{"user":"R3vo","date":"2016-04-27T18:12:00Z","text":"The higher the value for the loadCoef the less stamina a unit has. Negative values will dramatically increase the stamina actually to a point where it extends the stamina bar."},{"user":"Midnight","date":"2017-10-20T05:49:00Z","text":"The `explosiveSpecialist` trait can defuse mines (i.e. satchel charges), whilst the engineer trait alone cannot."},{"user":"Honger","date":"2026-09-26T23:03:38Z","text":"Setting **staminaDrainCoef** to a negative value will gradually replenish stamina/reduce fatigue when running/sprinting. Walking or standing will not be affected."}]},{"name":"setUnloadInCombat","title":"setUnloadInCombat","type":"command","url":"https://community.bistudio.com/wiki/setUnloadInCombat","revid":336388,"updated":"2022-12-31T20:54:06Z","groups":["Unit Control"],"status":"ok","games":{"arma3":"1.36"},"since":"arma3 1.36","arma3_since":"1.36","locality":{"argument":"local","effect":"global"},"description":"Sets whether or not cargo or turret units *should* get out of vehicle when in combat. If **true**, vehicle will stop and units will dismount. Vehicle must be local. The command resets last time unit had reacted to an enemy as well as forcing orderGetIn false if canUnloadInCombat is permitted by config","syntaxes":[{"syntax":"vehicle setUnloadInCombat [allowCargo, allowTurrets]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"allowCargo","type":"Boolean","type_expr":"Boolean"},{"name":"allowTurrets","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[allowCargo, allowTurrets]"}}],"examples":[{"code":["_veh setUnloadInCombat [true, false];"]}],"see_also":["getUnloadInCombat","canUnloadInCombat","allowCrewInImmobile","isAllowedCrewInImmobile"]},{"name":"setUserActionText","title":"setUserActionText","type":"command","url":"https://community.bistudio.com/wiki/setUserActionText","revid":369154,"updated":"2024-09-03T10:34:39Z","groups":["Interaction"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Changes user added action (see addAction) menu item text.","syntaxes":[{"syntax":"object setUserActionText [actionIndex, textMenu, textWindowBackground, textWindowForeground]","params":[{"name":"object","type":"Object","description":"object the action is added to","type_expr":"Object"},{"name":"actionIndex","type":"Number","description":"action id returned by addAction","type_expr":"Number"},{"name":"textMenu","type":"String or Structured Text","description":"text title shown in scroll action menu","type_expr":"String | Structured Text"},{"name":"textWindowBackground","type":"String or Structured Text","optional":true,"default":"\"\"","description":"background text","type_expr":"String | Structured Text","since":"arma3 1.62","text":"textWindowBackground: String or Structured Text - (Optional, default \"\") background text"},{"name":"textWindowForeground","type":"String or Structured Text","optional":true,"default":"\"\"","description":"foreground text","type_expr":"String | Structured Text","since":"arma3 1.62","text":"textWindowForeground: String or Structured Text - (Optional, default \"\") foreground text"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[actionIndex, textMenu, textWindowBackground, textWindowForeground]"}}],"examples":[{"code":["_id = player addAction [\"Hello\", \"\"];\nplayer setUserActionText [_id, \"Good Bye\"];"]},{"text":"```sqf\n_id = billboard addAction [\"Some Action\", {}];\nbillboard setUserActionText [\n    _id,\n    \"Some Action\",\n    \"<t color='#ff0000'>Background-----------------</t><br>Multiline<br>Multiline<br>Multiline<br>. . .\",\n    \"<t color='#00ff00'>-----------------Foreground</t>\"\n];\n```","code":["_id = billboard addAction [\"Some Action\", {}];\nbillboard setUserActionText [\n\t_id, \n\t\"Some Action\", \n\t\"<t color='#ff0000'>Background-----------------</t><br>Multiline<br>Multiline<br>Multiline<br>. . .\", \n\t\"<t color='#00ff00'>-----------------Foreground</t>\"\n];"]}],"see_also":["actionIDs","actionParams","addAction","inGameUISetEventHandler","showHUD","inputAction","removeAction","removeAllActions","action"]},{"name":"setUserMFDText","title":"setUserMFDText","type":"command","url":"https://community.bistudio.com/wiki/setUserMFDText","revid":309223,"updated":"2022-05-04T10:05:28Z","groups":["GUI Control"],"status":"ok","games":{"arma3":"1.78"},"since":"arma3 1.78","arma3_since":"1.78","description":"Stored user text value in MFD, limit is 50, user0...user49","syntaxes":[{"syntax":"vehicle setUserMFDText [index, value]","params":[{"name":"vehicle","type":"Object","description":"vehicle with MFD","type_expr":"Object"},{"name":"index","type":"Number","type_expr":"Number"},{"name":"value","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[index, value]"}}],"examples":[{"code":["_vehicle setUserMFDText [0, \"some text\"];"]}],"see_also":["getUserMFDText","setUserMFDValue","getUserMFDValue"]},{"name":"setUserMFDValue","title":"setUserMFDValue","type":"command","url":"https://community.bistudio.com/wiki/setUserMFDValue","revid":373032,"updated":"2025-03-18T16:50:36Z","groups":["Interaction"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"When MFD is using user controllers, this command can set values on them. For example, MFD config for Blackfoot has an entry\n\n```cpp\n// ...\nclass Draw\n{\n    alpha = \"user3\";\n    color[] = {\"user0\",\"user1\",\"user2\"};\n// ...\n```\n\nwhich could control color of the MFD. See Example 2-3-4 on how to set different colors of the Blackfoot MFD\n\n> [!NOTE]\n> **Since Arma 3 v2.20:** Vehicles can be configured to support more than 50 user sources with \"mfdMaxUserValues = 50\" entry in CfgVehicles config class. As of 2.20 the limit is 256. It is recommended to configure this also for vehicles that use fewer MFD sources, it improves performance to only set as many as are being used.","syntaxes":[{"syntax":"vehicle setUserMFDValue [index, value]","params":[{"name":"vehicle","type":"Object","description":"an vehicle with MFD","type_expr":"Object"},{"name":"index","type":"Number","description":"index of custom MFD user actions","type_expr":"Number"},{"name":"value","type":"Number","description":"value which should custom source return in MFD","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[index, value]"}}],"examples":[{"code":["BIS_Plane setUserMFDValue [0,1]; // user0 in MFD will return 1"]},{"text":"Set MFD Red:\n\n```sqf\nBlackfoot setUserMFDValue [0, 1];    // \"user0\" - 1\nBlackfoot setUserMFDValue [1, 0];    // \"user1\" - 0\nBlackfoot setUserMFDValue [2, 0];    // \"user2\" - 0\nBlackfoot setUserMFDValue [3, 1];    // \"user3\" - 1\n```","code":["Blackfoot setUserMFDValue [0, 1];\t// \"user0\" - 1\nBlackfoot setUserMFDValue [1, 0];\t// \"user1\" - 0\nBlackfoot setUserMFDValue [2, 0];\t// \"user2\" - 0\nBlackfoot setUserMFDValue [3, 1];\t// \"user3\" - 1"]},{"text":"Set MFD pale Blue:\n\n```sqf\nBlackfoot setUserMFDValue [0, 0];    // \"user0\" - 0\nBlackfoot setUserMFDValue [1, 0];    // \"user1\" - 0\nBlackfoot setUserMFDValue [2, 1];    // \"user2\" - 1\nBlackfoot setUserMFDValue [3, 0.1];    // \"user3\" - 0.1\n```","code":["Blackfoot setUserMFDValue [0, 0];\t// \"user0\" - 0\nBlackfoot setUserMFDValue [1, 0];\t// \"user1\" - 0\nBlackfoot setUserMFDValue [2, 1];\t// \"user2\" - 1\nBlackfoot setUserMFDValue [3, 0.1];\t// \"user3\" - 0.1"]},{"text":"Hide MFD:\n\n```sqf\nBlackfoot setUserMFDValue [3, 0];    // \"user3\" - 0\n```","code":["Blackfoot setUserMFDValue [3, 0];\t// \"user3\" - 0"]},{"text":"Arma 3 v1.72 multiple changes at once:\n\n```sqf\nmyPlane setUserMFDValue [10, 16, 404, 64];    // \"user10\" - 16\n                                            // \"user11\" - 404\n                                            // \"user12\" - 64\n```","code":["myPlane setUserMFDValue [10, 16, 404, 64];\t// \"user10\" - 16\n\t\t\t\t\t\t\t\t\t\t\t// \"user11\" - 404\n\t\t\t\t\t\t\t\t\t\t\t// \"user12\" - 64"]}],"see_also":["getUserMFDValue","setUserMFDText","getUserMFDText"]},{"name":"setVariable","title":"setVariable","type":"command","url":"https://community.bistudio.com/wiki/setVariable","revid":379306,"updated":"2026-10-30T23:48:58Z","groups":["Variables","Namespaces","Multiplayer"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Set variable to given value in the variable space of given element. Can be used to broadcast variables over the network.\nTo remove a variable, set it to nil (see Example 5) - note that this does not work on Object and scripted Location namespaces (the variable will be set to nil but will remain listed by allVariables).\n\n> [!WARNING]\n> missionNamespace, uiNamespace, parsingNamespace and profileNamespace variables **cannot** be named as commands - e.g `missionNamespace setVariable [\"west\", 123];` conflicts with the west command and will result in a `Reserved variable in expression` error, west being a scripting command (other namespaces do not have such limitation).\n> See also all available script commands.","syntaxes":[{"syntax":"varspace setVariable [name, value, public]","params":[{"name":"varspace","description":"variable space in which variable can be set. Can be one of:\n\n- Namespace\n- Object\n  - ✓ Arma 3 v2.10 `CfgAmmo` Objects (bullets, mines etc)\n  - ✗ `CfgNonAIVehicles` Objects (butterflies, proxies etc - `EmptyDetector`s (triggers) work)\n  - ✗ `#local` Objects (`#lightpoint`, `#soundsource` etc - see createVehicleLocal)\n- Group\n- Location (Arma 3 v2.10 scripted ones only)\n- Arma 2 v1.00 Team Member\n- Arma 2 v1.00 Task - *value* will actually be set on the Task's FSM **if** it exists.\n- Arma 3 v0.50 Control\n- Arma 3 v0.50 Display","type_expr":"Namespace | Object | Group | Location | Team Member | Task | Control | Display","text":"varspace: variable space in which variable can be set. Can be one of:\n\n- Namespace\n- Object\n  - ✓ Arma 3 v2.10 `CfgAmmo` Objects (bullets, mines etc)\n  - ✗ `CfgNonAIVehicles` Objects (butterflies, proxies etc - `EmptyDetector`s (triggers) work)\n  - ✗ `#local` Objects (`#lightpoint`, `#soundsource` etc - see createVehicleLocal)\n- Group\n- Location (Arma 3 v2.10 scripted ones only)\n- Arma 2 v1.00 Team Member\n- Arma 2 v1.00 Task - *value* will actually be set on the Task's FSM **if** it exists.\n- Arma 3 v0.50 Control\n- Arma 3 v0.50 Display"},{"name":"name","type":"String","description":"variable name (Identifier)","type_expr":"String"},{"name":"value","type":"Anything","description":"variable value","type_expr":"Anything"},{"name":"public","type":"Boolean, Number or Array of Numbers","optional":true,"default":"false","description":"can be one of:\n\n- Boolean - if set to true, the variable is broadcast globally and is persistent (JIP compatible) Global effect\n- Number - the variable is only set on the client with the given Machine network ID. If the number is negative, the variable is set on every client except for the one with the given ID.\n- Array of Numbers - array of Machine network IDs\n\nThis parameter is only available if the **varspace** parameter is a Namespace, Object or Group. Furthermore, only the following Data Types can be broadcast:\n\n|  |  |  |  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|---|---|---|\n| Type | Number | Boolean | Object | Group | String | Text | Array | Code | Nothing (nil) | HashMap |\n| Since | Armed Assault v1.00 |  |  |  |  |  | Armed Assault v1.09 |  | Arma 3 v1.26 | Arma 3 v2.02 |","type_expr":"Boolean | Number | Array<Number>","since":"arma2 1.00","text":"public: Boolean, Number or Array of Numbers - (Optional, default false) can be one of:\n\n- Boolean - if set to true, the variable is broadcast globally and is persistent (JIP compatible) Global effect\n- Number - the variable is only set on the client with the given Machine network ID. If the number is negative, the variable is set on every client except for the one with the given ID.\n- Array of Numbers - array of Machine network IDs\n\nThis parameter is only available if the **varspace** parameter is a Namespace, Object or Group. Furthermore, only the following Data Types can be broadcast:\n\n|  |  |  |  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|---|---|---|\n| Type | Number | Boolean | Object | Group | String | Text | Array | Code | Nothing (nil) | HashMap |\n| Since | Armed Assault v1.00 |  |  |  |  |  | Armed Assault v1.09 |  | Arma 3 v1.26 | Arma 3 v2.02 |"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"varspace"},"right":{"text":"[name, value, public]"}}],"examples":[{"code":["_myTruck setVariable [\"TAG_myPublicVariable\", 123, true];"]},{"code":["_myTruck setVariable [\"TAG_myLocalVariable\", [\"321\", _var], owner driver _myTruck];"]},{"code":["missionNamespace setVariable [\"TAG_myName\", \"Brian\"];\nhint TAG_myName; // hints \"Brian\""]},{"text":"Get the current value of a variable or, if it is undefined, define it and then get the value:\n\n```sqf\nprivate _var = missionNamespace getVariable \"VarName\";\nif (isNil \"_var\") then\n{\n    _var = 123;\n    missionNamespace setVariable [\"VarName\", _var];\n};\n// _var now contains the current value of the missionNamespace's variable varName\n```","code":["private _var = missionNamespace getVariable \"VarName\";\nif (isNil \"_var\") then\n{\n\t_var = 123;\n\tmissionNamespace setVariable [\"VarName\", _var];\n};\n// _var now contains the current value of the missionNamespace's variable varName"]},{"text":"Remove `TAG_myPublicVariable` from missionNamespace (globally):\n\n```sqf\nmissionNamespace setVariable [\"TAG_myPublicVariable\", nil, true];\n```","code":["missionNamespace setVariable [\"TAG_myPublicVariable\", nil, true];"]}],"see_also":["getVariable","allVariables","setFSMVariable"],"notes":[{"user":"Killswitch","date":"2007-08-18T09:51:00Z","text":"According to Suma, beginning with ArmA version 1.08:\n\n> « setVariable now should work on any entity which can be targeted by AI, including soldier and game logic units. This includes most buildings, but not other static objects.\n> **Using it with buildings one should be aware the building may be discarded because of streaming**. In such case the variable space is lost. When used for buildings, the storage should therefore be considered non-reliable. » – Suma (source)"},{"user":"Commy2","date":"2015-12-09T20:18:00Z","text":"This command does not work with CfgAmmo or CfgNonAIVehicles objects, like bullets, mines or butterflies."},{"user":"Leopard20","date":"2022-03-23T08:59:50Z","text":"Since Arma 3 v2.10 setVariable works on CfgAmmo objects (such as bullets, missiles, grenades, mines, etc) as well."}]},{"name":"setVectorDir","title":"setVectorDir","type":"command","url":"https://community.bistudio.com/wiki/setVectorDir","revid":377248,"updated":"2026-01-02T05:42:47Z","groups":["Math - Vectors"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Set object's direction vector. Up vector will remain unchanged.","syntaxes":[{"syntax":"object setVectorDir vectorDir","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"vectorDir","type":"Vector3D","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"vectorDir"}}],"examples":[{"code":["player setVectorDir [5,6,1];"]},{"code":["// provided _myMine is local\n_myMine setVectorDir [0.3, 1, 0];\n_myMine setPosWorld getPosWorld _myMine; // synchronises the mine's direction over the network (special case)"]}],"problems":"The effect is Local effect when using setVectorDir on a mine. Use a position modification to broadcast setVectorDir's change (see Example 2).","see_also":["vectorDir","vectorUp","setVectorUp","setVectorDirAndUp","vectorDiff","vectorAdd","vectorMultiply","vectorCrossProduct","vectorDistance","vectorMagnitudeSqr","vectorDistanceSqr","vectorCos","vectorMagnitude","vectorDotProduct","vectorNormalized","vectorFromTo"],"notes":[{"user":"Str","date":"2008-03-16T09:50:00Z","text":"Command can be also used to rotate camera in all three axis."},{"user":"General Barron","date":"2009-03-03T21:06:00Z","text":"setVectorDir can only influence an object's pitch. It can not influence bank. Example:\n\n```sqf\nplayer setVectorDir [0,0,1];\n```\n\n- If the player is facing 0 degrees (north), then this will do NOTHING.\n- If the player is facing 90 degrees (east), then this will make him pitch 90 degrees up.\n\nYou can't directly pitch an object beyond 90 degrees, because this would change its facing direction. You must first flip it is direction using setDir, then you must bank the object 180 degrees, THEN you pitch the object appropriately."},{"user":"DreadedEntity","date":"2015-08-17T03:27:00Z","text":"In Arma 3, setVectorDir does not control an object's pitch or bank, in fact, it is not possible to change either of those solely using setVectorDir. This command can only affect horizontal rotation along the x-plane, unless an object first has it is vectorUp changed to something other than [0,0,1]. Correct input to setVectorDir should be calculated using the trigonometric functions sin and cos.\n\nexamples:\n\n```sqf\n// 0 degrees (north)\nplayer setVectorDir\n[\n    sin 0, // equals 0\n    cos 0, // equals 1\n    1\n];\n// 45 degrees (north-east)\nplayer setVectorDir\n[\n    sin 45, // equals 0.707\n    cos 45, // equals 0.707\n    1\n];\n```\n\nIf you are doing trigonometric calculations, it may be better to use setVectorDir rather than setDir, since sine and cosine have already been calculated and will not need to be re-calculated\n(also, setDir probably uses setVectorDir anyway.)"}]},{"name":"setVectorDirAndUp","title":"setVectorDirAndUp","type":"command","url":"https://community.bistudio.com/wiki/setVectorDirAndUp","revid":378407,"updated":"2026-04-04T08:14:53Z","groups":["Math - Vectors"],"status":"ok","games":{"arma1":"1.09","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.09","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets orientation of an object.\n\nThe command takes 2 vector arrays, one for vectorDir and one for vectorUp.\nDefault object orientation will always have vectorDir pointing forward (North) along Y axis and vectorUp pointing up along Z axis - [[0,1,0],[0,0,1]], as shown on the diagram below (see also BIS_fnc_transformVectorDirAndUp).\n\nWhen attaching object to an object the axes are relative to the object that gets the attachment.\nIf it is player object for example, then X goes from left to right, Y goes from back to front, and Z goes from down up.\n\nThe setDir command is incompatible with setVectorDirAndUp and should not be used together on the same object.\nUsing setVectorDirAndUp alone should be sufficient for any orientation.","syntaxes":[{"syntax":"vehicle setVectorDirAndUp [vectorDir, vectorUp]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"vectorDir","type":"Vector3D","description":"vectorDir","type_expr":"Vector3D"},{"name":"vectorUp","type":"Vector3D","description":"vectorUp","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[vectorDir, vectorUp]"}}],"examples":[{"text":"```sqf\n// set exact yaw, pitch, and roll\n_yaw = 45; _pitch = -80; _roll = 0;\n_myObject setVectorDirAndUp [\n    [sin _yaw * cos _pitch, cos _yaw * cos _pitch, sin _pitch],\n    [[sin _roll, -sin _pitch, cos _roll * cos _pitch], -_yaw] call BIS_fnc_rotateVector2D\n];\n```","code":["// set exact yaw, pitch, and roll\n_yaw = 45; _pitch = -80; _roll = 0;\n_myObject setVectorDirAndUp [\n\t[sin _yaw * cos _pitch, cos _yaw * cos _pitch, sin _pitch],\n\t[[sin _roll, -sin _pitch, cos _roll * cos _pitch], -_yaw] call BIS_fnc_rotateVector2D\n];"]},{"text":"To rotate _myObject on Z axis 90 degrees clockwise, change its vectorDir but leave vectorUp unchanged.\n\n```sqf\n_myObject setVectorDirAndUp [[1,0,0], [0,0,1]];\n```","code":["_myObject setVectorDirAndUp [[1,0,0], [0,0,1]];"]},{"text":"To rotate _myObject on Y axis 90 degrees clockwise, change its vectorUp but leave vectorDir unchanged.\n\n```sqf\n_myObject setVectorDirAndUp [[0,1,0], [1,0,0]];\n```","code":["_myObject setVectorDirAndUp [[0,1,0], [1,0,0]];"]},{"text":"To rotate _myObject on X axis 90 degrees (tilt forward), change both vectorDir and vectorUp accordingly.\n\n```sqf\n_myObject setVectorDirAndUp [[0,0,-1], [0,1,0]];\n```","code":["_myObject setVectorDirAndUp [[0,0,-1], [0,1,0]];"]},{"text":"More complex orientations\n\n```sqf\n// tilt forward 90 + rotate left 90\n_myObject setVectorDirAndUp [[1,0,0], [0,1,0]];\n// tilt backward 45 degrees\n_myObject setVectorDirAndUp [[0,0.5,0.5], [0,-0.5,0.5]];\n// tilt forward 30 degrees\n_myObject setVectorDirAndUp [[0,0.66,-0.33], [0,0.33,0.66]];\n```","code":["// tilt forward 90 + rotate left 90\n_myObject setVectorDirAndUp [[1,0,0], [0,1,0]];\n// tilt backward 45 degrees\n_myObject setVectorDirAndUp [[0,0.5,0.5], [0,-0.5,0.5]];\n// tilt forward 30 degrees\n_myObject setVectorDirAndUp [[0,0.66,-0.33], [0,0.33,0.66]];"]}],"see_also":["vectorDir","vectorUp","setVectorDir","setVectorUp","vectorDiff","vectorAdd","vectorMultiply","vectorCrossProduct","vectorDistance","vectorMagnitudeSqr","vectorDistanceSqr","vectorCos","vectorMagnitude","vectorDotProduct","vectorNormalized","vectorFromTo","BIS_fnc_transformVectorDirAndUp"],"notes":[{"user":"Str","date":"2008-03-16T09:50:00Z","text":"Command can be also used to rotate camera in all three axis (which also mean it is possible to set camera bank)."},{"user":"General Barron","date":"2008-05-09T09:32:00Z","text":"The object's vectorDir can only control its pitch, while its vectorUp can only control its bank. To set an object's yaw (direction), use the setdir command, before using this command.\nYou would think vectorUp would control pitch as well, but any pitch that would be set due to vectorUp is ignored. The same is true with vectorDir and yaw; any vectorDir that would adjust yaw is also ignored. If this doesn't make sense, try to visualize it with a box or soda can.\nThis command does NOT work with values relative to a unit, but rather it works with world vectors (think world coordinates as opposed to model coordinates). As a result, this command can be difficult to use in many situations, because the input values needed to get a certain pitch / bank for an object vary, depending on what direction the object is facing (yaw).\nA function to set an object's pitch / bank can be found *here* (dead link)"},{"user":"Chris330","date":"2009-10-23T18:39:00Z","text":"Note this odd command may now be better understood. There's a thread about it here:\n[BI Studios Forum Thread](http://forums.bistudio.com/showthread.php?p=1470985#post1470985)"},{"user":"ffur2007slx2_5","date":"2014-06-01T18:45:00Z","text":"Arma 3 v1.20 setDir overwrites setVectorDirAndUp (P.S. setVectorDirAndUp also affects setVelocity.), so use setDir before BIS_fnc_setPitchBank, which is an easier workaround on vector, if changing yaw, pitch and bank are needed. setVectorDirAndUp is CCW, so if we wanna to set an obj 40 degrees CW, 170 degrees pitch and 85 degrees bank:\n\n```sqf\n_obj setDir (40 - 180); [_obj, 170, 85] call BIS_fnc_setPitchBank;\n```\n\nSame as:\n\n```sqf\n_obj setVectorDirAndUp [[0.63,0.75,0.17],[-0.75,0.65,-0.084]];\n```\n\nBe aware that attachTo may flip vectorDir if pitch beyond 90 degrees and cause unexpected behavior to BIS_fnc_setPitchBank, e.g.\n\n```sqf\n[_obj, 100, 0] call BIS_fnc_setPitchBank; // vector: [-0.14,-0.09,0.98],[-0.83,-0.51,-0.17]\n```\n\n```sqf\n_obj attachTo [_logic,[0,0,2]];\n[_obj, 100, 0] call BIS_fnc_setPitchBank; // vector: [0.11,0.33,0.93],[-0.06,0.94,-0.32]\n```\n\ncompass direction algorithm failed if obj was attached at present.\nTo overcome such limitation we can use fallowing function for a better workaround. (code originated from '*bapedibupa*, remodified)\n\n```sqf\n_obj attachTo [_logic,[0,0,2]];\n[_obj,[120,-78,37]] call fnc_SetPitchBankYaw; // pitch: 120, bank: -78, yaw: 37\n```\n\n```sqf\nfnc_SetPitchBankYaw = {\n    private [\"_object\", \"_rotations\", \"_aroundX\", \"_aroundY\", \"_aroundZ\", \"_dirX\", \"_dirY\",\n    \"_dirZ\", \"_upX\", \"_upY\", \"_upZ\", \"_dir\", \"_up\", \"_dirXTemp\", \"_upXTemp\"];\n    _object = _this select 0;\n    _rotations = _this select 1;\n    _aroundX = _rotations select 0;\n    _aroundY = _rotations select 1;\n    _aroundZ = (360 - (_rotations select 2)) - 360;\n    _dirX = 0;\n    _dirY = 1;\n    _dirZ = 0;\n    _upX = 0;\n    _upY = 0;\n    _upZ = 1;\n    if (_aroundX != 0) then {\n        _dirY = cos _aroundX;\n        _dirZ = sin _aroundX;\n        _upY = -sin _aroundX;\n        _upZ = cos _aroundX;\n    };\n    if (_aroundY != 0) then {\n        _dirX = _dirZ * sin _aroundY;\n        _dirZ = _dirZ * cos _aroundY;\n        _upX = _upZ * sin _aroundY;\n        _upZ = _upZ * cos _aroundY;\n    };\n    if (_aroundZ != 0) then {\n        _dirXTemp = _dirX;\n        _dirX = (_dirXTemp* cos _aroundZ) - (_dirY * sin _aroundZ);\n        _dirY = (_dirY * cos _aroundZ) + (_dirXTemp * sin _aroundZ);\n        _upXTemp = _upX;\n        _upX = (_upXTemp * cos _aroundZ) - (_upY * sin _aroundZ);\n        _upY = (_upY * cos _aroundZ) + (_upXTemp * sin _aroundZ);\n    };\n    _dir = [_dirX,_dirY,_dirZ];\n    _up = [_upX,_upY,_upZ];\n    _object setVectorDirAndUp [_dir,_up];\n};\n```"}]},{"name":"setVectorUp","title":"setVectorUp","type":"command","url":"https://community.bistudio.com/wiki/setVectorUp","revid":377596,"updated":"2026-01-02T07:00:50Z","groups":["Math - Vectors"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Set object's up vector. Direction of the object remain unchanged. Default object's vectorUp is [0,0,1].","syntaxes":[{"syntax":"object setVectorUp vectorUp","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"vectorUp","type":"Vector3D (normalised)","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"vectorUp"}}],"examples":[{"text":"Turn object upside down:\n\n```sqf\n_obj setVectorUp [0, 0, -1];\n```","code":["_obj setVectorUp [0, 0, -1];"]},{"text":"Align object with the terrain underneath:\n\n```sqf\n_obj setVectorUp surfaceNormal getPosASL _obj;\n```","code":["_obj setVectorUp surfaceNormal getPosASL _obj;"]}],"see_also":["vectorDir","vectorUp","setVectorDir","setVectorDirAndUp","vectorDiff","vectorAdd","vectorMultiply","vectorCrossProduct","vectorDistance","vectorMagnitudeSqr","vectorDistanceSqr","vectorCos","vectorMagnitude","vectorDotProduct","vectorNormalized","vectorFromTo"],"notes":[{"user":"General Barron","date":"2009-03-03T21:07:00Z","text":"setVectorUp can only influence an object's bank. It can not influence pitch. Example:\n\n```sqf\nplayer setVectorUp [0, 1, 0]\n```\n\nIf the player is facing 0 degrees (north), then this will do NOTHING.\nIf the player is facing 90 degrees (east), then this will make him bank 90 degrees to his left."},{"user":"Kronzky","date":"2007-03-22T05:07:00Z","text":"An in-depth discussion on the concept of vectors is available [here](http://forums.bistudio.com/showthread.php?t=50914)."},{"user":"Str","date":"2008-03-16T09:49:00Z","text":"Command can be also used to rotate camera in all three axis (which also mean it is possible to set camera bank)."},{"user":"Killzone_Kid","date":"2013-10-03T09:04:00Z","text":"It is possible to change both pitch and bank of an object (surfaceNormal application for instance).\nAssuming an ammo box in the following example is facing North (default direction is 0):\n\n```sqf\n_ammobox setVectorUp [0, 1, 0]; // box is pitched 90 degrees forward\n_ammobox setVectorUp [1, 0, 0]; // box is banked 90 degrees to the right\n```\n\nHowever the above will stop working as soon as you attach the box to something. The following trick however will work in this case:\n\n```sqf\n_ammobox attachTo [player, [0, 2, 1]];\n_ammobox setVectorUp [0, 0.99, 0.01]; // box is pitched ~90 degrees forward\n_ammobox setVectorUp [0.99, 0, 0.01]; // box is banked ~90 degrees to the right\n```"}]},{"name":"setVehicleAmmo","title":"setVehicleAmmo","type":"command","url":"https://community.bistudio.com/wiki/setVehicleAmmo","revid":376973,"updated":"2026-01-01T06:03:41Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets how much ammunition (compared to a full state defined by the vehicle type) the vehicle has. Note that the ammo will be added only to local turrets. To check locality of turret use turretLocal.","syntaxes":[{"syntax":"vehicleName setVehicleAmmo value","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"},{"name":"value","type":"Number in range 0..1","description":"0: empty, 1: full","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"value"}}],"examples":[{"code":["player setVehicleAmmo 0;"]},{"code":["_vehicle setVehicleAmmo 1;"]}],"see_also":["setVehicleAmmoDef","ammo","setAmmo","setAmmoCargo","turretLocal"],"notes":[{"user":"Ceeeb","text":"This command does not add magazines to vehicle weapons that normally start with more than one magazine. It can however, remove these magazines."},{"user":"Bon_Inf*","text":"A2:OA v1.59 - Magazines of vehicle turrets are also refilled by this command."},{"user":".kju","text":"- If you 'unit/vehicle setVehicleAmmo 0;' an unit/vehicle first, you cannot refill it with 'unit/vehicle setVehicleAmmo 1;'.\n- You need to execute where the unit is local.\n- You need to execute on the effectiveCommander of a vehicle."},{"user":"Galzohar","text":"- In Arma 3, using this command seems correctly rearm the vehicle and its turrets in all situations (tested with beta 0.72)."},{"user":"Killzone_Kid","text":"- In Arma 3, when using this on a player, this command can only reduce the number of magazine in relation to the current ammo quantity of the unit. For example if player has 8 magazines, player setVehicleAmmo 0.5; will leave unit with 4 mags. Executing player setVehicleAmmo 0.5; again will leave unit with 2 mags. player setVehicleAmmo 0.5; again -> 1 mag. player setVehicleAmmo 0; will remove all mags. If player had 10 mags with 30 bullets in each, player setVehicleAmmo 0.01; will leave player with loaded mag with 3 bullets in it (300 x 0.01 = 3)"},{"user":"Actium","date":"2014-12-20T21:55:00Z","text":"This command does not operate *compared to a full state defined by the vehicle type*, but rather relative to a vehicle's current magazine loadout. To get the former behaviour use setVehicleAmmoDef, which utilizes the vehicles default magazine loadout (i.e. its CfgVehicles magazines[] values)."}]},{"name":"setVehicleAmmoDef","title":"setVehicleAmmoDef","type":"command","url":"https://community.bistudio.com/wiki/setVehicleAmmoDef","revid":378138,"updated":"2026-02-25T12:58:23Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets how much ammunition (compared to the configuration of magazines defined in the vehicle's class) the vehicle has. Note that the ammo will only be added to local turrets. To check the locality of turret use turretLocal.","syntaxes":[{"syntax":"unit setVehicleAmmoDef value","params":[{"name":"unit","type":"Object","description":"unit or vehicle.","type_expr":"Object"},{"name":"value","type":"Number","description":"from 0 (no ammo) to 1 (fully loaded).","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"value"}}],"examples":[{"code":["player setVehicleAmmoDef 0;"]}],"see_also":["setVehicleAmmo","ammo","setAmmo","setAmmoCargo","turretLocal"],"notes":[{"user":"Actium","date":"2014-12-20T22:49:00Z","text":"For vehicles this command operates relative to its stock magazine loadout (i.e. its CfgVehicles magazines[] values).\nThus *setVehicleAmmoDef 1* will fully restore a vehicle to its default ammunition capacity, resetting any changes made by intentionally/implicitly adding/removing magazines.\nUse setVehicleAmmo to operate in relation to a vehicle's current magazine loadout."}]},{"name":"setVehicleArmor","title":"setVehicleArmor","type":"command","url":"https://community.bistudio.com/wiki/setVehicleArmor","revid":369388,"updated":"2024-09-03T18:43:16Z","groups":["Object Manipulation"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets the armor (or health for men) state of the vehicle (a value from 0 to 1).\n\nWorks like setDamage, but the other way around: 1 is full health - see Example 2.","syntaxes":[{"syntax":"vehicleName setVehicleArmor value","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"},{"name":"value","type":"Number","description":"in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"value"}}],"examples":[{"code":["player setVehicleArmor 0.5;"]},{"code":["player setVehicleArmor 1;\n// is the same as\nplayer setDamage 0;\n\nplayer setVehicleArmor 0;\n// is the same as\nplayer setDamage 0.97;"]}],"see_also":["setDamage"]},{"name":"setVehicleCargo","title":"setVehicleCargo","type":"command","url":"https://community.bistudio.com/wiki/setVehicleCargo","revid":349523,"updated":"2023-11-08T17:15:54Z","groups":["Vehicle in Vehicle Transport"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","locality":{"effect":"global"},"description":"Load cargo vehicle inside vehicle if possible, returns bool based on whether the vehicle was able to be loaded. Can also be used to unload a specific loaded vehicle or all loaded vehicles.","syntaxes":[{"syntax":"vehicle setVehicleCargo cargo","params":[{"name":"vehicle","type":"Object","description":"vehicle for carrying cargo, objNull to unload specific loaded cargo","type_expr":"Object"},{"name":"cargo","type":"Object","description":"cargo to put/loaded in vehicle, objNull to unload all loaded cargo","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"whether or not operation was a success"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"cargo"}}],"examples":[{"text":"Blackfish with no vehicle cargo loaded\n\n```sqf\nprivate _success = blackfish setVehicleCargo offroad; // true\n```","code":["private _success = blackfish setVehicleCargo offroad; // true"]},{"text":"Blackfish with full cargo already loaded\n\n```sqf\nprivate _success = blackfish setVehicleCargo offroad; // false\n```","code":["private _success = blackfish setVehicleCargo offroad; // false"]},{"text":"Unload specific loaded vehicle (will paradrop if dropped from high altitude)\n\n```sqf\nprivate _success = objNull setVehicleCargo offroad;\n```","code":["private _success = objNull setVehicleCargo offroad;"]},{"text":"Unload all vehicles (will paradrop if dropped from high altitude)\n\n```sqf\nprivate _success = blackfish setVehicleCargo objNull;\n```","code":["private _success = blackfish setVehicleCargo objNull;"]}],"see_also":["Arma 3: Vehicle in Vehicle Transport","canVehicleCargo","enableVehicleCargo","getVehicleCargo","isVehicleCargo","vehicleCargoEnabled"],"notes":[{"user":"ImperialAlex","date":"2016-07-04T18:46:00Z","text":"`objNull setVehicleCargo _cargoVehicle` - will unload specific loaded vehicle, and `_trasportVehicle setVehicleCargo objNull` will unload all vehicles. The unloaded vehicles will be paradropped if the altitude is high enough. See: [BIforums](https://forums.bistudio.com/topic/191678-vehicle-in-vehicle-transport-feedback/page-5#entry3056397)"}]},{"name":"setVehicleId","title":"setVehicleId","type":"command","url":"https://community.bistudio.com/wiki/setVehicleId","revid":364524,"updated":"2024-05-16T20:46:23Z","groups":["Object Manipulation","Broken Commands"],"status":"broken","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Sets ID to vehicle. By this ID vehicle is referenced by triggers and waypoints.\n\n> [!WARNING]\n> This command is **not** to be used.","syntaxes":[{"syntax":"vehicleName setVehicleId id","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"},{"name":"id","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"id"}}],"examples":[{"code":["player setVehicleId 1;"]}],"see_also":["setVehicleVarName"]},{"name":"setVehicleLock","title":"setVehicleLock","type":"command","url":"https://community.bistudio.com/wiki/setVehicleLock","revid":379389,"updated":"2026-10-31T00:00:00Z","groups":["Object Manipulation"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets vehicle lock. Possible values:\n\n- \"UNLOCKED\"\n- \"DEFAULT\"\n- \"LOCKED\"\n- \"LOCKEDPLAYER\"","syntaxes":[{"syntax":"vehicleName setVehicleLock lockState","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"},{"name":"lockState","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"lockState"}}],"examples":[{"code":["_veh1 setVehicleLock \"LOCKED\";"]}],"see_also":["lock","locked","lockDriver","lockCargo","lockTurret"],"notes":[{"user":"AgentRev","date":"2014-10-22T02:01:00Z","text":"In Arma 3:\nsetVehicleLock \"UNLOCKED\" = same as \"lock 0\"\nsetVehicleLock \"DEFAULT\" = same as \"lock 1\"\nsetVehicleLock \"LOCKED\" = same as \"lock 2\"\nsetVehicleLock \"LOCKEDPLAYER\" = same as \"lock 3\""},{"user":"Killzone_Kid","date":"2015-03-04T15:57:00Z","text":"DEFAULT lock is default vehicle lock when vehicle placed in editor. If player is in a group of AIs and not the leader, he will not be able to enter this vehicle as he will not have GetIn action for this vehicle."}]},{"name":"setVehiclePosition","title":"setVehiclePosition","type":"command","url":"https://community.bistudio.com/wiki/setVehiclePosition","revid":377535,"updated":"2026-01-02T06:53:22Z","groups":["Positions","Object Manipulation"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Moves the object to a given position (same as createVehicle placement algorithm). Uses either the position that's defined by the *position* param, or one of the marker positions from the markers array. The object is placed inside a circle with *position* as its center and *placement* as its radius. The type of placement could also be controlled with *special*.\n\nIf position is in water and the vehicle can float, it is placed on water surface, otherwise it is placed on the ground, even if the ground is under water. If roof surfaces support walking, units will be placed on roofs if such position is given.","syntaxes":[{"syntax":"object setVehiclePosition [position, markers, placement, special]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"position","type":"PositionATL (PositionAGL if boat or amphibious), Position2D, or Object","description":"desired placement position.\nIf object is given, object position is used for *position*. Normally only *x* and *y* are considered, unless \"CAN_COLLIDE\" is used for special placement","type_expr":"PositionATL | PositionAGL | Position2D | Object"},{"name":"markers","type":"Array of Strings","description":"if the markers array contains one or more marker names, the position is chosen randomly and could be one of the marker positions or just the supplied main position.\nIf marker had z coordinate set with setMarkerPos, the vehicle will be placed on the nearest surface below this z coordinate","type_expr":"Array<String>"},{"name":"placement","type":"Number","description":"the vehicle is randomly placed inside a circle with given position as center and placement as its radius","type_expr":"Number"},{"name":"special","type":"String","optional":true,"default":"\"NONE\"","description":"can be one of the following:\n\n- `\"NONE\"` - will look for suitable empty position near given position (subject to other placement params) before placing vehicle there.\n- `\"CAN_COLLIDE\"` - places vehicle at given position (subject to other placement params), without checking if others objects can cross its 3D model.\n- `\"FLY\"` - if vehicle is capable of flying and has crew, it will be made airborne at default height.\n\nIf *special* is \"\" or not specified, default `\"NONE\"` is used.","type_expr":"String","text":"special: String - (Optional, default \"NONE\") can be one of the following:\n\n- `\"NONE\"` - will look for suitable empty position near given position (subject to other placement params) before placing vehicle there.\n- `\"CAN_COLLIDE\"` - places vehicle at given position (subject to other placement params), without checking if others objects can cross its 3D model.\n- `\"FLY\"` - if vehicle is capable of flying and has crew, it will be made airborne at default height.\n\nIf *special* is \"\" or not specified, default `\"NONE\"` is used."}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success, false on failure"},"form":"binary","left":{"text":"object"},"right":{"text":"[position, markers, placement, special]"}}],"examples":[{"code":["// place the player at either [1000,2000], or one of the three markers positions\nplayer setVehiclePosition [[1000,2000], [\"Pos1\",\"Pos2\",\"Pos3\"], 0, \"CAN_COLLIDE\"];"]},{"code":["heli setVehiclePosition [player, [], 0, \"FLY\"];"]},{"code":["_cam = \"camera\" camCreate [0,0,0];\n_cam setDir random 360;\n_cam setVehiclePosition [[5000,5000], [], 1000, \"NONE\"];\n_cam setPosWorld (getPosWorld _cam vectorAdd [0,0,1.8]);\n_cam cameraEffect [\"Internal\", \"Back\"];"]},{"code":["private _tablePos = player getRelPos [3, 0];\nprivate _table = \"Land_CampingTable_F\" createVehicle [0,0,0];\nprivate _laptop = \"Land_Laptop_unfolded_F\" createVehicle [0,0,0];\n_table setPos _tablePos;\n_laptop setVehiclePosition [_tablePos vectorAdd [0.5, 0.2, 10], [], 0, \"CAN_COLLIDE\"];\n_laptop attachTo [_table];"]}],"see_also":["setPos","createUnit","setPosASL","setPosWorld","createVehicle","Position"],"notes":[{"user":"Killzone_Kid","date":"2015-06-24T15:43:00Z","text":"If you need to set direction as well, set it before using setVehiclePosition. The command will use existing dir of the object for its calculations.\n\n```sqf\nplayer setDir random 360;\nplayer setVehiclePosition [player, [], 100, \"none\"];\n```"}]},{"name":"setVehicleRadar","title":"setVehicleRadar","type":"command","url":"https://community.bistudio.com/wiki/setVehicleRadar","revid":348315,"updated":"2023-11-08T12:59:38Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Sets the AI rule of Radar usage (Emission Control). Automatic means Radar switched on only when in Combat. The command doesn't affect player-controlled vehicles.","syntaxes":[{"syntax":"vehicle setVehicleRadar rule","params":[{"name":"vehicle","type":"Object","description":"an AI-controlled vehicle","type_expr":"Object"},{"name":"rule","type":"Number","description":"can be one of the following:\n\n- 0 - automatic\n- 1 - forced on\n- 2 - forced off","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"rule"}}],"examples":[{"code":["_vehicle setVehicleRadar 1;"]}],"see_also":["isVehicleRadarOn","vehicleReportRemoteTargets","setVehicleReportRemoteTargets","vehicleReceiveRemoteTargets","setVehicleReceiveRemoteTargets","vehicleReportOwnPosition","setVehicleReportOwnPosition","reportRemoteTarget","confirmSensorTarget"]},{"name":"setVehicleReceiveRemoteTargets","title":"setVehicleReceiveRemoteTargets","type":"command","url":"https://community.bistudio.com/wiki/setVehicleReceiveRemoteTargets","revid":311071,"updated":"2022-05-07T20:56:47Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Sets that the vehicle will be able to receive targets acquired by someone else via datalink from the Side center.","syntaxes":[{"syntax":"vehicle setVehicleReceiveRemoteTargets bool","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"bool"}}],"examples":[{"code":["vehicle player setVehicleReceiveRemoteTargets true;"]}],"see_also":["setVehicleRadar","vehicleReportRemoteTargets","setVehicleReportRemoteTargets","vehicleReceiveRemoteTargets","vehicleReportOwnPosition","setVehicleReportOwnPosition","reportRemoteTarget","confirmSensorTarget"]},{"name":"setVehicleReportOwnPosition","title":"setVehicleReportOwnPosition","type":"command","url":"https://community.bistudio.com/wiki/setVehicleReportOwnPosition","revid":311072,"updated":"2022-05-07T20:57:10Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Sets that the vehicle will share its own position via datalink to the Side center.","syntaxes":[{"syntax":"vehicle setVehicleReportOwnPosition report","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"report","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"report"}}],"examples":[{"code":["vehicle player setVehicleReportOwnPosition true;"]}],"see_also":["setVehicleRadar","vehicleReportRemoteTargets","setVehicleReportRemoteTargets","vehicleReceiveRemoteTargets","setVehicleReceiveRemoteTargets","vehicleReportOwnPosition","reportRemoteTarget","confirmSensorTarget"]},{"name":"setVehicleReportRemoteTargets","title":"setVehicleReportRemoteTargets","type":"command","url":"https://community.bistudio.com/wiki/setVehicleReportRemoteTargets","revid":311073,"updated":"2022-05-07T20:57:55Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Sets that the vehicle will share targets that were acquired by its own sensors via datalink to the Side center.","syntaxes":[{"syntax":"vehicle setVehicleReportRemoteTargets bool","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"bool"}}],"examples":[{"code":["vehicle player setVehicleReportRemoteTargets true;"]}],"see_also":["setVehicleRadar","vehicleReportRemoteTargets","vehicleReceiveRemoteTargets","setVehicleReceiveRemoteTargets","vehicleReportOwnPosition","setVehicleReportOwnPosition","reportRemoteTarget","confirmSensorTarget"]},{"name":"setVehicleTIPars","title":"setVehicleTIPars","type":"command","url":"https://community.bistudio.com/wiki/setVehicleTIPars","revid":348636,"updated":"2023-11-08T13:46:10Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sets the \"heat\" state of different vehicle parts for Thermal Imaging detection.\nThis allows simulation of heated up parts of a vehicle without it actually having to utilize them - on a 0..1 range - 0 being cold, 1 being hot.\n\n> [!NOTE]\n> This command does not work on infantry weapons.","syntaxes":[{"syntax":"vehicle setVehicleTIPars [engine, wheels, weapon]","params":[{"name":"vehicle","type":"Object","description":"vehicle whose components are manipulated","type_expr":"Object"},{"name":"engine","type":"Number","description":"engine and body's heat","type_expr":"Number"},{"name":"wheels","type":"Number","description":"tracks/wheels' heat","type_expr":"Number"},{"name":"weapon","type":"Number","description":"main weapon's heat","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[engine, wheels, weapon]"}}],"examples":[{"text":"```sqf\nvehicle player setVehicleTIPars [1, 1, 1];            // set all parts hot\nvehicle player setVehicleTIPars [0, 0, 0];            // set all parts cold\nvehicle player setVehicleTIPars [0.5, 0.5, 0.5];    // set all parts warm\n```","code":["vehicle player setVehicleTIPars [1, 1, 1];\t\t\t// set all parts hot\nvehicle player setVehicleTIPars [0, 0, 0];\t\t\t// set all parts cold\nvehicle player setVehicleTIPars [0.5, 0.5, 0.5];\t// set all parts warm"]},{"code":["vehicle player setVehicleTIPars [1, 0, 0]; // set the engine warm, perfect for winter"]}],"see_also":["disableTIEquipment","setCamUseTI"]},{"name":"setVehicleVarName","title":"setVehicleVarName","type":"command","url":"https://community.bistudio.com/wiki/setVehicleVarName","revid":338577,"updated":"2023-03-20T15:21:44Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sets string representation of an object to a custom string.\nWhen a vehicle is created and named in the editor, the name becomes both the variable containing the vehicle object and the string representation of the vehicle object.\nIn scripts an extra step is needed to achieve the same effect - see Example 1.\n\n> [!NOTE]\n> This does not work with Simple Objects.","syntaxes":[{"syntax":"object setVehicleVarName name","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"name"}}],"examples":[{"text":"```sqf\nprivate _playersCar = vehicle player;\nsystemChat str _playersCar; // displays e.g \"ce06b00# 164274: offroad_01_unarmed_f.p3d\"\n\n_playersCar setVehicleVarName \"MyOffroad\";\nsystemChat str _playersCar;    // displays \"MyOffroad\"\n\nisNil \"MyOffroad\";            // true - the MyOffroad variable is not set\nMyOffroad = _playersCar;    // now it is\npublicVariable \"MyOffroad\";    // broadcasts it over the network\n```","code":["private _playersCar = vehicle player;\nsystemChat str _playersCar; // displays e.g \"ce06b00# 164274: offroad_01_unarmed_f.p3d\"\n\n_playersCar setVehicleVarName \"MyOffroad\";\nsystemChat str _playersCar;\t// displays \"MyOffroad\"\n\nisNil \"MyOffroad\";\t\t\t// true - the MyOffroad variable is not set\nMyOffroad = _playersCar;\t// now it is\npublicVariable \"MyOffroad\";\t// broadcasts it over the network"]},{"code":["_offroad setVehicleVarName \"\"; // Reset string representation to the default value"]}],"see_also":["vehicleVarName","BIS_fnc_objectVar"]},{"name":"setVelocity","title":"setVelocity","type":"command","url":"https://community.bistudio.com/wiki/setVelocity","revid":378408,"updated":"2026-04-04T08:14:56Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.80","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.80","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets velocity vector of an object in m/s.\n\n> [!IMPORTANT]\n> Since Arma 3 v2.06 each velocity component is limited to the range +-5000 m/s.","syntaxes":[{"syntax":"object setVelocity vector","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"vector","type":"Vector3D","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"vector"}}],"examples":[{"code":["_truck1 setVelocity [20, 0, 0];"]},{"text":"Advanced method used for relative acceleration:\n\n```sqf\n_vel = velocity _vehicle;\n_dir = getDir _vehicle;\n_additionalSpeed = 10; // in m/s\n_vehicle setVelocity [\n    (_vel select 0) + (sin _dir * _additionalSpeed),\n    (_vel select 1) + (cos _dir * _additionalSpeed),\n    (_vel select 2) // horizontal only\n];\n```","code":["_vel = velocity _vehicle;\n_dir = getDir _vehicle;\n_additionalSpeed = 10; // in m/s\n_vehicle setVelocity [\n\t(_vel select 0) + (sin _dir * _additionalSpeed), \n\t(_vel select 1) + (cos _dir * _additionalSpeed), \n\t(_vel select 2) // horizontal only\n];"]}],"see_also":["velocity","velocityModelSpace","setVelocityModelSpace","setVelocityTransformation","speed"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-20T16:50:00Z","text":"Arma 3 v1.22 setVelocity will be affected by setDir and setVectorDirAndUp, so use it after them."}]},{"name":"setVelocityModelSpace","title":"setVelocityModelSpace","type":"command","url":"https://community.bistudio.com/wiki/setVelocityModelSpace","revid":377260,"updated":"2026-01-02T06:33:01Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","locality":{"argument":"local","effect":"global"},"description":"Sets the velocity (i.e. speed) vector of the given vehicle relative to its model.\n\n> [!IMPORTANT]\n> Since Arma 3 v2.06, each velocity component is limited to ±5000 m/s.","syntaxes":[{"syntax":"vehicle setVelocityModelSpace velocity","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"velocity","type":"Vector3D","description":"relative velocity vector","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"velocity"}}],"examples":[{"code":["MyCar setVelocityModelSpace [0, 10, 0]; // Pushes MyCar forward."]}],"see_also":["velocityModelSpace","velocity","setVelocity","setVelocityTransformation","speed","disableBrakes","brakesDisabled"]},{"name":"setVelocityTransformation","title":"setVelocityTransformation","type":"command","url":"https://community.bistudio.com/wiki/setVelocityTransformation","revid":377448,"updated":"2026-01-02T06:47:04Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Interpolates and applies PositionASL, velocity, vectorDir and vectorUp to the given object based on the interval value.\n\nWhen interval is 0 the \"fromXXX\" values are used for the beginning of the interpolation. When interval is 1, the \"toXXX\" values are used for the end of interpolation.\nWhen interval value is in between, interpolated values are used (see diagram below). The interpolation is linear and along straight line between \"from\" and \"to\" positions.\nIf curve is needed, then it should be constructed from multiple straight sections or by dynamically changing value of position params during the interpolation cycle, similar to [Quadratic Curve animation](https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Quadratic_curves) (see Example 3).\n\nThe velocity param does not do much in SP, but in MP, provided the velocity component is set correctly, it helps the engine to figure out what the next position of the moving object should be on other clients.\n\nThe actual approximate interpolation formula for this command is:\n\n```sqf\n_vecCurrent = _vecFrom vectorAdd (_vecTo vectorDiff _vecFrom vectorMultiply _interval);\n```\n\n> [!NOTE]\n> For continuous movement this command should be executed each frame while changing the interval value.\n>\n> For example to apply interpolation for 10 seconds one could use the following command to translate 10 seconds into 0..1 interval:\n>\n> ```sqf\n> t1 = time;\n> t2 = time + 10;\n> ```\n>\n> Later inside some on frame event...\n>\n> ```sqf\n> _interval = linearConversion [t1, t2, time, 0, 1];\n> ```","syntaxes":[{"syntax":"object setVelocityTransformation [fromPosASL, toPosASL, fromVelocity, toVelocity, fromVectorDir, toVectorDir, fromVectorUp, toVectorUp, interval, customCenter]","params":[{"name":"object","type":"Object","description":"object to be interpolated","type_expr":"Object"},{"name":"fromPosASL","type":"PositionASL","description":"starting getPosASL of the object","type_expr":"PositionASL"},{"name":"toPosASL","type":"PositionASL","description":"ending getPosASL of the object","type_expr":"PositionASL"},{"name":"fromVelocity","type":"Vector3D","description":"starting velocity of the object","type_expr":"Vector3D"},{"name":"toVelocity","type":"Vector3D","description":"ending velocity of the object","type_expr":"Vector3D"},{"name":"fromVectorDir","type":"Vector3D","description":"starting vectorDir of the object","type_expr":"Vector3D"},{"name":"toVectorDir","type":"Vector3D","description":"ending vectorDir of the object","type_expr":"Vector3D"},{"name":"fromVectorUp","type":"Vector3D","description":"starting vectorUp of the object","type_expr":"Vector3D"},{"name":"toVectorUp","type":"Vector3D","description":"ending vectorUp of the object","type_expr":"Vector3D"},{"name":"interval","type":"Number","description":"interpolation interval (variable value, normally between 0 and 1)","type_expr":"Number"},{"name":"customCenter","type":"PositionRelative","optional":true,"default":"placing point of the model (see getModelInfo)","description":"custom center [x, y, z] to which transformation would be applied in model coordinates","type_expr":"PositionRelative","since":"arma3 2.08","text":"customCenter: PositionRelative - (Optional, default placing point of the model (see getModelInfo)) custom center [x, y, z] to which transformation would be applied in model coordinates"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[fromPosASL, toPosASL, fromVelocity, toVelocity, fromVectorDir, toVectorDir, fromVectorUp, toVectorUp, interval, customCenter]"}}],"examples":[{"text":"```sqf\n_tracker setVelocityTransformation\n[\n    _currentPos,\n    _nextPos,\n    _currentVelocity,\n    _nextVelocity,\n    _currentVectorDir,\n    _nextVectorDir,\n    _currentVectorUp,\n    _nextVectorUp,\n    _interval\n];\n```","code":["_tracker setVelocityTransformation\n[\n\t_currentPos,\n\t_nextPos,\n\t_currentVelocity,\n\t_nextVelocity,\n\t_currentVectorDir,\n\t_nextVectorDir,\n\t_currentVectorUp,\n\t_nextVectorUp,\n\t_interval\n];"]},{"text":"Bob on imaginary stairway to heaven:\n\n```sqf\nbob = createAgent [\"C_man_1\", player getRelPos [5, 0], [], 0, \"CAN_COLLIDE\"];\nbob switchMove \"ladderCivilUpLoop\";\npos1 = getPosASL bob;\npos2 = pos1 vectorAdd [0,0,0.75];\nbob addEventHandler [\"AnimDone\",\n{\n    pos1 = pos2;\n    pos2 = pos2 vectorAdd [0,0,0.75]\n}];\n\nonEachFrame\n{\n    if (!alive bob) then\n    {\n        onEachFrame {};\n        bob switchMove \"\";\n        bob removeAllEventHandlers \"AnimDone\";\n    };\n    bob setVelocityTransformation [\n        pos1,\n        pos2,\n        [0,0,0],\n        [0,0,0],\n        [0,1,0],\n        [0,1,0],\n        [0,0,1],\n        [0,0,1],\n        moveTime bob\n    ];\n};\n```","code":["bob = createAgent [\"C_man_1\", player getRelPos [5, 0], [], 0, \"CAN_COLLIDE\"];\nbob switchMove \"ladderCivilUpLoop\";\npos1 = getPosASL bob;\npos2 = pos1 vectorAdd [0,0,0.75];\nbob addEventHandler [\"AnimDone\",\n{\n\tpos1 = pos2;\n\tpos2 = pos2 vectorAdd [0,0,0.75]\n}];\n\nonEachFrame\n{\n\tif (!alive bob) then\n\t{\n\t\tonEachFrame {};\n\t\tbob switchMove \"\";\n\t\tbob removeAllEventHandlers \"AnimDone\";\n\t};\n\tbob setVelocityTransformation [\n\t\tpos1,\n\t\tpos2,\n\t\t[0,0,0],\n\t\t[0,0,0],\n\t\t[0,1,0],\n\t\t[0,1,0],\n\t\t[0,0,1],\n\t\t[0,0,1],\n\t\tmoveTime bob\n\t];\n};"]},{"text":"Advanced trickery with curved movement. The curve is controlled with one control point (controlPointASL), just like quadratic Bézier curve:\n\n```sqf\ndisableSerialization;\nplayer setDir 0;\ninterval = 0;\n_disp = findDisplay 46 createDisplay \"RscDisplayEmpty\";\n_ctrl = _disp ctrlCreate [\"RscSlider\", -1];\n_ctrl ctrlSetPosition [safeZoneX + 0.1, 1, safeZoneW - 0.2, 0.1];\n_ctrl ctrlSetActiveColor [1,0,0,1];\n_ctrl ctrlCommit 0;\n_ctrl sliderSetPosition 0;\n_ctrl sliderSetRange [0,1];\n_ctrl sliderSetSpeed [0.1,0.5];\n_ctrl ctrlAddEventHandler [\"SliderPosChanged\", {interval = _this select 1}];\nctrlSetFocus _ctrl;\nbox = \"Land_VR_Shape_01_cube_1m_F\" createVehicle [0,0,0];\ncontrolPointASL = AGLToASL (player getRelPos [70, -30]) vectorAdd [0, 0, 30];\nfromPosASL = AGLToASL (player getRelPos [10, -45]);\ntoPosASL = AGLToASL (player getRelPos [10, 45]);\nfromControlPointOffset = controlPointASL vectorDiff fromPosASL;\ntoControlPointOffset = toPosASL vectorDiff controlPointASL;\nonEachFrame\n{\n    hintSilent format [\"Interval: %1\", interval];\n    box setVelocityTransformation\n    [\n        fromPosASL vectorAdd (fromControlPointOffset vectorMultiply interval),\n        controlPointASL vectorAdd (toControlPointOffset vectorMultiply interval),\n        [0,0,0],\n        [0,0,0],\n        [0,1,0],\n        [1,0,0],\n        [0,0,1],\n        [0,1,0],\n        interval\n    ];\n};\n```","code":["disableSerialization;\nplayer setDir 0;\ninterval = 0;\n_disp = findDisplay 46 createDisplay \"RscDisplayEmpty\";\n_ctrl = _disp ctrlCreate [\"RscSlider\", -1];\n_ctrl ctrlSetPosition [safeZoneX + 0.1, 1, safeZoneW - 0.2, 0.1];\n_ctrl ctrlSetActiveColor [1,0,0,1];\n_ctrl ctrlCommit 0;\n_ctrl sliderSetPosition 0;\n_ctrl sliderSetRange [0,1];\n_ctrl sliderSetSpeed [0.1,0.5];\n_ctrl ctrlAddEventHandler [\"SliderPosChanged\", {interval = _this select 1}];\nctrlSetFocus _ctrl;\nbox = \"Land_VR_Shape_01_cube_1m_F\" createVehicle [0,0,0];\ncontrolPointASL = AGLToASL (player getRelPos [70, -30]) vectorAdd [0, 0, 30];\nfromPosASL = AGLToASL (player getRelPos [10, -45]);\ntoPosASL = AGLToASL (player getRelPos [10, 45]);\nfromControlPointOffset = controlPointASL vectorDiff fromPosASL;\ntoControlPointOffset = toPosASL vectorDiff controlPointASL;\nonEachFrame\n{\n\thintSilent format [\"Interval: %1\", interval];\n\tbox setVelocityTransformation\n\t[\n\t\tfromPosASL vectorAdd (fromControlPointOffset vectorMultiply interval),\n\t\tcontrolPointASL vectorAdd (toControlPointOffset vectorMultiply interval),\n\t\t[0,0,0],\n\t\t[0,0,0],\n\t\t[0,1,0],\n\t\t[1,0,0],\n\t\t[0,0,1],\n\t\t[0,1,0],\n\t\tinterval\n\t];\n};"]}],"see_also":["velocity","setVelocity","velocityModelSpace","setVelocityModelSpace","speed","moveTime","disableBrakes","brakesDisabled","getModelInfo"],"notes":[{"user":"ffur2007slx2_5","date":"2014-08-04T12:35:00Z","text":"(A3 1.24) Generally speaking setVelocityTransformation is more likely a combination of setPosASL, setVectorDirAndUp (or BIS_fnc_setPitchBank) and time multiplier.\nIt can be used as a position tracker with all necessary information collected, copied and then released within one function. Here’s a simple reproduction on how setVelocityTransformation works in game:\n\n```sqf\nprivate [\"_dataOld\",\"_dataNext\",\"_capturedData\",\"_obj\",\"_fps\",\"_startTrackingTime\",\"_stepOld\",\"_stepNext\",\"_tracker\",\"_tempTime\"];\n_stepOld = 0;\n_tempTime = 0;\n_stepNext = 1;\nwhile {true} do\n{\n    _capturedData = _capturedData + [[getPosASL _obj,velocity _obj,vectorDir _obj,vectorUp _obj]];\n    sleep _fps;\n    _tempTime = _tempTime + _fps;\n    if (_tempTime >= _startTrackingTime) then\n    {\n        _dataOld = _capturedData select _stepOld;\n        _dataNext = _capturedData select _stepNext;\n        _stepOld = _stepOld + 1;\n        _stepNext = if (_stepNext >= (count _capturedData)) then { _stepOld } else { _stepNext + 1 };\n        _tracker setVelocityTransformation [\n            _dataOld select 0,\n            _dataNext select 0,\n            _dataOld select 1,\n            _dataNext select 1,\n            _dataOld select 2,\n            _dataNext select 2,\n            _dataOld select 3,\n            _dataNext select 3,\n            1\n        ];\n    };\n};\n```\n\nTracker starts coping the route and stance from the object when time start counting. TimeDiff determines the distance multiply between the current position and the next position."},{"user":"DrSova","date":"2020-07-04T08:11:00Z","text":"You can't apply this command to the dead body in ragdoll."}]},{"name":"setViewDistance","title":"setViewDistance","type":"command","url":"https://community.bistudio.com/wiki/setViewDistance","revid":364699,"updated":"2024-05-25T17:28:31Z","groups":["System","Environment"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Set rendering distance. Setting view distance to <= 0 resets the value to the client's options (set in `Options → Video → General → Visibility → Overall`).\n\n> [!NOTE]\n> In previous versions, client's max view distance was limited by the server's view distance.\n\n> [!IMPORTANT]\n> View distance also defines the maximum distance between a unit and any other unit they can know about.\n> Higher view distance will involve more AI simulation cycles for every unit, which causes low performance. See Arma 3: Performance Optimisation.\n\n| Game | min. scripted | min. UI | default | max. UI | max. scripted |\n|---|---|---|---|---|---|\n| Arma 3 | 200 | 500 | **1600** | 12000 | 40000 |\n| Arma 2: Operation Arrowhead | 200 | 500 | **2500** | 10000 | 15000 |\n| Arma 2 | 200 | 500 | **3000** | 10000 | 15000 |\n| Armed Assault | 200 | 500 | **1200** | 10000 | 15000 |\n| Operation Flashpoint | 500 | 500 | **900** | 5000 | 5000 |","syntaxes":[{"syntax":"setViewDistance distance","params":[{"name":"distance","type":"Number","description":"distance in metres; Arma 3 v1.00 a negative value resets the view distance to user video setting","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"distance"}}],"examples":[{"code":["setViewDistance 2250;"]},{"code":["setViewDistance -1; // reset view distance in Arma 3"]}],"see_also":["viewDistance","setDetailMapBlendPars","setTerrainGrid","getObjectViewDistance","setObjectViewDistance"]},{"name":"setVisibleIfTreeCollapsed","title":"setVisibleIfTreeCollapsed","type":"command","url":"https://community.bistudio.com/wiki/setVisibleIfTreeCollapsed","revid":378401,"updated":"2026-04-04T08:10:10Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets whether or not the object is visible even if the tree is collapsed.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map setVisibleIfTreeCollapsed [object, visible]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"object","type":"EditorObject","type_expr":"Editor Object"},{"name":"visible","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[object, visible]"}}],"examples":[{"code":["_map setVisibleIfTreeCollapsed [\"_unit_0\", true];"]}]},{"name":"setWantedRPMRTD","title":"setWantedRPMRTD","type":"command","url":"https://community.bistudio.com/wiki/setWantedRPMRTD","revid":377768,"updated":"2026-01-03T01:32:15Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Tell the helicopter engine RPMs to reach the given value within a period of time. The simulation will try to reach the RPMs, but it does not guarantee it will reach the precise value!\n\n- engine index 0: engine #1\n- engine index 1: engine #2\n- engine index 2: engine #3\n- engine index -1: all engines\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"helicopterRTD setWantedRPMRTD [value, time, engineIndex]","params":[{"name":"helicopterRTD","type":"ObjectRTD","description":"helicopter","type_expr":"Object","text":"helicopterRTD : ObjectRTD - helicopter"},{"name":"value","type":"Number","description":"engine RPMs","type_expr":"Number","text":"value : Number - engine RPMs"},{"name":"time","type":"Number","description":"time to reach desired RPMs (seconds)","type_expr":"Number","text":"time : Number - time to reach desired RPMs (seconds)"},{"name":"engineIndex","type":"Number","description":"engine index","type_expr":"Number","text":"engineIndex : Number - engine index"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"helicopterRTD"},"right":{"text":"[value, time, engineIndex]"}}],"examples":[{"code":["vehicle player setWantedRPMRTD [2500, 30, 0];"]}],"see_also":["setEngineRPMRTD"]},{"name":"setWaterFillPercentage","title":"setWaterFillPercentage","type":"command","url":"https://community.bistudio.com/wiki/setWaterFillPercentage","revid":363324,"updated":"2024-03-26T16:41:40Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.16"},"since":"arma3 2.16","arma3_since":"2.16","locality":{"argument":"local","effect":"local"},"description":"Set an object's water filling.","syntaxes":[{"syntax":"obj setWaterFillPercentage level","params":[{"name":"obj","type":"Object","description":"object to manipulate","type_expr":"Object"},{"name":"level","type":"Number","description":"water level in range 0..1 (empty to full)","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"obj"},"right":{"text":"level"}}],"examples":[{"text":"```sqf\nif (getWaterLeakiness _myCar > 0 && surfaceIsWater getPosASL _myCar) then\n{\n    _myCar setWaterFillPercentage 1;\n    hint \"I told you not to go in the water!\";\n};\n```","code":["if (getWaterLeakiness _myCar > 0 && surfaceIsWater getPosASL _myCar) then\n{\n\t_myCar setWaterFillPercentage 1;\n\thint \"I told you not to go in the water!\";\n};"]}],"see_also":["setWaterLeakiness","getWaterLeakiness","getWaterFillPercentage"]},{"name":"setWaterLeakiness","title":"setWaterLeakiness","type":"command","url":"https://community.bistudio.com/wiki/setWaterLeakiness","revid":363318,"updated":"2024-03-26T16:41:37Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.16"},"since":"arma3 2.16","arma3_since":"2.16","locality":{"argument":"local","effect":"global"},"description":"Set an object's water intake ratio when immersed.","syntaxes":[{"syntax":"obj setWaterLeakiness leakiness","params":[{"name":"obj","type":"Object","description":"object to manipulate","type_expr":"Object"},{"name":"leakiness","type":"Number","description":"in range 0..1 where 0 is waterproof and 1 is full leak","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"obj"},"right":{"text":"leakiness"}}],"examples":[{"text":"```sqf\nprivate _veh = vehicle player;\nif (surfaceIsWater getPosASL _veh) then\n{\n    _veh setWaterLeakiness 1;\n};\n```","code":["private _veh = vehicle player;\nif (surfaceIsWater getPosASL _veh) then\n{\n\t_veh setWaterLeakiness 1;\n};"]}],"see_also":["getWaterLeakiness","setWaterFillPercentage","getWaterFillPercentage"]},{"name":"setWaves","title":"setWaves","type":"command","url":"https://community.bistudio.com/wiki/setWaves","revid":349863,"updated":"2023-11-20T22:10:45Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Changes the waves value smoothly during the given time (in seconds). A time of zero means there will be an immediate change.\n\n**NOTE**: This command will have no effect (even though the value of waves changes) unless `Manual Override` option is selected in the editor in the Intel, which is normally off.","syntaxes":[{"syntax":"time setWaves value","params":[{"name":"time","type":"Number","type_expr":"Number"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"value"}}],"examples":[{"code":["180 setWaves .5;"]},{"code":["0 setWaves 1;"]}],"see_also":["waves","fog","overcast","setLightnings"]},{"name":"setWaypointBehaviour","title":"setWaypointBehaviour","type":"command","url":"https://community.bistudio.com/wiki/setWaypointBehaviour","revid":379471,"updated":"2026-10-31T00:10:56Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"effect":"global","server_exec":true},"description":"Switches the unit behaviour when the waypoint becomes active.\n\nPossible values are:\n\n- \"UNCHANGED\"\n- \"CARELESS\"\n- \"SAFE\"\n- \"AWARE\"\n- \"COMBAT\"\n- \"STEALTH\"\n\nSee the AIBehaviour page for details of the effect of this command on AI units.","syntaxes":[{"syntax":"waypoint setWaypointBehaviour mode","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"mode","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"mode"}}],"examples":[{"code":["[_grp, 2] setWaypointBehaviour \"AWARE\";"]}],"see_also":["Mission Editor: Waypoints","AIBehaviour","waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed"],"notes":[{"user":"Str","date":"2008-08-26T13:32:00Z","text":"Modes are case sensitive - *\"safe\"* won't work, while *\"SAFE\"* is ok."}]},{"name":"setWaypointCombatMode","title":"setWaypointCombatMode","type":"command","url":"https://community.bistudio.com/wiki/setWaypointCombatMode","revid":377750,"updated":"2026-01-03T00:58:04Z","groups":["Waypoints"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Changes a group's combat mode when the waypoint becomes active.","syntaxes":[{"syntax":"waypoint setWaypointCombatMode mode","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"mode","type":"String","description":"can be:\n\n- \"NO CHANGE\"\n- \"BLUE\"\n- \"GREEN\"\n- \"WHITE\"\n- \"YELLOW\"\n- \"RED\"","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"mode"}}],"examples":[{"code":["[_grp, 2] setWaypointCombatMode \"RED\";"]}],"see_also":["Combat Modes","setWaypointBehaviour"]},{"name":"setWaypointCompletionRadius","title":"setWaypointCompletionRadius","type":"command","url":"https://community.bistudio.com/wiki/setWaypointCompletionRadius","revid":379472,"updated":"2026-10-31T00:11:04Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"The completion radius allows units to call the waypoint completed once they are inside of the given circle. If the given radius is less than unit’s or vehicle’s configured 'precision' then the latter is used. For example tank precision is 10m, if the given radius is 5m, the final radius will be 10m. For units in player’s group there is an additional multiplier x5 to the configured precision. Units that are fleeing and are not in player's Group will ignore the completion radius and would not be able to complete by proximity until they stop fleeing.","syntaxes":[{"syntax":"waypoint setWaypointCompletionRadius radius","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"radius","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"radius"}}],"examples":[{"code":["[grp, 2] setWaypointCompletionRadius 30;"]}],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed"],"notes":[{"user":"Laking","date":"2010-01-29T14:12:00Z","text":"- The completion radius is currently important for units moving in the Combat mode.\n- With default completion radius = 0 the leader always finishes in the exact location of the waypoint.\n- By providing a completion radius you allow him to plan his road to a cover nearby instead.\n- This does not necessarily mean the waypoint is complete once they are inside of the circle.\n- The way it works now it is complete once unit is inside and does not think it would be reasonable to move any closer."}]},{"name":"setWaypointDescription","title":"setWaypointDescription","type":"command","url":"https://community.bistudio.com/wiki/setWaypointDescription","revid":377757,"updated":"2026-01-03T00:58:15Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Sets the description shown in the HUD while the waypoint is active.","syntaxes":[{"syntax":"waypoint setWaypointDescription text","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"text"}}],"examples":[{"code":["[_grp, 2] setWaypointDescription \"Move here.\";"]}],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed"]},{"name":"setWaypointForceBehaviour","title":"setWaypointForceBehaviour","type":"command","url":"https://community.bistudio.com/wiki/setWaypointForceBehaviour","revid":377890,"updated":"2026-01-05T17:35:07Z","groups":["Waypoints"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Forces the behavior of waypoint, disables AUTOCOMBAT.","syntaxes":[{"syntax":"waypoint setWaypointForceBehaviour state","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"state","type":"Boolean","description":"force or not","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"state"}}],"examples":[{"code":["[grp, 2] setWaypointForceBehaviour true;"]}],"see_also":["waypointForceBehaviour","setWaypointBehaviour","waypointBehaviour","Mission Editor: Waypoints"]},{"name":"setWaypointFormation","title":"setWaypointFormation","type":"command","url":"https://community.bistudio.com/wiki/setWaypointFormation","revid":377761,"updated":"2026-01-03T00:58:21Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"effect":"global","server_exec":true},"description":"Switches the group formation when the waypoint becomes active.\n\nPossible values are:\n\n- \"NO CHANGE\"\n- \"COLUMN\"\n- \"STAG COLUMN\"\n- \"WEDGE\"\n- \"ECH LEFT\"\n- \"ECH RIGHT\"\n- \"VEE\"\n- \"LINE\"\n- \"FILE\"\n- \"DIAMOND\"","syntaxes":[{"syntax":"waypoint setWaypointFormation formation","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"formation","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"formation"}}],"examples":[{"code":["[_grp, 2] setWaypointFormation \"LINE\";"]}],"see_also":["Mission Editor: Waypoints","waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed"]},{"name":"setWaypointHousePosition","title":"setWaypointHousePosition","type":"command","url":"https://community.bistudio.com/wiki/setWaypointHousePosition","revid":377754,"updated":"2026-01-03T00:58:10Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"For waypoints attached to a house, this defines the target buildingPos index.","syntaxes":[{"syntax":"waypoint setWaypointHousePosition pos","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"pos","type":"Number","description":"buildingPos index","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"pos"}}],"examples":[{"code":["[_grp, 2] setWaypointHousePosition 1;"]}],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed","buildingPos"]},{"name":"setWaypointLoiterAltitude","title":"setWaypointLoiterAltitude","type":"command","url":"https://community.bistudio.com/wiki/setWaypointLoiterAltitude","revid":379307,"updated":"2026-10-30T23:49:06Z","groups":["Waypoints"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Assigns loiter altitude to the provided waypoint.","syntaxes":[{"syntax":"waypoint setWaypointLoiterAltitude loiterAltitude","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"loiterAltitude","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"loiterAltitude"}}],"examples":[{"code":["[_grp, 2] setWaypointLoiterAltitude 100;"]}],"see_also":["waypointLoiterAltitude"]},{"name":"setWaypointLoiterRadius","title":"setWaypointLoiterRadius","type":"command","url":"https://community.bistudio.com/wiki/setWaypointLoiterRadius","revid":319763,"updated":"2022-05-13T09:24:51Z","groups":["Waypoints"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Assignes loiter radius to waypoint","syntaxes":[{"syntax":"waypoint setWaypointLoiterRadius radius","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"radius","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"radius"}}],"examples":[{"code":["[_grp, 2] setWaypointLoiterRadius 200;"]}],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","currentWaypoint","waypointSpeed","setWPPos"]},{"name":"setWaypointLoiterType","title":"setWaypointLoiterType","type":"command","url":"https://community.bistudio.com/wiki/setWaypointLoiterType","revid":319603,"updated":"2022-05-13T09:24:33Z","groups":["Waypoints"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Sets the waypoint loiter type.","syntaxes":[{"syntax":"waypoint setWaypointLoiterType type","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"type","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"type"}}],"examples":[{"code":["[_grp, 2] setWaypointLoiterType \"CIRCLE\";"]},{"code":["[_grp, 2] setWaypointLoiterType \"CIRCLE_L\";"]}],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","currentWaypoint","waypointSpeed","setWPPos","waypointName"]},{"name":"setWaypointName","title":"setWaypointName","type":"command","url":"https://community.bistudio.com/wiki/setWaypointName","revid":319666,"updated":"2022-05-13T09:24:40Z","groups":["Waypoints"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Changes the waypoint name.","syntaxes":[{"syntax":"waypoint setWaypointName name","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"name"}}],"examples":[{"code":["[_grp,2] setWaypointName \"myName\";"]}],"see_also":["addWaypoint","waypointName","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointLoiterRadius","setWaypointLoiterType","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible"]},{"name":"setWaypointPosition","title":"setWaypointPosition","type":"command","url":"https://community.bistudio.com/wiki/setWaypointPosition","revid":377573,"updated":"2026-01-02T06:56:26Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Attempts to move given waypoint to a random position inside a circle with the given center and radius.\nThe waypoint will be placed similar to `\"NONE\"` attribute in setVehiclePosition, even if the radius is 0, which means it could still be off center. In order to force waypoint to the exact position, similar to `\"CAN_COLLIDE\"` attribute, use a negative radius (see Example 2).","syntaxes":[{"syntax":"waypoint setWaypointPosition [center, radius]","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"center","type":"Object or PositionAGL or PositionASL if radius is negative","type_expr":"Object | PositionAGL | PositionASL","text":"center: Object or PositionAGL or PositionASL if *radius* is negative"},{"name":"radius","type":"Number","description":"random placement radius in meters. Set it to -1 and convert center to PositionASL for the exact center placement","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"[center, radius]"}}],"examples":[{"code":["[_grp, 2] setWaypointPosition [position player, 0];"]},{"text":"Exact placement using a negative *radius* and PositionASL:\n\n```sqf\n_wp setWaypointPosition [getPosASL player, -1];\n```","code":["_wp setWaypointPosition [getPosASL player, -1];"]}],"see_also":["waypointPosition","setWPPos","waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed"],"notes":[{"user":"Killzone_Kid","date":"2018-11-14T22:52:00Z","text":"If you want AI to understand height of the waypoint, for example set waypoint at the top of Military Cargo Tower, use Example 2 with position in ASL format and -1 radius."}]},{"name":"setWaypointScript","title":"setWaypointScript","type":"command","url":"https://community.bistudio.com/wiki/setWaypointScript","revid":377760,"updated":"2026-01-03T00:58:20Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Attaches a script to a scripted waypoint. In early versions of Arma, command consisted of a script name and additional script arguments and the script had to use SQS Syntax. The script receives the following arguments in _this variable: [group, position, target] + [the optional passed arguments]. The optional arguments are appended to the end of the arguments array.\n\n> [!NOTE]\n> **Arma 3:** In Arma 3, *command* argument can be a reference to .sqf script (it will have to explicitly end with **`.sqf`**) or a reference to `.sqs` script.","syntaxes":[{"syntax":"waypoint setWaypointScript command","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"command","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"command"}}],"examples":[{"code":["[_grp, 2] setWaypointScript \"find.sqs player\";"]},{"code":["[_grp, 2] setWaypointScript \"somescript.sqf [1,2,3,4,5,6,7,8]\";"]}],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed"]},{"name":"setWaypointSpeed","title":"setWaypointSpeed","type":"command","url":"https://community.bistudio.com/wiki/setWaypointSpeed","revid":377759,"updated":"2026-01-03T00:58:18Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"effect":"global","server_exec":true},"description":"Switches the group speed mode when the waypoint becomes active.\n\nPossible values are:\n\n- \"UNCHANGED\"\n- \"LIMITED\"\n- \"NORMAL\"\n- \"FULL\"","syntaxes":[{"syntax":"waypoint setWaypointSpeed mode","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"mode","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"mode"}}],"examples":[{"code":["[_grp, 2] setWaypointSpeed \"FULL\";"]}],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed"]},{"name":"setWaypointStatements","title":"setWaypointStatements","type":"command","url":"https://community.bistudio.com/wiki/setWaypointStatements","revid":377577,"updated":"2026-01-02T06:56:32Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"The waypoint is done only when the condition is fulfilled. When the waypoint is done, the statement expression is executed.\nWithin the Condition & Statement code string:\n\n- this refers to the group leader\n- thisList refers to the group's units\n\n> [!IMPORTANT]\n> The **Condition** code is evaluated on the group owner's machine. When condition returns true, for some strange reason, the condition is evaluated one more time. The **OnActivation** code is executed **globally**, a.k.a on every client! See Waypoints.","syntaxes":[{"syntax":"waypoint setWaypointStatements [condition, statement]","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"condition","type":"String","type_expr":"String"},{"name":"statement","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"[condition, statement]"}}],"examples":[{"code":["_waypoint setWaypointStatements [\"true\", \"hint 'hello'; hint 'goodbye'\"];"]},{"code":["_waypoint setWaypointStatements [\"true\", \"diag_log ['GroupLeader: ', this]; diag_log ['Units: ', thislist]\"];"]}],"see_also":["waypointStatements"],"notes":[{"user":"SilentSpike","date":"2016-05-21T16:19:00Z","text":"Within the completion statement currentWaypoint will give the index of the waypoint being completed (as opposed to the following one).\n\nThis is particularly useful if you need a self deleting waypoint:\n\n```sqf\n_waypoint setWaypointStatements [\"true\", \"deleteWaypoint [group this, currentWaypoint group this]\"]\n```"},{"user":"RHfront","date":"2017-05-09T16:35:00Z","text":"The condition block carries the same rules as functions which return a value.\nThe return value must be a Boolean.\nOne can bypass the use of triggers in this manner:\n\n```sqf\n_waypoint setWaypointStatements [\"code code code; _returnBool\", \"onActivation block;\"];\n```"}]},{"name":"setWaypointTimeout","title":"setWaypointTimeout","type":"command","url":"https://community.bistudio.com/wiki/setWaypointTimeout","revid":377755,"updated":"2026-01-03T00:58:12Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Defines the time between condition satisfaction and waypoint finish (randomly from min to max, with an average value mid).","syntaxes":[{"syntax":"waypoint setWaypointTimeout [min, mid, max]","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"min","type":"Number","type_expr":"Number"},{"name":"mid","type":"Number","type_expr":"Number"},{"name":"max","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"[min, mid, max]"}}],"examples":[{"code":["[_grp, 2] setWaypointTimeout [5, 10, 6];"]}],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointTimeoutCurrent","waypointSpeed"],"notes":[{"user":"Lucky44","date":"2010-12-12T00:32:00Z","text":"The example doesn't seem to make sense, according to the listed syntax. It seems to set a Max time greater than the Mid time."},{"user":"Tom 48 97","date":"2010-12-12T03:30:00Z","text":"If mid is greater than max, the result will be really near the mid value.\nResults with the values of the example: 8.237, 9.383, 10.425, 9.417, 9.43401, 10.425, 9.90601, 9.96701, 9.42401, 9.42502, 9.96698, 9.89999..."}]},{"name":"setWaypointType","title":"setWaypointType","type":"command","url":"https://community.bistudio.com/wiki/setWaypointType","revid":377747,"updated":"2026-01-03T00:58:00Z","groups":["Waypoints"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Sets the waypoint type of given waypoint.\n\nMore details at Waypoints.","syntaxes":[{"syntax":"waypoint setWaypointType type","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"type","type":"String","description":"waypoint type. Can be:\n\n- `\"MOVE\"`\n- `\"DESTROY\"`\n- `\"GETIN\"`\n- `\"SAD\"` *(Seek And Destroy)*\n- `\"JOIN\"`\n- `\"LEADER\"`\n- `\"GETOUT\"`\n- `\"CYCLE\"`\n- `\"LOAD\"`\n- `\"UNLOAD\"`\n- `\"TR UNLOAD\"`\n- `\"HOLD\"`\n- `\"SENTRY\"`\n- `\"GUARD\"` (used with GUARDED BY trigger or createGuardedPoint)\n- `\"TALK\"`\n- `\"SCRIPTED\"`\n- `\"SUPPORT\"`\n- `\"GETIN NEAREST\"`\n- `\"DISMISS\"`\n- `\"LOITER\"` (Arma 3)\n- Arma 3 v1.34 `\"HOOK\"` (slingload object)\n- Arma 3 v1.34 `\"UNHOOK\"` (slingload drop)\n- `\"AND\"` (only for game logics)\n- `\"OR\"` (only for game logics)","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"type"}}],"examples":[{"code":["_myWaypoint setWaypointType \"HOLD\";"]}],"see_also":["2D Editor: Waypoints","waypointType"],"notes":[{"user":"ArmAtec","date":"2007-11-23T07:44:00Z","text":"Using **MOVE** on a game logic group will move the logic to the set location just like setPos. In the editor, only **AND** and **OR** type of waypoints are available for GAME LOGICS but you can use CYCLE type as well with setWaypointType."},{"user":"RHfront","date":"2017-05-06T16:09:00Z","text":"To use the **LAND** function in a waypoint, you must set *\"A3\\functions_f\\waypoints\\fn_wpLand.sqf\"* as the script for that waypoint."},{"user":"Nelis75733126","date":"2017-05-30T09:14:00Z","text":"In **Arma 3 v1.70**, if you add a **MOVE** waypoint very soon after a **LOITER** waypoint, (assuming that the index of the MOVE waypoint is HIGHER than the index of the LOITER waypoint) then the LOITER waypoint will be considered as a MOVE waypoint.\nAnd, if you add another waypoint after ( for example ) more than 1 second after adding the LOITER waypoint,\nthen the LOITER waypoint will never complete even when its condition has been met.\nThere are two ways to quit an existing LOITER waypoint that was added more than about 1 second before adding a MOVE waypoint:\n\n- use the setCurrentWaypoint command\n- create a waypoint that has the same ID as the LOITER waypoint.\n\nThe difference between those two methods is that the latter prevents the LOITER waypoint from executing its statement."}]},{"name":"setWaypointVisible","title":"setWaypointVisible","type":"command","url":"https://community.bistudio.com/wiki/setWaypointVisible","revid":379390,"updated":"2026-10-31T00:00:08Z","groups":["Waypoints"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","locality":{"effect":"global"},"description":"Sets the visibility of the given waypoint in 3D HUD view (for map visibility see showWaypoint).","syntaxes":[{"syntax":"waypoint setWaypointVisible visible","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"visible","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"visible"}}],"examples":[{"code":["[grp, 2] setWaypointVisible false;"]},{"code":["[group player, currentWaypoint group player] setWaypointVisible false;"]}],"see_also":["waypointVisible","showWaypoint"],"notes":[{"user":"Sixtyfour","date":"2015-09-23T08:22:00Z","text":"This does not apply to Zeus/Curator view... so this command won't hide the Waypoint lines and icons from your view as a Zeus when units are in your EditableAddons list."}]},{"name":"setWeaponReloadingTime","title":"setWeaponReloadingTime","type":"command","url":"https://community.bistudio.com/wiki/setWeaponReloadingTime","revid":364086,"updated":"2024-05-03T19:33:29Z","groups":["Weapons"],"status":"ok","games":{"arma2oa":"1.60","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.60","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Sets reloading **phase** on the given weapon's current ammo round.\n\n> [!IMPORTANT]\n> This command does **not** change a weapon's (e.g soldier's rifle) *magazine* reloading time but changes **the ammo reloading state** before the next round is shot.","syntaxes":[{"syntax":"vehicle setWeaponReloadingTime [gunner, muzzleName, reloadTime]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"gunner","type":"Object","description":"alive and able gunner operating the targeted turret","type_expr":"Object"},{"name":"muzzleName","type":"String","description":"turret's muzzle","type_expr":"String"},{"name":"reloadTime","type":"Number","description":"in range 0..1 where 0: reload complete, 1: reload started","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if given weapon is found"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[gunner, muzzleName, reloadTime]"}}],"examples":[{"code":["_success = _vehicle setWeaponReloadingTime [gunner vehicle player, currentMuzzle gunner vehicle player, 0.5];"]},{"text":"Boost RPM:\n\n```sqf\nunit addEventHandler [\"Fired\", {\n    _this # 0 setWeaponReloadingTime [_this # 0, _this # 2, 1/3];\n}];\n```","code":["unit addEventHandler [\"Fired\", {\n\t_this # 0 setWeaponReloadingTime [_this # 0, _this # 2, 1/3];\n}];"]}],"see_also":["weaponReloadingTime","weapons","magazines","selectWeapon","loadMagazine","weaponState","reload"],"notes":[{"user":".kju","text":"The description is confusing to me. What the command essential does is to set the reloading state/time of the given weapon. For example you can fire a missile, and make the weapon available to fire again instantly if you apply 0.\nOr you can delay or stop the reload event indefinitely. The 0-1 range is a percentage - the reload time is taken from the weapons's config value (either reloadTime or magazineReloadTime - not sure). The effect is one time only each - it does not modify the weapon's general reload time.\n\nWorks also for infantry weapons - probably useful weapons with longer reload time like sniper weapons or launchers:\n\n```\nplayer setWeaponReloadingTime [player,currentWeapon player,0];\n```\n\nNo idea what's point of the return value."},{"user":"Demellion","text":"Note that **setWeaponReloadingTime** is only having effect on a current weapon state (loaded projectile) so since the projectile is fired the next one will be reverted to a weapon config defaults. To keep the fire rate speed changed over time, use this code:\n\n```sqf\nplayer addEventHandler [\"FiredMan\", {\n    params [\"\", \"_weapon\", \"_muzzle\"];\n    private _type = _weapon call BIS_fnc_itemType;\n    private _time = -1;\n    switch (_type select 1) do {\n        case \"SniperRifle\" : {_time = 0.5};\n        case \"AssaultRifle\" : {};\n        case \"Handgun\" : {};\n        case \"Rifle\" : {};\n        case \"SubmachineGun\" : {};\n        case \"MachineGun\" : {};\n        case \"Mortar\" : {};\n        case \"GrenadeLauncher\" : {};\n        case \"BombLauncher\" : {};\n        case \"MissileLauncher\" : {};\n        case \"RocketLauncher\" : {};\n        case \"Cannon\" : {};\n        case \"Throw\" : {};\n    };\n    if (_time isEqualTo -1) exitWith {};\n    (vehicle player) setWeaponReloadingTime [(vehicle player), _muzzle, _time];\n}];\n```\n\nThis Event Handler makes the gun of specific type shoot at a desired rate on each weapon state (sniper rifle will shoot 50% faster in this example). For more information about weapon kinds are there, visit BIS_fnc_itemType."}]},{"name":"setWeaponZeroing","title":"setWeaponZeroing","type":"command","url":"https://community.bistudio.com/wiki/setWeaponZeroing","revid":348618,"updated":"2023-11-08T13:45:39Z","groups":["Weapons"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","description":"Sets zeroing of given weapon and muzzle for given unit or vehicle.","syntaxes":[{"syntax":"object setWeaponZeroing [weaponClass, muzzleClass, zeroingIndex]","params":[{"name":"object","type":"Object","description":"unit or vehicle","type_expr":"Object"},{"name":"weaponClass","type":"String","description":"class name of weapon","type_expr":"String"},{"name":"muzzleClass","type":"String","description":"class name of the muzzle","type_expr":"String"},{"name":"zeroingIndex","type":"Number","description":"zeroing index. See currentZeroing","type_expr":"Number"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if successful, otherwise false is returned (e.g. weapon, muzzle, or zeroing index is invalid)"},"form":"binary","left":{"text":"object"},"right":{"text":"[weaponClass, muzzleClass, zeroingIndex]"}}],"examples":[{"code":["player setWeaponZeroing [\"arifle_MX_GL_F\", \"GL_3GL_F\", 8]; // Set zeroing for underbarrel grenade launcher to 400m"]}],"see_also":["currentZeroing"]},{"name":"setWind","title":"setWind","type":"command","url":"https://community.bistudio.com/wiki/setWind","revid":348903,"updated":"2023-11-08T14:39:59Z","groups":["Environment"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Set current or permanent wind vector.\n\n> [!IMPORTANT]\n> The effect is global only if it is executed on the server. Wind set locally will sync back to server value in a while.","syntaxes":[{"syntax":"setWind [x, y, forced]","params":[{"name":"x","type":"Number","description":"easterly component (in m/s, positive = to the east)","type_expr":"Number"},{"name":"y","type":"Number","description":"northerly component (in m/s, positive = to the north)","type_expr":"Number"},{"name":"forced","type":"Boolean","optional":true,"default":"false","description":"set to true to lock the wind to constantly blows in set direction","type_expr":"Boolean","text":"forced: Boolean - (Optional, default false) set to true to lock the wind to constantly blows in set direction"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[x, y, forced]"}}],"examples":[{"code":["setWind [10, 10, true];"]}],"see_also":["wind","setWindDir","gusts","setGusts"]},{"name":"setWindDir","title":"setWindDir","type":"command","url":"https://community.bistudio.com/wiki/setWindDir","revid":377549,"updated":"2026-01-02T06:54:45Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"global","server_exec":true},"description":"Changes the wind direction smoothly.","syntaxes":[{"syntax":"time setWindDir value","params":[{"name":"time","type":"Number","description":"transition time in seconds. `0` will cause the change to be immediate","type_expr":"Number"},{"name":"value","type":"Number","description":"azimuth","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"value"}},{"syntax":"setWindDir direction","params":[{"name":"direction","type":"Position2D","description":"flat wind direction and strength","type_expr":"Position2D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"direction"}}],"examples":[{"code":["60 setWindDir 180;"]},{"code":["setWindDir [1, -15];"]}],"multiplayer":"Effect is global only when executed on the server. On clients wind direction will sync to server value in a while.","see_also":["windDir"],"notes":[{"user":"Waffle SS.","date":"2014-04-12T20:46:00Z","text":"Seems to make wind [0, 0] in MP. (Arma 3 v1.00)"}]},{"name":"setWindForce","title":"setWindForce","type":"command","url":"https://community.bistudio.com/wiki/setWindForce","revid":322971,"updated":"2022-06-28T21:42:53Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Set max. wind overall wind changes in time. A time of zero means there will be an immediate change. A wind level of zero is minimal changes and a wind level of one means that wind can change rapidly.","syntaxes":[{"syntax":"time setWindForce wind","params":[{"name":"time","type":"Number","type_expr":"Number"},{"name":"wind","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"wind"}}],"examples":[{"code":["1800 setWindForce 0.5;"]}],"see_also":["setWindStr","setWind"]},{"name":"setWindStr","title":"setWindStr","type":"command","url":"https://community.bistudio.com/wiki/setWindStr","revid":370475,"updated":"2024-12-16T18:10:00Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Changes the wind strength smoothly during the given time (in seconds). A time of zero means there will be an immediate change.","syntaxes":[{"syntax":"time setWindStr value","params":[{"name":"time","type":"Number","type_expr":"Number"},{"name":"value","type":"Number","description":"new value in range 0..1","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"time"},"right":{"text":"value"}}],"examples":[{"code":["60 setWindStr 0.8; // set the wind strength to 0.8 gradually over the next 60 seconds"]}],"see_also":["setWind","setWindForce"],"notes":[{"user":"Sa-Matra","date":"2022-08-01T09:39:46Z","text":"This weird command affects `setFog` by limiting maximum number of fogValue you can have. If you do `0 setWindStr 1`, setting any fog with time > 0 will reduce the fog to 0 over provided time. Setting fog instantly with time = 0 will set the desired value properly though. The formula is: max fogValue = 1 - windStr"}]},{"name":"setWingForceScaleRTD","title":"setWingForceScaleRTD","type":"command","url":"https://community.bistudio.com/wiki/setWingForceScaleRTD","revid":377776,"updated":"2026-01-03T01:32:29Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Set effectivity of wings.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"helicopterRTD setWingForceScaleRTD [leftHorizontal, rightHorizontal, vertical]","params":[{"name":"helicopterRTD","type":"ObjectRTD","description":"helicopter","type_expr":"Object"},{"name":"leftHorizontal","type":"Number","type_expr":"Number"},{"name":"rightHorizontal","type":"Number","type_expr":"Number"},{"name":"vertical","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"helicopterRTD"},"right":{"text":"[leftHorizontal, rightHorizontal, vertical]"}}]},{"name":"setWPPos","title":"setWPPos","type":"command","url":"https://community.bistudio.com/wiki/setWPPos","revid":377575,"updated":"2026-01-02T06:56:29Z","groups":["Waypoints"],"status":"ok","games":{"ofp":"1.21","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.21","arma3_since":"0.50","description":"Sets waypoint position.\n\n> [!NOTE]\n> This command is identical to `setWaypointPosition [pos, -1]` (see setWaypointPosition description for more information).","syntaxes":[{"syntax":"waypoint setWPPos pos","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"pos","type":"PositionAGL","type_expr":"PositionAGL"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"pos"}}],"examples":[{"code":["[_groupOne, 1] setWPPos markerPos \"MarkerOne\";"]}],"see_also":["deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypoints","waypointSpeed"],"notes":[{"user":"Killzone_Kid","date":"2018-11-15T14:27:00Z","text":"Even though this command can accept Position2D, it is better to always explicitly state the elevation of waypoint by providing PositionAGL."}]},{"name":"show3DIcons","title":"show3DIcons","type":"command","url":"https://community.bistudio.com/wiki/show3DIcons","revid":363229,"updated":"2024-03-26T10:51:07Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Toggle the drawing of 3D icons.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map show3DIcons bool","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"bool"}}],"examples":[{"text":"-"}]},{"name":"showChat","title":"showChat","type":"command","url":"https://community.bistudio.com/wiki/showChat","revid":310212,"updated":"2022-05-05T13:10:43Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"description":"Shows/hides the whole chat window.","syntaxes":[{"syntax":"showChat bool","params":[{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"bool"}}],"examples":[{"code":["showChat false;"]}],"see_also":["shownChat"]},{"name":"showCinemaBorder","title":"showCinemaBorder","type":"command","url":"https://community.bistudio.com/wiki/showCinemaBorder","revid":379391,"updated":"2026-10-31T00:00:16Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Forces drawing of cinema borders when using custom camera camCreate. This is normally used in cutscenes to indicate player has no control.","syntaxes":[{"syntax":"showCinemaBorder show","params":[{"name":"show","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"show"}}],"examples":[{"code":["showCinemaBorder false;"]}],"see_also":["showHUD"],"notes":[{"user":"Crowe","date":"2007-10-13T13:20:00Z","text":"This command does only work when Mission is started. Use waitUntil {time > 0}; to be sure it works."}]},{"name":"showCommandingMenu","title":"showCommandingMenu","type":"command","url":"https://community.bistudio.com/wiki/showCommandingMenu","revid":363591,"updated":"2024-04-07T18:31:09Z","groups":["Interaction"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Create the commanding menu described by the given config class or menu name. When the name is empty, the current menu is hidden.\n\nIf commanding menu has \"expression\" set up, the expression will receive the following arguments when user activated the menu item:\n\n- Local variable `_target`: Object - Target under the cursor. This works in both 3D and 2D (when cursor is over the unit icon on the map).\n- Local variable `_pos`: Array - Cursor position.\n- Local variable `_is3D`: Boolean - false if cursor is over the map, otherwise true.","syntaxes":[{"syntax":"showCommandingMenu name","params":[{"name":"name","type":"String","description":"class name or user menu name (with \"#USER:\" prefix and \"_#\" page number suffix, where # is the page number starting with 0).","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"name"}}],"examples":[{"code":["showCommandingMenu \"\";"]},{"code":["showCommandingMenu \"MyClassName\";"]},{"code":["showCommandingMenu \"#USER:Tag_Menu_myMenu_0\";"]},{"code":["showCommandingMenu \"RscMainMenu\";"]}],"see_also":["commandingMenu","Arma 3: Communication Menu","BIS_fnc_createMenu"],"notes":[{"user":"LaKing","date":"2010-01-25T17:20:00Z","text":"```sqf\n// This script will create a custom menu, and display it once.\n\nMY_SUBMENU_inCommunication =\n[\n    [\"User submenu\", true],\n    [\"Option-1\", [2], \"\", -5, [[\"expression\", \"player sidechat \"\"-1\"\" \"]], \"0\", \"0\", \"\\ca\\ui\\data\\cursor_support_ca\"],\n    [\"Option 0\", [3], \"\", -5, [[\"expression\", \"player sidechat \"\" 0\"\" \"]], \"1\", \"0\", \"\\ca\\ui\\data\\cursor_support_ca\"],\n    [\"Option 1\", [4], \"\", -5, [[\"expression\", \"player sidechat \"\" 1\"\" \"]], \"1\", \"CursorOnGround\", \"\\ca\\ui\\data\\cursor_support_ca\"]\n];\n\nMY_MENU_inCommunication =\n[\n    // First array: \"User menu\" This will be displayed under the menu, bool value: has Input Focus or not.\n    // Note that as to version Template:arma2 1.05, if the bool value set to false, Custom Icons will not be displayed.\n    [\"User menu\", false],\n\n    // Syntax and semantics for following array elements:\n    // [\"Title_in_menu\", [assigned_key], \"Submenu_name\", CMD, [[\"expression\",script-string]], \"isVisible\", \"isActive\" <, optional icon path>]\n    // Title_in_menu: string that will be displayed for the player\n    // Assigned_key: 0 - no key, 1 - escape key, 2 - key-1, 3 - key-2, ... , 10 - key-9, 11 - key-0, 12 and up... the whole keyboard\n    // Submenu_name: User menu name string (eg \"#USER:MY_SUBMENU_NAME\" ), \"\" for script to execute.\n    // CMD: (for main menu:) CMD_SEPARATOR -1; CMD_NOTHING -2; CMD_HIDE_MENU -3; CMD_BACK -4; (for custom menu:) CMD_EXECUTE -5\n    // script-string: command to be executed on activation. (no arguments passed)\n    // isVisible - Boolean 1 or 0 for yes or no, - or optional argument string, eg: \"CursorOnGround\"\n    // isActive - Boolean 1 or 0 for yes or no - if item is not active, it appears gray.\n    // optional icon path: The path to the texture of the cursor, that should be used on this menuitem.\n    [\"First\", [0], \"\", -5, [[\"expression\", \"player sidechat \"\"First\"\" \"]], \"1\", \"1\"],\n    [\"Second\", [2], \"\", -5, [[\"expression\", \"player sidechat \"\"Second\"\" \"]], \"1\", \"1\"],\n    [\"Submenu\", [3], \"#USER:MY_SUBMENU_inCommunication\", -5, [[\"expression\", \"player sidechat \"\"Submenu\"\" \"]], \"1\", \"1\"]\n];\n\nshowCommandingMenu \"#USER:MY_MENU_inCommunication\";\n```\n\nAppendix, list of optional argument strings:\n\n- `AmmoLow`\n- `AreActions`\n- `CanAnswer`\n- `CanDeselectTeamFromBar`\n- `CanDeselectUnitFromBar`\n- `CanDeselectVehicleFromBar`\n- `CanSelectTeamFromBar`\n- `CanSelectUnitFromBar`\n- `CanSelectVehicleFromBar`\n- `CommandsToGunner`\n- `CommandsToPilot`\n- `CursorOnEmptyVehicle`\n- `CursorOnEnemy`\n- `CursorOnFriendly`\n- `CursorOnGround`\n- `CursorOnGroupMember`\n- `CursorOnGroupMemberSelected`\n- `CursorOnHoldingFire`\n- `CursorOnNeedFirstAID`\n- `CursorOnNeedHeal`\n- `CursorOnNotEmptySubgroups`\n- `CursorOnVehicleCanGetIn`\n- `FormationDiamond`\n- `FormationLine`\n- `FuelLow`\n- `HasRadio`\n- `HCCanDeselectTeamFromBar`\n- `HCCanDeselectUnitFromBar`\n- `HCCanSelectTeamFromBar`\n- `HCCanSelectUnitFromBar`\n- `HCCursorOnIcon`\n- `HCCursorOnIconenemy`\n- `HCCursorOnIconSelectable`\n- `HCCursorOnIconSelectableSelected`\n- `HCIsLeader`\n- `HCNotEmpty`\n- `Injured`\n- `IsAlone`\n- `IsAloneInVehicle`\n- `IsCommander`\n- `IsLeader`\n- `IsSelectedToAdd`\n- `IsTeamSwitch`\n- `IsWatchCommanded`\n- `IsXbox`\n- `Multiplayer`\n- `NotEmpty`\n- `NotEmptyBlueTeam`\n- `NotEmptyCommanders`\n- `NotEmptyGreenTeam`\n- `NotEmptyInVehicle`\n- `NotEmptyMainTeam`\n- `NotEmptyRedTeam`\n- `NotEmptySoldiers`\n- `NotEmptySubgroups`\n- `NotEmptyYellowTeam`\n- `PlayableLeader`\n- `PlayableSelected`\n- `PlayerOwnRadio`\n- `PlayerVehicleCanGetIn`\n- `SelectedTeam`\n- `SelectedUnit`\n- `SomeSelectedHaveTarget`\n- `SomeSelectedHoldingFire`\n- `VehicleCommander`"},{"user":"SilentSpike","date":"2016-07-23T15:40:00Z","text":"You can combine the argument strings (see the above note) together to create OR conditions.\n\nHence `\"HasRadioIsLeader\"` is true when the unit is a leader or has a radio."}]},{"name":"showCompass","title":"showCompass","type":"command","url":"https://community.bistudio.com/wiki/showCompass","revid":379473,"updated":"2026-10-31T00:11:12Z","groups":["Interaction"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Shows or hides the compass on the map screen, if enabled for the mission and you possess the item. (default true)","syntaxes":[{"syntax":"showCompass show","params":[{"name":"show","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"show"}}],"examples":[{"code":["showCompass false;"]}],"see_also":["shownCompass","visibleCompass","showGPS","showRadio","showWatch","showPad","showMap"],"notes":[{"user":"Generalcarver","date":"2009-08-16T00:00:00Z","text":"In Arma 2, the Compass is now an inventory item. Class path is CfgWeapons->ItemCompass. Use the commands addWeapon and removeWeapon to add or remove it from a unit's inventory. (example: player addweapon \"ItemCompass\")"}]},{"name":"showCuratorCompass","title":"showCuratorCompass","type":"command","url":"https://community.bistudio.com/wiki/showCuratorCompass","revid":319912,"updated":"2022-05-13T09:25:43Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Hides or shows compass in curator interface.","syntaxes":[{"syntax":"showCuratorCompass bool","params":[{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"bool"}}],"examples":[{"code":["showCuratorCompass true;"]}],"see_also":["Arma 3: Curator"]},{"name":"showGPS","title":"showGPS","type":"command","url":"https://community.bistudio.com/wiki/showGPS","revid":379474,"updated":"2026-10-31T00:11:20Z","groups":["Interaction"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Shows or hides the GPS receiver on the map screen, if enabled for the mission and you possess the item. (default false).\n\n> [!NOTE]\n> This command does nothing in Arma 3. Use the command openGPS that is available since v2.04.","syntaxes":[{"syntax":"showGPS show","params":[{"name":"show","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"show"}}],"examples":[{"code":["showGPS true;"]}],"see_also":["openGPS","shownGPS","visibleGPS","showCompass","showRadio","showWatch","showPad"],"notes":[{"user":"Generalcarver","date":"2009-08-16T00:00:00Z","text":"In Arma 2, the GPS is now an inventory item. Class path is CfgWeapons->ItemGPS. Use the commands addWeapon and removeWeapon to add or remove it from a unit's inventory. (example: player addweapon \"ItemGPS\")"},{"user":"Galzohar","date":"2010-06-14T00:00:00Z","text":"In Arma 2 GPS is also an item, so will not be removed by removeAllWeapons, even though it can be removed by removeWeapon and added by addWeapon. To remove all items use the removeAllItems command (though this will also remove basic items such as map and compass)."}]},{"name":"showHUD","title":"showHUD","type":"command","url":"https://community.bistudio.com/wiki/showHUD","revid":377971,"updated":"2026-01-19T13:33:47Z","groups":["Interaction"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Enable / disable showing of HUD. Defines visibility of weapon crosshair and any informational tags that appear when pointing the weapon at an object as well as availability of the default action menu. Unfortunately, it also hides icons drawn with drawIcon3D.\n\n> [!NOTE]\n> **Arma 3:** **Since Arma 3 v1.50** there is a Description.ext's showHUD[] array param that is identical in format to the extended showHUD command.\n>\n> When present, it will disable showHUD command entirely, allowing mission makers to permanently alter visibility of some HUD elements.\n> **Since Arma 3 v2.04** it is possible to force drawing of drawIcon3D icons when HUD is hidden.\n> The icons will also show when custom camera is created and the view is switched to it via switchCamera or cameraEffect provided cameraEffectEnableHUD is enabled.\n>\n> For more information see drawIcon3D.","syntaxes":[{"syntax":"showHUD enable","params":[{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enable"}},{"syntax":"showHUD [scriptedHUD, info, radar, compass, direction, menu, group, cursors, panels, kills, showIcon3D]","params":[{"name":"scriptedHUD","type":"Boolean","description":"show scripted HUD such as weapon crosshair, action menu and overlays created with cutRsc and titleRsc. Same as showHUD's first syntax","type_expr":"Boolean"},{"name":"info","type":"Boolean","optional":true,"default":"true","description":"show vehicle, soldier and weapon info","type_expr":"Boolean","text":"info: Boolean - (Optional, default true) show vehicle, soldier and weapon info"},{"name":"radar","type":"Boolean","optional":true,"default":"true","description":"show vehicle radar","type_expr":"Boolean","text":"radar: Boolean - (Optional, default true) show vehicle radar"},{"name":"compass","type":"Boolean","optional":true,"default":"true","description":"show vehicle compass","type_expr":"Boolean","text":"compass: Boolean - (Optional, default true) show vehicle compass"},{"name":"direction","type":"Boolean","optional":true,"default":"true","description":"show tank direction indicator. Not present in vanilla Arma 3","type_expr":"Boolean","text":"direction: Boolean - (Optional, default true) show tank direction indicator. Not present in vanilla Arma 3"},{"name":"menu","type":"Boolean","optional":true,"default":"true","description":"show commanding menu (HC related menus)","type_expr":"Boolean","text":"menu: Boolean - (Optional, default true) show commanding menu (HC related menus)"},{"name":"group","type":"Boolean","optional":true,"default":"true","description":"show group info bar (Squad leader info bar)","type_expr":"Boolean","text":"group: Boolean - (Optional, default true) show group info bar (Squad leader info bar)"},{"name":"cursors","type":"Boolean","optional":true,"default":"true","description":"show HUD weapon cursors (connected with scripted HUD)","type_expr":"Boolean","text":"cursors: Boolean - (Optional, default true) show HUD weapon cursors (connected with scripted HUD)"},{"name":"panels","type":"Boolean","optional":true,"default":"true","description":"show Arma 3: Custom Info","type_expr":"Boolean","since":"arma3 1.70","text":"panels: Boolean - (Optional, default true) show Arma 3: Custom Info"},{"name":"kills","type":"Boolean","optional":true,"default":"true","description":"show \"x killed by y\" systemChat messages","type_expr":"Boolean","text":"kills: Boolean - (Optional, default true) show \"x killed by y\" systemChat messages"},{"name":"showIcon3D","type":"Boolean","optional":true,"default":"false","description":"show icons drawn with drawIcon3D even when the HUD is hidden","type_expr":"Boolean","since":"arma3 2.04","text":"showIcon3D: Boolean - (Optional, default false) show icons drawn with drawIcon3D even when the HUD is hidden"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[scriptedHUD, info, radar, compass, direction, menu, group, cursors, panels, kills, showIcon3D]"}}],"examples":[{"code":["showHUD false;"]},{"text":"Hide vehicle radar and compass:\n\n```sqf\nshowHUD [\n    true,  // scriptedHUD\n    true,  // info\n    false, // radar\n    false, // compass\n    true,  // direction\n    true,  // menu\n    true,  // group\n    true,  // cursors\n    true,  // panels\n    true,  // kills\n    true   // showIcon3D\n];\n```","code":["showHUD [\n\ttrue,  // scriptedHUD\n\ttrue,  // info\n\tfalse, // radar\n\tfalse, // compass\n\ttrue,  // direction\n\ttrue,  // menu\n\ttrue,  // group\n\ttrue,  // cursors\n\ttrue,  // panels\n\ttrue,  // kills\n\ttrue   // showIcon3D\n];"]},{"text":"Check if HUD visibility is hardcoded in mission config and showHUD command is overridden:\n\n```sqf\nprivate _disabledShowHUD = isArray (missionConfigFile >> \"showHUD\");\n```","code":["private _disabledShowHUD = isArray (missionConfigFile >> \"showHUD\");"]}],"see_also":["shownHUD","showCinemaBorder","showSubtitles","showWatch","showRadio","showMap","showGPS","showCompass","showPad"],"notes":[{"user":"Killzone_Kid","date":"2015-08-17T19:08:00Z","text":"The \"cursors\" parameter controls visibility of the action menu as well as weapon cursors.\nHowever if 1st param \"hud\" hides and disables action menu, param \"cursors\" only hides it. So you get invisible action menu that is fully operational.\ninGameUISetEventHandler will still fire on interaction, giving the information about selected item on the action menu even if you cannot see it.\nUnfortunately it also hides icons drawn with drawIcon3D."},{"user":"POLPOX","date":"2020-03-01T14:33:00Z","text":"```sqf\nshowHUD false;\n```\n\nremoves Contact's compass that is shown at the top of the screen."}]},{"name":"showLegend","title":"showLegend","type":"command","url":"https://community.bistudio.com/wiki/showLegend","revid":363238,"updated":"2024-03-26T10:51:16Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Show/hide map legend.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map showLegend bool","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"bool","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"bool"}}],"examples":[{"text":"-"}]},{"name":"showMap","title":"showMap","type":"command","url":"https://community.bistudio.com/wiki/showMap","revid":377943,"updated":"2026-01-11T23:01:48Z","groups":["Map"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Enable Map (default true).\n\n> [!NOTE]\n> In Arma 2 and later this command no longer works, the map now being an inventory item (\"ItemMap\" class name).\n>\n> ```sqf\n> unitName removeWeapon \"ItemMap\";\n> unitName addWeapon \"ItemMap\";\n> ```","syntaxes":[{"syntax":"showMap show","params":[{"name":"show","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"show"}}],"examples":[{"code":["showMap false;"]}],"see_also":["showCompass","showGPS","showRadio","showWatch","showPad","shownMap"]},{"name":"shownAction","title":"shownAction","type":"command","url":"https://community.bistudio.com/wiki/shownAction","revid":378590,"updated":"2026-05-13T12:13:00Z","groups":["Interaction"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","description":"Get the internal enum of the displayed action (or 0 if none are displayed). Action enums:\n\n1. GetInCommander\n1. GetInDriver\n1. GetInPilot\n1. GetInGunner\n1. GetInCargo\n1. GetInTurret\n1. Heal\n1. Repair\n1. Refuel\n1. Rearm\n1. GetOut\n1. LightOn\n1. LightOff\n1. EngineOn\n1. EngineOff\n1. SwitchWeapon\n1. HideWeapon\n1. SwitchMagazine\n1. UseWeapon\n1. LoadMagazine\n1. LoadOtherMagazine\n1. LoadEmptyMagazine\n1. TakeWeapon\n1. MountWeaponFromInv\n1. UnmountWeaponToInv\n1. MountItem\n1. UnmountItem\n1. TakeItem\n1. DropItem\n1. UnloadMagazine\n1. ChangeUniformWithBody\n1. DropItemFromBody\n1. ChangeBackpackFromBackpack\n1. TakeItemFromBody\n1. TakeBackpackFromBody\n1. UnmountUniformItem\n1. MountUniformItem\n1. UseContainerMagazine\n1. TakeDropWeapon\n1. TakeMagazine\n1. TakeDropMagazine\n1. TakeFlag\n1. ReturnFlag\n1. TurnIn\n1. TurnOut\n1. WeaponInHand\n1. WeaponOnBack\n1. SitDown\n1. Land\n1. CancelLand\n1. Eject\n1. MoveToDriver\n1. MoveToPilot\n1. MoveToGunner\n1. MoveToCommander\n1. MoveToCargo\n1. MoveToTurret\n1. HideBody\n1. TouchOff\n1. TouchOffMines\n1. StartTimer\n1. SetTimer\n1. Deactivate\n1. NVGoggles\n1. NVGogglesOff\n1. ManualFire\n1. ManualFireCancel\n1. AutoHover\n1. AutoHoverCancel\n1. VTOLVectoring\n1. VTOLVectoringCancel\n1. StrokeFist\n1. StrokeGun\n1. LadderUp\n1. LadderDown\n1. LadderOnDown\n1. LadderOnUp\n1. LadderOff\n1. FireInflame\n1. FirePutDown\n1. LandGear\n1. LandGearUp\n1. FlapsDown\n1. FlapsUp\n1. VectoringDown\n1. VectoringUp\n1. Salute\n1. ScudLaunch\n1. ScudStart\n1. ScudCancel\n1. **User** (*via* addAction)\n1. DropWeapon\n1. PutWeapon\n1. DropMagazine\n1. PutMagazine\n1. UserType\n1. HandGunOn\n1. HandGunOnStand\n1. HandGunOff\n1. HandGunOffStand\n1. TakeMine\n1. ActivateMine\n1. DeactivateMine\n1. UseMagazine\n1. IngameMenu\n1. CancelTakeFlag\n1. CancelAction\n1. MarkEntity\n1. MarkWeapon\n1. TeamSwitch\n1. Gear\n1. GearOpen\n1. HealSoldier\n1. HealSoldierAuto\n1. HealSoldierSelf\n1. PatchSoldier\n1. Surrender\n1. GetOver\n1. FirstAid\n1. OpenBag\n1. TakeBag\n1. DropBag\n1. PutBag\n1. AddBag\n1. Assemble\n1. DisAssemble\n1. IRLaserOn\n1. IRLaserOff\n1. GunLightOn\n1. GunLightOff\n1. ArtilleryComputer\n1. RepairVehicle\n1. DragSoldier\n1. CarrySoldier\n1. CarrySoldierInterrupt\n1. DragSoldierInterrupt\n1. DropCarried\n1. OpenParachute\n1. TakeVehicleControl\n1. SuspendVehicleControl\n1. LockVehicleControl\n1. UnlockVehicleControl\n1. SearchLightOn\n1. SearchLightOff\n1. CollisionLightOn\n1. CollisionLightOff\n1. PutInDriver\n1. PutInPilot\n1. PutInCargo\n1. PutInGunner\n1. PutInCommander\n1. PutInTurret\n1. UnloadFromDriver\n1. UnloadFromPilot\n1. UnloadFromCargo\n1. UnloadFromGunner\n1. UnloadFromCommander\n1. UnloadFromTurret\n1. PeriscopeDepthOn\n1. PeriscopeDepthOff\n1. UAVTerminalOpen\n1. UAVTerminalMakeConnection\n1. UAVTerminalReleaseConnection\n1. BackFromUAV\n1. SwitchToUAVDriver\n1. SwitchToUAVGunner\n1. UAVTerminalHackConnection\n1. ActiveSensorsOn\n1. ActiveSensorsOff\n1. ListLeftVehicleDisplay\n1. ListRightVehicleDisplay\n1. ListPrevLeftVehicleDisplay\n1. ListPrevRightVehicleDisplay\n1. CloseLeftVehicleDisplay\n1. CloseRightVehicleDisplay\n1. NextModeLeftVehicleDisplay\n1. NextModeRightVehicleDisplay\n1. UnloadUnconsciousUnits\n1. Talk\n1. Tell\n1. HookCargo\n1. UnhookCargo\n1. HelicopterAutoTrimOn\n1. HelicopterAutoTrimOff\n1. HelicopterTrimOn\n1. HelicopterTrimOff\n1. WheelsBrakeOn\n1. WheelsBrakeOff\n1. LoadVehicle\n1. UnloadVehicle\n1. UnloadAllVehicles\n\n> [!NOTE]\n> - **91** is the enum number for a user-added action (addAction)\n> - note the difference between `GetInDriver` and `GetInPilot`.","syntaxes":[{"syntax":"shownAction","params":[],"returns":{"type":"Number","type_expr":"Number","description":"action enum (see description) or 0 otherwise"},"form":"nullary"}],"examples":[{"code":["if (shownAction == 91) then { hint \"User added action is shown\" };"]},{"code":["if (shownAction == 111) then { hint \"Open inventory action is shown\" };"]},{"code":["if (shownAction == 79) then { hint \"Drop that lighter, now\" };"]}],"see_also":["hideActions","hiddenActions","visibleMap","shownGPS","shownWatch","shownCompass","shownUAVFeed","shownHUD","addAction","action","isActionMenuVisible"]},{"name":"shownArtilleryComputer","title":"shownArtilleryComputer","type":"command","url":"https://community.bistudio.com/wiki/shownArtilleryComputer","revid":321212,"updated":"2022-05-13T15:31:01Z","groups":["Artillery"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Checks whether the player has the artillery computer currently open.","syntaxes":[{"syntax":"shownArtilleryComputer","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (shownArtilleryComputer) then { hint \"Artillery Computer shown on screen\"; };"]}],"see_also":["enableEngineArtillery","getArtilleryComputerSettings","inRangeOfArtillery","commandArtilleryFire","doArtilleryFire","getArtilleryETA"]},{"name":"shownChat","title":"shownChat","type":"command","url":"https://community.bistudio.com/wiki/shownChat","revid":310766,"updated":"2022-05-07T20:21:39Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"1.36"},"since":"arma3 1.36","arma3_since":"1.36","description":"Returns true if chat window is enabled. Chat window can be disabled with showChat command.","syntaxes":[{"syntax":"shownChat","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_bool = shownChat;"]}],"see_also":["showChat","showUAVFeed","shownMap","shownArtilleryComputer","shownCuratorCompass","slingLoadAssistantShown","ctrlShown","hcShownBar","shownGPS","shownCompass","shownPad","shownRadio","shownWatch"]},{"name":"shownCompass","title":"shownCompass","type":"command","url":"https://community.bistudio.com/wiki/shownCompass","revid":379392,"updated":"2026-10-31T00:00:24Z","groups":["Interaction"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Checks if client has Compass enabled in description.ext (*showCompass* param) or force enabled with showCompass command.","syntaxes":[{"syntax":"shownCompass","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (shownCompass) then {hint \"You have Compass enabled\"};"]}],"see_also":["showCompass","visibleCompass","shownGPS","shownWatch","shownHUD"],"notes":[{"user":"POLPOX","date":"2020-03-09T08:12:00Z","text":"Even if you're aiming down a sight (which is usually you can't open the compass), shownCompass returns true if you press the compass key (K)."}]},{"name":"shownCuratorCompass","title":"shownCuratorCompass","type":"command","url":"https://community.bistudio.com/wiki/shownCuratorCompass","revid":310778,"updated":"2022-05-07T20:21:45Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns true if compass is shown.","syntaxes":[{"syntax":"shownCuratorCompass","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_isShown = shownCuratorCompass;"]}],"see_also":["Arma 3: Curator"]},{"name":"showNewEditorObject","title":"showNewEditorObject","type":"command","url":"https://community.bistudio.com/wiki/showNewEditorObject","revid":363251,"updated":"2024-03-26T10:51:24Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Show the add editor object dialog,type is editor object type,class is,class definition to automatically select,side filters by a certain,side,pos is position to create the object.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map showNewEditorObject [type,class,side,position]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"[type,class,side,position]","type":"Array","type_expr":"Array"}],"returns":{"type":"Anything","type_expr":"Anything"},"form":"binary","left":{"text":"map"},"right":{"text":"[type,class,side,position]"}}],"examples":[{"text":"-"}]},{"name":"shownGPS","title":"shownGPS","type":"command","url":"https://community.bistudio.com/wiki/shownGPS","revid":363942,"updated":"2024-04-26T21:33:55Z","groups":["Interaction"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Checks if client has GPS receiver enabled in description.ext (*showGPS* param) or force enabled with showGPS command.","syntaxes":[{"syntax":"shownGPS","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (shownGPS) then { hint \"You have the GPS receiver enabled\" };"]}],"see_also":["showGPS","visibleGPS","openGPS","shownWatch","shownCompass","shownHUD"]},{"name":"shownHUD","title":"shownHUD","type":"command","url":"https://community.bistudio.com/wiki/shownHUD","revid":378387,"updated":"2026-04-04T04:54:34Z","groups":["Interaction"],"status":"ok","games":{"arma3":"1.52"},"since":"arma3 1.52","arma3_since":"1.52","description":"Returns array of Booleans corresponding to the visibility of various HUD elements (see extended showHUD).","syntaxes":[{"syntax":"shownHUD","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [hud, info, radar, compass, direction, menu, group, cursors, panels, kills, icon3d]\n- hud: Boolean - show scripted HUD such as weapon crosshair, action menu and overlays created with cutRsc and titleRsc - info: Boolean - (Optional, default true) show vehicle, soldier and weapon info - radar: Boolean - (Optional, default true) show vehicle radar - compass: Boolean - (Optional, default true) show vehicle compass - direction: Boolean - (Optional, default true) show tank direction indicator. Not present in vanilla Arma 3 - menu: Boolean - (Optional, default true) show commanding menu (HC related menus) - group: Boolean - (Optional, default true) show group info bar (Squad leader info bar) - cursors: Boolean - (Optional, default true) show HUD weapon cursors (connected with scripted HUD) - panels: Boolean - (Optional, default true) show Arma 3: Custom Info - kills: Boolean - (Optional, default true) show \"x killed by y\" systemChat messages - icon3d: Boolean - (Optional, default false) show icons drawn with drawIcon3D even when the HUD is hidden","text":"Array with [hud, info, radar, compass, direction, menu, group, cursors, panels, kills, icon3d]\n\n- hud: Boolean - show scripted HUD such as weapon crosshair, action menu and overlays created with cutRsc and titleRsc\n- info: Boolean - (Optional, default true) show vehicle, soldier and weapon info\n- radar: Boolean - (Optional, default true) show vehicle radar\n- compass: Boolean - (Optional, default true) show vehicle compass\n- direction: Boolean - (Optional, default true) show tank direction indicator. Not present in vanilla Arma 3\n- menu: Boolean - (Optional, default true) show commanding menu (HC related menus)\n- group: Boolean - (Optional, default true) show group info bar (Squad leader info bar)\n- cursors: Boolean - (Optional, default true) show HUD weapon cursors (connected with scripted HUD)\n- panels: Boolean - (Optional, default true) show Arma 3: Custom Info\n- kills: Boolean - (Optional, default true) show \"x killed by y\" systemChat messages\n- icon3d: Boolean - (Optional, default false) show icons drawn with drawIcon3D even when the HUD is hidden"},"form":"nullary"}],"examples":[{"code":["_hudStatus = shownHUD;"]},{"code":["shownHUD params [\"_hud\", \"_info\", \"_radar\", \"_compass\", \"_direction\", \"_menu\", \"_group\", \"_cursors\", \"_panels\", \"_kills\", \"_icon3d\"];"]}],"see_also":["showHUD","shownMap","visibleMap","forceMap","shownGPS","shownWatch","shownCompass","shownUAVFeed"]},{"name":"shownMap","title":"shownMap","type":"command","url":"https://community.bistudio.com/wiki/shownMap","revid":319962,"updated":"2022-05-13T09:25:48Z","groups":["Map"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Checks if client has Map enabled in description.ext (*showMap* param) or force enabled with showMap command.","syntaxes":[{"syntax":"shownMap","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (shownMap) then {hint \"You have Map enabled\"};"]}],"see_also":["showMap","visibleMap","forceMap","shownGPS","shownWatch","shownCompass","shownUAVFeed","shownHUD"]},{"name":"shownPad","title":"shownPad","type":"command","url":"https://community.bistudio.com/wiki/shownPad","revid":319883,"updated":"2022-05-13T09:25:39Z","groups":["Interaction"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Checks if client has Notepad enabled.","syntaxes":[{"syntax":"shownPad","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (shownPad) then {hint \"You have Notepad enabled.\"};"]}],"see_also":["shownMap","shownGPS","shownWatch","shownCompass","shownUAVFeed"]},{"name":"shownRadio","title":"shownRadio","type":"command","url":"https://community.bistudio.com/wiki/shownRadio","revid":353339,"updated":"2024-03-15T17:11:51Z","groups":["Interaction","Radio and Chat"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Check if player has Radio enabled.\n\n> [!NOTE]\n> This command exists in Arma 3 but doesn't do much","syntaxes":[{"syntax":"shownRadio","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (shownRadio) then {hint \"You have Radio enabled.\"};"]}],"see_also":["showRadio","shownMap","shownGPS","shownWatch","shownCompass","shownUAVFeed"]},{"name":"shownScoretable","title":"shownScoretable","type":"command","url":"https://community.bistudio.com/wiki/shownScoretable","revid":363424,"updated":"2024-03-29T21:13:39Z","groups":["Interaction"],"status":"ok","games":{"arma3":"1.60"},"since":"arma3 1.60","arma3_since":"1.60","description":"Returns the state of the score table set with showScoretable command.","syntaxes":[{"syntax":"shownScoretable","params":[],"returns":{"type":"Number","type_expr":"Number","description":"0: Force hidden, 1: Force shown, -1: Default"},"form":"nullary"}],"examples":[{"code":["_state = shownScoretable;"]}],"problems":"> [!WARNING]\n> Since Arma 3 v1.64, the previous functionality of this command (score table visibility check) is moved to visibleScoretable command. Please update your scripts and sorry for any inconvenience.","see_also":["showScoretable","visibleScoretable"]},{"name":"shownSubtitles","title":"shownSubtitles","type":"command","url":"https://community.bistudio.com/wiki/shownSubtitles","revid":349059,"updated":"2023-11-08T14:47:19Z","groups":["Radio and Chat"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"A getter for showSubtitles.","syntaxes":[{"syntax":"shownSubtitles","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if subtitles are set to show"},"form":"nullary"}],"examples":[{"code":["private _setToShow = shownSubtitles;"]}],"see_also":["showSubtitles"]},{"name":"shownUAVFeed","title":"shownUAVFeed","type":"command","url":"https://community.bistudio.com/wiki/shownUAVFeed","revid":310779,"updated":"2022-05-07T20:21:45Z","groups":["Remote Control","Custom Panels"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Returns true if video feed transmitted from UAV is shown. A getter for showUAVFeed.","syntaxes":[{"syntax":"shownUAVFeed","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_bool = shownUAVFeed;"]}],"see_also":["showUAVFeed","allUnitsUAV","getConnectedUAV","UAVControl","connectTerminalToUAV","isUAVConnected"]},{"name":"shownWarrant","title":"shownWarrant","type":"command","url":"https://community.bistudio.com/wiki/shownWarrant","revid":319867,"updated":"2022-05-13T09:25:38Z","groups":["Interaction"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Check if player has ID card enabled. Obsolete command.","syntaxes":[{"syntax":"shownWarrant","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["hint format [\"Your ID is %1\", [\"off\", \"on\"] select shownWarrant];"]}],"see_also":["showWarrant"]},{"name":"shownWatch","title":"shownWatch","type":"command","url":"https://community.bistudio.com/wiki/shownWatch","revid":319901,"updated":"2022-05-13T09:25:41Z","groups":["Interaction"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Checks if client has Watch enabled in description.ext (*showWatch* param) or force enabled with showWatch command.","syntaxes":[{"syntax":"shownWatch","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (shownWatch) then {hint \"You have Watch enabled\"};"]}],"see_also":["showWatch","visibleWatch","shownGPS","shownCompass","shownHUD"]},{"name":"showPad","title":"showPad","type":"command","url":"https://community.bistudio.com/wiki/showPad","revid":322923,"updated":"2022-06-28T21:42:28Z","groups":["Interaction"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Shows or hides the notebook on the map screen, if enabled for the mission. (default true). It is no longer relevant to Arma 2.","syntaxes":[{"syntax":"showPad show","params":[{"name":"show","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"show"}}],"examples":[{"code":["showPad false;"]}],"see_also":["shownPad","showCompass","showGPS","showRadio","showWatch"]},{"name":"showRadio","title":"showRadio","type":"command","url":"https://community.bistudio.com/wiki/showRadio","revid":370852,"updated":"2025-02-18T00:23:17Z","groups":["Interaction","Radio and Chat"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Shows or hides the radio on the map screen, if enabled for the mission and you possess the item. (default true).\n\n> [!NOTE]\n> This command does nothing in Arma 3.","syntaxes":[{"syntax":"showRadio show","params":[{"name":"show","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"show"}}],"examples":[{"code":["showRadio false;"]}],"see_also":["shownRadio","showCompass","showGPS","showWatch","showPad"],"notes":[{"user":"GeneralCarver","date":"2009-08-16T21:02:00Z","text":"The radio is now an item in Arma 2.\nClass path is `\"CfgWeapons\" >> \"ItemRadio\"`.\nUse the addWeapon and removeWeapon commands to add/remove it from a unit's inventory. e.g:\n\n```sqf\nplayer removeWeapon \"ItemRadio\";\n```"}]},{"name":"showScoretable","title":"showScoretable","type":"command","url":"https://community.bistudio.com/wiki/showScoretable","revid":309918,"updated":"2022-05-05T12:16:57Z","groups":["Interaction"],"status":"ok","games":{"arma3":"1.60"},"since":"arma3 1.60","arma3_since":"1.60","description":"Forces the score table to be shown, hidden or reset to default functionality. Forcing score table will make it show even in SP. When score table is forced opened it cannot be closed manually, when it is force closed, it cannot be opened manually.","syntaxes":[{"syntax":"showScoretable force","params":[{"name":"force","type":"Number","description":"1 to force visible, 0 to force invisible, -1 default","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"force"}}],"examples":[{"code":["showScoretable 1;"]}],"see_also":["shownScoretable","visibleScoretable"]},{"name":"showSubtitles","title":"showSubtitles","type":"command","url":"https://community.bistudio.com/wiki/showSubtitles","revid":363292,"updated":"2024-03-26T10:51:59Z","groups":["Radio and Chat"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Enables / disables showing of subtitles in a chat. Only scripted/engine chatter is affected, player manual chat is unaffected. Returns the previous state.","syntaxes":[{"syntax":"showSubtitles enable","params":[{"name":"enable","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"enable"}}],"examples":[{"code":["showSubtitles false;"]}],"see_also":["shownSubtitles","setSpeaker","disableConversation","enableRadio","enableSentences"]},{"name":"showUAVFeed","title":"showUAVFeed","type":"command","url":"https://community.bistudio.com/wiki/showUAVFeed","revid":364255,"updated":"2024-05-06T09:38:21Z","groups":["Remote Control","Custom Panels"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","description":"Shows/hides video feed transmitted from UAV in its custom info panel.","syntaxes":[{"syntax":"showUAVFeed show","params":[{"name":"show","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"always true unless error"},"form":"unary","right":{"text":"show"}}],"examples":[{"code":["showUAVFeed true;"]}],"see_also":["shownUAVFeed","allUnitsUAV","getConnectedUAV","UAVControl","connectTerminalToUAV","isUAVConnected","BIS_fnc_liveFeed"]},{"name":"showWarrant","title":"showWarrant","type":"command","url":"https://community.bistudio.com/wiki/showWarrant","revid":352093,"updated":"2024-02-01T23:24:49Z","groups":["Interaction","Broken Commands"],"status":"broken","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Enable ID card.\n\n> [!WARNING]\n> Obsolete command.","syntaxes":[{"syntax":"showWarrant show","params":[{"name":"show","type":"Boolean","description":"(default false)","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"show"}}],"examples":[{"code":["showWarrant true;"]}],"see_also":["showCompass","showGPS","showMap","showWatch"]},{"name":"showWatch","title":"showWatch","type":"command","url":"https://community.bistudio.com/wiki/showWatch","revid":379475,"updated":"2026-10-31T00:11:28Z","groups":["Interaction"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Shows or hides the watch on the map screen, if enabled for the mission and you possess the item. (default true)","syntaxes":[{"syntax":"showWatch show","params":[{"name":"show","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"show"}}],"examples":[{"code":["showWatch false;"]}],"see_also":["shownWatch","visibleWatch","showCompass","showGPS","showRadio","showPad"],"notes":[{"user":"Generalcarver","date":"2009-08-16T00:00:00Z","text":"In Arma 2, the Watch is now an inventory item. Class path is CfgWeapons->ItemWatch. Use the commands addWeapon and removeWeapon to add or remove it from a unit's inventory. (example: player addweapon \"ItemWatch\")"}]},{"name":"showWaypoint","title":"showWaypoint","type":"command","url":"https://community.bistudio.com/wiki/showWaypoint","revid":348989,"updated":"2023-11-08T14:45:47Z","groups":["Waypoints"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Defines how waypoints are shown to the player in map view. For 3D HUD visibility see setWaypointVisible.","syntaxes":[{"syntax":"waypoint showWaypoint show","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"show","type":"String","description":"possible values are:\n\n- \"NEVER\" - Never show\n- \"EASY\" - Show only if `showCadetWP` is enabled in global difficulty.\n- \"ALWAYS\" - Always show","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"show"}}],"examples":[{"code":["[_grp, 2] showWaypoint \"ALWAYS\";"]}],"see_also":["waypointShow"]},{"name":"showWaypoints","title":"showWaypoints","type":"command","url":"https://community.bistudio.com/wiki/showWaypoints","revid":329411,"updated":"2022-07-27T15:11:51Z","groups":["Waypoints"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Shows/Hides task HUD markers and waypoints that will fade out in time. Dependable on difficulty settings.","syntaxes":[{"syntax":"showWaypoints enabled","params":[{"name":"enabled","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enabled"}}],"examples":[{"code":["showWaypoints true;"]}],"see_also":["showWaypoint","waypointShow"],"notes":[{"user":"PierreMGI","date":"2020-05-27T07:20:00Z","text":"Even if you set your difficulty with \"waypoints: hide\", if you are using addWaypoint command for player, you will see your waypoints displayed on map, with the track to follow.\nSome other cases using addWaypoint will allow this unexpected behaviour on map and the code `showWaypoints false;` will not change anything for map.\nYou need to use showWaypoint command instead, on each added waypoints:\n\n```sqf\n_wp = group player addWaypoint [getMarkerPos \"aMarker\", 0];\n_wp showWaypoint \"NEVER\";\n```"}]},{"name":"side","title":"side","type":"command","url":"https://community.bistudio.com/wiki/side","revid":341641,"updated":"2023-06-12T19:02:58Z","groups":["Sides"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the side of a unit, vehicle, object or location.\n\n- side of a renegade soldier is sideEnemy\n- side of an empty vehicle is civilian\n- side of a crewed vehicle is, if present, commander's > gunner's > driver's or > cargo's side, in this order\n- side of a captive or dead unit is civilian. Use `side group _unit` to get the underlying side (see Example 2)\n- you can use playerSide to know the real player's side\n\n> [!NOTE]\n> Converting a side to string will **not** always return the side command text: e.g `str resistance; // returns \"GUER\"`.\n> See Side page to see the return value of all side commands.","syntaxes":[{"syntax":"side target","params":[{"name":"target","type":"Object, Group or Location","type_expr":"Object | Group | Location"}],"returns":{"type":"Side","type_expr":"Side"},"form":"unary","right":{"text":"target"}}],"examples":[{"code":["if (side player == west) then { hint \"Player is on the West side\" };"]},{"code":["_sideAlsoWorkingForDead = side group _deadUnit;"]},{"code":["_sideLocation = side myLocation;"]},{"code":["if (side player != playerSide) then { hint \"player is renegade or dead\"; };"]},{"text":"Check the side of the vehicle:\n\n```sqf\n_vehicleSide = side group _vehicle; // sideUnknown (CIV for Arma 3) if empty or dead crew, otherwise the appropriate side\n```","code":["_vehicleSide = side group _vehicle; // sideUnknown (CIV for Arma 3) if empty or dead crew, otherwise the appropriate side"]}],"see_also":["CfgVehicles Config Reference","Side","playerSide","west","east","resistance","civilian","sideLogic","sideFriendly","sideEnemy","sideUnknown","sideEmpty","sideAmbientLife","Side Relations","BIS_fnc_sideID","BIS_fnc_objectSide"],"notes":[{"user":"Ceeeb","date":"2007-03-23T04:51:00Z","text":"In **Arma**, the following objects are on side civilian: dead bodies and vehicles, empty vehicles, all mission editor placed objects (that do not have an inherit side), all objects with interactive components such as ladders and doors, man made structures such as buildings (including classless wrp placed objects), docks, high tension powerlines, see-saws, large rubbish bins, fountains. Basically if an object uses a non-simple damage or physics simulation it is likely to be on the civilian side.\n**NOTE:** If you need to know the side of a dead body, you can use faction command as a workaround -- Killzone_Kid"},{"user":"Ceeeb","date":"2007-02-12T06:28:00Z","text":"In **Operation Flashpoint v1.96**, the side return value for a vehicle is based on the side of its commander, then gunner, then driver, then cargo. It will retain its side value until it is either empty, or a unit of another side takes over in a equal or higher role, irrespective of the side of other units still on board. This can be used to simulate friendly fire, as a vehicle can be made to appear to be an enemy even though all units on board are actually friendly."},{"user":"Tankbuster","date":"2010-03-19T16:48:00Z","text":"As Ceeeb says above, in **Arma 2**, side for a vehicle often depends on who the command or driver is, for example, A KA52, piloted by a USMC guy will have side WEST. For an accurate result of what 'where the vehicle was made', use faction. This ignores the pilot/commander, so in my example here, this KA52 will always return faction \"RU\". Note that faction returns different values to side though."},{"user":"RKurtzDmitriyev","date":"2011-02-04T18:11:00Z","text":"Side values for ambient life (animals) are bizarre. `side _unit` returns \"CIV\", but playerSide returns \"AMBIENT LIFE\" when the player is an animal. In that case, `playerSide == side player;` returns false!\n\nFortunately, you can easily check if a unit is an animal with `_unit isKindOf \"ANIMAL\";`"}]},{"name":"sideAmbientLife","title":"sideAmbientLife","type":"command","url":"https://community.bistudio.com/wiki/sideAmbientLife","revid":342224,"updated":"2023-07-09T12:27:27Z","groups":["Sides"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns side of ambient life, for example ambient life placed in Eden Editor.","syntaxes":[{"syntax":"sideAmbientLife","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"code":["_sideAmbientLife = sideAmbientLife;"]}],"see_also":["side","west","blufor","east","opfor","resistance","independent","civilian","sideLogic","sideFriendly","sideEnemy","sideUnknown","playerSide","sideEmpty"]},{"name":"sideChat","title":"sideChat","type":"command","url":"https://community.bistudio.com/wiki/sideChat","revid":376777,"updated":"2025-11-17T00:06:09Z","groups":["Radio and Chat"],"status":"ok","games":{"ofp":"1.34","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.34","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Types text to the side radio channel by the specified unit. Use clearRadio to clear chat history\n\n> [!IMPORTANT]\n> The unit must have an assigned radio item (such as ***\"ItemRadio\"***) to see or transmit the messages. A radio item must have the property\n>\n> ```cpp\n> simulation = \"ItemRadio\";\n> ```\n>\n> in its CfgWeapons config.","syntaxes":[{"syntax":"unit sideChat chatText","params":[{"name":"unit","type":"Object","description":"unit transmitting message","type_expr":"Object"},{"name":"chatText","type":"String","description":"message to transmit","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"chatText"}},{"syntax":"[side, identity] sideChat chatText","params":[{"name":"side","type":"Side","description":"side to which the message will be seen","type_expr":"Side"},{"name":"identity","type":"String","description":"class name of one of the identities in CfgHQIdentities. Possible identities in Arma 3 are:\n\n- \"Base\"\n- \"HQ\"\n- \"PAPA_BEAR\"\n- \"AirBase\"\n- \"BLU\"\n- \"OPF\"\n- \"IND\"\n- \"IND_G\"","type_expr":"String"},{"name":"chatText","type":"String","description":"message to transmit","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"[side, identity]"},"right":{"text":"chatText"}}],"examples":[{"code":["_soldierOne sideChat \"Show this text\";"]},{"code":["[west, \"HQ\"] sideChat \"Hi there\";"]},{"code":["driver vehicle player sideChat \"sideChat\";\ndriver vehicle player globalChat \"globalChat\";\ndriver vehicle player groupChat \"groupChat\";\nvehicle player vehicleChat \"vehicleChat\";\ndriver vehicle player commandChat \"commandChat\";\ndriver vehicle player customChat [1, \"customChat\"];\nsystemChat \"systemChat\";"]},{"code":["[[blufor, \"BLU\"], \"message\"] remoteExec [\"sideChat\"]; // shows the message to all players"]},{"code":["unit setGroupId [\"Cpt. Miller\"]; // changes the group's callsign\nunit sideChat \"Hello ladies!\";"]}],"see_also":["globalChat","groupChat","vehicleChat","commandChat","customChat","systemChat","sideRadio"],"notes":[{"user":"Ceeeb","date":"2007-02-12T04:31:00Z","text":"In **Operation Flashpoint v1.96**, sideChat messages can be sent from two abstract sources: \"Papa_Bear\" and \"Base FireFly\".\nUse sideChat on an array in the form [SIDE, \"base\"], [SIDE, \"HQ\"], [SIDE, \"Papa_bear\"] or [SIDE, \"airbase\"], where SIDE is the side broadcasting. \"HQ\", \"base\" and \"Papa_bear\" seem to be the same object. The callsign strings can be re-defined using a stringTable.csv file, using `STR_CFG_PAPABEAR` and `STR_CFG_FIREFLYBASE`.\n\nExample :\n\n```sqf\n[east, \"base\"] sideChat \"Return to base!\"\n```"}]},{"name":"sideEmpty","title":"sideEmpty","type":"command","url":"https://community.bistudio.com/wiki/sideEmpty","revid":342117,"updated":"2023-07-09T12:26:40Z","groups":["Sides"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns empty side, for example static buildings in Eden Editor.","syntaxes":[{"syntax":"sideEmpty","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"code":["_sideEmpty = sideEmpty;"]}],"see_also":["side","west","blufor","east","opfor","resistance","independent","civilian","sideLogic","sideFriendly","sideEnemy","sideUnknown","playerSide","sideAmbientLife"]},{"name":"sideEnemy","title":"sideEnemy","type":"command","url":"https://community.bistudio.com/wiki/sideEnemy","revid":369191,"updated":"2024-09-03T10:34:47Z","groups":["Sides"],"status":"ok","games":{"ofp":"1.78","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.78","arma3_since":"0.50","description":"The enemy side which is used for renegades. Units of this side are hostile to everyone.\n\n- To join sideEnemy, you can attack members of your own side or use addRating.\n- When below a rating of -2000 units switch automatically to this side.","syntaxes":[{"syntax":"sideEnemy","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (side player == sideEnemy) then\n{\n    hint \"We've got a renegade!\";\n};\n```","code":["if (side player == sideEnemy) then\n{\n\thint \"We've got a renegade!\";\n};"]}],"see_also":["addRating","rating","Side","side","west","east","resistance","civilian","sideLogic","sideFriendly","sideUnknown","playerSide","sideEmpty","sideAmbientLife","Side Relations"]},{"name":"sideFriendly","title":"sideFriendly","type":"command","url":"https://community.bistudio.com/wiki/sideFriendly","revid":341634,"updated":"2023-06-12T19:02:54Z","groups":["Sides"],"status":"ok","games":{"ofp":"1.78","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.78","arma3_since":"0.50","description":"The Friendly side - friendly to all, see Side Relations.","syntaxes":[{"syntax":"sideFriendly","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"code":["if (side player == sideFriendly) then { hint \"I feel friendly today!\"; };"]}],"see_also":["Side","side","west","east","resistance","civilian","sideLogic","sideUnknown","sideEnemy","playerSide","sideEmpty","sideAmbientLife","Side Relations"]},{"name":"sideLogic","title":"sideLogic","type":"command","url":"https://community.bistudio.com/wiki/sideLogic","revid":341626,"updated":"2023-06-12T19:02:53Z","groups":["Sides"],"status":"ok","games":{"ofp":"1.90","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.90","arma3_since":"0.50","description":"The Logic side. Side of Game Logics and Modules.","syntaxes":[{"syntax":"sideLogic","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (side _obj == sideLogic) then\n{\n    hint \"It is a logic!\";\n};\n```","code":["if (side _obj == sideLogic) then\n{\n\thint \"It is a logic!\";\n};"]}],"see_also":["Side","side","west","east","resistance","civilian","sideUnknown","sideFriendly","sideEnemy","playerSide","Side Relations"]},{"name":"sideRadio","title":"sideRadio","type":"command","url":"https://community.bistudio.com/wiki/sideRadio","revid":364536,"updated":"2024-05-16T20:46:45Z","groups":["Radio and Chat","Sounds"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sends the audio message to the side radio channel. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec).\n\n> [!IMPORTANT]\n> The unit must have an assigned radio item (such as ***\"ItemRadio\"***) to see or transmit the messages. A radio item must have the property `simulation = \"ItemRadio\";` in its CfgWeapons config.\n\n> [!NOTE]\n> When transmitting unit gets killed, transmission will be interrupted. However when receiving unit gets killed, the transmission continues to play.","syntaxes":[{"syntax":"unit sideRadio radioName","params":[{"name":"unit","type":"Object","description":"unit to transmit","type_expr":"Object"},{"name":"radioName","type":"String","description":"class name from `CfgRadio`","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"radioName"}},{"syntax":"[side, identity] sideRadio radioName","params":[{"name":"side","type":"Side","description":"side to which the transmission will be played","type_expr":"Side"},{"name":"identity","type":"String","description":"class name of one of the identities in CfgHQIdentities. Possible identities in Arma 3 are:\n\n- \"Base\"\n- \"HQ\"\n- \"PAPA_BEAR\"\n- \"AirBase\"\n- \"BLU\"\n- \"OPF\"\n- \"IND\"\n- \"IND_G\"","type_expr":"String"},{"name":"radioName","type":"String","description":"class name from `CfgRadio`","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"[side, identity]"},"right":{"text":"radioName"}}],"examples":[{"code":["_soldierOne sideRadio \"messageOne\";"]},{"code":["player sideRadio configName selectRandom (\"true\" configClasses (configFile >> \"CfgRadio\"));"]},{"code":["[west, \"Base\"] sideRadio configName selectRandom (\"true\" configClasses (configFile >> \"CfgRadio\"));"]}],"see_also":["sideChat","groupRadio","customRadio","vehicleRadio","globalRadio","directSay","commandRadio"],"notes":[{"user":"Ceeeb","date":"2007-02-12T03:47:00Z","text":"In **OFP v1.96**, sideRadio messages can be sent from 2 abstract sources: \"Papa_Bear\" and \"Base FireFly\". Use sideRadio on an array in the form [SIDE,\"base\"],[SIDE,\"HQ\"],[SIDE,\"Papa_bear\"] or [SIDE,\"airbase\"], where SIDE is the side broadcasting. \"HQ\", \"base\" and \"Papa_bear\" seem to be the same object. The callsign strings can be re-defined using a stringTable.csv file, using STR_CFG_PAPABEAR and STR_CFG_FIREFLYBASE. *Example : [EAST,\"base\"] sideRadio \"returnToBase\"*."},{"user":"Killzone_Kid","date":"2016-12-03T21:32:00Z","text":"To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial), prefix the full filename including file extension with #. For example if there is a custom user sound file called `MySound.ogg`, to play it on the radio use:\n\n```sqf\nplayer sideRadio \"#MySound.ogg\";\n```"}]},{"name":"sideUnknown","title":"sideUnknown","type":"command","url":"https://community.bistudio.com/wiki/sideUnknown","revid":369295,"updated":"2024-09-03T18:42:51Z","groups":["Sides"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"The unknown side.\n\nUsed when the side of a unit is unknown, e.g. for spotted targets with insufficient information.","syntaxes":[{"syntax":"sideUnknown","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"code":["//soldier1 and soldier2 of different sides and out of sight\nsoldier1 reveal soldier2;\nhint str (soldier1 nearTargets 1000);\n//returns: [[[1557.96,5047.4,1.32402],\"SoldierWB\",UNKNOWN,0.0155183,soldier2,5]]\nsoldier1 reveal [soldier2,1.5];\n//returns: [[[1556.52,5050.08,1.32402],\"SoldierWB\",WEST,0.0211193,soldier2,5]]"]}],"see_also":["nearTargets","reveal","Side","side","west","east","resistance","civilian","sideLogic","sideFriendly","sideEnemy","playerSide","sideEmpty","sideAmbientLife","Side Relations"]},{"name":"simpleTasks","title":"simpleTasks","type":"command","url":"https://community.bistudio.com/wiki/simpleTasks","revid":378353,"updated":"2026-04-02T16:35:09Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return all simple tasks assigned to given unit.","syntaxes":[{"syntax":"simpleTasks unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Tasks","type_expr":"Array<Task>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_tasks = simpleTasks player;"]}],"see_also":["createSimpleTask","currentTask"]},{"name":"simulationEnabled","title":"simulationEnabled","type":"command","url":"https://community.bistudio.com/wiki/simulationEnabled","revid":310189,"updated":"2022-05-05T13:10:32Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Check if the entity has enabled simulation.\n\n> [!IMPORTANT]\n> The entity could be local or remote but the result returned by this command will be for the entity simulation set up locally on the client that executed the command.\n> See enableSimulation for more info.","syntaxes":[{"syntax":"simulationEnabled entity","params":[{"name":"entity","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"entity"}}],"examples":[{"code":["simulationEnabled player;"]}],"see_also":["enableSimulation","enableSimulationGlobal","enableDynamicSimulationSystem","dynamicSimulationSystemEnabled","enableDynamicSimulation","dynamicSimulationEnabled","setDynamicSimulationDistance","dynamicSimulationDistance","setDynamicSimulationDistanceCoef","dynamicSimulationDistanceCoef","triggerDynamicSimulation","canTriggerDynamicSimulation"]},{"name":"simulCloudDensity","title":"simulCloudDensity","type":"command","url":"https://community.bistudio.com/wiki/simulCloudDensity","revid":365017,"updated":"2024-07-10T18:22:01Z","groups":["Environment"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Returns density of clouds at given position.","syntaxes":[{"syntax":"simulCloudDensity pos","params":[{"name":"pos","type":"Position","type_expr":"Position"}],"returns":{"types":["Number"],"type_expr":"Number | Nothing | Boolean","description":"- Number - density (0-1) - Nothing - If arguments are incorrect - Boolean - Returns false if simulWeather is disabled","text":"- Number - density (0-1)\n- Nothing - If arguments are incorrect\n- Boolean - Returns false if simulWeather is disabled"},"form":"unary","right":{"text":"pos"}}],"examples":[{"code":["simulCloudDensity getPos player;"]}],"problems":"> [!NOTE]\n> **Eden Editor:** SimulWeather seems to be disabled in Eden Editor and scenario preview.","see_also":["setSimulWeatherLayers","simulCloudOcclusion","simulInClouds"]},{"name":"simulCloudOcclusion","title":"simulCloudOcclusion","type":"command","url":"https://community.bistudio.com/wiki/simulCloudOcclusion","revid":379476,"updated":"2026-10-31T00:11:36Z","groups":["Environment"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Returns clouds occlusion between two given points.","syntaxes":[{"syntax":"simulCloudOcclusion [pos1, pos2]","params":[{"name":"pos1","type":"Position","type_expr":"Position"},{"name":"pos2","type":"Position","type_expr":"Position"}],"returns":{"types":["Number"],"type_expr":"Number | Nothing | Boolean","description":"- Number - (0 - no clouds, 1 - full clouds) - Nothing - If arguments are incorrect - Boolean - Returns false if simulWeather is disabled","text":"- Number - (0 - no clouds, 1 - full clouds)\n- Nothing - If arguments are incorrect\n- Boolean - Returns false if simulWeather is disabled"},"form":"unary","right":{"text":"[pos1, pos2]"}}],"examples":[{"code":["private _posPlayer = getPos player;\nprivate _posAbovePlayer = +_posPlayer; _posAbovePlayer set [2,200];\nsimulCloudOcclusion [_posPlayer, _posAbovePlayer];"]}],"problems":"> [!NOTE]\n> **Eden Editor:** SimulWeather seems to be disabled in Eden Editor and scenario preview.","see_also":["setSimulWeatherLayers","simulCloudDensity","simulInClouds"],"notes":[{"user":"Waffle SS.","date":"2014-08-08T12:17:00Z","text":"The **simulCloudOcclusion** command is not recognized on dedicated servers, and will produce an error. If you use this command, it **cannot** be anywhere within a script that is run on the dedicated server, or the entire script will halt. To get around this, you can use:\n\n```sqf\nif !isDedicated then {[] execVM \"simulCloudOcclusionScript.sqf\"};\n```"}]},{"name":"simulInClouds","title":"simulInClouds","type":"command","url":"https://community.bistudio.com/wiki/simulInClouds","revid":378513,"updated":"2026-05-03T17:21:12Z","groups":["Environment"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Returns if given position is in clouds.","syntaxes":[{"syntax":"simulInClouds pos","params":[{"name":"pos","type":"Position","type_expr":"Position"}],"returns":{"type":"Boolean, Nothing","type_expr":"Boolean | Nothing","description":"true if given position is in clouds. Nothing if given arguments are incorrect"},"form":"unary","right":{"text":"pos"}}],"examples":[{"code":["simulInClouds getPos player;"]}],"problems":"> [!NOTE]\n> **Eden Editor:** SimulWeather seems to be disabled in Eden Editor and scenario preview.","see_also":["setSimulWeatherLayers","simulCloudDensity","simulCloudOcclusion"]},{"name":"simulSetHumidity","title":"simulSetHumidity","type":"command","url":"https://community.bistudio.com/wiki/simulSetHumidity","revid":373025,"updated":"2025-03-18T15:57:35Z","groups":["Environment","Broken Commands"],"status":"broken","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Sets simul cloud cover. This command does not affect overcast value.\n\nThis command was not implemented up until Arma 3 v2.18","syntaxes":[{"syntax":"simulSetHumidity humidity","params":[{"name":"humidity","type":"Number","description":"0 (min): clear sky, 1 (max): heavy cloud cover","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"humidity"}}],"examples":[{"code":["simulSetHumidity 1;"]},{"text":"When combined with setOvercast 1 this command will also start random strength rain.\n\n```sqf\nskipTime -24;\n86400 setOvercast 1;\nskipTime 24;\nsimulSetHumidity 1;\n```\n\nCreates rainy looking weather, followed by thunder in about 10 seconds and rain in about 20.","code":["skipTime -24;\n86400 setOvercast 1;\nskipTime 24;\nsimulSetHumidity 1;"]}],"see_also":["overcast","setOvercast"],"notes":[{"user":"Dedmen","date":"2025-03-18T15:57:35Z","text":"setOvercast 1 and simulSetHumidity 0, can cause thunderstorm with lightning on a clear sky.\nYou can also setOvercast 0 to have a cloudless sky, but use SetHumidity to bring the clouds back"}]},{"name":"simulWeatherSync","title":"simulWeatherSync","type":"command","url":"https://community.bistudio.com/wiki/simulWeatherSync","revid":363572,"updated":"2024-04-07T08:45:59Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Synchronizes Simul Weather with Arma weather, generates all keyframes.","syntaxes":[{"syntax":"simulWeatherSync","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["simulWeatherSync;"]}],"see_also":["forceWeatherChange"],"notes":[{"user":"AgentRev","date":"2016-05-04T22:24:00Z","text":"The behavior of this command is similar to forceWeatherChange, however it leaves current weather transitions intact.\nIts main purpose would be to refresh the cloud cover to properly reflect current overcast, as they can sometime get out of sync, especially when using setTimeMultiplier and setAccTime."}]},{"name":"sin","title":"sin","type":"command","url":"https://community.bistudio.com/wiki/sin","revid":349344,"updated":"2023-11-08T14:53:30Z","groups":["Math - Geometry"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Sine of x.","syntaxes":[{"syntax":"sin x","params":[{"name":"x","type":"Number","description":"value in degree","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"x"}}],"examples":[{"code":["_sine = sin 30; // result is 0.5"]}],"see_also":["cos","tan"]},{"name":"size","title":"size","type":"command","url":"https://community.bistudio.com/wiki/size","revid":378398,"updated":"2026-04-04T08:01:25Z","groups":["Locations"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Returns a location's size.","syntaxes":[{"syntax":"size location","params":[{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"Array","type_expr":"Array","description":"with [x,y]\n- x: Number - horizontal distance in meters - y: Number - vertical distance in meters","text":"Array with [x,y]\n\n- x: Number - horizontal distance in meters\n- y: Number - vertical distance in meters"},"form":"unary","right":{"text":"location"}}],"examples":[{"code":["_locSize = size myLocation;"]}],"see_also":["setSize"]},{"name":"sizeOf","title":"sizeOf","type":"command","url":"https://community.bistudio.com/wiki/sizeOf","revid":349136,"updated":"2023-11-08T14:49:45Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Returns the diameter of bounding sphere of the object of given classname in meters. If you need to estimate the size of the object more precisely, use boundingBox or boundingBoxReal.\n\n> [!IMPORTANT]\n> At least one object of the given classname has to be present in the current mission otherwise zero will be returned.","syntaxes":[{"syntax":"sizeOf classname","params":[{"name":"classname","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"size returned is usually bigger than the biggest size of the object along any of the axes. For example if object is 10 x 4 x 5 the sizeOf value returned expected to be around 10."},"form":"unary","right":{"text":"classname"}}],"examples":[{"code":["_dimension = sizeOf \"M1Abrams\"; // Returns 10.7833"]}],"see_also":["boundingBox","boundingBoxReal","boundingCenter"]},{"name":"skill","title":"skill","type":"command","url":"https://community.bistudio.com/wiki/skill","revid":364271,"updated":"2024-05-06T09:38:30Z","groups":["AI Behaviour"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Returns current skill of a unit, in range between 0 to 1, 1 being the highest level of skill.\n\n> [!NOTE]\n> - Skill of AI units set via the slider in unit placement screen varies from 0.2 to 1.0.\n> - If the **superAI** difficulty settings is enabled, all units have skill of 1.0 regardless of the skill slider.","syntaxes":[{"syntax":"skill unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"unit"}},{"syntax":"unit skill skillName","since":"arma1 1.00","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"skillName","type":"String","description":"possible values are:\n\n- \"aimingAccuracy\"\n- \"aimingShake\"\n- \"aimingSpeed\"\n- \"endurance\"\n- \"spotDistance\"\n- \"spotTime\"\n- \"courage\"\n- \"reloadSpeed\"\n- \"commanding\"\n- \"general\"","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"unit"},"right":{"text":"skillName"}}],"examples":[{"code":["_skill = skill unit1;"]},{"code":["_myCourage = player skill \"courage\";"]}],"see_also":["skillFinal","setSkill","setUnitAbility","Arma 3: AI Skill","Combat Modes"],"categories_extra":["AI"]},{"name":"skillFinal","title":"skillFinal","type":"command","url":"https://community.bistudio.com/wiki/skillFinal","revid":378482,"updated":"2026-04-24T12:46:59Z","groups":["AI Behaviour"],"status":"ok","games":{"arma3":"1.08"},"since":"arma3 1.08","arma3_since":"1.08","description":"Returns final, recalculated sub skill value of given unit. (with regard to AI Level coefficient (Difficulty settings)).","syntaxes":[{"syntax":"unit skillFinal skillName","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"skillName","type":"String","description":"see sub-skill. Possible values are:\n\n- \"aimingAccuracy\"\n- \"aimingShake\"\n- \"aimingSpeed\"\n- \"endurance\" - Has no effect in Arma 3\n- \"spotDistance\"\n- \"spotTime\"\n- \"courage\"\n- \"reloadSpeed\"\n- \"commanding\"\n- \"general\"","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"unit"},"right":{"text":"skillName"}}],"examples":[{"code":["_unitTrueCourage = unit1 skillFinal \"courage\";"]}],"multiplayer":"Since Arma 3 v1.40 the command works in multiplayer.","see_also":["skill","setSkill","setUnitAbility","CfgAISkill","Combat Modes"],"categories_extra":["AI"]},{"name":"skipTime","title":"skipTime","type":"command","url":"https://community.bistudio.com/wiki/skipTime","revid":369075,"updated":"2024-09-02T20:25:00Z","groups":["Time","Environment"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"server_exec":true},"description":"Jumps the specified number of hours forward or backward.\nThe time of day and tides are adjusted, but no changes are made to any units. If present, the lower level of clouds instantly jump to the position they would be in if time had passed normally.","syntaxes":[{"syntax":"skipTime duration","params":[{"name":"duration","type":"Number","description":"hours to skip. A positive value will create a forward time jump, a negative value will jump backwards.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"duration"}}],"examples":[{"code":["skipTime 5;"]},{"code":["skipTime (5/60); // be sure to use parentheses, otherwise here (skipTime 5)/60 will happen"]},{"text":"```sqf\nwhile {true} do\n{\n    skipTime 0.00333;\n    sleep 0.1; // smooth time transition\n};\n```","code":["while {true} do \n{\n\tskipTime 0.00333;\n\tsleep 0.1; // smooth time transition\n};"]},{"code":["skipTime ((_timeToSkipTo - dayTime + 24) % 24); // skip forward to a specific time, irrespective of the current mission time"]}],"multiplayer":"In Arma 3 (around v1.14) skipTime executed on the server will get synced in 5 seconds or so with all the clients. It will also be JIP compatible. skipTime executed on a client will change time on client for about 5 seconds after which it will sync back to server time.\nFor other games' behaviour, see Multiplayer Scripting - Join In Progress.\n\n> [!IMPORTANT]\n> Since Arma 3 v2.10 skipTime is limited to max +/- 1000 hours per skip for game stability. The command is intended for short time jumps. For large intervals, use setDate.","see_also":["setDate","accTime","setTimeMultiplier","timeMultiplier","BIS_fnc_setDate"],"notes":[{"user":"Ceeeb","date":"2007-04-17T04:01:00Z","text":"In ArmA & OFP, skipTime does not actually estimate weather changes beyond moving the clouds across the sky.\nWeather counters continue as if no time has passed.\nThe setDate command can be used instead of skiptime to change the time *without* the visual give-away of the lower clouds jumping."},{"user":".kju","date":"2011-11-02T22:06:00Z","text":"I cannot confirm this for OA 1.60 beta (85889):\nMP: Even though the immediate effect of skipTime is only local,\nthe new time will propagate through the network after 30 seconds or so.\nInstead the date, which includes time, is synced automatically for new JIP clients - NOT for present instances.\nSo one has to apply skipTime on all instances in MP (server + all present clients)."},{"user":"Killzone_Kid","date":"2013-08-25T02:45:00Z","text":"This command is blocking and in some cases it may take up to 1.5 seconds (probably depends on CPU) for it to calculate the changes to the environment, during which the game will microfreeze. It largely depends on weather changes, which are quite random. However one thing remains consistent, skipTime 24 hours is always almost instant. This is quite helpful when used in conjunction with commands such as setOvercast for instant and seamless effect. To try it yourself use this script:\n\n```sqf\n0 spawn {\n    for \"_i\" from 1 to 24 do {\n        _time = diag_tickTime;\n        skipTime _i;\n        diag_log  [_i, diag_tickTime - _time];\n        sleep 3;\n    };\n};\n```\n\nOne of the results (results will vary depending on weather conditions):\n\n```\n[1,1.44507]\n[2,1.46118]\n[3,1.33105]\n[4,1.396]\n[5,0.0310059]\n[6,1.37891]\n[7,1.4502]\n[8,1.37817]\n[9,1.37695]\n[10,1.37012]\n[11,1.448]\n[12,1.32593]\n[13,1.45508]\n[14,1.448]\n[15,0.0349121]\n[16,0.0368652]\n[17,1.25903]\n[18,1.38599]\n[19,1.4519]\n[20,0.052002]\n[21,0.0400391]\n[22,0.0490723]\n[23,1.35205]\n[24,0.0151367] // this is always the lowest\n```"}]},{"name":"sleep","title":"sleep","type":"command","url":"https://community.bistudio.com/wiki/sleep","revid":370495,"updated":"2024-12-26T17:40:41Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Suspends code execution for given time in seconds. The sleep precision is given by a framerate, the delay given is the minimal delay expected. Must be called inside of a context which is interruptible, i.e. a script executed by execVM or spawn.\n\n> [!NOTE]\n> - this command will suspend the code for ***at least*** the given amount of time, and can be way more if the script scheduler is busy.\n> - this command will suspend the script as the game gets paused in single player (and will resume with it). To avoid this, use uiSleep.","syntaxes":[{"syntax":"sleep delay","params":[{"name":"delay","type":"Number","description":"in seconds. Negative values will not be considered.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"delay"}}],"examples":[{"text":"```sqf\n0 spawn {\n    sleep 5;\n    hint \"after (at least) 5 seconds...\";\n};\n```","code":["0 spawn {\n\tsleep 5;\n\thint \"after (at least) 5 seconds...\";\n};"]},{"text":"```sqf\nsleep 5 + random 10;    // incorrect - will only sleep for 5 seconds, as it will be interpreted as (sleep 5) (+(random 10))\nsleep (5 + random 10);    // correct\n```","code":["sleep 5 + random 10;\t// incorrect - will only sleep for 5 seconds, as it will be interpreted as (sleep 5) (+(random 10))\nsleep (5 + random 10);\t// correct"]}],"see_also":["time","uiSleep","waitUntil","canSuspend","execVM","spawn","sleep vs uiSleep","Control Structures"],"notes":[{"user":"CrashDome","date":"2006-12-20T20:53:00Z","text":"Sleep suspends both SQF functions and SQF scripts. In functions, the calling script is still in suspension due to waiting for a return from the call command. The game engine will continue, however. See Function for more detail."},{"user":"Kronzky","date":"2007-02-12T20:16:00Z","text":"Sleep durations between .0005 and .02 will cause the same delay (roughly .02 seconds).\nDelays of .0005 and less have **no** effect (i.e, the sleep call will return immediately)."},{"user":"Sbsmac","date":"2007-02-13T22:32:00Z","text":"The comment above is a little misleading. The game engine appears to work by processing frames and then checking to see whether scripts are available to execute.\nSleep causes the script/function to be suspended until at least the specified time has elapsed.\nTo wait for the next frame, or give other scripts a chance to run, use Sleep 0.001."},{"user":"Inkompetent","date":"2007-06-16T00:13:00Z","text":"For scripts called by the Init Event Handler the first sleep command will suspend the script at the briefing screen at the start of a mission. The script will continue after the briefing screen, when actually \"in game\"."}]},{"name":"sliderPosition","title":"sliderPosition","type":"command","url":"https://community.bistudio.com/wiki/sliderPosition","revid":310899,"updated":"2022-05-07T20:31:43Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Returns current thumb position of CT_SLIDER or CT_XSLIDER with given idc of topmost user dialog.","syntaxes":[{"syntax":"sliderPosition idc","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"idc"}},{"syntax":"sliderPosition control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["_slidepos1 = sliderPosition 105;"]}],"see_also":["sliderSetPosition"]},{"name":"sliderRange","title":"sliderRange","type":"command","url":"https://community.bistudio.com/wiki/sliderRange","revid":379084,"updated":"2026-09-27T08:27:05Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Returns limits of CT_SLIDER or CT_XSLIDER.","syntaxes":[{"syntax":"sliderRange idc","params":[{"name":"idc","type":"Number","description":"idc of the control","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"with [minValue, maxValue]\n- minValue: Number - maxValue: Number","text":"Array with [minValue, maxValue]\n\n- minValue: Number\n- maxValue: Number"},"form":"unary","right":{"text":"idc"}},{"syntax":"sliderRange control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Array","type_expr":"Array","description":"with [minValue, maxValue]\n- minValue: Number - maxValue: Number","text":"Array with [minValue, maxValue]\n\n- minValue: Number\n- maxValue: Number"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["sliderRange _ctrlSlider params [\"_minValue\", \"_maxValue\"];"]}],"see_also":["sliderPosition","sliderSetPosition","sliderSetRange","sliderSetSpeed","sliderSpeed"]},{"name":"sliderSetPosition","title":"sliderSetPosition","type":"command","url":"https://community.bistudio.com/wiki/sliderSetPosition","revid":379393,"updated":"2026-10-31T00:00:32Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Sets current thumb position of CT_SLIDER or CT_XSLIDER.","syntaxes":[{"syntax":"sliderSetPosition [idc, pos]","params":[{"name":"idc","type":"Number","description":"idc of the control","type_expr":"Number"},{"name":"pos","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, pos]"}},{"syntax":"control sliderSetPosition pos","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"pos","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"pos"}}],"examples":[{"code":["_ctrlSlider sliderSetPosition 50;"]}],"see_also":["sliderPosition","sliderRange","sliderSetRange","sliderSetSpeed","sliderSpeed","ctrlSetScrollValues","progressSetPosition"],"notes":[{"user":"POLPOX","date":"2020-01-22T11:46:00Z","text":"sliderSetPosition doesn't fire onSliderPosChanged events."}]},{"name":"sliderSetRange","title":"sliderSetRange","type":"command","url":"https://community.bistudio.com/wiki/sliderSetRange","revid":348823,"updated":"2023-11-08T14:39:08Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Sets limits of CT_SLIDER or CT_XSLIDER.","syntaxes":[{"syntax":"sliderSetRange [idc, min, max]","params":[{"name":"idc","type":"Number","description":"idc of the control","type_expr":"Number"},{"name":"min","type":"Number","description":"minimal value","type_expr":"Number"},{"name":"max","type":"Number","description":"maximum value","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, min, max]"}},{"syntax":"control sliderSetRange [min, max]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"min","type":"Number","description":"minimal value","type_expr":"Number"},{"name":"max","type":"Number","description":"maximum value","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[min, max]"}}],"examples":[{"code":["sliderSetRange [101, 0, 100];"]}],"see_also":["sliderPosition","sliderRange","sliderSetPosition","sliderSetSpeed","sliderSpeed"]},{"name":"sliderSetSpeed","title":"sliderSetSpeed","type":"command","url":"https://community.bistudio.com/wiki/sliderSetSpeed","revid":376729,"updated":"2025-11-15T04:49:49Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Sets slider line step and page step delta amount as well as optional step amount of CT_SLIDER or CT_XSLIDER with given idc of topmost user dialog.\n\n- Click to arrow - move by line\n- Click to scale outside thumb - move by page.\n\n> [!NOTE]\n> CT_XSLIDER does not use the *page* parameter, it acts as scrollbar when clicked on the bar. It also can only be horizontal.","syntaxes":[{"syntax":"sliderSetSpeed [idc, line, page, step]","params":[{"name":"idc","type":"Number","description":"control's idc","type_expr":"Number"},{"name":"line","type":"Number","description":"value delta to move the slider when clicking on the outer arrows","type_expr":"Number"},{"name":"page","type":"Number","description":"value delta to move the slider when clicking inside the slider bar","type_expr":"Number"},{"name":"step","type":"Number","optional":true,"default":"0","description":"slider step","type_expr":"Number","text":"step: Number - (Optional, default 0) slider step"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, line, page, step]"}},{"syntax":"control sliderSetSpeed [line, page, step]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"line","type":"Number","description":"value delta to move the slider when clicking on the outer arrows","type_expr":"Number"},{"name":"page","type":"Number","description":"value delta to move the slider when clicking inside the slider bar","type_expr":"Number"},{"name":"step","type":"Number","optional":true,"default":"0","description":"slider step","type_expr":"Number","text":"step: Number - (Optional, default 0) slider step"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[line, page, step]"}}],"examples":[{"code":["sliderSetSpeed [101, 0.5, 2];"]}],"see_also":["sliderSpeed"]},{"name":"sliderSpeed","title":"sliderSpeed","type":"command","url":"https://community.bistudio.com/wiki/sliderSpeed","revid":378110,"updated":"2026-02-16T11:24:51Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Returns slider step value for line and page movement of CT_SLIDER or CT_XSLIDER.","syntaxes":[{"syntax":"sliderSpeed idc","params":[{"name":"idc","type":"Number: idc of the control","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"format [minSpeed, maxSpeed, Arma 3 v2.08 step]","text":"Array format [minSpeed, maxSpeed, Arma 3 v2.08 step]"},"form":"unary","right":{"text":"idc"}},{"syntax":"sliderSpeed control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Array","type_expr":"Array","description":"format [minSpeed, maxSpeed, Arma 3 v2.08 step]","text":"Array format [minSpeed, maxSpeed, Arma 3 v2.08 step]"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["sliderSpeed _ctrlSlider params [\"_min\", \"_max\", \"_step\"];"]}],"see_also":["sliderPosition","sliderRange","sliderSetPosition","sliderSetRange","sliderSetSpeed"]},{"name":"slingLoadAssistantShown","title":"slingLoadAssistantShown","type":"command","url":"https://community.bistudio.com/wiki/slingLoadAssistantShown","revid":369265,"updated":"2024-09-03T18:42:42Z","groups":["Ropes and Sling Loading"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"Returns true if Sling Load Assistant is open.","syntaxes":[{"syntax":"slingLoadAssistantShown","params":[],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if sling load assistant is shown, false otherwise"},"form":"nullary"}],"examples":[{"code":["waitUntil { slingLoadAssistantShown };\nhint \"You lack rudimentary motor skills and basic eye-hand coordination.\"; // scold user for unethical practices"]}],"see_also":["ropes","canSlingLoad","enableRopeAttach","getSlingLoad","ropeAttachedObjects","ropeAttachTo","ropeDestroy","ropeLength","ropeUnwound","ropeAttachedTo","ropeCreate","ropeDetach","ropeAttachEnabled","ropeCut","ropeEndPosition","ropeUnwind"]},{"name":"soldierMagazines","title":"soldierMagazines","type":"command","url":"https://community.bistudio.com/wiki/soldierMagazines","revid":369271,"updated":"2024-09-03T18:42:43Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get array with all magazines of the given unit.","syntaxes":[{"syntax":"soldierMagazines unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of String","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"```sqf\nsoldierMagazines player;\n// returns:\n[\n    \"6.5mm 30Rnd STANAG Mag(30/30)[id/cr:1/0](5x)\",\n    \"9mm 16Rnd Mag(16/16)[id/cr:7/0](2x)\",\n    \"RGO Frag Grenade(1/1)[id/cr:10/0](2x)\",\n    \"Smoke Grenade (White)(1/1)[id/cr:12/0](1x)\",\n    \"Smoke Grenade (Green)(1/1)[id/cr:13/0](1x)\",\n    \"Chemlight (Green)(1/1)[id/cr:14/0](2x)\",\n    \"Titan AT Missile(1/1)[id/cr:16/0](2x)\"\n]\n```","code":["soldierMagazines player;\n// returns:\n[\n\t\"6.5mm 30Rnd STANAG Mag(30/30)[id/cr:1/0](5x)\",\n\t\"9mm 16Rnd Mag(16/16)[id/cr:7/0](2x)\",\n\t\"RGO Frag Grenade(1/1)[id/cr:10/0](2x)\",\n\t\"Smoke Grenade (White)(1/1)[id/cr:12/0](1x)\",\n\t\"Smoke Grenade (Green)(1/1)[id/cr:13/0](1x)\",\n\t\"Chemlight (Green)(1/1)[id/cr:14/0](2x)\",\n\t\"Titan AT Missile(1/1)[id/cr:16/0](2x)\"\n]"]}],"see_also":["uniformMagazines","vestMagazines","backpackMagazines"]},{"name":"someAmmo","title":"someAmmo","type":"command","url":"https://community.bistudio.com/wiki/someAmmo","revid":338255,"updated":"2023-02-24T18:01:51Z","groups":["Unit Inventory"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Check if unit has some ammo.","syntaxes":[{"syntax":"someAmmo unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"text":"```sqs\n? not (someAmmo _loon1) : hint \"Loon1 is out of ammo!\"\n```","code":["? not (someAmmo _loon1) : hint \"Loon1 is out of ammo!\""]},{"code":["if (not someAmmo _loon1) then { hint \"Loon1 is out of ammo!\" };"]}],"see_also":["ammo","magazines"]},{"name":"sort","title":"sort","type":"command","url":"https://community.bistudio.com/wiki/sort","revid":377104,"updated":"2026-01-01T10:00:38Z","groups":["Arrays"],"status":"ok","games":{"arma3":"1.44"},"since":"arma3 1.44","arma3_since":"1.44","description":"Attempts to sort given array either in ascending (true) or descending (false) order.\n\n> [!IMPORTANT]\n> This will **modify** the original array!","syntaxes":[{"syntax":"array sort order","params":[{"name":"array","type":"Array of Anything","description":"array to be sorted, can also be a nested array.\n\nAll array elements should be one of the following types:\n\n- String - Array of strings `[\"a\",\"b\",\"c\"...]`\n- Number - Array of numbers `[1,2,3...]`\n- Array - Array of subarrays `[[\"a\",1,2],[\"b\",3,4],[\"c\",5,6]...]`. Subarrays should be of the same structure. Subarray elements other than String or Number will be ignored during sorting.\n\nMixed arrays `[\"a\",1,[true], ...]` are not supported and results are undefined.","type_expr":"Array<Anything>"},{"name":"order","type":"Boolean","description":"sorting order.\n\n- true: ascending\n- false: descending","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"array"},"right":{"text":"order"}}],"examples":[{"code":["_arr = [5.21725,1.30859,4,5.03028,1];\n_arr sort true;\nhint str _arr; //[1,1.30859,4,5.03028,5.21725]"]},{"code":["_dev = [\"ja\",\"pa\",\"pa\",\"tram\",\"tara\"];\n_dev sort false;\nhint str _dev; //[\"tram\",\"tara\",\"pa\",\"pa\",\"ja\"]"]},{"code":["#define ASC true\n#define DESC false\n_scores = [[123,\"bob\",15],[123,\"bill\",20],[200,\"dave\",21],[200,\"steve\",11]];\n_scores sort DESC;\nhint str _scores; //[[200,\"steve\",11],[200,\"dave\",21],[123,\"bob\",15],[123,\"bill\",20]]"]},{"text":"Sort buildings by distance and return position of the most distant building:\n\n```sqf\n_buildings = player nearObjects [\"Land_Cargo_Patrol_V1_F\", 500];\n_buildings = _buildings apply { [_x distance player, _x] };\n_buildings sort false;\nhint format [\n    \"Most distant building is at %1, distance %2 m\",\n    getPos (_buildings select 0 select 1),\n    round (_buildings select 0 select 0)\n];\n```","code":["_buildings = player nearObjects [\"Land_Cargo_Patrol_V1_F\", 500];\n_buildings = _buildings apply { [_x distance player, _x] };\n_buildings sort false;\nhint format [\n\t\"Most distant building is at %1, distance %2 m\", \n\tgetPos (_buildings select 0 select 1),\n\tround (_buildings select 0 select 0)\n];"]}],"see_also":["lbSortBy","lnbSortBy","BIS_fnc_sortAlphabetically","BIS_fnc_sortBy","BIS_fnc_sortNum"],"notes":[{"user":"Killzone_Kid","date":"2015-04-16T18:14:00Z","text":"The algorithm for sorting subarrays: compare 1st element, if equal compare 2nd, if equal compare 3rd...etc."}]},{"name":"soundParams","title":"soundParams","type":"command","url":"https://community.bistudio.com/wiki/soundParams","revid":379075,"updated":"2026-09-26T11:21:04Z","groups":["Sounds"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","description":"Returns various params for the given sound. The sound has to be playing otherwise command returns empty array []. In case of say3D, the sound is put in the queue so unless the sound is started instantly with 'playMode' 1 or 2, it will also return [].","syntaxes":[{"syntax":"soundParams id or sound","params":[{"name":"id","type":"Number","description":"id returned by playSoundUI and playSound3D commands, -1 to return all currently playing ids","type_expr":"Number"},{"name":"sound","type":"Object or NetObject","description":"sound returned by say3D command or the unit, in which case current say3D unit's sound params are returned","type_expr":"Object | NetObject","since":"arma3 2.24"}],"returns":{"types":["Array"],"description":"- id != -1 : Array with [path, curPos, length, time, volume, source] - path: String - the path to the played sound file - curPos: Number - current play position in 0...1 range - length: Number - total sound duration in seconds - time: Number - time passed since the start of playback - volume: Number - playback volume - Arma 3 v2.22 loop: Boolean - true if the sound is looping - Arma 3 v2.24 source: Object - Source object to which say3D sound is attached or objNull - Arma 3 v2.22 id == -1: Array with [sid1, sid2, sid3..., sidn], where sid is sound id returned by playSoundUI and playSound3D but not say3D","text":"- *id* != -1 : Array with [path, curPos, length, time, volume, source]\n  - path: String - the path to the played sound file\n  - curPos: Number - current play position in 0...1 range\n  - length: Number - total sound duration in seconds\n  - time: Number - time passed since the start of playback\n  - volume: Number - playback volume\n  - Arma 3 v2.22 loop: Boolean - true if the sound is looping\n  - Arma 3 v2.24 source: Object - Source object to which say3D sound is attached or objNull\n- Arma 3 v2.22 *id* == -1: Array with [sid1, sid2, sid3..., sidn], where sid is sound id returned by playSoundUI and playSound3D but not say3D"},"form":"unary","right":{"text":"id or sound"}}],"examples":[{"code":["private _params = soundParams 10;"]},{"text":"Wait for sound to end:\n\n```sqf\nprivate _sound = playSound3D [\"A3\\Sounds_F\\sfx\\blip1.wss\", player];\nwaitUntil { soundParams _sound isEqualTo [] };\n```","code":["private _sound = playSound3D [\"A3\\Sounds_F\\sfx\\blip1.wss\", player];\nwaitUntil { soundParams _sound isEqualTo [] };"]}],"see_also":["playSoundUI","playSound3D","stopSound"]},{"name":"soundVolume","title":"soundVolume","type":"command","url":"https://community.bistudio.com/wiki/soundVolume","revid":376984,"updated":"2026-01-01T06:23:46Z","groups":["Sounds"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns the current sound volume (set by fadeSound).","syntaxes":[{"syntax":"soundVolume","params":[],"returns":{"type":"Number","type_expr":"Number","description":"in range 0..1","text":"Number in range 0..1"},"form":"nullary"}],"examples":[{"code":["hint str soundVolume;"]}],"see_also":["fadeSound","musicVolume","radioVolume","speechVolume","environmentVolume","getAudioOptionVolumes"]},{"name":"spawn","title":"spawn","type":"command","url":"https://community.bistudio.com/wiki/spawn","revid":373975,"updated":"2025-07-10T15:33:35Z","groups":["Program Flow"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Adds given set of compiled instructions to the scheduler.\nExactly when the code will be executed is unknown, it depends on how busy is the engine and how filled up is the scheduler.\nTherefore spawn does not wait for the supplied code to finish, instead, spawn returns a Script handle to the scheduler task.\nscriptDone command can be used to check the code completion. Additional arguments are passed to the code in local variable _this.\nSince Arma 3 v1.56 the script handle also exists inside the code in `_thisScript` variable.\nTo see what spawned scripts are currently in the scheduler, use diag_activeSQFScripts command.\n\n> [!WARNING]\n> When multiple Code is spawned in an order, there is no guarantee that the spawned Code will execute in the same order (see Example 2). If the order is important, use BIS_fnc_spawnOrdered.","syntaxes":[{"syntax":"arguments spawn code","params":[{"name":"arguments","type":"Anything","description":"arguments passed to the script, which later available in `_this` variable inside the script.","type_expr":"Anything"},{"name":"code","type":"Code","type_expr":"Code"}],"returns":{"type":"Script Handle","type_expr":"Script Handle","description":"can be used to determine (via scriptDone (also via isNull in Arma 3)) when the spawned script has finished. In Arma 3, the handle is also available inside the spawned script in `_thisScript` variable"},"form":"binary","left":{"text":"arguments"},"right":{"text":"code"}},{"syntax":"spawn code","since":"arma3 2.22","params":[{"name":"code","type":"Code","type_expr":"Code"}],"returns":{"type":"Script Handle","type_expr":"Script Handle"},"form":"unary","right":{"text":"code"}},{"syntax":"spawn name","since":"arma3 2.22","params":[{"name":"name","type":"String","description":"The name of a \"Empty Handle\". Behaves like scriptName inside a function.","type_expr":"String"}],"returns":{"type":"Script Handle","type_expr":"Script Handle","description":"A \"Empty Handle\" to be used as a Promise"},"form":"unary","right":{"text":"name"}}],"examples":[{"code":["_handle = 0 spawn { player globalChat \"Hello world!\" };"]},{"text":"There is no guarantee that spawned scripts will be executed in the same order they spawned:\n\n```sqf\nfor \"_i\" from 0 to 100 do\n{\n    _i spawn\n    {\n        diag_log _this;\n    };\n}; // Result: 51,1,2...49,50,0,52,53...100\n```","code":["for \"_i\" from 0 to 100 do\n{\n\t_i spawn\n\t{\n\t\tdiag_log _this;\n\t};\n}; // Result: 51,1,2...49,50,0,52,53...100"]},{"text":"Local variables declared in the main scope are not available in the spawned code. You have to pass them as parameters:\n\n```sqf\nprivate _localVariable = 1234;\n[_localVariable] spawn\n{\n    systemChat format [\"_localVariable does not exist: %1\", isNil \"_localVariable\"]; // _localVariable does not exist: true\n    params [\"_localVariable\"];\n    systemChat format [\"_localVariable is now: %1\", _localVariable]; // _localVariable is now: 1234\n};\n```","code":["private _localVariable = 1234;\n[_localVariable] spawn \n{\n\tsystemChat format [\"_localVariable does not exist: %1\", isNil \"_localVariable\"]; // _localVariable does not exist: true\n\tparams [\"_localVariable\"];\n\tsystemChat format [\"_localVariable is now: %1\", _localVariable]; // _localVariable is now: 1234\n};"]}],"see_also":["call","execVM","execFSM","exec","compile","preprocessFileLineNumbers","preprocessFile","terminate","scriptDone","remoteExec","sleep","uiSleep","canSuspend"],"notes":[{"user":"Kronzky","date":"2009-03-06T00:20:00Z","text":"spawn cannot call other local functions on the same scope as itself.\nIt can, however, call other global functions:\n\n```sqf\n_addOne = { TST = TST + 1 };\nTST_addOne = { TST = TST + 1 };\n\n_add = {\n    TST = TST+1;\n    player sideChat format [\"added: %1\",TST];\n    call _addOne;\n    player sideChat format [\"called local: %1\",TST];\n    call TST_addOne;\n    player sideChat format [\"called global: %1\",TST];\n};\nTST = 0;\ncall _add;\n0 spawn _add;\n```\n\nThe call of _addOne from the spawned function does not do anything."},{"user":"DreadedEntity","date":"2014-10-21T23:33:00Z","text":"Arma 3 v0.50 spawn requires a script handle when used in the 2D-Editor.\nArma 3 v2.04 In Eden Editor this is no longer necessary.\n\nIn scripts and in the debug console, it is not required, but very useful for keeping track of running scripts. Having a script handle also makes it easy to terminate scripts at any time.\n\nSince spawn creates a new scheduled environment, having an excess of open threads can make the scheduler queue extremely long, significantly increasing the execution time of each thread. (it takes an extremely large amount of threads, though)"},{"user":"Nelis75733126","date":"2015-08-25T13:39:00Z","text":"If you have a local (private) function that you want to access from within code created with `spawn`, you can pass that private function to the code of `spawn`, like so:\n\n```sqf\n_someFunction = {};\n[ _someFunction ] spawn { call( _this select 0 ) };\n```"}]},{"name":"speaker","title":"speaker","type":"command","url":"https://community.bistudio.com/wiki/speaker","revid":319837,"updated":"2022-05-13T09:25:34Z","groups":["Unit Identity","Sounds"],"status":"ok","games":{"arma3":"1.02"},"since":"arma3 1.02","arma3_since":"1.02","description":"Returns the speaker class name of a unit.","syntaxes":[{"syntax":"speaker unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["speaker player; // Can return \"male09eng\""]}],"see_also":["setSpeaker"]},{"name":"speechVolume","title":"speechVolume","type":"command","url":"https://community.bistudio.com/wiki/speechVolume","revid":376983,"updated":"2026-01-01T06:23:31Z","groups":["Sounds"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","description":"Returns the current speech volume (set by fadeSpeech)","syntaxes":[{"syntax":"speechVolume","params":[],"returns":{"type":"Number","type_expr":"Number","description":"in range 0..2","text":"Number in range 0..2"},"form":"nullary"}],"examples":[{"code":["hint str speechVolume;"]}],"see_also":["fadeSpeech","musicVolume","soundVolume","radioVolume","environmentVolume","getAudioOptionVolumes"]},{"name":"speed","title":"speed","type":"command","url":"https://community.bistudio.com/wiki/speed","revid":376345,"updated":"2025-10-07T16:59:25Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Object speed (in km/h). Returns relative speed of given object along Y axis. An equivalent to: `3.6 * (velocityModelSpace _obj select 1)`","syntaxes":[{"syntax":"speed object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["if (speed _truck1 >= 100) then { hint \"You're going too fast!\" };"]},{"code":["if ((speed objectParent player) < 0) then { hint \"You're going reverse!\" };"]}],"see_also":["velocity","setVelocity","velocityModelSpace","setVelocityModelSpace","setVelocityTransformation","limitSpeed"]},{"name":"speedMode","title":"speedMode","type":"command","url":"https://community.bistudio.com/wiki/speedMode","revid":336416,"updated":"2023-01-02T16:21:28Z","groups":["Groups"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns speed mode of the group, which can be any of the following:\n\n- **\"LIMITED\"**\n- **\"NORMAL\"**\n- **\"FULL\"**","syntaxes":[{"syntax":"speedMode groupName","params":[{"name":"groupName","type":"Object or Group","type_expr":"Object | Group"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"groupName"}}],"examples":[{"code":["_speed = speedMode group player;"]}],"see_also":["setSpeedMode","getSpeed","forceSpeed"]},{"name":"splitString","title":"splitString","type":"command","url":"https://community.bistudio.com/wiki/splitString","revid":377128,"updated":"2026-01-01T10:23:07Z","groups":["Strings"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","description":"Splits the provided **ANSI** string into an array of tokens according to given delimiters.\n\n> [!NOTE]\n> For Unicode support, see forceUnicode.","syntaxes":[{"syntax":"str splitString delimiters","params":[{"name":"str","type":"String","description":"the string to split","type_expr":"String"},{"name":"delimiters","type":"String","description":"one or more characters, each used as a separate delimiter; if empty, *str* is split by each character","type_expr":"String"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"binary","left":{"text":"str"},"right":{"text":"delimiters"}}],"examples":[{"code":["_str = \"- This, is a sample string.\" splitString \"-,. \"; // [\"This\",\"is\",\"a\",\"sample\",\"string\"]\n_str joinString \"#\"; // \"This#is#a#sample#string\""]},{"code":["\"\\A3\\ui_f\\data\\map\\vehicleicons\\iconLogic_ca.paa\" splitString \"\\.\"; // [\"A3\",\"ui_f\",\"data\",\"map\",\"vehicleicons\",\"iconLogic_ca\",\"paa\"]"]},{"code":["\"1:2:3\" splitString \":\"; // [\"1\",\"2\",\"3\"]"]},{"code":["\"Japa is the best!\" splitString \"\" joinString \" \"; // \"J a p a   i s   t h e   b e s t !\""]},{"code":["_cmd = currentMagazineDetail player; // \"9mm 16Rnd Mag(13/16)[id/cr:10000011/0]\"\n_cmd splitString \"([ ]/:)\"; // [\"9mm\",\"16Rnd\",\"Mag\",\"13\",\"16\",\"id\",\"cr\",\"10000011\",\"0\"]"]},{"text":"Remove all \\r\\n from file:\n\n```sqf\nloadFile \"somefile.txt\" splitString toString [13,10] joinString \" \";\n```","code":["loadFile \"somefile.txt\" splitString toString [13,10] joinString \" \";"]}],"see_also":["joinString","set","resize","reverse","select","in","find","toArray","forEach","count","deleteAt","deleteRange","append","sort","param","params","arrayIntersect","toString","endl","forceUnicode"],"notes":[{"user":"BaerMitUmlaut","date":"2016-05-17T14:18:00Z","text":"This command is unreliable/broken when it comes to some non-ASCII characters (as of Arma 3 v1.58):\n\n```sqf\n\"Mörser\" splitString \"\" // -> [\"M\",\" \",\" \",\"r\",\"s\",\"e\",\"r\"]\n\"Mörser\" splitString \"ö\" // -> [\"M\",\"rser\"]\n\"Mörser\" splitString \"ä\" // -> [\"M\",\" rser\"]\n```"},{"user":"Killzone_Kid","date":"2016-10-17T14:03:00Z","text":"This commands works only with ASCII chars, any chars with codes > 127, also used in different languages, will be converted to [\" \", \" \"]. Use toArray to preserve special characters:\n\n```sqf\n_spaced = toArray \"Mörser\" apply {toString [_x]} joinString \" \"; // M ö r s e r\n```"},{"user":"R3vo","date":"2019-07-19T11:17:00Z","text":"When working with string which contain linebreaks...\n\n```sqf\n\"stringWith\" + endl + \"Linebreak\" splitString \",; \";\n/*\nresult is [\"someStringWith\nLinebreak\"]\n*/\n```\n\n...one can remove those by adding endl as delimiter\n\n```sqf\n\"stringWith\" + endl + \"Linebreak\" splitString \",; \" + endl; // result is [\"someStringWith\",\"Linebreak\"]\n```"}]},{"name":"sqrt","title":"sqrt","type":"command","url":"https://community.bistudio.com/wiki/sqrt","revid":379394,"updated":"2026-10-31T00:00:40Z","groups":["Math"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns square root of x.","syntaxes":[{"syntax":"sqrt x","params":[{"name":"x","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"x"}}],"examples":[{"code":["private _squareRoot = sqrt 9;  // returns 3"]}],"see_also":["Math Commands","a %5E b"],"notes":[{"user":"Benargee","date":"2014-08-24T23:05:00Z","text":"Alternatively use \"x^0.5\" or \"x^(1/2)\".\n\n```sqf\n_sq = 9^0.5;    // result is 3\n_sq = 9^(1/2);    // result is 3\n```\n\nYou can use this method to get any root.\nCubed root = x^(1/3) or x^0.333[repeating].\nRoot 4 = x^(1/4) or x^0.25."}]},{"name":"squadParams","title":"squadParams","type":"command","url":"https://community.bistudio.com/wiki/squadParams","revid":377683,"updated":"2026-01-02T09:02:50Z","groups":["Object Manipulation","System"],"status":"ok","games":{"arma3":"1.18"},"since":"arma3 1.18","arma3_since":"1.18","locality":{"argument":"global"},"description":"Returns data about squad of given unit loaded from squad.xml as well as the unit itself.\n\n> [!NOTE]\n> This command returns an empty array in single player.","syntaxes":[{"syntax":"squadParams unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [squadInfo, memberInfo, squadId, a3unitsId]\n- squadInfo: Array with [nick, name, email, web, picture, title] - nick: String - squad nickname - name: String - squad full name - email: String - squad contact email - web: String - squad website URL - picture: String - squad picture URL - title: String - squad title - memberInfo: Array with [uid, name, fullname, email, icq, remark] - uid: String - member unique ID - name: String - member name - fullname: String - member full name - email: String - member email - icq: String - member ICQ number - remark: String - member remark - Arma 3 v2.06 squadId: String - unique squad ID - Arma 3 v2.06 a3unitsId: String - unique Arma 3 Units ID","text":"Array with [squadInfo, memberInfo, squadId, a3unitsId]\n\n- squadInfo: Array with [nick, name, email, web, picture, title]\n  - nick: String - squad nickname\n  - name: String - squad full name\n  - email: String - squad contact email\n  - web: String - squad website URL\n  - picture: String - squad picture URL\n  - title: String - squad title\n- memberInfo: Array with [uid, name, fullname, email, icq, remark]\n  - uid: String - member unique ID\n  - name: String - member name\n  - fullname: String - member full name\n  - email: String - member email\n  - icq: String - member ICQ number\n  - remark: String - member remark\n- Arma 3 v2.06 squadId: String - unique squad ID\n- Arma 3 v2.06 a3unitsId: String - unique Arma 3 Units ID"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_info = squadParams player;"]},{"code":["squadParams player params [\"_squadInfo\", \"_memberInfo\", \"_squadID\", \"_a3unitsID\"];"]}],"see_also":["squad.xml"]},{"name":"stance","title":"stance","type":"command","url":"https://community.bistudio.com/wiki/stance","revid":363221,"updated":"2024-03-25T22:48:35Z","groups":["Unit Control"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the stance of the given unit.","syntaxes":[{"syntax":"stance unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"can be:\n- `\"STAND\"` - `\"CROUCH\"` - `\"PRONE\"` - `\"UNDEFINED\"` (for example, swimming) - `\"\"` (on non-person object)","text":"String - can be:\n\n- `\"STAND\"`\n- `\"CROUCH\"`\n- `\"PRONE\"`\n- `\"UNDEFINED\"` (for example, swimming)\n- `\"\"` (on non-person object)"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["if (stance player == \"STAND\") then { hint \"I am standing!\" };"]}],"see_also":["animationState","unitPos","pose","getLeaning"]},{"name":"startLoadingScreen","title":"startLoadingScreen","type":"command","url":"https://community.bistudio.com/wiki/startLoadingScreen","revid":369458,"updated":"2024-09-06T08:44:54Z","groups":["System"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Shows loading screen with the given text, using the given resource.\nWhile loading screen is shown, simulation and scene drawing is disabled, user control is disabled, mouse cursor is hidden, scripts run at full speed (50ms per frame instead of 3ms per frame for Scheduled Scripts).\n\n> [!NOTE]\n> By default, startLoadingScreen will use \"RscDisplayNotFreeze\" resource.\n>\n> A custom resource can be defined in Description.ext, and a full black background will be used by default - the following controls are supported by the engine:\n>\n> - idc = 101 - text (type = 0) or picture (type = 48). The text will be set to the value provided by the command argument.\n> - idc = 103 - progress (type = 8) or animated texture (type = 45). This control indicates global hardcoded mission loading progress and is useless after the mission is loaded.\n> - idc = 104 - progress (type = 8). This control's progress is initially set to 0 and can be manipulated with progressLoadingScreen command.\n>\n> Resource can be defined in Description.ext; it must NOT be defined as `RscTitles`!\n>\n> ```cpp\n> // basic defines - pre \"import\" keyword in v2.02\n> class RscText\n> {\n>     type = 0;\n>     idc = -1;\n>     x = 0;\n>     y = 0;\n>     h = 0.037;\n>     w = 0.3;\n>     style = 0x100;\n>     font = Zeppelin32;\n>     SizeEx = 0.03921;\n>     colorText[] = { 1, 1, 1, 1 };\n>     colorBackground[] = { 0, 0, 0, 0 };\n>     linespacing = 1;\n> };\n>\n> class RscPicture\n> {\n>     access = 0;\n>     type = 0;\n>     idc = -1;\n>     style = 48;\n>     colorBackground[] = { 0, 0, 0, 0 };\n>     colorText[] = { 1, 1, 1, 1 };\n>     font = \"TahomaB\";\n>     sizeEx = 0;\n>     lineSpacing = 0;\n>     text = \"\";\n> };\n>\n> class RscLoadingText : RscText\n> {\n>     style = 2;\n>     x = 0.323532;\n>     y = 0.666672;\n>     w = 0.352944;\n>     h = 0.039216;\n>     sizeEx = 0.03921;\n>     colorText[] = { 0.543, 0.5742, 0.4102, 1.0 };\n> };\n>\n> class RscProgress\n> {\n>     x = 0.344;\n>     y = 0.619;\n>     w = 0.313726;\n>     h = 0.0261438;\n>     texture = \"\\ca\\ui\\data\\loadscreen_progressbar_ca.paa\";\n>     colorFrame[] = { 0, 0, 0, 0 };\n>     colorBar[] = { 1, 1, 1, 1 };\n> };\n>\n> class RscProgressNotFreeze\n> {\n>     idc = -1;\n>     type = 45;\n>     style = 0;\n>     x = 0.022059;\n>     y = 0.911772;\n>     w = 0.029412;\n>     h = 0.039216;\n>     texture = \"#(argb,8,8,3)color(0,0,0,0)\";\n> };\n>\n> // end of basic defines\n>\n> class WIKI_loadingScreen\n> {\n>     idd = -1;\n>     duration = 10e10;\n>     fadein = 0;\n>     fadeout = 0;\n>     name = \"loading screen\";\n>     class controlsBackground\n>     {\n>         class blueBackground : RscText // covers the black screen\n>         {\n>             x = safezoneXAbs;\n>             y = safezoneY;\n>             w = safezoneWAbs;\n>             h = safezoneH;\n>             text = \"\";\n>             colorText[] = { 0, 0, 0, 0 };\n>             colorBackground[] = { 0, 0, 1, 1 };\n>         };\n>\n>         class nicePic : RscPicture\n>         {\n>             style = 48 + 0x800; // ST_PICTURE + ST_KEEP_ASPECT_RATIO\n>             x = safezoneX + safezoneW/2 - 0.25;\n>             y = safezoneY + safezoneH/2 - 0.2;\n>             w = 0.5;\n>             h = 0.4;\n>             text = \"img\\nicePic.paa\";\n>         };\n>     };\n>\n>     class controls\n>     {\n>         class Title1 : RscLoadingText\n>         {\n>             text = \"$STR_LOADING\"; // \"Loading\" text in the middle of the screen\n>         };\n>\n>         class CA_Progress : RscProgress // progress bar, has to have idc 104\n>         {\n>             idc = 104;\n>             type = 8; // CT_PROGRESS\n>             style = 0; // ST_SINGLE\n>             texture = \"\\ca\\ui\\data\\loadscreen_progressbar_ca.paa\";\n>         };\n>\n>         class CA_Progress2 : RscProgressNotFreeze // progress bar that will go reverse\n>         {\n>             idc = 103;\n>         };\n>\n>         class Name2 : RscText // the text on the top-left\n>         {\n>             idc = 101;\n>             x = 0.05;\n>             y = 0.029412;\n>             w = 0.9;\n>             h = 0.04902;\n>             text = \"\";\n>             sizeEx = 0.05;\n>             colorText[] = { 0.543, 0.5742, 0.4102, 1.0 };\n>         };\n>     };\n> };\n> ```\n\n> [!WARNING]\n> - The loading screen does **not** end by itself and absolutely needs a call to endLoadingScreen command\n> - Game simulation is disabled during Loading Screen operation (at least in single player):\n>   - do **not** use the sleep command between startLoadingScreen and endLoadingScreen as **it may freeze the game** - use uiSleep instead\n>   - waitUntil *can* be used to wait for variable initialisation or script loading\n\n> [!NOTE]\n> **Arma 3:**\n>\n> - Use BIS_fnc_startLoadingScreen to prevent potential usage conflicts.\n> - The loading screen can be force-ended with the ENDLOAD cheat code.","syntaxes":[{"syntax":"startLoadingScreen [text, resource]","params":[{"name":"text","type":"String","type_expr":"String"},{"name":"resource","type":"String","optional":true,"type_expr":"String","text":"resource: String - (Optional)"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[text, resource]"}}],"examples":[{"code":["startLoadingScreen [\"Loading My Mission, please wait...\"];"]},{"code":["startLoadingScreen [\"Can't skip loading time...\", \"MyLoadingRsc\"];"]},{"code":["startLoadingScreen [\"Loading My Mission\"];\n// code\nprogressLoadingScreen 0.5;\n// code\nendLoadingScreen;"]},{"text":"```sqf\n// this structure prevents error-prone or lengthy code to miss endLoadingScreen.\nprivate _maxTime = diag_tickTime + 30; // max 30s of loading\n\nstartLoadingScreen [\"Loading\"];\nprivate _handle = 0 spawn {\n    // code that may crash or take too long\n};\n\nwaitUntil { uiSleep .1; scriptDone _handle || diag_tickTime > _maxTime };\nendLoadingScreen;\n```","code":["// this structure prevents error-prone or lengthy code to miss endLoadingScreen.\nprivate _maxTime = diag_tickTime + 30; // max 30s of loading\n\nstartLoadingScreen [\"Loading\"];\nprivate _handle = 0 spawn {\n\t// code that may crash or take too long\n};\n\nwaitUntil { uiSleep .1; scriptDone _handle || diag_tickTime > _maxTime };\nendLoadingScreen;"]}],"see_also":["endLoadingScreen","progressLoadingScreen","BIS_fnc_startLoadingScreen","import (Config)"],"notes":[{"user":"Killzone_Kid","date":"2015-11-21T18:38:00Z","text":"The default Arma 3 loading screen has no control to display text."}]},{"name":"steamGameRecordingEvent","title":"steamGameRecordingEvent","type":"command","url":"https://community.bistudio.com/wiki/steamGameRecordingEvent","revid":377704,"updated":"2026-01-02T09:03:36Z","groups":["System"],"status":"ok","games":{"arma3":"2.20"},"since":"arma3 2.20","arma3_since":"2.20","description":"Triggers a [Steam Timeline](https://partner.steamgames.com/doc/features/timeline) event within the [Game Recording](https://store.steampowered.com/gamerecording) feature. Read Arma 3: Steam Game Recording for more information and a list of all available event icons.","syntaxes":[{"syntax":"steamGameRecordingEvent parameters","params":[{"name":"parameters","type":"Array with [eventClass, eventDuration, eventArguments, startOffset]","description":"Array with [eventClass, eventDuration, eventArguments, startOffset]\n\n- eventClass: String - class in description.ext >> \"SteamGameRecording\" or config \"SteamManagerConfig\" >> \"GameRecording\" or a special utility string\n- eventDuration: Number - 0 for an instant event, or an amount of seconds this event lasted\n- eventArguments: Array of String - arguments that can be used to add dynamic info to the event (texts)\n- startOffset: Number - amount of seconds relative to the even trigger time","type_expr":"Array","text":"parameters: Array with [eventClass, eventDuration, eventArguments, startOffset]\n\n- eventClass: String - class in description.ext >> \"SteamGameRecording\" or config \"SteamManagerConfig\" >> \"GameRecording\" or a special utility string\n- eventDuration: Number - 0 for an instant event, or an amount of seconds this event lasted\n- eventArguments: Array of String - arguments that can be used to add dynamic info to the event (texts)\n- startOffset: Number - amount of seconds relative to the even trigger time"}],"returns":{"type":"String","type_expr":"String","description":"event handle (which can be used to edit an event after it has been triggered)"},"form":"unary","right":{"text":"parameters"}}],"examples":[{"code":["steamGameRecordingEvent [\"UnitKilled\", 0, [\"Player1\", \"50\"]]; //\"UnitKilled\" event, happening now, with arguments"]},{"code":["steamGameRecordingEvent [\"ZeusUI\", 5, [], -5]; //Was in the Zeus UI during the last 5 seconds"]},{"code":["steamGameRecordingEvent [\"StartGamePhase\", \"ArmaInvaders\"]; //Starting a game phase for Arma 3: Invaders with a unique ID"]}],"see_also":["Arma 3: Steam Game Recording"]},{"name":"step","title":"step","type":"command","url":"https://community.bistudio.com/wiki/step","revid":369298,"updated":"2024-09-03T18:42:52Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Optional step value. A countdown can be made with a negative value. If not set, the default step is 1.","syntaxes":[{"syntax":"for step stepSize","params":[{"name":"for","type":"For Type","type_expr":"For Type"},{"name":"stepSize","type":"Number","type_expr":"Number"}],"returns":{"type":"For Type","type_expr":"For Type"},"form":"binary","left":{"text":"for"},"right":{"text":"stepSize"}}],"examples":[{"text":"```sqf\nfor \"_i\" from 20 to 10 step -2 do\n{\n    // ...\n};\n```","code":["for \"_i\" from 20 to 10 step -2 do\n{\n\t// ...\n};"]}],"see_also":["Control Structures"]},{"name":"stop","title":"stop","type":"command","url":"https://community.bistudio.com/wiki/stop","revid":369977,"updated":"2024-10-22T13:04:51Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Stop an AI unit from turning or moving, preventing it to follow a watched object or engage an enemy properly - although if properly aligned, the unit -will- shoot the enemy. In essense, this is a scripted flag to suppress some of the AI procedures (to check the flag use stopped).\nIt may still change the stance if deemed appropriate (e.g. under fire). Use disableAI to disable specific AI capabilities.","syntaxes":[{"syntax":"unitName stop toggle","params":[{"name":"unitName","type":"Object","type_expr":"Object"},{"name":"toggle","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unitName"},"right":{"text":"toggle"}}],"examples":[{"code":["loon1 stop true;"]}],"see_also":["stopped","doStop","commandStop"]},{"name":"stopEngineRTD","title":"stopEngineRTD","type":"command","url":"https://community.bistudio.com/wiki/stopEngineRTD","revid":281862,"updated":"2021-06-16T21:15:36Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Instant engines stop.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"stopEngineRTD heli","params":[{"name":"heli","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"heli"}}],"examples":[{"text":"stopEngineRTD myHeli"}],"see_also":["enginesIsOnRTD"]},{"name":"stopped","title":"stopped","type":"command","url":"https://community.bistudio.com/wiki/stopped","revid":329504,"updated":"2022-07-29T13:33:06Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Check if unit is stopped by stop command.","syntaxes":[{"syntax":"stopped unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"text":"```sqs\n? (stopped _loon1) : hint \"Loon1 is stopped\"\n```","code":["? (stopped _loon1) : hint \"Loon1 is stopped\""]}],"see_also":["stop"]},{"name":"stopSound","title":"stopSound","type":"command","url":"https://community.bistudio.com/wiki/stopSound","revid":379071,"updated":"2026-09-25T11:47:34Z","groups":["Sounds"],"status":"ok","games":{"arma3":"2.12"},"since":"arma3 2.12","arma3_since":"2.12","locality":{"effect":"local"},"description":"Terminates the given sound. If sound object provided, such as say3D and there is .lip file playback attached, this playback will also terminate.","syntaxes":[{"syntax":"stopSound id or sound","params":[{"name":"id","type":"Number","description":"id returned by playSoundUI and playSound3D commands\n\n> [!IMPORTANT]\n> Sound ids are **local**.","type_expr":"Number"},{"name":"sound","type":"Object","description":"sound object such as say3D, in which case the particular sound is stopped, or entity such as soldier, then all say3D sounds current and queued are stopped. Note that passing NetObject, when say3D is executed with 'isGlobal' option, will cause error. To stop global sound one needs to destroy the source, i.e. kill the speaking unit.","type_expr":"Object","since":"arma3 2.24"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"id or sound"}}],"examples":[{"code":["stopSound 10;"]}],"see_also":["playSoundUI","playSound3D","soundParams"]},{"name":"str","title":"str","type":"command","url":"https://community.bistudio.com/wiki/str","revid":347635,"updated":"2023-10-03T08:38:22Z","groups":["Strings"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Converts any value into a string, depending on its type. If an Object has a vehicleVarName, it is returned (see Example 4).","syntaxes":[{"syntax":"str value","params":[{"name":"value","type":"Anything","type_expr":"Anything"}],"returns":{"type":"String","type_expr":"String","description":"if value is a String, double quotes `\"\"` will surround it (see Example 3)","text":"String - if *value* is a String, double quotes `\"\"` will surround it (see Example 3)"},"form":"unary","right":{"text":"value"}}],"examples":[{"code":["_s = str (5 + 2); // The value of _s is the string \"7\""]},{"text":"```sqf\na = [];\nac = 0;\nwhile { ac < 5 } do\n{\n    ac = count a;\n    a set [ac, format [\"Index %1\", ac]];\n};\nhintSilent str a; // hints all of [\"Index 0\",\"Index 1\",\"Index 2\",\"Index 3\",\"Index 4\"] including brackets, quotes and commas\n```","code":["a = [];\nac = 0;\nwhile { ac < 5 } do\n{\n\tac = count a;\n\ta set [ac, format [\"Index %1\", ac]];\n};\nhintSilent str a; // hints all of [\"Index 0\",\"Index 1\",\"Index 2\",\"Index 3\",\"Index 4\"] including brackets, quotes and commas"]},{"text":"```sqf\nstr [0, 0, 0] == \"[0, 0, 0]\";    // false\nstr [0, 0, 0] == \"[0,0,0]\";        // true\n\nstr \"a\";            // \"\"\"a\"\"\"\ncount str \"a\";        // 3\nstr text \"a\";        // \"a\"\ncount str text \"a\";    // 1\n```","code":["str [0, 0, 0] == \"[0, 0, 0]\";\t// false\nstr [0, 0, 0] == \"[0,0,0]\";\t\t// true\n\nstr \"a\";\t\t\t// \"\"\"a\"\"\"\ncount str \"a\";\t\t// 3\nstr text \"a\";\t\t// \"a\"\ncount str text \"a\";\t// 1"]},{"text":"```sqf\nstr objNull;        // \"<NULL-object>\"\nstr player;            // e.g \"B Alpha 1-1:1 (PlayerName)\"\nplayer setVehicleVarName \"PlayerUnit\";\nstr player;            // \"PlayerUnit\"\n```","code":["str objNull;\t\t// \"<NULL-object>\"\nstr player;\t\t\t// e.g \"B Alpha 1-1:1 (PlayerName)\"\nplayer setVehicleVarName \"PlayerUnit\";\nstr player;\t\t\t// \"PlayerUnit\""]}],"problems":"Before Arma 3 v1.64 this command did not escape a String's double quotes `\"\"` properly.","see_also":["toArray","toString","isText","select","count","find","endl","format","formatText"],"notes":[{"user":"Sbsmac","date":"2009-09-29T20:17:00Z","text":"When applied to a unit, this returns the variable name that was assigned to the unit in the editor (see also vehicleVarName).\nFor example, if you have created a playable unit with the name 'thePlayer' then you can use 'str player' to return \"thePlayer\"."}]},{"name":"sunOrMoon","title":"sunOrMoon","type":"command","url":"https://community.bistudio.com/wiki/sunOrMoon","revid":363669,"updated":"2024-04-14T20:21:37Z","groups":["Environment"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"| Time | sunOrMoon |\n|---|---|\n| 12:00 | 1 |\n| (...) | 1 |\n| 18:39 | 0.911201 |\n| 18:42 | 0.576303 |\n| 18:45 | 0.240862 |\n| 18:48 | 0 |\n| (...) | 0 |\n| 06:00 | 0.695308 |\n| 06:03 | 0.739519 |\n| 06:09 | 1 |\n| (...) | 1 |\n\nReturns the moon to sun transition state in range 0..1.\nThe return value is either 0 or 1 most of the time, the in-between values only returned during a few minutes in the morning and in the evening, depending on the date, and could be similar to shown here:","syntaxes":[{"syntax":"sunOrMoon","params":[],"returns":{"type":"Number","type_expr":"Number","description":"0 for night (moon), 1 for day (sun)"},"form":"nullary"}],"examples":[{"code":["private _transitionState = sunOrMoon;"]}],"see_also":["moonIntensity","moonPhase"]},{"name":"supportInfo","title":"supportInfo","type":"command","url":"https://community.bistudio.com/wiki/supportInfo","revid":353306,"updated":"2024-03-15T17:11:45Z","groups":["System"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Creates a list of supported operators and type. Each field of array has the format: \"x:name\" Where x can be:\n\n- 't' - type\n- 'n' - nullar operator\n- 'u' - unary operator\n- 'b' - binary operator.\n\n'name' is the operator or type name (in case operator, type of input operands is included).\n*mask* parameter can be an empty string, or one of field. In this case, function returns empty array, if operator is not included in the list. Limited wildcard support is available. Type *x* may be replaced with ***, meaning all types. For the *mask* partial match may be used, like *abc**, meaning any operators starting with 'abc' are reported, for example:\n\n- `\"\"` - list all types and commands\n- `\"t:*\"` - list all types\n- `\"*:<command>*\"` - list all entries for script *<command>*\n- Arma 3 v2.00 `\"i:<command>\"` - extended information about script *<command>*, Array of Array of Strings in format:\n  [type, lowerCaseName, camelCaseName, description, example, result, resultType, leftArgType, rightArgType, Arma 3 v2.02 syntax]\n\n> [!NOTE]\n> `\"i:*\"` is not a wildcard but returns information about the multiplication operator instead.","syntaxes":[{"syntax":"supportInfo mask","params":[{"name":"mask","type":"String","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"array with requested info or empty array `[]`"},"form":"unary","right":{"text":"mask"}}],"examples":[{"code":["supportInfo \"b:select*\"; // returns [\"b:ARRAY select SCALAR\",\"b:ARRAY select BOOL\",\"b:CONFIG select SCALAR\"]"]},{"text":"Return all available commands:\n\n```sqf\n_commands = supportInfo \"\";\n```","code":["_commands = supportInfo \"\";"]}],"see_also":["productVersion","requiredVersion"],"notes":[{"user":"Killzone_Kid","date":"2014-09-24T19:27:00Z","text":"To get the list of all supported commands in Arma 3 one can simply:\n\n```sqf\n{ diag_log _x } forEach supportInfo \"\";\n```"},{"user":"7erra","date":"2020-10-19T10:23:00Z","text":"Since you can't use `supportInfo \"i:*\"` as a wildcard to get a list of all commands with detailed information, use this code instead:\n\n```sqf\n_allCommands = [];\nsupportInfo \"\" apply {\n    _x splitString \":\" params [\"_t\", \"_x\"];\n    if (_t != \"t\") then {\n        _x = _x splitString \" \";\n        _command = switch count _x do {\n            case 1;\n            case 2: { _x # 0 };\n            case 3: { _x # 1 };\n            default {nil};\n        };\n        _allCommands pushBackUnique _command;\n    };\n};\n_allCommands sort true;\n_allCommands = _allCommands apply {\n    supportInfo format[\"i:%1\", _x]\n};\n_allCommands;\n```"}]},{"name":"suppressFor","title":"suppressFor","type":"command","url":"https://community.bistudio.com/wiki/suppressFor","revid":321213,"updated":"2022-05-13T15:31:19Z","groups":["Unit Control"],"status":"ok","games":{"arma2":"1.05","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.05","arma3_since":"0.50","description":"Force suppressive fire from the unit.","syntaxes":[{"syntax":"unit suppressFor duration","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"duration","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"duration"}}],"examples":[{"code":["_soldier1 suppressFor 10; // Will force soldier1 to do suppressive fire to known enemies for 10 seconds"]}],"see_also":["setSuppression","getSuppression","commandSuppressiveFire","doSuppressiveFire"]},{"name":"surfaceIsWater","title":"surfaceIsWater","type":"command","url":"https://community.bistudio.com/wiki/surfaceIsWater","revid":379477,"updated":"2026-10-31T00:11:44Z","groups":["Positions"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Returns whether there is water at given position. In Arma 3, it also detects pond objects, but only if they are loaded in memory (normally only true if the objects are within the object view distance)","syntaxes":[{"syntax":"surfaceIsWater position","params":[{"name":"position","type":"Position2D or Position3D","description":"when using Position3D Z will be ignored","type_expr":"Position2D | Position3D"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"position"}}],"examples":[{"code":["private _result = surfaceIsWater [1000, 3000];"]},{"code":["_isWater = surfaceIsWater position player;"]}],"see_also":["surfaceType","surfaceNormal","nearRoads","roadsConnectedTo","roadAt","isOnRoad"],"notes":[{"user":"Osmo","date":"2012-05-04T00:00:00Z","text":"Does not work with inland water. Works only with sea water."},{"user":"Leopard20","date":"2021-07-19T06:11:00Z","text":"The above note is not true in Arma 3. The command **does detect pond objects** and will return true if there is a pond object at that position. However, the object must have been loaded in memory (normally only true if the object is within the object view distance)"}]},{"name":"surfaceNormal","title":"surfaceNormal","type":"command","url":"https://community.bistudio.com/wiki/surfaceNormal","revid":377547,"updated":"2026-01-02T06:54:42Z","groups":["Positions"],"status":"ok","games":{"arma2oa":"1.60","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.60","arma3_since":"0.50","description":"Returns terrain's [surface normal](https://en.wikipedia.org/wiki/Normal_(geometry)) on given position.","syntaxes":[{"syntax":"surfaceNormal position","params":[{"name":"position","type":"Position2D or Position3D","description":"when using Position3D, Z is ignored","type_expr":"Position2D | Position3D"}],"returns":{"type":"Vector3D","type_expr":"Vector3D"},"form":"unary","right":{"text":"position"}}],"examples":[{"code":["_normal = surfaceNormal [300, 500];"]},{"code":["_normal = surfaceNormal getPosASL player;"]}],"see_also":["setVectorUp","surfaceIsWater","surfaceType"]},{"name":"surfaceTexture","title":"surfaceTexture","type":"command","url":"https://community.bistudio.com/wiki/surfaceTexture","revid":379082,"updated":"2026-09-27T08:09:04Z","groups":["Positions"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Same as surfaceType, but returns texture path to ground texture as string.\n\n> [!NOTE]\n> The texture returned is of the ground, even if there is a road at that position. To get road texture use getRoadInfo command.","syntaxes":[{"syntax":"surfaceTexture [x, y, useLayerMask]","params":[{"name":"x","type":"Number","description":"world x coordinate of the position","type_expr":"Number"},{"name":"y","type":"Number","description":"world y coordinate of the position","type_expr":"Number"},{"name":"useLayerMask","type":"Number or Boolean","description":"When a number is provided (Z in 3D positions), it is ignored. When a boolean is provided, it defines whether the layer mask should be used. Using the layer mask is more accurate but slightly slower.","type_expr":"Number | Boolean","since":"arma3 2.18"}],"returns":{"type":"String","type_expr":"String","description":"Surface texture"},"form":"unary","right":{"text":"[x, y, useLayerMask]"}}],"examples":[{"code":["private _groundTexture = surfaceTexture getPosATL player;"]},{"code":["private _pos = getPosATL player;\n_pos set [2, true]; // use layer mask\nprivate _groundTexture = surfaceTexture _pos;"]}],"see_also":["surfaceType","getRoadInfo"]},{"name":"surfaceType","title":"surfaceType","type":"command","url":"https://community.bistudio.com/wiki/surfaceType","revid":379085,"updated":"2026-09-27T08:28:22Z","groups":["Positions"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Returns what surface type is at the given position. For surface texture see surfaceTexture command.\n\n> [!NOTE]\n> The command returns surface type of the ground, even underneath objects such as buildings and roads\n\n- #GRASSSOUTH\n- #GRASSGENERAL\n- #SANDGENERAL\n\n- #UTGRASS - for natural surfaces\n- #UTCONCRETE - for urban surfaces\n\n- BuildingRubble\n- BuildingRubble_exp\n- cardboard\n- cardboard_exp\n- carpet\n- carpet_exp\n- carpet_inside\n- carpet_in_exp\n- concrete\n- concrete_exp\n- concrete_hall\n- concrete_hall_exp\n- concrete_inside\n- concrete_in_exp\n- concrete_out\n- Default\n- dirtrunway\n- floor\n- floor_exp\n- floor_inside\n- floor_in_exp\n- GdtAsphalt\n- GdtBeach\n- GdtCliff\n- GdtConcrete\n- GdtDead\n- GdtDesert\n- GdtDirt\n- GdtField\n- GdtForest\n- GdtForestMalden\n- GdtForestPine\n- GdtGrassDry\n- GdtGrassGreen\n- GdtGrassLong\n- GdtGrassShort\n- GdtGrassTall\n- GdtGrassWild\n- GdtKLCobblestone\n- GdtKLDirt\n- GdtKlField\n- GdtKLForestCon\n- GdtKLForestDec\n- GdtKLGrass1\n- GdtKLGrass2\n- GdtKlSoil\n- GdtKlStubble\n- GdtKlTarmac\n- GdtKlWeatheredTarmac\n- GdtMarsh\n- GdtMud\n- GdtRedDirt\n- GdtRock\n- GdtRubble\n- GdtSeabed\n- GdtSeabedExp\n- GdtSoil\n- GdtStony\n- GdtStonyThistle\n- GdtStratisBeach\n- GdtStratisConcrete\n- GdtStratisDirt\n- GdtStratisDryGrass\n- GdtStratisForestPine\n- GdtStratisGreenGrass\n- GdtStratisRocky\n- GdtStratisSeabed\n- GdtStratisSeabedCluttered\n- GdtStratisThistles\n- GdtThorn\n- GdtVolcano\n- GdtVolcanoBeach\n- GdtVRsurface01\n- GdtWeed\n- GdtWildField\n- grid\n- grid_exp\n- lino\n- lino_exp\n- lino_in_exp\n- mat_in_exp\n- metalPlate\n- metalPlatePressed_exp\n- metalPlate_exp\n- metalPlate_in_exp\n- mud\n- mud_exp\n- parquet\n- planks\n- planks_exp\n- planks_inside\n- planks_in_exp\n- road\n- road_exp\n- roof_tiles_exp\n- rubble\n- rubble_exp\n- sand\n- sand_exp\n- softwood_in_exp\n- steel\n- steel_exp\n- stones\n- stones_exp\n- straw_exp\n- SurfIntConcrete\n- SurfIntMetal\n- SurfIntTiles\n- SurfIntWood\n- surfint_concrete\n- surfint_metal\n- surfint_tiles\n- surfint_wood\n- SurfMetal\n- SurfRoadConcrete\n- SurfRoadConcrete_exp\n- SurfRoadDirt\n- SurfRoadDirt_Enoch\n- SurfRoadDirt_exp\n- SurfRoadTarmac\n- SurfRoadTarmac1_Enoch\n- SurfRoadTarmac2_Enoch\n- SurfRoadTarmac3_Enoch\n- SurfRoadTarmac_exp\n- SurfRoofTiles\n- SurfRoofTin\n- SurfTrailDirt_Enoch\n- SurfTrailDirt_exp\n- SurfWater\n- SurfWood\n- surf_metal\n- surf_roadconcrete\n- surf_roaddirt\n- surf_roadtarmac\n- surf_rooftiles\n- surf_rooftin\n- surf_wood\n- TEST_SurfNormal\n- tiling\n- trash\n- trash_exp\n- Water\n- wavyMetal\n- wavyMetal_exp\n- woodenFloor","syntaxes":[{"syntax":"surfaceType [x, y, z or useLayerMask]","params":[{"name":"x","type":"Number","description":"world x coordinate of the position","type_expr":"Number"},{"name":"y","type":"Number","description":"world y coordinate of the position","type_expr":"Number"},{"name":"z or useLayerMask","type":"Number or Boolean","optional":true,"description":"When a number is provided (Z in 3D positions), it is ignored. When a boolean is provided, it defines whether the layer mask should be used. Using the layer mask is more accurate but slightly slower.","type_expr":"Number | Boolean","since":"arma3 2.18","text":"z or useLayerMask: Number or Boolean - (Optional) When a number is provided (Z in 3D positions), it is ignored. When a boolean is provided, it defines whether the layer mask should be used. Using the layer mask is more accurate but slightly slower."}],"returns":{"type":"String","type_expr":"String","description":"Surface type"},"form":"unary","right":{"text":"[x, y, z or useLayerMask]"}}],"examples":[{"code":["private _surface = surfaceType [4500, 4500];"]},{"code":["hint surfaceType getPosWorld player;"]},{"code":["private _pos = getPosWorld player;\n_pos set [2, true]; // use layer mask\nsurfaceType _pos;"]}],"see_also":["surfaceTexture","surfaceIsWater","surfaceNormal","getAllEnvSoundControllers"]},{"name":"swimInDepth","title":"swimInDepth","type":"command","url":"https://community.bistudio.com/wiki/swimInDepth","revid":379395,"updated":"2026-10-31T00:00:48Z","groups":["Unit Control"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Sets the target depth level for swimming soldier. Depth should be a negative number.","syntaxes":[{"syntax":"unit swimInDepth value","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"value","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"value"}}],"examples":[{"code":["soldier swimInDepth -20;"]},{"code":["bob swimInDepth -10;\nbob doMove ASLToAGL getPosASL player;"]}],"see_also":["underwater"],"notes":[{"user":"DrSova","date":"2017-06-13T01:18:00Z","text":"Doesn't work with animals."}]},{"name":"switch","title":"switch","type":"command","url":"https://community.bistudio.com/wiki/switch","revid":352209,"updated":"2024-02-01T23:26:04Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Checks if the given parameter matches any case. If so, the code block of that case will be executed. After that the switch ends so no further cases will be checked.\nIf a case has no code block the code of the next case will automatically be executed, making it possible to formulate a logical \"or\" for cases which would otherwise contain the exact same code (see Example 2).\nThe default block will be executed **only** if no case matches, no matter its position inside the code block. It is not a case, and will **never** be entered by fallthrough.\n\n> [!NOTE]\n> - String comparison is case-sensitive. Use toUpper, toLower, toLowerANSI or toUpperANSI to force all strings to the same case.\n> - if no default block is provided and no case is matched, the switch block returns the default value true, otherwise it returns what the valid case block returns.","syntaxes":[{"syntax":"switch value","params":[{"name":"value","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Switch Type","type_expr":"Switch Type"},"form":"unary","right":{"text":"value"}}],"examples":[{"text":"```sqf\nswitch (floor random 5) do\n{\n    case 1: { hint \"one\"; };\n    case 2: { hint \"two\"; };\n    default { hint \"zero, three or four\" };\n};\n```","code":["switch (floor random 5) do\n{\n\tcase 1: { hint \"one\"; };\n\tcase 2: { hint \"two\"; };\n\tdefault { hint \"zero, three or four\" };\n};"]},{"text":"```sqf\nswitch (_condition) do\n{\n    case \"string1\";\n    case \"string2\": { hint \"string1 or string2\" };\n    case \"string3\";\n    case \"string4\": { hint \"string3 or string4\" };\n    case \"string5\"; // will never enter default's code\n    default { hint \"default\" };\n};\n```","code":["switch (_condition) do\n{\n\tcase \"string1\";\n\tcase \"string2\": { hint \"string1 or string2\" };\n\tcase \"string3\";\n\tcase \"string4\": { hint \"string3 or string4\" };\n\tcase \"string5\"; // will never enter default's code\n\tdefault { hint \"default\" };\n};"]},{"text":"```sqf\nprivate _color = switch (side player) do\n{\n    case west: { \"ColorGreen\" };\n    case east: { \"ColorRed\" };\n};\n```","code":["private _color = switch (side player) do\n{\n\tcase west: { \"ColorGreen\" };\n\tcase east: { \"ColorRed\" };\n};"]},{"text":"```sqf\nprivate _fn_moveForward =    { /*...code...*/ };\nprivate _fn_moveBackward =    { /*...code...*/ };\nprivate _fn_invalidKey =    { /*...code...*/ };\n\nswitch true do\n{\n    case (_dikCode in actionKeys \"MoveForward\"):    _fn_moveForward;\n    case (_dikCode in actionKeys \"MoveBackward\"):    _fn_moveBackward;\n    default _fn_invalidKey;\n};\n```","code":["private _fn_moveForward =\t{ /*...code...*/ };\nprivate _fn_moveBackward =\t{ /*...code...*/ };\nprivate _fn_invalidKey =\t{ /*...code...*/ };\n\nswitch true do\n{\n\tcase (_dikCode in actionKeys \"MoveForward\"):\t_fn_moveForward;\n\tcase (_dikCode in actionKeys \"MoveBackward\"):\t_fn_moveBackward;\n\tdefault _fn_invalidKey;\n};"]},{"text":"```sqf\nswitch _var do\n{\n    case \"0\";\n    default { hint str [\"default\", _var] };\n    case \"3\": { hint str [\"3\", _var] };\n    case \"1\";\n    case \"4\";\n    case \"2\": { hint str [\"2\", _var] };\n};\n\n_var = \"0\"; // -> [\"3\", \"0\"]\n_var = \"1\"; // -> [\"2\", \"1\"]\n_var = \"2\"; // -> [\"2\", \"2\"]\n_var = \"3\"; // -> [\"3\", \"3\"]\n_var = \"4\"; // -> [\"2\", \"4\"]\n_var = \"5\"; // -> [\"default\", \"5\"]\n```","code":["switch _var do\n{\n\tcase \"0\";\n\tdefault { hint str [\"default\", _var] };\n\tcase \"3\": { hint str [\"3\", _var] };\n\tcase \"1\";\n\tcase \"4\";\n\tcase \"2\": { hint str [\"2\", _var] };\n};\n\n_var = \"0\"; // -> [\"3\", \"0\"]\n_var = \"1\"; // -> [\"2\", \"1\"]\n_var = \"2\"; // -> [\"2\", \"2\"]\n_var = \"3\"; // -> [\"3\", \"3\"]\n_var = \"4\"; // -> [\"2\", \"4\"]\n_var = \"5\"; // -> [\"default\", \"5\"]"]}],"see_also":["Control Structures","a:b","case","default"],"notes":[{"user":"ColonelSandersLite","date":"2007-08-07T07:49:00Z","text":"Be careful of the parentheses around the variable you're switching on.\nIf you accidentally use braces instead (e.g: `switch { _myVar } do { /*... */ }`), it won't error, but will always return default.\n\n> [!NOTE]\n> This is due to `{ _myvar }` being Code."},{"user":"Iva","date":"2009-10-06T14:43:00Z","text":"It's possible to use Boolean value as a switch and Code as case. One thing to take special care in such case is that code must be in parentheses. Example:\n\n```sqf\nswitch (true) do\n{\n    case (_boolVar): { someCode };\n    case (unit1 distance unit2 > 5): { someCode };\n};\n```"},{"user":"Freddo3000","date":"2020-11-01T10:05:00Z","text":"You are able to call code within the switch statements, such as:\n\n```sqf\nprivate _myFunc = {\n    systemChat \"0\";\n    case 1: { systemChat \"1\" };\n    systemChat \"2\";\n};\n\nprivate _myParameter = 1;\n\nswitch (_myParameter) do\n{\n    _myParameter call _myFunc;\n    case 1: { systemChat \"4\" };\n    systemChat \"3\";\n    default { systemChat \"-1\"; };\n};\n```\n\nHowever the order in which it is executed is difficult to make sense of, see the code comment.\n\nThis is used by BIS_fnc_missionConversations and BIS_fnc_missionTasks"}]},{"name":"switchableUnits","title":"switchableUnits","type":"command","url":"https://community.bistudio.com/wiki/switchableUnits","revid":376986,"updated":"2026-01-01T07:13:49Z","groups":["Multiplayer","Team Switch","Object Detection"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Returns a list of playable units available for switching to\n\n- Command is relative to the client on which it is executed and will only show playable units for the same side as player's group + player himself\n- In singleplayer where playable units from all sides will be accessible via this command\n- Dead and player-controlled units are automatically removed from the resulting array\n- In order to get all *playable* units regardless of their side, see the playableUnits command","syntaxes":[{"syntax":"switchableUnits","params":[],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"nullary"}],"examples":[{"code":["_availableUnits = switchableUnits;"]}],"multiplayer":"In Multiplayer, switchableUnits are only available when respawn type is set to SIDE or GROUP, the mission contains units marked playable and player is able to switch to any of those units. On dedicated servers, this command returns an empty array,.","see_also":["Team Switch","playableUnits","allPlayers","teamSwitch"]},{"name":"switchAction","title":"switchAction","type":"command","url":"https://community.bistudio.com/wiki/switchAction","revid":323082,"updated":"2022-06-28T21:43:13Z","groups":["Unit Control","Animations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"When used on a person, the given action is started immediately (there is no transition). Use switchmove \"\" to switch back to the default movement if there is no transition back, otherwise the person may be stuck.","syntaxes":[{"syntax":"soldier switchAction action","params":[{"name":"soldier","type":"Object","type_expr":"Object"},{"name":"action","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"soldier"},"right":{"text":"action"}}],"examples":[{"code":["soldierOne switchAction \"SitDown\";"]}],"see_also":["playAction","playActionNow","switchMove"]},{"name":"switchCamera","title":"switchCamera","type":"command","url":"https://community.bistudio.com/wiki/switchCamera","revid":376544,"updated":"2025-10-27T12:56:35Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Switch camera to given vehicle / camera. Mode is one of:\n\n- **\"INTERNAL\"**: 1st person\n- **\"GUNNER\"**: optics / sights\n- **\"EXTERNAL\"**: 3rd person (inaccessible if difficulty settings do not allow for it)\n- **\"GROUP\"**: group\n- **\"CARGO\"**: same as \"INTERNAL\"\n\nIf you switch to a unit in a vehicle, this command uses the correct turret.\n\n> [!IMPORTANT]\n> - Control over the unit is not given to the player. Use selectPlayer or a combination of switchCamera and remoteControl to achieve this.\n> - Always switchCamera first (when needed) **before** using remoteControl as doing it after may lead to unpredictable results.","syntaxes":[{"syntax":"target switchCamera mode","params":[{"name":"target","type":"Object","type_expr":"Object"},{"name":"mode","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"target"},"right":{"text":"mode"}},{"syntax":"switchCamera target","since":"arma3 1.66","params":[{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"target"}}],"examples":[{"code":["player switchCamera \"Gunner\";"]},{"code":["vehicle player switchCamera \"External\";"]}],"see_also":["cameraView","cameraOn","cameraEffect","selectPlayer","remoteControl"],"notes":[{"user":"Killzone_Kid","date":"2015-05-16T13:14:00Z","text":"Force top down view:\n\n```sqf\nprivate _cameraObject = \"Land_HandyCam_F\" createVehicleLocal [0, 0, 0];\n_cameraObject hideObject true;\n_cameraObject attachTo [player, [0, 0, 10]];\n_cameraObject setVectorUp [0, 0.99, 0.01];\n_cameraObject switchCamera \"Internal\";\n\nfindDisplay 46 displayAddEventHandler [\"MouseButtonDown\", {\n    if (_this select 1 == 0) then\n    {\n        player forceWeaponFire [currentMuzzle player, currentWeaponMode player];\n    };\n\n    false;\n}];\n\nfindDisplay 46 displayAddEventHandler [\"KeyDown\", {\n    if (_this select 1 in actionKeys \"ReloadMagazine\") then\n    {\n        reload player;\n    };\n\n    false;\n}];\n```"}]},{"name":"switchGesture","title":"switchGesture","type":"command","url":"https://community.bistudio.com/wiki/switchGesture","revid":376921,"updated":"2025-12-29T12:08:48Z","groups":["Animations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"When used on a person,the given move is started immediately (without transition).\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v2.18 it is possible to play gesture states (define in config under `\"CfgGesturesMale\" >> \"states\"` for male soldiers).\n> In addition, it is also possible to play move states (define in config under `\"CfgMovesMaleSdr\" >> \"states\"` for male soldiers) as gestures if they have a valid mask defined in their configs (for example, weapon switching animations have a \"WeaponSwitching\" mask that only affects the upper body, so they work correctly with this command).","syntaxes":[{"syntax":"soldier switchGesture moveName","params":[{"name":"soldier","type":"Object","type_expr":"Object"},{"name":"moveName","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"soldier"},"right":{"text":"moveName"}},{"syntax":"soldier switchGesture [moveName, time, blendFactor, resetAim]","since":"arma3 2.18","params":[{"name":"soldier","type":"Object","type_expr":"Object"},{"name":"moveName","type":"String","description":"entry from `\"CfgMovesMaleSdr\" >> \"states\"` or `\"CfgGesturesMale\" >> \"states\"`","type_expr":"String"},{"name":"time","type":"Number","optional":true,"default":"0","description":"normalised time, in range 0..1, where 0 = beginning of the animation, and 1 = end of the animation","type_expr":"Number","text":"time: Number - (Optional, default 0) normalised time, in range 0..1, where 0 = beginning of the animation, and 1 = end of the animation"},{"name":"blendFactor","type":"Number","optional":true,"default":"1","description":"how much to blend the current animation with the new animation, in range 0..1, where 0 = current animation, and 1 = new animation. When 1 is used, the switching is instant (not smooth).","type_expr":"Number","text":"blendFactor: Number - (Optional, default 1) how much to blend the current animation with the new animation, in range 0..1, where 0 = current animation, and 1 = new animation. When 1 is used, the switching is instant (not smooth)."},{"name":"resetAim","type":"Boolean","optional":true,"default":"true","description":"whether the aim/head direction should be reset after switching","type_expr":"Boolean","text":"resetAim: Boolean - (Optional, default true) whether the aim/head direction should be reset after switching"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"soldier"},"right":{"text":"[moveName, time, blendFactor, resetAim]"}}],"examples":[{"code":["soldierOne switchGesture \"Wave\";"]},{"text":"```sqf\n// Create a dummy agent that copies your moves\nai1 = createAgent [typeOf player, getPosATL player, [], 0, \"NONE\"];\nai1 disableAI \"ALL\";\n\nonEachFrame\n{\n    ai1 setAnimSpeedCoef getAnimSpeedCoef player;\n    ai1 setVectorDir vectorDir player;\n    private _m = animationState player;\n    private _g = gestureState player;\n    private _i = getUnitMovesInfo player;\n    private _a = getUnitMovesInfo ai1;\n\n    if (animationState ai1 != _m || abs(_i # 1 - _a # 1) > 0.1) then\n    {\n        ai1 switchMove [_m, _i # 0, _i # 3, false];\n    };\n\n    if ((gestureState ai1 != _g || abs(_i # 6 - _a # 6) > 0.1) && (_g != \"<none>\" && _g find \"_player\" < 0)) then\n    {\n        ai1 switchGesture [_g, _i # 5, _i # 8, false];\n    };\n}\n```","code":["// Create a dummy agent that copies your moves\nai1 = createAgent [typeOf player, getPosATL player, [], 0, \"NONE\"];\nai1 disableAI \"ALL\";\n\nonEachFrame\n{\n\tai1 setAnimSpeedCoef getAnimSpeedCoef player;\n\tai1 setVectorDir vectorDir player;\n\tprivate _m = animationState player;\n\tprivate _g = gestureState player;\n\tprivate _i = getUnitMovesInfo player;\n\tprivate _a = getUnitMovesInfo ai1;\n\n\tif (animationState ai1 != _m || abs(_i # 1 - _a # 1) > 0.1) then\n\t{\n\t\tai1 switchMove [_m, _i # 0, _i # 3, false];\n\t};\n\n\tif ((gestureState ai1 != _g || abs(_i # 6 - _a # 6) > 0.1) && (_g != \"<none>\" && _g find \"_player\" < 0)) then\n\t{\n\t\tai1 switchGesture [_g, _i # 5, _i # 8, false];\n\t};\n}"]}],"see_also":["playGesture","getUnitMovesInfo","switchMove"],"notes":[{"user":".kju","date":"2010-08-31T18:42:00Z","text":"Rpt says \"Not implemented\" as of OA 1.54."}]},{"name":"switchLight","title":"switchLight","type":"command","url":"https://community.bistudio.com/wiki/switchLight","revid":364994,"updated":"2024-07-04T19:58:05Z","groups":["Lights"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Controls whether a lamp is lit or not.\n\n> [!NOTE]\n> This command was originally designed to only work with `CfgNonAIVehicles` class `\"StreetLamp\"` only.\n> Since Arma 3 v1.92 this command was extended to work with street lights and some prop lights, like portable construction light.","syntaxes":[{"syntax":"lamp switchLight mode","params":[{"name":"lamp","type":"Object","type_expr":"Object"},{"name":"mode","type":"String","description":"mode can be: \"ON\", \"OFF\" or \"AUTO\" (*lamp* is on only during nighttime, default)","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"lamp"},"right":{"text":"mode"}}],"examples":[{"code":["(object 12345) switchLight \"OFF\";"]},{"code":["nearestObject [player, \"Streetlamp\"] switchLight \"OFF\";"]},{"code":["cursorObject switchLight \"ON\";"]}],"see_also":["lightIsOn","BIS_fnc_switchLamp"],"notes":[{"user":"Killzone_Kid","date":"2013-09-16T11:14:00Z","text":"*Before Arma 3 v1.92* use setHit instead:\n\n```sqf\n_lamp = nearestObject [player, \"Lamps_base_F\"];\n_lamp setHit [\"light_1_hitpoint\", 0.97];    // off\n_lamp setHit [\"light_1_hitpoint\", 0];        // on\n```\n\nSwitch all lights off in the 500 radius of player:\n\n```sqf\nprivate _lamps = nearestObjects [player, [\"Lamps_base_F\", \"PowerLines_base_F\", \"PowerLines_Small_base_F\"], 500];\n\n{\n    for \"_i\" from 0 to (count getAllHitPointsDamage _x -1) do\n    {\n        _x setHitIndex [_i, 0.97];\n    };\n} forEach _lamps;\n```"},{"user":"Sa-Matra","date":"2023-03-01T14:12:31Z","text":"How to disable all lamps using the latest Arma 3 commands, a modern method. Disable all lights that are pre-placed on the map, on the entire map:\n\n```sqf\n{\n    _x switchLight \"OFF\";\n} forEach (1 allObjects 0);\n```\n\nDisable all script-spawned and editor-placed lamps:\n\n```sqf\n{\n    _x switchLight \"OFF\";\n} forEach (8 allObjects 0);\n```\n\nThese snippets iterate through all buildings and run switchLight on them. If they're lamps, they'll be turned off."}]},{"name":"switchMove","title":"switchMove","type":"command","url":"https://community.bistudio.com/wiki/switchMove","revid":378292,"updated":"2026-04-01T13:01:19Z","groups":["Animations"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Immediately applies given animation to the unit. For a smooth transition from the current animation (by connecting animations successively, e.g `CurrentAnim -> Intermediate1 -> Intermediate2 -> TargetAnim`), use playMove or playMoveNow.\n\n> [!NOTE]\n> see Category:Moves for respective games animations.\n\nThis command first resets the unit's animation states (including aiming state, gesture state, etc.) then puts the unit in the first frame of the animation (therefore showing no transition).\nIf an invalid animation is provided, the unit's animations will be reset but no new animation will be played (see Example 3).\n\n> [!NOTE]\n> It is a good practice to always use playMoveNow after switchMove to make sure the animation plays correctly when using the first syntax:\n>\n> ```sqf\n> _unit switchMove \"myMove\";\n> _unit playMoveNow \"myMove\";\n> ```\n>\n> The alternative syntax does this automatically.","syntaxes":[{"syntax":"person switchMove moveName","params":[{"name":"person","type":"Object","description":"unit","type_expr":"Object"},{"name":"moveName","type":"String","description":"animation state (see animationState)","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"moveName"}},{"syntax":"person switchMove [moveName, time, blendFactor, resetAim]","since":"arma3 2.18","params":[{"name":"person","type":"Object","description":"unit","type_expr":"Object"},{"name":"moveName","type":"String","description":"entry from `\"CfgMovesMaleSdr\" >> \"states\"` or `\"CfgGesturesMale\" >> \"states\"`","type_expr":"String"},{"name":"time","type":"Number","optional":true,"default":"0","description":"normalized time, in range 0..1, where 0 = beginning of the animation, and 1 = end of the animation","type_expr":"Number","text":"time: Number - (Optional, default 0) normalized time, in range 0..1, where 0 = beginning of the animation, and 1 = end of the animation"},{"name":"blendFactor","type":"Number","optional":true,"default":"1","description":"how much to blend the current animation with the new animation, in range 0..1, where 0 = current animation, and 1 = new animation. When 1 is used, the switching is instant (not smooth), similar to the first syntax.","type_expr":"Number","text":"blendFactor: Number - (Optional, default 1) how much to blend the current animation with the new animation, in range 0..1, where 0 = current animation, and 1 = new animation. When 1 is used, the switching is instant (not smooth), similar to the first syntax."},{"name":"resetAim","type":"Boolean","optional":true,"default":"true","description":"whether the aim/head direction should be reset after switching","type_expr":"Boolean","text":"resetAim: Boolean - (Optional, default true) whether the aim/head direction should be reset after switching"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"person"},"right":{"text":"[moveName, time, blendFactor, resetAim]"}}],"examples":[{"text":"Prone:\n\n```sqf\nplayer switchMove \"AmovPpneMstpSrasWrflDnon\";\n```","code":["player switchMove \"AmovPpneMstpSrasWrflDnon\";"]},{"text":"Sit player immediately and globally:\n\n```sqf\n[player, \"AmovPsitMstpSlowWrflDnon\"] remoteExec [\"switchMove\"];\n```","code":["[player, \"AmovPsitMstpSlowWrflDnon\"] remoteExec [\"switchMove\"];"]},{"text":"Resets unit's animation:\n\n```sqf\n_unit switchMove \"\";\n```","code":["_unit switchMove \"\";"]},{"text":"```sqf\n// Create a dummy agent that copies your moves\nai1 = createAgent [typeOf player, getPosATL player, [], 0, \"NONE\"];\nai1 disableAI \"ALL\";\nonEachFrame\n{\n    ai1 setAnimSpeedCoef getAnimSpeedCoef player;\n    ai1 setVectorDir vectorDir player;\n    private _m = animationState player;\n    private _g = gestureState player;\n    private _i = getUnitMovesInfo player;\n    private _a = getUnitMovesInfo ai1;\n\n    if (animationState ai1 != _m || abs(_i#1 - _a#1) > 0.1) then\n    {\n        ai1 switchMove [_m, _i#0, _i#3, false];\n    };\n\n    if ((gestureState ai1 != _g || abs(_i#6 - _a#6) > 0.1) && (_g != \"<none>\" && _g find \"_player\" < 0)) then\n    {\n        ai1 switchGesture [_g, _i#5, _i#8, false];\n    };\n}\n```","code":["// Create a dummy agent that copies your moves\nai1 = createAgent [typeOf player, getPosATL player, [], 0, \"NONE\"];\nai1 disableAI \"ALL\";\nonEachFrame\n{\n\tai1 setAnimSpeedCoef getAnimSpeedCoef player;\n\tai1 setVectorDir vectorDir player;\n\tprivate _m = animationState player;\n\tprivate _g = gestureState player;\n\tprivate _i = getUnitMovesInfo player;\n\tprivate _a = getUnitMovesInfo ai1;\n\t\n\tif (animationState ai1 != _m || abs(_i#1 - _a#1) > 0.1) then\n\t{\n\t\tai1 switchMove [_m, _i#0, _i#3, false];\n\t};\n\n\tif ((gestureState ai1 != _g || abs(_i#6 - _a#6) > 0.1) && (_g != \"<none>\" && _g find \"_player\" < 0)) then\n\t{\n\t\tai1 switchGesture [_g, _i#5, _i#8, false];\n\t};\n}"]}],"multiplayer":"This command has a global effect when executed locally to the unit and will synchronise properly for JIP.\nIn this case the animation on the executing machine is immediate while on remote machines it will be transitional.\nIn order for the animation to change immediately on every PC in multiplayer, use global remote execution (see Example 2).\nWhen the argument is remote, the animation change on the executing PC is only temporary.","see_also":["switchGesture","playMove","playMoveNow","switchAction","playAction","playActionNow","animationState","getUnitMovesInfo"],"notes":[{"user":"Hurricane","date":"2007-03-25T23:48:00Z","text":"In some cases the movement won't stay. I.e. AI hostages that put their hands behind their heads (_hostage switchMove \"AmovPercMstpSsurWnonDnon\") won't hold their hands up, unless you first use disableAI \"autoTarget\" on them. They mostly put their hands down because they 'noticed' unknown objects."},{"user":"Killswitch","date":"2008-08-03T22:43:00Z","text":"This command will not cause an AnimChanged or AnimDone event. However, playMove will."},{"user":"AgentRev","date":"2016-11-12T20:11:00Z","text":"When using this command on the player unit outside unscheduled UI contexts, it will cause a minor camera glitch for a single frame.\nFor example, Draw3D and KeyDown are UI contexts and so are not affected by the glitch, but EachFrame and scheduled scripts are not UI contexts and are affected by the glitch."},{"user":"Leopard20","date":"2021-08-08T15:59:00Z","text":"If the animation you're trying to use with this command has no connection/interpolation to the unit's base animation (usually \"AmovPercMstpSrasWrflDnon\"), the move might not play using switchMove alone. In such cases you have to do this:\n\n```sqf\n_unit switchMove _move; _unit playMoveNow _move;\n```\n\nThis must run in **unscheduled environment** (see isNil)\nAlternatively, just use the second syntax:\n\n```sqf\n_unit switchMove [_move];\n```"},{"user":"Leopard20","date":"2025-11-04T09:44:03Z","text":"You can loop an animation using a function like this (it's recommended to do `ai disableAI \"ANIM\"` first)\n\n```sqf\n// TAG_fnc_loopAnim\nparams [\"_unit\", \"_anim\"];\n\n// remove old EH\n_unit removeEventHandler [\"AnimStateChanged\", _unit getVariable [\"TAG_AnimStateChangedEH\", -1]];\n\nprivate _EH = -1;\n// if anim is empty, just stop looping\nif (_anim != \"\") then\n{\n    _EH = _unit addEventHandler [\"AnimStateChanged\", {\n        params [\"_unit\", \"_anim\"];\n        private _loopedAnim = _unit getVariable [\"TAG_LoopedAnim\", \"\"];\n        if (alive _unit && _anim != _loopedAnim) then {\n            _unit switchMove [_loopedAnim, 0, 0, false];\n        };\n    }];\n};\n\n_unit setVariable [\"TAG_AnimStateChangedEH\", _EH];\n_unit setVariable [\"TAG_LoopedAnim\", _anim];\n\n// start the anim\n_unit switchMove [_anim, 0, 0, false];\n```\n\nThen use the above code in a function, either by defining it in the function library or by doing\n\n```sqf\nTAG_fnc_loopAnim = { above code }\n```\n\nHow to use the function:\n\n```sqf\n// start looping\n[testUnit, \"HubSittingChairUA_move1\"] call TAG_fnc_loopAnim;\n\n// stop looping\n[testUnit, \"\"] call TAG_fnc_loopAnim;\n```"}]},{"name":"synchronizedObjects","title":"synchronizedObjects","type":"command","url":"https://community.bistudio.com/wiki/synchronizedObjects","revid":379396,"updated":"2026-10-31T00:00:56Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"local"},"description":"Return the list of objects synchronized with the given unit.\n\n> [!NOTE]\n> synchronizedObjects only works on triggers and entities with AI (logics, soldiers/players, or vehicles that contain soldiers as the effective commander)","syntaxes":[{"syntax":"synchronizedObjects unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_objects = synchronizedObjects _logic;"]}],"see_also":["synchronizeObjectsAdd","synchronizeObjectsRemove","synchronizedTriggers","synchronizedWaypoints"],"notes":[{"user":"Turrican","date":"2010-11-11T07:13:00Z","text":"This command only returns the effective commander of a vehicle that is synchronized. You have to use the \"vehicle\"\ncommand to select the actual vehicle.\n\nThis command only returns the synchronized objects when used on intelligent objects such as units or\nlogic objects. All other objects returns an empty array.\n\nIn MP this command returns only values when the object is local. otherwise it returns an empty array."},{"user":"Bull A","date":"2015-02-26T18:03:00Z","text":"When returning the synchronized objects, they are returned in the order that they were placed on the map"},{"user":"BobTheHunted","date":"2016-10-27T18:52:00Z","text":"In Eden you can synchronize both units and their vehicles separately by syncing the gamelogic (or whatever) to the vehicle itself, and then the driver (or whatever other passengers) of the vehicle. To use an entire group, just sync all units within that group to the gamelogic (not just the leader or group icon). By doing this you can execute commands on each unit in a group and just the crew/single unit of a vehicle, or just the vehicle and not the crew, or both the vehicle and the crew."}]},{"name":"synchronizedTriggers","title":"synchronizedTriggers","type":"command","url":"https://community.bistudio.com/wiki/synchronizedTriggers","revid":377126,"updated":"2026-01-01T10:22:24Z","groups":["Triggers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns the list of triggers synchronized with a given waypoint.","syntaxes":[{"syntax":"synchronizedTriggers waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"Trigger objects"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["synchronizedTriggers _someWaypoint;"]}],"see_also":["synchronizeObjectsAdd","synchronizeObjectsRemove","synchronizedWaypoints"]},{"name":"synchronizedWaypoints","title":"synchronizedWaypoints","type":"command","url":"https://community.bistudio.com/wiki/synchronizedWaypoints","revid":377125,"updated":"2026-01-01T10:21:46Z","groups":["Waypoints","Triggers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns the list of waypoints synchronized with a given trigger or waypoint.","syntaxes":[{"syntax":"synchronizedWaypoints obj","params":[{"name":"obj","type":"Object or Waypoint","type_expr":"Object | Waypoint"}],"returns":{"type":"Array of Waypoints","type_expr":"Array<Waypoint>"},"form":"unary","right":{"text":"obj"}}],"examples":[{"code":["synchronizedWaypoints _someTrigger;"]}],"see_also":["synchronizeWaypoint"]},{"name":"synchronizeObjectsAdd","title":"synchronizeObjectsAdd","type":"command","url":"https://community.bistudio.com/wiki/synchronizeObjectsAdd","revid":377071,"updated":"2026-01-01T09:31:05Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Add given objects to the unit's list of synchronized objects.","syntaxes":[{"syntax":"unit synchronizeObjectsAdd objects","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"objects","type":"Array of Objects","type_expr":"Array<Object>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"objects"}}],"examples":[{"code":["_acm = _groupLogic createUnit [\"AmbientCombatManager\", position player, [], 0, \"NONE\"];\n_acm synchronizeObjectsAdd [player];"]}],"see_also":["synchronizeObjectsRemove"]},{"name":"synchronizeObjectsRemove","title":"synchronizeObjectsRemove","type":"command","url":"https://community.bistudio.com/wiki/synchronizeObjectsRemove","revid":377072,"updated":"2026-01-01T09:31:25Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Removes given objects from the unit's list of synchronized objects.","syntaxes":[{"syntax":"unit synchronizeObjectsRemove objects","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"objects","type":"Array of Objects","type_expr":"Array<Object>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"objects"}}],"examples":[{"code":["player synchronizeObjectsRemove [_object1, _object2, _object3];"]}],"see_also":["synchronizeObjectsAdd"]},{"name":"synchronizeTrigger","title":"synchronizeTrigger","type":"command","url":"https://community.bistudio.com/wiki/synchronizeTrigger","revid":330384,"updated":"2022-09-04T21:38:28Z","groups":["Triggers","Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Synchronizes the trigger with zero or more waypoints.","syntaxes":[{"syntax":"trigger synchronizeTrigger waypoints","params":[{"name":"trigger","type":"Object","description":"trigger to synchronize","type_expr":"Object"},{"name":"waypoints","type":"Array of Waypoints","description":"waypoints to synchronize with trigger. Array can be empty to unset","type_expr":"Array<Waypoint>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"trigger"},"right":{"text":"waypoints"}}],"examples":[{"code":["_trigger synchronizeTrigger [];"]},{"code":["_trigger synchronizeTrigger [_waypoint1];"]},{"code":["_trigger synchronizeTrigger [_waypoint1, [_group5, 7], _waypoint3];"]}],"see_also":["createTrigger","synchronizeWaypoint"]},{"name":"synchronizeWaypoint","title":"synchronizeWaypoint","type":"command","url":"https://community.bistudio.com/wiki/synchronizeWaypoint","revid":379478,"updated":"2026-10-31T00:11:52Z","groups":["Waypoints","Triggers"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Synchronizes the trigger or the waypoint with an array of waypoints.","syntaxes":[{"syntax":"triggerOrWaypoint synchronizeWaypoint waypoints","params":[{"name":"triggerOrWaypoint","type":"Object or Waypoint","description":"can be:\n\n- Object - trigger\n- Waypoint - Array format of Waypoint","type_expr":"Object | Waypoint"},{"name":"waypoints","type":"Array of Waypoints","type_expr":"Array<Waypoint>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"triggerOrWaypoint"},"right":{"text":"waypoints"}}],"examples":[{"code":["_myTrigger synchronizeWaypoint [[_group2, 3]];"]},{"code":["[_group1, 2] synchronizeWaypoint [[_group2, 3]];"]}],"see_also":["synchronizedWaypoints","createTrigger","synchronizeTrigger"],"notes":[{"user":"Master85","date":"2008-03-31T23:41:00Z","text":"To 'unsynchronize' a waypoint use: Waypoint synchronizeWaypoint []"}]},{"name":"systemChat","title":"systemChat","type":"command","url":"https://community.bistudio.com/wiki/systemChat","revid":376770,"updated":"2025-11-17T00:03:10Z","groups":["Radio and Chat"],"status":"ok","games":{"arma2oa":"1.63","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.63","arma3_since":"0.50","locality":{"effect":"local"},"description":"Types text to the system radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally (see remoteExec). Use clearRadio to clear chat history","syntaxes":[{"syntax":"systemChat text","params":[{"name":"text","type":"String","description":"message to transmit","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"text"}}],"examples":[{"code":["systemChat \"Hello world!\";"]},{"code":["driver vehicle player sideChat \"sideChat\";\ndriver vehicle player globalChat \"globalChat\";\ndriver vehicle player groupChat \"groupChat\";\nvehicle player vehicleChat \"vehicleChat\";\ndriver vehicle player commandChat \"commandChat\";\ndriver vehicle player customChat [1, \"customChat\"];\nsystemChat \"systemChat\";"]}],"see_also":["globalChat","groupChat","vehicleChat","commandChat","customChat","sideChat","directSay","clearRadio"]},{"name":"systemOfUnits","title":"systemOfUnits","type":"command","url":"https://community.bistudio.com/wiki/systemOfUnits","revid":321214,"updated":"2022-05-13T15:31:34Z","groups":["System"],"status":"ok","games":{"tkoh":"1.00","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","description":"Returns the currently selected system of units.\n\n- 0: Metric\n- 1: Mixed (ground vehicles use Metric / air vehicles use Imperial)\n- 2: Imperial","syntaxes":[{"syntax":"systemOfUnits","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["_system = systemOfUnits;"]}],"see_also":["BIS_fnc_convertUnits","setSystemOfUnits"]},{"name":"systemTime","title":"systemTime","type":"command","url":"https://community.bistudio.com/wiki/systemTime","revid":347950,"updated":"2023-11-07T05:40:08Z","groups":["Time"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns system time.","syntaxes":[{"syntax":"systemTime","params":[],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"in format [year, month, day, hour, minute, second, millisecond]","text":"Array of Numbers in format [year, month, day, hour, minute, second, millisecond]"},"form":"nullary"}],"examples":[{"code":["private _currentTime = systemTime;"]},{"code":["systemTime apply {if (_x < 10) then {\"0\" + str _x} else {str _x}}; // [\"2021\",\"05\",\"03\",\"14\",\"09\",\"37\",\"593\"]"]},{"code":["systemTime params [\"_year\", \"_month\", \"_day\", \"_hour\", \"_minute\", \"_second\", \"_millisecond\"];"]}],"see_also":["systemTimeUTC","date","time","dayTime","diag_tickTime","serverTime","missionStart","diag_deltaTime"]},{"name":"systemTimeUTC","title":"systemTimeUTC","type":"command","url":"https://community.bistudio.com/wiki/systemTimeUTC","revid":378414,"updated":"2026-04-04T08:38:50Z","groups":["Time"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns systemTime according to **U**niversal **T**ime **C**oordinated time scale.","syntaxes":[{"syntax":"systemTimeUTC","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [year, month, day, hour, minute, second, millisecond]\n- year: Number - month: Number - day: Number - hour: Number - minute: Number - second: Number - millisecond: Number","text":"Array with [year, month, day, hour, minute, second, millisecond]\n\n- year: Number\n- month: Number\n- day: Number\n- hour: Number\n- minute: Number\n- second: Number\n- millisecond: Number"},"form":"nullary"}],"examples":[{"code":["private _UKTime = systemTimeUTC;"]},{"code":["systemTimeUTC apply { if (_x < 10) then { \"0\" + str _x } else { str _x } }; // [\"2021\",\"05\",\"03\",\"14\",\"09\",\"37\",\"593\"]"]},{"text":"```sqf\nprivate _timeUTC = systemTimeUTC;\nprivate _time = systemTime;\nprivate _timeDiffH = (_time select 3) - (_timeUTC select 3);\nprivate _timeDiffM = (_time select 4) - (_timeUTC select 4);\nif (_timeDiffM < 0) then\n{\n    _timeDiffH = _timeDiffH - 1;\n    _timeDiffM = _timeDiffM + 60;\n};\nif (_timeDiffH < -12) then\n{\n    _timeDiffH = _timeDiffH + 24;\n};\nif (_timeDiffH > 12) then\n{\n    _timeDiffH = _timeDiffH - 24;\n};\nprivate _timeZone = [_timeDiffH, _timeDiffM]; // hour (_timeDiffH) is in range -12..+12\n```","code":["private _timeUTC = systemTimeUTC;\nprivate _time = systemTime;\nprivate _timeDiffH = (_time select 3) - (_timeUTC select 3);\nprivate _timeDiffM = (_time select 4) - (_timeUTC select 4);\nif (_timeDiffM < 0) then\n{\n\t_timeDiffH = _timeDiffH - 1;\n\t_timeDiffM = _timeDiffM + 60;\n};\nif (_timeDiffH < -12) then\n{\n\t_timeDiffH = _timeDiffH + 24;\n};\nif (_timeDiffH > 12) then\n{\n\t_timeDiffH = _timeDiffH - 24;\n};\nprivate _timeZone = [_timeDiffH, _timeDiffM]; // hour (_timeDiffH) is in range -12..+12"]}],"see_also":["systemTime","date","time","dayTime","diag_tickTime","serverTime","missionStart","diag_deltaTime"]},{"name":"tan","title":"tan","type":"command","url":"https://community.bistudio.com/wiki/tan","revid":310889,"updated":"2022-05-07T20:31:30Z","groups":["Math - Geometry"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Tangent of x, argument in Degrees.","syntaxes":[{"syntax":"tan x","params":[{"name":"x","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"x"}}],"examples":[{"text":"```sqf\n_tangent = tan 45;\n```\n\nResult is 1","code":["_tangent = tan 45;"]}],"see_also":["Math Commands"]},{"name":"targetKnowledge","title":"targetKnowledge","type":"command","url":"https://community.bistudio.com/wiki/targetKnowledge","revid":377833,"updated":"2026-01-03T04:31:58Z","groups":["Object Detection"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","description":"Returns unit's knowledge about target.","syntaxes":[{"syntax":"unit targetKnowledge target","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [knownByGroup, knownByUnit, lastSeen, lastThreat, side, errorMargin, position, ignoreTarget]\n- knownByGroup: Boolean - target known by group - knownByUnit: Boolean - target known by the unit - lastSeen: Number - last time the target was seen by the unit - lastThreat: Number - last time the target endangered the unit - side: Side - target side - errorMargin: Number - position error - position: Position - target position - Arma 3 v2.18 ignoreTarget: Boolean - target is ignored (ignoreTarget)","text":"Array with [knownByGroup, knownByUnit, lastSeen, lastThreat, side, errorMargin, position, ignoreTarget]\n\n- knownByGroup: Boolean - target known by group\n- knownByUnit: Boolean - target known by the unit\n- lastSeen: Number - last time the target was seen by the unit\n- lastThreat: Number - last time the target endangered the unit\n- side: Side - target side\n- errorMargin: Number - position error\n- position: Position - target position\n- Arma 3 v2.18 ignoreTarget: Boolean - target is ignored (ignoreTarget)"},"form":"binary","left":{"text":"unit"},"right":{"text":"target"}}],"examples":[{"code":["private _allInfo = _soldierOne targetKnowledge _jeepOne;\n_allInfo params [\"_knownByGroup\", \"_knownByUnit\", \"_lastSeen\", \"_lastThreat\", \"_side\", \"_errorMargin\", \"_position\", \"_ignoreTarget\"];"]},{"code":["private _posError = (_soldierOne targetKnowledge _jeepOne) select 5;"]}],"see_also":["knowsAbout","targets","targetsQuery","nearTargets","targetsAggregate","reveal","forgetTarget","setTargetAge","getHideFrom","ignoreTarget"]},{"name":"targets","title":"targets","type":"command","url":"https://community.bistudio.com/wiki/targets","revid":377208,"updated":"2026-01-01T11:46:32Z","groups":["Object Detection"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","locality":{"argument":"global"},"description":"Retrieves list of given unit targets matching specified filter. If the filter is not specified, all targets are returned.\n\n> [!NOTE]\n> If a unit is provided, the unit itself will be excluded from results. If a group is provided, its units will be excluded (even if renegades).","syntaxes":[{"syntax":"unitOrGroup targets [enemyOnly, maxDistance, sides, maxAge, alternateCenter]","params":[{"name":"unitOrGroup","type":"Object or Arma 3 v2.12 Group","description":"unit or group which target knowledge is retrieved","type_expr":"Object | Group"},{"name":"enemyOnly","type":"Boolean","optional":true,"default":"false","description":"true to include only enemy targets, false to include all targets","type_expr":"Boolean","text":"enemyOnly: Boolean - (Optional, default false) true to include only enemy targets, false to include all targets"},{"name":"maxDistance","type":"Number","optional":true,"default":"-1","description":"maximum **2D** distance based on target's expected position; use 0 to ignore the filter","type_expr":"Number","text":"maxDistance: Number - (Optional, default -1) maximum **2D** distance based on target's expected position; use 0 to ignore the filter"},{"name":"sides","type":"Array of Sides","optional":true,"default":"`[]`","description":"array of accepted sides; use `[]` to ignore the side filter","type_expr":"Array<Side>","text":"sides: Array of Sides - (Optional, default `[]`) array of accepted sides; use `[]` to ignore the side filter"},{"name":"maxAge","type":"Number","optional":true,"default":"0","description":"max. target age, targets that are known to unit for longer than maxAge are ignored; use 0 to ignore the maxAge filter","type_expr":"Number","text":"maxAge: Number - (Optional, default 0) max. target age, targets that are known to unit for longer than maxAge are ignored; use 0 to ignore the maxAge filter"},{"name":"alternateCenter","type":"Array","optional":true,"default":"unitOrGroup's position","description":"alternate (2D or 3D) position used for **2D** distance check","type_expr":"Array","text":"alternateCenter: Array - (Optional, default *unitOrGroup*'s position) alternate (2D or 3D) position used for **2D** distance check"}],"returns":{"type":"Array","type_expr":"Array","description":"unitOrGroup's targets matching the criteria","text":"Array - *unitOrGroup*'s targets matching the criteria"},"form":"binary","left":{"text":"unitOrGroup"},"right":{"text":"[enemyOnly, maxDistance, sides, maxAge, alternateCenter]"}}],"examples":[{"code":["private _targets = _unit targets [false, 300, [east, sideEnemy]]; // all targets of east or renegade side in 300m"]},{"code":["private _targets = _unit targets [true, 300]; // enemy targets in 300m"]},{"code":["private _targets = _unit targets []; // all targets"]}],"see_also":["targetsQuery","nearTargets","targetsAggregate","targetKnowledge","knowsAbout","reveal","forgetTarget","setTargetAge","getHideFrom","side"]},{"name":"targetsAggregate","title":"targetsAggregate","type":"command","url":"https://community.bistudio.com/wiki/targetsAggregate","revid":377663,"updated":"2026-01-02T09:02:16Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Aggregate candidates.","syntaxes":[{"syntax":"[speaker, side, classname, position, timeMax] targetsAggregate candidates","params":[{"name":"speaker","type":"Object","type_expr":"Object"},{"name":"side","type":"Side","description":"if provided, a target with a side matching *side* will see it replaced by `\"$\"`","type_expr":"Side"},{"name":"classname","type":"String","description":"`CfgVehicles` classname - if provided, a target with a type matching *classname* will see it replaced by `\"$\"`","type_expr":"String"},{"name":"position","type":"Position (Z-value is ignored)","description":"centre of a hardcoded 200m radius","type_expr":"Position"},{"name":"timeMax","type":"Number","description":"max age of the target","type_expr":"Number"},{"name":"candidates","type":"Array of Arrays with [accuracy, target, targetSide, targetType, targetPosition, targetAge]","description":"- accuracy: Number - a coefficient, which reflects how close the returned result to the query filter. Range: 0..1, 1 being the best match\n- target: Object - the actual target object\n- targetSide: Side - side of the target\n- targetType: String - target typeOf\n- targetPosition: Position2D - [x,y] of the target\n- targetAge: Number - the actual target age in seconds (can be negative)\n\n> [!NOTE]\n> See targetsQuery format.","type_expr":"Array<Array>","text":"candidates: Array of Arrays with [accuracy, target, targetSide, targetType, targetPosition, targetAge]\n\n- accuracy: Number - a coefficient, which reflects how close the returned result to the query filter. Range: 0..1, 1 being the best match\n- target: Object - the actual target object\n- targetSide: Side - side of the target\n- targetType: String - target typeOf\n- targetPosition: Position2D - [x,y] of the target\n- targetAge: Number - the actual target age in seconds (can be negative)\n\n> [!NOTE]\n> See targetsQuery format."}],"returns":{"type":"Array","type_expr":"Array","description":"with [countInfo, sideInfo, unitInfo, placeInfo, timeInfo, uCountInfo, uTypeInfo]\n- countInfo: Array - [format [\"COUNT%1\", index], count on index] - sideInfo: Array - [format [\"SIDE%1\", index], side or string] if string then $ == \"equal to queried\" - unitInfo: Array - [format [\"UNIT%1\", index], string] $ == \"equal to queried\", otherwise the \"type\" of the unit? Should be CfgVehicles config type I think - placeInfo: Array - [format [\"PLACE%1\", index], [[centerX, centerY], radius]] - timeInfo: Array - [format [\"TIME%1\", index], string or array] if string then $ == \"equal to queried\", otherwise [timeMin, timeMax] - uCountInfo: Array - [format [\"UCOUNT%1\", index], scalar count] - uTypeInfo: Array - [format [\"UTYPE%1\", index], string name] a classname? Will be format [\"*%1\", classname] if count > 1","text":"Array with [countInfo, sideInfo, unitInfo, placeInfo, timeInfo, uCountInfo, uTypeInfo]\n\n- countInfo: Array - [format [\"COUNT%1\", index], count on index]\n- sideInfo: Array - [format [\"SIDE%1\", index], side or string] if string then $ == \"equal to queried\"\n- unitInfo: Array - [format [\"UNIT%1\", index], string] $ == \"equal to queried\", otherwise the \"type\" of the unit? Should be CfgVehicles config type I think\n- placeInfo: Array - [format [\"PLACE%1\", index], [[centerX, centerY], radius]]\n- timeInfo: Array - [format [\"TIME%1\", index], string or array] if string then $ == \"equal to queried\", otherwise [timeMin, timeMax]\n- uCountInfo: Array - [format [\"UCOUNT%1\", index], scalar count]\n- uTypeInfo: Array - [format [\"UTYPE%1\", index], string name] a classname? Will be format [\"*%1\", classname] if count > 1"},"form":"binary","left":{"text":"[speaker, side, classname, position, timeMax]"},"right":{"text":"candidates"}}],"examples":[{"text":"```sqf\n_aggregation = [player, sideEnemy, \"\", [], 0] targetsAggregate (player targetsQuery [objNull, sideUnknown, \"\", [], 0]);\n/*\n    returns e.g\n    [\n        [\n            [\"COUNT0\", 1],\n            [\"SIDE0\", WEST],\n            [\"UNIT0\", \"B_Soldier_F\"],\n            [\"PLACE0\", [[<null>,<null>], 0, <null>]],\n            [\"TIME0\", [-0.9, -0.9]],\n            [\"UCOUNT0\", 1],\n            [\"UTYPE0\", ...\n        ]\n    ]\n*/\n```\n\nwith e.g\n\n- one Orca Helicopter\n- one T-100 Varsuk tank\n- one T-140K Angara tank\n- one MBT-52 Kuma tank (independent, set as enemy to blufor)\n\n```sqf\n/*\n    [\n        [[\"COUNT0\",1],[\"SIDE0\",EAST],[\"UNIT0\",\"O_Heli_Light_02_dynamicLoadout_F\"],[\"PLACE0\",[[<null>,<null>],0,<null>]],[\"TIME0\",[-0.982,-0.982]],[\"UCOUNT0\",1],[\"UTYPE0\",\"O_Heli_Light_02_dynamicLoadout_F\"]],\n        [[\"COUNT1\",1],[\"SIDE1\",GUER],[\"UNIT1\",\"I_MBT_03_cannon_F\"],[\"PLACE1\",[[<null>,<null>],0,<null>]],[\"TIME1\",[-0.982,-0.982]],[\"UCOUNT1\",1],[\"UTYPE1\",\"I_MBT_03_cannon_F\"]],\n        [[\"COUNT2\",2],[\"SIDE2\",EAST],[\"UNIT2\",\"*Tank_F\"],[\"PLACE2\",[[<null>,<null>],4.34554,<null>]],[\"TIME2\",[-0.982,-0.982]],[\"UCOUNT2\",2],[\"UTYPE2\",\"*O_MBT_02_cannon_F\"]]]\n    [\n        [[\"COUNT0\",1],[\"SIDE0\",EAST],[\"UNIT0\",\"O_Heli_Light_02_dynamicLoadout_F\"],[\"PLACE0\",[[<null>,<null>],0,<null>]],[\"TIME0\",[-1,-1]],[\"UCOUNT0\",1],[\"UTYPE0\",\"O_Heli_Light_02_dynamicLoadout_F\"]],\n        [[\"COUNT1\",1],[\"SIDE1\",GUER],[\"UNIT1\",\"I_MBT_03_cannon_F\"],[\"PLACE1\",[[<null>,<null>],0,<null>]],[\"TIME1\",[-1,-1]],[\"UCOUNT1\",1],[\"UTYPE1\",\"I_MBT_03_cannon_F\"]],\n        [[\"COUNT2\",2],[\"SIDE2\",EAST],[\"UNIT2\",\"*Tank_F\"],[\"PLACE2\",[[<null>,<null>],4.34565,<null>]],[\"TIME2\",[-1,-1]],[\"UCOUNT2\",2],[\"UTYPE2\",\"*O_MBT_02_cannon_F\"]]\n    ]\n*/\n```","code":["_aggregation = [player, sideEnemy, \"\", [], 0] targetsAggregate (player targetsQuery [objNull, sideUnknown, \"\", [], 0]);\n/*\n\treturns e.g\n\t[\n\t\t[\n\t\t\t[\"COUNT0\", 1],\n\t\t\t[\"SIDE0\", WEST],\n\t\t\t[\"UNIT0\", \"B_Soldier_F\"],\n\t\t\t[\"PLACE0\", [[<null>,<null>], 0, <null>]],\n\t\t\t[\"TIME0\", [-0.9, -0.9]],\n\t\t\t[\"UCOUNT0\", 1],\n\t\t\t[\"UTYPE0\", ...\n\t\t]\n\t]\n*/","/*\n\t[\n\t\t[[\"COUNT0\",1],[\"SIDE0\",EAST],[\"UNIT0\",\"O_Heli_Light_02_dynamicLoadout_F\"],[\"PLACE0\",[[<null>,<null>],0,<null>]],[\"TIME0\",[-0.982,-0.982]],[\"UCOUNT0\",1],[\"UTYPE0\",\"O_Heli_Light_02_dynamicLoadout_F\"]],\n\t\t[[\"COUNT1\",1],[\"SIDE1\",GUER],[\"UNIT1\",\"I_MBT_03_cannon_F\"],[\"PLACE1\",[[<null>,<null>],0,<null>]],[\"TIME1\",[-0.982,-0.982]],[\"UCOUNT1\",1],[\"UTYPE1\",\"I_MBT_03_cannon_F\"]],\n\t\t[[\"COUNT2\",2],[\"SIDE2\",EAST],[\"UNIT2\",\"*Tank_F\"],[\"PLACE2\",[[<null>,<null>],4.34554,<null>]],[\"TIME2\",[-0.982,-0.982]],[\"UCOUNT2\",2],[\"UTYPE2\",\"*O_MBT_02_cannon_F\"]]]\n\t[\n\t\t[[\"COUNT0\",1],[\"SIDE0\",EAST],[\"UNIT0\",\"O_Heli_Light_02_dynamicLoadout_F\"],[\"PLACE0\",[[<null>,<null>],0,<null>]],[\"TIME0\",[-1,-1]],[\"UCOUNT0\",1],[\"UTYPE0\",\"O_Heli_Light_02_dynamicLoadout_F\"]],\n\t\t[[\"COUNT1\",1],[\"SIDE1\",GUER],[\"UNIT1\",\"I_MBT_03_cannon_F\"],[\"PLACE1\",[[<null>,<null>],0,<null>]],[\"TIME1\",[-1,-1]],[\"UCOUNT1\",1],[\"UTYPE1\",\"I_MBT_03_cannon_F\"]],\n\t\t[[\"COUNT2\",2],[\"SIDE2\",EAST],[\"UNIT2\",\"*Tank_F\"],[\"PLACE2\",[[<null>,<null>],4.34565,<null>]],[\"TIME2\",[-1,-1]],[\"UCOUNT2\",2],[\"UTYPE2\",\"*O_MBT_02_cannon_F\"]]\n\t]\n*/"]}],"see_also":["targets","targetsQuery","nearTargets","targetKnowledge","knowsAbout","reveal","forgetTarget","setTargetAge","getHideFrom"]},{"name":"targetsQuery","title":"targetsQuery","type":"command","url":"https://community.bistudio.com/wiki/targetsQuery","revid":377711,"updated":"2026-01-02T09:03:51Z","groups":["Object Detection"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns sorted array of targets, **known** to the enquirer (including own troops), where the accuracy coefficient reflects how close the result matches the query. This command could be CPU intensive.","syntaxes":[{"syntax":"enquirer targetsQuery [targetIgnore, targetSide, targetType, targetPosition, targetMaxAge]","params":[{"name":"enquirer","type":"Object","description":"for whom the query will be made","type_expr":"Object"},{"name":"targetIgnore","type":"Object","description":"target object to exclude from results. objNull - return every target","type_expr":"Object"},{"name":"targetSide","type":"Side","description":"desired side of the target. sideUnknown - any side","type_expr":"Side"},{"name":"targetType","type":"String","description":"desired target typeOf. \"\" - any type","type_expr":"String"},{"name":"targetPosition","type":"Position2D or Position3D","description":"desired target position (only [x,y] is considered). Position tolerance is 200m from the actual position of the target. [] - any position","type_expr":"Position2D | Position3D"},{"name":"targetMaxAge","type":"Number","description":"desired max age of the target. This will limit returned results to the targets younger than specified age. 0 - any age","type_expr":"Number"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [accuracy, target, targetSide, targetType, targetPosition, targetAge]\n- accuracy: Number in range 0..1 - a coefficient, which reflects how close the returned result to the query filter. (1 - best match) - target: Object - the actual target object - targetSide: Side - side of the target - targetType: String - target typeOf - targetPosition: Array - [x,y] of the target - targetAge: Number - the actual target age in seconds (can be negative)","text":"Array of Arrays with [accuracy, target, targetSide, targetType, targetPosition, targetAge]\n\n- accuracy: Number in range 0..1 - a coefficient, which reflects how close the returned result to the query filter. (1 - best match)\n- target: Object - the actual target object\n- targetSide: Side - side of the target\n- targetType: String - target typeOf\n- targetPosition: Array - [x,y] of the target\n- targetAge: Number - the actual target age in seconds (can be negative)"},"form":"binary","left":{"text":"enquirer"},"right":{"text":"[targetIgnore, targetSide, targetType, targetPosition, targetMaxAge]"}}],"examples":[{"text":"Return all known targets for player:\n\n```sqf\n_targets = player targetsQuery [objNull, sideUnknown, \"\", [], 0];\n```","code":["_targets = player targetsQuery [objNull, sideUnknown, \"\", [], 0];"]},{"text":"Prioritise all known OPFOR targets and return targets less than 10 seconds old:\n\n```sqf\n_targets = player targetsQuery [objNull, east, \"\", [], 10];\n```","code":["_targets = player targetsQuery [objNull, east, \"\", [], 10];"]}],"see_also":["targets","nearTargets","targetsAggregate","targetKnowledge","knowsAbout","reveal","forgetTarget","setTargetAge","getHideFrom"]},{"name":"taskAlwaysVisible","title":"taskAlwaysVisible","type":"command","url":"https://community.bistudio.com/wiki/taskAlwaysVisible","revid":339143,"updated":"2023-04-26T10:55:03Z","groups":["Briefing"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns true if the task is flagged to be always visible or false if not.","syntaxes":[{"syntax":"taskAlwaysVisible task","params":[{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["_isAlwaysVisible = taskAlwaysVisible (currentTask player);"]}],"see_also":["setSimpleTaskAlwaysVisible","taskType","BIS_fnc_taskSetAlwaysVisible","BIS_fnc_taskAlwaysVisible","Arma 3: Task Framework"]},{"name":"taskChildren","title":"taskChildren","type":"command","url":"https://community.bistudio.com/wiki/taskChildren","revid":377724,"updated":"2026-01-02T09:28:47Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return the child tasks of the specified task.","syntaxes":[{"syntax":"taskChildren task","params":[{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"Array of Tasks","type_expr":"Array<Task>"},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["_children = taskChildren someTask;"]}],"see_also":["BIS_fnc_taskCreate","BIS_fnc_taskCurrent","BIS_fnc_taskExists","BIS_fnc_taskParent","BIS_fnc_taskType","BIS_fnc_taskTypeIcon","BIS_fnc_taskVar","Arma 3: Task Framework"]},{"name":"taskCompleted","title":"taskCompleted","type":"command","url":"https://community.bistudio.com/wiki/taskCompleted","revid":376412,"updated":"2025-10-11T01:03:52Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return if task is completed. (state Succeeded, Failed or Canceled)","syntaxes":[{"syntax":"taskCompleted task","params":[{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if task has been Succeeded, Failed or Canceled"},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["_task = player createSimpleTask [\"task_1\"];\n_done = taskCompleted _task;"]}],"see_also":["BIS_fnc_deleteTask","BIS_fnc_setTask","BIS_fnc_setTaskLocal","BIS_fnc_sharedObjectives","BIS_fnc_taskAlwaysVisible","BIS_fnc_taskCompleted","BIS_fnc_taskCreate","BIS_fnc_taskCurrent","BIS_fnc_taskDescription","BIS_fnc_taskDestination","BIS_fnc_taskExists","BIS_fnc_taskHint","BIS_fnc_taskParent","BIS_fnc_taskReal","BIS_fnc_taskSetAlwaysVisible","BIS_fnc_taskSetCurrent","BIS_fnc_taskSetDescription","BIS_fnc_taskSetDestination","BIS_fnc_taskSetState","BIS_fnc_taskSetType","BIS_fnc_taskState","BIS_fnc_tasksUnit","BIS_fnc_taskType","BIS_fnc_taskTypeIcon","BIS_fnc_taskVar","Arma 3: Task Framework"]},{"name":"taskCustomData","title":"taskCustomData","type":"command","url":"https://community.bistudio.com/wiki/taskCustomData","revid":379308,"updated":"2026-10-30T23:49:14Z","groups":["Briefing"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns custom data attached to the local task or an empty array if there are no custom data attached.","syntaxes":[{"syntax":"taskCustomData task","params":[{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"iconPath, iconText, descriptionText"},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["_data = taskCustomData someTask;"]}],"see_also":["setSimpleTaskCustomData","setSimpleTaskType","taskType","Arma 3: Task Framework"]},{"name":"taskDescription","title":"taskDescription","type":"command","url":"https://community.bistudio.com/wiki/taskDescription","revid":378417,"updated":"2026-04-04T08:44:52Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the sub-parts of the task description.","syntaxes":[{"syntax":"taskDescription task","params":[{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"Array","type_expr":"Array","description":"with [description, title, waypoint]\n- description: String - title: String - waypoint: Waypoint","text":"Array with [description, title, waypoint]\n\n- description: String\n- title: String\n- waypoint: Waypoint"},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["_taskDescArray = taskDescription _task;"]}],"see_also":["setSimpleTaskDescription","createSimpleTask"],"notes":[{"user":"Tajin","date":"2014-11-14T19:48:00Z","text":"Be careful if you want to use this to retrieve the title of a task.\nIf the task has no description set, then \"taskDescription\" will only return an array of empty Strings.\nTherefore always use setSimpleTaskDescription directly after creating a new task, even if you set the Description to \"\"."}]},{"name":"taskDestination","title":"taskDestination","type":"command","url":"https://community.bistudio.com/wiki/taskDestination","revid":349537,"updated":"2023-11-08T17:18:22Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the position of the task (as specified by destination parameter in config).","syntaxes":[{"syntax":"taskDestination task","params":[{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"Array","type_expr":"Array","description":"(A3 1.28 Returns Nothing if identity is taskNull)","text":"Array (A3 1.28 Returns Nothing if identity is taskNull)"},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["if (!isNull currentTask player) then { hint str taskDestination currentTask player };"]}],"see_also":["cancelSimpleTaskDestination","setSimpleTaskDestination"]},{"name":"taskHint","title":"taskHint","type":"command","url":"https://community.bistudio.com/wiki/taskHint","revid":377725,"updated":"2026-01-02T09:36:56Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Shows info about new, changed or failed task. The text can contain several lines. `\\n` is used to set a line return.\n\n> [!NOTE]\n> **Arma 3:** It is recommended to use BIS_fnc_showNotification in order to maintain Arma 3's visual style.","syntaxes":[{"syntax":"taskHint [text, color, icon]","params":[{"name":"text","type":"String","type_expr":"String"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"},{"name":"icon","type":"String","description":"one of:\n\n- \"taskNew\"\n- \"taskCurrent\"\n- \"taskDone\"\n- \"taskFailed\"","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[text, color, icon]"}}],"examples":[{"code":["taskHint [\"Task failed.\\nBad job!\", [1, 0, 0, 1], \"taskFailed\"];"]}],"see_also":["BIS_fnc_showNotification","Task"],"notes":[{"user":"Kylania","date":"2011-07-15T03:37:00Z","text":"Here are the BIS colors:\n\n```sqf\ntaskHint [\"New Task!\\nHere's your new task!\",    [1, 1, 1, 1],                    \"taskNew\"];\ntaskHint [\"Task Assigned!\\nDo this now!\",        [1, 1, 1, 1],                    \"taskCurrent\"];\ntaskHint [\"Task Succeeded!\\nGood job!\",            [0.60,0.839215,0.466666,1],        \"taskDone\"];\ntaskHint [\"Task Failed!\\nBad job!\",                [0.972549,0.121568,0,1],        \"taskFailed\"];\ntaskHint [\"Task Canceled!\\nNever mind!\",        [0.75,0.75,0.75,1],                \"taskFailed\"];\n```"}]},{"name":"taskMarkerOffset","title":"taskMarkerOffset","type":"command","url":"https://community.bistudio.com/wiki/taskMarkerOffset","revid":319857,"updated":"2022-05-13T09:25:36Z","groups":["Briefing"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns model space position for the task marker","syntaxes":[{"syntax":"taskMarkerOffset unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"offset in format [x, y, z]"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_offset = taskMarkerOffset player;"]}],"see_also":["setTaskMarkerOffset"]},{"name":"taskName","title":"taskName","type":"command","url":"https://community.bistudio.com/wiki/taskName","revid":310323,"updated":"2022-05-05T16:32:29Z","groups":["Briefing"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","description":"Returns the name of the given task.","syntaxes":[{"syntax":"taskName task","params":[{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"String","type_expr":"String","description":"task name"},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["private _taskName = taskName _mytask;"]}],"see_also":["taskType","createSimpleTask"]},{"name":"taskNull","title":"taskNull","type":"command","url":"https://community.bistudio.com/wiki/taskNull","revid":369300,"updated":"2024-09-03T18:42:52Z","groups":["Briefing","Variables"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"A non-existing Task. To compare non-existent tasks use isNull or isEqualTo:\n\n```sqf\ntaskNull == taskNull;            // false\nisNull taskNull;                // true\ntaskNull isEqualTo taskNull;    // true\n```","syntaxes":[{"syntax":"taskNull","params":[],"returns":{"type":"Task","type_expr":"Task"},"form":"nullary"}],"examples":[{"code":["!isNull taskNull; // false"]},{"code":["str taskNull; // no task"]}],"see_also":["controlNull","displayNull","grpNull","locationNull","objNull","teamMemberNull","scriptNull","configNull","typeName","isNull"]},{"name":"taskParent","title":"taskParent","type":"command","url":"https://community.bistudio.com/wiki/taskParent","revid":376362,"updated":"2025-10-07T21:43:45Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the parent task of the specified task.","syntaxes":[{"syntax":"taskParent task","params":[{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"Task","type_expr":"Task"},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["_parent = taskParent someTask;"]}],"see_also":["taskChildren"]},{"name":"taskResult","title":"taskResult","type":"command","url":"https://community.bistudio.com/wiki/taskResult","revid":319905,"updated":"2022-05-13T09:25:42Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Send a result of the task to the task sender.","syntaxes":[{"syntax":"taskResult task","params":[{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"Array","type_expr":"Array","description":"format [state, result] (see setTaskResult)"},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["taskResult (player createSimpleTask [\"NewTask\"]);"]}],"see_also":["setTaskResult"]},{"name":"taskState","title":"taskState","type":"command","url":"https://community.bistudio.com/wiki/taskState","revid":320998,"updated":"2022-05-13T10:30:31Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the current state of a task.","syntaxes":[{"syntax":"taskState task","params":[{"name":"task","type":"Task","description":"the task you want to query","type_expr":"Task"}],"returns":{"type":"String","type_expr":"String","description":"current state of task - can be one of:\n- \"None\" - \"Created\" - \"Assigned\" - \"Succeeded\" - \"Failed\" - \"Canceled\"","text":"String - current state of task - can be one of:\n\n- \"None\"\n- \"Created\"\n- \"Assigned\"\n- \"Succeeded\"\n- \"Failed\"\n- \"Canceled\""},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["tskSomeTask = player createSimpleTask [\"NewTask\"];\nhint format[\"Taskstate: %1\", taskState tskSomeTask];"]}],"see_also":["Tasks","createSimpleTask","removeSimpleTask","setSimpleTaskDescription","setSimpleTaskDestination","setTaskResult","setTaskState"]},{"name":"taskType","title":"taskType","type":"command","url":"https://community.bistudio.com/wiki/taskType","revid":339088,"updated":"2023-04-26T10:54:07Z","groups":["Briefing"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns the type of the given task. A new task returns \"Default\" for the type.","syntaxes":[{"syntax":"taskType task","params":[{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["_type = taskType (currentTask player);"]}],"see_also":["setSimpleTaskType","taskName","currentTask","setSimpleTaskCustomData","taskCustomData","Arma 3: Task Framework"]},{"name":"teamMember","title":"teamMember","type":"command","url":"https://community.bistudio.com/wiki/teamMember","revid":320997,"updated":"2022-05-13T10:29:17Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return an agent for given person.","syntaxes":[{"syntax":"teamMember person","params":[{"name":"person","type":"Object","type_expr":"Object"}],"returns":{"type":"Team Member","type_expr":"Team Member"},"form":"unary","right":{"text":"person"}}],"examples":[{"code":["_agent = teamMember player;"]}],"see_also":["addTeamMember","createTeam","deleteTeam","forEachMemberTeam","removeTeamMember","teamName","teams","teamType","forEachMember","forEachMemberAgent"]},{"name":"teamMemberNull","title":"teamMemberNull","type":"command","url":"https://community.bistudio.com/wiki/teamMemberNull","revid":330231,"updated":"2022-08-27T14:58:59Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"A non-existent Team Member. To compare non-existent team members use isNull or isEqualTo:\n\n```sqf\nteamMemberNull == teamMemberNull;            // false\nisNull teamMemberNull;                        // true\nteamMemberNull isEqualTo teamMemberNull;    // true\n```","syntaxes":[{"syntax":"teamMemberNull","params":[],"returns":{"type":"Team Member","type_expr":"Team Member"},"form":"nullary"}],"examples":[{"code":["!isNull teamMemberNull; // false"]},{"code":["str teamMemberNull; // <NULL - team member>"]},{"text":"```sqf\nif (_teamMember isEqualTo teamMemberNull) then\n{\n    hint \"team member is null\";\n};\n```","code":["if (_teamMember isEqualTo teamMemberNull) then\n{\n\thint \"team member is null\";\n};"]}],"see_also":["addTeamMember","createTeam","deleteTeam","forEachMemberTeam","removeTeamMember","teamMember","teamName","teams","teamType","controlNull","displayNull","grpNull","locationNull","objNull","taskNull","scriptNull","configNull","typeName","isNull"]},{"name":"teamName","title":"teamName","type":"command","url":"https://community.bistudio.com/wiki/teamName","revid":310870,"updated":"2022-05-07T20:24:10Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return a name of given team.","syntaxes":[{"syntax":"teamName team","params":[{"name":"team","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"team"}}],"examples":[{"code":["_name = teamName _team;"]}],"see_also":["addTeamMember","createTeam","deleteTeam","forEachMemberTeam","removeTeamMember","teamMember","teams","teamType","forEachMember","forEachMemberAgent"]},{"name":"teams","title":"teams","type":"command","url":"https://community.bistudio.com/wiki/teams","revid":377122,"updated":"2026-01-01T10:19:31Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return a list of teams in the current mission.","syntaxes":[{"syntax":"teams","params":[],"returns":{"type":"Array of Team Members","type_expr":"Array<Team Member>"},"form":"nullary"}],"examples":[{"code":["_teams = teams;"]}],"see_also":["agents","addTeamMember","createTeam","deleteTeam","forEachMemberTeam","removeTeamMember","teamMember","teamName","teamType","forEachMember","forEachMemberAgent"]},{"name":"teamSwitch","title":"teamSwitch","type":"command","url":"https://community.bistudio.com/wiki/teamSwitch","revid":351299,"updated":"2023-11-27T03:59:30Z","groups":["Team Switch"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Invoke the Team Switch dialog (force it even when conditions are not met).\nThere has to be at least one playable unit for team switch to work, and for this command to work in MP, respawn type in description.ext should be 5 (SIDE).\n\n> [!NOTE]\n> When player switches and leaves behind AI unit, you need to enable \"TeamSwitch\" AI on it `_unit enableAI \"TeamSwitch\"` so that the unit continues with waypoints.","syntaxes":[{"syntax":"teamSwitch","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["teamSwitch;"]}],"see_also":["Team Switch","enableTeamSwitch","onBriefingTeamSwitch","onTeamSwitch","teamSwitchEnabled","selectPlayer"]},{"name":"teamSwitchEnabled","title":"teamSwitchEnabled","type":"command","url":"https://community.bistudio.com/wiki/teamSwitchEnabled","revid":351297,"updated":"2023-11-27T03:58:49Z","groups":["Team Switch"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Check if Team Switch is currently enabled.\nTeam Switch is enabled by default.","syntaxes":[{"syntax":"teamSwitchEnabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_isTeamSwitchEnabled = teamSwitchEnabled;"]}],"see_also":["Team Switch","enableTeamSwitch","onBriefingTeamSwitch","onTeamSwitch","teamSwitch"]},{"name":"teamType","title":"teamType","type":"command","url":"https://community.bistudio.com/wiki/teamType","revid":320996,"updated":"2022-05-13T10:29:03Z","groups":["Teams"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns a type of given team.","syntaxes":[{"syntax":"teamType team","params":[{"name":"team","type":"Team Member","type_expr":"Team Member"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"team"}}],"examples":[{"code":["_type = teamType _team;"]}],"see_also":["addTeamMember","createTeam","deleteTeam","forEachMemberTeam","removeTeamMember","teamMember","teamName","teams","forEachMember","forEachMemberAgent"]},{"name":"terminate","title":"terminate","type":"command","url":"https://community.bistudio.com/wiki/terminate","revid":376945,"updated":"2025-12-31T22:54:37Z","groups":["Program Flow"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Terminates (aborts) spawned or execVMed script.\n\n> [!IMPORTANT]\n> The given script will not terminate immediately upon terminate command execution, it will do so the next time the script is processed by the scheduler","syntaxes":[{"syntax":"terminate scriptHandle","params":[{"name":"scriptHandle","type":"Script Handle","type_expr":"Script Handle"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"scriptHandle"}},{"syntax":"terminate FSMHandle","since":"arma3 2.18","params":[{"name":"FSMHandle","type":"Number","description":"The FSM script must be launched with 'allowTermination' flag for this command to work (see execFSM).","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"FSMHandle"}},{"syntax":"scriptHandle terminate result","since":"arma3 2.22","params":[{"name":"scriptHandle","type":"Script Handle","description":"Only \"Empty Handle\"'s can have their result set.","type_expr":"Script Handle"},{"name":"result","type":"Anything","description":"The result to write into the Promise","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"scriptHandle"},"right":{"text":"result"}}],"examples":[{"code":["_script = [] execVM \"script.sqf\";\nsleep 5;\nterminate _script;"]}],"see_also":["execVM","spawn","scriptDone","halt","execFSM"]},{"name":"terrainIntersect","title":"terrainIntersect","type":"command","url":"https://community.bistudio.com/wiki/terrainIntersect","revid":377407,"updated":"2026-01-02T06:45:07Z","groups":["Math - Geometry"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Checks for intersection of terrain between two AGL positions. Returns true if intersects with terrain. For ASL variant see terrainIntersectASL.","syntaxes":[{"syntax":"terrainIntersect [start, end]","params":[{"name":"start","type":"PositionAGL","description":"start position","type_expr":"PositionAGL"},{"name":"end","type":"PositionAGL","description":"end position","type_expr":"PositionAGL"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"[start, end]"}}],"examples":[{"code":["_intersects = terrainIntersect [getPos player, getPos chopper];"]},{"code":["_intersects = terrainIntersect [position player, position enemy1];"]}],"see_also":["terrainIntersectAtASL","lineIntersectsSurfaces","intersect","lineIntersects","lineIntersectsWith","terrainIntersectASL","lineIntersectsObjs","checkVisibility"],"notes":[{"user":"Lou Montana","date":"2012-05-31T10:40:00Z","text":"Please note the difference:\n\n- terrainIntersect\n- terrainIntersectASL\n- lineIntersect***s***\n- lineIntersect***s***With\n- lineIntersect***s***Objs\n- intersect"},{"user":"Rocket","date":"2012-06-01T15:55:00Z","text":"This command is CPU intensive on the engine, be careful with its use."},{"user":"Dwarden","date":"2012-06-23T17:15:00Z","text":"This command was changed to ATL and counterpart for ASL was added in build 94049."}]},{"name":"terrainIntersectASL","title":"terrainIntersectASL","type":"command","url":"https://community.bistudio.com/wiki/terrainIntersectASL","revid":377458,"updated":"2026-01-02T06:47:25Z","groups":["Math - Geometry"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Checks for intersection of terrain between two ASL positions. Returns true if intersects with terrain.\nFor AGL variant, see terrainIntersect.","syntaxes":[{"syntax":"terrainIntersectASL [start, end]","params":[{"name":"start","type":"PositionASL","description":"start position","type_expr":"PositionASL"},{"name":"end","type":"PositionASL","description":"end position","type_expr":"PositionASL"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"[start, end]"}}],"examples":[{"code":["_intersects = terrainIntersectASL [getPosASL player, getPosASL chopper];"]},{"code":["_intersects = terrainIntersectASL [eyePos player, eyePos enemy1];"]}],"see_also":["terrainIntersectAtASL","lineIntersectsSurfaces","intersect","lineIntersects","lineIntersectsWith","terrainIntersect","lineIntersectsObjs","checkVisibility"],"notes":[{"user":"Lou Montana","date":"2012-05-31T10:40:00Z","text":"Please note the difference:\n\n- terrainIntersect\n- terrainIntersectASL\n- lineIntersect***s***\n- lineIntersect***s***With\n- lineIntersect***s***Objs\n- intersect"},{"user":"Rocket","date":"2012-06-01T15:55:00Z","text":"This command is CPU intensive on the engine, be careful with its use."},{"user":"bloodwyn1756","date":"2019-03-02T20:29:00Z","text":"If one of the two positions is below sea level, the command always returns true."}]},{"name":"terrainIntersectAtASL","title":"terrainIntersectAtASL","type":"command","url":"https://community.bistudio.com/wiki/terrainIntersectAtASL","revid":377440,"updated":"2026-01-02T06:46:49Z","groups":["Math - Geometry"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"Checks for intersection of terrain between two ASL positions. Same as terrainIntersectASL but returns the intersection ASL position.","syntaxes":[{"syntax":"terrainIntersectAtASL [start, end]","params":[{"name":"start","type":"PositionASL","description":"start position","type_expr":"PositionASL"},{"name":"end","type":"PositionASL","description":"end position","type_expr":"PositionASL"}],"returns":{"type":"PositionASL","type_expr":"PositionASL","description":"intersect position"},"form":"unary","right":{"text":"[start, end]"}}],"examples":[{"code":["_posASL = terrainIntersectAtASL [eyePos player, getPosASL chopper];"]}],"see_also":["terrainIntersectASL","lineIntersectsSurfaces","intersect","lineIntersects","lineIntersectsWith","terrainIntersect","lineIntersectsObjs","checkVisibility"],"notes":[{"user":"POLPOX","date":"2023-12-10T08:55:23Z","text":"This command will tell you that it finds an intersect if either of argument position is under the sea eg `[0,0,-10]` even if there is no clear intersection with a terrain surface between them."}]},{"name":"text","title":"text","type":"command","url":"https://community.bistudio.com/wiki/text","revid":320624,"updated":"2022-05-13T09:38:21Z","groups":["Locations","Strings","Structured Text"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Creates a structured text containing the given plain text if argument is String. Use setAttributes to set additional attributes on the text. If the argument is location, returns location's text value (see Alt Syntax).","syntaxes":[{"syntax":"text string","params":[{"name":"string","type":"String","type_expr":"String"}],"returns":{"type":"Structured Text","type_expr":"Structured Text"},"form":"unary","right":{"text":"string"}},{"syntax":"text location","params":[{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"location"}}],"examples":[{"code":["_stxt2 = text \"Hello world.\";"]},{"code":["_townName = text myTownLocation;"]},{"code":["_loc = text nearestLocation [position player, \"NameMarine\"]; //\"Marina Bay\""]}],"see_also":["parseText","composeText","image","lineBreak","setText","createLocation","deleteLocation","drawLocation","locationPosition","locationNull","nearestLocation","nearestLocations","nearestLocationWithDubbing","name"]},{"name":"textLog","title":"textLog","type":"command","url":"https://community.bistudio.com/wiki/textLog","revid":352200,"updated":"2024-02-01T23:26:02Z","groups":["Broken Commands"],"status":"broken","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Dump argument value to debugging output.\n\n> [!WARNING]\n> This command is non-functional in the retail version","syntaxes":[{"syntax":"textLog anything","params":[{"name":"anything","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"anything"}}],"examples":[{"code":["textLog player;"]}],"see_also":["diag_log"]},{"name":"textLogFormat","title":"textLogFormat","type":"command","url":"https://community.bistudio.com/wiki/textLogFormat","revid":363577,"updated":"2024-04-07T14:40:20Z","groups":["Broken Commands"],"status":"broken","games":{"arma2":"1.05","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.05","arma3_since":"0.50","description":"Debugging output.\n\n> [!WARNING]\n> This command is non-functional in the retail version","syntaxes":[{"syntax":"textLogFormat [format, arg1, arg2, argN]","params":[{"name":"format","type":"String","type_expr":"String"},{"name":"arg1","type":"Anything","type_expr":"Anything"},{"name":"arg2","type":"Anything","type_expr":"Anything"},{"name":"argN","type":"Anything","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[format, arg1, arg2, argN]"}}],"examples":[{"text":"-"}],"see_also":["diag_log","BIS_fnc_log","BIS_fnc_logFormat"]},{"name":"tg","title":"tg","type":"command","url":"https://community.bistudio.com/wiki/tg","revid":319798,"updated":"2022-05-13T09:25:29Z","groups":["Math - Geometry"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Identical to tan","syntaxes":[{"syntax":"tg x","params":[{"name":"x","type":"Number","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"x"}}],"examples":[{"code":["_tangent = tg 45; // Result is 1"]}],"see_also":["tan","sin","cos"]},{"name":"then","title":"then","type":"command","url":"https://community.bistudio.com/wiki/then","revid":351752,"updated":"2024-01-03T10:15:29Z","groups":["Program Flow"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Links an If Type with Code to be executed if said If Type's condition is true; otherwise, \"else\" code is executed if provided.\nThe alternative syntax allows to set \"then\" code and \"else\" code in one array.\n\n> [!NOTE]\n> Variables declared inside *thenCode* are private to that code block - see Variables - Local Variables Scope.","syntaxes":[{"syntax":"ifType then thenCode","params":[{"name":"ifType","type":"If Type","type_expr":"If Type"},{"name":"thenCode","type":"Code or Array of Code:","description":"Code or Array of Code:\n\n- Code - code block to execute if *ifType*'s condition is true\n- Array of Code - array of two Code elements in format [thenCode, elseCode]; see Example 3","type_expr":"Code | Array<Code>","text":"thenCode: Code or Array of Code:\n\n- Code - code block to execute if *ifType*'s condition is true\n- Array of Code - array of two Code elements in format [thenCode, elseCode]; see Example 3"}],"returns":{"type":"Anything","type_expr":"Anything","description":"result of the executed code"},"form":"binary","left":{"text":"ifType"},"right":{"text":"thenCode"}}],"examples":[{"code":["if (a > b) then { hint \"a is greater than b!\"; };"]},{"text":"```sqf\nprivate _c = 0;\nif (_a > _b) then\n{\n    _c = 1;\n}\nelse\n{\n    _c = 2;\n};\n```","code":["private _c = 0;\nif (_a > _b) then\n{\n\t_c = 1;\n}\nelse\n{\n\t_c = 2;\n};"]},{"code":["if (alive player) then [{ hint \"player is alive\"; }, { hint \"player is dead\"; }];"]},{"code":["private _value = if (alive player) then { 1 } else { 0 };"]}],"see_also":["Control Structures","if","else"]},{"name":"throw","title":"throw","type":"command","url":"https://community.bistudio.com/wiki/throw","revid":377911,"updated":"2026-01-07T16:33:15Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Throws an exception. The exception is processed by first catch block. This command will terminate further execution of the code.\n\n> [!IMPORTANT]\n> Avoid using alternative shorthand syntax if you are planning on preparing your exception information dynamically, as it will have to be generated first regardless of the condition of the if statement before it, as shown in Example 3.","syntaxes":[{"syntax":"throw exception","params":[{"name":"exception","type":"Anything","description":"value that is put into the `_exception` variable inside catch block","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"exception"}},{"syntax":"ifType throw exception","since":"arma3 1.54","params":[{"name":"ifType","type":"If Type","description":"if the condition returns true, *exception* is thrown","type_expr":"If Type"},{"name":"exception","type":"Anything","description":"value that is put into the `_exception` variable inside catch block","type_expr":"Anything"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ifType"},"right":{"text":"exception"}}],"examples":[{"code":["try { throw \"invalid argument\" } catch { hint str _exception };"]},{"code":["123 try { if (_this != 123) throw \"invalid argument\" } catch { hint str _exception };"]},{"text":"The correct usage of shorthand alt syntax:\n\n```sqf\ntry\n{\n    if (a > b)\n        throw \"Error: some error\";                // OK - the command argument is static\n}\ncatch\n{\n    hint str _exception;\n};\n```\n\n```sqf\ntry\n{\n    if (a > b)\n        throw (call _someFunc);                    // NOT OK - the command argument is dynamic\n        // _someFunc is called first to get the value regardless of (a > b) outcome\n}\ncatch\n{\n    hint str _exception;\n};\n```\n\n```sqf\ntry\n{\n    if (a > b) then { throw (call _someFunc) };    // OK - the command argument is dynamic\n    // _someFunc is only called when (a > b) is true\n}\ncatch\n{\n    hint str _exception;\n};\n```","code":["try\n{\n\tif (a > b)\n\t\tthrow \"Error: some error\";\t\t\t\t// OK - the command argument is static\n}\ncatch\n{\n\thint str _exception;\n};","try\n{\n\tif (a > b)\n\t\tthrow (call _someFunc);\t\t\t\t\t// NOT OK - the command argument is dynamic\n\t\t// _someFunc is called first to get the value regardless of (a > b) outcome\n}\ncatch\n{\n\thint str _exception;\n};","try\n{\n\tif (a > b) then { throw (call _someFunc) };\t// OK - the command argument is dynamic\n\t// _someFunc is only called when (a > b) is true\n}\ncatch\n{\n\thint str _exception;\n};"]}],"see_also":["Exception handling","try","catch"]},{"name":"throwables","title":"throwables","type":"command","url":"https://community.bistudio.com/wiki/throwables","revid":377684,"updated":"2026-01-02T09:02:52Z","groups":["Weapons","Unit Inventory"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Returns all throwables in unit inventory in currentThrowable format.","syntaxes":[{"syntax":"throwables unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [magazineName, muzzleName, id, ammoCount]\n- magazineName: String - muzzleName: String - id: Array with [itemWorldID, creatorID] - itemWorldID: Number - unique ID of the item in the world - creatorID: Number - unique ID of the player who created the item - ammoCount: Number magazine ammo (Since Arma 3 2.22)","text":"Array of Arrays with [magazineName, muzzleName, id, ammoCount]\n\n- magazineName: String\n- muzzleName: String\n- id: Array with [itemWorldID, creatorID]\n  - itemWorldID: Number - unique ID of the item in the world\n  - creatorID: Number - unique ID of the player who created the item\n- ammoCount: Number magazine ammo (Since Arma 3 2.22)"},"form":"unary","right":{"text":"unit"}},{"syntax":"throwables [unit, includeEmpty]","since":"arma3 2.22","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"includeEmpty","type":"Boolean","optional":true,"default":"false","description":"when true returns empty throwables as well.","type_expr":"Boolean","text":"includeEmpty: Boolean - (Optional, default: false) when true returns empty throwables as well."}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [magazineName, muzzleName, id, ammoCount]\n- magazineName: String - muzzleName: String - id: Array with [itemWorldID, creatorID] - itemWorldID: Number - unique ID of the item in the world - creatorID: Number - unique ID of the player who created the item - ammoCount: Number magazine ammo (Since Arma 3 2.22)","text":"Array of Arrays with [magazineName, muzzleName, id, ammoCount]\n\n- magazineName: String\n- muzzleName: String\n- id: Array with [itemWorldID, creatorID]\n  - itemWorldID: Number - unique ID of the item in the world\n  - creatorID: Number - unique ID of the player who created the item\n- ammoCount: Number magazine ammo (Since Arma 3 2.22)"},"form":"unary","right":{"text":"[unit, includeEmpty]"}}],"examples":[{"text":"```sqf\nthrowables player;\n/*\n    [\n        [\"HandGrenade\",\"HandGrenadeMuzzle\",[1e+007,0],1],\n        [\"SmokeShell\",\"SmokeShellMuzzle\",[1e+007,0],1],\n        [\"SmokeShellGreen\",\"SmokeShellGreenMuzzle\",[1e+007,0],1],\n        [\"Chemlight_green\",\"ChemlightGreenMuzzle\",[1e+007,0],1],\n        [\"Chemlight_green\",\"\",[1e+007,0],1],\n        [\"HandGrenade\",\"\",[1e+007,0],1]\n    ]\n*/\n```","code":["throwables player;\n/*\n\t[\n\t\t[\"HandGrenade\",\"HandGrenadeMuzzle\",[1e+007,0],1],\n\t\t[\"SmokeShell\",\"SmokeShellMuzzle\",[1e+007,0],1],\n\t\t[\"SmokeShellGreen\",\"SmokeShellGreenMuzzle\",[1e+007,0],1],\n\t\t[\"Chemlight_green\",\"ChemlightGreenMuzzle\",[1e+007,0],1],\n\t\t[\"Chemlight_green\",\"\",[1e+007,0],1],\n\t\t[\"HandGrenade\",\"\",[1e+007,0],1]\n\t]\n*/"]}],"see_also":["selectThrowable","currentThrowable","isThrowable","selectWeapon","currentWeapon","currentMagazine","currentMuzzle","BIS_fnc_isThrowable"]},{"name":"time","title":"time","type":"command","url":"https://community.bistudio.com/wiki/time","revid":379479,"updated":"2026-10-31T00:12:00Z","groups":["Time","Mission Information"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns time elapsed since mission started (in seconds). The value is different on each client. If you need unified time, use serverTime. Unlike uiTime the time stops when game is paused.","syntaxes":[{"syntax":"time","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["private _future = time + 30;\nwaitUntil { time >= _future };  // continue after 30 seconds"]},{"text":"Wait until mission fully started:\n\n```sqf\nwaitUntil { time > 0 };\n```","code":["waitUntil { time > 0 };"]}],"see_also":["uiTime","sleep","date","dayTime","serverTime","skipTime","accTime","dateToNumber","timeMultiplier","setTimeMultiplier","missionStart","diag_tickTime","diag_deltaTime","systemTime","systemTimeUTC","BIS_fnc_timeToString"],"notes":[{"user":"Hardrock","date":"2006-08-04T12:02:00Z","text":"*Notes from before the conversion:*\nNot to be confused with the **SQS** variable *_time*. Within an **SQS** script, the reserved local variable *_time* returns the time elapsed since the script started running. Note that the value of _time is not saved when the mission is saved and so will be reset to zero when a mission is restarted from a saved position. The value of time is saved correctly and will resume from where it was.\n\n*_time* has only special meaning in SQS scripts, in SQF script it is just another variable. --Killzone_Kid"},{"user":"Giova","date":"2007-01-05T12:24:00Z","text":"*Notes from before the conversion:*\ntime works properly in sqf called with execVM command. In an other hand, _time does not works in sqf called with execVM command.(Arma v1.02.5103GER)"},{"user":"TeaCup","date":"2010-10-02T12:02:00Z","text":"On overloaded servers (below ~10 server FPS), time readings are unreliable. Seconds actually take longer. While the clients keep a steady tempo, server time lags behind, resulting in considerable offset between client and server time (easily 30 minutes for a 2 hour game). Client time is synchronised to server time during JIP, but other than that it runs independently."},{"user":"Dr_Eyeball","date":"2013-10-30T00:00:00Z","text":"**Arma 3 JIP bug:**\nAs of Arma 3 v1.02, for JIP clients 'time' value will start off counting from 0, not the real 'time' value. After about 2.5sec (on average), it will then jump to a high value and synchronise with the real 'time' value, which could be 900, for example.\n\nTherefore, do not use 'time' for any start of mission init timeouts; it is unreliable. (It's odd that it doesn't synchronise at the same time as public variables.)"},{"user":"Demellion","date":"2016-09-01T18:18:00Z","text":"**In MP**: Since per-client time and server time is unconsistant I strongly recommend execution of time-critical tasks from server-side scripts and with remoteExec or remoteExecCall (**Since only A3 1.50** alternative may be publicVariableClient with pre-defined handler) as this will eliminate any time calculation lags and make it reliable."}]},{"name":"timeMultiplier","title":"timeMultiplier","type":"command","url":"https://community.bistudio.com/wiki/timeMultiplier","revid":310775,"updated":"2022-05-07T20:21:45Z","groups":["Time","Mission Information","Environment"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","description":"Returns the value set with setTimeMultiplier.","syntaxes":[{"syntax":"timeMultiplier","params":[],"returns":{"type":"Number","type_expr":"Number","description":"current time multiplier"},"form":"nullary"}],"examples":[{"code":["_multiplier = timeMultiplier;"]}],"see_also":["setTimeMultiplier","skipTime","setAccTime","accTime","time","serverTime","date","dayTime"]},{"name":"titleCut","title":"titleCut","type":"command","url":"https://community.bistudio.com/wiki/titleCut","revid":319886,"updated":"2022-05-13T09:25:39Z","groups":["GUI Control"],"status":"deprecated","replaced_by":["cutText"],"games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Displays text on screen.\n\n> [!CAUTION]\n> This information is **obsolete**. Reason: cutText should be used instead.","syntaxes":[{"syntax":"titleCut [text, type, speed]","params":[{"name":"text","type":"String","description":"text to be displayed on screen","type_expr":"String"},{"name":"type","type":"String","description":"can be one of Title Effect Types","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"1","type_expr":"Number","text":"speed: Number - (Optional, default 1)"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[text, type, speed]"}}],"examples":[{"code":["titleCut [\"Hello, how are you?\",\"Plain Down\",3];"]}],"see_also":["cutText"]},{"name":"titleFadeOut","title":"titleFadeOut","type":"command","url":"https://community.bistudio.com/wiki/titleFadeOut","revid":369166,"updated":"2024-09-03T10:34:41Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.05","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.05","arma3_since":"0.50","description":"Terminate the title effect and set duration of the fade out phase to the given time. Same as cutFadeOut but for the title layer.","syntaxes":[{"syntax":"titleFadeOut duration","params":[{"name":"duration","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"duration"}}],"examples":[{"code":["titleText [\"Hi\", \"plain\"];\ntitleFadeOut 2;"]}],"see_also":["titleText","titleRsc","titleObj","cutFadeOut","allActiveTitleEffects","activeTitleEffectParams"]},{"name":"titleObj","title":"titleObj","type":"command","url":"https://community.bistudio.com/wiki/titleObj","revid":363770,"updated":"2024-04-19T09:05:40Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Shows object defined in global config in CfgTitles","syntaxes":[{"syntax":"titleObj [class, type, speed, showInMap]","params":[{"name":"class","type":"String","description":"defined in `configFile >> \"CfgTitles\" >> class`","type_expr":"String"},{"name":"type","type":"String","description":"one of \"PLAIN\", \"PLAIN DOWN\", \"BLACK\", \"BLACK FADED\", \"BLACK OUT\", \"BLACK IN\", \"WHITE OUT\" and \"WHITE IN\". See Title Effect Types for more information about these values","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"-1","description":"time in seconds to fade in resource","type_expr":"Number","text":"speed: Number - (Optional, default -1) time in seconds to fade in resource"},{"name":"showInMap","type":"Boolean","optional":true,"default":"true","description":"false to hide the text when the map is opened","type_expr":"Boolean","text":"showInMap: Boolean - (Optional, default true) false to hide the text when the map is opened"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[class, type, speed, showInMap]"}}],"examples":[{"code":["titleObj [\"BISLogo\", \"PLAIN\"];"]}],"see_also":["titleText","titleRsc","cutRsc","cutObj","cutText","allActiveTitleEffects","activeTitleEffectParams"]},{"name":"titleRsc","title":"titleRsc","type":"command","url":"https://community.bistudio.com/wiki/titleRsc","revid":348002,"updated":"2023-11-08T10:24:40Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Displays a resource defined in RscTitles. Also see cutRsc, with these two commands you can show two different resources at once.\n\n> [!NOTE]\n> **Arma 3:** Arma 3 v1.58 Multiple layers and map overlays are possible with cutRsc which provides more options and handles layers better.","syntaxes":[{"syntax":"titleRsc [text, type, speed, showInMap]","params":[{"name":"text","type":"String","description":"the class name of the resource. (\"Default\" will remove the current resource)","type_expr":"String"},{"name":"type","type":"String","description":"can be one of: \"PLAIN\", \"PLAIN DOWN\", \"BLACK\", \"BLACK FADED\", \"BLACK OUT\", \"BLACK IN\", \"WHITE OUT\" and \"WHITE IN\"; see Title Effect Types for more information about these values","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"-1","description":"time in seconds to fade in resource","type_expr":"Number","text":"speed: Number - (Optional, default -1) time in seconds to fade in resource"},{"name":"showInMap","type":"Boolean","optional":true,"default":"true","description":"false to hide the text when the map is opened","type_expr":"Boolean","text":"showInMap: Boolean - (Optional, default true) false to hide the text when the map is opened"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[text, type, speed, showInMap]"}}],"examples":[{"code":["titleRsc [\"BIS\", \"PLAIN\"];"]}],"see_also":["titleText","titleObj","cutRsc","allActiveTitleEffects","activeTitleEffectParams"],"notes":[{"user":"Dr_Eyeball","date":"2008-06-30T08:44:00Z","text":"Using titleRsc (unlike cutRsc) for a HUD will mean:\n\n- the HUD will remain visible when you access the map and overlay it.\n- using the 'Direct communication' chat channel messages will interfere with the HUD by hiding it, since it appears to use the same 'resource layer'."},{"user":"Kenoxite","date":"2014-09-25T10:04:00Z","text":"In OFP/CWA any *<x>*Rsc will hide all the elements of the HUD, including the map."},{"user":"Honger","date":"2023-08-28T16:34:24Z","text":"The \"Default\" resource class does not exist in Arma 3 as of 2.12 version. Use a different class to remove resources that are not finite."}]},{"name":"titleText","title":"titleText","type":"command","url":"https://community.bistudio.com/wiki/titleText","revid":336846,"updated":"2023-01-04T16:43:44Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Displays text across the screen. If used along with cutText two different texts (in different type styles) can be shown at once.\nThe text can be displayed on multiple lines by using \"\\n\" new line characters (see Example 3).","syntaxes":[{"syntax":"titleText [text, type, speed, showInMap, isStructuredText]","params":[{"name":"text","type":"String","description":"text to be displayed","type_expr":"String"},{"name":"type","type":"String","description":"one of \"PLAIN\", \"PLAIN DOWN\", \"BLACK\", \"BLACK FADED\", \"BLACK OUT\", \"BLACK IN\", \"WHITE OUT\" and \"WHITE IN\". See Title Effect Types for more information about these values.","type_expr":"String"},{"name":"speed","type":"Number","optional":true,"default":"-1","description":"time in seconds to fade in resource","type_expr":"Number","text":"speed: Number - (Optional, default -1) time in seconds to fade in resource"},{"name":"showInMap","type":"Boolean","optional":true,"default":"true","description":"false to hide the text when the map is opened","type_expr":"Boolean","text":"showInMap: Boolean - (Optional, default true) false to hide the text when the map is opened"},{"name":"isStructuredText","type":"Boolean","optional":true,"default":"false","description":"true to switch support for Structured Text formatting - see Example 4","type_expr":"Boolean","since":"arma3 1.74","text":"isStructuredText: Boolean - (Optional, default false) true to switch support for Structured Text formatting - see Example 4"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[text, type, speed, showInMap, isStructuredText]"}}],"examples":[{"code":["titleText [\"Show this text\", \"PLAIN\"];"]},{"code":["titleText [\"Your message\", \"BLACK\", 2];"]},{"code":["titleText [\"line1\\nline2\\nline3\", \"PLAIN\"];"]},{"code":["titleText [\"<t color='#ff0000' size='5'>RED ALERT!</t><br/>***********\", \"PLAIN\", -1, true, true];"]}],"see_also":["titleFadeOut","cutText","cutObj","allActiveTitleEffects","activeTitleEffectParams"],"notes":[{"user":"DreadedEntity","date":"2014-11-21T09:03:00Z","text":"The third parameter or 'speed', as it is called in the description, refers to the amount of time the message will be shown on-screen. Multiply each number by 10 to get the number of seconds it will be shown. You can even use floats as input, like 0.1, to show a message for only 1 second.\n\n**Note**: Calculating the time with that method does not include the time it takes to fade in/out, which is about 1 second unless you use numbers lower than 1.\n**Note**: Using anything lower than 0.001 seems to have no effect, or the effect is so little it is negligible.\n**(A3 1.34.128075)**"}]},{"name":"to","title":"to","type":"command","url":"https://community.bistudio.com/wiki/to","revid":311163,"updated":"2022-05-12T09:48:15Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Continue sequence of for construct. It sets the end value of the index variable.","syntaxes":[{"syntax":"forType to b","params":[{"name":"forType","type":"For Type","type_expr":"For Type"},{"name":"b","type":"Number","type_expr":"Number"}],"returns":{"type":"For Type","type_expr":"For Type"},"form":"binary","left":{"text":"forType"},"right":{"text":"b"}}],"examples":[{"text":"```sqf\nfor \"_i\" from 10 to 20 do\n{\n    hint str _i; // will hint from 10 to 20, spaced by 1 second\n    sleep 1;\n};\n```","code":["for \"_i\" from 10 to 20 do\n{\n\thint str _i; // will hint from 10 to 20, spaced by 1 second\n\tsleep 1;\n};"]}],"see_also":["Control Structures","for","from","step"]},{"name":"toArray","title":"toArray","type":"command","url":"https://community.bistudio.com/wiki/toArray","revid":377121,"updated":"2026-01-01T10:18:13Z","groups":["Arrays","HashMap","Strings"],"status":"ok","games":{"arma1":"1.09","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.09","arma3_since":"0.50","description":"Converts the supplied String into an Array of Numbers. The numbers in the created array are the decimal [Unicode](https://en.wikipedia.org/wiki/Unicode) representations of characters.\n\n> [!NOTE]\n> **Arma 3:** Since v2.04 this command can also handle HashMaps. See alternative syntax.","syntaxes":[{"syntax":"toArray string","params":[{"name":"string","type":"String","type_expr":"String"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"unary","right":{"text":"string"}},{"syntax":"toArray hashMap","since":"arma3 2.04","params":[{"name":"hashMap","type":"HashMap","type_expr":"HashMap"}],"returns":{"type":"Array","type_expr":"Array","description":"array in format [[key, key, ...], [value, value, ...]]"},"form":"unary","right":{"text":"hashMap"}},{"syntax":"hashMap toArray splitArrays","since":"arma3 2.04","params":[{"name":"hashMap","type":"HashMap","type_expr":"HashMap"},{"name":"splitArrays","type":"Boolean","description":"see return value","type_expr":"Boolean"}],"returns":{"type":"Array","type_expr":"Array","description":"array in either one of the following formats:\n- splitArrays: true - `[[key1, key2, ...], [value1, value2, ...]]` - splitArrays: false - `[[key1, value1], [key2, value2], ...]` This is very inefficient since the engine has to create many small arrays","text":"Array - array in either one of the following formats:\n\n- splitArrays: true - `[[key1, key2, ...], [value1, value2, ...]]`\n- splitArrays: false - `[[key1, value1], [key2, value2], ...]` This is **very inefficient** since the engine has to create many small arrays"},"form":"binary","left":{"text":"hashMap"},"right":{"text":"splitArrays"}}],"examples":[{"code":["hint format [\"%1\", toArray \"AaŒ\"];// Returns \"[65,97,338]\""]},{"code":["toArray _hashMap params [\"_keys\", \"_values\"];"]},{"text":"```sqf\nprivate _hashmap = [\"cow\", \"cat\", \"chicken\"] createHashMapFromArray [10000, 20000, 20000];\n_hashmap toArray true;    // returns [[\"cow\", \"cat\", \"chicken\"], [10000, 20000, 20000]] - same as Syntax 2\n_hashmap toArray false;    // returns [[\"cow\", 10000], [\"cat\", 20000], [\"chicken\", 20000]]\n```","code":["private _hashmap = [\"cow\", \"cat\", \"chicken\"] createHashMapFromArray [10000, 20000, 20000];\n_hashmap toArray true;\t// returns [[\"cow\", \"cat\", \"chicken\"], [10000, 20000, 20000]] - same as Syntax 2\n_hashmap toArray false;\t// returns [[\"cow\", 10000], [\"cat\", 20000], [\"chicken\", 20000]]"]}],"see_also":["set","resize","reverse","select","in","find","toString","count","deleteAt","splitString","joinString","toUpperANSI"]},{"name":"toFixed","title":"toFixed","type":"command","url":"https://community.bistudio.com/wiki/toFixed","revid":369349,"updated":"2024-09-03T18:43:03Z","groups":["Math","Strings"],"status":"ok","games":{"arma3":"1.66"},"since":"arma3 1.66","arma3_since":"1.66","description":"Converts a number into a string, keeping the specified number of decimals. If the desired number of decimals is higher than the actual number, nulls are added to create the desired decimal length. This command is almost identical in behaviour to JavaScript [toFixed()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\n\nThe alternative syntax acts as keyword and switches engine's Number to String global conversion into desired format, from the moment it is applied until the end of script.\nTo reset output back to default at any time, use `toFixed -1` - see Example 5.\n\n> [!NOTE]\n> Converted number is never presented in scientific notation unlike with other number to string commands. Also Arma's default string conversion limits numbers to 6 [significant figures](https://en.wikipedia.org/wiki/Significant_figures), whereas with this command it is possible to preserve some extra precision - see Example 6.","syntaxes":[{"syntax":"number toFixed decimals","params":[{"name":"number","type":"Number","description":"number to convert","type_expr":"Number"},{"name":"decimals","type":"Number","description":"number of decimals to display (range 0-20)","type_expr":"Number"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"number"},"right":{"text":"decimals"}},{"syntax":"toFixed decimals","since":"arma3 1.72","params":[{"name":"decimals","type":"Number","description":"number of decimals to display (range 0-20). -1 to reset to default number of decimals","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"decimals"}}],"examples":[{"code":["123 toFixed 2; // \"123.00\""]},{"code":["2.34 toFixed 1; // \"2.3\"\n2.35 toFixed 1; // \"2.4\""]},{"text":"Convert position to string preserving position precision:\n\n```sqf\nfn_posToString =\n{\n    format [\n        \"[%1,%2,%3]\",\n        _this select 0 toFixed 8,\n        _this select 1 toFixed 8,\n        _this select 2 toFixed 8\n    ]\n};\nstr getPos player;                    // \"[3231.05,171.802,0.00143862]\"\ngetPos player call fn_posToString;    // \"[3231.04882813,171.80192566,0.00143862]\"\n```","code":["fn_posToString = \n{\n\tformat [\n\t\t\"[%1,%2,%3]\", \n\t\t_this select 0 toFixed 8, \n\t\t_this select 1 toFixed 8, \n\t\t_this select 2 toFixed 8\n\t]\n};\nstr getPos player;\t\t\t\t\t// \"[3231.05,171.802,0.00143862]\"\ngetPos player call fn_posToString;\t// \"[3231.04882813,171.80192566,0.00143862]\""]},{"text":"Same as **Example 3** only using new alternative syntax:\n\n```sqf\nstr getPos player; // \"[3231.05,171.802,0.00143862]\"\ntoFixed 8;\nstr getPos player; // \"[3231.04882813,171.80192566,0.00143862]\"\n```","code":["str getPos player; // \"[3231.05,171.802,0.00143862]\"\ntoFixed 8;\nstr getPos player; // \"[3231.04882813,171.80192566,0.00143862]\""]},{"text":"```sqf\nsystemChat str position player;        // [11580.3,11797.7,0.00146675]\ncall\n{\n    toFixed 6;\n    systemChat str position player;    // [11580.341797,11797.737305,0.001467]\n};\nsystemChat str position player;        // [11580.341797,11797.737305,0.001467]\ntoFixed -1;\nsystemChat str position player;        // [11580.3,11797.7,0.00146675]\n```\n\nIdeal to be used when saving data to a database when more precise positioning is required.","code":["systemChat str position player;\t\t// [11580.3,11797.7,0.00146675]\ncall\n{\n\ttoFixed 6;\n\tsystemChat str position player;\t// [11580.341797,11797.737305,0.001467]\n};\nsystemChat str position player;\t\t// [11580.341797,11797.737305,0.001467]\ntoFixed -1;\nsystemChat str position player;\t\t// [11580.3,11797.7,0.00146675]"]},{"text":"```sqf\nstr (pi/100000);        // \"3.14159e-005\" - scientific notation\n(pi/100000) toFixed 10;    // \"0.0000314159\" - no scientific notation\nstr pi;                    // \"3.14159\" - 6 significant figures (default)\npi toFixed 6;            // \"3.141593\" - forced to 7 significant figures\npi toFixed 7;            // \"3.1415927\" - forced to 8 significant figures\n```","code":["str (pi/100000);\t\t// \"3.14159e-005\" - scientific notation\n(pi/100000) toFixed 10;\t// \"0.0000314159\" - no scientific notation\nstr pi;\t\t\t\t\t// \"3.14159\" - 6 significant figures (default)\npi toFixed 6;\t\t\t// \"3.141593\" - forced to 7 significant figures\npi toFixed 7;\t\t\t// \"3.1415927\" - forced to 8 significant figures"]}],"see_also":["toString","toArray","toLower","toUpper","toLowerANSI","toUpperANSI"],"notes":[{"user":"R3vo","date":"2016-09-02T21:56:00Z","text":"```sqf\nparseNumber (3.56346 toFixed 4);        // 0.0026 ms (10000 cycles)\n[3.5634,4] call BIS_fnc_cutDecimals;    // 0.0111 ms (10000 cycles)\n```"}]},{"name":"toJSON","title":"toJSON","type":"command","url":"https://community.bistudio.com/wiki/toJSON","revid":379521,"updated":"2026-10-31T00:29:49Z","groups":["Strings"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Converts data to [JSON](https://en.wikipedia.org/wiki/JSON).","syntaxes":[{"syntax":"toJSON data","params":[{"name":"data","type":"Boolean, Number, String, Array, HashMap or nil","description":"Only certain Data Types are supported:\n\n- Boolean - serialized as JSON boolean\n- Number - serialized as JSON number (floating-point)\n- String - serialized as JSON string\n- Array - Serialized as JSON array. Unsupported elements (e.g. Objects) are converted to JSON null.\n- HashMap - Serialized as JSON object. Only String keys are supported, other keys are ignored. Unsupported values (e.g. Objects) are converted to JSON null.\n- nil - serialized as JSON null\n\n  > [!IMPORTANT]\n  > The nil value can only be passed as a member of an Array or HashMap. It cannot be passed directly as the command would simply not execute.","type_expr":"Boolean | Number | String | Array | HashMap | Nothing"}],"returns":{"type":"String","type_expr":"String","description":"JSON string"},"form":"unary","right":{"text":"data"}}],"examples":[{"text":"```sqf\nprivate _result = toJSON [\"this\", \"is\", \"an\", \"array\"];\n```\n\nResult:\n\n```json\n[\"this\",\"is\",\"an\",\"array\"]\n```","code":["private _result = toJSON [\"this\", \"is\", \"an\", \"array\"];"]},{"text":"```sqf\nprivate _hashMap = createHashMap;\n_hashMap set [\"bKey\", true];\n_hashMap set [\"sKey\", \"Hello there\"];\n_hashMap set [\"oKey\", player];\n_hashMap set [\"nKey\", 42];\n_hashMap set [\"hKey\", [\"key1\", \"key2\", \"yolo\"] createHashMapFromArray [\"General Kenobi\", true, \"Hello it's me\"]];\ntoJSON _hashMap;\n```\n\nResult (formatted for readability):\n\n```json\n{\n    \"bKey\": true,\n    \"sKey\": \"Hello there\",\n    \"oKey\": null,\n    \"nkey\": 42,\n    \"hKey\": {\n        \"key1\": \"General Kenobi\",\n        \"key2\": true,\n        \"yolo\": \"Hello it's me\"\n    }\n}\n```","code":["private _hashMap = createHashMap;\n_hashMap set [\"bKey\", true];\n_hashMap set [\"sKey\", \"Hello there\"];\n_hashMap set [\"oKey\", player];\n_hashMap set [\"nKey\", 42];\n_hashMap set [\"hKey\", [\"key1\", \"key2\", \"yolo\"] createHashMapFromArray [\"General Kenobi\", true, \"Hello it's me\"]];\ntoJSON _hashMap;"]},{"code":["private _jsonPlayer = toJSON player; // empty string - Object is not supported"]}],"see_also":["fromJSON","toString","str"]},{"name":"toLower","title":"toLower","type":"command","url":"https://community.bistudio.com/wiki/toLower","revid":308975,"updated":"2022-04-21T14:51:35Z","groups":["Strings"],"status":"ok","games":{"arma1":"1.09","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.09","arma3_since":"0.50","description":"Converts the supplied Unicode string to all lowercase characters. If the string doesn't have characters with codes > 255, use toLowerANSI.","syntaxes":[{"syntax":"toLower string","params":[{"name":"string","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"string"}}],"examples":[{"code":["hint toLower \"AaBb1\"; // returns \"aabb1\""]}],"see_also":["toString","toArray","toUpper","toFixed","toLowerANSI","toUpperANSI"]},{"name":"toLowerANSI","title":"toLowerANSI","type":"command","url":"https://community.bistudio.com/wiki/toLowerANSI","revid":339603,"updated":"2023-04-28T14:11:50Z","groups":["Strings"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","description":"Converts the supplied string to all lower case characters fast (could be 3× faster than toLower).\n[ANSI](https://stackoverflow.com/questions/701882/what-is-ansi-format/701920) in this case refers to [ISO-8859-1](https://en.wikipedia.org/wiki/ISO/IEC_8859-1) code page.\nThe command is primary designed to convert characters with codes 0...127 however it will also convert other characters in 128...255 range as long as they are present in ISO-8859-1 codepage.\nFor Unicode alternative see toLower.","syntaxes":[{"syntax":"toLowerANSI string","params":[{"name":"string","type":"String","description":"string to convert","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"all lower case string"},"form":"unary","right":{"text":"string"}}],"examples":[{"code":["hint toLowerANSI \"AaBb1\"; // returns \"aabb1\""]}],"see_also":["toUpperANSI","toLower","toString","toArray","toUpper","toFixed"]},{"name":"toString","title":"toString","type":"command","url":"https://community.bistudio.com/wiki/toString","revid":351525,"updated":"2023-12-06T11:24:40Z","groups":["Strings","Arrays"],"status":"ok","games":{"arma1":"1.09","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.09","arma3_since":"0.50","description":"Converts the supplied Array of Numbers into a String through [Unicode](https://en.wikipedia.org/wiki/Unicode) characters representation conversion, or provided Code to compilable String.","syntaxes":[{"syntax":"toString array","params":[{"name":"array","type":"Array of Numbers","description":"Array of Numbers\n\n> [!IMPORTANT]\n> If *array* contains non-number values, the following error might appear in .rpt file: `Bad conversion: scalar`. See parseSimpleArray for multi-type array.","type_expr":"Array<Number>","text":"array: Array of Numbers\n\n> [!IMPORTANT]\n> If *array* contains non-number values, the following error might appear in .rpt file: `Bad conversion: scalar`. See parseSimpleArray for multi-type array."}],"returns":{"type":"String","type_expr":"String","description":"Unicode numbers converted to String of characters","text":"String - [Unicode](https://en.wikipedia.org/wiki/Unicode) numbers converted to String of characters"},"form":"unary","right":{"text":"array"}},{"syntax":"toString code","since":"arma3 2.02","params":[{"name":"code","type":"Code","type_expr":"Code"}],"returns":{"type":"String","type_expr":"String","description":"compilable String from provided code"},"form":"unary","right":{"text":"code"}}],"examples":[{"code":["hint toString [65,97,338]; // returns \"AaŒ\""]},{"code":["[\"test\", \"test\"] joinString toString [12345] splitString toString [12345]; // [\"test\", \"test\"]"]},{"code":["private _compilableString = toString { hint \"it works!\" };\nhint _compilableString; // hints ' hint \"it works!\" '\nsleep 2;\ncall compile _compilableString; // hints ' it works! '"]}],"see_also":["parseSimpleArray","set","resize","reverse","select","in","find","toArray","forEach","count","deleteAt","deleteRange","append","sort","param","params","arrayIntersect","splitString","joinString","toLower","toUpper","toFixed","endl","format","formatText","toLowerANSI","toUpperANSI"],"notes":[{"user":"DreadedEntity","date":"2015-02-10T21:05:00Z","text":"Tabs and new lines can be created with toString [9] and toString [10], respectively. Alternatively, a new line can also be created with toString [92,110] (\"\\n\"). If you save these strings into a variable, they can be manipulated like any other string. For example, the following code will work just fine and return the expected output:\n\n```sqf\n_tab = toString [9];\nfor \"_i\" from 0 to 3 do\n{\n    _tab = _tab + (toString [9]);\n};\ncopyToClipboard format [\"x%1x\",tab];\n```"},{"user":"Killzone_Kid","date":"2015-08-25T09:58:00Z","text":"While you can convert any String to Array with toArray command, only numbers from 1 to 55295 (not 65535 as expected) can be successfully converted to String with toString and then back to Array with toArray without loss of data."}]},{"name":"toUpper","title":"toUpper","type":"command","url":"https://community.bistudio.com/wiki/toUpper","revid":308976,"updated":"2022-04-21T14:52:14Z","groups":["Strings"],"status":"ok","games":{"arma1":"1.09","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.09","arma3_since":"0.50","description":"Converts the supplied Unicode string to all uppercase characters. If the string doesn't have characters with codes > 255, use toUpperANSI.","syntaxes":[{"syntax":"toUpper string","params":[{"name":"string","type":"String","type_expr":"String"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"string"}}],"examples":[{"code":["hint toUpper \"AaBb1\"; // returns \"AABB1\""]}],"see_also":["toString","toArray","toLower","toFixed","toLowerANSI","toUpperANSI"]},{"name":"toUpperANSI","title":"toUpperANSI","type":"command","url":"https://community.bistudio.com/wiki/toUpperANSI","revid":339630,"updated":"2023-04-28T14:11:56Z","groups":["Strings"],"status":"ok","games":{"arma3":"1.96"},"since":"arma3 1.96","arma3_since":"1.96","description":"Converts the supplied string to all upper case characters fast (could be 3x faster than toUpper).\n\n[ANSI](https://stackoverflow.com/questions/701882/what-is-ansi-format/701920) in this case refers to [ISO-8859-1](https://en.wikipedia.org/wiki/ISO/IEC_8859-1) code page.\nThe command is primary designed to convert characters with codes 0...127 however will also convert other characters in 128...255 range as long as they are present in ISO-8859-1 codepage.\nFor Unicode alternative see toUpper.","syntaxes":[{"syntax":"toUpperANSI string","params":[{"name":"string","type":"String","description":"string to convert","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"all upper case string"},"form":"unary","right":{"text":"string"}}],"examples":[{"code":["hint toUpperANSI \"AaBb1\"; // returns \"AABB1\""]}],"see_also":["toLowerANSI","toLower","toString","toArray","toUpper","toFixed"]},{"name":"triggerActivated","title":"triggerActivated","type":"command","url":"https://community.bistudio.com/wiki/triggerActivated","revid":352701,"updated":"2024-02-18T16:52:51Z","groups":["Triggers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns true if the trigger has been activated.","syntaxes":[{"syntax":"triggerActivated trigger","params":[{"name":"trigger","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"trigger"}}],"examples":[{"code":["if (triggerActivated trg1) then { hint \"trigger trg1 activated!\" };"]}],"multiplayer":"> [!IMPORTANT]\n> The trigger could be local or remote but the result returned by this command will be for the trigger activated status on the client that executed the command.\n> See createTrigger for more information.","see_also":["setTriggerActivation","triggerActivation","triggerInterval","setTriggerInterval","enableSimulation","simulationEnabled","createTrigger"],"notes":[{"user":"MisterGoodson","date":"2015-06-09T14:50:00Z","text":"If the trigger already activated at least once, triggerActivated will only return false if trigger is set to activate Repeatedly.\nIn other words, a trigger set to activate Once will always return true once activated at least once (even if trigger is no longer activated)."},{"user":"Killzone_Kid","date":"2020-08-13T10:50:00Z","text":"The engine does not provide a precise way of detecting which player activated the trigger.\nThe trigger has a default triggerInterval of ~0.5 seconds, so every half a second it checks if there is anyone in the zone.\nThere could be 100 people in the zone on the next scan, which one was the first? There is simply no data for this.\nYou can make an imprecise guess by taking 1st person from thisList or list. Also you should do it on server only trigger.\nThis will still not guarantee that person first on the list is the one who was first to activate trigger, but on balance will probably be the one."}]},{"name":"triggerActivation","title":"triggerActivation","type":"command","url":"https://community.bistudio.com/wiki/triggerActivation","revid":378816,"updated":"2026-06-30T23:55:03Z","groups":["Triggers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns trigger activation.\n\n> [!IMPORTANT]\n> The trigger could be local or remote but the result returned by this command will be for the trigger activation set up locally on the client that executed the command. See createTrigger for more info.","syntaxes":[{"syntax":"triggerActivation trigger","params":[{"name":"trigger","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [by, type, repeating, persistent]\n- by: String - See setTriggerActivation - type: String - See setTriggerActivation - repeating: Boolean - See setTriggerActivation - persistent: Boolean Arma 3 v2.24 - See setTriggerActivation","text":"Array with [by, type, repeating, persistent]\n\n- by: String - See setTriggerActivation\n- type: String - See setTriggerActivation\n- repeating: Boolean - See setTriggerActivation\n- persistent: Boolean Arma 3 v2.24 - See setTriggerActivation"},"form":"unary","right":{"text":"trigger"}}],"examples":[{"code":["_activation = triggerActivation someTrigger;"]}],"see_also":["setTriggerActivation","triggerActivated","triggerInterval","setTriggerInterval","enableSimulation","simulationEnabled"]},{"name":"triggerAmmo","title":"triggerAmmo","type":"command","url":"https://community.bistudio.com/wiki/triggerAmmo","revid":377211,"updated":"2026-01-01T11:53:01Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","locality":{"argument":"local"},"description":"Triggers a munition such as shells, bullets, missiles, rockets, mines and bombs (*shotSubmunition/shotShell/shotBullet/shotMissile/shotRocket*) as if it did hit.\nIf ammo uses submunition, then creation of submunition will be triggered. Since Arma 3 v 2.22 it is possible to manipulate mine timer, cook grenades and alter missile trigger distance.","syntaxes":[{"syntax":"triggerAmmo munition","params":[{"name":"munition","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"munition"}},{"syntax":"triggerAmmo [munition, timeLeft, distanceLeft]","since":"arma3 2.22","params":[{"name":"munition","type":"Object","description":"ammo. If 'timeLeft' and 'distanceLeft' are not provided, the action is identical to the main syntax.","type_expr":"Object"},{"name":"timeLeft","type":"Number","optional":true,"default":"-1 - ignore","description":"'timeToExplosion' (see getShotInfo). Can only be set to <= relevant config value.","type_expr":"Number","text":"timeLeft: Number - (Optional) 'timeToExplosion' (see getShotInfo). Can only be set to <= relevant config value. Default: -1 - ignore."},{"name":"distanceLeft","type":"Number","optional":true,"default":"-1 - ignore","description":"'fuseDistanceLeft' (see getShotInfo). Can only be set to <= relevant config value.","type_expr":"Number","text":"distanceLeft: Number - (Optional) 'fuseDistanceLeft' (see getShotInfo). Can only be set to <= relevant config value. Default: -1 - ignore."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[munition, timeLeft, distanceLeft]"}}],"examples":[{"code":["triggerAmmo bomb1;"]},{"code":["player addEventHandler [\"FiredMan\", {triggerAmmo [_this select 6, 1]}]; // explodes handgrenade or sets smoke on smokegrenade 1 sec after the throw."]}],"see_also":["getShotParents","Arma 3: Event Handlers"]},{"name":"triggerArea","title":"triggerArea","type":"command","url":"https://community.bistudio.com/wiki/triggerArea","revid":377709,"updated":"2026-01-02T09:03:48Z","groups":["Triggers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns currently monitored trigger area. Since Arma 3 v1.60, the command returns 3rd dimension for the monitored area. If height is not set, the value for it would be -1.\n\n> [!IMPORTANT]\n> The trigger could be local or remote but the result returned by this command will be for the trigger area set up locally on the client that executed the command. See createTrigger for more info.","syntaxes":[{"syntax":"triggerArea trigger","params":[{"name":"trigger","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [a, b, angle, isRectangle, c]\n- a: Number - trigger area X size / 2 - b: Number - trigger area Y size / 2 - angle: Number in range 0..360 - isRectangle: Boolean - c: Number - trigger area Z size / 2 (since Arma 3 v1.60)","text":"Array with [a, b, angle, isRectangle, c]\n\n- a: Number - trigger area X size / 2\n- b: Number - trigger area Y size / 2\n- angle: Number in range 0..360\n- isRectangle: Boolean\n- c: Number - trigger area Z size / 2 (since Arma 3 v1.60)"},"form":"unary","right":{"text":"trigger"}}],"examples":[{"code":["_area = triggerArea sensor1; // result is [200, 120, 45, false, -1];"]}],"see_also":["setTriggerArea","inArea","inAreaArray"]},{"name":"triggerAttachedVehicle","title":"triggerAttachedVehicle","type":"command","url":"https://community.bistudio.com/wiki/triggerAttachedVehicle","revid":320994,"updated":"2022-05-13T10:28:34Z","groups":["Triggers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns vehicle attached to the trigger (for example using triggerAttachVehicle).\n\n> [!IMPORTANT]\n> The trigger could be local or remote but the result returned by this command will be for the vehicle attached locally on the client that executed the command. See createTrigger for more info.","syntaxes":[{"syntax":"triggerAttachedVehicle trigger","params":[{"name":"trigger","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"trigger"}}],"examples":[{"code":["_result = triggerAttachedVehicle triggerName;"]}],"see_also":["attachObject","attachTo","attachedObjects","attachedTo","waypointAttachVehicle","waypointAttachedVehicle","lightAttachObject","triggerAttachVehicle","attachedObject","triggerAttachObject"]},{"name":"triggerAttachObject","title":"triggerAttachObject","type":"command","url":"https://community.bistudio.com/wiki/triggerAttachObject","revid":336715,"updated":"2023-01-04T15:24:43Z","groups":["Triggers"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Assigns a static object to the trigger. The activation source is changed to \"STATIC\".","syntaxes":[{"syntax":"triggerName triggerAttachObject objectId","params":[{"name":"triggerName","type":"Object","type_expr":"Object"},{"name":"objectId","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"triggerName"},"right":{"text":"objectId"}}],"examples":[{"code":["_trigger triggerAttachObject 1234;"]}],"see_also":["attachObject","attachTo","attachedObjects","attachedTo","waypointAttachVehicle","waypointAttachedVehicle","lightAttachObject","triggerAttachVehicle","attachedObject","triggerAttachedVehicle","triggerInterval","setTriggerInterval","enableSimulation","simulationEnabled"],"notes":[{"user":"Killzone_Kid","date":"2013-10-31T21:56:00Z","text":"This command doesn't quite work in Arma 3: see *this ticket* (dead link)\n\nFurther investigation reveals that objectId param for this command is some kind of map id and not the id you can see in the editor. This map id could be seen in multiplayer when looking at netId of the static objects, for example \"1:-23984219837\", the -23984219837 would be the objectId. Unfortunately it still doesn't work."}]},{"name":"triggerAttachVehicle","title":"triggerAttachVehicle","type":"command","url":"https://community.bistudio.com/wiki/triggerAttachVehicle","revid":377073,"updated":"2026-01-01T09:31:40Z","groups":["Triggers"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Specifies the entity which will activate the selected trigger.\n\n- If **[]** is given, the trigger is decoupled from the assigned vehicle (example 2).\n- If the activation source is **\"VEHICLE\"**, **\"GROUP\"**, **\"LEADER\"** or **\"MEMBER\"**, it is changed to **\"NONE\"**.\n- If **[vehicle]** is given, the trigger is coupled to the vehicle or its group.\n- When the source is **\"GROUP\"**, **\"LEADER\"** or **\"MEMBER\"**, it is coupled to the group, otherwise it is coupled to the vehicle and the source is changed to **\"VEHICLE\"**.","syntaxes":[{"syntax":"triggerName triggerAttachVehicle objects","params":[{"name":"triggerName","type":"Object","type_expr":"Object"},{"name":"objects","type":"Array of Objects","type_expr":"Array<Object>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"triggerName"},"right":{"text":"objects"}}],"examples":[{"code":["trigger triggerAttachVehicle [player];"]},{"code":["trigger triggerAttachVehicle [];"]}],"see_also":["attachObject","attachTo","attachedObjects","attachedTo","waypointAttachVehicle","waypointAttachedVehicle","lightAttachObject","attachedObject","triggerAttachedVehicle","triggerAttachObject","triggerInterval","setTriggerInterval"]},{"name":"triggerDynamicSimulation","title":"triggerDynamicSimulation","type":"command","url":"https://community.bistudio.com/wiki/triggerDynamicSimulation","revid":342181,"updated":"2023-07-09T12:27:00Z","groups":["Dynamic Simulation"],"status":"ok","games":{"arma3":"1.68"},"since":"arma3 1.68","arma3_since":"1.68","description":"Controls the ability of given unit to activate entities with disabled Arma 3: Dynamic Simulation. If false dynamically disabled entities will not be activated by this unit's presence. This command has the same effect as the Eden Editor attribute *Wake-Up Dynamic Simulation*.","syntaxes":[{"syntax":"unit triggerDynamicSimulation trigger","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"trigger","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"trigger"}}],"examples":[{"code":["player triggerDynamicSimulation false;"]}],"see_also":["enableDynamicSimulationSystem","dynamicSimulationSystemEnabled","enableDynamicSimulation","dynamicSimulationEnabled","setDynamicSimulationDistance","dynamicSimulationDistance","setDynamicSimulationDistanceCoef","dynamicSimulationDistanceCoef","canTriggerDynamicSimulation","enableSimulation","simulationEnabled","enableSimulationGlobal","Arma 3: Dynamic Simulation"]},{"name":"triggerInterval","title":"triggerInterval","type":"command","url":"https://community.bistudio.com/wiki/triggerInterval","revid":349226,"updated":"2023-11-08T14:50:51Z","groups":["Triggers"],"status":"ok","games":{"arma3":"1.98"},"since":"arma3 1.98","arma3_since":"1.98","locality":{"argument":"global"},"description":"Returns trigger condition check frequency in seconds.\n\n> [!IMPORTANT]\n> The trigger could be local or remote but the result returned by this command will be for the trigger interval set up locally on the client that executed the command. See createTrigger for more info.","syntaxes":[{"syntax":"triggerInterval trigger","params":[{"name":"trigger","type":"Object","description":"trigger object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"trigger interval in seconds"},"form":"unary","right":{"text":"trigger"}}],"examples":[{"code":["_interval = triggerInterval someTrigger;"]}],"see_also":["setTriggerInterval","createTrigger","enableSimulation","simulationEnabled"]},{"name":"triggerStatements","title":"triggerStatements","type":"command","url":"https://community.bistudio.com/wiki/triggerStatements","revid":378402,"updated":"2026-04-04T08:11:49Z","groups":["Triggers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns trigger statements.","syntaxes":[{"syntax":"triggerStatements trigger","params":[{"name":"trigger","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [condition, activation, deactivation]\n- condition: String - activation: String - code ran when the trigger is activated - deactivation: String - code ran when the trigger is deactivated","text":"Array with [condition, activation, deactivation]\n\n- condition: String\n- activation: String - code ran when the trigger is activated\n- deactivation: String - code ran when the trigger is deactivated"},"form":"unary","right":{"text":"trigger"}}],"examples":[{"code":["_statements = triggerStatements someTrigger;"]}],"multiplayer":"The trigger could be local or remote but the result returned by this command will be for the trigger statements set up locally on the client that executed the command. See createTrigger for more info.","see_also":["setTriggerStatements"]},{"name":"triggerText","title":"triggerText","type":"command","url":"https://community.bistudio.com/wiki/triggerText","revid":319934,"updated":"2022-05-13T09:25:45Z","groups":["Triggers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns trigger text.","syntaxes":[{"syntax":"triggerText trigger","params":[{"name":"trigger","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"trigger"}}],"examples":[{"code":["_text = triggerText triggerName;"]}],"multiplayer":"The trigger could be local or remote but the result returned by this command will be for the trigger text set up locally on the client that executed the command. See createTrigger for more info.","see_also":["setTriggerText"]},{"name":"triggerTimeout","title":"triggerTimeout","type":"command","url":"https://community.bistudio.com/wiki/triggerTimeout","revid":377686,"updated":"2026-01-02T09:02:55Z","groups":["Triggers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns trigger timeout.\n\n> [!IMPORTANT]\n> The trigger could be local or remote but the result returned by this command will be for the trigger timeout set up locally on the client that executed the command. See createTrigger for more info.","syntaxes":[{"syntax":"triggerTimeout trigger","params":[{"name":"trigger","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [min, mid, max, interruptible]\n- min: Number - mid: Number - max: Number - interruptible: Boolean","text":"Array with [min, mid, max, interruptible]\n\n- min: Number\n- mid: Number\n- max: Number\n- interruptible: Boolean"},"form":"unary","right":{"text":"trigger"}}],"examples":[{"code":["_timeOut = triggerTimeout someTrigger;"]}],"see_also":["setTriggerTimeout","triggerTimeoutCurrent"]},{"name":"triggerTimeoutCurrent","title":"triggerTimeoutCurrent","type":"command","url":"https://community.bistudio.com/wiki/triggerTimeoutCurrent","revid":376123,"updated":"2025-09-01T08:15:52Z","groups":["Triggers"],"status":"ok","games":{"arma3":"1.08"},"since":"arma3 1.08","arma3_since":"1.08","locality":{"argument":"global"},"description":"Returns current timeout of the given trigger or -1 if countdown is not in progress.\n\n> [!IMPORTANT]\n> The trigger could be local or remote but the result returned by this command will be for the current trigger timeout local to the client that executed the command.\n> See createTrigger for more info.","syntaxes":[{"syntax":"triggerTimeoutCurrent trigger","params":[{"name":"trigger","type":"Object","description":"trigger object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number","description":"time remaining before trigger activation."},"form":"unary","right":{"text":"trigger"}}],"examples":[{"code":["_remaining = triggerTimeoutCurrent _trigger;"]}],"see_also":["triggerTimeout","setTriggerTimeout","waypointTimeoutCurrent"],"notes":[{"user":"Killzone_Kid","date":"2013-11-26T12:16:00Z","text":"Triggers have their own schedule. If you create a trigger with timeout and try to read triggerTimeoutCurrent immediately it will return -1.\nThis is because the countdown will not start until the next scheduled trigger check is due, and this could take up to 0.5 seconds."}]},{"name":"triggerType","title":"triggerType","type":"command","url":"https://community.bistudio.com/wiki/triggerType","revid":339279,"updated":"2023-04-28T14:02:49Z","groups":["Triggers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the trigger type.\n\n> [!IMPORTANT]\n> The trigger could be local or remote but the result returned by this command will be for the trigger type set up locally on the client that executed the command.\n> See createTrigger for more info.","syntaxes":[{"syntax":"triggerType trigger","params":[{"name":"trigger","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"can be one of the following (see setTriggerType for details):\n- `\"NONE\"` - `\"EAST G\"` - `\"WEST G\"` - `\"GUER G\"` - `\"SWITCH\"` - `\"END1\"` - `\"END2\"` - `\"END3\"` - `\"END4\"` - `\"END5\"` - `\"END6\"` - `\"LOOSE\"` - `\"WIN\"` Can return `\"ERROR\"` in case of an invalid trigger type (due to Mission.sqm manual edit or other type of data corruption)","text":"String - can be one of the following (see setTriggerType for details):\n\n- `\"NONE\"`\n- `\"EAST G\"`\n- `\"WEST G\"`\n- `\"GUER G\"`\n- `\"SWITCH\"`\n- `\"END1\"`\n- `\"END2\"`\n- `\"END3\"`\n- `\"END4\"`\n- `\"END5\"`\n- `\"END6\"`\n- `\"LOOSE\"`\n- `\"WIN\"`\n\nCan return `\"ERROR\"` in case of an invalid trigger type (due to Mission.sqm manual edit or other type of data corruption)"},"form":"unary","right":{"text":"trigger"}}],"examples":[{"code":["_type = triggerType tr1;"]}],"see_also":["setTriggerType"]},{"name":"trim","title":"trim","type":"command","url":"https://community.bistudio.com/wiki/trim","revid":377062,"updated":"2026-01-01T09:06:47Z","groups":["Strings"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Trims a string.","syntaxes":[{"syntax":"trim stringValue","params":[{"name":"stringValue","type":"String","description":"string to be trimmed. spaces, tabs and line returns are removed from both ends of *stringValue*.","type_expr":"String"}],"returns":{"type":"String","type_expr":"String","description":"trimmed string"},"form":"unary","right":{"text":"stringValue"}},{"syntax":"string trim [chars, where]","params":[{"name":"string","type":"String","description":"string to be trimmed","type_expr":"String"},{"name":"chars","type":"String","description":"list of characters to be trimmed","type_expr":"String"},{"name":"where","type":"Number one of:","description":"Number one of:\n\n- 0 - trim at the beginning (left) and the end (right)\n- 1 - trim at the beginning (left)\n- 2 - trim at the end (right)","type_expr":"Number","text":"where: Number one of:\n\n- 0 - trim at the beginning (left) and the end (right)\n- 1 - trim at the beginning (left)\n- 2 - trim at the end (right)"}],"returns":{"type":"String","type_expr":"String","description":"trimmed string"},"form":"binary","left":{"text":"string"},"right":{"text":"[chars, where]"}}],"examples":[{"text":"```sqf\ntrim \"        hello, how are you?  \"; // returns \"hello, how are you?\"\n```","code":["trim \"\t\thello, how are you?  \"; // returns \"hello, how are you?\""]},{"code":["\"hewosentence!123\" trim [\"3e1o2hw\", 0]; // returns \"sentence!\""]}],"see_also":["select"]},{"name":"true","title":"true","type":"command","url":"https://community.bistudio.com/wiki/true","revid":369382,"updated":"2024-09-03T18:43:15Z","groups":["Math","Variables"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Always true","syntaxes":[{"syntax":"true","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"text":"```sqf\n_var = true;\nsystemChat str _var; // true\n\nif (_var) then\n{\n    hint \"_var is true!\";\n};\n```","code":["_var = true;\nsystemChat str _var; // true\n\nif (_var) then\n{\n\thint \"_var is true!\";\n};"]}],"see_also":["false"]},{"name":"try","title":"try","type":"command","url":"https://community.bistudio.com/wiki/try","revid":369368,"updated":"2024-09-03T18:43:09Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Defines a try-catch structure. This sets up an exception handling block. Any thrown exception in a try block is caught in a catch block. The structured exception block has the following form:\n\n```sqf\ntry\n{ /* block that can throw exception */ }\ncatch\n{ /* block that processes the exception. Exception is described in the _exception variable */ };\n```","syntaxes":[{"syntax":"try code","params":[{"name":"code","type":"Code","type_expr":"Code"}],"returns":{"type":"Exception Type","type_expr":"Exception handling"},"form":"unary","right":{"text":"code"}},{"syntax":"args try code","since":"arma3 1.54","params":[{"name":"args","type":"Anything","description":"passed arguments, will be put in *_this* variable inside the \"code\"","type_expr":"Anything"},{"name":"code","type":"Code","type_expr":"Code"}],"returns":{"type":"Exception Type","type_expr":"Exception handling"},"form":"binary","left":{"text":"args"},"right":{"text":"code"}}],"examples":[{"code":["try { throw \"invalid argument\" } catch { hint str _exception };"]},{"code":["123 try { if (_this != 123) throw \"invalid argument\" } catch { hint str _exception };"]},{"text":"```sqf\ntry {\n    if (a > b) throw \"Error: some error\"; // OK\n    // the command argument is static\n} catch {\n    hint str _exception;\n};\n\ntry {\n    _someFunc = {\n        // ...\n    };\n    if (a > b) throw (call _someFunc); // NOT OK\n    // the command argument is dynamic\n    // _someFunc is called first to get the value regardless of (a > b) outcome\n} catch {\n    hint str _exception;\n};\n\ntry {\n    _someFunc = {\n        // ...\n    };\n    if (a > b) then {throw (call _someFunc)}; // OK\n    // the command argument is dynamic\n    // _someFunc is only called when (a > b) is true\n} catch {\n    hint str _exception;\n};\n```","code":["try {\n\tif (a > b) throw \"Error: some error\"; // OK\n\t// the command argument is static\n} catch {\n\thint str _exception;\n};\n\ntry {\n\t_someFunc = {\n\t\t// ...\n\t};\n\tif (a > b) throw (call _someFunc); // NOT OK\n\t// the command argument is dynamic\n\t// _someFunc is called first to get the value regardless of (a > b) outcome\n} catch {\n\thint str _exception;\n};\n\ntry {\n\t_someFunc = {\n\t\t// ...\n\t};\n\tif (a > b) then {throw (call _someFunc)}; // OK\n\t// the command argument is dynamic\n\t// _someFunc is only called when (a > b) is true\n} catch {\n\thint str _exception;\n};"]}],"see_also":["Exception handling","throw","catch"],"notes":[{"user":"Killzone_Kid","date":"2015-06-09T20:52:00Z","text":"Do not expect this behave like Javascript try catch and ignore all errors. But it does have one useful behaviour. Normally when a runtime error occurs in SQF (unlike when there is compile error) it continues to execute till the end. But if the script is placed in try {} scope and throw is used upon error, the script immediately terminates, exits the try {} scope and enters catch {} scope. This way it is possible to process possible exceptions in civilised manner."}]},{"name":"turretLocal","title":"turretLocal","type":"command","url":"https://community.bistudio.com/wiki/turretLocal","revid":378399,"updated":"2026-04-04T08:02:12Z","groups":["Turrets"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global"},"description":"Checks if a turret is local.","syntaxes":[{"syntax":"vehicle turretLocal turretPath","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","description":"supports [-1] for driver turret","type_expr":"Turret Path"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}}],"examples":[{"code":["_isLocal = vehicle player turretLocal [0];"]},{"code":["if (heli turretLocal [1]) then { heli setVehicleAmmo 1 };"]},{"code":["if (isNil { heli turretLocal [5] }) then { hint \"Turret 5 is non-existent\" };"]}],"multiplayer":"A vehicle turret will change locality when player gunner gets in it, just like vehicle changes locality when player driver gets in it.\nMany commands for turrets work only where turret is local.\nWhen gunner leaves turret it is supposed to change locality to the locality of the vehicle.","see_also":["turretOwner","setVehicleAmmo","setVehicleAmmoDef","removeWeaponTurret","addWeaponTurret","addMagazineTurret","magazinesTurret","removeMagazinesTurret","removeMagazineTurret","weaponsTurret","currentMagazineDetailTurret","currentMagazineTurret","currentWeaponTurret","selectWeaponTurret","turretUnit","allTurrets"]},{"name":"turretOwner","title":"turretOwner","type":"command","url":"https://community.bistudio.com/wiki/turretOwner","revid":377490,"updated":"2026-01-02T06:49:12Z","groups":["Turrets"],"status":"ok","games":{"arma3":"1.38"},"since":"arma3 1.38","arma3_since":"1.38","locality":{"argument":"global","server_exec":true},"description":"Returns id of the turret's owner. Returns 0 on non-server and SP.","syntaxes":[{"syntax":"vehicle turretOwner turretPath","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","description":"since Arma 3 v2.08 [-1] (driver) is supported","type_expr":"Turret Path"}],"returns":{"type":"Number","type_expr":"Number","description":"owner id"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}}],"examples":[{"code":["_ownerId = vehicle player turretOwner [0];"]}],"multiplayer":"A vehicle turret will change locality when player gunner gets in it, just like vehicle changes locality when player driver gets in it. Many commands for turrets work only where turret is local. When gunner leaves turret it is supposed to change locality to the locality of the vehicle. A vehicle can have one owner while turrets have different owners.","see_also":["owner","setOwner","turretLocal","setVehicleAmmo","setVehicleAmmoDef","removeWeaponTurret","addWeaponTurret","addMagazineTurret","magazinesTurret","removeMagazinesTurret","removeMagazineTurret","weaponsTurret","currentMagazineDetailTurret","currentMagazineTurret","currentWeaponTurret","selectWeaponTurret"]},{"name":"turretUnit","title":"turretUnit","type":"command","url":"https://community.bistudio.com/wiki/turretUnit","revid":377501,"updated":"2026-01-02T06:49:29Z","groups":["Turrets"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the unit in the vehicle turret. To find turret path of known unit, see unitTurret.","syntaxes":[{"syntax":"vehicle turretUnit turretPath","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","description":"since Arma 3 v1.58 [-1] (driver) is supported.","type_expr":"Turret Path"}],"returns":{"type":"Object","type_expr":"Object"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}}],"examples":[{"code":["_vehicle turretUnit _thisTurret;"]},{"code":["vehicle player turretUnit [0];"]}],"see_also":["unitTurret","driver","gunner","commander","effectiveCommander","currentPilot","moveInTurret","assignAsTurret","assignedVehicleRole","lockedTurret","isTurnedOut"]},{"name":"tvAdd","title":"tvAdd","type":"command","url":"https://community.bistudio.com/wiki/tvAdd","revid":378319,"updated":"2026-04-02T16:17:41Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","description":"Adds an item with given text to Tree View control. The position on Tree View where to add the item and the actual path to this item once added are different. If item is added to existing item, then parent item path is used. If no parent exists, empty array [] is used. See Tree View Path for more information.","syntaxes":[{"syntax":"tvAdd [idc, pathParent, text]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"pathParent","type":"Tree View Path","description":"parent item or [] if no parent exists","type_expr":"Tree View Path"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"index of the added item relative to the branch it was added to"},"form":"unary","right":{"text":"[idc, pathParent, text]"}},{"syntax":"control tvAdd [pathParent, text]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"pathParent","type":"Tree View Path","description":"parent item or [] if no parent exists","type_expr":"Tree View Path"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"index of the added item relative to the branch it was added to"},"form":"binary","left":{"text":"control"},"right":{"text":"[pathParent, text]"}}],"examples":[{"code":["_index = _ctrl tvAdd [[], \"Parent Item\"];"]},{"code":["_index = tvAdd [101, [0], \"First item\"];"]}],"see_also":["tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetValue","tvSort","tvSortByValue","tvValue","tvText","tvSetText","tvSetPicture","tvSetPictureColor","tvSetPictureRight","tvSetPictureRightColor"]},{"name":"tvClear","title":"tvClear","type":"command","url":"https://community.bistudio.com/wiki/tvClear","revid":309901,"updated":"2022-05-05T12:16:47Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Removes all items from Tree View with given idc.","syntaxes":[{"syntax":"tvClear idc","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"idc"}},{"syntax":"tvClear control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["tvClear 101;"]}],"see_also":["tvAdd","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvCollapse","title":"tvCollapse","type":"command","url":"https://community.bistudio.com/wiki/tvCollapse","revid":377801,"updated":"2026-01-03T04:01:37Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Collapses tree item pointed to by the path. IDC means id of parent Tree View.","syntaxes":[{"syntax":"tvCollapse [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","description":"[] will collapse the whole tree and it will disappear","type_expr":"Tree View Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control tvCollapse path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","description":"[] will collapse the whole tree and it will disappear","type_expr":"Tree View Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["tvCollapse [101, [0]];"]},{"code":["_ctrl tvCollapse [0];"]}],"see_also":["tvCollapseAll","tvAdd","tvClear","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvCollapseAll","title":"tvCollapseAll","type":"command","url":"https://community.bistudio.com/wiki/tvCollapseAll","revid":309956,"updated":"2022-05-05T12:17:01Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Collapses all tree items for the given Tree View.","syntaxes":[{"syntax":"tvCollapseAll idc","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"idc"}},{"syntax":"tvCollapseAll control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["tvCollapseAll 101;"]},{"code":["tvCollapseAll _ctrl;"]}],"see_also":["tvExpandAll","tvCollapse","tvAdd","tvClear","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvCount","title":"tvCount","type":"command","url":"https://community.bistudio.com/wiki/tvCount","revid":319984,"updated":"2022-05-13T09:25:50Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Returns children count on given path. IDC means id of parent Tree View.","syntaxes":[{"syntax":"tvCount [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"ctrl tvCount path","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"path","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"path"}}],"examples":[{"code":["tvCount [101, [0]];"]},{"code":["_ctrl tvCount [1,0];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvCurSel","title":"tvCurSel","type":"command","url":"https://community.bistudio.com/wiki/tvCurSel","revid":378354,"updated":"2026-04-02T16:36:18Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Returns path to currently selected item. IDC means id of parent Tree View.","syntaxes":[{"syntax":"tvCurSel idc","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Tree View Path","type_expr":"Tree View Path","description":"selected item"},"form":"unary","right":{"text":"idc"}},{"syntax":"tvCurSel control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Tree View Path","type_expr":"Tree View Path","description":"selected item"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["tvCurSel 101;"]},{"code":["tvCurSel _ctrl;"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvData","title":"tvData","type":"command","url":"https://community.bistudio.com/wiki/tvData","revid":378318,"updated":"2026-04-02T16:17:09Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","description":"Returns string data from item on given path. IDC means id of parent CT_TREE.","syntaxes":[{"syntax":"tvData [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control tvData path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["tvData [101, [0]];"]},{"code":["(_display displayCtrl 101) tvData [0];"]}],"see_also":["tvSetData"]},{"name":"tvDelete","title":"tvDelete","type":"command","url":"https://community.bistudio.com/wiki/tvDelete","revid":378380,"updated":"2026-04-04T04:46:06Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Removes an item with given Tree View Path from Tree View.\n\n> [!IMPORTANT]\n> The paths of other items on the same branch after delete operation are updated accordingly; therefore, when deleting multiple entries, start with the one with the highest index and proceed in reverse order.","syntaxes":[{"syntax":"tvDelete [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control tvDelete path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["tvDelete [101, [0, 0]];"]},{"code":["_ctrl tvDelete [0, 0];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvExpand","title":"tvExpand","type":"command","url":"https://community.bistudio.com/wiki/tvExpand","revid":377800,"updated":"2026-01-03T04:01:32Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Expands tree item pointed to by the path. IDC means id of parent Tree View.","syntaxes":[{"syntax":"tvExpand [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","description":"[] will expand the whole tree if it was collapsed previously with []","type_expr":"Tree View Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control tvExpand path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","description":"[] will expand the whole tree if it was collapsed previously with []","type_expr":"Tree View Path"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["tvExpand [101, [0]];"]},{"code":["_ctrl tvExpand [1];"]}],"see_also":["tvExpandAll","tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvExpandAll","title":"tvExpandAll","type":"command","url":"https://community.bistudio.com/wiki/tvExpandAll","revid":330358,"updated":"2022-09-03T09:09:58Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Expands all tree items for the given Tree View.","syntaxes":[{"syntax":"tvExpandAll idc","params":[{"name":"idc","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"idc"}},{"syntax":"tvExpandAll control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["tvExpandAll 101;"]},{"code":["tvExpandAll _ctrl;"]}],"see_also":["tvExpand","tvCollapse","tvCollapseAll"]},{"name":"tvIsSelected","title":"tvIsSelected","type":"command","url":"https://community.bistudio.com/wiki/tvIsSelected","revid":378325,"updated":"2026-04-02T16:30:16Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Returns true if given treeview item is selected.","syntaxes":[{"syntax":"control tvIsSelected path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["_control tvIsSelected [0];"]}],"see_also":["tvSelection","tvSetSelected"]},{"name":"tvPicture","title":"tvPicture","type":"command","url":"https://community.bistudio.com/wiki/tvPicture","revid":378317,"updated":"2026-04-02T16:16:57Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Returns name of picture from item pointed to by path. IDC means id of parent Tree View.","syntaxes":[{"syntax":"tvPicture [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"ctrl tvPicture path","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"path"}}],"examples":[{"code":["tvPicture [101, [0]];"]},{"code":["_ctrl tvPicture [0,0,0];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvPictureRight","title":"tvPictureRight","type":"command","url":"https://community.bistudio.com/wiki/tvPictureRight","revid":378316,"updated":"2026-04-02T16:16:44Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Returns the right picture of a CT_TREE on given path.","syntaxes":[{"syntax":"tvPictureRight [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String","description":"path to picture"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"ctrl tvPictureRight path","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String","description":"path to picture"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"path"}}],"examples":[{"code":["private _result = _controlTV tvPictureRight [0, 0];"]}],"see_also":["tvSetPictureRight","tvSetPicture","tvPicture"]},{"name":"tvSelection","title":"tvSelection","type":"command","url":"https://community.bistudio.com/wiki/tvSelection","revid":378378,"updated":"2026-04-04T04:45:23Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Returns array of paths to selected items.","syntaxes":[{"syntax":"tvSelection control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Tree View Path","type_expr":"Tree View Path"},"form":"unary","right":{"text":"control"}}],"examples":[{"code":["private _selection = tvSelection _ctrlTV;"]}],"see_also":["tvSetSelected","tvIsSelected"]},{"name":"tvSetColor","title":"tvSetColor","type":"command","url":"https://community.bistudio.com/wiki/tvSetColor","revid":379537,"updated":"2026-10-31T00:52:02Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","description":"Sets text color on given Tree View Item","syntaxes":[{"syntax":"control tvSetColor [path, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, color]"}}],"examples":[{"code":["_ctrl tvSetColor [[0,0], [1,0,0,1]];"]}],"see_also":["tvDelete","tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvSetCurSel","title":"tvSetCurSel","type":"command","url":"https://community.bistudio.com/wiki/tvSetCurSel","revid":369062,"updated":"2024-09-02T20:24:55Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","description":"Sets cursor to given item on given path. IDC means id of parent Tree View. To deselect all items use [-1] for the path param (*available since Arma 3 v1.56*)","syntaxes":[{"syntax":"tvSetCurSel [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control tvSetCurSel path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["tvSetCurSel [101, [0]];"]},{"code":["_ctrl tvSetCurSel [0,0,0];"]},{"text":"```sqf\n0 spawn\n{\n    disableSerialization;\n    _CT_TREE = findDisplay 46 ctrlCreate [\"RscTree\", -1];\n    _CT_TREE ctrlSetPosition [0,0,0.3,1];\n    _CT_TREE ctrlCommit 0;\n    _CT_TREE tvAdd [[],\"Parent_A\"];\n    _CT_TREE tvAdd [[0],\"Child_A\"];\n    _CT_TREE tvAdd [[0,0],\"Grandchild_A\"];\n    _CT_TREE tvAdd [[],\"Parent_B\"];\n    _CT_TREE tvAdd [[1],\"Child_B\"];\n    sleep 1;\n    hint \"SELECT [0,0,0]\";\n    _CT_TREE tvSetCurSel [0,0,0];\n    sleep 2;\n    hint \"DESELECT ALL\";\n    _CT_TREE tvSetCurSel [-1];\n};\n```","code":["0 spawn\n{\n\tdisableSerialization;\n\t_CT_TREE = findDisplay 46 ctrlCreate [\"RscTree\", -1];\n\t_CT_TREE ctrlSetPosition [0,0,0.3,1];\n\t_CT_TREE ctrlCommit 0;\n\t_CT_TREE tvAdd [[],\"Parent_A\"];\n\t_CT_TREE tvAdd [[0],\"Child_A\"];\n\t_CT_TREE tvAdd [[0,0],\"Grandchild_A\"];\n\t_CT_TREE tvAdd [[],\"Parent_B\"];\n\t_CT_TREE tvAdd [[1],\"Child_B\"];\n\tsleep 1;\n\thint \"SELECT [0,0,0]\";\n\t_CT_TREE tvSetCurSel [0,0,0];\n\tsleep 2;\n\thint \"DESELECT ALL\";\n\t_CT_TREE tvSetCurSel [-1];\n};"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvSetData","title":"tvSetData","type":"command","url":"https://community.bistudio.com/wiki/tvSetData","revid":378314,"updated":"2026-04-02T16:15:57Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Sets string data to item on given path. IDC means id of parent Tree View.","syntaxes":[{"syntax":"tvSetData [idc, path, data]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"data","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, data]"}},{"syntax":"ctrl tvSetData [path, data]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"data","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[path, data]"}}],"examples":[{"code":["tvSetData [101, [0], \"Test data\"];"]},{"code":["_ctrl tvSetData [[0,0,0], \"Test data\"];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvSetPicture","title":"tvSetPicture","type":"command","url":"https://community.bistudio.com/wiki/tvSetPicture","revid":378315,"updated":"2026-04-02T16:16:24Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","description":"Sets picture to item selected by path. IDC means id of parent Tree View. Name is picture name. The picture is searched in the mission directory.\n\n> [!NOTE]\n> - Adding pictures to lists is very slow. In order to prevent the filling of the list to be slowed down, add the pictures in a **scheduled** environment - See Example 3.\n>\n> One drawback of this method is that sorting the entries is not easily possible.\n>\n> - If not all items have a picture but you still want them to be aligned at the front, use a Procedural Texture that is transparent `#(rgb,32,32,3)color(1,1,1,0)`.","syntaxes":[{"syntax":"tvSetPicture [idc, path, name]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, name]"}},{"syntax":"control tvSetPicture [path, name]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"name","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, name]"}}],"examples":[{"code":["tvSetPicture [101, [0], \"picture\"];"]},{"code":["_ctrl tvSetPicture [[0,0,0], getText (configFile >> \"CfgWeapons\" >> \"optic_NVS\" >> \"picture\")];"]},{"text":"Adding images in a scheduled environment:\n\n```sqf\nprivate _path = _ctrlTV tvAdd [[], \"Some Entry\"];\n[_ctrlTV, _path] spawn {\n    (_this select 0) tvSetPictureRight [[_this select 1], \"someImage.paa\"];\n};\n```","code":["private _path = _ctrlTV tvAdd [[], \"Some Entry\"];\n[_ctrlTV, _path] spawn {\n\t(_this select 0) tvSetPictureRight [[_this select 1], \"someImage.paa\"];\n};"]}],"see_also":["tvPicture","tvSetPictureColor","tvSetPictureRight","tvSetPictureRightColor"]},{"name":"tvSetPictureColor","title":"tvSetPictureColor","type":"command","url":"https://community.bistudio.com/wiki/tvSetPictureColor","revid":377815,"updated":"2026-01-03T04:13:41Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Sets the colour of the picture (set via tvSetPicture) under the specified tree view path.","syntaxes":[{"syntax":"tvSetPictureColor [idc, path, color]","params":[{"name":"idc","type":"Number","description":"IDC of the tree view control","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, color]"}},{"syntax":"ctrl tvSetPictureColor [path, color]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[path, color]"}}],"examples":[{"code":["tvSetPictureColor [101, [0,2], [1,0,1,1]];"]},{"code":["_tree tvSetPictureColor [[0,2], [1,0,1,1]];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvSetPictureColorDisabled","title":"tvSetPictureColorDisabled","type":"command","url":"https://community.bistudio.com/wiki/tvSetPictureColorDisabled","revid":377792,"updated":"2026-01-03T01:40:08Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Sets the color of left picture of a tree item defined by path when that item is disabled.","syntaxes":[{"syntax":"control tvSetPictureColorDisabled [path, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, color]"}}],"examples":[{"code":["_control tvSetPictureColorDisabled [[0], [1,0,1,1]];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetValue","tvSort","tvSortByValue","tvValue","tvText","tvSetText","tvSetPicture","tvSetPictureColor","tvSetPictureRight","tvSetPictureColorSelected","tvSetPictureRightColor","tvSetPictureRightColorSelected","tvSetPictureRightColorDisabled"]},{"name":"tvSetPictureColorSelected","title":"tvSetPictureColorSelected","type":"command","url":"https://community.bistudio.com/wiki/tvSetPictureColorSelected","revid":377366,"updated":"2026-01-02T06:40:38Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Sets the color of the left picture of a tree item defined by path when item is selected","syntaxes":[{"syntax":"control tvSetPictureColorSelected [path, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Array of Numbers","description":"path to tree view item","type_expr":"Array<Number>"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, color]"}}],"examples":[{"code":["_control tvSetPictureColorSelected [[0], [1,0,1,1]];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetValue","tvSort","tvSortByValue","tvValue","tvText","tvSetText","tvSetPicture","tvSetPictureColor","tvSetPictureRight","tvSetPictureColorDisabled","tvSetPictureRightColor","tvSetPictureRightColorSelected","tvSetPictureRightColorDisabled"]},{"name":"tvSetPictureRight","title":"tvSetPictureRight","type":"command","url":"https://community.bistudio.com/wiki/tvSetPictureRight","revid":377788,"updated":"2026-01-03T01:40:00Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Sets right picture on the tree view item defined by path.","syntaxes":[{"syntax":"tvSetPictureRight [idc, path, name]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"name","type":"String","description":"picture texture","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, name]"}},{"syntax":"control tvSetPictureRight [path, name]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"name","type":"String","description":"picture texture","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, name]"}}],"examples":[{"code":["tvSetPictureRight [101, [0], \"picture\"];"]},{"code":["_ctrl tvSetPictureRight [[0], \"picture\"];"]}],"see_also":["tvPictureRight","tvSetPicture","tvPicture"],"notes":[{"user":"R3vo","date":"2021-04-05T12:14:00Z","text":"> [!NOTE]\n> Adding pictures to lists is very slow. In order to prevent the filling of the list to be slowed down, add the pictures in the **scheduled** environment.\n>\n> One drawback of that method is, that sorting the entries is not easily possible.\n>\n> ```sqf\n> private _path = _ctrlTV tvAdd [[], \"Some Entry\"];\n> [_ctrlTV, _path] spawn\n> {\n>     (_this select 0) tvSetPictureRight [[_this select 1], \"someImage.paa\"];\n> };\n> ```"}]},{"name":"tvSetPictureRightColor","title":"tvSetPictureRightColor","type":"command","url":"https://community.bistudio.com/wiki/tvSetPictureRightColor","revid":377790,"updated":"2026-01-03T01:40:04Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Sets color of the right picture on the tree view item defined by path","syntaxes":[{"syntax":"tvSetPictureRightColor [idc, path, color]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, color]"}},{"syntax":"control tvSetPictureRightColor [path, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, color]"}}],"examples":[{"code":["tvSetPictureRightColor [101, [0], [1,0,1,1]];"]},{"code":["_ctrl tvSetPictureRightColor [[0], [1,0,1,1]];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetValue","tvSort","tvSortByValue","tvValue","tvText","tvSetText","tvSetPicture","tvSetPictureColor","tvSetPictureRight","tvSetPictureColorSelected","tvSetPictureColorDisabled","tvSetPictureRightColorSelected","tvSetPictureRightColorDisabled"]},{"name":"tvSetPictureRightColorDisabled","title":"tvSetPictureRightColorDisabled","type":"command","url":"https://community.bistudio.com/wiki/tvSetPictureRightColorDisabled","revid":377789,"updated":"2026-01-03T01:40:03Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Sets the color of the right picture of a tree item defined by path when item is disabled","syntaxes":[{"syntax":"control tvSetPictureRightColorDisabled [path, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, color]"}}],"examples":[{"code":["_control tvSetPictureRightColorDisabled [[0], [1,0,1,1]];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetValue","tvSort","tvSortByValue","tvValue","tvText","tvSetText","tvSetPicture","tvSetPictureColor","tvSetPictureRight","tvSetPictureColorSelected","tvSetPictureColorDisabled","tvSetPictureRightColor","tvSetPictureRightColorSelected"]},{"name":"tvSetPictureRightColorSelected","title":"tvSetPictureRightColorSelected","type":"command","url":"https://community.bistudio.com/wiki/tvSetPictureRightColorSelected","revid":377791,"updated":"2026-01-03T01:40:06Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Sets the color of the right picture of a tree item defined by path when item is selected","syntaxes":[{"syntax":"control tvSetPictureRightColorSelected [path, color]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, color]"}}],"examples":[{"code":["_control tvSetPictureRightColorSelected [[0], [1,0,1,1]];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetValue","tvSort","tvSortByValue","tvValue","tvText","tvSetText","tvSetPicture","tvSetPictureColor","tvSetPictureRight","tvSetPictureColorSelected","tvSetPictureColorDisabled","tvSetPictureRightColor","tvSetPictureRightColorDisabled"]},{"name":"tvSetSelectColor","title":"tvSetSelectColor","type":"command","url":"https://community.bistudio.com/wiki/tvSetSelectColor","revid":377360,"updated":"2026-01-02T06:40:27Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Sets the select color of given path.","syntaxes":[{"syntax":"ctrl tvSetSelectColor [path, color]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"path","type":"Array of Numbers","description":"path of the item","type_expr":"Array<Number>"},{"name":"color","type":"Color (RGBA)","type_expr":"Color"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[path, color]"}}],"examples":[{"code":["_control tvSetSelectColor [[0, 0], [1,1,1,0.5]];"]}],"see_also":["tvSetColor"]},{"name":"tvSetSelected","title":"tvSetSelected","type":"command","url":"https://community.bistudio.com/wiki/tvSetSelected","revid":378326,"updated":"2026-04-02T16:30:29Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Sets the selection state of given treeview item in multi-select control.","syntaxes":[{"syntax":"control tvSetSelected [path, selected]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"selected","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, selected]"}}],"examples":[{"code":["_control tvSetSelected [[0], true];"]}],"see_also":["tvSelection","tvIsSelected"]},{"name":"tvSetText","title":"tvSetText","type":"command","url":"https://community.bistudio.com/wiki/tvSetText","revid":321506,"updated":"2022-05-17T11:22:38Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Sets string text to item on given path. IDC means id of parent Tree View.","syntaxes":[{"syntax":"tvSetText [idc, path, text]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Array of Numbers","type_expr":"Array<Number>"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, text]"}},{"syntax":"control tvSetText [path, text]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Array of Numbers","type_expr":"Array<Number>"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, text]"}}],"examples":[{"code":["tvSetText [101, [0], \"Test data\"];"]},{"code":["_ctrl tvSetText [[0,0,0], \"Test data\"];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvSetTooltip","title":"tvSetTooltip","type":"command","url":"https://community.bistudio.com/wiki/tvSetTooltip","revid":377817,"updated":"2026-01-03T04:13:45Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Sets the tooltip text associated with the specified tree view path.","syntaxes":[{"syntax":"tvSetTooltip [idc, path, text]","params":[{"name":"idc","type":"Number","description":"IDC of the tree view control","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, text]"}},{"syntax":"ctrl tvSetTooltip [path, text]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"},{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[path, text]"}}],"examples":[{"code":["tvSetTooltip [101, [0,2], \"This is a tooltip\"];"]},{"code":["_tree tvSetTooltip [[0,2], \"This is a tooltip\"];"]}],"see_also":["tvTooltip","tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvSetValue","title":"tvSetValue","type":"command","url":"https://community.bistudio.com/wiki/tvSetValue","revid":321508,"updated":"2022-05-17T11:23:14Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Sets scalar data to item on given path. IDC means id of parent Tree View. If the given value is not integer, it will be converted to integer","syntaxes":[{"syntax":"tvSetValue [idc, path, val]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Array of Numbers","type_expr":"Array<Number>"},{"name":"val","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, val]"}},{"syntax":"ctrl tvSetValue [path, val]","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"path","type":"Array of Numbers","type_expr":"Array<Number>"},{"name":"val","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"[path, val]"}}],"examples":[{"code":["tvSetValue [101, [0], 555];"]},{"code":["_ctrl tvSetValue [[0,0,0], 14];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvSort","title":"tvSort","type":"command","url":"https://community.bistudio.com/wiki/tvSort","revid":377597,"updated":"2026-01-02T07:01:07Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","description":"Sorts all children of given path. Text of Tree View entries is used for sorting.","syntaxes":[{"syntax":"control tvSort [path, reversed]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","description":"the parent item to sort","type_expr":"Tree View Path"},{"name":"reversed","type":"Boolean","optional":true,"default":"false","description":"true to reverse sort it","type_expr":"Boolean","text":"reversed: Boolean - (Optional, default false) true to reverse sort it"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, reversed]"}},{"syntax":"tvSort [idc, path, reversed]","params":[{"name":"idc","type":"Number","description":"control idc","type_expr":"Number"},{"name":"path","type":"Tree View Path","description":"the parent item to sort","type_expr":"Tree View Path"},{"name":"reversed","type":"Boolean","optional":true,"default":"false","description":"true to reverse sort it","type_expr":"Boolean","text":"reversed: Boolean - (Optional, default false) true to reverse sort it"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, reversed]"}}],"examples":[{"code":["control tvSort [[0], true];"]},{"code":["tvSort [102, [0], true];"]}],"see_also":["lbSortBy","lnbSortBy","tvSortAll","tvSortByValue","tvSortByValueAll"]},{"name":"tvSortAll","title":"tvSortAll","type":"command","url":"https://community.bistudio.com/wiki/tvSortAll","revid":377598,"updated":"2026-01-02T07:01:08Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Sorts all children, including trees deriving from given path. Text of Tree View entries is used for sorting.","syntaxes":[{"syntax":"control tvSortAll [path, reversed]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","description":"path to start sorting from","type_expr":"Tree View Path"},{"name":"reversed","type":"Boolean","description":"true to reverse sort it.","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, reversed]"}}],"examples":[{"code":["_ctrl tvSortAll [[], false]; // sorts the complete Tree View"]}],"see_also":["tvSort","tvSortByValue","tvSortByValueAll"]},{"name":"tvSortByValue","title":"tvSortByValue","type":"command","url":"https://community.bistudio.com/wiki/tvSortByValue","revid":378381,"updated":"2026-04-04T04:47:06Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","description":"Sorts all children of given path. Value of Tree View entries is used for sorting. tvSetValue can be used to set the value for a given path.","syntaxes":[{"syntax":"control tvSortByValue [path, ascending]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","description":"the parent item to sort","type_expr":"Tree View Path"},{"name":"ascending","type":"Boolean","optional":true,"default":"false","description":"true to sort ascending, else descending","type_expr":"Boolean","text":"ascending: Boolean - (Optional, default false) true to sort ascending, else descending"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, ascending]"}},{"syntax":"tvSortByValue [idc, path, ascending]","params":[{"name":"idc","type":"Number","description":"control idc","type_expr":"Number"},{"name":"path","type":"Tree View Path","description":"the parent item to sort","type_expr":"Tree View Path"},{"name":"ascending","type":"Boolean","optional":true,"default":"false","description":"true to sort ascending, else descending.","type_expr":"Boolean","text":"ascending: Boolean - (Optional) true to sort ascending, else descending. Default: false"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"[idc, path, ascending]"}}],"examples":[{"code":["control tvSortByValue [[0], false];"]},{"code":["tvSortByValue [102, [0], false];"]}],"see_also":["lbSortBy","lnbSortBy","tvSortAll","tvSort","tvSortByValueAll"]},{"name":"tvSortByValueAll","title":"tvSortByValueAll","type":"command","url":"https://community.bistudio.com/wiki/tvSortByValueAll","revid":378327,"updated":"2026-04-02T16:30:32Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Sorts all children, including trees deriving from given path. Value of Tree View entries is used for sorting.","syntaxes":[{"syntax":"control tvSortByValueAll [path, reversed]","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","description":"path to start sorting from","type_expr":"Tree View Path"},{"name":"reversed","type":"Boolean","description":"true to reverse sort it.","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"[path, reversed]"}}],"examples":[{"code":["_ctrl tvSortByValueAll [[], false]; // Sorts the complete Tree View"]}],"see_also":["tvSort","tvSortByValue","tvSortAll"]},{"name":"tvText","title":"tvText","type":"command","url":"https://community.bistudio.com/wiki/tvText","revid":330021,"updated":"2022-08-15T14:44:30Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","description":"Returns shown text in the item on given path. IDC means id of parent Tree View.","syntaxes":[{"syntax":"tvText [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"control tvText path","params":[{"name":"control","type":"Control","type_expr":"Control"},{"name":"path","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"String","type_expr":"String"},"form":"binary","left":{"text":"control"},"right":{"text":"path"}}],"examples":[{"code":["tvText [101, [0]];"]},{"code":["_ctrl tvText [0,0,0];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvValue","tvSetText"]},{"name":"tvTooltip","title":"tvTooltip","type":"command","url":"https://community.bistudio.com/wiki/tvTooltip","revid":377816,"updated":"2026-01-03T04:13:43Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Gets the tooltip text associated with the specified tree view path.","syntaxes":[{"syntax":"tvTooltip [idc, path]","params":[{"name":"idc","type":"Number","description":"IDC of the tree view control","type_expr":"Number"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String","description":"tooltip text"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"ctrl tvTooltip path","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"path","type":"Tree View Path","type_expr":"Tree View Path"}],"returns":{"type":"String","type_expr":"String","description":"tooltip text"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"path"}}],"examples":[{"code":["_text = tvTooltip [101, [0,2]];"]},{"code":["_text = _treeCtrl tvTooltip [0,2];"]}],"see_also":["tvSetTooltip","tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText","tvValue"]},{"name":"tvValue","title":"tvValue","type":"command","url":"https://community.bistudio.com/wiki/tvValue","revid":347317,"updated":"2023-09-10T15:24:11Z","groups":["GUI Control - Tree View"],"status":"ok","games":{"arma3":"0.74"},"since":"arma3 0.74","arma3_since":"0.74","locality":{"argument":"local","effect":"local"},"description":"Returns numeric value set for given tree view path.","syntaxes":[{"syntax":"tvValue [idc, path]","params":[{"name":"idc","type":"Number","type_expr":"Number"},{"name":"path","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Number","type_expr":"Number","description":"set value; if no value was set, 0 is returned"},"form":"unary","right":{"text":"[idc, path]"}},{"syntax":"ctrl tvValue path","params":[{"name":"ctrl","type":"Control","type_expr":"Control"},{"name":"path","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Number","type_expr":"Number","description":"set value; if no value was set, 0 is returned"},"form":"binary","left":{"text":"ctrl"},"right":{"text":"path"}}],"examples":[{"code":["tvValue [101, [0]];"]},{"code":["_ctrl tvValue [0,0,0];"]}],"see_also":["tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetValue","tvSort","tvSortByValue","tvText"]},{"name":"type","title":"type","type":"command","url":"https://community.bistudio.com/wiki/type","revid":319936,"updated":"2022-05-13T09:25:45Z","groups":["Locations","Briefing"],"status":"ok","games":{"arma1":"1.08","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.08","arma3_since":"0.50","description":"Returns a string of a Location's class name or Task's name (same as taskName).","syntaxes":[{"syntax":"type location","params":[{"name":"location","type":"Location","type_expr":"Location"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"location"}},{"syntax":"type task","params":[{"name":"task","type":"Task","type_expr":"Task"}],"returns":{"type":"String","type_expr":"String","description":"the type of the task"},"form":"unary","right":{"text":"task"}}],"examples":[{"code":["_locationType = type myLocation;"]},{"code":["_taskName = type myTask;"]}],"see_also":["setType"]},{"name":"typeName","title":"typeName","type":"command","url":"https://community.bistudio.com/wiki/typeName","revid":379033,"updated":"2026-09-22T13:56:05Z","groups":["Variables"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the Data Type of an expression.\n\nThe type is returned as on of the following all-uppercase strings:\n\n- \"ARRAY\"\n- \"BOOL\"\n- \"CODE\"\n- \"CONFIG\"\n- \"CONTROL\"\n- \"DISPLAY\"\n- \"GROUP\"\n- \"OBJECT\"\n- \"SCALAR\" (and \"NaN\")\n- \"SCRIPT\"\n- \"SIDE\"\n- \"STRING\"\n- \"TEXT\"\n- Armed Assault v1.08 \"LOCATION\"\n- Arma 2 v1.00 \"TEAM_MEMBER\"\n- Arma 2 v1.00 \"NAMESPACE\"\n- Arma 2 v1.00 \"DIARY_RECORD\"\n- Arma 2 v1.00 \"TASK\"\n- Arma 3 v2.02 \"HASHMAP\"\n- Arma 3 v2.24 \"NetObject\"\n\nThey represent the available Data Types in Arma.\n\n> [!NOTE]\n> **Arma 3:** For type comparison, use isEqualType command instead.","syntaxes":[{"syntax":"typeName anything","params":[{"name":"anything","type":"Anything","type_expr":"Anything"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"anything"}}],"examples":[{"code":["_msg = \"hello\"; _result = typeName _msg;  //_result will be \"STRING\""]},{"code":["_unit = player; _result = typeName _unit; //_result becomes \"OBJECT\""]},{"text":"Values representing direct Data Types:\n\n```sqf\nhint typeName 0;                    // SCALAR\nhint typeName 1e39;                    // NaN\nhint typeName \"\";                    // STRING\nhint typeName true;                    // BOOL\nhint typeName [];                    // ARRAY\nhint typeName {};                    // CODE\nhint typeName scriptNull;            // SCRIPT (since Arma 3 v1.32)\nhint typeName objNull;                // OBJECT\nhint typeName grpNull;                // GROUP\nhint typeName controlNull;            // CONTROL\nhint typeName teamMemberNull;        // TEAM_MEMBER (since Arma 2 v1.00)\nhint typeName displayNull;            // DISPLAY\nhint typeName taskNull;                // TASK (since Arma 2 v1.00)\nhint typeName locationNull;            // LOCATION\nhint typeName sideUnknown;            // SIDE\nhint typeName text \"\";                // TEXT\nhint typeName configFile;            // CONFIG\nhint typeName configNull;            // CONFIG (since Arma 3 v1.54)\nhint typeName missionNamespace;        // NAMESPACE\nhint typeName diaryRecordNull;        // DIARY_RECORD (since Arma 3 v2.00)\nhint typeName createHashMap;        // HASHMAP (since Arma 3 v2.02)\nhint typeName netObjNull;            // NetObject (works as intended since Arma 3 v2.24)\n```","code":["hint typeName 0;\t\t\t\t\t// SCALAR\nhint typeName 1e39;\t\t\t\t\t// NaN\nhint typeName \"\";\t\t\t\t\t// STRING\nhint typeName true;\t\t\t\t\t// BOOL\nhint typeName [];\t\t\t\t\t// ARRAY\nhint typeName {};\t\t\t\t\t// CODE\nhint typeName scriptNull;\t\t\t// SCRIPT (since Arma 3 v1.32)\nhint typeName objNull;\t\t\t\t// OBJECT\nhint typeName grpNull;\t\t\t\t// GROUP\nhint typeName controlNull;\t\t\t// CONTROL\nhint typeName teamMemberNull;\t\t// TEAM_MEMBER (since Arma 2 v1.00)\nhint typeName displayNull;\t\t\t// DISPLAY\nhint typeName taskNull;\t\t\t\t// TASK (since Arma 2 v1.00)\nhint typeName locationNull;\t\t\t// LOCATION\nhint typeName sideUnknown;\t\t\t// SIDE\nhint typeName text \"\";\t\t\t\t// TEXT\nhint typeName configFile;\t\t\t// CONFIG\nhint typeName configNull;\t\t\t// CONFIG (since Arma 3 v1.54)\nhint typeName missionNamespace;\t\t// NAMESPACE\nhint typeName diaryRecordNull;\t\t// DIARY_RECORD (since Arma 3 v2.00)\nhint typeName createHashMap;\t\t// HASHMAP (since Arma 3 v2.02)\nhint typeName netObjNull;\t\t    // NetObject (works as intended since Arma 3 v2.24)"]},{"code":["if (typeName _this != \"ARRAY\") exitWith { hint \"_this is not an array!\" };\n// is the same as\nif (typeName _this != typeName []) exitWith { hint \"_this is not an array!\" };\n// same result but faster in Arma 3\nif !(_this isEqualType []) exitWith { hint \"_this is not an array!\" };"]}],"see_also":["isEqualTypeAll","isEqualType","isEqualTypeParams","isEqualTypeArray","isEqualTypeAny","typeOf","isKindOf","isClass","isArray","isNumber","isText","isNil","isNull"],"notes":[{"user":"Killzone_Kid","date":"2016-09-25T11:14:00Z","text":"typeName of nil is `ANY`, however this is not possible to test as script command is just ignored when any argument is nil."}]},{"name":"typeOf","title":"typeOf","type":"command","url":"https://community.bistudio.com/wiki/typeOf","revid":379309,"updated":"2026-10-30T23:49:22Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.90","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.90","arma3_since":"0.50","description":"Returns the class name of given target.","syntaxes":[{"syntax":"typeOf target","params":[{"name":"target","type":"Object, Arma 3 v2.22 Control or Arma 3 v2.22 Display","type_expr":"Object | Control | Display"}],"returns":{"type":"String","type_expr":"String","description":"config class name, or empty string if target does not have a class","text":"String - config class name, or empty string if *target* does not have a class"},"form":"unary","right":{"text":"target"}}],"examples":[{"code":["if (typeOf vehicle player == \"B_Heli_Light_01_armed_F\") then { hint \"Player is in a AH-9 Pawnee\"; };"]},{"code":["// Since 2.22\ntypeOf (findDisplay 313); // \"Display3DEN\""]}],"see_also":["countType","isKindOf","configOf","ctrlClassName"],"notes":[{"user":"Hardrock","date":"2006-08-04T12:03:00Z","text":"Try using this on an object pre-placed in the mission editor such as a house:\n\n```sqf\nhint typeOf _object; // Shows the class name (XXX)\n```\n\nNow place an object in the editor, save the map, and open up the Mission.sqm. Find the line: vehicle = \"XXX\", and replace XXX with the name of the object that you found above.\nSave it, and load the map. This method is no longer available since Armed Assault."}]},{"name":"UAVControl","title":"UAVControl","type":"command","url":"https://community.bistudio.com/wiki/UAVControl","revid":378036,"updated":"2026-01-27T09:56:36Z","groups":["Remote Control"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","locality":{"argument":"global"},"description":"Returns array with current operator of UAV and his vehicle role in UAV.\nIf nobody is controlling the UAV, the command tries to find if player has terminal connected to this UAV.\nIf nobody is connected, objNull is used as returned operator (see Example 2).\nThe possible outputs are:\n\n- [objNull, \"\"] - nobody is controlling UAV but there maybe an abandoned terminal connected to the UAV, which will auto-disconnect when a new connection to the UAV is made\n- [somePlayer1, \"DRIVER\"] - some player (could be remote) is a pilot, the gunner seat is empty\n- [somePlayer2, \"GUNNER\"] - some player (could be remote) is a gunner, the pilot seat is empty\n- [somePlayer1, \"DRIVER\", somePlayer2, \"GUNNER\"] - some players (could be remote) control both the pilot and the gunner seats\n- [player, \"\"] - local player has terminal connected to this UAV\n\nThe UAV terminals are local to the players so only local terminal connections are returned.\n\n> [!NOTE]\n> This command works only for vehicles, to get a unit remote-controlling a unit, see remoteControlled and remoteControl - Example 4.\n>\n> While main syntax can only return remote players when they are controlling either pilot or gunner, the alternative syntax can also return all remote players connected with terminals to given UAV.","syntaxes":[{"syntax":"UAVControl uav","params":[{"name":"uav","type":"Object","type_expr":"Object"}],"returns":{"type_expr":"Array","description":"- Array with [unit, vehicleRole] - unit: Object - UAV operator - vehicleRole: String - vehicle role of the operator in UAV. Can be \"DRIVER\", \"GUNNER\" or \"\" (not in control) - Arma 3 v1.96 Array with [unit, vehicleRole, unit2, vehicleRole2] (see Example 2) - unit: Object - UAV operator - vehicleRole: String - vehicle role of the operator in UAV. Can be \"DRIVER\", \"GUNNER\" or \"\" (not in control) - unit2: Object - see Example 2 - vehicleRole2: Can be \"DRIVER\", \"GUNNER\", or \"\". (see Example 2)","text":"- Array with [unit, vehicleRole]\n  - unit: Object - UAV operator\n  - vehicleRole: String - vehicle role of the operator in UAV. Can be \"DRIVER\", \"GUNNER\" or \"\" (not in control)\n- Arma 3 v1.96 Array with [unit, vehicleRole, unit2, vehicleRole2] (see Example 2)\n  - unit: Object - UAV operator\n  - vehicleRole: String - vehicle role of the operator in UAV. Can be \"DRIVER\", \"GUNNER\" or \"\" (not in control)\n  - unit2: Object - see Example 2\n  - vehicleRole2: Can be \"DRIVER\", \"GUNNER\", or \"\". (see Example 2)"},"form":"unary","right":{"text":"uav"}},{"syntax":"UAVControl [uav, option]","since":"arma3 2.22","params":[{"name":"uav","type":"Object","description":"uav vehicle","type_expr":"Object"},{"name":"option","type":"String","description":"output option, could be one of the following:\n\n- \"driver\" - player controlling UAV pilot\n- \"gunner\" - player controlling UAV gunner\n- \"crew\" - both driver and gunner in that order\n- \"all\" - all the players currently connected to the UAV with their terminals (dead players will show up until they are completely braindead (respawned for example))\n- \"allbutcrew\" - same as \"all\" but excluding driver and pilot\n- \"allbutdead\" - same as \"all\" but excluding dead players","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"[player1], [player1, player2] or [player1, player2,...playerN]"},"form":"unary","right":{"text":"[uav, option]"}}],"examples":[{"code":["private _result = UAVControl _myUAV;"]},{"text":"Since Arma 3 v1.96 this command returns both driver and gunner units if the UAV is controlled by 2 players. Here is the list of all expected outputs:\n\n```sqf\n[player1, \"DRIVER\"]; // player1 is controlling the UAV and is the pilot\n[player2, \"GUNNER\"]; // player2 is controlling the UAV and is the gunner\n[player1, \"DRIVER\", player2, \"GUNNER\"]; // player1 is controlling the UAV as the pilot, player2 is controlling the UAV as the gunner\n[player3, \"\"]; // no one is controlling the UAV, player3 is connected to the UAV via terminal, but not controlling it yet\n[objNull, \"\"]; // nobody is controlling but there maybe an abandoned terminal connected to the UAV,\n               // which will auto-disconnect when a new connection to the UAV is made\n```","code":["[player1, \"DRIVER\"]; // player1 is controlling the UAV and is the pilot\n[player2, \"GUNNER\"]; // player2 is controlling the UAV and is the gunner\n[player1, \"DRIVER\", player2, \"GUNNER\"]; // player1 is controlling the UAV as the pilot, player2 is controlling the UAV as the gunner\n[player3, \"\"]; // no one is controlling the UAV, player3 is connected to the UAV via terminal, but not controlling it yet\n[objNull, \"\"]; // nobody is controlling but there maybe an abandoned terminal connected to the UAV, \n               // which will auto-disconnect when a new connection to the UAV is made"]}],"see_also":["showUAVFeed","shownUAVFeed","allUnitsUAV","getConnectedUAV","connectTerminalToUAV","isUAVConnected","remoteControl","currentPilot","isRemoteControlling","remoteControlled"]},{"name":"uiNamespace","title":"uiNamespace","type":"command","url":"https://community.bistudio.com/wiki/uiNamespace","revid":353040,"updated":"2024-03-12T11:58:15Z","groups":["Namespaces","Variables","GUI Control"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the global namespace attached to user interface.","syntaxes":[{"syntax":"uiNamespace","params":[],"returns":{"type":"Namespace","type_expr":"Namespace"},"form":"nullary"}],"examples":[{"code":["uiNamespace setVariable [\"LIB_interruptDisplay\", _display];"]},{"text":"```sqf\nuiNamespace setVariable [\"myVar\", 46];\nwith uiNamespace do\n{\n    hint str myVar; // 46\n};\n```","code":["uiNamespace setVariable [\"myVar\", 46];\nwith uiNamespace do\n{\n\thint str myVar; // 46\n};"]}],"see_also":["missionNamespace","currentNamespace","parsingNamespace","profileNamespace","localNamespace","allVariables","with","do","ArmA: Editing"]},{"name":"uiSleep","title":"uiSleep","type":"command","url":"https://community.bistudio.com/wiki/uiSleep","revid":370497,"updated":"2024-12-26T17:41:42Z","groups":["Program Flow"],"status":"ok","games":{"arma2":"1.05","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.05","arma3_since":"0.50","description":"Suspend execution of script for given uiTime. uiSleep is a sleep method to delay script execution where script time/simulation time is stopped.\nuiSleep is basically using the system time (uiTime more specifically) and not simulation time.\nSo in the cases where sleep would get stuck indefinitely, uiSleep can still be used to effectively delay script execution for example in pause or in a mission briefing or an editor or when simulation is paused in general.","syntaxes":[{"syntax":"uiSleep delay","params":[{"name":"delay","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"delay"}}],"examples":[{"text":"In singleplayer:\n\n```sqf\nsetAccTime 0.25;    // slows down time\nsleep 1;            // waits for 1 second in-game, 4 IRL seconds (1 / 0.25)\n\nsetAccTime 0;        // freezes simulation\n// sleep 1;            // would wait forever\nuiSleep 1;            // waits for 1 IRL second\n```","code":["setAccTime 0.25;\t// slows down time\nsleep 1;\t\t\t// waits for 1 second in-game, 4 IRL seconds (1 / 0.25)\n\nsetAccTime 0;\t\t// freezes simulation\n// sleep 1;\t\t\t// would wait forever\nuiSleep 1;\t\t\t// waits for 1 IRL second"]}],"see_also":["uiTime","sleep","waitUntil","canSuspend","spawn","execVM","Control Structures","sleep vs uiSleep"]},{"name":"uiTime","title":"uiTime","type":"command","url":"https://community.bistudio.com/wiki/uiTime","revid":370498,"updated":"2024-12-26T17:46:41Z","groups":["Time","Mission Information"],"status":"ok","games":{"arma3":"2.20"},"since":"arma3 2.20","arma3_since":"2.20","description":"Returns UI time elapsed since mission started (in seconds). Unlike time the uiTime does not stop when game is paused.","syntaxes":[{"syntax":"uiTime","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["private _future = uiTime + 30;\nwaitUntil { uiTime >= _future };  // continue after 30 seconds"]}],"see_also":["uiSleep","time","date","dayTime","serverTime","skipTime","accTime","dateToNumber","timeMultiplier","setTimeMultiplier","missionStart","diag_tickTime","diag_deltaTime","systemTime","systemTimeUTC","BIS_fnc_timeToString"]},{"name":"unassignCurator","title":"unassignCurator","type":"command","url":"https://community.bistudio.com/wiki/unassignCurator","revid":348367,"updated":"2023-11-08T12:59:54Z","groups":["Curator"],"status":"ok","games":{"arma3":"1.16"},"since":"arma3 1.16","arma3_since":"1.16","locality":{"server_exec":true},"description":"Unassign curator (will destroy both sides of connection).","syntaxes":[{"syntax":"unassignCurator curatorObj","params":[{"name":"curatorObj","type":"Object","description":"curator module.","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"curatorObj"}}],"examples":[{"code":["unassignCurator myCurator;"]}],"see_also":["Arma 3: Curator","addCuratorAddons","removeAllCuratorAddons","curatorAddons"]},{"name":"unassignItem","title":"unassignItem","type":"command","url":"https://community.bistudio.com/wiki/unassignItem","revid":353052,"updated":"2024-03-12T12:31:28Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Unassigns existing item and tries to put it into inventory. If there is no space in inventory the item simply disappears. See also unlinkItem.","syntaxes":[{"syntax":"unit unassignItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["_bluforUnit unassignItem \"NVGoggles\";\n_bluforUnit removeItem \"NVGoggles\";\n_opforUnit unassignItem \"NVGoggles_OPFOR\";\n_opforUnit removeItem \"NVGoggles_OPFOR\";\n_independentUnit unassignItem \"NVGoggles_INDEP\";\n_independentUnit removeItem \"NVGoggles_INDEP\";"]},{"text":"```sqf\n{\n    _x unassignItem hmd _x; // unassign (not remove) NVGs from all units\n} forEach allUnits;\n```","code":["{\n\t_x unassignItem hmd _x; // unassign (not remove) NVGs from all units\n} forEach allUnits;"]}],"see_also":["assignItem","addItem","removeItem","linkItem","unlinkItem","assignedItems","removeAllAssignedItems"]},{"name":"unassignTeam","title":"unassignTeam","type":"command","url":"https://community.bistudio.com/wiki/unassignTeam","revid":309954,"updated":"2022-05-05T12:17:00Z","groups":["Groups"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local"},"description":"Unassigns the unit (in the case of a vehicle its commander unit) from his team. This is equal to unit assignTeam \"MAIN\".","syntaxes":[{"syntax":"unassignTeam vehicleName","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"vehicleName"}}],"examples":[{"code":["unassignTeam _soldier2;"]}],"see_also":["assignTeam","dissolveTeam"]},{"name":"unassignVehicle","title":"unassignVehicle","type":"command","url":"https://community.bistudio.com/wiki/unassignVehicle","revid":363373,"updated":"2024-03-28T19:52:42Z","groups":["Object Manipulation","Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Unassigns individual unit from a vehicle, usually previously assigned with *assignAsXXX* command, i.e removes assignedVehicleRole of the unit.\nIf the unit is currently in that vehicle, the group leader will issue an order to disembark.\n\n> [!NOTE]\n> See AI Group Vehicle Management for more information.","syntaxes":[{"syntax":"unassignVehicle unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["unassignVehicle player;"]},{"text":"Make all the occupants of a vehicle disembark:\n\n```sqf\n{ unassignVehicle _x } forEach crew _vehicle;\n```","code":["{ unassignVehicle _x } forEach crew _vehicle;"]},{"text":"Make all the occupants of a vehicle disembark and unable to get back in:\n\n```sqf\nprivate _crew = crew _vehicle;\n{ unassignVehicle _x } forEach _crew;\n_crew allowGetIn false;\n```","code":["private _crew = crew _vehicle;\n{ unassignVehicle _x } forEach _crew;\n_crew allowGetIn false;"]}],"see_also":["assignAsCargo","assignAsCommander","assignAsDriver","assignAsGunner","assignAsTurret","assignedVehicle","leaveVehicle","assignedVehicles","assignedGroup","fullCrew"]},{"name":"underwater","title":"underwater","type":"command","url":"https://community.bistudio.com/wiki/underwater","revid":336959,"updated":"2023-01-04T16:44:17Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns whether the object is fully underwater.\n\n> [!NOTE]\n> This command works well with Arma 3 mini-submarines, which was most likely the primary design goal.","syntaxes":[{"syntax":"underwater object","params":[{"name":"object","type":"Object","description":"mini-submarine","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if submerged"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["private _isUnderwater = underwater vehicle player;"]},{"code":["private _isHeadUnderwater = eyePos player select 2 < 0;"]}],"see_also":["isTouchingGround","isAbleToBreathe"],"notes":[{"user":"Killzone_Kid","date":"2017-02-02T18:08:00Z","text":"This command is quite buggy with objects other than mini-subs. Code in Example 2 is a good alternative."}]},{"name":"uniform","title":"uniform","type":"command","url":"https://community.bistudio.com/wiki/uniform","revid":310875,"updated":"2022-05-07T20:24:10Z","groups":["Containers","Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns name of uniform.","syntaxes":[{"syntax":"uniform unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_uniform = uniform _unit;"]}],"see_also":["addUniform","forceAddUniform","isUniformAllowed","removeUniform","uniformContainer"]},{"name":"uniformContainer","title":"uniformContainer","type":"command","url":"https://community.bistudio.com/wiki/uniformContainer","revid":369268,"updated":"2024-09-03T18:42:43Z","groups":["Containers","Unit Inventory"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Returns a cargo container of a unit's uniform.","syntaxes":[{"syntax":"uniformContainer unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"cargo container, objNull if unit does not wear any uniform/clothing","text":"Object - cargo container, objNull if *unit* does not wear any uniform/clothing"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hint str uniformContainer player; //2df7dd00# 163941: dummyweapon.p3d"]},{"text":"```sqf\nhint str getMagazineCargo uniformContainer player;\n/*\n    returns e.g\n    [\n        [\"30Rnd_65x39_caseless_mag\"],\n        [3]\n    ]\n*/\n```","code":["hint str getMagazineCargo uniformContainer player;\n/*\n\treturns e.g\n\t[\n\t\t[\"30Rnd_65x39_caseless_mag\"],\n\t\t[3]\n\t]\n*/"]}],"see_also":["vestContainer","backpackContainer","everyContainer"]},{"name":"uniformItems","title":"uniformItems","type":"command","url":"https://community.bistudio.com/wiki/uniformItems","revid":377118,"updated":"2026-01-01T10:13:43Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get array with all items (of any kind, even weapons) from uniform.","syntaxes":[{"syntax":"uniformItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"Class names of items"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"```sqf\nuniformItems player;\n// returns e.g\n/*\n[\n    \"FirstAidKit\",\n    \"30Rnd_65x39_caseless_mag\",\n    \"30Rnd_65x39_caseless_mag\",\n    \"30Rnd_65x39_caseless_mag\"\n]\n*/\n```","code":["uniformItems player;\n// returns e.g\n/*\n[\n\t\"FirstAidKit\",\n\t\"30Rnd_65x39_caseless_mag\",\n\t\"30Rnd_65x39_caseless_mag\",\n\t\"30Rnd_65x39_caseless_mag\"\n]\n*/"]}],"see_also":["vestItems","backpackItems"]},{"name":"uniformMagazines","title":"uniformMagazines","type":"command","url":"https://community.bistudio.com/wiki/uniformMagazines","revid":321373,"updated":"2022-05-14T10:55:55Z","groups":["Containers","Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get array with all magazines from uniform of the given unit.","syntaxes":[{"syntax":"uniformMagazines unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of String","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"```sqf\nuniformMagazines player;\n// returns e.g\n/*\n[\n    \"6.5mm 30Rnd STANAG Mag(30/30)[id/cr:1/0](3x)\"\n]\n*/\n```","code":["uniformMagazines player;\n// returns e.g\n/*\n[\n\t\"6.5mm 30Rnd STANAG Mag(30/30)[id/cr:1/0](3x)\"\n]\n*/"]}],"see_also":["vestMagazines","backpackMagazines","soldierMagazines"]},{"name":"uniqueUnitItems","title":"uniqueUnitItems","type":"command","url":"https://community.bistudio.com/wiki/uniqueUnitItems","revid":310366,"updated":"2022-05-05T17:43:22Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","locality":{"argument":"global"},"description":"Returns hashmap of all items in units inventory as [classname, count] pairs.\n\n> [!NOTE]\n> - *weaponItems*, *uniformItems*, *vestItems*, *backpackItems* arguments use the following Number values:\n>   - 0: do not return value\n>   - 1: returns container only (weapon or container)\n>   - 2: returns container and its content\n> - weapons/containers that are stored inside containers (e.g weapon in backpack) always return all contents if contents for the parent container are enabled.","syntaxes":[{"syntax":"uniqueUnitItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"HashMap","type_expr":"HashMap","description":"in format itemClassname (String) → amount (Number)","text":"HashMap in format itemClassname (String) → amount (Number)"},"form":"unary","right":{"text":"unit"}},{"syntax":"uniqueUnitItems [unit, weaponsItems, uniformItems, vestItems, backpackItems, assignedItems]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"weaponsItems","type":"Number","optional":true,"default":"2","description":"weapons (including binoculars) and their accessories (flashlight etc), loaded magazines","type_expr":"Number","text":"weaponsItems: Number - (Optional, default 2) weapons (including binoculars) and their accessories (flashlight etc), loaded magazines"},{"name":"uniformItems","type":"Number","optional":true,"default":"2","type_expr":"Number","text":"uniformItems: Number - (Optional, default 2)"},{"name":"vestItems","type":"Number","optional":true,"default":"2","type_expr":"Number","text":"vestItems: Number - (Optional, default 2)"},{"name":"backpackItems","type":"Number","optional":true,"default":"2","type_expr":"Number","text":"backpackItems: Number - (Optional, default 2)"},{"name":"assignedItems","type":"Boolean","optional":true,"default":"true","description":"returns assignedItems as well as headgear and goggles","type_expr":"Boolean","text":"assignedItems: Boolean - (Optional, default true) returns assignedItems as well as headgear and goggles"}],"returns":{"type":"HashMap","type_expr":"HashMap","description":"in format itemClassname (String) → amount (Number)","text":"HashMap in format itemClassname (String) → amount (Number)"},"form":"unary","right":{"text":"[unit, weaponsItems, uniformItems, vestItems, backpackItems, assignedItems]"}}],"examples":[{"code":["private _unitUniqueItems = uniqueUnitItems [player, 0, 2, 2, 2, true];\nif (_unitUniqueItems getOrDefault [\"FirstAidKit\", 0] > 5) then { hint \"I'm rich of FAK to give!\"; };"]},{"code":["private _unitUniqueItems = uniqueUnitItems [cursorObject];"]}],"see_also":["getUnitLoadout"]},{"name":"unitAddons","title":"unitAddons","type":"command","url":"https://community.bistudio.com/wiki/unitAddons","revid":378475,"updated":"2026-04-24T11:31:38Z","groups":["Mods and Addons"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Returns list with addons the unit belongs to.","syntaxes":[{"syntax":"unitAddons className","params":[{"name":"className","type":"String","description":"class name of a unit/vehicle or object","type_expr":"String"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"addon names"},"form":"unary","right":{"text":"className"}}],"examples":[{"code":["hint str unitAddons typeOf player; // [\"A3_Characters_F_BLUFOR\"]"]}],"see_also":["activateAddons"],"notes":[{"user":"ffur2007slx2_5","date":"2014-03-31T23:38:00Z","text":"1. From Arma 3 1.14\n\n   ```sqf\n   hint str ([player] call BIS_fnc_unitAddon) // same as unitAddons (typeOf player)\n   ```\n1. To return the addon that a weapon belongs to, use BIS_fnc_weaponAddon instead. E.g.\n\n   ```sqf\n   (primaryWeapon player call BIS_fnc_weaponAddon); // return: \"A3_Weapons_F_Rifles_Khaybar\"\n   ```"}]},{"name":"unitAimPosition","title":"unitAimPosition","type":"command","url":"https://community.bistudio.com/wiki/unitAimPosition","revid":378159,"updated":"2026-02-26T16:15:33Z","groups":["Object Manipulation","Positions"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","locality":{"argument":"global"},"description":"Returns the position on the unit other units can aim at. Same as aimPos only returns position in PositionAGL format and has render scope alternative unitAimPositionVisual.","syntaxes":[{"syntax":"unitAimPosition unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _aimPosAGL = unitAimPosition player;"]}],"see_also":["unitAimPositionVisual","aimPos","eyePos","getPosASL","weaponDirection"],"notes":[{"user":"Sa-Matra","date":"2023-03-27T12:33:27Z","text":"This command uses \"zamerny\" memory point which is hardcoded name in the engine. If memory point is not present then geometry LOD bounding center is used (according to dedmen)"}]},{"name":"unitAimPositionVisual","title":"unitAimPositionVisual","type":"command","url":"https://community.bistudio.com/wiki/unitAimPositionVisual","revid":377836,"updated":"2026-01-03T04:32:14Z","groups":["Object Manipulation","Render Time Scope"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","locality":{"argument":"global"},"description":"Returns the position on the unit other units can aim at in render scope. See also aimPos, unitAimPosition.","syntaxes":[{"syntax":"unitAimPositionVisual unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL","description":"position"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["unitAimPositionVisual player;"]}],"see_also":["unitAimPosition","aimPos","eyePos","getPosASL","weaponDirection"],"notes":[{"user":"Sa-Matra","date":"2023-04-30T11:44:58Z","text":"This command (along with unitAimPosition and aimPos) is unreliable when entity has objectParent, it can return its last position in the world in case of static weapon packed into backpack, or can return very outdated (lagging behind) position or even [0,0,0] on remote units inside vehicles. Be careful when using it!"}]},{"name":"unitBackpack","title":"unitBackpack","type":"command","url":"https://community.bistudio.com/wiki/unitBackpack","revid":341213,"updated":"2023-05-13T22:52:01Z","groups":["Containers"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","description":"Returns unit's backpack","syntaxes":[{"syntax":"unitBackpack unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["private _myBackpack = unitBackpack player;"]},{"code":["clearMagazineCargo unitBackpack player;"]},{"code":["player action [\"gear\", unitBackpack player];"]}],"see_also":["backpackContainer","firstBackpack","backpack","backpackCargo","getBackpackCargo","backpackItems","addBackpack","addBackpackCargo","addBackpackCargoGlobal","removeBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearAllItemsFromBackpack","loadBackpack","backpackSpaceFor","canAddItemToBackpack","addItemToBackpack","removeItemFromBackpack","everyBackpack"],"notes":[{"user":"ffur2007slx2_5","date":"2014-04-29T15:49:00Z","text":"In Arma 3 ver 1.16, we can use either backpackContainer or unitBackpack at present since both of them enjoy same operand type and return value."}]},{"name":"unitCombatMode","title":"unitCombatMode","type":"command","url":"https://community.bistudio.com/wiki/unitCombatMode","revid":309924,"updated":"2022-05-05T12:16:58Z","groups":["AI Behaviour"],"status":"ok","games":{"arma3":"2.02"},"since":"arma3 2.02","arma3_since":"2.02","description":"Gets individual unit's combat mode. For more information see setUnitCombatMode.","syntaxes":[{"syntax":"unitCombatMode unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["unitCombatMode _unit;"]}],"see_also":["setUnitCombatMode","setCombatMode","combatMode"]},{"name":"unitIsUAV","title":"unitIsUAV","type":"command","url":"https://community.bistudio.com/wiki/unitIsUAV","revid":338990,"updated":"2023-04-23T07:34:22Z","groups":["Remote Control"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","description":"Returns whether or not the given transport object is a drone (UAV, UGV), regardless of if it has a crew or if it is empty,\ncorresponding to the `isUAV` transport parameter.\nArma 3 v2.14 The command can be used to check if the provided unit is a UAV unit.","syntaxes":[{"syntax":"unitIsUAV object","params":[{"name":"object","type":"Object","description":"vehicle or Arma 3 v2.14 unit","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when UAV"},"form":"unary","right":{"text":"object"}}],"examples":[{"text":"```sqf\nunitIsUAV _myUAV;            // true (whether it has driver/gunner or not)\nunitIsUAV driver _myUAV;    // true (provided there is a driver)\nunitIsUAV gunner _myUAV;    // true (provided there is a gunner)\n```","code":["unitIsUAV _myUAV;\t\t\t// true (whether it has driver/gunner or not)\nunitIsUAV driver _myUAV;\t// true (provided there is a driver)\nunitIsUAV gunner _myUAV;\t// true (provided there is a gunner)"]}],"see_also":["allUnitsUAV"]},{"name":"unitPos","title":"unitPos","type":"command","url":"https://community.bistudio.com/wiki/unitPos","revid":337059,"updated":"2023-01-11T09:38:30Z","groups":["Unit Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Return the unit position rules.\nThe return value is always \"Auto\" unless the unit has gotten a setUnitPos command. In that case the value is the last stance the unit was ordered to.\nAvailable modes are listed at setUnitPos.","syntaxes":[{"syntax":"unitPos unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"one of `\"Auto\"`, `\"Up\"`, `\"Middle\"`, `\"Down\"` (as of Arma 3)"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hint str unitPos _unit;"]}],"multiplayer":"Unit pos set by setUnitPosWeak is not returned for remote (non-local) units.","see_also":["setUnitPos","setUnitPosWeak","stance","pose"]},{"name":"unitReady","title":"unitReady","type":"command","url":"https://community.bistudio.com/wiki/unitReady","revid":379576,"updated":"2026-10-31T20:07:59Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Check if the unit is ready. Unit is busy when it is given some command like move, until the command is finished.","syntaxes":[{"syntax":"unitReady unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"code":["private _isReady = unitReady _soldierOne;"]},{"text":"```sqf\nif (not unitReady _soldierOne) then\n{\n    _soldierOne groupChat \"Wait one, sarge!\";\n};\n```","code":["if (not unitReady _soldierOne) then\n{\n\t_soldierOne groupChat \"Wait one, sarge!\";\n};"]}],"see_also":["move"],"notes":[{"user":"Rübe","date":"2010-08-26T03:55:00Z","text":"Keep in mind that\n\n- dead units are unitReady\n- it takes a while until it get's known to group members that a unit is not alive anymore, which leads to\n- the current leader of a group might be actually dead (until another group member takes command).\n\nWhy this is important? I'll give you an example: if you're using unitReady as a condition inside one of your fsm to advance whatever the fsm/group is doing, you really might wanna check that this unit is actually still alive. Otherwise you might end up with really fast and nasty loops in your FSM, eventually accompanied by a stream of radio commands that will last until finally a living leader is in command again.. and that could take a while... nasty, I tell you :)"},{"user":"Rübe","date":"2011-01-17T20:27:00Z","text":"Regarding vehicles, there is only one single unit (from the vehicle crew) whose unitReady-status is affected by giving that vehicle (or that unit) commands.\nWhile it is the driver unit for a truck, it is the gunner unit for a mg-jeep or the commander for a tank. Generally it is always the unit \"in control\" of the vehicle.\n(because it is only that unit, that is seen as \"full unit\" to the \"outside world\". Only he can be adressed with commands.)\n\nIn consequence you can't just send vehicles around and check if they've arrived with something like:\n\n```sqf\nwaitUntil { unitReady driver _vehicle }; // don't do this!\n```\n\nBecause it is *not guaranteed that the driver is in command of the vehicle* and only that unit will have its unitReady status affected.\nSo in conclusion, **if you need to check if a vehicle is ready**, try something like this:\n\n```sqf\n_vehicleReady = {\n    private [\"_veh\", \"_ready\"];\n    _veh = _this;\n    _ready = true;\n    {\n        if (not isNull _x) then\n        {\n            _ready = _ready && (unitReady _x);\n        };\n    } forEach [\n        commander _veh,\n        gunner _veh,\n        driver _veh\n    ];\n    _ready\n};\n```"},{"user":"Kastenbier","date":"2015-11-21T22:40:00Z","text":"To check readiness of a vehicle, don't check its crew, driver, gunner, commander, etc., but the vehicle itself, e.g.:\n\n```sqf\nunitReady _yourVehicle;\n```\n\nOnly tested 11/21/2015 by me with A2 1.63.131129 and A3 1.52.132676 but possibly true since 1964. :P"}]},{"name":"unitRecoilCoefficient","title":"unitRecoilCoefficient","type":"command","url":"https://community.bistudio.com/wiki/unitRecoilCoefficient","revid":364133,"updated":"2024-05-04T22:15:43Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Returns recoil coefficient of a soldier.","syntaxes":[{"syntax":"unitRecoilCoefficient soldier","params":[{"name":"soldier","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"soldier"}}],"examples":[{"code":["_myRecoil = unitRecoilCoefficient player;"]}],"see_also":["setUnitRecoilCoefficient"],"notes":[{"user":"AgentRev01","date":"2013-09-07T20:55:00Z","text":"If the unit doesn't exist / is null, -1 is returned."}]},{"name":"units","title":"units","type":"command","url":"https://community.bistudio.com/wiki/units","revid":340313,"updated":"2023-04-29T17:06:31Z","groups":["Groups","Object Detection"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Returns an array with all the units in the group or unit's group, or all units belonging to a certain side.","syntaxes":[{"syntax":"units type","params":[{"name":"type","type":"Group, Object or Arma 3 v2.02 Side","type_expr":"Group | Object | Side"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"if type is a destroyed object, an empty array is returned","text":"Array of Objects - if *type* is a destroyed object, an empty array is returned"},"form":"unary","right":{"text":"type"}}],"examples":[{"code":["_myUnitCount = count units player;"]},{"code":["_isInMyGroup = _soldier1 in units player;"]},{"code":["private _unitsEast = units opfor;"]},{"text":"```sqf\n// both methods are the same, the latter is preferred for performance reason\nunits group player;        // [B Alpha 1-1:1 (R3vo), B Alpha 1-1:2, B Alpha 1-1:3, B Alpha 1-1:4, B Alpha 1-1:5, B Alpha 1-1:6, B Alpha 1-1:7, B Alpha 1-1:8]\nunits player;            // [B Alpha 1-1:1 (R3vo), B Alpha 1-1:2, B Alpha 1-1:3, B Alpha 1-1:4, B Alpha 1-1:5, B Alpha 1-1:6, B Alpha 1-1:7, B Alpha 1-1:8]\n```","code":["// both methods are the same, the latter is preferred for performance reason\nunits group player;\t\t// [B Alpha 1-1:1 (R3vo), B Alpha 1-1:2, B Alpha 1-1:3, B Alpha 1-1:4, B Alpha 1-1:5, B Alpha 1-1:6, B Alpha 1-1:7, B Alpha 1-1:8]\nunits player;\t\t\t// [B Alpha 1-1:1 (R3vo), B Alpha 1-1:2, B Alpha 1-1:3, B Alpha 1-1:4, B Alpha 1-1:5, B Alpha 1-1:6, B Alpha 1-1:7, B Alpha 1-1:8]"]}],"see_also":["group","allGroups","groups","allUnits","playableUnits","switchableUnits","vehicles"],"notes":[{"user":"Kronzky","date":"2009-09-25T01:03:00Z","text":"The returned array on MP clients is not updated when team members die (only when they are deleted). (*Tested on VBS2*)"},{"user":"Ilias38rus","date":"2020-07-03T03:36:00Z","text":"Seems to always return a list with the same order as the leader's squad menu."}]},{"name":"unitsBelowHeight","title":"unitsBelowHeight","type":"command","url":"https://community.bistudio.com/wiki/unitsBelowHeight","revid":325197,"updated":"2022-07-01T14:53:08Z","groups":["Object Detection","Positions"],"status":"ok","games":{"arma2":"1.04","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.04","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns units in group/array below given Above Terrain Level (ATL) altitude.\n\n> [!NOTE]\n> an object's ATL altitude can be found with `_altitude = (getPosATL _obj) select 2;`.","syntaxes":[{"syntax":"units unitsBelowHeight height","params":[{"name":"units","type":"Array of Objects","type_expr":"Array<Object>"},{"name":"height","type":"Number","description":"height above terrain level (PositionATL)","type_expr":"Number"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"binary","left":{"text":"units"},"right":{"text":"height"}},{"syntax":"group unitsBelowHeight height","params":[{"name":"group","type":"Group","description":"AI group","type_expr":"Group"},{"name":"height","type":"Number","description":"height above terrain level (PositionATL)","type_expr":"Number"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"binary","left":{"text":"group"},"right":{"text":"height"}}],"examples":[{"code":["_allOnGroudUnits = group player unitsBelowHeight 10;"]},{"code":["_units = allUnits unitsBelowHeight 30;"]}],"see_also":["allUnits","getPosATL","group"]},{"name":"unitTurret","title":"unitTurret","type":"command","url":"https://community.bistudio.com/wiki/unitTurret","revid":377504,"updated":"2026-01-02T06:49:34Z","groups":["Turrets"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns the turret path the given vehicle's gunner is in.\nTo get the turret's unit see turretUnit.","syntaxes":[{"syntax":"vehicle unitTurret gunner","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"gunner","type":"Object","type_expr":"Object"}],"returns":{"type":"Turret Path","type_expr":"Turret Path","description":"- `[-1]` is returned if the gunner is also the driver. When no units are in any of vehicle's turret, empty array `[]` is returned.","text":"Turret Path\n- `[-1]` is returned if the gunner is also the driver.\nWhen no units are in any of vehicle's turret, empty array `[]` is returned."},"form":"binary","left":{"text":"vehicle"},"right":{"text":"gunner"}}],"examples":[{"code":["_vehicle unitTurret _gunner;"]},{"code":["vehicle player unitTurret player;"]}],"see_also":["turretUnit","driver","gunner","commander","effectiveCommander","currentPilot","moveInTurret","assignAsTurret","assignedVehicleRole","lockedTurret","isTurnedOut"]},{"name":"unlinkItem","title":"unlinkItem","type":"command","url":"https://community.bistudio.com/wiki/unlinkItem","revid":378286,"updated":"2026-03-31T13:01:41Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","locality":{"argument":"global","effect":"global"},"description":"Unassign and delete existing item from its assigned slot. Nothing happens if the item does not exist or is not assigned. See also unassignItem.","syntaxes":[{"syntax":"unit unlinkItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["bluforUnit unlinkItem \"NVGoggles\";\nopforUnit unlinkItem \"NVGoggles_OPFOR\";\nindepUnit unlinkItem \"NVGoggles_INDEP\";\n\n// or\n{ _x unlinkItem hmd _x } forEach [bluforUnit, opforUnit, indepUnit];"]}],"see_also":["linkItem","addItem","assignItem","removeItem","unassignItem","assignedItems","removeAllAssignedItems"],"notes":[{"user":"Killzone_Kid","date":"2018-10-15T14:46:00Z","text":"With this command you can also unlink vest, uniform and headgear."}]},{"name":"unlockAchievement","title":"unlockAchievement","type":"command","url":"https://community.bistudio.com/wiki/unlockAchievement","revid":364204,"updated":"2024-05-05T11:07:39Z","groups":["Broken Commands","System"],"status":"broken","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Unlocks the given achievement. The achievements are listed in CfgAchievements, however none of the currently listed achievements is used in Arma 3, hence the command always returns false.\n\n> [!IMPORTANT]\n> This command is obsolete and was used in the experimental (unreleased) Arma 2 Xbox 360 version as stated\n> [here](https://forums.bohemia.net/forums/topic/187873-unlockachievment-command/?tab=comments#comment-2978436).\n\n> [!NOTE]\n> **Arma 3:** To unlock a Steam Achievement for Arma 3, see setStatValue.","syntaxes":[{"syntax":"unlockAchievement name","params":[{"name":"name","type":"String","description":"achievement name","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if achievement was unlocked"},"form":"unary","right":{"text":"name"}}],"examples":[{"code":["_isUnlocked = unlockAchievement \"Hunter\";"]}],"see_also":["setStatValue"]},{"name":"unregisterTask","title":"unregisterTask","type":"command","url":"https://community.bistudio.com/wiki/unregisterTask","revid":376348,"updated":"2025-10-07T17:06:51Z","groups":["Briefing"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Unregisters a task type from given agent. The task type is the name given in `CfgTasks` classes in `name` property. Also available from registeredTasks array.","syntaxes":[{"syntax":"teamMember unregisterTask name","params":[{"name":"teamMember","type":"Team Member","description":"teamMember agent","type_expr":"Team Member"},{"name":"name","type":"String","description":"name of the task","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success"},"form":"binary","left":{"text":"teamMember"},"right":{"text":"name"}}],"examples":[{"code":["teamMember _agent unregisterTask ((registeredTasks _agent) select 0);"]}],"see_also":["registerTask","registeredTasks","sendTask","createTask","currentTasks","taskCompleted"]},{"name":"updateDrawIcon","title":"updateDrawIcon","type":"command","url":"https://community.bistudio.com/wiki/updateDrawIcon","revid":363252,"updated":"2024-03-26T10:51:27Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Updates the icon to be shown in 2D editor for the specified editor,object. If maintain size is false,icon will not scale depending on the,scale of the map. If maintain size is a number,the icon will maintain,size if map scale is below that number.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map updateDrawIcon [object,string identifier,color,offset,width,height,maintain size?,angle,shadow]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"[object,string identifier,color,offset,width,height,maintain size?,angle,shadow]: Array","type_expr":"Array"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[object,string identifier,color,offset,width,height,maintain size?,angle,shadow]"}}],"examples":[{"text":"-"}]},{"name":"updateMenuItem","title":"updateMenuItem","type":"command","url":"https://community.bistudio.com/wiki/updateMenuItem","revid":363582,"updated":"2024-04-07T14:51:54Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Sets the text and command for the menu item. Index is index returned by addMenuItem command. Command is optional.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"map updateMenuItem [menu item index, text, command]","params":[{"name":"map","type":"Control","type_expr":"Control"},{"name":"menu item index","type":"Number","description":"See addMenuItem","type_expr":"Number"},{"name":"text","type":"String","type_expr":"String"},{"name":"command","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"map"},"right":{"text":"[menu item index, text, command]"}}],"examples":[{"text":"-"}]},{"name":"updateObjectTree","title":"updateObjectTree","type":"command","url":"https://community.bistudio.com/wiki/updateObjectTree","revid":363283,"updated":"2024-03-26T10:51:53Z","groups":["Game 2 Editor"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Update the editor object tree.\n\n> [!NOTE]\n> Some Old Editor Command","syntaxes":[{"syntax":"updateObjectTree map","params":[{"name":"map","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"map"}}],"examples":[{"code":["updateObjectTree _ctrlMap;"]}]},{"name":"useAIOperMapObstructionTest","title":"useAIOperMapObstructionTest","type":"command","url":"https://community.bistudio.com/wiki/useAIOperMapObstructionTest","revid":310172,"updated":"2022-05-05T13:10:25Z","groups":["System"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","branch":["diag"],"description":"Toggle secondary obstruction test on road paths.","syntaxes":[{"syntax":"useAIOperMapObstructionTest state","params":[{"name":"state","type":"Boolean","description":"true to enable, false to disable","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"state"}}],"examples":[{"code":["useAIOperMapObstructionTest true;"]}],"see_also":["forceFollowRoad","setDriveOnPath","setConvoySeparation"]},{"name":"useAISteeringComponent","title":"useAISteeringComponent","type":"command","url":"https://community.bistudio.com/wiki/useAISteeringComponent","revid":379242,"updated":"2026-10-30T23:20:10Z","groups":["AI Behaviour"],"status":"ok","games":{"arma3":"1.60"},"since":"arma3 1.60","arma3_since":"1.60","locality":{"argument":"local","effect":"global"},"description":"Enable the new [AI driving](https://forums.bistudio.com/topic/191515-ai-driving-feedback-topic/), used to test the old and new AI driving.\n\n> [!IMPORTANT]\n> setDriveOnPath does not work if the vehicle doesn't have an AI steering component or if it's disabled.","syntaxes":[{"syntax":"useAISteeringComponent enabled","params":[{"name":"enabled","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"enabled"}},{"syntax":"vehicle useAISteeringComponent enabled","since":"arma3 2.18","params":[{"name":"vehicle","type":"Object","description":"the vehicle to enable/disable the feature for","type_expr":"Object"},{"name":"enabled","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"enabled"}}],"examples":[{"code":["useAISteeringComponent true;"]},{"code":["myTank useAISteeringComponent false;"]}],"see_also":["isUsingAISteeringComponent","isAISteeringComponentEnabled","sendSimpleCommand","enableAI","disableAI","enableAIFeature","vehicleMoveInfo"]},{"name":"useAudioTimeForMoves","title":"useAudioTimeForMoves","type":"command","url":"https://community.bistudio.com/wiki/useAudioTimeForMoves","revid":379397,"updated":"2026-10-31T00:01:04Z","groups":["Animations"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Switch between elapsed game time and audio time being used as animation timer. Used for audio/animation synchronization.","syntaxes":[{"syntax":"soldier useAudioTimeForMoves toggle","params":[{"name":"soldier","type":"Object","type_expr":"Object"},{"name":"toggle","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"soldier"},"right":{"text":"toggle"}}],"examples":[{"code":["player useAudioTimeForMoves true;"]}],"see_also":["setAccTime","accTime"],"notes":[{"user":".kju","date":"2019-01-30T16:15:00Z","text":"Makes movement (simulation) speed independent off accTime.\n\nSo you can move \"normal fast\" in slow motion, and move \"normal slow\" in fast time."}]},{"name":"userInputDisabled","title":"userInputDisabled","type":"command","url":"https://community.bistudio.com/wiki/userInputDisabled","revid":373273,"updated":"2025-04-13T14:32:18Z","groups":["Interaction"],"status":"ok","games":{"arma3":"1.60"},"since":"arma3 1.60","arma3_since":"1.60","description":"Returns whether or not user input is disabled.\n\n> [!IMPORTANT]\n> The disabled input system internally *counts* how many times `disableUserInput true` has been called - see Example 2.","syntaxes":[{"syntax":"userInputDisabled","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"text":"Toggles user input\n\n```sqf\ndisableUserInput !userInputDisabled;\n```","code":["disableUserInput !userInputDisabled;"]},{"code":["disableUserInput true;\ndisableUserInput true;\ndisableUserInput true;\n\ndiag_log str userInputDisabled; // true\n\ndisableUserInput false;\ndiag_log str userInputDisabled; // true\n\ndisableUserInput false;\ndiag_log str userInputDisabled; // true\n\ndisableUserInput false;\ndiag_log str userInputDisabled; // false - control is regained only here"]}],"see_also":["disableUserInput"]},{"name":"values","title":"values","type":"command","url":"https://community.bistudio.com/wiki/values","revid":376075,"updated":"2025-07-27T22:51:40Z","groups":["HashMap"],"status":"ok","games":{"arma3":"2.04"},"since":"arma3 2.04","arma3_since":"2.04","description":"Returns all values stored in the given HashMap. The order of the returned Array corresponds to the order of the Array returned by the keys command.","syntaxes":[{"syntax":"values hashmap","params":[{"name":"hashmap","type":"HashMap","type_expr":"HashMap"}],"returns":{"type":"Array","type_expr":"Array","description":"all values stored in hashmap","text":"Array - all values stored in *hashmap*"},"form":"unary","right":{"text":"hashmap"}}],"examples":[{"code":["private _values = values _myHashMap;"]}],"see_also":["keys","toArray"]},{"name":"vectorAdd","title":"vectorAdd","type":"command","url":"https://community.bistudio.com/wiki/vectorAdd","revid":378392,"updated":"2026-04-04T07:53:40Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Adds two arrays of numbers. Replaces BIS_fnc_vectorAdd.\n\n> [!NOTE]\n> **Since Arma 3 v2.14:** Since Arma 3 v2.14 any count of numbers is valid, if one array is larger than the other, the remaining elements are inserted without change.\n> Before Arma 3 v2.14, the first argument had to be vector 3D, or Arma 3 v2.00 2D (Which still returned 3D result, with z coordinate defaulted to 0)","syntaxes":[{"syntax":"vector1 vectorAdd vector2","params":[{"name":"vector1","type":"Array of Numbers","description":"can be any size","type_expr":"Array<Number>"},{"name":"vector2","type":"Array of Numbers","description":"can be any size","type_expr":"Array<Number>"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"binary","left":{"text":"vector1"},"right":{"text":"vector2"}}],"examples":[{"code":["hint str (velocity unit1 vectorAdd velocity unit2);"]},{"text":"```sqf\n[5, 10, 5] vectorAdd [5, 5, 10];            // returns [10, 15, 15]\n```","code":["[5, 10, 5] vectorAdd [5, 5, 10];\t\t\t// returns [10, 15, 15]"]},{"text":"```sqf\n[0, 0] vectorAdd [1, -2];                    // returns [1, -2]\n```","code":["[0, 0] vectorAdd [1, -2];\t\t\t\t\t// returns [1, -2]"]},{"text":"```sqf\n[1, 2, 3, 4, 5, 6] vectorAdd [10, 10, 10];    // returns [11, 12, 13, 4, 5, 6]\n```","code":["[1, 2, 3, 4, 5, 6] vectorAdd [10, 10, 10];\t// returns [11, 12, 13, 4, 5, 6]"]},{"text":"```sqf\n[1, 2, 3] vectorAdd [1, 2, 3];    // [2, 4, 6]\n[1, 2, 3] vectorAdd [1, 2];        // [2, 4, 3]\n[1, 2] vectorAdd [1, 2, 3];        // [2, 4, 3]\n[1, 2] vectorAdd [1, 2];        // [2, 4]\n```","code":["[1, 2, 3] vectorAdd [1, 2, 3];\t// [2, 4, 6]\n[1, 2, 3] vectorAdd [1, 2];\t\t// [2, 4, 3]\n[1, 2] vectorAdd [1, 2, 3];\t\t// [2, 4, 3]\n[1, 2] vectorAdd [1, 2];\t\t// [2, 4]"]}],"see_also":["vectorDiff","vectorCrossProduct","vectorDotProduct","vectorCos","vectorMagnitude","vectorMagnitudeSqr","vectorMultiply","vectorDistance","vectorDistanceSqr","vectorDir","vectorUp","setVectorDir","setVectorUp","setVectorDirAndUp","matrixMultiply","matrixTranspose"],"notes":[{"user":"Lou Montana","date":"2023-11-02T17:40:30Z","text":"```sqf\n// between File:Arma 3 logo black.png 2.00 and File:Arma 3 logo black.png 2.14:\n[1, 2] vectorAdd [1, 2]; // [2, 4, 0]\n```"}]},{"name":"vectorCos","title":"vectorCos","type":"command","url":"https://community.bistudio.com/wiki/vectorCos","revid":379310,"updated":"2026-10-30T23:49:30Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Cosine of angle between two 3D or 2D vectors.","syntaxes":[{"syntax":"vector1 vectorCos vector2","params":[{"name":"vector1","type":"Vector3D or Arma 3 v2.00 Vector2D","description":"When Vector2D is provided the z coordinate is defaulted to 0","type_expr":"Vector3D | Vector2D"},{"name":"vector2","type":"Vector3D or Arma 3 v2.00 Vector2D","description":"When Vector2D is provided the z coordinate is defaulted to 0","type_expr":"Vector3D | Vector2D"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"vector1"},"right":{"text":"vector2"}}],"examples":[{"code":["_cos = getPos player vectorCos [0,0,2];"]}],"see_also":["vectorAdd","vectorDiff","vectorCrossProduct","vectorDotProduct","vectorMagnitude","vectorMagnitudeSqr","vectorMultiply","vectorDistance","vectorDistanceSqr","vectorDir","vectorUp","setVectorDir","setVectorUp","setVectorDirAndUp","vectorNormalized","vectorFromTo","matrixMultiply","matrixTranspose"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-28T00:00:00Z","text":"Arma 3 v1.22 Algorithm:\n\n```sqf\nVector1 = [x1,y1,z1]; Vector2 = [x2,y2,z2];\nResult = ((x1 * x2) + (y1 * y2) + (z1 * z2))/((sqrt (x1 ^ 2 + y1 ^ 2 + z1 ^ 2))*(sqrt (x2 ^ 2 + y2 ^ 2 + z2 ^ 2)));\n```\n\nGiven two vectors of attributes, A and B, the cosine similarity, cos(θ), is represented using a dot product and magnitude. The resulting similarity values indicating intermediate similarity or dissimilarity between two vectors."}]},{"name":"vectorCrossProduct","title":"vectorCrossProduct","type":"command","url":"https://community.bistudio.com/wiki/vectorCrossProduct","revid":378395,"updated":"2026-04-04T07:56:27Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Cross product of two 3D vectors.\n\nIn layman's terms, if you have a polygon (surface) defined by 3 points, you can find a normal to it (just like terrain surfaceNormal). To invert direction of the normal, swap arguments around.","syntaxes":[{"syntax":"vector1 vectorCrossProduct vector2","params":[{"name":"vector1","type":"Vector3D or Vector2D","description":"since Arma 3 v2.00, z coordinate is defaulted to 0 if not provided","type_expr":"Vector3D | Vector2D"},{"name":"vector2","type":"Vector3D or Vector2D","description":"since Arma 3 v2.00, z coordinate is defaulted to 0 if not provided","type_expr":"Vector3D | Vector2D"}],"returns":{"type":"Array","type_expr":"Array","description":"vector [x, y, z]"},"form":"binary","left":{"text":"vector1"},"right":{"text":"vector2"}}],"examples":[{"code":["_vector = [1,1,1] vectorCrossProduct [2,2,2];"]},{"code":["_vectorUp = [0,1,0] vectorCrossProduct [-1,0,0]; //[0,-0,1]"]},{"code":["_vectorSide = (vectorDir player) vectorCrossProduct (vectorUp player);"]}],"see_also":["vectorAdd","vectorDiff","vectorDotProduct","vectorCos","vectorMagnitude","vectorMagnitudeSqr","vectorMultiply","vectorDistance","vectorDistanceSqr","vectorDir","vectorUp","setVectorDir","setVectorUp","setVectorDirAndUp","vectorNormalized","vectorFromTo","matrixMultiply","matrixTranspose"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-28T09:12:00Z","text":"Arma 3 v1.22Algorithm:\n\n```sqf\nVector1 = [x1,y1,z1]; Vector2 = [x2,y2,z2];\nResult = [(y1 * z2) - (z1 * y2),(z1 * x2) - (x1 * z2),(x1 * y2) - (y1 * x2)];\n```\n\nIt is recommended to use vectorCrossProduct instead of BIS_fnc_crossProduct."}]},{"name":"vectorDiff","title":"vectorDiff","type":"command","url":"https://community.bistudio.com/wiki/vectorDiff","revid":377116,"updated":"2026-01-01T10:12:56Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Subtracts one 3D vector from another. (vector1 - vector2)\n\n> [!NOTE]\n> **Since Arma 3 v2.14:** Since Arma 3 v2.14 any count of numbers is valid, if one array is larger than the other, the remaining elements are inserted without change.\n> Before Arma 3 v2.14, the first argument had to be vector 3D, or Arma 3 v2.00 2D (Which still returned 3D result, with z coordinate defaulted to 0)","syntaxes":[{"syntax":"vector1 vectorDiff vector2","params":[{"name":"vector1","type":"Array of Numbers","type_expr":"Array<Number>"},{"name":"vector2","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"binary","left":{"text":"vector1"},"right":{"text":"vector2"}}],"examples":[{"code":["hint str (velocity car vectorDiff velocity bike);"]}],"see_also":["vectorAdd","vectorCrossProduct","vectorDotProduct","vectorCos","vectorMagnitude","vectorMagnitudeSqr","vectorMultiply","vectorDistance","vectorDistanceSqr","vectorDir","vectorUp","setVectorDir","setVectorUp","setVectorDirAndUp","vectorNormalized","vectorFromTo"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-28T09:09:00Z","text":"Arma 3 v1.22 Algorithm:\n\n```sqf\nVector1 = [x1,y1,z1]; Vector2 = [x2,y2,z2];\nResult = [x1 - x2, y1 - y2, z1 - z2];\n```\n\nIt is recommended to use vectorDiff instead of BIS_fnc_vectorDiff."}]},{"name":"vectorDir","title":"vectorDir","type":"command","url":"https://community.bistudio.com/wiki/vectorDir","revid":379398,"updated":"2026-10-31T00:01:12Z","groups":["Math - Vectors"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns an object's direction vector in world space.\n\n> [!IMPORTANT]\n> The vector is **not necessarily normalized**. The magnitude of the vector depends on the object's scale.\n\nFor an object facing one of the cardinal directions on perfectly flat ground (parallel to the XY-plane of the world space), vectorDir returns simple values:\n\n- `[0, 1, 0]` if the object is facing directly north\n- `[1, 0, 0]` if the object is facing directly east\n- `[0, -1, 0]` if the object is facing directly south\n- `[-1, 0, 0]` if the object is facing directly west","syntaxes":[{"syntax":"vectorDir object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Vector3D","type_expr":"Vector3D"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_vecDir = vectorDir MyObject;"]}],"see_also":["vectorModelToWorld","vectorDirVisual","vectorSide","vectorSideVisual","vectorUp","setVectorDir","setVectorUp","setVectorDirAndUp","vectorDiff","vectorAdd","vectorMultiply","vectorCrossProduct","vectorDistance","vectorMagnitudeSqr","vectorDistanceSqr","vectorCos","vectorMagnitude","vectorDotProduct","vectorNormalized","vectorFromTo","BIS_fnc_transformVectorDirAndUp"],"notes":[{"user":"Killzone_Kid","date":"2019-02-02T01:03:00Z","text":"vectorDir 2D:\n\n```sqf\n[sin _azimuth, cos _azimuth, 0]\n```\n\nvectorDir 3D:\n\n```sqf\n[sin _azimuth * cos _altitude, cos _azimuth * cos _altitude, sin _altitude]\n```"}]},{"name":"vectorDirVisual","title":"vectorDirVisual","type":"command","url":"https://community.bistudio.com/wiki/vectorDirVisual","revid":377258,"updated":"2026-01-02T06:32:55Z","groups":["Math - Vectors","Render Time Scope"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global"},"description":"Returns an object's direction vector in world space and render time scope.\n\n> [!IMPORTANT]\n> The vector is **not necessarily normalized**. The magnitude of the vector depends on the object's scale.\n\nFor an object facing one of the cardinal directions on perfectly flat ground (parallel to the XY-plane of the world space), vectorDirVisual returns simple values:\n\n- `[0, 1, 0]` if the object is facing directly north\n- `[1, 0, 0]` if the object is facing directly east\n- `[0, -1, 0]` if the object is facing directly south\n- `[-1, 0, 0]` if the object is facing directly west","syntaxes":[{"syntax":"vectorDirVisual object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Vector3D","type_expr":"Vector3D"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_vecDirVis = vectorDirVisual MyObject;"]}],"see_also":["vectorModelToWorldVisual","vectorDir","vectorSide","vectorSideVisual","vectorUpVisual","vectorUp","setVectorDir","setVectorUp","setVectorDirAndUp","vectorDiff","vectorAdd","vectorMultiply","vectorCrossProduct","vectorDistance","vectorMagnitudeSqr","vectorDistanceSqr","vectorCos","vectorMagnitude","vectorDotProduct","vectorNormalized","vectorFromTo"]},{"name":"vectorDistance","title":"vectorDistance","type":"command","url":"https://community.bistudio.com/wiki/vectorDistance","revid":379480,"updated":"2026-10-31T00:12:08Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Returns [Euclidean distance](https://en.wikipedia.org/wiki/Euclidean_distance) between two points.","syntaxes":[{"syntax":"point1 vectorDistance point2","params":[{"name":"point1","type":"Position3D or Position2D","description":"(since Arma 3 v2.00, z coordinate is defaulted to 0)","type_expr":"Position3D | Position2D"},{"name":"point2","type":"Position3D or Position2D","description":"(since Arma 3 v2.00, z coordinate is defaulted to 0)","type_expr":"Position3D | Position2D"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"point1"},"right":{"text":"point2"}}],"examples":[{"code":["_euclideanDist = getPosASL player vectorDistance [0,0,0];"]},{"code":["(getPosASL _a) vectorDistance (getPosASL _b);\n// same as\n(getPosATL _a) distance (getPosATL _b);"]}],"see_also":["vectorAdd","vectorDiff","vectorCrossProduct","vectorDotProduct","vectorCos","vectorMagnitude","vectorMagnitudeSqr","vectorMultiply","vectorDistanceSqr","vectorDir","vectorUp","setVectorDir","setVectorUp","setVectorDirAndUp","distance","vectorNormalized","vectorFromTo","distance2D","matrixMultiply","matrixTranspose"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-28T00:00:00Z","text":"Arma 3 v1.22 Algorithm:\n\n```sqf\nVector1 = [x1,y1,z1];\nVector2 = [x2,y2,z2];\nResult = sqrt ((x2 - x1) ^ 2 + (y2 - y1) ^ 2 + (z2 - z1) ^ 2);\n```"}]},{"name":"vectorDistanceSqr","title":"vectorDistanceSqr","type":"command","url":"https://community.bistudio.com/wiki/vectorDistanceSqr","revid":378368,"updated":"2026-04-03T16:47:13Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Squared distance between two 3D vectors.","syntaxes":[{"syntax":"vector1 vectorDistanceSqr vector2","params":[{"name":"vector1","type":"Vector3D or Vector2D","description":"3D or Arma 3 v2.00 2D vector (z coordinate is defaulted to 0)","type_expr":"Vector3D | Vector2D"},{"name":"vector2","type":"Vector3D or Vector2D","description":"3D or Arma 3 v2.00 2D vector (z coordinate is defaulted to 0)","type_expr":"Vector3D | Vector2D"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"vector1"},"right":{"text":"vector2"}}],"examples":[{"code":["_distSqr = getPos player vectorDistanceSqr [0,0,2];"]}],"see_also":["vectorAdd","vectorDiff","vectorCrossProduct","vectorDotProduct","vectorCos","vectorMagnitude","vectorMagnitudeSqr","vectorMultiply","vectorDistance","vectorDir","vectorUp","setVectorDir","setVectorUp","setVectorDirAndUp","distanceSqr","vectorNormalized","vectorFromTo"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-28T08:50:00Z","text":"Algorithm:\n\n```sqf\n_vector1 = [x1,y1,z1];\n_vector2 = [x2,y2,z2];\n_result = (x2 - x1) ^ 2 + (y2 - y1) ^ 2 + (z2 - z1) ^ 2;\n```"}]},{"name":"vectorDotProduct","title":"vectorDotProduct","type":"command","url":"https://community.bistudio.com/wiki/vectorDotProduct","revid":379481,"updated":"2026-10-31T00:12:16Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Dot product of two 3D vectors.\n\n> [!NOTE]\n> **Since Arma 3 v2.14:** Since Arma 3 v2.14 any count of numbers is valid, but both arrays must be same length.\n> Before Arma 3 v2.14, the first argument had to be vector 3D, or Arma 3 v2.00 2D (With z coordinate defaulted to 0)","syntaxes":[{"syntax":"vector1 vectorDotProduct vector2","params":[{"name":"vector1","type":"Array of Numbers","type_expr":"Array<Number>"},{"name":"vector2","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"vector1"},"right":{"text":"vector2"}}],"examples":[{"code":["_dot = [1,0,1] vectorDotProduct [0,0,2];"]}],"see_also":["vectorAdd","vectorDiff","vectorCrossProduct","vectorCos","vectorMagnitude","vectorMagnitudeSqr","vectorMultiply","vectorDistance","vectorDistanceSqr","vectorDir","vectorUp","setVectorDir","setVectorUp","setVectorDirAndUp","vectorNormalized","vectorFromTo","matrixMultiply","matrixTranspose"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-28T00:00:00Z","text":"Arma 3 v1.22 Algorithm:\n\n```sqf\nVector1 = [x1,y1,z1]; Vector2 = [x2,y2,z2];\nResult = (x1 * x2) + (y1 * y2) + (z1 * z2);\n```\n\nIt is recommended to use vectorDotProduct instead of BIS_fnc_dotProduct."}]},{"name":"vectorFromTo","title":"vectorFromTo","type":"command","url":"https://community.bistudio.com/wiki/vectorFromTo","revid":378369,"updated":"2026-04-03T16:47:19Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","description":"Unit vector, equal to direction from vector1 to vector2. In other words this command produces normalised vector between given 2 points.\nTo get a non-normalised vector, use vectorDiff.","syntaxes":[{"syntax":"vector1 vectorFromTo vector2","params":[{"name":"vector1","type":"Vector3D or Vector2D","description":"3D or Arma 3 v2.00 2D vector (z coordinate is defaulted to 0)","type_expr":"Vector3D | Vector2D"},{"name":"vector2","type":"Vector3D or Vector2D","description":"3D or Arma 3 v2.00 2D vector (z coordinate is defaulted to 0)","type_expr":"Vector3D | Vector2D"}],"returns":{"type":"Vector3D","type_expr":"Vector3D"},"form":"binary","left":{"text":"vector1"},"right":{"text":"vector2"}}],"examples":[{"code":["[1,2,3] vectorFromTo [4,5,6];\n// is the same as\nvectorNormalized ([4,5,6] vectorDiff [1,2,3]);"]}],"see_also":["vectorDiff","vectorCrossProduct","vectorDotProduct","vectorCos","vectorMagnitude","vectorMagnitudeSqr","vectorMultiply","vectorDistance","vectorDistanceSqr","vectorDir","vectorUp","setVectorDir","setVectorUp","setVectorDirAndUp","vectorNormalized","matrixMultiply","matrixTranspose"],"notes":[{"user":"ffur2007slx2_5","date":"2014-07-19T16:01:00Z","text":"Arma 3 v1.26 Algorithm:\n\n```sqf\n_vector1 = [x1,y1,z1];\n_vector2 = [x2,y2,z2];\n_result = [\n    (x1 - x2) / (sqrt ((x1 - x2) ^ 2 + (y1 - y2) ^ 2 + (z1 - z2) ^ 2)),\n    (y1 - y2) / (sqrt ((x1 - x2) ^ 2 + (y1 - y2) ^ 2 + (z1 - z2) ^ 2)),\n    (z1 - z2) / (sqrt ((x1 - x2) ^ 2 + (y1 - y2) ^ 2 + (z1 - z2) ^ 2))\n];\n```"}]},{"name":"vectorLinearConversion","title":"vectorLinearConversion","type":"command","url":"https://community.bistudio.com/wiki/vectorLinearConversion","revid":377894,"updated":"2026-01-05T17:41:49Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.92"},"since":"arma3 1.92","arma3_since":"1.92","description":"Interpolates vector between the given *vectorFrom* and *vectorTo* value according to the given range value.","syntaxes":[{"syntax":"vectorLinearConversion [rangeFrom, rangeTo, rangeValue, vectorFrom, vectorTo, clip]","params":[{"name":"rangeFrom","type":"Number","description":"start \"from\" range","type_expr":"Number"},{"name":"rangeTo","type":"Number","description":"end \"to\" range","type_expr":"Number"},{"name":"rangeValue","type":"Number","description":"variable range value","type_expr":"Number"},{"name":"vectorFrom","type":"Vector3D","description":"start \"from\" vector","type_expr":"Vector3D"},{"name":"vectorTo","type":"Vector3D","description":"end \"to\" vector","type_expr":"Vector3D"},{"name":"clip","type":"Boolean","optional":true,"default":"false","description":"if true, range value will be clipped to stay within \"from\" - \"to\" range","type_expr":"Boolean","text":"clip: Boolean - (Optional, default false) if true, range value will be clipped to stay within \"from\" - \"to\" range"}],"returns":{"type":"Vector3D","type_expr":"Vector3D","description":"interpolated vector"},"form":"unary","right":{"text":"[rangeFrom, rangeTo, rangeValue, vectorFrom, vectorTo, clip]"}}],"examples":[{"text":"```sqf\nvectorLinearConversion [0, 1, 0.5, [0,0,0], [25,50,100], false];    // [12.5,25,50]\n```","code":["vectorLinearConversion [0, 1, 0.5, [0,0,0], [25,50,100], false];\t// [12.5,25,50]"]},{"text":"```sqf\nvectorLinearConversion [0, 1, 100, [0,0,0], [25,50,100], true];    // [25,50,100]\n```","code":["vectorLinearConversion [0, 1, 100, [0,0,0], [25,50,100], true];\t// [25,50,100]"]},{"text":"```sqf\nvectorLinearConversion [0, 1, 100, [0,0,0], [25,50,100], false];    // [2500,5000,10000]\n```","code":["vectorLinearConversion [0, 1, 100, [0,0,0], [25,50,100], false];\t// [2500,5000,10000]"]}],"see_also":["linearConversion","bezierInterpolation","matrixMultiply","matrixTranspose"]},{"name":"vectorMagnitude","title":"vectorMagnitude","type":"command","url":"https://community.bistudio.com/wiki/vectorMagnitude","revid":379482,"updated":"2026-10-31T00:12:24Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Magnitude of a 3D vector.\n\n> [!NOTE]\n> **Since Arma 3 v2.14:** Since Arma 3 v2.14 any count of numbers is valid.\n> Before Arma 3 v2.14, the argument had to be vector 3D, or Arma 3 v2.00 2D (With z coordinate defaulted to 0)","syntaxes":[{"syntax":"vectorMagnitude vector","params":[{"name":"vector","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"vector"}}],"examples":[{"code":["_size = vectorMagnitude [0,3,4]; // returns 5"]},{"text":"```sqf\n_speed = vectorMagnitude velocity player;                // return velocity of player in m/s\n_speed = (vectorMagnitude velocity player) * 3.6;        // return velocity of player in km/h\n_speed = (vectorMagnitude velocity player) * 2.23694;    // return velocity of player in mph\n```","code":["_speed = vectorMagnitude velocity player;\t\t\t\t// return velocity of player in m/s\n_speed = (vectorMagnitude velocity player) * 3.6;\t\t// return velocity of player in km/h\n_speed = (vectorMagnitude velocity player) * 2.23694;\t// return velocity of player in mph"]}],"see_also":["vectorAdd","vectorDiff","vectorCrossProduct","vectorDotProduct","vectorCos","vectorMagnitudeSqr","vectorMultiply","vectorDistance","vectorDistanceSqr","vectorDir","vectorUp","setVectorDir","setVectorUp","setVectorDirAndUp","vectorNormalized","vectorFromTo","matrixMultiply","matrixTranspose"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-28T00:00:00Z","text":"Arma 3 v1.22 Algorithm:\n\n```sqf\nVector = [x,y,z];\nResult = sqrt ((x ^ 2) + (y ^ 2) + (z ^ 2));\n```\n\nIt is recommended to use vectorMagnitude instead of BIS_fnc_magnitude."}]},{"name":"vectorMagnitudeSqr","title":"vectorMagnitudeSqr","type":"command","url":"https://community.bistudio.com/wiki/vectorMagnitudeSqr","revid":379483,"updated":"2026-10-31T00:12:32Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Squared magnitude of a 3D vector.\n\n> [!NOTE]\n> **Since Arma 3 v2.14:** Since Arma 3 v2.14 any count of numbers is valid.\n> Before Arma 3 v2.14, the argument had to be vector 3D, or Arma 3 v2.00 2D (With z coordinate defaulted to 0)","syntaxes":[{"syntax":"vectorMagnitudeSqr vector","params":[{"name":"vector","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"vector"}}],"examples":[{"code":["_sizeSqr = vectorMagnitudeSqr [0,3,4]; // returns 25"]}],"see_also":["vectorAdd","vectorDiff","vectorCrossProduct","vectorDotProduct","vectorCos","vectorMagnitude","vectorMultiply","vectorDistance","vectorDistanceSqr","vectorDir","vectorUp","setVectorDir","setVectorUp","setVectorDirAndUp","vectorNormalized","vectorFromTo"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-28T00:00:00Z","text":"Arma 3 v1.22 Algorithm:\n\n```sqf\nVector = [x,y,z];\nResult = (x ^ 2) + (y ^ 2) + (z ^ 2);\n```\n\nIt is recommended to use vectorMagnitudeSqr instead of BIS_fnc_magnitudeSqr."}]},{"name":"vectorModelToWorld","title":"vectorModelToWorld","type":"command","url":"https://community.bistudio.com/wiki/vectorModelToWorld","revid":378448,"updated":"2026-04-16T17:00:30Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Converts vector direction from model to world space.\n\n> [!IMPORTANT]\n> For scaled objects, the resulting vector's magnitude will also be multiplied by the object scale.","syntaxes":[{"syntax":"object vectorModelToWorld modelDir","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"modelDir","type":"Vector3D","description":"vector direction in model space in format [x,y,z]","type_expr":"Vector3D"}],"returns":{"type":"Vector3D","type_expr":"Vector3D","description":"vector direction in world space"},"form":"binary","left":{"text":"object"},"right":{"text":"modelDir"}}],"examples":[{"text":"Convert model space vector [0,-10,4] to world space; vector gets rotated according to _airplane:\n\n```sqf\n_airplane vectorModelToWorld [0,-10,4];\n```","code":["_airplane vectorModelToWorld [0,-10,4];"]}],"see_also":["vectorDir","modelToWorld","addForce","addTorque","vectorModelToWorldVisual","vectorWorldToModel","vectorWorldToModelVisual","matrixMultiply","matrixTranspose"]},{"name":"vectorModelToWorldVisual","title":"vectorModelToWorldVisual","type":"command","url":"https://community.bistudio.com/wiki/vectorModelToWorldVisual","revid":378406,"updated":"2026-04-04T08:14:52Z","groups":["Math - Vectors","Render Time Scope"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Converts vector from model to world space in render time scope.\n\n> [!IMPORTANT]\n> For scaled objects, the resulting vector's magnitude will also be multiplied by the object scale.","syntaxes":[{"syntax":"object vectorModelToWorldVisual modelDir","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"modelDir","type":"Vector3D","description":"vector direction in model space in format [x,y,z]","type_expr":"Vector3D"}],"returns":{"type":"Vector3D","type_expr":"Vector3D","description":"vector direction in world space in format [x,y,z]"},"form":"binary","left":{"text":"object"},"right":{"text":"modelDir"}}],"examples":[{"text":"Convert model space vector [0,-10,4] to world space; vector gets rotated according to _airplane:\n\n```sqf\n_airplane vectorModelToWorldVisual [0,-10,4];\n```","code":["_airplane vectorModelToWorldVisual [0,-10,4];"]}],"see_also":["vectorDirVisual","modelToWorldVisual","addForce","addTorque","vectorModelToWorld","vectorWorldToModel","vectorWorldToModelVisual"]},{"name":"vectorMultiply","title":"vectorMultiply","type":"command","url":"https://community.bistudio.com/wiki/vectorMultiply","revid":373016,"updated":"2025-03-18T15:24:19Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Multiplies an array of numbers by a scalar or another array of numbers.\n\n> [!NOTE]\n> **Since Arma 3 v2.14:** Since Arma 3 v2.14 any count of numbers is valid, if one array is larger than the other, the remaining elements are inserted without change.\n> Before Arma 3 v2.14, the first argument had to be vector 3D, or Arma 3 v2.00 2D (Which still returned 3D result, with z coordinate defaulted to 0)","syntaxes":[{"syntax":"numArray vectorMultiply multiplier","params":[{"name":"numArray","type":"Array of Numbers","description":"an array of any size to be multiplied with the multiplier","type_expr":"Array<Number>"},{"name":"multiplier","type":"Number or Arma 3 v2.14 Array of Numbers","type_expr":"Number | Array<Number>"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>"},"form":"binary","left":{"text":"numArray"},"right":{"text":"multiplier"}}],"examples":[{"code":["_newVector = [1,2,3] vectorMultiply 3; // returns [3,6,9]"]},{"text":"```sqf\n[1,2,3,4] vectorMultiply [1,2,3,4];    // [1,4,9,16]\n[1,2,3,4] vectorMultiply 2;            // [2,4,6,8]\n[1,2,3,4] vectorMultiply [2];        // [2,2,3,4]\n[2] vectorMultiply [1,2,3,4];        // [2,2,3,4]\n[1,2,3] vectorMultiply [1,2,3,4,5];    // [1,4,9,4,5]\n```","code":["[1,2,3,4] vectorMultiply [1,2,3,4];\t// [1,4,9,16]\n[1,2,3,4] vectorMultiply 2;\t\t\t// [2,4,6,8]\n[1,2,3,4] vectorMultiply [2];\t\t// [2,2,3,4]\n[2] vectorMultiply [1,2,3,4];\t\t// [2,2,3,4]\n[1,2,3] vectorMultiply [1,2,3,4,5];\t// [1,4,9,4,5]"]},{"text":"```sqf\nprivate _eyePos = eyePos player;\nprivate _eyeDir = getCameraViewDirection player;    // this is a normalized vector, i.e. its magnitude is 1\nprivate _100mFurther = _eyeDir vectorMultiply 100;    // since _eyeDir is normalised (length = 1m), multiplying it by 100 means 100m in that direction\nprivate _lookPos = _eyePos vectorAdd _100mFurther;    // the position where player is looking 100m ahead\n```","code":["private _eyePos = eyePos player;\nprivate _eyeDir = getCameraViewDirection player;\t// this is a normalized vector, i.e. its magnitude is 1\nprivate _100mFurther = _eyeDir vectorMultiply 100;\t// since _eyeDir is normalised (length = 1m), multiplying it by 100 means 100m in that direction\nprivate _lookPos = _eyePos vectorAdd _100mFurther;\t// the position where player is looking 100m ahead"]},{"text":"```sqf\n// Override firing to throw the player towards where he's aiming\nplayer allowDamage false;\nplayer addAction [\"\", {\n    player setVelocity ((player weaponDirection \"\") vectorMultiply 20);\n}, \"\", 0, false, true, \"DefaultAction\"];\n```","code":["// Override firing to throw the player towards where he's aiming\nplayer allowDamage false;\nplayer addAction [\"\", {\n\tplayer setVelocity ((player weaponDirection \"\") vectorMultiply 20);\n}, \"\", 0, false, true, \"DefaultAction\"];"]}],"see_also":["vectorAdd","vectorDiff","vectorCrossProduct","vectorDotProduct","vectorMagnitude","matrixMultiply"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-28T08:21:00Z","text":"Arma 3 v1.22 Algorithm:\n\n```sqf\nVector = [x, y, z]; scalar = a;\nResult = [(x * a), (y * a), (z * a)];\n```\n\nIt is recommended to use vectorMultiply instead of BIS_fnc_vectorMultiply.\nThis is a very useful function, as it can be used with the velocity command to move an object from one position to another. (ie <vector1> to <vector2>) - ensure both positions are found using getPosASL.\n\n```sqf\n_obj setVelocity (((getPosASL _target) vectorDiff (getPosASL _obj)) vectorMultiply 2);\n```"}]},{"name":"vectorNormalized","title":"vectorNormalized","type":"command","url":"https://community.bistudio.com/wiki/vectorNormalized","revid":378403,"updated":"2026-04-04T08:14:40Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","description":"Returns normalised vector (unit vector, vectorMagnitude == 1) of given vector. If given vector is 0 result is a 0 vector as well.\n\n> [!NOTE]\n> - Arma 3 v2.14 any count of numbers is valid\n> - Arma 3 v2.00 now supports Vector2D (z defaulted to 0)\n> - Arma 3 v1.26 command introduction, only works with Vector3D","syntaxes":[{"syntax":"vectorNormalized vector","params":[{"name":"vector","type":"Array of Numbers","type_expr":"Array<Number>"}],"returns":{"type":"Vector3D","type_expr":"Vector3D"},"form":"unary","right":{"text":"vector"}}],"examples":[{"code":["vectorNormalized [12345,7890,38383]; // [0.300481,0.192045,0.934254]\nvectorMagnitude [0.300481,0.192045,0.934254]; // 1"]}],"see_also":["vectorDiff","vectorCrossProduct","vectorDotProduct","vectorCos","vectorMagnitude","vectorMagnitudeSqr","vectorMultiply","vectorDistance","vectorDistanceSqr","vectorDir","vectorUp","setVectorDir","setVectorUp","setVectorDirAndUp","vectorFromTo","matrixMultiply","matrixTranspose"],"notes":[{"user":"ffur2007slx2_5","date":"2014-07-19T15:13:00Z","text":"Arma 3 v1.26 Algorithm:\n\n```sqf\n_vector = [x,y,z];\n_result = [x / (sqrt (x ^ 2 + y ^ 2 + z ^ 2)), y / (sqrt (x ^ 2 + y ^ 2 + z ^ 2)), z / (sqrt (x ^ 2 + y ^ 2 + z ^ 2))];\n```\n\nIn mathematics, a unit vector in a normed vector space is a vector whose length is 1."}]},{"name":"vectorSide","title":"vectorSide","type":"command","url":"https://community.bistudio.com/wiki/vectorSide","revid":378405,"updated":"2026-04-04T08:14:48Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","locality":{"argument":"global"},"description":"Returns an object's side vector in world space.\n\n> [!IMPORTANT]\n> The vector is **not necessarily normalized**. The magnitude of the vector depends on the object's scale.","syntaxes":[{"syntax":"vectorSide object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Vector3D","type_expr":"Vector3D"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_vecSide = vectorSide MyObject;"]}],"see_also":["vectorSideVisual","vectorUpVisual","vectorDir","setVectorDir","setVectorUp","setVectorDirAndUp","vectorDiff","vectorAdd","vectorMultiply","vectorCrossProduct","vectorDistance","vectorMagnitudeSqr","vectorDistanceSqr","vectorCos","vectorMagnitude","vectorDotProduct","vectorNormalized","vectorFromTo","BIS_fnc_getPitchBank","BIS_fnc_transformVectorDirAndUp"]},{"name":"vectorSideVisual","title":"vectorSideVisual","type":"command","url":"https://community.bistudio.com/wiki/vectorSideVisual","revid":377261,"updated":"2026-01-02T06:33:05Z","groups":["Math - Vectors","Render Time Scope"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","locality":{"argument":"global"},"description":"Returns an object's side vector in world space and render time scope.\n\n> [!IMPORTANT]\n> The vector is **not necessarily normalized**. The magnitude of the vector depends on the object's scale.","syntaxes":[{"syntax":"vectorSideVisual object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Vector3D","type_expr":"Vector3D"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_vecSideVis = vectorSideVisual MyObject;"]}],"see_also":["vectorSide","vectorUpVisual","vectorDir","setVectorDir","setVectorUp","setVectorDirAndUp","vectorDiff","vectorAdd","vectorMultiply","vectorCrossProduct","vectorDistance","vectorMagnitudeSqr","vectorDistanceSqr","vectorCos","vectorMagnitude","vectorDotProduct","vectorNormalized","vectorFromTo","BIS_fnc_getPitchBank","BIS_fnc_transformVectorDirAndUp"]},{"name":"vectorUp","title":"vectorUp","type":"command","url":"https://community.bistudio.com/wiki/vectorUp","revid":377264,"updated":"2026-01-02T06:33:14Z","groups":["Math - Vectors"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns an object's up vector in world space.\n\n> [!IMPORTANT]\n> The vector is **not necessarily normalized**. The magnitude of the vector depends on the object's scale.","syntaxes":[{"syntax":"vectorUp object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Vector3D","type_expr":"Vector3D"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_vecUp = vectorUp MyObject;"]}],"see_also":["vectorUpVisual","vectorDir","vectorSide","vectorSideVisual","setVectorDir","setVectorUp","setVectorDirAndUp","vectorDiff","vectorAdd","vectorMultiply","vectorCrossProduct","vectorDistance","vectorMagnitudeSqr","vectorDistanceSqr","vectorCos","vectorMagnitude","vectorDotProduct","vectorNormalized","vectorFromTo","BIS_fnc_getPitchBank","BIS_fnc_transformVectorDirAndUp"]},{"name":"vectorUpVisual","title":"vectorUpVisual","type":"command","url":"https://community.bistudio.com/wiki/vectorUpVisual","revid":377255,"updated":"2026-01-02T06:32:45Z","groups":["Math - Vectors","Render Time Scope"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","locality":{"argument":"global"},"description":"Returns an object's up vector in world space and render time scope.\n\n> [!IMPORTANT]\n> The vector is **not necessarily normalized**. The magnitude of the vector depends on the object's scale.","syntaxes":[{"syntax":"vectorUpVisual object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Vector3D","type_expr":"Vector3D"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_vecUpVis = vectorUpVisual MyObject;"]}],"see_also":["vectorUp","vectorDirVisual","vectorSide","vectorSideVisual","vectorDir","setVectorDir","setVectorUp","setVectorDirAndUp","vectorDiff","vectorAdd","vectorMultiply","vectorCrossProduct","vectorDistance","vectorMagnitudeSqr","vectorDistanceSqr","vectorCos","vectorMagnitude","vectorDotProduct","vectorNormalized","vectorFromTo"]},{"name":"vectorWorldToModel","title":"vectorWorldToModel","type":"command","url":"https://community.bistudio.com/wiki/vectorWorldToModel","revid":377866,"updated":"2026-01-04T11:33:08Z","groups":["Math - Vectors"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Converts vector direction from world to model space.\n\n> [!IMPORTANT]\n> For scaled objects, the resulting vector's magnitude will be divided by the object scale.","syntaxes":[{"syntax":"object vectorWorldToModel worldDir","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"worldDir","type":"Vector3D","description":"vector direction in world space in format [x,y,z]","type_expr":"Vector3D"}],"returns":{"type":"Vector3D","type_expr":"Vector3D","description":"vector direction in model space in format [x,y,z]"},"form":"binary","left":{"text":"object"},"right":{"text":"worldDir"}}],"examples":[{"text":"Convert world space vector [0,-10,4] to model space of object _airplane:\n\n```sqf\n_airplane vectorWorldToModel [0,-10,4];\n```","code":["_airplane vectorWorldToModel [0,-10,4];"]}],"see_also":["addForce","worldToModel","addTorque","vectorModelToWorld","vectorModelToWorldVisual","vectorWorldToModelVisual","matrixMultiply","matrixTranspose"]},{"name":"vectorWorldToModelVisual","title":"vectorWorldToModelVisual","type":"command","url":"https://community.bistudio.com/wiki/vectorWorldToModelVisual","revid":377893,"updated":"2026-01-05T17:39:06Z","groups":["Math - Vectors","Render Time Scope"],"status":"ok","games":{"arma3":"1.72"},"since":"arma3 1.72","arma3_since":"1.72","description":"Converts vector direction from world to model space in render time scope.\n\n> [!IMPORTANT]\n> For scaled objects, the resulting vector's magnitude will be divided by the object scale.","syntaxes":[{"syntax":"object vectorWorldToModelVisual worldDir","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"worldDir","type":"Vector3D","description":"vector direction in world space in format [x,y,z]","type_expr":"Vector3D"}],"returns":{"type":"Vector3D","type_expr":"Vector3D","description":"vector direction in model space in format [x,y,z]"},"form":"binary","left":{"text":"object"},"right":{"text":"worldDir"}}],"examples":[{"text":"Convert world space vector [0,-10,4] to model space of object _airplane:\n\n```sqf\nprivate _vector = _airplane vectorWorldToModelVisual [0,-10,4];\n```","code":["private _vector = _airplane vectorWorldToModelVisual [0,-10,4];"]}],"see_also":["addForce","worldToModelVisual","addTorque","vectorModelToWorld","vectorModelToWorldVisual","vectorWorldToModel"]},{"name":"vehicle","title":"vehicle","type":"command","url":"https://community.bistudio.com/wiki/vehicle","revid":376160,"updated":"2025-09-08T19:48:37Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Vehicle in which given unit is mounted. If none, unit is returned. Alternatively, use objectParent\n\n> [!IMPORTANT]\n> While vehicle may return the vehicle the unit is in for **alive** units, for dead units which are groupless, this command returns the unit itself - use objectParent instead.","syntaxes":[{"syntax":"vehicle unitName","params":[{"name":"unitName","type":"Object","description":"alive unit","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"unitName"}}],"examples":[{"text":"SQS\n\n```sqs\n? vehicle player != player : hint \"Player is in a vehicle\"\n```","code":["? vehicle player != player : hint \"Player is in a vehicle\""]},{"text":"SQF\n\n```sqf\nif (vehicle player != player) then { hint \"Player is in a vehicle\" };\n```","code":["if (vehicle player != player) then { hint \"Player is in a vehicle\" };"]}],"see_also":["objectParent"]},{"name":"vehicleCargoEnabled","title":"vehicleCargoEnabled","type":"command","url":"https://community.bistudio.com/wiki/vehicleCargoEnabled","revid":349518,"updated":"2023-11-08T17:15:53Z","groups":["Vehicle in Vehicle Transport"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","description":"Check if the vehicle has enabled transporting other vehicles or not.","syntaxes":[{"syntax":"vehicleCargoEnabled vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"returns true if the vehicle has enabled transporting other vehicles, and false if the vehicle has not enabled transporting other vehicles"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"text":"Blackfish (Vehicle Transport) with given variable name blackfish\n\n```sqf\n_canTransportVehicles = vehicleCargoEnabled blackfish; //returns true\n```","code":["_canTransportVehicles = vehicleCargoEnabled blackfish; //returns true"]}],"see_also":["Arma 3: Vehicle in Vehicle Transport","canVehicleCargo","setVehicleCargo","enableVehicleCargo","getVehicleCargo","isVehicleCargo"]},{"name":"vehicleChat","title":"vehicleChat","type":"command","url":"https://community.bistudio.com/wiki/vehicleChat","revid":376772,"updated":"2025-11-17T00:04:46Z","groups":["Radio and Chat"],"status":"ok","games":{"ofp":"1.34","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.34","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Types text to the vehicle radio channel. The text will be visible only on the PC where command was executed. If you need the message to show on all computers, you have to execute it globally, see remoteExec. Use clearRadio to clear chat history\n\n> [!NOTE]\n> - Object parameter must be a vehicle, not a player\n> - If you are in a crew seat (i.e. driver, gunner or commander), then it will include that role in the chat name output (Eg: Driver (you_name): \"Message\")","syntaxes":[{"syntax":"vehicle vehicleChat chatText","params":[{"name":"vehicle","type":"Object","description":"vehicle unit is in","type_expr":"Object"},{"name":"chatText","type":"String","description":"message to transmit","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"chatText"}}],"examples":[{"code":["vehicle player vehicleChat \"Show this text\";"]},{"code":["driver vehicle player sideChat \"sideChat\";\ndriver vehicle player globalChat \"globalChat\";\ndriver vehicle player groupChat \"groupChat\";\nvehicle player vehicleChat \"vehicleChat\";\ndriver vehicle player commandChat \"commandChat\";\ndriver vehicle player customChat [1, \"customChat\"];\nsystemChat \"systemChat\";"]}],"see_also":["globalChat","groupChat","sideChat","commandChat","customChat","systemChat","vehicleRadio"]},{"name":"vehicleMoveInfo","title":"vehicleMoveInfo","type":"command","url":"https://community.bistudio.com/wiki/vehicleMoveInfo","revid":379198,"updated":"2026-10-28T21:49:09Z","groups":["Object Manipulation","Unit Control"],"status":"ok","games":{"arma3":"1.98"},"since":"arma3 1.98","arma3_since":"1.98","description":"Returns current vehicle move/turn info (a getter for sendSimpleCommand) in format [moveInfo, turnInfo]. Possible values:\n\n| moveInfo | turnInfo |\n|---|---|\n| - `\"FORMATION\"` - vehicle is stationary<br>- `\"FORWARD\"` - vehicle (also steerable parachute) is moving forward<br>- `\"FAST\"` - vehicle (also steerable parachute) is fast moving forward<br>- `\"SLOW\"` - vehicle (also steerable parachute) is slow moving forward<br>- `\"STOP\"` - vehicle is stationary<br>- `\"BACK\"` - vehicle is reversing<br>- `\"DirectByComander\"` [sic] - keyboard pilot is used, i.e. player is in the vehicle and is the effectiveCommander pressing any driving key (WASD or arrows).<br>- `\"MOVE\"`<br>- `\"CONVOY\"`<br>- `\"SIMPLE\"` | - `\"LEFT\"` - vehicle (also steerable parachute) is turning left (use \"STOPTURNING\" to cancel)<br>- `\"RIGHT\"` - vehicle (also steerable parachute) is turning right (use \"STOPTURNING\" to cancel)<br>- `\"NONE\"` - vehicle (also steerable parachute) is not turning (when script command is used)<br>- `\"ABS\"` - vehicle is not turning (when keyboard pilot is used) |","syntaxes":[{"syntax":"vehicleMoveInfo vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [moveInfo, turnInfo]\n- moveInfo: String - state of vehicle forward/backward movement (see description) - turnInfo: String - state of vehicle left/right turning (see description)","text":"Array with [moveInfo, turnInfo]\n\n- moveInfo: String - state of vehicle forward/backward movement (see description)\n- turnInfo: String - state of vehicle left/right turning (see description)"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["onEachFrame { hintSilent str vehicleMoveInfo vehicle player };"]}],"see_also":["sendSimpleCommand","useAISteeringComponent","effectiveCommander","setEffectiveCommander","enableAI","disableAI","getUnitState","getUnitMovesInfo","enableAIFeature"]},{"name":"vehicleRadio","title":"vehicleRadio","type":"command","url":"https://community.bistudio.com/wiki/vehicleRadio","revid":379399,"updated":"2026-10-31T00:01:20Z","groups":["Radio and Chat","Sounds"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Sends the audio message to the vehicle radio channel. The message is defined in CfgRadio in the description.ext file or config radio protocol. The transmission will play only on the PC where command was executed. If you need the transmission to play on all computers, you have to execute it globally (see remoteExec).\n\n> [!NOTE]\n> When transmitting unit gets killed, transmission will be interrupted. However when receiving unit gets killed, the transmission continues to play.","syntaxes":[{"syntax":"unit vehicleRadio radioName","params":[{"name":"unit","type":"Object","description":"unit to transmit","type_expr":"Object"},{"name":"radioName","type":"String","description":"class name from CfgRadio","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"radioName"}}],"examples":[{"code":["_soldierOne vehicleRadio \"messageOne\";"]},{"code":["player vehicleRadio configName selectRandom (\"true\" configClasses (configFile >> \"CfgRadio\"));"]}],"see_also":["sideRadio","groupRadio","customRadio","vehicleChat","globalRadio","directSay","commandRadio"],"notes":[{"user":"Killzone_Kid","date":"2016-12-03T21:35:00Z","text":"To transmit user custom sounds (see Multiplayer_Custom_Sounds_Tutorial), prefix the full filename including file extension with #. For example if there is a custom user sound file called `MySound.ogg`, to play it on the radio use:\n\n```sqf\nplayer vehicleRadio \"#MySound.ogg\";\n```"}]},{"name":"vehicleReceiveRemoteTargets","title":"vehicleReceiveRemoteTargets","type":"command","url":"https://community.bistudio.com/wiki/vehicleReceiveRemoteTargets","revid":311075,"updated":"2022-05-07T20:59:23Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Gets whether the vehicle can acquire targets via datalink from the Side center.","syntaxes":[{"syntax":"vehicleReceiveRemoteTargets vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["vehicleReceiveRemoteTargets vehicle player;"]}],"see_also":["setVehicleRadar","vehicleReportRemoteTargets","setVehicleReportRemoteTargets","setVehicleReceiveRemoteTargets","vehicleReportOwnPosition","setVehicleReportOwnPosition","reportRemoteTarget","confirmSensorTarget"]},{"name":"vehicleReportOwnPosition","title":"vehicleReportOwnPosition","type":"command","url":"https://community.bistudio.com/wiki/vehicleReportOwnPosition","revid":311076,"updated":"2022-05-07T20:59:46Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Gets whether the vehicle shares its own position via datalink with the Side center.","syntaxes":[{"syntax":"vehicleReportOwnPosition vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["vehicleReportOwnPosition vehicle player;"]}],"see_also":["setVehicleRadar","vehicleReportRemoteTargets","setVehicleReportRemoteTargets","vehicleReceiveRemoteTargets","setVehicleReceiveRemoteTargets","setVehicleReportOwnPosition","reportRemoteTarget"]},{"name":"vehicleReportRemoteTargets","title":"vehicleReportRemoteTargets","type":"command","url":"https://community.bistudio.com/wiki/vehicleReportRemoteTargets","revid":311077,"updated":"2022-05-07T21:00:14Z","groups":["Sensors"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Gets whether the vehicle shares acquired targets via datalink with the Side center.","syntaxes":[{"syntax":"vehicleReportRemoteTargets vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["vehicleReportRemoteTargets vehicle player;"]}],"see_also":["setVehicleRadar","setVehicleReportRemoteTargets","vehicleReceiveRemoteTargets","setVehicleReceiveRemoteTargets","vehicleReportOwnPosition","setVehicleReportOwnPosition","reportRemoteTarget","confirmSensorTarget"]},{"name":"vehicles","title":"vehicles","type":"command","url":"https://community.bistudio.com/wiki/vehicles","revid":377110,"updated":"2026-01-01T10:06:56Z","groups":["Object Detection"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Returns an array of all vehicles available to current client. This command returns both empty and crewed vehicles but not soldiers. It will also return \"WeaponHolderSimulated\" of dead bodies (weapon on the ground). Vehicles created with createVehicleLocal will only be returned on the client that created them.","syntaxes":[{"syntax":"vehicles","params":[],"returns":{"type":"Array of Objects","type_expr":"Array<Object>"},"form":"nullary"}],"examples":[{"code":["_vehicles = vehicles;"]}],"see_also":["allGroups","allUnits","units","entities","agents","playableUnits","switchableUnits","allPlayers","allDead","allDeadMen","allUnitsUAV","allCurators","allObjects","allMissionObjects","allSimpleObjects","allMines"],"notes":[{"user":"Sa-Matra","date":"2024-06-18T06:18:00Z","text":"This command returns a lot of crap that is not really a vehicle in a common sense - simulated weapon holders, clutter cutters, etc. It also skips \"out\" vehicles (disassembled drones and statics). Be careful iterating through it as it may be expensive.\n\nHere is a list of most vehicle simulations that are returned by this command:\n\n```sqf\nairplanex\nartillerymarker\ncar\ncarx\nfire\nhelicopterrtd\nlasertarget\nmotorcycle\nnvmarker\nparachute\nparaglide\nrope\nshipx\nsubmarinex\nsuppresstarget\ntankx\nthing\nthingx\n```\n\nGenerated using this code bit:\n\n```sqf\nprivate _sims = createHashMap;\n{\n    private _sim = toLowerANSI getText(_x >> \"simulation\");\n    if!(_sim in _sims) then {\n        _sims set [_sim, configName _x];\n    };\n} forEachReversed (\"getNumber(_x >> 'scope') > 0\" configClasses (configFile >> \"CfgVehicles\"));\n\nprivate _used_sims = [];\n{\n    if(createVehicle [_y, [random 1e5,random 1e5,random 1e5], [], 0, \"CAN_COLLIDE\"] in vehicles) then {\n        _used_sims pushBack _x;\n    };\n} forEach _sims;\n\n_used_sims sort true;\ncopyToClipboard (_used_sims joinString toString [10]);\n```\n\nThere is probably more simulations not listed like non-x versions of vehicle simulations but these are ones actually used in A3."}]},{"name":"vehicleVarName","title":"vehicleVarName","type":"command","url":"https://community.bistudio.com/wiki/vehicleVarName","revid":352868,"updated":"2024-02-28T19:33:35Z","groups":["Object Manipulation"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the variable name that contains a primary editor reference to this object. This is the variable given in the *Insert Unit dialog / name field* in the editor. It can be changed using setVehicleVarName.\n\n> [!NOTE]\n> Respawned unit will have the same vehicleVarName as the corpse left behind, however actual missionNamespace variable of the same name will only contain respawned unit.","syntaxes":[{"syntax":"vehicleVarName object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String","description":"variable name, if none was set, an empty string is returned"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["hint vehicleVarName player;"]}],"see_also":["setVehicleVarName","BIS_fnc_objectVar"],"notes":[{"user":"Killzone_Kid","date":"2015-04-19T08:45:00Z","text":"To get variable names referencing an object in mission namespace:\n\n```sqf\nKK_fnc_objectVarNames = {\n    private \"_names\";\n    _names = [];\n    {\n        if (missionNamespace getVariable _x isEqualTo _this) then {\n            _names pushBack _x;\n        };\n    } forEach allVariables missionNamespace;\n    _names\n};\n\n// Example\nmyGroup = group player;\naGroup = group player;\nhint str (group player call KK_fnc_objectVarNames); // [\"agroup\", \"mygroup\"]\n```"}]},{"name":"velocity","title":"velocity","type":"command","url":"https://community.bistudio.com/wiki/velocity","revid":377249,"updated":"2026-01-02T06:14:11Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.80","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.80","arma3_since":"0.50","description":"Returns the velocity of the object as vector in m/s.","syntaxes":[{"syntax":"velocity object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Vector3D","type_expr":"Vector3D"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_vector = velocity jeep;"]},{"code":["if ((velocity _plane1 select 2) > 50) then { hint \"Aircraft is climbing up too fast!\"; };"]}],"see_also":["setVelocity","velocityModelSpace","setVelocityModelSpace","setVelocityTransformation","speed"]},{"name":"velocityModelSpace","title":"velocityModelSpace","type":"command","url":"https://community.bistudio.com/wiki/velocityModelSpace","revid":377109,"updated":"2026-01-01T10:06:22Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns the velocity (speed vector) of the vehicle as an array with format [x, y, z] in metre per second. Vector is in model space.","syntaxes":[{"syntax":"velocityModelSpace vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"Vector3D","type_expr":"Vector3D"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["velocityModelSpace _chopper; // returns [X (left(-) right(+)), Y (backward(-) forward(+)), Z (down(-) up(+))]"]}],"see_also":["setVelocityModelSpace","velocity","speed","setVelocity","setVelocityTransformation"],"notes":[{"user":"Pierre MGI","date":"2014-12-11T02:55:00Z","text":"This function is useful for helicopters as it returns Z vector like an indicator of thrust/load ratio. More or less climb (+) or descent (-) tendency but:\nAs X,Y,Z vectors are relative to vehicle attitude, this function doesn't return a climb or descend rate (as the attitude of the vehicle can be far from horizontal).\nYou can get negative Z vector, in jets, while climbing fast, peeling off in the sky!\nMore or less, you can use as a Z accelerometer factor but invert the sign: +G acceleration (negative vector below the jet) is -Z here.\nIf not \"physically\" correct, the behavior is sufficient enough for Arma flight model."},{"user":"K.J.","date":"2015-06-21T02:36:00Z","text":"Previous note is physically incorrect. Velocity can not be used to give information about Thrust/Load ratio or G-Forces/acceleration.\nTo get acceleration you have to create the derivative of velocity after time dv/dt -> the difference of velocity between 2 timesteps divided by the time that passed between the 2 steps."}]},{"name":"verifySignature","title":"verifySignature","type":"command","url":"https://community.bistudio.com/wiki/verifySignature","revid":319877,"updated":"2022-05-13T09:25:38Z","groups":["Mods and Addons"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Check if file is signed by any key present in game keys folders. On clients, it does not check against the keys accepted by server.","syntaxes":[{"syntax":"verifySignature filename","params":[{"name":"filename","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"filename"}}],"examples":[{"code":["verifySignature \"@MyAddon\\Addons\\SomeAddon.pbo\";"]},{"code":["verifySignature \"@MyAddon\\Somefnc.dll\";"]}],"see_also":["ArmA: Addon Signatures"]},{"name":"vest","title":"vest","type":"command","url":"https://community.bistudio.com/wiki/vest","revid":319955,"updated":"2022-05-13T09:25:47Z","groups":["Containers","Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"nameof vest.","syntaxes":[{"syntax":"vest unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_myVest = vest player;"]}],"see_also":["removeVest","addVest"]},{"name":"vestContainer","title":"vestContainer","type":"command","url":"https://community.bistudio.com/wiki/vestContainer","revid":369325,"updated":"2024-09-03T18:42:58Z","groups":["Containers","Unit Inventory"],"status":"ok","games":{"arma3":"1.04"},"since":"arma3 1.04","arma3_since":"1.04","description":"Returns a cargo container of a unit's vest.","syntaxes":[{"syntax":"vestContainer unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Object","type_expr":"Object","description":"cargo container or objNull if unit does not wear a vest","text":"Object - cargo container or objNull if *unit* does not wear a vest"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["hint str vestContainer player; // 2df7d600# 163942: dummyweapon.p3d"]},{"text":"```sqf\nhint str getMagazineCargo vestContainer player;\n/*\n    returns e.g\n    [\n        [\n            \"30Rnd_65x39_caseless_mag\",\n            \"16Rnd_9x21_Mag\",\n            \"HandGrenade\",\n            \"APERSMine_Range_Mag\",\n            \"SmokeShell\",\n            \"SmokeShellGreen\",\n            \"Chemlight_green\"\n        ],[\n            2,\n            2,\n            2,\n            3,\n            1,\n            1,\n            2\n        ]\n    ]\n*/\n```","code":["hint str getMagazineCargo vestContainer player;\n/*\n\treturns e.g\n\t[\n\t\t[\n\t\t\t\"30Rnd_65x39_caseless_mag\",\n\t\t\t\"16Rnd_9x21_Mag\",\n\t\t\t\"HandGrenade\",\n\t\t\t\"APERSMine_Range_Mag\",\n\t\t\t\"SmokeShell\",\n\t\t\t\"SmokeShellGreen\",\n\t\t\t\"Chemlight_green\"\n\t\t],[\n\t\t\t2,\n\t\t\t2,\n\t\t\t2,\n\t\t\t3,\n\t\t\t1,\n\t\t\t1,\n\t\t\t2\n\t\t]\n\t]\n*/"]}],"see_also":["uniformContainer","backpackContainer","everyContainer"]},{"name":"vestItems","title":"vestItems","type":"command","url":"https://community.bistudio.com/wiki/vestItems","revid":377108,"updated":"2026-01-01T10:05:52Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get array with all items (of any kind, even weapons) from vest.","syntaxes":[{"syntax":"vestItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"Class names of items"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"```sqf\nvestItems player;\n// returns e.g\n/*\n[\n    \"30Rnd_65x39_caseless_mag\",\n    \"30Rnd_65x39_caseless_mag\",\n    \"16Rnd_9x21_Mag\",\n    \"16Rnd_9x21_Mag\",\n    \"HandGrenade\",\n    \"HandGrenade\",\n    \"SmokeShell\",\n    \"SmokeShellGreen\",\n    \"Chemlight_green\",\n    \"Chemlight_green\"\n]\n*/\n```","code":["vestItems player;\n// returns e.g\n/*\n[\n\t\"30Rnd_65x39_caseless_mag\",\n\t\"30Rnd_65x39_caseless_mag\",\n\t\"16Rnd_9x21_Mag\",\n\t\"16Rnd_9x21_Mag\",\n\t\"HandGrenade\",\n\t\"HandGrenade\",\n\t\"SmokeShell\",\n\t\"SmokeShellGreen\",\n\t\"Chemlight_green\",\n\t\"Chemlight_green\"\n]\n*/"]}],"see_also":["uniformItems","backpackItems"]},{"name":"vestMagazines","title":"vestMagazines","type":"command","url":"https://community.bistudio.com/wiki/vestMagazines","revid":321370,"updated":"2022-05-14T10:53:55Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get array with all magazines from vest of the given unit.","syntaxes":[{"syntax":"vestMagazines unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of String","type_expr":"Array<String>"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"```sqf\nvestMagazines player;\n// returns e.g\n/*\n[\n    \"6.5mm 30Rnd STANAG Mag(30/30)[id/cr:4/0](2x)\",\n    \"9mm 16Rnd Mag(16/16)[id/cr:7/0](2x)\",\n    \"RGO Frag Grenade(1/1)[id/cr:10/0](2x)\",\n    \"Smoke Grenade (White)(1/1)[id/cr:12/0](1x)\",\n    \"Smoke Grenade (Green)(1/1)[id/cr:13/0](1x)\",\n    \"Chemlight (Green)(1/1)[id/cr:14/0](2x)\"\n]\n*/\n```","code":["vestMagazines player;\n// returns e.g\n/*\n[\n\t\"6.5mm 30Rnd STANAG Mag(30/30)[id/cr:4/0](2x)\",\n\t\"9mm 16Rnd Mag(16/16)[id/cr:7/0](2x)\",\n\t\"RGO Frag Grenade(1/1)[id/cr:10/0](2x)\",\n\t\"Smoke Grenade (White)(1/1)[id/cr:12/0](1x)\",\n\t\"Smoke Grenade (Green)(1/1)[id/cr:13/0](1x)\",\n\t\"Chemlight (Green)(1/1)[id/cr:14/0](2x)\"\n]\n*/"]}],"see_also":["uniformMagazines","backpackMagazines","soldierMagazines"]},{"name":"viewDistance","title":"viewDistance","type":"command","url":"https://community.bistudio.com/wiki/viewDistance","revid":319951,"updated":"2022-05-13T09:25:46Z","groups":["System","Environment"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns the rendering distance.","syntaxes":[{"syntax":"viewDistance","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["hint (\"my view distance is \" + str viewDistance + \" meters\");"]}],"see_also":["setViewDistance","setDetailMapBlendPars","setTerrainGrid","getObjectViewDistance","setObjectViewDistance"]},{"name":"visibleCompass","title":"visibleCompass","type":"command","url":"https://community.bistudio.com/wiki/visibleCompass","revid":319850,"updated":"2022-05-13T09:25:35Z","groups":["Interaction"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Checks if the player has compass opened and visible. Keep in mind that the GPS minimap in Arma 3 also shows the direction.","syntaxes":[{"syntax":"visibleCompass","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (visibleCompass) then {hint \"Compass is visible\"};"]}],"see_also":["showCompass","shownCompass","visibleGPS","visibleWatch"]},{"name":"visibleGPS","title":"visibleGPS","type":"command","url":"https://community.bistudio.com/wiki/visibleGPS","revid":378434,"updated":"2026-04-07T19:38:22Z","groups":["Interaction"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Checks if the player has GPS receiver (minimap) opened and visible.","syntaxes":[{"syntax":"visibleGPS","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (visibleGPS) then\n{\n    hint \"GPS is visible\";\n};\n```","code":["if (visibleGPS) then\n{\n\thint \"GPS is visible\";\n};"]}],"see_also":["openGPS","showGPS","shownGPS","visibleWatch","visibleCompass"]},{"name":"visibleMap","title":"visibleMap","type":"command","url":"https://community.bistudio.com/wiki/visibleMap","revid":376117,"updated":"2025-08-30T17:58:07Z","groups":["Map","Interaction"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return true if the main map is shown (active). In Arma 3 it also returns true if the respawn screen map is visible.","syntaxes":[{"syntax":"visibleMap","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (visibleMap) then { hint \"You're showing the map !\" };"]}],"see_also":["forceMap","openMap"],"notes":[{"user":"3.JgKp James","date":"2017-11-13T15:14:00Z","text":"visibleMap does not work in all cases where a map might be part of a dialog like in a uav terminal or in a artillery computer dialog.\nSome of these cases can be covered with an addMissionEventHandler of type \"Map\".\nJust use the two magic variables 'mapIsOpened' and 'mapIsForced'. Skeleton might look something like:\n\n```sqf\n// update marker as long as map is open (works for UAV stations as well)\nJ_myGPSEH = addMissionEventHandler [\"Map\", {\n\n    params [\"_mapIsOpened\", \"_mapIsForced\"];\n\n    if (_mapIsOpened) then\n    {\n        systemChat \"GPS active\";\n        J_var_GPSOn = true;\n\n        // no sheduled environment -> create one\n        /* Triggered when map is opened or closed either by user action or script command openMap. */\n        0 spawn {\n            waitUntil {\n                // ... // do something as long as map is open\n                not J_var_GPSOn;\n            };\n        };\n    }\n    else\n    {\n        J_var_GPSOn = false;\n        systemChat \"GPS inactive\";\n    };\n}];\n```"}]},{"name":"visiblePosition","title":"visiblePosition","type":"command","url":"https://community.bistudio.com/wiki/visiblePosition","revid":363616,"updated":"2024-04-08T11:45:05Z","groups":["Positions","Render Time Scope"],"status":"ok","games":{"arma2oa":"1.60","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.60","arma3_since":"0.50","description":"Returns an object's rendered position (z value above surface underneath) in render time scope. Same as getPosVisual.\n\n> [!IMPORTANT]\n> This command must **not** be used for actual 3D calculations. See getPos for an explanation.","syntaxes":[{"syntax":"visiblePosition object","params":[{"name":"object","type":"Object","description":"name of the object","type_expr":"Object"}],"returns":{"type":"PositionAGLS","type_expr":"PositionAGLS"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_playerRenderedPos = visiblePosition player;"]}],"see_also":["getPosVisual","getPosATLVisual","getPosASLVisual","getPosWorldVisual","visiblePositionASL","position","getPos","getPosATL","getPosASL","getPosASLW"],"notes":[{"user":"Leopard20","date":"2022-01-26T15:15:06Z","text":"Note that this command returns the position in AGLS format (Z is measured from the nearest surface below). For example the value of Z is 0 even if the object is resting on top of a building.\nFor use with draw commands, such as drawIcon3D, an AGL position is needed. The following alternatives can be used, depending on where the icon is intended to be shown:\n\n```sqf\nASLToAGL getPosWorldVisual _object        // object center in model coordinates, i.e [0,0,0]\nASLToAGL getPosASLVisual _object        // object land contact (e.g. floor of a building)\nunitAimPositionVisual _object            // object's aiming position, i.e where the AI aim at, such as a soldier's chest\n_object modelToWorldVisual _relativePos    // custom position in model coordinates. if _relativePos is [0,0,0], it'll be the same as ASLToAGL getPosWorldVisual _object\n```"}]},{"name":"visiblePositionASL","title":"visiblePositionASL","type":"command","url":"https://community.bistudio.com/wiki/visiblePositionASL","revid":377444,"updated":"2026-01-02T06:46:56Z","groups":["Positions","Render Time Scope"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Returns an object's rendered ASL position (z value above sea level) in render time scope.","syntaxes":[{"syntax":"visiblePositionASL object","params":[{"name":"object","type":"Object","description":"name of the object","type_expr":"Object"}],"returns":{"type":"PositionASL","type_expr":"PositionASL"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_playerRenderedPosASL = visiblePositionASL player;"]}],"see_also":["getPosVisual","getPosASLVisual","getPosATLVisual","getPosWorldVisual","visiblePosition","position","getPos","getPosATL","getPosASL","getPosASLW"]},{"name":"visibleScoretable","title":"visibleScoretable","type":"command","url":"https://community.bistudio.com/wiki/visibleScoretable","revid":310767,"updated":"2022-05-07T20:21:40Z","groups":["Interaction"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","description":"Checks whether the score table is visible.","syntaxes":[{"syntax":"visibleScoretable","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_visible = visibleScoretable;"]}],"see_also":["showScoretable","shownScoretable"]},{"name":"visibleWatch","title":"visibleWatch","type":"command","url":"https://community.bistudio.com/wiki/visibleWatch","revid":364092,"updated":"2024-05-03T19:50:40Z","groups":["Interaction"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Checks if the player has watch opened and visible. Keep in mind that the GPS minimap in Arma 3 also shows the time.","syntaxes":[{"syntax":"visibleWatch","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (visibleWatch) then { hint \"Watch is visible\" };"]}],"see_also":["showWatch","shownWatch","visibleGPS","visibleCompass"]},{"name":"waitUntil","title":"waitUntil","type":"command","url":"https://community.bistudio.com/wiki/waitUntil","revid":378959,"updated":"2026-09-03T14:52:35Z","groups":["Program Flow"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Suspends execution of scheduled script until the given condition satisfied.\n\n- This command will loop and call the code inside `{}` **mostly every frame**, depends on complexity of the condition and the overall engine load, until the code returns true\n- If the very first execution of the code returns true the command will exit immediately, therefore it will not produce any \"Suspending not allowed in this context\" error when used inside non-scheduled script. For all other uses it must be executed in environment that allows suspension (canSuspend), such as spawned or execVMed code\n- Avoid doing `waitUntil { time > 20 };` and use `sleep 20;` instead!\n- If you can, add a sleep to the condition to save some cpu cycles `waitUntil { sleep 1; !alive player };`\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.94, a *condition* returning anything other than true or false **will** result in an appropriate type error.","syntaxes":[{"syntax":"waitUntil condition","params":[{"name":"condition","type":"Code","description":"the expression that **must** return a Boolean, true to finish waiting or false to continue waiting","type_expr":"Code"}],"returns":{"type":"Anything","type_expr":"Anything","description":"the value the condition evaluates to when the wait is over (normally true)"},"form":"unary","right":{"text":"condition"}},{"syntax":"waitUntil [condition, timeout, interval]","since":"arma3 2.22","params":[{"name":"condition","type":"Code","description":"the expression that **must** return a Boolean, true to finish waiting or false to continue waiting","type_expr":"Code"},{"name":"timeout","type":"Number","description":"a timeout in seconds of game time (sleep vs uiSleep). The timeout is only checked after the condition was checked. **Any negative value disables the timeout**","type_expr":"Number"},{"name":"interval","type":"Number","optional":true,"default":"0","description":"the time interval in seconds of game time between condition checks, this is equivalent to using a \"sleep\" after the condition.","type_expr":"Number","text":"interval: Number - (Optional, default 0) the time interval in seconds of game time between condition checks, this is equivalent to using a \"sleep\" after the condition."}],"returns":{"type":"Anything","type_expr":"Anything","description":"the value the condition evaluates to when the wait is over (normally true), or Nothing if the timeout ended the wait"},"form":"unary","right":{"text":"[condition, timeout, interval]"}},{"syntax":"waitUntil scriptHandle","since":"arma3 2.22","params":[{"name":"scriptHandle","type":"Script Handle","description":"a script handle or promise to wait on","type_expr":"Script Handle"}],"returns":{"type":"Anything","type_expr":"Anything","description":"The result of the script or Promise"},"form":"unary","right":{"text":"scriptHandle"}},{"syntax":"waitUntil [scriptHandle, timeout]","since":"arma3 2.22","params":[{"name":"scriptHandle","type":"Script Handle","description":"a script handle or promise to wait on","type_expr":"Script Handle"},{"name":"timeout","type":"Number","description":"a timeout in seconds of game time (sleep vs uiSleep)","type_expr":"Number"}],"returns":{"type":"Anything","type_expr":"Anything","description":"the result of the script or Promise. Or Nothing if timed out."},"form":"unary","right":{"text":"[scriptHandle, timeout]"}}],"examples":[{"code":["waitUntil { not alive player };"]},{"code":["_i = 0; waitUntil { _i = _i + 1; _i >= 100 };"]},{"text":"waitUntil can lead to performance loss if used improperly:\n\n```sqf\nwaitUntil { not alive player };            // bad\nwaitUntil { sleep 1; not alive player };    // good - checks every 1 second\nplayer addEventHandler [\"Killed\", {  }];    // best - don't forget about Event Handlers\n```","code":["waitUntil { not alive player };\t\t\t// bad\nwaitUntil { sleep 1; not alive player };\t// good - checks every 1 second\nplayer addEventHandler [\"Killed\", {  }];\t// best - don't forget about Event Handlers"]},{"text":"An on-the-fly custom event handler:\n\n```sqf\n_myEH = [\"ZoomIn\"] spawn {\n    while { true } do\n    {\n        waitUntil { inputAction (_this select 0) == 1 };\n        diag_log format [\"%1 @ %2\", _this select 0, diag_tickTime];\n    };\n};\n```\n\nAlthough it may be better to use onEachFrame (stacked) mission Event Handler, depending on the application.","code":["_myEH = [\"ZoomIn\"] spawn {\n\twhile { true } do\n\t{\n\t\twaitUntil { inputAction (_this select 0) == 1 };\n\t\tdiag_log format [\"%1 @ %2\", _this select 0, diag_tickTime];\n\t};\n};"]},{"text":"Use getVariable with default value to prevent unexcepted script errors:\n\n```sqf\nwaitUntil { bank getVariable [\"money\", 0] > 0 };\nwaitUntil { missionNamespace getVariable [\"isready\", false] };\n```","code":["waitUntil { bank getVariable [\"money\", 0] > 0 };\nwaitUntil { missionNamespace getVariable [\"isready\", false] };"]},{"text":"Always return Boolean:\n\n```sqf\nwaitUntil { sleep 1; if (not alive player) exitWith {}; _time = _time + 1 };                // bad\nwaitUntil { sleep 1; if (not alive player) exitWith { true }; _time = _time + 1; false };    // good\nwaitUntil { sleep 1; not alive player };                                                    // perfect\n```","code":["waitUntil { sleep 1; if (not alive player) exitWith {}; _time = _time + 1 };\t\t\t\t// bad\nwaitUntil { sleep 1; if (not alive player) exitWith { true }; _time = _time + 1; false };\t// good\nwaitUntil { sleep 1; not alive player };\t\t\t\t\t\t\t\t\t\t\t\t\t// perfect"]}],"problems":"For some unknown reason if you have waitUntil loop active and game is **saved/loaded**, some variables in the expression may appear undefined for a short time. As a workaround, assign expression to a variable and make sure it is defined before waitUntil checks it:\n\n```sqf\nwaitUntil { private _expression = someBooleanVar && (someNumberVar > 10); !isNil \"_expression\" && { _expression } };\n```","see_also":["sleep","uiSleep","canSuspend","spawn","execVM","while","Control Structures"],"notes":[{"user":"CrashDome","date":"2006-12-20T19:55:00Z","text":"waitUntil suspends both SQF functions and SQF scripts. In functions, the calling script is still in suspension due to waiting for a return from the call command. The game engine will continue, however. See Function for more detail."},{"user":"RoehrenRadio","date":"2010-04-02T17:10:00Z","text":"Prior to Arma 3 v1.94 if waitUntil uses an undefined call code, waitUntil won't release, even when this code is separated from other conditions through or. Be warned that this won't cause an error message."},{"user":"Commy2","date":"2014-12-13T23:25:00Z","text":"If you want to use waitUntil together with exitWith, remember that the loop only exits if the code block returns true.\n\nIt should look like this:\n\n```sqf\nwaitUntil {\n    // exit loop if the unit gets deleted\n    if (isNull _unit) exitWith { true }; // has to return true to continue\n\n    !alive _unit;\n};\n```"},{"user":"AgentRev","date":"2022-04-19T06:05:01Z","text":"It's a good idea to include a timeout with the condition if there's any possibility that it never becomes true:\n\n```sqf\ndisableUserInput true;\nplayer moveInDriver _vehicle; // this command is asynchronous and can fail sometimes\n_time = time;\nwaitUntil {vehicle player == _vehicle || time - _time > 3};\ndisableUserInput false;\n```"}]},{"name":"waterDamaged","title":"waterDamaged","type":"command","url":"https://community.bistudio.com/wiki/waterDamaged","revid":347219,"updated":"2023-09-05T16:49:02Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","locality":{"argument":"global"},"description":"Checks if the engine was water damaged. When a vehicle is Drowned, the engine gets water damaged and might need full repair either with setDamage or setHitPointDamage to be able to start.","syntaxes":[{"syntax":"waterDamaged object","params":[{"name":"object","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the engine was water damaged"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["waterDamaged tank1;"]}],"see_also":["setDamage","damage","alive"]},{"name":"waves","title":"waves","type":"command","url":"https://community.bistudio.com/wiki/waves","revid":319915,"updated":"2022-05-13T09:25:43Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Return waves value.","syntaxes":[{"syntax":"waves","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["waveIntensity = waves;"]}],"see_also":["setWaves"]},{"name":"waypointAttachedObject","title":"waypointAttachedObject","type":"command","url":"https://community.bistudio.com/wiki/waypointAttachedObject","revid":377741,"updated":"2026-01-03T00:57:50Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Gets the object attached to the waypoint.","syntaxes":[{"syntax":"waypointAttachedObject waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["waypointAttachedObject [groupOne,1];"]}],"see_also":["waypointAttachObject"]},{"name":"waypointAttachedVehicle","title":"waypointAttachedVehicle","type":"command","url":"https://community.bistudio.com/wiki/waypointAttachedVehicle","revid":377749,"updated":"2026-01-03T00:58:03Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Gets the vehicle attached to the waypoint.\n\nA vehicle can be attached to a waypoint by\n\n- creating the waypoint on top of the vehicle in the 2D Editor\n- using waypointAttachVehicle","syntaxes":[{"syntax":"waypointAttachedVehicle waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"Object","type_expr":"Object"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["waypointAttachedVehicle [groupOne, 1];"]},{"code":["waypointAttachedVehicle [group player, currentWaypoint group player];"]}],"see_also":["attachObject","attachTo","attachedObjects","attachedTo","lightAttachObject","triggerAttachVehicle","attachedObject"]},{"name":"waypointAttachObject","title":"waypointAttachObject","type":"command","url":"https://community.bistudio.com/wiki/waypointAttachObject","revid":377746,"updated":"2026-01-03T00:57:58Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Attaches a static object via its numeric ID to the given waypoint. Not to be confused with synchronizeWaypoint!\n\n> [!IMPORTANT]\n> - The main syntax doesn't work in Arma 3 anymore.\n> - The alternative syntax is (at least) available since Arma 2.","syntaxes":[{"syntax":"waypoint waypointAttachObject objectID","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"objectID","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"objectID"}},{"syntax":"waypoint waypointAttachObject object","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"object","type":"Object","description":"static object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"object"}}],"examples":[{"code":["[_grp, 2] waypointAttachObject 1234;"]},{"code":["private _wp = group player addWaypoint [[1907.5, 5746.5, 0.00144196], 0];\n_wp waypointAttachObject ((waypointPosition _wp) nearestObject 66220);"]}],"see_also":["waypointAttachedObject","synchronizeWaypoint"]},{"name":"waypointAttachVehicle","title":"waypointAttachVehicle","type":"command","url":"https://community.bistudio.com/wiki/waypointAttachVehicle","revid":319971,"updated":"2022-05-13T09:25:48Z","groups":["Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Attaches the Waypoint to the provided vehicle Object.\n\n> [!IMPORTANT]\n> Use this command to associate a transport with `\"GETIN\"` waypoint, other types of waypoints might or might not work.\n> See also setWaypointType to set the waypoint type to \"GETIN\".","syntaxes":[{"syntax":"waypoint waypointAttachVehicle vehicleName","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"vehicleName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"vehicleName"}}],"examples":[{"code":["[_grp, 2] waypointAttachVehicle vehicle player;"]},{"code":["((waypoints player) select 0) waypointAttachVehicle _soldier1;"]}],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","currentWaypoint","attachObject","attachTo","attachedObjects","attachedTo","lightAttachObject","triggerAttachVehicle","attachedObject"]},{"name":"waypointBehaviour","title":"waypointBehaviour","type":"command","url":"https://community.bistudio.com/wiki/waypointBehaviour","revid":377739,"updated":"2026-01-03T00:57:47Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Gets the waypoint behavior.","syntaxes":[{"syntax":"waypointBehaviour waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["waypointBehaviour [groupOne,1];"]}],"see_also":["Mission Editor: Waypoints","AIBehaviour","waypoints","setWaypointBehaviour"]},{"name":"waypointCombatMode","title":"waypointCombatMode","type":"command","url":"https://community.bistudio.com/wiki/waypointCombatMode","revid":377742,"updated":"2026-01-03T00:57:51Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Gets the waypoint's combat mode setting.","syntaxes":[{"syntax":"waypointCombatMode waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"String","type_expr":"String","description":"one of \"BLUE\", \"GREEN\", \"WHITE\", \"YELLOW\" and \"RED\" or \"ERROR\""},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["waypointCombatMode [groupOne, 1];"]}],"see_also":["Combat Modes","waypoints","setWaypointCombatMode"]},{"name":"waypointCompletionRadius","title":"waypointCompletionRadius","type":"command","url":"https://community.bistudio.com/wiki/waypointCompletionRadius","revid":377743,"updated":"2026-01-03T00:57:53Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Gets the radius around the waypoint where the waypoint is completed.","syntaxes":[{"syntax":"waypointCompletionRadius waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["_radius = waypointCompletionRadius [groupOne, 1];"]}],"see_also":["waypoints","setWaypointCompletionRadius"]},{"name":"waypointDescription","title":"waypointDescription","type":"command","url":"https://community.bistudio.com/wiki/waypointDescription","revid":377753,"updated":"2026-01-03T00:58:09Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Gets the waypoint description.","syntaxes":[{"syntax":"waypointDescription waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["waypointDescription [groupOne,1];"]}],"see_also":["waypoints","setWaypointDescription"]},{"name":"waypointForceBehaviour","title":"waypointForceBehaviour","type":"command","url":"https://community.bistudio.com/wiki/waypointForceBehaviour","revid":377583,"updated":"2026-01-02T06:56:41Z","groups":["Waypoints"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns true if the waypoint behavior is forced.","syntaxes":[{"syntax":"waypointForceBehaviour waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"is forced"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["_isForced = waypointForceBehaviour [groupOne, 1];"]}],"see_also":["setWaypointForceBehaviour","setWaypointBehaviour","waypointBehaviour","Mission Editor: Waypoints"]},{"name":"waypointFormation","title":"waypointFormation","type":"command","url":"https://community.bistudio.com/wiki/waypointFormation","revid":377745,"updated":"2026-01-03T00:57:56Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Gets the waypoint formation.\n\nPossible values are:\n\n- \"NO CHANGE\"\n- \"COLUMN\"\n- \"STAG COLUMN\"\n- \"WEDGE\"\n- \"ECH LEFT\"\n- \"ECH RIGHT\"\n- \"VEE\"\n- \"LINE\"\n- \"FILE\"\n- \"DIAMOND\"","syntaxes":[{"syntax":"waypointFormation waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["waypointFormation [groupOne,1];"]}],"see_also":["Mission Editor: Waypoints","waypoints","setWaypointFormation"]},{"name":"waypointHousePosition","title":"waypointHousePosition","type":"command","url":"https://community.bistudio.com/wiki/waypointHousePosition","revid":377756,"updated":"2026-01-03T00:58:13Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns buildingPos index assigned to the waypoint.","syntaxes":[{"syntax":"waypointHousePosition waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"Number","type_expr":"Number","description":"buildingPos index"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["waypointHousePosition [groupOne,1];"]}],"see_also":["waypoints","waypointPosition","setWaypointHousePosition","buildingPos"]},{"name":"waypointLoiterAltitude","title":"waypointLoiterAltitude","type":"command","url":"https://community.bistudio.com/wiki/waypointLoiterAltitude","revid":377578,"updated":"2026-01-02T06:56:34Z","groups":["Waypoints"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Gets the waypoint loiter altitude.","syntaxes":[{"syntax":"waypointLoiterAltitude waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["private _loiterAlt = waypointLoiterAltitude [groupOne, 1];"]}],"see_also":["setWaypointLoiterAltitude"]},{"name":"waypointLoiterRadius","title":"waypointLoiterRadius","type":"command","url":"https://community.bistudio.com/wiki/waypointLoiterRadius","revid":377587,"updated":"2026-01-02T06:56:47Z","groups":["Waypoints"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Gets the waypoint's loiter radius.","syntaxes":[{"syntax":"waypointLoiterRadius waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["_radius = waypointLoiterRadius [groupOne, 1];"]}],"see_also":["waypoints","deleteWaypoint","setWaypointCompletionRadius","setWaypointPosition","setWaypointTimeout","setWaypointLoiterRadius","addWaypoint","setWaypointLoiterType","currentWaypoint"]},{"name":"waypointLoiterType","title":"waypointLoiterType","type":"command","url":"https://community.bistudio.com/wiki/waypointLoiterType","revid":323061,"updated":"2022-06-28T21:43:11Z","groups":["Waypoints"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Gets the waypoint loiter type. Waypoint uses format Waypoint.","syntaxes":[{"syntax":"waypointLoiterType waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["_type = waypointLoiterType [groupOne, 1];"]}],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed"]},{"name":"waypointName","title":"waypointName","type":"command","url":"https://community.bistudio.com/wiki/waypointName","revid":377579,"updated":"2026-01-02T06:56:35Z","groups":["Waypoints"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Gets the waypoint name.","syntaxes":[{"syntax":"waypointName waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["_wpName = waypointName [_grp, 2];"]}],"see_also":["setWaypointName","waypointPosition","waypointSpeed"]},{"name":"waypointPosition","title":"waypointPosition","type":"command","url":"https://community.bistudio.com/wiki/waypointPosition","revid":377419,"updated":"2026-01-02T06:45:28Z","groups":["Waypoints"],"status":"ok","games":{"ofp":null,"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp","arma3_since":"0.50","description":"Get provided waypoint's position.","syntaxes":[{"syntax":"waypointPosition [groupOrUnit, index]","params":[{"name":"groupOrUnit","type":"Group or Object","type_expr":"Group | Object"},{"name":"index","type":"Number","type_expr":"Number"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL"},"form":"unary","right":{"text":"[groupOrUnit, index]"}}],"examples":[{"code":["_wPos = waypointPosition [_groupOne, 1];"]}],"aliases":["getWPPos"],"see_also":["waypoints","setWaypointPosition","waypointHousePosition","setWPPos"]},{"name":"waypoints","title":"waypoints","type":"command","url":"https://community.bistudio.com/wiki/waypoints","revid":347556,"updated":"2023-09-28T09:43:23Z","groups":["Waypoints"],"status":"ok","games":{"arma1":"1.05","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.05","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns an array of waypoints for the specified unit/group.","syntaxes":[{"syntax":"waypoints groupName","params":[{"name":"groupName","type":"Group or Object","type_expr":"Group | Object"}],"returns":{"type":"Array of Waypoints","type_expr":"Array<Waypoint>"},"form":"unary","right":{"text":"groupName"}}],"examples":[{"code":["waypoints player;"]},{"code":["_wPosArray = waypoints group10; // returns e.g [[EAST 1-1-A,0],[EAST 1-1-A,1],[EAST 1-1-A,2]]"]}],"see_also":["deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypointSpeed","setWPPos","waypointName"]},{"name":"waypointScript","title":"waypointScript","type":"command","url":"https://community.bistudio.com/wiki/waypointScript","revid":377751,"updated":"2026-01-03T00:58:05Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Gets the waypoint script.","syntaxes":[{"syntax":"waypointScript waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["waypointScript [groupOne,1];"]}],"see_also":["waypoints","setWaypointScript"]},{"name":"waypointsEnabledUAV","title":"waypointsEnabledUAV","type":"command","url":"https://community.bistudio.com/wiki/waypointsEnabledUAV","revid":369353,"updated":"2024-09-03T18:43:04Z","groups":["Waypoints","Remote Control"],"status":"ok","games":{"arma3":"1.40"},"since":"arma3 1.40","arma3_since":"1.40","description":"Checks if the UAV has waypoints enabled.","syntaxes":[{"syntax":"waypointsEnabledUAV uav","params":[{"name":"uav","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"uav"}}],"examples":[{"code":["_uav enableUAVWaypoints false;\nhint str waypointsEnabledUAV _uav; // returns false"]}],"see_also":["enableUAVWaypoints","enableUAVConnectability","disableUAVConnectability","isUAVConnected","isUAVConnectable","allUnitsUAV","getConnectedUAV","connectTerminalToUAV"]},{"name":"waypointShow","title":"waypointShow","type":"command","url":"https://community.bistudio.com/wiki/waypointShow","revid":378529,"updated":"2026-05-04T02:16:33Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"A getter for showWaypoint command.","syntaxes":[{"syntax":"waypointShow waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"String","type_expr":"String","description":"can return:\n- \"NEVER\" - Never show - \"EASY\" - Show only in cadet mode - \"ALWAYS\" - Always show - \"ERROR\" - When set to any different string","text":"String - can return:\n\n- \"NEVER\" - Never show\n- \"EASY\" - Show only in cadet mode\n- \"ALWAYS\" - Always show\n- \"ERROR\" - When set to any different string"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["_wpShow = waypointShow [groupOne, 1];"]}],"see_also":["showWaypoint","waypoints","waypointVisible","setWaypointVisible"]},{"name":"waypointSpeed","title":"waypointSpeed","type":"command","url":"https://community.bistudio.com/wiki/waypointSpeed","revid":377740,"updated":"2026-01-03T00:57:48Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Gets the waypoint speed.\n\nPossible values are:\n\n- \"UNCHANGED\"\n- \"LIMITED\"\n- \"NORMAL\"\n- \"FULL\"","syntaxes":[{"syntax":"waypointSpeed waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"String","type_expr":"String","description":"see description"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["_speed = waypointSpeed [groupOne,1];"]}],"see_also":["deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","waypoints","setWPPos","waypointName"]},{"name":"waypointStatements","title":"waypointStatements","type":"command","url":"https://community.bistudio.com/wiki/waypointStatements","revid":377581,"updated":"2026-01-02T06:56:38Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Gets the waypoint statements.","syntaxes":[{"syntax":"waypointStatements waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"Array","type_expr":"Array","description":"with [condition, statement]\n- condition: String - statement: String","text":"Array with [condition, statement]\n\n- condition: String\n- statement: String"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["waypointStatements [groupOne,1];"]}],"see_also":["waypoints","setWaypointStatements"]},{"name":"waypointTimeout","title":"waypointTimeout","type":"command","url":"https://community.bistudio.com/wiki/waypointTimeout","revid":377668,"updated":"2026-01-02T09:02:25Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Gets the waypoint timeout values.","syntaxes":[{"syntax":"waypointTimeout waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"Array","type_expr":"Array","description":"with [min, mid, max]\n- min: Number - mid: Number - max: Number","text":"Array with [min, mid, max]\n\n- min: Number\n- mid: Number\n- max: Number"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["waypointTimeout [groupOne,1];"]}],"see_also":["waypoints","setWaypointTimeout"]},{"name":"waypointTimeoutCurrent","title":"waypointTimeoutCurrent","type":"command","url":"https://community.bistudio.com/wiki/waypointTimeoutCurrent","revid":319799,"updated":"2022-05-13T09:25:29Z","groups":["Waypoints"],"status":"ok","games":{"arma3":"1.08"},"since":"arma3 1.08","arma3_since":"1.08","description":"Gets the current timeout for currentWaypoint of a group or -1 if countdown is not in progress.","syntaxes":[{"syntax":"waypointTimeoutCurrent group","params":[{"name":"group","type":"Group","type_expr":"Group"}],"returns":{"type":"Number","type_expr":"Number"},"form":"unary","right":{"text":"group"}}],"examples":[{"code":["_timeout = waypointTimeoutCurrent group player;"]}],"see_also":["waypoints","deleteWaypoint","copyWaypoints","setCurrentWaypoint","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointType","setWaypointVisible","waypointAttachVehicle","waypointAttachedVehicle","setWaypointLoiterRadius","waypointLoiterRadius","addWaypoint","setWaypointLoiterType","setWaypointTimeout"]},{"name":"waypointType","title":"waypointType","type":"command","url":"https://community.bistudio.com/wiki/waypointType","revid":377748,"updated":"2026-01-03T00:58:01Z","groups":["Waypoints"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Gets the waypoint type.\n\n> [!NOTE]\n> See Waypoints - Waypoint Types for more information.","syntaxes":[{"syntax":"waypointType waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"String","type_expr":"String","description":"returns `\"\"` if the waypoint doesn't exist."},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["private _type = waypointType [groupOne, 1];"]}],"see_also":["Mission Editor: Waypoints","Waypoints","waypoints","setWaypointType"]},{"name":"waypointVisible","title":"waypointVisible","type":"command","url":"https://community.bistudio.com/wiki/waypointVisible","revid":377744,"updated":"2026-01-03T00:57:55Z","groups":["Waypoints"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","description":"A getter for setWaypointVisible command.\n\n> [!WARNING]\n> Returns **0** (Number) instead of Booleanfor an invalid waypoint.","syntaxes":[{"syntax":"waypointVisible waypoint","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"waypoint"}}],"examples":[{"code":["_visible = waypointVisible [groupOne, 1];"]},{"code":["_visible = waypointVisible [group player, currentWaypoint group player];"]}],"see_also":["waypoints","setWaypointVisible"]},{"name":"weaponAccessories","title":"weaponAccessories","type":"command","url":"https://community.bistudio.com/wiki/weaponAccessories","revid":379400,"updated":"2026-10-31T00:01:28Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get array with all items linked to a given weapon.\n\n> [!IMPORTANT]\n> This command does not return loaded magazines, see weaponsItems","syntaxes":[{"syntax":"unit weaponAccessories weapon","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"weapon","type":"String","description":"primary, secondary or handgun","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"[silencer, laserpointer/flashlight, optics, bipod]"},"form":"binary","left":{"text":"unit"},"right":{"text":"weapon"}}],"examples":[{"code":["player weaponAccessories primaryWeapon player; //[\"\",\"acc_pointer_IR\",\"optic_Aco\",\"\"]"]}],"see_also":["weaponAccessoriesCargo","handgunItems","primaryWeaponItems","secondaryWeaponItems","weaponsItems","weaponsItemsCargo"],"notes":[{"user":"Killzone_Kid","date":"2014-10-26T08:48:00Z","text":"To check if currently selected muzzle has a silencer:\n\n```sqf\nhasSilencer = player weaponAccessories currentMuzzle player param [0, \"\"] != \"\";\n```"},{"user":"Jezuro","date":"2015-03-16T12:03:00Z","text":"Since revision 129742, this command also returns an attached bipod."}]},{"name":"weaponAccessoriesCargo","title":"weaponAccessoriesCargo","type":"command","url":"https://community.bistudio.com/wiki/weaponAccessoriesCargo","revid":352198,"updated":"2024-02-01T23:26:01Z","groups":["Vehicle Inventory","Containers","Unit Inventory"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Returns array with all items assigned to the given weapon in given cargo container.\n\n> [!WARNING]\n> This is unofficial documentation. All Information here is as it exists in the Engine. It might not reflect the reality.","syntaxes":[{"syntax":"container weaponAccessoriesCargo [weaponId, creatorId]","params":[{"name":"container","type":"Object","description":"cargo container","type_expr":"Object"},{"name":"weaponId","type":"Number","type_expr":"Number"},{"name":"creatorId","type":"Number","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"[silencer, laserpointer/flashlight, optics, bipod]"},"form":"binary","left":{"text":"container"},"right":{"text":"[weaponId, creatorId]"}}],"examples":[{"text":"-"}],"see_also":["weaponAccessories","primaryWeaponItems","handgunItems","secondaryWeaponItems","weaponsItems","weaponsItemsCargo","removeWeaponAttachmentCargo","removeWeaponCargo"]},{"name":"weaponCargo","title":"weaponCargo","type":"command","url":"https://community.bistudio.com/wiki/weaponCargo","revid":310284,"updated":"2022-05-05T13:11:26Z","groups":["Vehicle Inventory","Unit Inventory","Containers"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get array with weapons from ammo box (or any general weapon holder container).","syntaxes":[{"syntax":"weaponCargo box","params":[{"name":"box","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of String","type_expr":"Array<String>","description":"list of present classes"},"form":"unary","right":{"text":"box"}}],"examples":[{"code":["hint str weaponCargo backpackContainer player;"]}],"see_also":["getWeaponCargo","addWeaponCargo","addWeaponCargoGlobal","clearWeaponCargo","clearWeaponCargoGlobal","magazineCargo","itemCargo"]},{"name":"weaponDirection","title":"weaponDirection","type":"command","url":"https://community.bistudio.com/wiki/weaponDirection","revid":379484,"updated":"2026-10-31T00:12:40Z","groups":["Weapons","Unit Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns the direction that the vehicle weapon is aiming in. For addons the weapon name must be an entry in CfgWeapons.\n\n> [!NOTE]\n> Turret and gun angle in degrees can also be obtained using animationSourcePhase or animationPhase commands.","syntaxes":[{"syntax":"vehicleName weaponDirection weaponName","params":[{"name":"vehicleName","type":"Object","type_expr":"Object"},{"name":"weaponName","type":"String","type_expr":"String"}],"returns":{"type":"Vector3D","type_expr":"Vector3D"},"form":"binary","left":{"text":"vehicleName"},"right":{"text":"weaponName"}}],"examples":[{"code":["_weaponVectorDir = player weaponDirection currentWeapon player;"]},{"text":"Draw AI eye direction (green) and weapon direction (red) in 3D:\n\n```sqf\nbob = createGroup east createUnit [\"O_Soldier_F\", [0,0,0], [], 0, \"NONE\"];\nbob setVehiclePosition [player modelToWorld [0,100,0], [], 0, \"NONE\"];\nonEachFrame\n{\n    _beg = ASLToAGL eyePos bob;\n    _endE = _beg vectorAdd (eyeDirection bob vectorMultiply 100);\n    drawLine3D [_beg, _endE, [0,1,0,1]];\n    _endW = _beg vectorAdd (bob weaponDirection currentWeapon bob vectorMultiply 100);\n    drawLine3D [_beg, _endW, [1,0,0,1]];\n};\n```","code":["bob = createGroup east createUnit [\"O_Soldier_F\", [0,0,0], [], 0, \"NONE\"];\nbob setVehiclePosition [player modelToWorld [0,100,0], [], 0, \"NONE\"];\nonEachFrame\n{\n\t_beg = ASLToAGL eyePos bob;\n\t_endE = _beg vectorAdd (eyeDirection bob vectorMultiply 100);\n\tdrawLine3D [_beg, _endE, [0,1,0,1]];\n\t_endW = _beg vectorAdd (bob weaponDirection currentWeapon bob vectorMultiply 100);\n\tdrawLine3D [_beg, _endW, [1,0,0,1]];\n};"]}],"see_also":["positionCameraToWorld","getCameraViewDirection","eyeDirection","vectorDir","vectorDirVisual"],"notes":[{"user":"HAC_mainframe","date":"2007-08-18T12:18:00Z","text":"Works great in multiplayer.\nThe numbers are representing offset as follows : [X axis,Y axis,Z axis]\n\nThe return array can be processed-converted into degrees as follows:\n\n```sqf\n_array = _this weaponDirection \"weapon class\";\n_dir_degrees = (_array select 0) atan2 (_array select 1);\n```"},{"user":"Messiah2","date":"2007-11-11T01:41:00Z","text":"WeaponClass can only be the primary turret of the vehicle. For example it is not possible to get direction of commander's M2 on M1Abrams."},{"user":"UNN","date":"2007-11-13T15:54:00Z","text":"For an alternative to the weaponDirection command, see the following post on the official forums. On how to obtain the direction of multiple turrets on vehicles.\n\n*Turret Animations* (dead link) - [new forum](http://forums.bistudio.com/showthread.php?t=63918)"},{"user":"Mechariuswh","date":"2014-12-09T18:25:00Z","text":"The suggestion above using atan2 and weaponDirection get the direction the barrel of a weapon is pointing, but this is not the same as the direction a shell will be fired (verify this by getting in an M4 Scorcher, parking it on a slope, elevating the barrel \"across\" the slope and watching the shell come out in third person)."}]},{"name":"weaponDisassemblyEnabled","title":"weaponDisassemblyEnabled","type":"command","url":"https://community.bistudio.com/wiki/weaponDisassemblyEnabled","revid":347215,"updated":"2023-09-05T16:49:02Z","groups":["Weapons"],"status":"ok","games":{"arma3":"2.14"},"since":"arma3 2.14","arma3_since":"2.14","locality":{"argument":"global"},"description":"Returns if weapon disassembly is enabled. As disassembly can be enabled/disabled on both player and weapon, it might be necessary to check both.\n\n> [!IMPORTANT]\n> Beware that when the weapon disassembly is disabled on the player, it is tracking the unit itself.\n> If the player leaves the server and another player joins into the same playable unit, they will not have the option to disassemble either.","syntaxes":[{"syntax":"weaponDisassemblyEnabled entity","params":[{"name":"entity","type":"Object","description":"player or weapon","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if enabled"},"form":"unary","right":{"text":"entity"}}],"examples":[{"code":["private _enabled = weaponDisassemblyEnabled player && weaponDisassemblyEnabled _weapon;"]}],"see_also":["enableWeaponDisassembly","weapons","action","inGameUISetEventHandler"]},{"name":"weaponInertia","title":"weaponInertia","type":"command","url":"https://community.bistudio.com/wiki/weaponInertia","revid":378476,"updated":"2026-04-24T11:32:50Z","groups":["Weapons"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","description":"Returns current rate of how much the weapon view is distorted because of quick aiming.","syntaxes":[{"syntax":"weaponInertia unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [x, y]\n- x: Number - Amount of x-axis sway - y: Number - Amount of y-axis sway","text":"Array with [x, y]\n\n- x: Number - Amount of x-axis sway\n- y: Number - Amount of y-axis sway"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_inertia = weaponInertia player; //[-0.0126307,0.038023]"]}],"see_also":["getWeaponSway"]},{"name":"weaponLowered","title":"weaponLowered","type":"command","url":"https://community.bistudio.com/wiki/weaponLowered","revid":379401,"updated":"2026-10-31T00:01:36Z","groups":["Object Manipulation","Weapons"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns true if given soldier's weapon is lowered.\n\n> [!IMPORTANT]\n> This command will **always** return false if player is sprinting, even without a weapon. Alternatively, the weapon raised state could be obtained via animationState command `...slow...` vs `...sras...`","syntaxes":[{"syntax":"weaponLowered unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["isWeaponLowered = weaponLowered player;"]}],"see_also":["stance","unitPos","animationState"],"notes":[{"user":"Pierre MGI","date":"2016-11-11T01:13:00Z","text":"This command seems to work for player only, not for AI."}]},{"name":"weaponReloadingTime","title":"weaponReloadingTime","type":"command","url":"https://community.bistudio.com/wiki/weaponReloadingTime","revid":349603,"updated":"2023-11-14T14:16:56Z","groups":["Weapons"],"status":"ok","games":{"arma3":"2.06"},"since":"arma3 2.06","arma3_since":"2.06","description":"Returns current ammo round reloading phase. For a magazine reloading phase see weaponState command.","syntaxes":[{"syntax":"vehicle weaponReloadingTime [gunner, muzzleName]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"gunner","type":"Object","description":"gunner of desired turret","type_expr":"Object"},{"name":"muzzleName","type":"String","description":"muzzle on desired turret","type_expr":"String"}],"returns":{"type":"Number","type_expr":"Number","description":"ammo round reload phase in range 0..1; -1 when N/A"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[gunner, muzzleName]"}}],"see_also":["setWeaponReloadingTime","weaponState","weaponsInfo"]},{"name":"weapons","title":"weapons","type":"command","url":"https://community.bistudio.com/wiki/weapons","revid":379485,"updated":"2026-10-31T00:12:47Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","description":"Returns array of names of all unit's weapons.","syntaxes":[{"syntax":"weapons unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"weapon class names"},"form":"unary","right":{"text":"unit"}}],"examples":[{"code":["_wArray = weapons player;"]}],"see_also":["magazines","weaponsTurret","assignedVehicleRole","weaponState"],"notes":[{"user":"Bdfy","date":"2007-01-20T12:07:00Z","text":"Armed Assault v1.02 This command returns only weapons defined for the primary turret of the vehicle.\nfor ex. only [\"D81\", \"PKT\"] for t72, not [\"D81\", \"PKT\",\"DSHKM\"]"},{"user":"Donnervogel","date":"2007-03-03T05:01:00Z","text":"*weapons* never returns the weapon \"Throw\" which all soldier units have have to throw hand grenades. You'd have to use hasWeapon to verify it. Also hand grenades are not listed since they are magazines. Use magazines for that."},{"user":".kju","date":"2011-03-11T00:00:00Z","text":"Use weaponsTurret to determine the weapons of a non gunner/turret position."},{"user":"Dr_Eyeball","date":"2011-11-25T00:00:00Z","text":"This command does not include non-turret weapons, such as smoke, flare or chaff launchers which are usually declared in the root of the vehicle's class, rather than in the Turrets hierarchy. (Unsure whether it excludes it because it is not in the turret or because these are not considered true weapons via some property.)"}]},{"name":"weaponsInfo","title":"weaponsInfo","type":"command","url":"https://community.bistudio.com/wiki/weaponsInfo","revid":377065,"updated":"2026-01-01T09:09:48Z","groups":["Weapons"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns entity's weapons information including weapon index and firemode.","syntaxes":[{"syntax":"unit weaponsInfo [weaponOrMuzzle, onlyLoaded]","params":[{"name":"unit","type":"Object","description":"person","type_expr":"Object"},{"name":"weaponOrMuzzle","type":"String","description":"name of the weapon or muzzle (returns whichever matches first) or \"\" to return all weapons","type_expr":"String"},{"name":"onlyLoaded","type":"Boolean","optional":true,"default":"false","description":"true to return loaded weapons only","type_expr":"Boolean","text":"onlyLoaded: Boolean - (Optional, default false) true to return loaded weapons only"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [weaponIndex, isSelected, weaponName, muzzleName, firemode, magazineName, ammoCount, isPrimary] (or an empty []):\n- weaponIndex: Number - internal weapon index (changes frequently) used with \"SwitchWeapon\" and \"UseWeapon\" actions - isSelected: Boolean - true if this weapon is currently selected - weaponName: String - weapon name - muzzleName: String - muzzle name - firemode: String - firemode that is set for this 'weaponIndex' - magazineName: String - name of the loaded magazine or \"\" - ammoCount: Number - magazine ammo count or -1 - isPrimary: Boolean - true if this muzzle is considered primary by the engine (Since Arma 3 2.14)","text":"Array of Arrays with [weaponIndex, isSelected, weaponName, muzzleName, firemode, magazineName, ammoCount, isPrimary] (or an empty []):\n\n- weaponIndex: Number - internal weapon index (changes frequently) used with \"SwitchWeapon\" and \"UseWeapon\" actions\n- isSelected: Boolean - true if this weapon is currently selected\n- weaponName: String - weapon name\n- muzzleName: String - muzzle name\n- firemode: String - firemode that is set for this 'weaponIndex'\n- magazineName: String - name of the loaded magazine or \"\"\n- ammoCount: Number - magazine ammo count or -1\n- isPrimary: Boolean - true if this muzzle is considered primary by the engine (Since Arma 3 2.14)"},"form":"binary","left":{"text":"unit"},"right":{"text":"[weaponOrMuzzle, onlyLoaded]"}}],"examples":[{"text":"Find weapon with FullAuto firemode and switch to it:\n\n```sqf\nprivate _weapons = player weaponsInfo [currentMuzzle player, true];\nprivate _found = _weapons findIf { _x select 4 == \"FullAuto\" };\nif (_found > -1) then { action [\"SwitchWeapon\", player, player, _weapons select _found select 0] };\n```","code":["private _weapons = player weaponsInfo [currentMuzzle player, true];\nprivate _found = _weapons findIf { _x select 4 == \"FullAuto\" };\nif (_found > -1) then { action [\"SwitchWeapon\", player, player, _weapons select _found select 0] };"]}],"see_also":["weaponState","weaponReloadingTime","action"]},{"name":"weaponsItems","title":"weaponsItems","type":"command","url":"https://community.bistudio.com/wiki/weaponsItems","revid":369242,"updated":"2024-09-03T10:35:40Z","groups":["Unit Inventory","Vehicle Inventory"],"status":"ok","games":{"arma3":"0.76"},"since":"arma3 0.76","arma3_since":"0.76","description":"Returns an array with subarrays contains class names and also names of connected items of all the vehicle's weapons.\n\n> [!NOTE]\n> This command can return weapon magazine(s) if any are present. Or an empty array if weapon is stored without a magazine in it.\n\n- Arma 3 v1.22 it is possible to query weapon holders and ammo crates with this command.\n  If the argument is a vehicle, the command will return vehicle's weapons.\n  If the argument is a container, the command will act identical to weaponsItemsCargo.\n- Arma 3 v1.96 the returned array always contains secondary muzzle magazine info and consistent with getUnitLoadout format for weapon items.\n- Arma 3 v2.02 the returned array can contains binocular weapon items.","syntaxes":[{"syntax":"weaponsItems vehicle","params":[{"name":"vehicle","type":"Object","description":"unit or vehicle","type_expr":"Object"}],"returns":{"type_expr":"Array<Array>","description":"- weapon: String - muzzle: String - flashlight: String - optics: String - [primaryMagazine, primaryAmmo]: Array - could be empty - [secondaryMagazine, secondaryAmmo]: Array - could be empty - bipod: String > [!IMPORTANT] > The weapons are listed in the order they were taken by the unit, with the most recent at the bottom of the array, e.g do not assume the first item is always the primary weapon.","text":"Array of Arrays of weapon items, format [weapon, muzzle, flashlight, optics, [magazine, ammo], [magazine, ammo], bipod]:\n\n- weapon: String\n- muzzle: String\n- flashlight: String\n- optics: String\n- [primaryMagazine, primaryAmmo]: Array - could be empty\n- [secondaryMagazine, secondaryAmmo]: Array - could be empty\n- bipod: String\n\n> [!IMPORTANT]\n> The weapons are listed in the order they were taken by the unit, with the most recent at the bottom of the array, e.g do **not** assume the first item is always the primary weapon."},"form":"unary","right":{"text":"vehicle"}},{"syntax":"weaponsItems [vehicle, extended]","since":"arma3 2.14","params":[{"name":"vehicle","type":"Object","description":"unit or vehicle","type_expr":"Object"},{"name":"extended","type":"Boolean","description":"true to include muzzle information","type_expr":"Boolean"}],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"(see above) in format [weapon, muzzle, flashlight, optics, [magazine, ammo, muzzle, maxammo], [magazine, ammo, muzzle, maxammo], bipod]","text":"Array of Arrays (see above) in format [weapon, muzzle, flashlight, optics, [magazine, ammo, muzzle, maxammo], [magazine, ammo, muzzle, maxammo], bipod]"},"form":"unary","right":{"text":"[vehicle, extended]"}}],"examples":[{"text":"```sqf\nhint str weaponsItems player;\n// returns e.g\n/*\n[\n    [\"arifle_MX_ACO_pointer_F\", \"muzzle_snds_H\", \"acc_pointer_IR\", \"optic_Aco\", [\"30Rnd_65x39_caseless_mag\", 30], [], \"bipod_01_F_blk\"],\n    [\"launch_NLAW_F\", \"\", \"\", \"\", [\"NLAW_F\", 1], [], \"\"],\n    [\"hgun_P07_F\", \"muzzle_snds_L\", \"\", \"\", [\"16Rnd_9x21_Mag\", 11], [], \"\"]\n]\n// a loaded underbarrel grenade launcher can look like this:\n[\n    [\"arifle_MX_GL_F\", \"muzzle_snds_H\", \"acc_pointer_IR\", \"optic_Aco\", [\"30Rnd_65x39_caseless_mag\", 30], [\"1Rnd_HE_Grenade_shell\", 1], \"\"]\n]\n*/\n```","code":["hint str weaponsItems player;\n// returns e.g\n/*\n[\n\t[\"arifle_MX_ACO_pointer_F\", \"muzzle_snds_H\", \"acc_pointer_IR\", \"optic_Aco\", [\"30Rnd_65x39_caseless_mag\", 30], [], \"bipod_01_F_blk\"],\n\t[\"launch_NLAW_F\", \"\", \"\", \"\", [\"NLAW_F\", 1], [], \"\"],\n\t[\"hgun_P07_F\", \"muzzle_snds_L\", \"\", \"\", [\"16Rnd_9x21_Mag\", 11], [], \"\"]\n]\n// a loaded underbarrel grenade launcher can look like this:\n[\n\t[\"arifle_MX_GL_F\", \"muzzle_snds_H\", \"acc_pointer_IR\", \"optic_Aco\", [\"30Rnd_65x39_caseless_mag\", 30], [\"1Rnd_HE_Grenade_shell\", 1], \"\"]\n]\n*/"]},{"text":"```sqf\nhint str weaponsItems vehicle player;\n// returns e.g\n/*\n[\n    [\"gatling_30mm\", \"\", \"\", \"\", [\"250Rnd_30mm_HE_shells\", 250], [], \"\"],\n    [\"missiles_SCALPEL\", \"\", \"\", \"\", [\"8Rnd_LG_scalpel\", 8], [], \"\"],\n    [\"rockets_Skyfire\", \"\", \"\", \"\", [\"38Rnd_80mm_rockets\", 38], [], \"\"]\n]\n*/\n```","code":["hint str weaponsItems vehicle player;\n// returns e.g\n/*\n[\n\t[\"gatling_30mm\", \"\", \"\", \"\", [\"250Rnd_30mm_HE_shells\", 250], [], \"\"],\n\t[\"missiles_SCALPEL\", \"\", \"\", \"\", [\"8Rnd_LG_scalpel\", 8], [], \"\"],\n\t[\"rockets_Skyfire\", \"\", \"\", \"\", [\"38Rnd_80mm_rockets\", 38], [], \"\"]\n]\n*/"]}],"see_also":["weaponsItemsCargo","primaryWeaponItems","secondaryWeaponItems","handgunItems","addPrimaryWeaponItem","addSecondaryWeaponItem","addHandgunItem","primaryWeapon","secondaryWeapon","handgunWeapon","binocular","weaponAccessories","addWeaponWithAttachmentsCargoGlobal","BIS_fnc_weaponComponents","weaponState"]},{"name":"weaponsItemsCargo","title":"weaponsItemsCargo","type":"command","url":"https://community.bistudio.com/wiki/weaponsItemsCargo","revid":378085,"updated":"2026-02-12T12:40:27Z","groups":["Containers","Vehicle Inventory"],"status":"ok","games":{"arma3":"1.22"},"since":"arma3 1.22","arma3_since":"1.22","description":"Returns an array with subarrays contains class names and also names of connected items of all the vehicle's cargo weapons in weaponsItems format. If weapon has no magazine, an empty array [] is returned instead of magazine info. If the argument is a vehicle with weapons, vehicles cargo is searched, unlike with weaponsItems command, which will return vehicle's weapons instead.\n\n> [!NOTE]\n> Since Arma 3 v1.96 the returned array always contains secondary muzzle magazine info and is consistent with getUnitLoadout format for weapon items.","syntaxes":[{"syntax":"weaponsItemsCargo vehicle","params":[{"name":"vehicle","type":"Object ammobox or vehicle","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"see weaponsItems"},"form":"unary","right":{"text":"vehicle"}},{"syntax":"weaponsItemsCargo [vehicle, extended]","since":"arma3 2.14","params":[{"name":"vehicle","type":"Object","description":"ammobox or vehicle","type_expr":"Object"},{"name":"extended","type":"Boolean","description":"true to include muzzle information","type_expr":"Boolean"}],"returns":{"type":"Array","type_expr":"Array","description":"see weaponsItems"},"form":"unary","right":{"text":"[vehicle, extended]"}}],"examples":[{"code":["weaponsItemsCargo vehicle player;"]},{"code":["weaponsItemsCargo _weaponholder;"]}],"see_also":["weaponsItems","primaryWeaponItems","secondaryWeaponItems","handgunItems","addPrimaryWeaponItem","addSecondaryWeaponItem","addHandgunItem","primaryWeapon","secondaryWeapon","handgunWeapon","weaponAccessories","weaponAccessoriesCargo","addWeaponWithAttachmentsCargoGlobal"]},{"name":"weaponState","title":"weaponState","type":"command","url":"https://community.bistudio.com/wiki/weaponState","revid":378932,"updated":"2026-08-19T22:08:00Z","groups":["Weapons"],"status":"ok","games":{"arma2oa":"1.60","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.60","arma3_since":"0.50","description":"Returns the given or currently selected weapon state for unit or vehicle.\nWith Syntax 2, if no optional arguments are present, currently selected weapon is queried.\n\n> [!NOTE]\n> **Arma 3:** Since Arma 3 v1.70 this command has been improved and extended:\n>\n> - A vehicle's weapon query doesn't need a weapon operator provided the weapon or muzzle is specified in optional param.\n>   (keep in mind that by default a vehicle has no weapons selected)\n> - Driver turret can now be accessed as well with turret path [-1].\n> - Muzzle name is supported as well as weapon name. The command searches for weapon first, then if not found, muzzle is searched for.","syntaxes":[{"syntax":"weaponState unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [weapon, muzzle, firemode, magazine, ammoCount, roundReloadPhase, magazineReloadPhase]\n- weapon: String - muzzle: String - firemode: String - magazine: String - ammoCount: Number - Arma 3 v2.06 roundReloadPhase: Number in range -1 or 0..1 - current ammo round reload phase (see weaponReloadingTime). -1 when weapon has magazine removed - Arma 3 v2.06 magazineReloadPhase: Number in range 1..0 - current magazine reload phase, 0 - reload complete. > 0 - reload in progress","text":"Array with [weapon, muzzle, firemode, magazine, ammoCount, roundReloadPhase, magazineReloadPhase]\n\n- weapon: String\n- muzzle: String\n- firemode: String\n- magazine: String\n- ammoCount: Number\n- Arma 3 v2.06 roundReloadPhase: Number in range -1 or 0..1 - current ammo round reload phase (see weaponReloadingTime). -1 when weapon has magazine removed\n- Arma 3 v2.06 magazineReloadPhase: Number in range 1..0 - current magazine reload phase, 0 - reload complete. > 0 - reload in progress"},"form":"unary","right":{"text":"unit"}},{"syntax":"weaponState [vehicle, turretPath, weapon, muzzle, firemode]","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"},{"name":"weapon","type":"String","optional":true,"default":"`\"\"`","description":"weapon or muzzle name","type_expr":"String","since":"arma3 1.70","text":"weapon: String - (Optional, default `\"\"`) weapon or muzzle name"},{"name":"muzzle","type":"String","optional":true,"default":"`\"\"`","description":"muzzle name","type_expr":"String","since":"arma3 2.08","text":"muzzle: String - (Optional, default `\"\"`) muzzle name"},{"name":"firemode","type":"String","optional":true,"default":"`\"\"`","description":"firemode name","type_expr":"String","since":"arma3 2.08","text":"firemode: String - (Optional, default `\"\"`) firemode name"}],"returns":{"type":"Array","type_expr":"Array","description":"with [weapon, muzzle, firemode, magazine, ammoCount, roundReloadPhase, magazineReloadPhase]\n- weapon: String - muzzle: String - firemode: String - magazine: String - ammoCount: Number - Arma 3 v2.06 roundReloadPhase: Number - current ammo round reload phase (see weaponReloadingTime) - Arma 3 v2.06 magazineReloadPhase: Number - current magazine reload phase from 1 to 0, 0 - reload complete. > 0 - reload in progress","text":"Array with [weapon, muzzle, firemode, magazine, ammoCount, roundReloadPhase, magazineReloadPhase]\n\n- weapon: String\n- muzzle: String\n- firemode: String\n- magazine: String\n- ammoCount: Number\n- Arma 3 v2.06 roundReloadPhase: Number - current ammo round reload phase (see weaponReloadingTime)\n- Arma 3 v2.06 magazineReloadPhase: Number - current magazine reload phase from 1 to 0, 0 - reload complete. > 0 - reload in progress"},"form":"unary","right":{"text":"[vehicle, turretPath, weapon, muzzle, firemode]"}},{"syntax":"unit weaponState weaponOrMuzzle","since":"arma3 2.06","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"weaponOrMuzzle","type":"String","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"with [weapon, muzzle, firemode, magazine, ammoCount, roundReloadPhase, magazineReloadPhase]\n- weapon: String - muzzle: String - firemode: String - magazine: String - ammoCount: Number - Arma 3 v2.06 roundReloadPhase: Number - current ammo round reload phase (see weaponReloadingTime) - Arma 3 v2.06 magazineReloadPhase: Number - current magazine reload phase from 1 to 0, 0 - reload complete. > 0 - reload in progress","text":"Array with [weapon, muzzle, firemode, magazine, ammoCount, roundReloadPhase, magazineReloadPhase]\n\n- weapon: String\n- muzzle: String\n- firemode: String\n- magazine: String\n- ammoCount: Number\n- Arma 3 v2.06 roundReloadPhase: Number - current ammo round reload phase (see weaponReloadingTime)\n- Arma 3 v2.06 magazineReloadPhase: Number - current magazine reload phase from 1 to 0, 0 - reload complete. > 0 - reload in progress"},"form":"binary","left":{"text":"unit"},"right":{"text":"weaponOrMuzzle"}}],"examples":[{"text":"```sqf\n_wsPlayer = weaponState player;                    // [\"arifle_MXC_ACO_F\",\"arifle_MXC_ACO_F\",\"Single\",\"30Rnd_65x39_caseless_mag\",30,0,0]\n```","code":["_wsPlayer = weaponState player;\t\t\t\t\t// [\"arifle_MXC_ACO_F\",\"arifle_MXC_ACO_F\",\"Single\",\"30Rnd_65x39_caseless_mag\",30,0,0]"]},{"text":"Query currently selected gunner weapon:\n\n```sqf\n_wsVehicle = weaponState [_apc, [0]];            // [\"autocannon_40mm_CTWS\",\"HE\",\"player\",\"60Rnd_40mm_GPR_Tracer_Red_shells\",60,0,0]\n```","code":["_wsVehicle = weaponState [_apc, [0]];\t\t\t// [\"autocannon_40mm_CTWS\",\"HE\",\"player\",\"60Rnd_40mm_GPR_Tracer_Red_shells\",60,0,0]"]},{"text":"```sqf\n_wsVehicle = weaponState [_apc, [0], \"AP\"];        // [\"autocannon_40mm_CTWS\",\"AP\",\"player\",\"40Rnd_40mm_APFSDS_Tracer_Red_shells\",40,0,0]\n```","code":["_wsVehicle = weaponState [_apc, [0], \"AP\"];\t\t// [\"autocannon_40mm_CTWS\",\"AP\",\"player\",\"40Rnd_40mm_APFSDS_Tracer_Red_shells\",40,0,0]"]},{"text":"```sqf\n_wsPlayer = player weaponState \"GL_3GL_F\";        // [\"arifle_MX_GL_ACO_F\",\"GL_3GL_F\",\"Single\",\"1Rnd_HE_Grenade_shell\",1,0,0]\n```","code":["_wsPlayer = player weaponState \"GL_3GL_F\";\t\t// [\"arifle_MX_GL_ACO_F\",\"GL_3GL_F\",\"Single\",\"1Rnd_HE_Grenade_shell\",1,0,0]"]}],"see_also":["weapons","selectWeaponTurret","loadMagazine","magazinesTurret","weaponsTurret","weaponReloadingTime"],"notes":[{"user":"AgentRev","date":"2022-03-31T04:08:09Z","text":"In the case of a GL rifle, if the rifle is currently in GL mode, syntax 3 will return the same result for either muzzle:\n\n```sqf\nplayer selectWeapon \"GL_3GL_F\";\n_state = player weaponState \"arifle_MX_GL_ACO_F\";    // [\"arifle_MX_GL_ACO_F\",\"GL_3GL_F\",\"Single\",\"1Rnd_HE_Grenade_shell\",1,0,0]\n_state = player weaponState \"GL_3GL_F\";                // [\"arifle_MX_GL_ACO_F\",\"GL_3GL_F\",\"Single\",\"1Rnd_HE_Grenade_shell\",1,0,0]\n```\n\nIn rifle mode, the result is different:\n\n```sqf\nplayer selectWeapon \"arifle_MX_GL_ACO_F\";\n_state = player weaponState \"arifle_MX_GL_ACO_F\";    // [\"arifle_MX_GL_ACO_F\",\"arifle_MX_GL_ACO_F\",\"Single\",\"30Rnd_65x39_caseless_mag\",30,0,0]\n_state = player weaponState \"GL_3GL_F\";                // [\"arifle_MX_GL_ACO_F\",\"GL_3GL_F\",\"Single\",\"1Rnd_HE_Grenade_shell\",1,0,0]\n```\n\nTherefore, in order to gather all states of one multi-muzzle weapon, we have to do some masochistic stuff:\n\n```sqf\nfn_getWeaponStates =\n{\n    params [\"_unit\", \"_weapon\"];\n    private _origState = weaponState _unit select [0,3];\n    private _muzzles = [_weapon] + (getArray (configFile >> \"CfgWeapons\" >> _weapon >> \"muzzles\") select { _x != \"this\" });\n    private _states = [];\n\n    {\n        _unit selectWeapon _x;\n        _states pushBack weaponState _unit;\n    } forEach _muzzles;\n\n    _unit selectWeapon _origState;\n    _states;\n};\n\nprivate _result = [player, primaryWeapon player] call fn_getWeaponStates;\n/*\n    [\n        [\"arifle_MX_GL_ACO_F\", \"arifle_MX_GL_ACO_F\", \"Single\", \"30Rnd_65x39_caseless_mag\", 30, 0, 0],\n        [\"arifle_MX_GL_ACO_F\", \"GL_3GL_F\", \"Single\", \"1Rnd_HE_Grenade_shell\", 1, 0, 0]\n    ]\n*/\n```"}]},{"name":"weaponsTurret","title":"weaponsTurret","type":"command","url":"https://community.bistudio.com/wiki/weaponsTurret","revid":377486,"updated":"2026-01-02T06:49:06Z","groups":["Turrets"],"status":"ok","games":{"arma2oa":"1.52","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.52","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns all weapons of a given turret. Use turret path [-1] for driver's turret.","syntaxes":[{"syntax":"vehicle weaponsTurret turretPath","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"turretPath","type":"Turret Path","type_expr":"Turret Path"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"turretPath"}}],"examples":[{"code":["_weapons = vehicle player weaponsTurret [0,0];"]},{"code":["_weapons = _tank weaponsTurret [0];"]},{"code":["_driverWeapon = _ka50pilot weaponsTurret [-1];"]},{"code":["_weaponsForAnyTurrentPosition = (vehicle player) weaponsTurret ((assignedVehicleRole player) select 1);"]}],"see_also":["addMagazineTurret","magazinesTurret","removeMagazinesTurret","removeMagazineTurret","weapons","assignedVehicleRole","addWeaponTurret","removeWeaponTurret","turretLocal"],"notes":[{"user":".kju","date":"2011-03-11T07:49:00Z","text":"Use assignedVehicleRole in combination to easily determine the weapons for any vehicle position. You need to check for -1 if the unit is in the driver/pilot position. See example 3 and 4."},{"user":"DenV","date":"2012-05-30T16:26:00Z","text":"Returns information (including the turrets paths) about all weapons on turrets\n\n```sqf\nfuncGetTurretsWeapons = {\n    private [\"_result\", \"_getAnyMagazines\", \"_findRecurse\", \"_class\"];\n    _result = [];\n    _getAnyMagazines = {\n        private [\"_weapon\", \"_mags\"];\n        _weapon = configFile >> \"CfgWeapons\" >> _this;\n        _mags = [];\n        {\n            _mags = _mags + getArray (\n                (if (_x == \"this\") then { _weapon } else { _weapon >> _x }) >> \"magazines\"\n            )\n        } forEach getArray (_weapon >> \"muzzles\");\n        _mags\n    };\n    _findRecurse = {\n        private [\"_root\", \"_class\", \"_path\", \"_currentPath\"];\n        _root = (_this select 0);\n        _path = +(_this select 1);\n        for \"_i\" from 0 to count _root -1 do {\n            _class = _root select _i;\n            if (isClass _class) then {\n                _currentPath = _path + [_i];\n                {\n                    _result set [count _result, [_x, _x call _getAnyMagazines, _currentPath, str _class]];\n                } forEach getArray (_class >> \"weapons\");\n                _class = _class >> \"turrets\";\n                if (isClass _class) then {\n                    [_class, _currentPath] call _findRecurse;\n                };\n            };\n        };\n    };\n    _class = (\n        configFile >> \"CfgVehicles\" >> (\n            switch (typeName _this) do {\n                case \"STRING\" : {_this};\n                case \"OBJECT\" : {typeOf _this};\n                default {nil}\n            }\n        ) >> \"turrets\"\n    );\n    [_class, []] call _findRecurse;\n    _result;\n};\n```\n\nThis call:\n\n```sqf\n\"M1A2_US_TUSK_MG_EP1\" call funcGetTurretsWeapons;\n```\n\nwill return all turrets weapons, their magazines and their paths:\n\n```\n[\n    [\"M256\", [\"20Rnd_120mmSABOT_M1A2\", \"20Rnd_120mmHE_M1A2\"], [0], \"bin\\config.bin/CfgVehicles/M1A2_US_TUSK_MG_EP1/Turrets/MainTurret\"],\n    [\"M240_veh\", [\"100Rnd_762x51_M240\", \"1200Rnd_762x51_M240\"], [0], \"bin\\config.bin/CfgVehicles/M1A2_US_TUSK_MG_EP1/Turrets/MainTurret\"],\n    [\"M2BC\", [\"100Rnd_127x99_M2\"], [0, 0], \"bin\\config.bin/CfgVehicles/M1A2_US_TUSK_MG_EP1/Turrets/MainTurret/Turrets/CommanderOptics\"],\n    [\"SmokeLauncher\", [\"SmokeLauncherMag\"], [0, 0], \"bin\\config.bin/CfgVehicles/M1A2_US_TUSK_MG_EP1/Turrets/MainTurret/Turrets/CommanderOptics\"],\n    [\"M240_veh_2\", [\"100Rnd_762x51_M240\", \"1200Rnd_762x51_M240\"], [0, 1], \"bin\\config.bin/CfgVehicles/M1A2_US_TUSK_MG_EP1/Turrets/MainTurret/Turrets/LoaderTurret\"]\n]\n```"}]},{"name":"webRequest","title":"webRequest","type":"command","url":"https://community.bistudio.com/wiki/webRequest","revid":379580,"updated":"2026-11-02T16:56:42Z","groups":["System"],"status":"ok","games":{"arma3":"2.24"},"since":"arma3 2.24","arma3_since":"2.24","branch":["dev"],"description":"Create a web request returning an SQF promise, allowing communication with web servers in game.\n\n> [!NOTE]\n> See WebAPI for a full tutorial.","syntaxes":[{"syntax":"webRequest request","params":[{"name":"request","type":"HashMap","type_expr":"HashMap"}],"returns":{"type":"Script Handle","type_expr":"Script Handle","description":"a promise"},"form":"unary","right":{"text":"request"}}],"examples":[{"text":"```sqf\nspawn {\n    private _handle = webRequest #{\n        \"type\": \"http\",\n        //\"method\": \"GET\", \"GET\" is default\n        \"origin\": \"test\",\n        \"url\": \"https://myip.wtf/text\"\n    };\n    private _result = waitUntil _handle; // suspend until it is ready\n    _result params [\"_request\", \"_result\"];\n    systemChat format [\"My IP is: %1\", _result get \"body\"];\n};\n```","code":["spawn {\n\tprivate _handle = webRequest #{\n\t\t\"type\": \"http\",\n\t\t//\"method\": \"GET\", \"GET\" is default\n\t\t\"origin\": \"test\",\n\t\t\"url\": \"https://myip.wtf/text\"\n\t};\n\tprivate _result = waitUntil _handle; // suspend until it is ready\n\t_result params [\"_request\", \"_result\"];\n\tsystemChat format [\"My IP is: %1\", _result get \"body\"];\n};"]}],"see_also":["callExtension","connectToServer"]},{"name":"weightRTD","title":"weightRTD","type":"command","url":"https://community.bistudio.com/wiki/weightRTD","revid":378400,"updated":"2026-04-04T08:04:41Z","groups":["RTD"],"status":"ok","games":{"arma3":"1.34"},"since":"arma3 1.34","arma3_since":"1.34","description":"> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.\n\nReturns weight of RTD helicopter.","syntaxes":[{"syntax":"weightRTD helicopter","params":[{"name":"helicopter","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [fuselage, crew, fuel, custom, weapons] - weights in kilograms\n- fuselage: Number - weight of the fuselage - crew: Number - weight of the crew - fuel: Number - weight of the fuel - custom: Number - weight set with setCustomWeightRTD - weapons: Number - weight of the weapons","text":"Array with [fuselage, crew, fuel, custom, weapons] - weights in kilograms\n\n- fuselage: Number - weight of the fuselage\n- crew: Number - weight of the crew\n- fuel: Number - weight of the fuel\n- custom: Number - weight set with setCustomWeightRTD\n- weapons: Number - weight of the weapons"},"form":"unary","right":{"text":"helicopter"}}],"examples":[{"code":["_taruWeight = weightRTD taru// Returns [7000,300,1990.56,0,0]"]}],"see_also":["setCustomWeightRTD","isObjectRTD","load","getMass"]},{"name":"west","title":"west","type":"command","url":"https://community.bistudio.com/wiki/west","revid":325308,"updated":"2022-07-10T23:00:31Z","groups":["Sides"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"West (BLUFOR) side.","syntaxes":[{"syntax":"west","params":[],"returns":{"type":"Side","type_expr":"Side"},"form":"nullary"}],"examples":[{"text":"SQS Syntax:\n\n```sqs\n? side _unit == west : hint \"This is a western unit!\"\n```","code":["? side _unit == west : hint \"This is a western unit!\""]},{"text":"SQF Syntax:\n\n```sqf\nif (side _unit == west) then\n{\n    hint \"This is a western unit!\";\n};\n```","code":["if (side _unit == west) then\n{\n\thint \"This is a western unit!\";\n};"]}],"aliases":["blufor"],"see_also":["side","east","resistance","civilian","sideEmpty","sideAmbientLife"]},{"name":"WFSideText","title":"WFSideText","type":"command","url":"https://community.bistudio.com/wiki/WFSideText","revid":352213,"updated":"2024-02-01T23:26:05Z","groups":["Sides","Localization"],"status":"ok","games":{"arma2":"1.04","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.04","arma3_since":"0.50","description":"Returns the unlocalized text value of a side or an object's/group's side.\n\n|  |  |  |  |  |  |  |  |  |  |  |\n|---|---|---|---|---|---|---|---|---|---|---|\n| Side | east / opfor | west / blufor | resistance / independent | civilian | sideUnknown | sideEnemy | sideFriendly | sideLogic | sideEmpty | sideAmbientLife |\n| Result | \"East\" | \"West\" | \"Resistance\" | \"Civilian\" | \"Unknown\" |  |  |  |  |  |\n\n> [!NOTE]\n> *WF* stands for **Warfare**, an Armed Assault/Arma 2 official game mode.","syntaxes":[{"syntax":"WFSideText value","params":[{"name":"value","type":"Object, Group or Side","type_expr":"Object | Group | Side"}],"returns":{"type":"String","type_expr":"String","description":"unlocalized side text value"},"form":"unary","right":{"text":"value"}}],"examples":[{"code":["WFSideText player;"]},{"code":["WFSideText group player;"]},{"code":["WFSideText west;"]}],"see_also":["side","localize","isLocalized"]},{"name":"while","title":"while","type":"command","url":"https://community.bistudio.com/wiki/while","revid":369060,"updated":"2024-09-02T20:24:55Z","groups":["Program Flow"],"status":"ok","games":{"ofp":"1.85","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.85","arma3_since":"0.50","description":"Repeats Code while the given condition is true. A part of while-do construct.\n\n> [!IMPORTANT]\n> - A while loop does not have any suspension, meaning that if used in scheduled environment without any suspension (sleep or uiSleep) the code will run multiple times per frame and consumes the 3 ms per frame scheduler execution limit. This should be avoided if not intended (see Example 3).\n> - In non-scheduled environment, while do loop is limited to 10,000 iterations, after which it exits even if condition is still true.","syntaxes":[{"syntax":"while condition","params":[{"name":"condition","type":"Code","type_expr":"Code"}],"returns":{"type":"While Type","type_expr":"While Type"},"form":"unary","right":{"text":"condition"}}],"examples":[{"code":["while { a < b } do { a = a + 1 };"]},{"text":"A practical example: Repair all members of a group to such a level that they are able to stand up:\n\n```sqf\n{\n    if (alive _x) then\n    {\n        while { not canStand _x } do\n        {\n            _x setDamage (damage _x - 0.01);\n        };\n    };\n} forEach units group unitname;\n```","code":["{\n\tif (alive _x) then\n\t{\n\t\twhile { not canStand _x } do\n\t\t{\n\t\t\t_x setDamage (damage _x - 0.01);\n\t\t};\n\t};\n} forEach units group unitname;"]},{"text":"```sqf\n0 spawn {\n    // warning: while loop without suspension executes multiple times per frame\n    private _counter = 0;\n    private _endTime = diag_tickTime + 5;\n    private _frameNo = diag_frameNo;\n    while { diag_tickTime < _endTime } do\n    {\n        _counter = _counter + 1;\n    };\n    // in an empty mission, the _counter may go well over 2000 times per frame!\n    hint format [\"Average Execution: %1 times per frame\", _counter / (diag_frameNo - _frameNo)];\n\n    // with suspension\n    private _counter = 0;\n    private _endTime = diag_tickTime + 5;\n    private _frameNo = diag_frameNo;\n    while { diag_tickTime < _endTime } do\n    {\n        _counter = _counter + 1;\n        uiSleep 0.001; // waits at least 1 frame\n    };\n    // _counter says one per frame, as expected\n    hint format [\"Average Execution: %1 times per frame\", _counter / (diag_frameNo - _frameNo)];\n};\n```","code":["0 spawn {\n\t// warning: while loop without suspension executes multiple times per frame\n\tprivate _counter = 0;\n\tprivate _endTime = diag_tickTime + 5;\n\tprivate _frameNo = diag_frameNo;\n\twhile { diag_tickTime < _endTime } do\n\t{\n\t\t_counter = _counter + 1;\n\t};\n\t// in an empty mission, the _counter may go well over 2000 times per frame!\n\thint format [\"Average Execution: %1 times per frame\", _counter / (diag_frameNo - _frameNo)];\n\n\t// with suspension\n\tprivate _counter = 0;\n\tprivate _endTime = diag_tickTime + 5;\n\tprivate _frameNo = diag_frameNo;\n\twhile { diag_tickTime < _endTime } do\n\t{\n\t\t_counter = _counter + 1;\n\t\tuiSleep 0.001; // waits at least 1 frame\n\t};\n\t// _counter says one per frame, as expected\n\thint format [\"Average Execution: %1 times per frame\", _counter / (diag_frameNo - _frameNo)];\n};"]}],"see_also":["Control Structures","waitUntil","for","do"],"notes":[{"user":"Kronzky","date":"2008-05-14T08:40:00Z","text":"The boolean code that is used to evaluate the while condition can be preceded by code that executes a regular command.\n\n```sqf\nwhile { _a =_a + 1; _a < 10 } do { /* ... */ };\n```"}]},{"name":"wind","title":"wind","type":"command","url":"https://community.bistudio.com/wiki/wind","revid":378404,"updated":"2026-04-04T08:14:45Z","groups":["Environment"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Returns the current wind vector (in m/s).","syntaxes":[{"syntax":"wind","params":[],"returns":{"type":"Vector3D","type_expr":"Vector3D","description":"[x, y, 0]. with wind being only horizontal"},"form":"nullary"}],"examples":[{"code":["_windArray = wind;"]}],"see_also":["setWind","windDir"],"notes":[{"user":"Ceeeb","date":"2008-08-10T04:38:00Z","text":"In **OFP 1.96**, wind speed and direction are directly related to overcast."}]},{"name":"windDir","title":"windDir","type":"command","url":"https://community.bistudio.com/wiki/windDir","revid":321137,"updated":"2022-05-13T14:31:42Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns the current wind azimuth.","syntaxes":[{"syntax":"windDir","params":[],"returns":{"type":"Number","type_expr":"Number","description":"azimuth"},"form":"nullary"}],"examples":[{"text":"```sqf\nif (windDir < 45 || windDir > 315) then {\n    hint \"I feel a southern wind\"; // wind going from South to North\n};\n```","code":["if (windDir < 45 || windDir > 315) then {\n\thint \"I feel a southern wind\"; // wind going from South to North\n};"]}],"see_also":["wind","setWindDir","setWindStr","setWindForce"]},{"name":"windRTD","title":"windRTD","type":"command","url":"https://community.bistudio.com/wiki/windRTD","revid":377885,"updated":"2026-01-04T16:30:27Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"Returns wind strength and direction.\n\n> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.","syntaxes":[{"syntax":"windRTD","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [windStrength, windDirection]\n- windStrength: Number - windDirection: Number","text":"Array with [windStrength, windDirection]\n\n- windStrength: Number\n- windDirection: Number"},"form":"nullary"}],"examples":[{"code":["_wind = windRTD;"]}],"see_also":["wind","setWind"]},{"name":"windStr","title":"windStr","type":"command","url":"https://community.bistudio.com/wiki/windStr","revid":319970,"updated":"2022-05-13T09:25:48Z","groups":["Environment"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Returns the current wind strength.","syntaxes":[{"syntax":"windStr","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["10 setWindStr (0.5 * windStr);"]}],"see_also":["setWindStr","gusts","setGusts","setWind","setWindDir","setWindForce","wind","windDir"]},{"name":"wingsForcesRTD","title":"wingsForcesRTD","type":"command","url":"https://community.bistudio.com/wiki/wingsForcesRTD","revid":379402,"updated":"2026-10-31T00:01:44Z","groups":["RTD"],"status":"ok","games":{"tkoh":"1.00","arma3":"1.34"},"since":"tkoh 1.00","arma3_since":"1.34","description":"> [!NOTE]\n> **Advanced Helicopter Flight Model:** For this command to have any effect, the Advanced Flight Model (AFM) has to be enabled. AFM status can be checked with difficultyEnabledRTD.\n\nReturns force produced by wings.","syntaxes":[{"syntax":"wingsForcesRTD RTD_helicopter","params":[{"name":"RTD_helicopter","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array"},"form":"unary","right":{"text":"RTD_helicopter"}}],"examples":[{"code":["_wingForce = wingsForcesRTD _rtdHelo;"]}],"see_also":["isObjectRTD","enginesRpmRTD","enginesTorqueRTD","airDensityRTD","wind","windDir","windStr"],"notes":[{"user":"Douggem","date":"2015-03-19T20:37:00Z","text":"Advanced helicopter flight model MUST be enabled for this function to work, otherwise it returns an empty array.\nReturns a 3x3 two-dimensional array. In the editor while climbing in a little bird, it returned this:\n\n```sqf\n[[0.3993577, 11.72865, -30.21434], [0.3053164, 11.17272, -30.17695], [94.33984, 51.3513, -40.4908]]\n```"}]},{"name":"with","title":"with","type":"command","url":"https://community.bistudio.com/wiki/with","revid":369023,"updated":"2024-08-26T13:58:14Z","groups":["Program Flow","Namespaces"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Creates a With Type that is used inside a do construct in order to execute code inside a given namespace.\n\n> [!IMPORTANT]\n> To avoid the below-mentioned issue error (whether in scheduled or unscheduled environment) use setVariable/getVariable with the desired Namespace.","syntaxes":[{"syntax":"with namespace","params":[{"name":"namespace","type":"Namespace","type_expr":"Namespace"}],"returns":{"type":"With Type","type_expr":"With Type"},"form":"unary","right":{"text":"namespace"}}],"examples":[{"code":["_myWithType = with uiNamespace;"]},{"code":["with missionNamespace do { global = global + 1 };"]}],"problems":"When used in a do-construct in scripts with allowed suspension, a namespace switching might unexpectedly occur inside some scopes (for, if, try, call) started in a scheduled environment after small suspension if with was not the main scope; however, the issue does not arise if with is used in the parent scope:\n\n| namespace switch risk | namespace switch safe |\n|---|---|\n| ```sqf<br>0 spawn<br>{<br>    with uiNamespace do<br>    {<br>        for \"_i\" from 1 to 1 do <br>        {<br>            systemChat str [<br>                currentNamespace isEqualTo uiNamespace, <br>                currentNamespace isEqualTo missionNamespace<br>            ];<br>            // result [true, false]<br>            sleep 0.05; // <-- small suspension<br>            systemChat str [<br>                currentNamespace isEqualTo uiNamespace, <br>                currentNamespace isEqualTo missionNamespace<br>            ];<br>            // result [false, true] <-- switching<br>        };<br>    };<br>};<br>``` | ```sqf<br>with uiNamespace do<br>{<br>    0 spawn<br>    {<br>        for \"_i\" from 1 to 1 do <br>        {<br>            systemChat str [<br>                currentNamespace isEqualTo uiNamespace, <br>                currentNamespace isEqualTo missionNamespace<br>            ];<br>            // result [true, false]<br>            sleep 0.05; // <-- small suspension<br>            systemChat str [<br>                currentNamespace isEqualTo uiNamespace, <br>                currentNamespace isEqualTo missionNamespace<br>            ];<br>            // result [true, false] <-- NO switching<br>        };<br>    };<br>};<br>``` |","see_also":["missionNamespace","uiNamespace","parsingNamespace","currentNamespace"],"notes":[{"user":"Hypoxic125","date":"2023-02-23T07:05:05Z","text":"**Using with:**\n\n```sqf\nwith profileNamespace do {\n    myVariable = \"Hello!\";\n};\n```\n\n**is the same as:**\n\n```sqf\nprofileNamespace setVariable [\"myVariable\", \"Hello!\"];\n```\n\nThis allows you to quickly modify/use variables within a namespace without using **get/setvariable** every time."}]},{"name":"worldName","title":"worldName","type":"command","url":"https://community.bistudio.com/wiki/worldName","revid":364784,"updated":"2024-06-12T09:38:47Z","groups":["Mission Information"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Return the name of the currently loaded world.","syntaxes":[{"syntax":"worldName","params":[],"returns":{"type":"String","type_expr":"String"},"form":"nullary"}],"examples":[{"code":["private _name = worldName;"]}],"see_also":["missionName","briefingName","serverName","worldSize"],"notes":[{"user":"Sa-Matra","date":"2024-06-12T09:38:47Z","text":"World name casing is unreliable and checks must be case insensitive!"}]},{"name":"worldSize","title":"worldSize","type":"command","url":"https://community.bistudio.com/wiki/worldSize","revid":373463,"updated":"2025-05-09T16:51:14Z","groups":["Mission Information"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","description":"Returns the engine calculated size (terrain side length) of the current world in meters. In Arma, terrains are always square. (BIS_fnc_mapSize may return the same value, but is just a simple look up in config).","syntaxes":[{"syntax":"worldSize","params":[],"returns":{"type":"Number","type_expr":"Number"},"form":"nullary"}],"examples":[{"code":["private _size = worldSize; // VR and Stratis: 8192; Altis: 30720"]},{"code":["// A round marker that should cover the whole map, placed in the center of the map, should have the following radius (a, b)\nprivate _radius = sqrt 2 / 2 * worldSize;"]},{"code":["private _axis = worldSize / 2;\nprivate _center = [_axis, _axis , 0];\nprivate _radius = sqrt 2 * _axis;"]}],"see_also":["BIS_fnc_mapSize","getTerrainInfo"]},{"name":"worldToModel","title":"worldToModel","type":"command","url":"https://community.bistudio.com/wiki/worldToModel","revid":377406,"updated":"2026-01-02T06:45:05Z","groups":["Positions"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Converts position from world space to object model space.\n\n> [!IMPORTANT]\n> For scaled objects, the relative position will be divided by the object scale.","syntaxes":[{"syntax":"model worldToModel position","params":[{"name":"model","type":"Object","type_expr":"Object"},{"name":"position","type":"PositionAGL or Position2D","description":"world position","type_expr":"PositionAGL | Position2D"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative","description":"position relative to model"},"form":"binary","left":{"text":"model"},"right":{"text":"position"}}],"examples":[{"code":["_relPos = myObject worldToModel [0,0,0];"]},{"code":["_relPos = player worldToModel ASLToAGL getPosASL car;"]},{"code":["_relPos = car worldToModel [12000,5000];"]}],"see_also":["worldToModelVisual","vectorWorldToModel","modelToWorld"]},{"name":"worldToModelVisual","title":"worldToModelVisual","type":"command","url":"https://community.bistudio.com/wiki/worldToModelVisual","revid":377846,"updated":"2026-01-03T04:37:17Z","groups":["Positions","Render Time Scope"],"status":"ok","games":{"arma3":"1.32"},"since":"arma3 1.32","arma3_since":"1.32","description":"Converts position from world space to object model space in render time scope.\n\n> [!IMPORTANT]\n> For scaled objects, the relative position will be divided by the object scale.","syntaxes":[{"syntax":"object worldToModelVisual worldPosition","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"worldPosition","type":"PositionAGL or Position2D","type_expr":"PositionAGL | Position2D"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative"},"form":"binary","left":{"text":"object"},"right":{"text":"worldPosition"}}],"examples":[{"code":["_relPos = myObject worldToModelVisual [0,0,0];"]},{"code":["_relPos = player worldToModelVisual position car;"]},{"code":["_relPos = car worldToModelVisual [12000, 5000];"]},{"code":["_relPos = unit worldToModelVisual position tank;"]}],"see_also":["worldToModel","vectorWorldToModelVisual","modelToWorldVisual","modelToWorld"]},{"name":"worldToScreen","title":"worldToScreen","type":"command","url":"https://community.bistudio.com/wiki/worldToScreen","revid":377903,"updated":"2026-01-05T18:00:13Z","groups":["Positions"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Converts position in world space into screen (UI) space. If a specified position is not within the current screen view, an empty array is returned.\n\n> [!NOTE]\n> SafeZones should be considered:\n>\n> - the result can be out of the [0,0]..[1,1] range\n> - the result can be a filled array even if the position is not displayed on screen if it would appear on a triplescreen setup","syntaxes":[{"syntax":"worldToScreen position","params":[{"name":"position","type":"Position2D, PositionAGL","type_expr":"Position2D | PositionAGL"}],"returns":{"type":"Array","type_expr":"Array","description":"with [x, y] - screen position in SafeZone. Returns an empty array `[]` if not on-screen.\n- x: Number - y: Number","text":"Array with [x, y] - screen position in SafeZone. Returns an empty array `[]` if not on-screen.\n\n- x: Number\n- y: Number"},"form":"unary","right":{"text":"position"}},{"syntax":"camera worldToScreen position","since":"arma3 2.18","params":[{"name":"camera","type":"Object","description":"camera object","type_expr":"Object"},{"name":"position","type":"Position2D, PositionAGL","type_expr":"Position2D | PositionAGL"}],"returns":{"type":"Array","type_expr":"Array","description":"with [x, y] - screen position in SafeZone. Returns an empty array `[]` if not on-screen.\n- x: Number - y: Number","text":"Array with [x, y] - screen position in SafeZone. Returns an empty array `[]` if not on-screen.\n\n- x: Number\n- y: Number"},"form":"binary","left":{"text":"camera"},"right":{"text":"position"}}],"examples":[{"code":["_screenPos = worldToScreen ASLToAGL getPosASL soldier1;"]},{"code":["_screenPos = worldToScreen (player modelToWorld [0,10,0]);"]}],"see_also":["screenToWorld","SafeZone"]}]}