diff --git a/ACE_MPD_SlingLoad/sling.sqf b/ACE_MPD_SlingLoad/sling.sqf index a5c226c..8b95b1f 100644 --- a/ACE_MPD_SlingLoad/sling.sqf +++ b/ACE_MPD_SlingLoad/sling.sqf @@ -47,19 +47,18 @@ [_cargo , _frontCorner, [0,0,-1]] ropeAttachTo (_Rope3); [_cargo , _frontCorner2, [0,0,-1]] ropeAttachTo (_Rope4); - _pilot addAction ["Release Cargo", { - private ["_heli","_cargoRopes"]; - if !(isNull objectParent player) then { - _heli = (vehicle player); + _nObject addAction ["Release Cargo", { + private ["_heli","_cargoRopes"]; + _heli = _this select 0; _cargoRopes = ropes _heli; { ropeDestroy _x; } forEach _cargoRopes; { - detach _x; - [_x] execVM "MPD_SlingLoad\sling.sqf"; + detach _x; + _pos = [_heli, 1, 5, 0, 0, 20, 0] call BIS_fnc_findSafePos; + _x setPos _pos; } forEach attachedObjects _heli; - }; - removeAllActions player; - }]; + removeAllActions _heli; + },nil,1.5,true,true,"","true",8,false,"",""]; }, {}, "Sling Loading..."] call ace_common_fnc_progressBar; //I was lazy... \ No newline at end of file