BIS fnc unitHeadgear: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix regex replace)
m (Text replacement - "{{HashLink" to "{{Link")
 
(4 intermediate revisions by the same user not shown)
Line 25: Line 25:
|r1= [[Boolean]] - [[true]] when done
|r1= [[Boolean]] - [[true]] when done


|x1= <code>[<nowiki/>[[Magic Variables#this_2|this]]] [[call]] [[BIS_fnc_unitHeadgear]]; {{cc|headgear and face wear, same as [this, [], []]}}</code>
|x1= <sqf>
[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
</sqf>


|x2= <code>[<nowiki/>[[Magic Variables#this_2|this]], [], []] [[call]] [[BIS_fnc_unitHeadgear]]; {{cc|headgear only}}</code>
|seealso= {{Link|Description.ext#CfgUnitTemplates}} [[addGoggles]] [[addHeadgear]]
 
|x3= <code>[<nowiki/>[[Magic Variables#this_2|this]], [[nil]], []] [[call]] [[BIS_fnc_unitHeadgear]]; {{cc|facewear only}}</code>
 
|x4= <code>[<nowiki/>[[Magic Variables#this_2|this]], "myTemplate"] [[call]] [[BIS_fnc_unitHeadgear]]; {{cc|class defined in {{HashLink|Description.ext#CfgUnitTemplates}}}}</code>
 
|seealso= {{HashLink|Description.ext#CfgUnitTemplates}}, [[addGoggles]], [[addHeadgear]]
}}
}}

Latest revision as of 17:43, 4 January 2023

Hover & click on the images for description

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.
Execution:
call
Groups:
Inventory

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:
Return Value:
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

Additional Information

See also:
Description.ext - CfgUnitTemplates addGoggles addHeadgear

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note