ACE3/addons/switchunits/functions/fnc_addMapFunction.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

25 lines
521 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);
};
}];