BIS_fnc_unitHeadgear

From Bohemia Interactive Community
Jump to navigation Jump to search
Introduced with Arma 3 version 1.481.48
Hover & click on the images for descriptions

Description

Description:
Randomise headgear and facewear of a character.
If the randomization is disabled, only strings parameters will be processed, array will be ignored and considered as false.

Syntax

Syntax:
[unit, headgear, facewear] call BIS_fnc_unitHeadgear
Parameters:
unit: Object
headgear: Boolean, String or Array - (Optional, default false) can be one of:
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
  • Return Value:
    Boolean - true when done

    Examples

    Example 1:
    [this] call BIS_fnc_unitHeadgear; // headgear and face wear, same as [this, [], []]
    Example 2:
    [this, [], []] call BIS_fnc_unitHeadgear; // headgear only
    Example 3:
    [this, nil, []] call BIS_fnc_unitHeadgear; // facewear only
    Example 4:
    [this, "myTemplate"] call BIS_fnc_unitHeadgear; // class defined in Description.ext CfgUnitTemplates

    Additional Information

    Execution:
    call
    See also:
    Description.ext/CfgUnitTemplatesaddGogglesaddHeadgear

    Notes

    i
    Only post proven facts here. Report bugs on the feedback tracker. Use the Talk page or the Forums for discussions.

    Notes

    Bottom Section