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.

Toggle between 2 values with one Button / Key

Featured Replies

Is it possible to have one key do a toggle without scripting? I'm working with the Captain Sim 757, and I want Shift+T to toggle the taxi light, one push does value 1 next push does value 0, etc.

The taxi light switch is a local variable called "L:O12_006_SW2".

I've already made a working script for this, but is there a more obvious way just using the already available settings? I just didn't want to have to repeat this numerous times.

 

Edited by atav757

  • Commercial Member

With an LVar the scripts are the only way.

The usual pattern for a 0/1 toggle would be this:
1 (L:O12_006_SW2, Number) - (>L:O12_006_SW2, Number)

and the usual strategy to make more similar scripts in one go would be to keep the editor open, replace the variable name, give the script a new name in the box at the top and pressing "Save as new". This keeps the editor open, and you can just continue replacing the variable name... etc.

LVars are variables, not events, and they can have any numerical value, not just 0/1. And they often do, because most of the time they are used to control the animations in the 3D model. So implementing a hard coded toggle would not work.

Edited by Lorby_SI

LORBY-SI

  • Author

@Lorby_SI

Got it all figured out, thanks so much! Your customer service is top-notch.

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.