score
Posted: Fri Feb 15, 2008 3:38 pm
In my game, when you get hurt and lose coins, the score decreases by 10. if the score is less than 10, it will become negative numbers. how can I make it stop at zero?
number -= penalty;
if (number < 0) { number = 0; }
textNumber = number;
if(number>0)
{//lose}
j2graves wrote:In my game, when you get hurt and lose coins, the score decreases by 10. if the score is less than 10, it will become negative numbers. how can I make it stop at zero?
if(score<=0)
{
score=0;
}