Jump to content
The simFlight Network Forums

gfd.SetColour help


Recommended Posts

Hello, I've been working on how to change indicator 1 to light up yellow and can not understand what is wrong. I have ran the included WP6test.lua and seen that is possible, but my code only lights up white. What am I doing wrong?

function MasterCaution(offset, value)

if logic.And(value,0x0002) ~=0 then

gfd.SetColour(GFWP6,0, 1, 6)

gfd.SetLight(GFWP6,0,1)

else

gfd.ClearLight(GFWP6,0,1)

end

end

event.offset("9420", "UB", "MasterCaution")

Link to comment
Share on other sites

Hello, I've been working on how to change indicator 1 to light up yellow and can not understand what is wrong. I have ran the included WP6test.lua and seen that is possible, but my code only lights up white. What am I doing wrong?

Ouch! It isn't you, it's me! There's a bug -- the indicator IDs in SetColour run from 1 whilst those in SetLight and ClearLight run from 0! You can see this by changing your SetLight to

gfd.SetLight(GFWP6,0,0)

I'm going to have to fix this. I'm not sure at present which one is wrong, but i've a feeling it must be "SetColour", because the SetLight and ClearLight facilities existed long before the WP6 and 'SetColour'. The convention in FSUIPC has always been to number from 0, but I must have been confused by the WP6 which numbers its indicators from 1.

So, I'll change SetColour to also count from 0. I just hope it doesn't mess too many folks up!

Fix will be in FSUIPC 4.761, 3.998t and Wideclient 6.92, later today. Thanks for finding this bug!

[LATER]

Okay, the revised versions are now available in the Download Links subforum.

Regards

Pete

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.