Jump to content
Sign in to follow this  
charlie87

Set aircraft altitude???

Recommended Posts

hi all!

how can I set the altitude of an aircraft (C-130 for examples) to 1000m at the begin of the mission?

Share this post


Link to post
Share on other sites

flyInHeight tells the AI how high they should fly, but it does NOT put the plane on that height.

init:

this setPos [getPos this select 0,getPos this select 1,1000]

Share this post


Link to post
Share on other sites

Could you put this in simpler terms? I'm confused about the variables in the 'base' script that you put.

Could you type out the exact line of script I need to make a C130 fly at 800 ft?

Thanks,

Leving.

Share this post


Link to post
Share on other sites

name_of_plane flyInHeight 800;

Though, what that actually does is instruct the plane to climb to 800.

To START a plane at 800 you need to do what Tajin said, Set it's Position using setPos to 800.

A position consists of an X value, Y value and Z value. X is basically forward/backward, Y is left/right and Z is up/down. The position values are kept in an array of three numbers, like [0,0,0] or [200,10,800]. To simply move the plane upwards 800 you keep the first two values and change the third to 800. The "getPos this select 0" and "getPos this select 1" are just commands to figure out the first two numbers for us.

  • 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  

×