mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ffaa195fe5
* Fixed headers to work with silentspike python script * Fixed rest of the files * Fixed ace-team
33 lines
638 B
Plaintext
33 lines
638 B
Plaintext
/*
|
|
* Author: Glowbal
|
|
* setVariable value
|
|
*
|
|
* Arguments:
|
|
* 0: Unit <OBJECT>
|
|
* 1: variableName <STRING>
|
|
* 2: value <ANY>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [bob, "var", 5] call ace_common_fnc_setDefinedVariable
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit", "_variable", "_value", "_global"];
|
|
|
|
if (isNil "_global") then {
|
|
private _definedVariable = [_variable] call FUNC(getDefinedVariableInfo);
|
|
|
|
_definedVariable params ["", "", ["_global", false]];
|
|
};
|
|
|
|
if (!isNil "_value") exitWith {
|
|
_unit setVariable [_variable, _value, _global];
|
|
};
|
|
|
|
_unit setVariable [_variable, nil, _global];
|