2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
Name: AGM_SwitchUnits_fnc_module
|
|
|
|
|
|
|
|
Author(s):
|
|
|
|
bux578
|
|
|
|
|
|
|
|
Description:
|
|
|
|
Initializes the SwitchUnits module
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
0: OBJECT - module logic
|
|
|
|
1: ARRAY<OBJECT> - list of affected units
|
|
|
|
2: BOOLEAN - isActivated
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
BOOLEAN (Good practice to include one)
|
|
|
|
*/
|
|
|
|
|
2015-01-12 14:47:22 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
if !(isServer) exitWith {};
|
|
|
|
|
|
|
|
_logic = _this select 0;
|
|
|
|
_activated = _this select 2;
|
|
|
|
|
|
|
|
if !(_activated) exitWith {};
|
|
|
|
|
2015-01-12 14:47:22 +00:00
|
|
|
GVAR(Module) = true;
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-13 05:14:27 +00:00
|
|
|
[QGVAR(EnableSwitchUnits), true] call EFUNC(common,setParameter);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-13 05:14:27 +00:00
|
|
|
[_logic, QGVAR(SwitchToWest), "SwitchToWest"] call EFUNC(common,readBooleanParameterFromModule);
|
|
|
|
[_logic, QGVAR(SwitchToEast), "SwitchToEast"] call EFUNC(common,readBooleanParameterFromModule);
|
|
|
|
[_logic, QGVAR(SwitchToIndependent), "SwitchToIndependent"] call EFUNC(common,readBooleanParameterFromModule);
|
|
|
|
[_logic, QGVAR(SwitchToCivilian), "SwitchToCivilian"] call EFUNC(common,readBooleanParameterFromModule);
|
2015-01-12 14:47:22 +00:00
|
|
|
|
2015-01-13 05:14:27 +00:00
|
|
|
[_logic, QGVAR(EnableSafeZone), "EnableSafeZone"] call EFUNC(common,readBooleanParameterFromModule);
|
|
|
|
[_logic, QGVAR(SafeZoneRadius), "SafeZoneRadius"] call EFUNC(common,readNumericParameterFromModule);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-12 14:47:22 +00:00
|
|
|
diag_log text "[ACE]: SwitchUnits Module Initialized.";
|