{"name":"BIS_fnc_unitHeadgear","operator":null,"title":"BIS fnc unitHeadgear","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_unitHeadgear","revid":336872,"updated":"2023-01-04T16:43:48Z","groups":["Inventory"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.48"}],"since":{"game":"arma3","name":"Arma 3","version":"1.48"},"arma3_since":"1.48","branch":null,"locality":{"argument":"local","effect":null,"server_exec":false},"exec":null,"description":"Randomise headgear and facewear of a character.\n\n> [!IMPORTANT]\n> If the randomization is disabled, only strings parameters will be processed, array will be ignored and considered as false.","syntaxes":[{"syntax":"[unit, headgear, facewear] call BIS_fnc_unitHeadgear","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"},{"name":"headgear","type":"Boolean, String or Array","optional":true,"default":"false","description":"can be one of:\n- Boolean - if false, change nothing to the headgear\n- String - valid Headgear class or a valid class from Description.ext CfgUnitTemplates\n- Array - headgear list with individual probability","types":["Boolean","String","Array"],"since":null,"text":"headgear: Boolean, String or Array - (Optional, default false) can be one of:\n- Boolean - if false, change nothing to the headgear\n- String - valid Headgear class or a valid class from Description.ext CfgUnitTemplates\n- Array - headgear list with individual probability"},{"name":"facewear","type":"Boolean, String or Array","optional":true,"default":"false","description":"can be one of:\n- Boolean - if false, change nothing to the facewear\n- String - valid facewear class or a valid class from Description.ext CfgUnitTemplates\n- Array - facewear list with individual probability","types":["Boolean","String","Array"],"since":null,"text":"facewear: Boolean, String or Array - (Optional, default false) can be one of:\n- Boolean - if false, change nothing to the facewear\n- String - valid facewear class or a valid class from Description.ext CfgUnitTemplates\n- Array - facewear list with individual probability"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true when done","text":"Boolean - true when done"}}],"examples":[{"text":"```sqf\n[this] call BIS_fnc_unitHeadgear;                    // headgear and face wear, same as [this, [], []]\n[this, [], []] call BIS_fnc_unitHeadgear;            // headgear only\n[this, nil, []] call BIS_fnc_unitHeadgear;            // facewear only\n[this, \"myTemplate\"] call BIS_fnc_unitHeadgear;    // class defined in Description.ext - CfgUnitTemplates\n```","code":["[this] call BIS_fnc_unitHeadgear;\t\t\t\t\t// headgear and face wear, same as [this, [], []]\n[this, [], []] call BIS_fnc_unitHeadgear;\t\t\t// headgear only\n[this, nil, []] call BIS_fnc_unitHeadgear;\t\t\t// facewear only\n[this, \"myTemplate\"] call BIS_fnc_unitHeadgear;\t// class defined in Description.ext - CfgUnitTemplates"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["addGoggles","addHeadgear"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Inventory","Functions","Introduced with Arma 3 version 1.48"],"docblock":null,"filled_from_docblock":[]}