One of my students is trying to get a game over screen when his life variable gets to zero. I keep looking for other forums where this could have been asked but the suggestions I have seen have not worked for me. If someone could let me know ASAP the easiest way to do this. Thanks!
Jessica
Offline
For games, I usually have a sprite dedicated to putting up instructions (a start screen costume) and a game over message (another costume). The script that is counting down the life variable can send a broadcast when this variable reaches zero. In the "start/gameover" sprite, receiving this message can trigger a costume change to show that the game has ended.
I did this in "EarthDefense": http://scratch.mit.edu/projects/EdnaC/1856425
Continuously monitoring as coca0101 suggests works too, but the broadcast method lets other sprites react to the message too.
Last edited by EdnaC (2011-06-16 10:59:31)
Offline