infiltrator_2k 29 Posted July 17, 2014 I can't seem to script/spawn the C-17 flying. How do get script this big bird to spawn flying? When spawning stock air they spawn airborne. Also what marker/waypoint commands do I use to the its crew to take off from the runway? Cheers Ian Share this post Link to post Share on other sites
cz_bpk 1 Posted July 17, 2014 Hi Infiltrator_2K I do it like this: _vehCreate = [[getMarkerPos _mrkXx select 0, getMarkerPos _mrkXx select 1,1000], 180, "globemaster_c17", West] call Bis_fnc_spawnvehicle; It spawns the plane in 1000m height, so the crew has time to get the plane flying, vomit express the first 400m drop ;-), but it works. If i spawn the plane lower it will crash. Hope it helps. Share this post Link to post Share on other sites
lappihuan 178 Posted July 17, 2014 _veh = createVehicle ["globemaster_c17", position player, [], 0, "FLY"]; createVehicle_array is what you are looking for. Share this post Link to post Share on other sites
cz_bpk 1 Posted July 17, 2014 Lappihuan you are right. The function works with stock air. But if you use the function on the "globemaster_c17" it will crash - somehow it has no crew. Share this post Link to post Share on other sites
infiltrator_2k 29 Posted July 17, 2014 (edited) Lappihuan you are right.The function works with stock air. But if you use the function on the "globemaster_c17" it will crash - somehow it has no crew. By using the "creategroup" you create the crew's variable and add it to the array of the spawnVehicle function. I'm a scripting novice but I believe that's how you add the crew to C-17. _globemastercrew = []; _globemasterframe = []; if (isServer) then { _globemastercrew = creategroup EAST; _globemasterframe = [getMarkerPos "c17", 240, "globemaster_c17_IAF", _globemastercrew] call BIS_fnc_spawnVehicle; _wp2 = _globemastercrew addWaypoint [(getmarkerpos "c17_1"),0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointSpeed "NORMAL"; _wp2 setWaypointBehaviour "NORMAL"; sleep 0.50; }; Edited July 17, 2014 by Infiltrator_2K Share this post Link to post Share on other sites
cz_bpk 1 Posted July 17, 2014 If you use the example i posted first, the C-17 get spawned with crew, but with engines off, wheels down etc. The plane starts with taking a dive to about 300m and then flies normal. :-) Your example might be a better solution, will try it out. Share this post Link to post Share on other sites
SilentSpike 84 Posted July 17, 2014 This is how I do it, works fine: // Spawn a jet _spawned = createVehicle [_jet,_spawnPos,[],100,"FLY"]; _spawned engineOn true; // Spawn crew in jet createVehicleCrew _spawned; Share this post Link to post Share on other sites
cz_bpk 1 Posted July 17, 2014 Thank you SilentSpike This is a lot better than the example i gave. Now i have some sqf files to update :-) Share this post Link to post Share on other sites
infiltrator_2k 29 Posted July 18, 2014 This is how I do it, works fine: // Spawn a jet _spawned = createVehicle [_jet,_spawnPos,[],100,"FLY"]; _spawned engineOn true; // Spawn crew in jet createVehicleCrew _spawned; Just goes to show that there's more than one way to skin a cat. That code however is a lot more streamline and therefore for better. Thanks ;) Share this post Link to post Share on other sites
SilentSpike 84 Posted July 18, 2014 Happy to help, took me a while to figure out how I wanted to do it and how to get them to stop falling from the sky :p Share this post Link to post Share on other sites