In both cases you can check the value of a variable using an <if> block from the Control blocks. You can then grab a number comparison from the Numbers blocks and grab your variable from Variables. For example, you could do something like this:
If (Health < 1 )
Do whatever you need to kill the character
If you want the program to end at that point, add a Stop All Scripts block from Control.
Offline
how would you make it go to a "game over" screen though???
Offline
You can make a game over screen multiple ways.
1. You can make a "Game Over" sprite, and have that show up.
Example: Deep Sea Treasure http://scratch.mit.edu/projects/paulmedwal/2717 , look in Sprite6's scripts, it says "When I receive Game Over" to show itself. Game Over is broadcast when a bomb hits the boat.
2. You can change the background and have it say Game Over.
Example: Stop the Invasion http://scratch.mit.edu/projects/paulmedwal/547 If you look at the Stage's Script (yes, there are a lot) there is one that says, "When I receive Game Over" and it changes the background.
I know my games are complicated, but the concept is pretty easy. Just use the broadcast/when I receive blocks to tell the game "Game Over" and have it do the stuff you want.
Paulmedwal
Offline