BIS fnc unitHeadgear: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects? in MP|Multiplayer Effects(...)
Line 1: Line 1:
{{Function|Comments=
{{Function| arma3|1.48|arg= local |MP arguments=


| arma3 |Game name=
|gr1 = Inventory| 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.}}| [unit, headgear, facewear] call BIS_fnc_unitHeadgear|p1= unit: [[Object]]|p2= headgear: [[Boolean]], [[String]] or [[Array]] - (Optional, default [[false]]) can be one of:
|1.48|Game version=
 
|arg= local |MP arguments=
 
|gr1 = Inventory |GROUP1=
 
| 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.}}|Description=
 
| [unit, headgear, facewear] call BIS_fnc_unitHeadgear |Syntax=
 
|p1= unit: [[Object]] |Parameter 1=
 
|p2= headgear: [[Boolean]], [[String]] or [[Array]] - (Optional, default [[false]]) can be one of:
* [[Boolean]] - if [[false]], change nothing to the headgear
* [[Boolean]] - if [[false]], change nothing to the headgear
* [[String]] - valid Headgear class or a valid class from [[Description.ext#CfgUnitTemplates|Description.ext CfgUnitTemplates]]
* [[String]] - valid Headgear class or a valid class from [[Description.ext#CfgUnitTemplates|Description.ext CfgUnitTemplates]]
* [[Array]] - headgear list with individual probability |Parameter 2=
* [[Array]] - headgear list with individual probability|p3= facewear: [[Boolean]], [[String]] or [[Array]] - (Optional, default [[false]]) can be one of:
 
|p3= facewear: [[Boolean]], [[String]] or [[Array]] - (Optional, default [[false]]) can be one of:
* [[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 |Parameter 3=
* [[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]]; {{codecomment| // headgear only}}</code>|x3= <code><nowiki>[</nowiki>[[this]], [[nil]], []]  [[call]] [[BIS_fnc_unitHeadgear]]; {{codecomment| // 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]] |See also=
 
| [[Boolean]] - [[true]] when done |Return value=
 
|x1= <code><nowiki>[</nowiki>[[this]]] [[call]] [[BIS_fnc_unitHeadgear]]; {{codecomment| // headgear and face wear, same as [this, [], []]}}</code> |Example 1=
 
|x2= <code><nowiki>[</nowiki>[[this]], [], []] [[call]] [[BIS_fnc_unitHeadgear]]; {{codecomment| // headgear only}}</code> |Example 2=
 
|x3= <code><nowiki>[</nowiki>[[this]], [[nil]], []]  [[call]] [[BIS_fnc_unitHeadgear]]; {{codecomment| // facewear only}}</code> |Example 3=
 
|x4= <code><nowiki>[</nowiki>[[this]], "myTemplate"]  [[call]] [[BIS_fnc_unitHeadgear]]; {{codecomment| // class defined in [[Description.ext#CfgUnitTemplates|Description.ext CfgUnitTemplates]]}}</code> |Example 4=
 
| [[Description.ext#CfgUnitTemplates|Description.ext/CfgUnitTemplates]], [[addGoggles]], [[addHeadgear]] |See also=
}}
}}


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

Revision as of 10:53, 18 January 2021

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, [], []]
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:
Description.ext/CfgUnitTemplatesaddGogglesaddHeadgear

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