March 6, 200620 yr 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.
March 6, 200620 yr Moderator 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
March 6, 200620 yr At least for L Vars, this may be helpful:"Anatomy of an XML code"http://www.aerodynamika.com/cgi-bin/yabb/Y...;num=1129865563by Fr. Bill.BTW Fr. Bill - thanks for this post. It puts in perspective how to "think" about the different variables.
March 11, 200620 yr Author 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)
Create an account or sign in to comment