BIS fnc unitHeadgear: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\| *MP *[Aa]rguments? *= * " to " ")
m (Text replacement - "this" to "this")
Line 9: Line 9:
* [[Boolean]] - if [[false]], change nothing to the facewear
* [[Boolean]] - if [[false]], change nothing to the facewear
* [[String]] - valid facewear class or a valid class from [[Description.ext#CfgUnitTemplates|Description.ext CfgUnitTemplates]]
* [[String]] - valid facewear class or a valid class from [[Description.ext#CfgUnitTemplates|Description.ext CfgUnitTemplates]]
* [[Array]] - facewear list with individual probability| [[Boolean]] - [[true]] when done|x1= <code><nowiki>[</nowiki>[[this]]] [[call]] [[BIS_fnc_unitHeadgear]]; {{codecomment| // headgear and face wear, same as [this, [], []]}}</code>|x2= <code><nowiki>[</nowiki>[[this]], [], []] [[call]] [[BIS_fnc_unitHeadgear]]; {{cc|headgear only}}</code>|x3= <code><nowiki>[</nowiki>[[this]], [[nil]], []]  [[call]] [[BIS_fnc_unitHeadgear]]; {{cc|facewear only}}</code>|x4= <code><nowiki>[</nowiki>[[this]], "myTemplate"]  [[call]] [[BIS_fnc_unitHeadgear]]; {{codecomment| // class defined in [[Description.ext#CfgUnitTemplates|Description.ext CfgUnitTemplates]]}}</code>| [[Description.ext#CfgUnitTemplates|Description.ext/CfgUnitTemplates]], [[addGoggles]], [[addHeadgear]]
* [[Array]] - facewear list with individual probability| [[Boolean]] - [[true]] when done|x1= <code><nowiki>[</nowiki>[[Magic Variables#this_2|this]]] [[call]] [[BIS_fnc_unitHeadgear]]; {{codecomment| // headgear and face wear, same as [this, [], []]}}</code>|x2= <code><nowiki>[</nowiki>[[Magic Variables#this_2|this]], [], []] [[call]] [[BIS_fnc_unitHeadgear]]; {{cc|headgear only}}</code>|x3= <code><nowiki>[</nowiki>[[Magic Variables#this_2|this]], [[nil]], []]  [[call]] [[BIS_fnc_unitHeadgear]]; {{cc|facewear only}}</code>|x4= <code><nowiki>[</nowiki>[[Magic Variables#this_2|this]], "myTemplate"]  [[call]] [[BIS_fnc_unitHeadgear]]; {{codecomment| // class defined in [[Description.ext#CfgUnitTemplates|Description.ext CfgUnitTemplates]]}}</code>| [[Description.ext#CfgUnitTemplates|Description.ext/CfgUnitTemplates]], [[addGoggles]], [[addHeadgear]]
}}
}}




[[Category:{{Name|arma3}}: Functions|{{uc:unitHeadgear}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:unitHeadgear}}]]

Revision as of 14:06, 25 February 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
call
Groups:
Inventory

Syntax

Syntax:
Syntax needed
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:
Return value needed

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

See also:
See also needed

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