BIS fnc unitHeadgear: Difference between revisions
Jump to navigation
Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki) |
(Created page with " {{Function|= Comments ____________________________________________________________________________________________ | arma3 |= Game name |1.48|= Game version _______________...") |
||
Line 5: | Line 5: | ||
| arma3 |= Game name | | arma3 |= Game name | ||
|1. | |1.48|= Game version | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | <pre>/* | ||
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, []] // 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 | |||
*/ | |||
</pre> |= Description | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| <!-- [] | | <!-- [unitName, [], []] call BIS_fnc_unitHeadgear; --> |= Syntax | ||
|p1= |= Parameter 1 | |||
|p1= |= Parameter 1 | |||
| |= Return value | | |= Return value | ||
Line 20: | Line 57: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| |= See also | | |= See also | ||
}} | }} | ||
Line 32: | Line 69: | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
[[Category:Functions|{{uc:unitHeadgear}}]] | [[Category:Functions|{{uc:unitHeadgear}}]] | ||
[[Category:{{Name|arma3}}: Functions|{{uc:unitHeadgear}}]] | [[Category:{{Name|arma3}}: Functions|{{uc:unitHeadgear}}]] |
Revision as of 11:24, 16 July 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, []] // 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:
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