CBA_fnc_defaultParam

Description

Gets a value from parameters list (usually _this) with a default.

Example (direct use of function)

private "_frog";
_frog = [_this, 2, 12] call CBA_fnc_defaultParam;

Example (macro)

#include "script_component.hpp"
DEFAULT_PARAM(2,_frog,12);

Parameters

_paramsArray of parameters, usually _this [Array]
_indexParameter index in the params array [Integer: >= 0]
_defaultValueValue to use if the array is too short [Any]

Returns

Value of parameter [Any]

Close