Jump to content
The simFlight Network Forums

Recommended Posts

Posted

I'm trying to determine when an aircraft is started or restarted (to reset Lua logic). Your offset status has a "Ready to Fly" flag (offset 0x3364). Zero if ready to fly. Also, the internet indicates that flag 16 - Ingame-RTC, is set when an aircraft is ready to fly. In your experience, which is more useful? Or is there another method to determine when an aircraft flight has started?

Thanks

Posted
48 minutes ago, DaveSCUSA said:

I'm trying to determine when an aircraft is started or restarted

Can you clarify what you mean by this?

49 minutes ago, DaveSCUSA said:

Also, the internet indicates that flag 16 - Ingame-RTC

What does this mean? Do you have a reference?

I'm not exactly sure what you are after, but maybe try logging the camera state offset, 0x026D. This will go through various values and then back to 2 (cockpit) (or maybe 3 - external/chase). If you log this offset, you can probably determine the value changes you need.

Posted
6 minutes ago, John Dowson said:

What does this mean? Do you have a reference?

I am trying to find out any time a new flight starts in MSFS.

A flight stars from the main menu after choosing the aircraft and airports and select Ready to Fly. Or one can restart a flight using the Esc key and selecting the Restart button. Thus starting a flight.

I want to know when this occurs so a Lua plugin I created can reset its start logic.

Thanks

 

Posted

If you use lua auto-start, the lua is always started when the flight starts, and killed when the flight finishes. For restart, check the camera state, as advised. It will go through various values then back to 2 when the flight is ready. You should log the value of this to see what values it goes to on restart before back to 2.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.