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

#1 2010-05-19 22:29:45

4lover
Scratcher
Registered: 2010-04-24
Posts: 500+

Hiding computer guys and moving to a different background.

When you are on the last background of a level how do you not be able to move on until all the opponents have been killed.


Check out this awesome new zombie-cod type of game: http://scratch.mit.edu/projects/4lover/1975649

Offline

 

#2 2010-05-19 22:35:54

PlayWithFire
Scratcher
Registered: 2010-01-20
Posts: 1000+

Re: Hiding computer guys and moving to a different background.

is there a sprite that if they touch makes them move to the next level?  if so then make that sprite hide until they've killed all of the opponents, then make it show again.

hope that helps


http://scratch.mit.edu/static/projects/PlayWithFire/1610180_sm.png
Check out the DG Games Website For the latest news on games like Infected

Offline

 

#3 2010-05-19 22:40:56

4lover
Scratcher
Registered: 2010-04-24
Posts: 500+

Re: Hiding computer guys and moving to a different background.

But how do you make a script that shows how you kill all the guys then make the sprite show.


Check out this awesome new zombie-cod type of game: http://scratch.mit.edu/projects/4lover/1975649

Offline

 

#4 2010-05-19 23:21:34

PlayWithFire
Scratcher
Registered: 2010-01-20
Posts: 1000+

Re: Hiding computer guys and moving to a different background.

just make a variable called enemies killed and set it to zero
then when each enemy dies change it by one
then make a script that says when enemies killed equals (number of enemies) show the sprite

make sure to hid beforehand though.


http://scratch.mit.edu/static/projects/PlayWithFire/1610180_sm.png
Check out the DG Games Website For the latest news on games like Infected

Offline

 

#5 2010-05-19 23:21:49

infinitum3d
Scratcher
Registered: 2009-05-10
Posts: 100+

Re: Hiding computer guys and moving to a different background.

one way is to use a variable. create a variable called something like EnemiesLeft.  If there are 4 enemies that need to be beat, set EnemiesLeft to 4. When an enemy is beat, change EnemiesLeft by -1. If EnemiesLeft < 1 then show sprite.

Offline

 

Board footer