Page 1 of 1

Start instrument from LUA code

Posted: Mon Aug 15, 2022 6:57 pm
by Shimokuta
I am quite busy in here on the forum lately... sorry for that :S

I was wondering if it is possible to start and stop an instrument from LUA code?
What i want to do do i to switch instruments across my sim.
For instance, switch the EICAS instrument with the MFD.
I can of course code the entire logic of the two instruments in one new one and then if a button is pressed disable one and make the other be activated.
But , since i have the instruments allready coded, i wondered if i could program the option available in AM when pressing the lightbulb to activate.

greetings
Roel

Re: Start instrument from LUA code

Posted: Mon Aug 15, 2022 7:03 pm
by Keith Baxter
Hi,

You can only do that using instrument_get() and or layer_add() in panel scripts.

https://siminnovations.com/wiki/index.p ... rument_get
https://siminnovations.com/wiki/index.p ... =Layer_add

Keith

Re: Start instrument from LUA code

Posted: Mon Aug 15, 2022 7:34 pm
by Shimokuta
Hey Keith

That seems to be what i was looking for!

Thanks!

grtz

Re: Start instrument from LUA code

Posted: Tue Aug 16, 2022 1:04 pm
by Shimokuta
I did need to search the forum and watch video of panel scripting which i did not know this was an option.
But discovered indeed great new possibilities for doing stuff like this!!