From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Arma 3 version 1.48

Click on the images for descriptions

Introduced in

Arma 3


	Author: Julien VIDA <@tom_48_97>

	This function is used for randomizing 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.

	_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

	Bool - True when done

	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

Example 1:
[this] call BIS_fnc_unitHeadgear;

Example 2:
[this, nil, []] call BIS_fnc_unitHeadgear
See also:

Description.ext, CfgUnitTemplates


Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To


Bottom Section