Jump to content
Sign in to follow this  
Guest Daviator

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

Recommended Posts

Guest Daviator

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
Guest Matthias Lieberecht

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
Guest Daviator

Wow! THanks Matthias!I'll give it a go. Dave

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  

  • 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...