This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-06-21 22:20:01

SapphireTui
New Scratcher
Registered: 2011-06-21
Posts: 1

How to Program Game Over messages!

Help! Im doing a school project, and we have to make a game.
So far so good, but i'm stuck on one thing...
When my character shoots all the bad guys, (aka makes them hide) i don't know how to program it to say or broadcast Game Over! Even my advanced teacher doesn't know!!!
Please, if you have any idea, post it!!!! Thanks!!!!!

Offline

 

#2 2011-06-21 22:26:43

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: How to Program Game Over messages!

Try having a variable. Everytime one of the bad guys gets hit and 'hides' make them change the variable by 1. There should be one of these scripts on all of the 'bad guys.'

When the variable = (set number) on the game over sprite, make it show then stop all.

Hope this helps!  big_smile


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#3 2011-06-22 08:25:37

frizzlepuss893
Scratcher
Registered: 2011-06-10
Posts: 100+

Re: How to Program Game Over messages!

ive made a game on this before. make a variable, bad guys left, and set it to however many bad guys there are. the bad guys need health, so put that on each of them and then put a script on each bad guy put a script that says: forever, if health = 0, hide, change bad guys left by -1, and stop script. then make a giant sprite that says u win! and put in it a script that says: forever, if bad guys left = 0, show, stop script. it works! if you need any more help, tell me...


"Wait, what?"-Frizzlepuss. Jumpathon 5! play now!
The scratch song! Congratulations scratch! 2 million projects!

Offline

 

Board footer