BIS fnc unitHeadgear: Difference between revisions
Jump to navigation
Jump to search
(Created page with " {{Function|= Comments ____________________________________________________________________________________________ | arma3 |= Game name |1.48|= Game version _______________...") |
No edit summary |
||
Line 38: | Line 38: | ||
result = [this, [], []] call BIS_fnc_unitHeadgear; // Headgear and face wear | result = [this, [], []] call BIS_fnc_unitHeadgear; // Headgear and face wear | ||
result = [this, []] call BIS_fnc_unitHeadgear // Headgear only | result = [this, []] call BIS_fnc_unitHeadgear // Headgear only | ||
result = [this, nil, []] // Face wear only. Note that nil can be replaced by false | result = [this, nil, []] call BIS_fnc_unitHeadgear // Face wear only. Note that nil can be replaced by false | ||
3) Usage of classes defined in the CfgUnitTemplates (mission config file). It will use the headgearList[] and facewearList[] | 3) Usage of classes defined in the CfgUnitTemplates (mission config file). It will use the headgearList[] and facewearList[] | ||
Line 54: | Line 54: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code></code> |= | |x1= <code>[this] call BIS_fnc_unitHeadgear;</code> |= | ||
|x2= <code>[this, nil, []] call BIS_fnc_unitHeadgear</code> |= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[Description.ext#CfgUnitTemplates|Description.exe, CfgUnitTemplates]] |= See also | ||
}} | }} |
Revision as of 12:20, 17 August 2015
Description
- Description:
/* Author: Julien VIDA <@tom_48_97> Description: This function is used for randomizing headgear and facewear of a character. https://community.bistudio.com/wiki/BIS_fnc_unitHeadgear If the randomization is disabled, only strings parameters, will be processed, array will be ignored and considered as false. Parameter(s): _this select 0: Object - Unit _this select 1: Headgear Array - Headgear list with individual probability Bool - false, change nothing to the headgear String - valid Headgear class or a valid class from CfgUnitTemplates (mission config file) _this select 2: Facewear Array - facewear list with individual probability Bool - false, change nothing to the facewear String - valid facewear class Returns: Bool - True when done Examples: 1) Do nothing because the Headgear and the face wear will be considered as False result = [this] call BIS_fnc_unitHeadgear; 2) Use the default randomization (as defined in the config) result = [this, [], []] call BIS_fnc_unitHeadgear; // Headgear and face wear result = [this, []] call BIS_fnc_unitHeadgear // Headgear only result = [this, nil, []] call BIS_fnc_unitHeadgear // Face wear only. Note that nil can be replaced by false 3) Usage of classes defined in the CfgUnitTemplates (mission config file). It will use the headgearList[] and facewearList[] result = [this, "MyClassName"] call BIS_fnc_unitHeadgear */
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- Syntax needed
- Return Value:
- Return value needed
Examples
- Example 1:
[this] call BIS_fnc_unitHeadgear;
- Example 2:
[this, nil, []] call BIS_fnc_unitHeadgear
Additional Information
- See also:
- Description.exe, CfgUnitTemplates
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