Coding a button with cover

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Post Reply
Message
Author
Macsbig
Posts: 31
Joined: Sun Jan 01, 2023 9:02 pm

Coding a button with cover

#1 Post by Macsbig »

Hi all,

I am trying to code a button that has a clear cover over the top. I don't want to be able to press the button until I have "switched" the cover out of the way.

I have tried to do it with switch_add and various arguments, but I just seem to get various errors. I'm not sure how to have a "switch"(?) over a button. I was thinking maybe I need two switch_add statements, (so I can move the switch postion out of the way of the button when it's open), but only use one at a time using arguments; but I'm not having a lot of luck!

Maybe there is a much better way to do this - can anyone tell me how to do this properly?

Thanks for any help

Mark
Currently building my own home cockpit, general purpose one with 3 x 32” wrap around monitors and two lower monitors for instruments and PFD’s. Currently, putting together parts for the Toliss A321

User avatar
Crunchmeister
Posts: 222
Joined: Tue Aug 10, 2021 2:06 pm

Re: Coding a button with cover

#2 Post by Crunchmeister »

Take a look at the code in the CJ4 Trim and Engine Control Panel. I have covers for the engine run / stop buttons and they work exactly as you describe.
- Ryzen 5950x, 64GB 3600MHz RAM, RTX3070Ti

Simstrumentation Instrument dev
Free Air Manager instruments for MSFS available at http://www.simstrumentation.com

Macsbig
Posts: 31
Joined: Sun Jan 01, 2023 9:02 pm

Re: Coding a button with cover

#3 Post by Macsbig »

OK, thanks for the tip - I'll take a look!

Mark
Currently building my own home cockpit, general purpose one with 3 x 32” wrap around monitors and two lower monitors for instruments and PFD’s. Currently, putting together parts for the Toliss A321

Post Reply