I'm trying to make a game where I have a "ball" object i move around with the cursor and dodge "block" objects. I have a variable called health and I want to make it so whenever the ball is hit by the block, the ball loses 1 health. here's the code.
health = 10;
if(_root.ball.hitTest(_root.block)){
health--;
}
nothing at all happens when the block hits the ball.
Anyone know what the problem is?