mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added events to carry object.
This commit is contained in:
parent
9a0b73bf3a
commit
a92430b701
@ -43,3 +43,19 @@ class Extended_Respawn_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Killed_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(dropObject) {
|
||||
Killed = QUOTE(if (local (_this select 0)) then {[ARR_2(_this select 0, ObjNull)] call FUNC(carryObj)};);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_GetIn_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(dropObject) {
|
||||
GetIn = QUOTE(if (local (_this select 0)) then {[ARR_2(_this select 0, ObjNull)] call FUNC(carryObj)};);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -36,12 +36,9 @@ if (((typeName _to) == "OBJECT" && (isNull ([_unit] call FUNC(getCarriedObj))))
|
||||
_to attachTo [_unit,(_this select 2)];
|
||||
[format["fnc_carryObj - UNIT: %1 TO %2 - attachTo offset: %3",_unit,_to,(_this select 2)],2] call FUNC(debug);
|
||||
};
|
||||
} else {
|
||||
[format["fnc_carryObj - UNIT: %1 TO %2 - Script expects external handling of attachTo Command. Exiting",_unit,_to],2] call FUNC(debug);
|
||||
};
|
||||
|
||||
[[_unit, _to, _fallDown],"carryObject"] call FUNC(raiseScriptedEvent_f);
|
||||
|
||||
// ["carryObject", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent);
|
||||
["carryObject", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent;
|
||||
};
|
||||
} else {
|
||||
if (!isNull ([_unit] call FUNC(getCarriedObj))) then {
|
||||
@ -59,13 +56,14 @@ if (((typeName _to) == "OBJECT" && (isNull ([_unit] call FUNC(getCarriedObj))))
|
||||
_positionUnit set [2, ((getPosASL _unit) select 2) + 0.1];
|
||||
_carriedObj setPosASL _positionUnit;
|
||||
};
|
||||
[[_unit, _carriedObj],"carryObjectDropped"] call FUNC(raiseScriptedEvent_f);
|
||||
|
||||
[[_unit] call FUNC(getCarriedObj), objNull] call FUNC(setCarriedBy);
|
||||
_unit setvariable [QGVAR(carriedObj),_to,true];
|
||||
_return = true;
|
||||
|
||||
[[_unit, _to, _fallDown],"carryObject"] call FUNC(raiseScriptedEvent_f);
|
||||
// ["carryObjectDropped", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent);
|
||||
["carryObjectDropped", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent;
|
||||
|
||||
};
|
||||
};
|
||||
} else {
|
||||
|
@ -9,8 +9,8 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define DEFAULT_LOGGING_LEVEL -1
|
||||
#define DEFAULT_TEXT_DISPLAY -1
|
||||
#define DEFAULT_LOGGING_LEVEL 4
|
||||
#define DEFAULT_TEXT_DISPLAY 4
|
||||
|
||||
private ["_msg", "_level", "_prefix", "_defaultLoglevel","_defaultLogDisplayLevel", "_message", "_from"];
|
||||
_msg = _this select 0;
|
||||
|
Loading…
Reference in New Issue
Block a user