Support for Zeus Spawned Objects

This commit is contained in:
mrpvtdagger 2021-03-04 22:05:38 -04:00
parent 1e2cb23096
commit 6753810cfa

View File

@ -57,6 +57,25 @@ if (isClass(configFile >> "CfgWeapons" >> "ACE_Fortify")) then
}] call CBA_fnc_addEventHandler;
};
/* Support for Objects placed by Zues */
{
_x addEventHandler ["CuratorObjectPlaced", {
params ["_curator", "_entity"];
if ((_entity isKindOf "Tank")||(_entity isKindOf "Air")||(_entity isKindOf "Logic")||(_entity isKindOf "Man")||(_entity isKindOf "House")) then {
hint "Object is blacklisted";
} else {
_action = [
"SlingLoad", // Action Name
"Sling Load", // Name Of action Shown In menu
"", // Icon
{[_target] execVM "MPD_SlingLoad\sling.sqf";}, // Statment
{(nearestObject [_target, "Helicopter"]) distance _target < 10}, // Condition
{}, //
[],
[0,0,0], 100] call ace_interact_menu_fnc_createAction;
[_entity, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToObject;
hint format["Object spawned: %1", _entity];
};
}];
} forEach allCurators;