Sign in to follow this  
phjvh

Building a simple time delay sequence

Recommended Posts

Using code from the 747 starter, I have built an autostart function for a panel I am working on that turns on multiple switches.Trouble is, it turns on ALL the switches at the same time, and I would really like to have a second or so delay between the switches turning on, just for the visual aspect of the autostart. The main switch itself has a delay through G:VAR5, but I must admit I'm not really sure how it works, just know that it does.How could I put a delay between the all the functions in the {if} that this switch activates?Steve (G:Var5) if{ (A:Electrical master battery,bool) (L:Manauto,enum) && if{ 1 (>L:Dummyinv2,enum) 1 (>L:Dummyfuelpump1,enum) 1 (>L:DUMMY_FUEL_VALVE2,enum) 1 (>L:Dummyfuelpump2,enum) 1 (>L:Dummyfuelpump3,enum) 1 (>L:Dummyinv3,enum) 1 (>L:Dummyfuelpump4,enum) 1 (>L:DUMMY_FUEL_VALVE1,enum) 1 (>L:Dummyfuelxfeed,enum) 1 (>L:Dummyinv1,enum) 1 (>K:MIXTURE1_INCR_SMALL) 1 (>K:PROP_PITCH1_LO) 1 (>L:TOGGLE_STARTER1,enum) 0 (>L:Manauto,enum) } els{ (G:Var5) -- (>G:Var5) } } (G:Var5) 0 != (L:nothing,bool) ||AUTO ENGINE START 4 (>G:Var5)

Share this post


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

Steve,Quite complicated!Give you the code off a delay in an engine-deice switch;it contains several useless elements, but it gives an idea how to do:(G:Var1) 2 == if{ (A:General eng1 anti ice position,bool) 0 == if{ (>K:ANTI_ICE_TOGGLE_ENG1) } } els{ (A:General eng1 anti ice position,bool) 1 == if{ (>K:ANTI_ICE_TOGGLE_ENG1) } }(G:Var1) 3 == if{ (P:Local Time, seconds) (G:Var9) > if{ 1 (>G:Var1) + (P:Local Time, seconds) 4 + (>G:Var9) } }(G:Var1) 1 == if{ (P:Local Time, seconds) (G:Var9) > if{ 2 (>G:Var1) } }(G:Var1) s1 3 == l1 1 == || (A:Electrical master battery,bool) 0 == & if{ 0 (>G:Var1) }(G:Var1) s1 3 == l1 1 == || (L:bleed Switch1, bool) 1 == & if{ 0 (>G:Var1) }(G:Var1) s1 0 == l1 3 == || if{ l1 } els{ 1 }Eng 1 Deice(G:Var1) 0 == if{ (L:bleed Switch1, bool) 0 == if{ 3 (>G:Var1) + (P:Local Time, seconds) 0.65 + (>G:Var9) } } els{ 0 (>G:Var1) } (>K:TOGGLE_AFTERBURNER1)Jan"Procul Negotiis"

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