2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-02-02 22:28:27 +00:00
|
|
|
* Author: bux578
|
|
|
|
* Adds a mapClick Eventhandler
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: unit <OBJECT>
|
|
|
|
* 1: sides <ARRAY<OBJECT>>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2015-08-07 07:18:42 +00:00
|
|
|
* [_unit, _sides] call ace_switchunits_fnc_addMapFunction
|
2015-02-02 22:28:27 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-12 14:47:22 +00:00
|
|
|
|
2020-06-07 23:25:11 +00:00
|
|
|
addMissionEventHandler ["MapSingleClick", {
|
|
|
|
params ["", "_pos"];
|
2015-01-27 08:01:57 +00:00
|
|
|
if (alive ACE_player && {GVAR(OriginalUnit) getVariable ["ACE_CanSwitchUnits", false]}) then {
|
2020-06-07 23:25:11 +00:00
|
|
|
[GVAR(switchableSides), _pos] call FUNC(handleMapClick);
|
2015-01-27 08:01:57 +00:00
|
|
|
};
|
2020-06-07 23:25:11 +00:00
|
|
|
}];
|