Jump to content
Sign in to follow this  
n4gix

VC lighting and Landing Lights

Recommended Posts

Hey peoplesI have been working on the VC gauge lighting in my new plane for some time now and just about have it down. (Attached is a screen shot for anyone who is interested). one last thing is bugging me, to make the lightmaps work i have tied them to the landing lights and have forced them on at all times usingtrigger_key_event (KEY_LANDING_LIGHTS_SET,1);this is ok but if i press the "L" key or turn the lights on or off using default sim commands the landing lights flicker. i know why this happens, there is a delay between the lights being turned off by the sim and them being turned back on by the gauge. i was wondering if anyone knew of a way to prevent this flickering. Any help on this would be greatly appreciated.CheersPaul

Share this post


Link to post
Share on other sites

Lovely!Have you included a check flag to ensure the keyevent is only run once?Tell folks to keep their fingers off the L key, and provide adequate switches for the lighting! ;)I do hope you aren't checking the light status and using that as a trigger for the keyevent, as that will cause the 'flickering' as the gauge will be in a "race condition" and eat your memory quickly... :(


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

Hey oThe statment:trigger_key_event (KEY_LANDING_LIGHTS_SET,1);Is just sitting at the end of a gauge callback with no conditions placed upon it. So i guess its "set" every cycle probably not the best?i can easily run the key event once at start up but if someone dose go and push the L key all the lights will get screwed up i would prefer the flicker in that case. is that the only way?Thanks for the reply lots to think about and i'm glad you like it so far :)Paul

Share this post


Link to post
Share on other sites

As Bill says, add a check variable to the 'on' line. To sort the last problem, keep checking to see if the lights have been turned off and if they have, force them back on again. I can't give code because I'm a C programmer but I use similar checks for e.g. hydraulics failures to stop the user from being able to use various control surfaces.-Dai

Share this post


Link to post
Share on other sites

Hey oThanks for all your help guys will implement your suggestions and let you know how it goes. by the way i am programming in C++ not XML.Thanks againPaul

Share this post


Link to post
Share on other sites

>Thanks for the reply lots to think about and i'm glad you like>it so far :)Well, the trigger_key_event kinda gave me the clue you were coding in C rather than scripting in XML... ;)Although I cannot claim to have "invented" the emissive backlighting technique, I am quite confident that I'm the first to have ever disclosed the details of "how it's done" to the general public!When I first became seriously interested in modeling and gauge coding during the life of FS2002, I spent well over a year in search of the "holy grail" so to speak. Based on tedious piecing together bits-and-pieces of disparate data, close study, and reluctantly shared "veiled hints" from other, established developers, and knowing for a certainty that it COULD be done......I finally figured it out and immediately set about letting everyone know!Imagine my utter surprise to later discover during the late FSX development cycle that even the nice folks at ACES had absolutely no idea that this could be done! :-lol Which is why in FSX we now have two completely different ways to implement emissive gauge backlighting......which honestly is a good thing, because the new method ACES developed allows us to "light" glass gauges brightly even in the daytime! :-kewl


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

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