bolbies 13 Posted August 17, 2014 Title says it all. I have looked through every thread that I could find but still can't seem to get it to work. So far I can make the C130J completely land, pick a place to "drop" units and even get it to fly to that position, but it won't actually eject any of us (myself or my AI units). After it's supposed to release us it's supposed to go back and land at its starting airport but instead it just keeps looping around to fly back to the marker position. This is what I have: _pos = getpos player; TakeOff = false; _speedThen = 0; _plane = createVehicle ["c130j", [_pos select 0, (_pos select 1), 3000],[], 0, "FLY"]; _planegroup = createGroup west; _pilot = _planegroup createUnit ["B_Pilot_F", [5,5,5], [], 0, "NONE"]; _copilot = _planegroup createUnit ["B_Pilot_F", [5,5,5], [], 0, "NONE"]; _plane addAction ["<t color='#00b7ff'>Pick where you want to drop</t>", "support\mapclickhalo.sqf", "", 0, true, true, "", "vehicle _this == _target"]; _pilot setcaptive true; _pilot allowfleeing 0; _pilot disableAI "Target"; _pilot moveindriver _plane; _copilot moveInTurret [_plane, [0]]; _plane land "LAND"; waitUntil {(speed _plane) < 70}; _plane engineOn false; _plane setFuel 0; _inVehCheck = true; while {_inVehCheck} do { waitUntil {sleep 0.1;TakeOff or (getdammage _plane > 0.7 or !alive _pilot)}; if (getdammage _plane > 0.7 or !alive _pilot) exitWith {}; if (vehicle player != _plane) then {TakeOff = false; hint "You must be in the plane"; _plane addAction ["<t color='#00b7ff'>Give a LZ to the pilot</t>", "support\mapclickhalo.sqf", "", 0, true, true, "", "vehicle _this == _target"];} else {_inVehCheck = false;}; }; _pos2 = getpos _plane; _plane setFuel 1; _wp = _planegroup addWaypoint [clickedPos,0]; _wp setWaypointType "MOVE"; [_planegroup, 1] setWaypointCombatMode "BLUE"; _plane flyInHeight 1000; sleep 15; waitUntil {(speed _plane) > 50}; nul = [_plane] execVM "support\liftoff.sqf"; waitUntil {_plane distance clickedPos < 100}; {_x assignasCargo _plane; _x moveinCargo _plane} foreach (crew _plane); {unassignVehicle (_x);(_x) action ["EJECT", vehicle _x]; sleep 0.2} foreach (assignedCargo _plane); waitUntil {{_x in _plane} count (assignedCargo _plane) == 0}; sleep 3; deleteMarker _marker; _wp = _planegroup addWaypoint [_pos2,0]; _wp setWaypointType "MOVE"; [_planegroup, 1] setWaypointCombatMode "BLUE"; _plane flyInHeight 1500; waituntil {_plane distance _pos2 < 100}; _plane land "LAND"; waitUntil {(speed _plane) < 70}; _plane engineOn false; _plane setFuel 0; The liftoff script is what some of you may know as the rocket launch script. Specifically this one: http://www.armaholic.com/page.php?id=26209 The mapclickhalo script literally just creates a marker on the map, makes "clickedPos" = position of the marker, and the TakeOff variable true. The error logs tell me nothing other than something is wrong with deleting the marker but that's a fix for later. Anybody got any ideas? Thank you! Share this post Link to post Share on other sites
Beerkan 71 Posted August 17, 2014 Try :- {unassignVehicle _x;_x action ["EJECT", _plane];sleep 0.2} foreach assignedCargo _plane; You might also want to put this in there as well. _x disableCollisionWith _plane; Share this post Link to post Share on other sites
bolbies 13 Posted August 17, 2014 Try :- {unassignVehicle _x;_x action ["EJECT", _plane];sleep 0.2} foreach assignedCargo _plane; You might also want to put this in there as well. _x disableCollisionWith _plane; Unfortunately that does not work either. Could it possibly be "waitUntil {_plane distance clickedPos < 100};"? It's the only way I can think of to get the plane to release all the units at the correct time. Is there an easier way? Share this post Link to post Share on other sites
bolbies 13 Posted August 18, 2014 Hey I figured it out! This is the entire new script for jumping out of the plane. _pos = getpos player; TakeOff = false; _speedThen = 0; _radius = 5000; _plane = createVehicle ["c130j", [_pos select 0, (_pos select 1), 3000],[], 0, "FLY"]; _planegroup = createGroup west; _pilot = _planegroup createUnit ["B_Pilot_F", [5,5,5], [], 0, "NONE"]; _copilot = _planegroup createUnit ["B_Pilot_F", [5,5,5], [], 0, "NONE"]; _plane addAction ["<t color='#00b7ff'>Pick where you want to drop</t>", "support\mapclickhalo.sqf", "", 0, true, true, "", "vehicle _this == _target"]; _pilot setcaptive true; _pilot allowfleeing 0; _pilot disableAI "Target"; _pilot moveindriver _plane; _copilot moveInTurret [_plane, [0]]; _plane land "LAND"; waitUntil {(speed _plane) < 70}; _plane engineOn false; _plane setFuel 0; _inVehCheck = true; while {_inVehCheck} do { waitUntil {sleep 0.1;TakeOff or (getdammage _plane > 0.7 or !alive _pilot)}; if (getdammage _plane > 0.7 or !alive _pilot) exitWith {}; if (vehicle player != _plane) then {TakeOff = false; hint "You must be in the plane"; _plane addAction ["<t color='#00b7ff'>Give a LZ to the pilot</t>", "support\mapclickhalo.sqf", "", 0, true, true, "", "vehicle _this == _target"];} else {_inVehCheck = false;}; }; _pos2 = getpos _plane; _plane setFuel 1; _wp = _planegroup addWaypoint [clickedPos,0]; _wp setWaypointType "MOVE"; [_planegroup, 1] setWaypointCombatMode "BLUE"; _plane flyInHeight 1000; _test = "Land_HelipadEmpty_F" createVehicle [(clickedPos select 0), (clickedPos select 1), (clickedPos select 2)+1000]; sleep 15; titleText ["En route to jump zone...", "BLACK OUT", 3]; sleep 3.5; _plane setpos [(getpos _test select 0)+(random _radius), (getpos _test select 1)+(random _radius), (getpos _test select 2)+2000]; _plane setVelocity [500, 0, 0]; sleep 3; titleText ["En route to jump zone...", "BLACK IN", 4]; waitUntil {([getPos _plane select 0, getPos _plane select 1, 0] distance getPos _test) < 150}; {_x assignasCargo _plane; _x moveinCargo _plane} foreach (units group player); {unassignVehicle _x;_x action ["EJECT", vehicle _plane]; sleep 0.2} foreach assignedCargo _plane; _x disableCollisionWith _plane; waitUntil {{_x in _plane} count (assignedCargo _plane) == 0}; sleep 3; deleteMarker _marker; _wp = _planegroup addWaypoint [_pos2,0]; _wp setWaypointType "MOVE"; [_planegroup, 1] setWaypointCombatMode "BLUE"; _plane flyInHeight 1500; waituntil {_plane distance _pos2 < 100}; _plane land "LAND"; _plane addAction ["<t color='#00b7ff'>Pick where you want to drop</t>", "support\mapclickhalo.sqf", "", 0, true, true, "", "vehicle _this == _target"]; Thank you for all the help Beerkan! Share this post Link to post Share on other sites
bolbies 13 Posted August 18, 2014 Actually I have another question, how can I make it so that I can use it however many times I want until the plane gets shot down? As of right now it's only a one time use. Share this post Link to post Share on other sites
Von Quest 1163 Posted August 19, 2014 Not sure if you are interested or not; but I have a HALO mod you may like. Click my Sig to giver a try. Share this post Link to post Share on other sites