2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-09-20 22:28:25 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Get the variable default value
|
2015-01-16 23:21:47 +00:00
|
|
|
*
|
2015-09-20 22:28:25 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: Variable Name <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Default value of variable <ANY>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* ["name"] call ace_common_fnc_getDefinedVariableDefault
|
|
|
|
*
|
2015-09-20 22:28:25 +00:00
|
|
|
* Public: Yes
|
2015-01-16 23:21:47 +00:00
|
|
|
*/
|
|
|
|
|
2015-09-20 22:28:25 +00:00
|
|
|
params ["_varName"];
|
|
|
|
|
2015-12-12 16:26:47 +00:00
|
|
|
private _variableDefinition = _varName call FUNC(getDefinedVariableInfo);
|
2015-09-20 22:28:25 +00:00
|
|
|
|
2015-11-30 16:14:05 +00:00
|
|
|
if !(_variableDefinition isEqualTo []) exitWith {
|
2015-01-18 19:09:19 +00:00
|
|
|
_variableDefinition select 1;
|
2015-01-16 23:21:47 +00:00
|
|
|
};
|
|
|
|
|
2015-09-20 22:28:25 +00:00
|
|
|
nil
|