Tyvm for the quick response zork.
with my limited (rapidly increasing ^^ ) knowledge of lua, would I be correct in thinking:
Code:
local calc_perc = min/max
local calc_red
local calc_green
-- 100% = 0
-- 75% = 0.5,1,0
-- 50% = 1,1,0
-- 25% = 1,0.5,0
-- 0% = 1,0,0
if calc_perc >= 0.5 then
calc_green = 1
else
calc_green = calc_perc*2
end
if calc_perc <= 0.5 then
calc_red = 1
else
calc_red = (1-calc_perc)*2
end
would make the default (full) colour the class colour, based on the
Code:
-- healthcolor defines what healthcolor will be used
-- 0 = class color, 1 = red, 2 = green, 3 = blue, 4 = yellow, 5 = runic
local healthcolor = 0
arguement mentioned eariler in the code, or does this addition require you to use the RGB code sequence?
I'm ok with green as default colour tbh, just wondering if this code still pulls in rules from previous lines or it's a independant cmd.
Also at 25% would it be asking for trouble to add a cmd to lighten to glow of the orb, to make it more promenent.
using the
Code:
local fog_smoother = 1
rule.
Hope you understand what i mean, as I dont know the all the lingo.
Appreciate your patience and help.
for the moment I'll try the above code you have supplied once I get home, and see how it looks.
EDIT: Just looking at some RGB values, and it seems the ones in the code are a lot more simple than other RGB codes I've seen:
Example
Just to confirm, the RGB in this code is based on the opacity for each colour?
0 = not visible 0.25 = 25% opacity of that colour for example?
cheers.