Jump to content

3-Way Toggle?


bahnzo

Recommended Posts

I've learned how to do a toggle for a 2-way switch, is there a way to toggle a 3-way switch with a single button on my HOTAS? IE: the landing light in the Kodia has 0-off, 1-strobe, 2-On. Can I sequentially switch 0-1-2-1-0? 

I can simply switch between off and on with this: 

2·(L:SWS_LIGHTING_Switch_Light_Landing,·Number)·-·(>L:SWS_LIGHTING_Switch_Light_Landing,·Number)

but I don't know if there's a way to do a 3-way with a single button. 


Ohh, one more question I've had - Is there a way to use AAO to change settings in MSFS? Specifically, I'd like to toggle on/off the AI radio assist. 

Edited by bahnzo
Link to comment
Share on other sites

  • Commercial Member
3 hours ago, bahnzo said:

but I don't know if there's a way to do a 3-way with a single button. 

Sure, this can be scripted too, using the "seq" or "iseq" operators. "seq" is used when you have a unique sequece where no value is repeated (0-1-2-3). "iseq" is for sequences where values are there more than once (0-1-2-1-0)

0·1·2·(L:SWS_LIGHTING_Switch_Light_Landing,·Number)·3·seq·(>L:SWS_LIGHTING_Switch_Light_Landing,·Number)
This will toggle 0-1-2-0-1-2-..

or
0·1·2·1·(L:SWS_LIGHTING_Switch_Light_Landing,·Number)·(L:SWS_LALISEL_IDX)·4·iseq·(>L:SWS_LIGHTING_Switch_Light_Landing,·Number)·(>L:SWS_LALISEL_IDX)
This will toggle 0-1-2-1-0-1-2-1-0..
"SWS_LALISEL_IDX" is an invented LVar, it contains the current index that the sequence is at. This must be named differently and uniquely for each iseq script.

3 hours ago, bahnzo said:

Is there a way to use AAO to change settings in MSFS?

No, that is not possible. Settings are not accessible from the outside, unless you find them in the SDK Events/Variables or figure out a CoherentGT command to make that change (AAO can send those). But in most cases, the simulation has to be stopped in order to make a settings change, they cannot be altered "on the fly" (pun intended).

That being said, you could create a mouse script in AAO that stops the simulation, calls up the settings menu, changes the setting, saves it and returns to the sim. 

Edited by Lorby_SI

LORBY-SI

Link to comment
Share on other sites

13 minutes ago, Lorby_SI said:

Sure, this can be scripted too, using the "seq" or "iseq" operators. "seq" is used when you have a unique sequece where no value is repeated (0-1-2-3). "iseq" is for sequences where values are there more than once (0-1-2-1-0)

0·1·2·(L:SWS_LIGHTING_Switch_Light_Landing,·Number)·3·seq·(>L:SWS_LIGHTING_Switch_Light_Landing,·Number)
This will toggle 0-1-2-0-1-2-..

or
0·1·2·1·(L:SWS_LIGHTING_Switch_Light_Landing,·Number)·(L:SWS_LALISEL_IDX)·4·iseq·(>L:SWS_LIGHTING_Switch_Light_Landing,·Number)·(>L:SWS_LALISEL_IDX)
This will toggle 0-1-2-1-0-1-2-1-0..
"SWS_LALISEL_IDX" is an invented LVar, it contains the current index that the sequence is at. This must be named differently and uniquely for each iseq script.

No, that is not possible. Settings are not accessible from the outside, unless you find them in the SDK Events/Variables or figure out a CoherentGT command to make that change (AAO can send those). But in most cases, the simulation has to be stopped in order to make a settings change, they cannot be altered "on the fly" (pun intended).

That being said, you could create a mouse script in AAO that stops the simulation, calls up the settings menu, changes the setting, saves it and returns to the sim. 

Thanks! I saw the "iseq" and wondered if that's what I needed, but wasn't sure how it would be scripted. Thanks for the info. 

As far as the settings....I figured it wasn't possible, but thought I'd ask. Thanks again 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...