mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
25 lines
518 B
Plaintext
25 lines
518 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: bux578
|
|
* Adds a mapClick Eventhandler
|
|
*
|
|
* Arguments:
|
|
* 0: unit <OBJECT>
|
|
* 1: sides <ARRAY<OBJECT>>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [_unit, _sides] call ace_switchunits_fnc_addMapFunction
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
addMissionEventHandler ["MapSingleClick", {
|
|
params ["", "_pos"];
|
|
if (alive ACE_player && {GVAR(OriginalUnit) getVariable ["ACE_CanSwitchUnits", false]}) then {
|
|
[GVAR(switchableSides), _pos] call FUNC(handleMapClick);
|
|
};
|
|
}];
|