thetrooper 10 Posted May 4, 2014 (edited) Wonder if someone can help me please. I'm trying to spawn a sigle jet (To-199). The following screen isn't working. enGrp = createGroup east; en1 = enGrp createUnit ["O_Plane_CAS_02_F",markerPos "p1",[],0,"CAN_COLLIDE"]; en1 setUnitRank "CAPTAIN"; It looks fine to me me though :confused: I've tested this and for some reason the jet appears and disappears very quickly. Does Anyone know why, is this a bug? Edited May 4, 2014 by TheTrooper Share this post Link to post Share on other sites
IT07 10 Posted May 4, 2014 Why do you want to spawn in a jet if you can get the same thing just by using the Editor? Share this post Link to post Share on other sites
das attorney 858 Posted May 4, 2014 Hi theTrooper, Try using bis_fnc_spawnvehicle [markerPos "p1", 0, "O_Plane_CAS_02_F", EAST] call bis_fnc_spawnVehicle; Share this post Link to post Share on other sites
f2k sel 164 Posted May 4, 2014 createUnit it should be createvehicle but Das Attorneys answer is better as it comes with a crew I think Share this post Link to post Share on other sites
imutep 0 Posted May 4, 2014 You have to create a vehicle, not a unit. example: jet1 = createVehicle ["O_Plane_CAS_02_F", position player, [], 0, "FLY"]; enGrp = createGroup east; jpilot1 = enGrp createUnit ["O_Pilot_F", markerPos "p1", [], 0, "FLY"]; jpilot1 assignAsDriver jet1; jpilot1 moveInDriver jet1; Share this post Link to post Share on other sites
das attorney 858 Posted May 4, 2014 I totally forgot, you get a return from the function: _return = [markerPos "p1", 0, "O_Plane_CAS_02_F", EAST] call bis_fnc_spawnVehicle; _return select 0 = vehicle _return select 1 = crew _return select 2 = group Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted May 4, 2014 Why do you want to spawn in a jet if you can get the same thing just by using the Editor? You don't deserve your signature. :p Share this post Link to post Share on other sites
IT07 10 Posted May 4, 2014 So a scripting enthousiast should always do it the hard way instead of saving time by doing it in the editor, taking 3 seconds? Share this post Link to post Share on other sites
thetrooper 10 Posted May 4, 2014 Hi IT07. The main reason I need to spawn is because I don't want the opfor jet to be visible for a while. I tried a eneblesimulation, hide object approach but still appears on radar etc. Also to spawn cuts back on lag if there's a lot of units about. By the time a unit spawns then lots are dead by that time so its no problem. Otherwise, there's no problem creating it in editor but sometimes a spawn is required so accidents don't occur :) Hope that makes sense. Share this post Link to post Share on other sites
IT07 10 Posted May 4, 2014 Ah I see. Ok then I didn't say anything :P Share this post Link to post Share on other sites
thetrooper 10 Posted May 4, 2014 That's cool. It's all learning :) Share this post Link to post Share on other sites