I have some code for making the coin counter go up when the character hits it and that when it gets to 100 coins, it gives you a life. But it doesnt seem to be working. Can you help us out?
// checks whether sonic is touching a coin: if he is, +1 to the coin counter.
//you can do your own scripting for making the coin dissappear
// "coins" and "score" are both dynamic text boxes.
if(_root.sonic.hitTest(_root.coin)){
coins + 1;
score + 100;
}
// adds an extra life if coins go to 100
if (coins = ">99";) {then
lives + 1;
set(coins, 0)
}