BIS fnc unitHeadgear: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "{{HashLink" to "{{Link")
 
(27 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.48


| arma3 |= Game name
|arg= local


|1.00|= Game version
|gr1= Inventory
____________________________________________________________________________________________


| ''N/A'' |= Description
|descr= Randomise headgear and facewear of a character.
____________________________________________________________________________________________
{{Feature|important|If the randomization is disabled, only strings parameters will be processed, array will be ignored and considered as false.}}


| <!-- [] call [[BIS_fnc_unitHeadgear]]; --> |= Syntax
|s1= [unit, headgear, facewear] call [[BIS_fnc_unitHeadgear]]
|p1= |= Parameter 1


| |= Return value
|p1= unit: [[Object]]
____________________________________________________________________________________________


|x1= <code></code> |=  
|p2= headgear: [[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|Description.ext CfgUnitTemplates]]
* [[Array]] - headgear list with individual probability|p3= 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|Description.ext CfgUnitTemplates]]
* [[Array]] - facewear list with individual probability


| |= See also
|r1= [[Boolean]] - [[true]] when done


|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>
|seealso= {{Link|Description.ext#CfgUnitTemplates}} [[addGoggles]] [[addHeadgear]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Inventory|{{uc:unitHeadgear}}]]
[[Category:Functions|{{uc:unitHeadgear}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:unitHeadgear}}]]

Latest revision as of 18: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