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.

Can't get button bindings to work with 3-way switches

Featured Replies

I'm working with the latest version of AAO and the updated Kodiak 100 from SWS in MSFS 2024.

I have most buttons and controls mapped just fine. But there are a couple of 3 way switches that I cannot get working. One is the starter switch which has off, lo, and high. (1, 2, 0 respectively).

Using the Dev Mode Behaviors Inspector the InputEvents is...
INSTRUMENT_SWITCH_STARTER_1_Set

So I tried using a B: INSTRUMENT_SWITCH_STARTER_1_Set event for this variable and a value of 1 and 2 for button up and down on my Honeycomb Alpha. The value changes briefly in the Behavior Monitor, but reverts to the position of the virtual switch and doesn't move the switch. So it doesn't stick.

In the Mouserect section of the Behavior Monitor, there is another variable...
L:1:SWS_ENGINE_Switch_Starter_1

I tried using this in a script using...
2 (>L:SWS_ENGINE_Switch_Starter_1) 1

Any ideas why none of this is working?

It seems like the sim is not taking the changed value using the B: var. And I'm not sure about the syntax of the L: var.

  • Author

There’s also this documentation, but this B: variable doesn't work either and doesn’t match what you see in the Dev Mode Behaviour monitor.

Starter Switch

L:1:SWS_ENGINE_Switch_Starter_1

B:SWS_ENGINE_Switch_Starter_1

Simworks Studios - Taking simulation to new heights!
No image preview

Kodiak 100 – Switch variables and bindings - Simworks Stu...

Flight Simulator 2020 bindings Circuit breakers (A:CIRCUIT BREAKER PULLED:x, Bool) System index depends on aircraft, reference systems.cfg for exhaustive list Oxygen (L:XMLVAR_Oxygen, Bool) 0 off 1 on

What should I be using?

Edited by Virtual-Chris

hmm..
I tried to solve this. After a while my brain gave up. Then Google AI gave up. Copy pasted lots of code to ChatGpt from the behaviour window. It gave up with saying "From everything you've shown, I don't think this is a simple LVar or IE assignment issue anymore—I think we're one hidden template away from the answer. I was using ChatGPT as a guest (without login in..it did give me lots of free time though). Now it wants few xml files uploaded from the kodiak to find a solution. I have to login to ChatGPT to do this. Again, as I am on free tier, so I dont think I will go further.

EDIT: I had this starter switch working with stream deck button in the previous version of Kodiak 100. This got broken after the update and the new simvars the developer is using.

Edited by london-simmer

  • Commercial Member

Try using "Z:" instead of "L:1:". And don't forget to supply the Unit ", Number" when dealing with simulator LVars.

2 (>L:1:SWS_ENGINE_Switch_Starter_1, Number)

is the same as

2 (>Z:SWS_ENGINE_Switch_Starter_1, Number)

AAO 4.58: Problem with L:1:? Use Z: instead - AxisAndOhs Support - The AVSIM Community

Edited by Lorby_SI

LORBY-SI

Ok, I was testing Z: and this works.

2 (>Z:SWS_ENGINE_Switch_Starter_1, Number)

During my earlier attempts I did try Z: as this was mentioned in this forum, obviously I was using the wrong simvar!

As I am using Stream Deck to control the buttons, I am going to have two scripts and two buttons. Life is easier for me this way:

  1. Script title: Starter-Using-iSeq Toggle HI Start
    1·0·(Z:SWS_ENGINE_Switch_Starter_1,·Number)·(L:MyIndex)·2·iseq·(>Z:SWS_ENGINE_Switch_Starter_1,·Number)·(>L:MyIndex)

  2. Script title: Starter-Using-iSeq Toggle LO Start
    2·1·(Z:SWS_ENGINE_Switch_Starter_1,·Number)·(L:MyIndex)·2·iseq·(>Z:SWS_ENGINE_Switch_Starter_1,·Number)·(>L:MyIndex)

I just happened to have the rpn script for the previous version where I used iSeq and just modified it for the new version.

Job Done!

Edited by london-simmer

  • Author
10 hours ago, Lorby_SI said:

Try using "Z:" instead of "L:1:". And don't forget to supply the Unit ", Number" when dealing with simulator LVars.

2 (>L:1:SWS_ENGINE_Switch_Starter_1, Number)

is the same as

2 (>Z:SWS_ENGINE_Switch_Starter_1, Number)

AAO 4.58: Problem with L:1:? Use Z: instead - AxisAndOhs Support - The AVSIM Community

Thanks. Works. Used this for the starter and the Aux Fuel Pump as both needed this. Other buttons map fine with old B vars

  • Author

One other issue I'm not sure about...

In Stream Deck, I'm using Guenseli's profile and there are a couple of three way switches for Landing Lights and Cabin Lights. I've got the switch working by updating his scripts to use Z: but can't read the value as there's no Z: for read variables...

https://imgur.com/a/BkmsFdw

  • Commercial Member
5 hours ago, Virtual-Chris said:

One other issue I'm not sure about...

In Stream Deck, I'm using Guenseli's profile and there are a couple of three way switches for Landing Lights and Cabin Lights. I've got the switch working by updating his scripts to use Z: but can't read the value as there's no Z: for read variables...

https://imgur.com/a/BkmsFdw

I will put it on the list for the next version of the plugin

Try using S: and enter the ZVar like you would in a script, including the brackets. (Z:whatever, Number)

Alternatively, because S: is bad for performance, use an internal LVar (L:myvarname) and run a update script that fills it from the ZVar "(Z:whatever, Number) (>L:myvarname)". At the botton of the SD action dialog you can enter the name of the update script.

Note that this internal LVar doesn't have a Unit ( like", Number"). That's how AAO knows not to send it to the sim.

LORBY-SI

Create an account or sign in to comment

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.