Jump to content

Search the Community

Showing results for tags 'stock'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Public Forums
    • Announcements
    • General Chatter
    • Tournaments
    • Mapping forum
    • UI Scripting
    • Trading
    • Support
    • Bugs
    • Silver Screen

Found 1 result

  1. Dynamic Color

    Here's example of dynamic color code (Im new to LUA maybe this can emplement easier) : local function dynColor(min, max, value) local MaxC = 255 local MinC = 0 local DtC = 255 if (value>=max) then red=MaxC; green=MinC; blue=MinC; return; elseif (value<=min) then red=MinC; green=MinC; blue=MaxC; return; end local step = (max-min)/4.0; local dt = value-min; if (dt <= step) then red = MinC; green = math.floor(dt*(DtC/step)); blue = MaxC; else dt = dt-step; if (dt <= step) then red = MinC; green = MaxC; blue = math.floor((step-dt)*(DtC/step)); else dt = dt-step; if(dt <= step) then red = math.floor(dt*(DtC/step)); green = MaxC; blue = MinC; else dt = dt-step; red = MaxC; green = math.floor((step-dt)*(DtC/step)); blue = MinC; end end end return; end Also there video demonstartion (Look at the arc health bar) :
×