Jump to content
Sign in to follow this  
dezkit

How do I get bank angle and dive angle with scripting?

Recommended Posts

I want to get the dive angle and bank angle of the aircraft that I am in. How do I do this?

Share this post


Link to post
Share on other sites

It worked! you're awesome!

Also, i'm trying to do so that once the altitude of the player reaches a certain height, it executes something, but since the script isn't being reloaded fast enough, it sometimes skips it and doesn't execute.

is there anything i can do or am i limited by the engine? :) thanks again

Share this post


Link to post
Share on other sites

waitUntil {(getposATL player select 2) >= x};

Where X is the desired height in number form. This checks every second and also stops the script until the condition is true.

Share this post


Link to post
Share on other sites

for the script i'm using I can't use waitUntil because the script has to be running at all times. this is what i'm doing:

if the object has a negative vertical speed then do the following

if the rounded elevation is equal to 300 then execute something

if the rounded elevation is equal to 200 then execute something

if the rounded elevation is equal to 100 then execute something

etc.

the problem with this is that it the elevation changes so fast that it cant find it fast enough to execute it.

i have done > and < so like between 290 and 310 and it works decently but not perfect. it still skips sometimes.

Share this post


Link to post
Share on other sites

solved. i had to do a lot of changes involving seperating files

Edited by dezkit

Share this post


Link to post
Share on other sites

You can spawn it seperately.

[] spawn {
waitUntil {(getposATL player select 2) >= 10};
// Code
};

The spawn will run at the same time as the main script, just the main script will not be affected by it as it's a seperate entity.

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  

×