Jump to content
Sign in to follow this  
Bungdup

setpos not placing aircraft at correct altitude?

Recommended Posts

Running into some trouble with the mission editor. I'm trying to create a heliborne and amphibious assault on an island, but the helicopters and fighters are all starting out underwater. I've done some searching, and it would seem that the way to get the aircraft to spawn at a particular height is to enter the following into (I'm assuming) the unit's 'initialization' field:

"this setposASL [getpos this select 0,getpos this select 150, height]" (sans quotations, of course), where '150' is the unit's desired height in metres.

This doesn't seem to work however. Every time I try to preview it, all the aircraft are starting at the bottom of the ocean. Am I missing something? Every thread I've looked through has quoted exactly what I've typed above, which is what I've been putting into the initialization field.

Share this post


Link to post
Share on other sites

I just tried with OA 1.60 94209, and it works as it should.

Did you set those helis to be "FLYING"? if you do not set their "special" field to "Flying" they will start on the ground (which is on the bottom of the ocean if you place them over there).

Share this post


Link to post
Share on other sites

Also setting the height would be

this setposASL [getpos this select 0,getpos this select 1, 150] ; 

or

height=150;
this setposASL [getpos this select 0,getpos this select 1, height];

It's x,y,z with z being the height, they will also need

this flyinheight 150;

or they will return to default height.

Share this post


Link to post
Share on other sites

Thanks guys! That did the trick! It's exactly what was missing from the referances

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  

×