2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-03-24 04:18:00 +00:00
|
|
|
* Author: esteldunedain
|
2015-01-12 04:02:33 +00:00
|
|
|
* Sets the value of an ACE_Parameter and makes it public.
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2015-09-19 18:55:35 +00:00
|
|
|
* 0: Parameter name <STRING>
|
2017-06-08 13:31:51 +00:00
|
|
|
* 1: Value <BOOL, NUMBER>
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
2015-09-19 18:55:35 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* ["Name", 5] call ace_common_fnc_setParameter
|
|
|
|
*
|
2015-09-19 18:55:35 +00:00
|
|
|
* Public: Yes
|
|
|
|
*
|
2015-09-20 13:52:40 +00:00
|
|
|
* Deprecated
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
|
|
|
|
2015-09-19 18:55:35 +00:00
|
|
|
params ["_name", "_value"];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
// Hack to keep backward compatibility for the moment
|
2015-09-19 18:55:35 +00:00
|
|
|
if (typeName (missionNamespace getVariable _name) == "BOOL") then {
|
2015-11-20 17:40:31 +00:00
|
|
|
if (_value isEqualType 0) then {
|
2015-05-14 18:06:06 +00:00
|
|
|
_value = _value > 0;
|
|
|
|
};
|
2015-01-11 16:42:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
missionNamespace setVariable [_name, _value];
|
|
|
|
publicVariable _name;
|