ACE3/addons/switchunits/functions/fnc_addMapFunction.sqf

29 lines
601 B
Plaintext
Raw Normal View History

/*
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:
* [_unit, _sides] call FUNC(addMapFunction)
*
* Public: No
*/
2015-01-12 14:47:22 +00:00
#include "script_component.hpp"
2015-04-17 20:45:00 +00:00
PARAMS_2(_unit,_sides);
["theMapClick", "onMapSingleClick", {
2015-04-17 20:45:00 +00:00
// IGNORE_PRIVATE_WARNING(_pos,_shift,_alt)
2015-01-27 08:01:57 +00:00
if (alive ACE_player && {GVAR(OriginalUnit) getVariable ["ACE_CanSwitchUnits", false]}) then {
[_this, _pos, _shift, _alt] call FUNC(handleMapClick);
};
}, [_unit, _sides]] call BIS_fnc_addStackedEventHandler;