mob/verb
TL()//test lighter
SKINTONE+=16
icon = 'Icons/Mob.dmi'
icon_state = "Body"
if(SKINTONE>=0)
icon += rgb(SKINTONE,SKINTONE,SKINTONE)
else
icon -= rgb(SKINTONE,SKINTONE,SKINTONE)
TD()//test darker
SKINTONE-=16
icon = 'Icons/Mob.dmi'
icon_state = "Body"
if(SKINTONE<0)
icon -= rgb(SKINTONE,SKINTONE,SKINTONE)
else
icon += rgb(SKINTONE,SKINTONE,SKINTONE)
Problem description:
What should happen:
Player presses either TL or TD and h(is/er) icon should go either lighter (TL) or darker (TD). The icon will go lighter, and than will go back to its original when TD is clicked enough. However, when clicking TD to make it go darker, the icon refuses to do so.
IE:
Player clicks TL (Lighter)
Icon goes lighter
Player clicks TD (Darker)
Icon returns to normal
*Problem*
Player clicks TD (Darker) again, when icon is normal
Nothing happens.
When the icon goes lighter by 2 steps, I want the darker verb to go to 1 lighter, not revert. Same with the darker steps.
SKINTONE is defined somewhere else
Can't use negatives in rgb()