Jump to content
Sign in to follow this  
spad

spawn flying units

Recommended Posts

Is it possible to spawn flying units directly in the air. I need to have an air support at a specific time in a mission (maybe 20mm after the begining of the mission) the only way i have found is to set several planes in holding position in a part of the map but they don't want to stay where they even with a trigger wich call them by radio are or crash. I 'd like to have them appearing when using the radio, is it possible ?

Share this post


Link to post
Share on other sites

They could be sitting on the ground without fuel to keep them from trying to take off. Then an action would activate a script fueling, and setpos 'ing them into place. Once they appear in the air they should start flying automatically.

 

I'm not a great coder, so how to do that efficiently, and get them to the right location I'll have to leave to someone else.

Share this post


Link to post
Share on other sites

interresting, but that seems  complicated to do.

Share this post


Link to post
Share on other sites

Some simple scripting or just using the commands in triggers does the trick. If you keep the plane on the ground with 0 fuel and assign it the mission marker, you can activate it using something like that:

unitName setPos [(getPos unitName select 0),(getPos unitName select 1),100]; unitName setFuel 1; unitName setVelocity [x,x,x]

The velocity should be something around 400 or so for A10s, it's probably best if it's facing the direction of the plane. Without that, they usually just fall to the ground, because they can't start up their engines fast enough.

  • Like 1

Share this post


Link to post
Share on other sites

thanks lenyoga i will try :)

Share this post


Link to post
Share on other sites

thanks lenyoga, your small script is just easy and very smart, my close air support works fine now :)

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×