ACE3/addons/common/functions/fnc_setParameter.sqf

26 lines
517 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:
* 0: Parameter name (string)
* 1: Value
*
* Return Value:
* None
*/
2015-01-13 19:56:02 +00:00
#include "script_component.hpp"
2015-05-14 18:06:06 +00:00
PARAMS_2(_name,_value);
// Hack to keep backward compatibility for the moment
if ((typeName (missionNamespace getVariable _name)) == "BOOL") then {
2015-05-14 18:06:06 +00:00
if ((typeName _value) == "SCALAR") then {
_value = _value > 0;
};
};
missionNamespace setVariable [_name, _value];
publicVariable _name;