Description
Randomise headgear and facewear of a character.
Important
If the randomization is disabled, only strings parameters will be processed, array will be ignored and considered as false.
Syntax
[unit, headgear, facewear] call BIS_fnc_unitHeadgear
Parameters:
unit: Objectheadgear: Boolean, String or Array - (Optional, default false) can be one of:- Boolean - if false, change nothing to the headgear
- String - valid Headgear class or a valid class from Description.ext CfgUnitTemplates
- Array - headgear list with individual probability
facewear: Boolean, String or Array - (Optional, default false) can be one of:- Boolean - if false, change nothing to the facewear
- String - valid facewear class or a valid class from Description.ext CfgUnitTemplates
- Array - facewear list with individual probability
Returns: Boolean - true when done
Examples
Example 1
[this] call BIS_fnc_unitHeadgear; // headgear and face wear, same as [this, [], []]
[this, [], []] call BIS_fnc_unitHeadgear; // headgear only
[this, nil, []] call BIS_fnc_unitHeadgear; // facewear only
[this, "myTemplate"] call BIS_fnc_unitHeadgear; // class defined in Description.ext - CfgUnitTemplates