Sign in to follow this  
Guest Daviator

landing light toggle switch with delay...(XML)

Recommended Posts

I'm looking for a way to make a toggle switch hold a position fora second or two. For example I need a switch that extends and retracts a landing light. I want it to hold the Extend position for a few seconds after being clicked on (and turn the landing lights on) and then return to neutral. Then I'd like it to do the opposite when you click the landing light off the opposite for retract. Any help is greatly appreciated.Dave

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Dave,Here's an example of how you could realize it:(L:Landing Light Switch,enum)(G:Var2) (P:Local Time, seconds) < (L:Switch back,bool) 1 == && if{ 1 (>L:Landing Lights on,bool) 0 (>L:Landing Light Switch,enum) 0 (>L:Switch back,bool) }(G:Var3) (P:Local Time, seconds) < (L:Switch back2,bool) 1 == && if{ 0 (>L:Landing Lights on,bool) 0 (>L:Landing Light Switch,enum) 0 (>L:Switch back2,bool) }(L:Landing Lights on,bool) if{ (A:Light landing,bool) 0 == if{ (>K:LANDING_LIGHTS_TOGGLE) } } els{ (A:Light landing,bool) if{ (>K:LANDING_LIGHTS_TOGGLE) } }Landing Light Switch1 (>L:Landing Light Switch,enum) (P:Local Time, seconds) 2.0 + (>G:Var2) + 1 (>L:Switch back,bool)Click>Landing Light Switch2 (>L:Landing Light Switch,enum) (P:Local Time, seconds) 2.0 + (>G:Var3) + 1 (>L:Switch back2,bool)Click>Instead of the lot of L: variables, you could also use G: variables.Best RegardsMatthias

Share this post


Link to post
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
Sign in to follow this