Sign in to follow this  

Recommended Posts

Hi All,I cannot seem to get the penny to drop. Can someone provide me with a simple code example using L vars to turn on and off the nav lights.I can get it to work using normal code but I'm trying to get a grip on L vars and it would help, I think, if I can compare the two side by side.Here is the normal code thats works. Can L Vars do the same?(A:Light nav,bool)Yes I have read many discussions on this topic but it still eludes me.Thanks,Douglas.

Share this post


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

Of course not...L:vars are custom defined variables that aren't tied to anything specific in the sim.Besides, L:vars share one property with A:vars - they simply report a condition. They are not "action variables" (or "verbs") at all.Only K:variables are "action variables" - or, more properly are "key events." That is, they control stuff.Using your example, TOGGLE_NAV_LIGHTS (or (>K:TOGGLE_NAV_LIGHTS) ) is an "action event" - that is, it controls whether NAV LIGHTS are on or off.(A:Light nav,bool) on the other hand, is an "adjective word," that is, it reports the condition of the NAV LIGHTS as 0 = off or 1 = on.The primary use of a custom, L:variable would be to keep track of something that is not already provided for by the default A:variables.

Share this post


Link to post
Share on other sites

Gentlemen,Thank you both for the replys and explanations and link.I guess I cannot see the forest for the trees but I'll get it yet having had some success with this gauge.Thanks again,Douglas(L:GEN1 Switch,enum)(L:GEN1 Switch,bool) 0 == //// AC Volts %((A:electrical genalt1 voltage, volts))%!3d!APU GENGEN1(ON):3 (>L:GEN1 Switch,enum)

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