ACE3/addons/common/functions/fnc_setParameter.sqf

29 lines
549 B
Plaintext
Raw Normal View History

/*
2015-03-24 04:18:00 +00:00
* Author: esteldunedain
* Sets the value of an ACE_Parameter and makes it public.
*
* Arguments:
2015-09-19 18:55:35 +00:00
* 0: Parameter name <STRING>
* 1: Value
*
* Return Value:
* None
2015-09-19 18:55:35 +00:00
*
* Public: Yes
*
2015-09-20 13:52:40 +00:00
* Deprecated
*/
2015-01-13 19:56:02 +00:00
#include "script_component.hpp"
2015-09-19 18:55:35 +00:00
params ["_name", "_value"];
// Hack to keep backward compatibility for the moment
2015-09-19 18:55:35 +00:00
if (typeName (missionNamespace getVariable _name) == "BOOL") then {
if (typeName _value == "SCALAR") then {
2015-05-14 18:06:06 +00:00
_value = _value > 0;
};
};
missionNamespace setVariable [_name, _value];
publicVariable _name;