wizard1073
New member
- Joined
- Mar 19, 2011
- Messages
- 5
- Reaction score
- 0
- Points
- 0
I created one LUA-based MFD, vessel persistent, fully functional with calls to setup, update, prestep, and the button-handling routines. By itself (listed alone in ScriptMFD.cfg) it runs just as it should.
I run into a problem when I create a second, similar MFD in LUA. The first Script-based MFD selected from Orbiter's in-flight list of MFDs opens first, and afterwards that same MFD opens when any other Script-based MFD is opened. Example: First AttitudeRCS, then Higgs Field Controller--except AttitudeRCS opens both times. Next test: First Higgs Field Controller, then AttitudeRCS--except HFC opens both times.
From the help file:
It seems contradictory that one can have multiple LUA-based MFDs under this specification if they share the same interpreter, yet need different setup, update, etc. functions. Even the test MFDs included in the distribution are vulnerable.
What am I missing?
I run into a problem when I create a second, similar MFD in LUA. The first Script-based MFD selected from Orbiter's in-flight list of MFDs opens first, and afterwards that same MFD opens when any other Script-based MFD is opened. Example: First AttitudeRCS, then Higgs Field Controller--except AttitudeRCS opens both times. Next test: First Higgs Field Controller, then AttitudeRCS--except HFC opens both times.
From the help file:
By contrast, if Persist = vessel, the interpreter is attached to the vessel the MFD is running in. It doesn't get deleted when the MFD is deleted. All MFDs running this mode share the same interpreter.
(Emphasis is mine)It seems contradictory that one can have multiple LUA-based MFDs under this specification if they share the same interpreter, yet need different setup, update, etc. functions. Even the test MFDs included in the distribution are vulnerable.
What am I missing?
Last edited: