Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Trying to convert toggle event to on/off

Featured Replies

I'm wanting to create C172 Fuel Valve OPEN and C172 Fuel Valve CLOSE buttons.  I've been at this for several hours and am close but just can't get it working.  Here's what I have:

C172 Fuel Valve CLOSE --

(A:GENERAL·ENG·FUEL·VALVE:1,·Bool)·if{·(>K:TOGGLE_FUEL_VALVE_ENG1)·}

C172 Fuel Valve OPEN --

(A:GENERAL·ENG·FUEL·VALVE:1,·Bool)·!·if{·(>K:TOGGLE_FUEL_VALVE_ENG1)·}

 

I'm watching GENERAL ENG FUEL VALVE variable change from 0 to 1 in the Observe Variables in Simulator tool so I know I'm referencing the right variable.   TOGGLE_FUEL_VALVE_ENG1 works fine too if I simply use it as a toggle.   These scripts sort of work for several switch iterations but then get out of sync and/or stop working altogether.  Weird!  Some help getting this figured out would sure be appreciated.

-mark

X-Plane 12, Ryzen 7 9800X3D, Nvidia RTX 5090, Asus ROG Strix X870E-E mb, 96GB DDR5 (6800MHz), 4TB SSD, Triple Monitor 1440p, Windows 11, FliteSim CLS-120 Yoke, Honeycomb Bravo, TurtleBeach VelocityOne Pedals, RealSimGear G1000 Suite, PropWash Radio Stack, Tobii Tracker 5, Asus Xonar U5 sound card.

  • Author

Well, this is downright scary!  I powered off to eat dinner and when I powered back on,  the scripts are working fine!   I guess something got screwed up inside the sim and rebooting cleared it up.   All is not lost though,  I got rather intimate with Watch AAO script processing and Watch simulator variables/events.   I'm much more equipped now to debug this crazy RPN stuff (always hated those HP calicaulators the geeks used in engineering school).

X-Plane 12, Ryzen 7 9800X3D, Nvidia RTX 5090, Asus ROG Strix X870E-E mb, 96GB DDR5 (6800MHz), 4TB SSD, Triple Monitor 1440p, Windows 11, FliteSim CLS-120 Yoke, Honeycomb Bravo, TurtleBeach VelocityOne Pedals, RealSimGear G1000 Suite, PropWash Radio Stack, Tobii Tracker 5, Asus Xonar U5 sound card.

  • Commercial Member

I can't check it right now, but in all likelyhood these are MSFS Input Events or BVars.

- IEs can be seen in the normal Event list in the group "MSFS InputEvents". They are loaded for each individual aircraft when you are sitting in the cockpit - if the developer saw fit to implement them

- BVars and HVars are related to the IEs (=when there is a B/H Var there is a good chance that you will find an IE with the same name)

The general procedure for non-IE stuff is to activate the MSFS developer mode, "Tools->Behaviors". Then click back into the sim window, hover the mouse over the button/lever you are interested in, and press Ctrl & G. In most cases this will bring up the behavior code of that control. In there you will find the "inteaction/LeftSingle/Wheel..." components which describe what happens when you use the mouse - and that is (in general) what you want to replicate in AAO.

Edited by Lorby_SI

LORBY-SI

  • Author

Thanks Oliver!

I hope to at some point wrap my X-Plane-FlyWithLua brain around what you've said.  

Actually,  dealing with these panel lights,  I have indeed run into what you're talking about with these IEs.  I've gotten lucky I guess so far as I have gotten most of them to work but there is still a giant cloud of mystery hanging over me as I do this stuff.   I'm getting there slowly.   Thanks so much for a great tool.   Love that Event Viewer.  I was using SimVars out of the VisualStudio SDK but this is much more convenient.  The more I use AAO, the less I'm relying on outside tools.

-mark

X-Plane 12, Ryzen 7 9800X3D, Nvidia RTX 5090, Asus ROG Strix X870E-E mb, 96GB DDR5 (6800MHz), 4TB SSD, Triple Monitor 1440p, Windows 11, FliteSim CLS-120 Yoke, Honeycomb Bravo, TurtleBeach VelocityOne Pedals, RealSimGear G1000 Suite, PropWash Radio Stack, Tobii Tracker 5, Asus Xonar U5 sound card.

  • Author

Wow!  Behavior mode is the ticket!!  Shows me the exact code I was struggling to write.   Worked perfectly!   Thank you Oliver.  I was ready to give up.  Maybe there's hope for me yet!

X-Plane 12, Ryzen 7 9800X3D, Nvidia RTX 5090, Asus ROG Strix X870E-E mb, 96GB DDR5 (6800MHz), 4TB SSD, Triple Monitor 1440p, Windows 11, FliteSim CLS-120 Yoke, Honeycomb Bravo, TurtleBeach VelocityOne Pedals, RealSimGear G1000 Suite, PropWash Radio Stack, Tobii Tracker 5, Asus Xonar U5 sound card.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.