ACE3/addons/common/functions/fnc_setParameter.sqf
Phyma ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00

32 lines
620 B
Plaintext

/*
* Author: esteldunedain
* Sets the value of an ACE_Parameter and makes it public.
*
* Arguments:
* 0: Parameter name <STRING>
* 1: Value <BOOL, NUMBER>
*
* Return Value:
* None
*
* Example:
* ["Name", 5] call ace_common_fnc_setParameter
*
* Public: Yes
*
* Deprecated
*/
#include "script_component.hpp"
params ["_name", "_value"];
// Hack to keep backward compatibility for the moment
if (typeName (missionNamespace getVariable _name) == "BOOL") then {
if (_value isEqualType 0) then {
_value = _value > 0;
};
};
missionNamespace setVariable [_name, _value];
publicVariable _name;