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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

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