Most of the commonly reported issues and questions are answered in the Frequently Asked Questions (FAQ) option under the Support menu of this website.
*** PLEASE NOTE ***
Your forum account is not the same as the account used in the shop. They are completely separate accounts.
1st December: A new version of the GoFlight Interface Tool for MSFS is now available.
12th November: A new version of the GoFlight Interface Tool for X-Plane is now available.
6th June: A new version of Virtual Flight Sim Hardware is now available (huge update)
21st November: A new version of the GoFlight Interface Tool for FSX/FSXSE/P3D is now available.

Light action between values

Hi again,

is it possible to set a LIGHT ACTION between value "x" and "y" - should work like this:

Light action: ON_BETWEEN_MIN/MAX Light value: 0.4/0.8

Thanks for any info
Alex

Answers

  • Hi Alex,

    No you would need to build a bespoke event or if necessary the Start bespoke event and assign the result to a Bespoke Variable.
    Lua is also an option.

    Best wishes
    Steve
  • Hi Steve,

    thanks for your answer. This sounds quite clear to me, fact is that I have no idea what a BE of this should look like.
    I really don´t want to appear like a stupid sticky guy but could you please give me some hints to build this needed BE?

    For the moment I am so very happy that I could manage almost all of my actual needs, that I´ve ordered a bunch of additional GoFlights and a DIO board for my future O/H panel.

    Greetings
    Alex

    P.S. Have you monitored x-plane.org forum yet? Some people there really try to keep others from using GIT! Don´t know why, but I "have no admission to post comments"... although I am registered there.

  • edited November 2017 Answer ✓
    Lua would probably be easier. Something like:

    dRefVal = getdref("your dataref name here")

    if (dRefVal > 10 and dRefVal < 50) then
    setbvar("BespokeVar0", 1)
    else
    setbvar("BespokeVar0", 0)
    end

    Alter the text in italics to match your needs.

    dRefVal is a local lua variable that will store the contents of the dataref value.
    The if statement check the value to see if it is between 10 or 50 and if so sets the BespokeVar0 to 1, otherwise it is set to 0.
    You assign the Lua file to one of your controls and then assign the LightData as the "Bespoke Var 0" with a ON if 1.

    If the dataref changes on its own without anything needing to be pressed in the cockpit, such as "altitude", then add the code to the global aircraft lua file and add a sleep(50) command at the end.

    Yes, I have looked at the forum, its the bunch of people that couldn't grasp how to use the tool - not a lot I can do about it. I need people to post positive messages for me.

    Best wishes
    Steve



  • Thanks a lot Steve...

    for the prog example! Appreciate your help very much!

    When my programming of GIT is complete I'll try to find out how I can get enabled to post in xpl.org. People need to know that there's a great solution for all their cockpit needs!

    Greetings from snowy Austria
    Alex
  • Had a though this morning. If you do use the global lua, you would need to wrap the code in a loop so it runs continuously. Something like:

    while true do
    dRefVal = getdref("your dataref name here")

    if (dRefVal > 10 and dRefVal < 50) then
    setbvar("BespokeVar0", 1)
    else
    setbvar("BespokeVar0", 0)
    end

    sleep(50)

    end
  • Hello Steve,

    thank you very much for all the assistence you give!
    I will try my best as soon as I find some time... my job´s killing me right now.
    Keep you informed,

    Alex
Sign In or Register to comment.