2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: CAA-Picard
|
|
|
|
*
|
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:
|
|
|
|
* 0: Parameter name (string)
|
|
|
|
* 1: Value
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*/
|
2015-01-13 19:56:02 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
private ["_name", "_value"];
|
|
|
|
|
|
|
|
_name = _this select 0;
|
|
|
|
_value = _this select 1;
|
|
|
|
|
|
|
|
// Hack to keep backward compatibility for the moment
|
|
|
|
if ((typeName (missionNamespace getVariable _name)) == "BOOL") then {
|
|
|
|
if ((typeName _value) == "SCALAR") then {
|
|
|
|
_value = _value > 0;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
missionNamespace setVariable [_name, _value];
|
|
|
|
publicVariable _name;
|