Jump to content
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

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.


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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  

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