• Reverse Number Climb
    2 replies, posted
Ok, I'm being really stupid right now. Maybe because It's like 4AM but I just can't seem to think of a way to reverse number climbs. I honestly don't know how to explain this but I will try with poor thinking atm. I have text that is black when I am on full health, which means the colours need to be 0, but I want a way to increase the value upwards when losing health to turn text white. I've managed to do it, but it just seems wrong to me like there can be a better way to do it: This kinda serves my purpose but if there is a better way to do a function like this please enlighten me math.Clamp(health*2.5*-1.5+500,0,255)
(maxhealth - health) * 255
Thanks, looks cleaner and easier to work with.
Sorry, you need to Log In to post a reply to this thread.