I am creating a maze game and when you hit the outline of the maze (which is a Sprite) it decreases your lives by -1. I'd like to end the game when your lives hit 0, but I can't figure out a way to get it to end...the variable just keeps decreasing by -1 infinitely.
Here is my script for one of my directions:
when down arrow key pressed
point in direction 180
move 10 steps
if touching Sprite 1
change x by -1
if x=0
broadcast You Lose
Any help is appreciated! Thanks!!
Offline
Try using
[blocks]<if> <( <{ x }> <<> 1 )>[/blocks]
instead of
[blocks]<if> <( <{ x }> <=> 0 )>[/blocks]
Offline