/* * Author: Glowbal * setVariable value * * Arguments: * 0: Unit * 1: variableName * 2: value * * Return Value: * None * * 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];