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

#1 2011-06-23 00:09:57

MrByram
New Scratcher
Registered: 2011-06-22
Posts: 2

How Do you...

One of my students is making a game where this machine shoots and destroys
some people running in the street, the issue we are having is making each person disappear individualy instead of all at the same time.
We have it set for when the colors touch its broadcasted for them to disappear, but we only want one to disappear at a time like the space invader games.
I've tried to set it up like one of the games but it still doesnt work correctly.
Any ideas of how to set up the script?

Thanks a million.

Offline

 

#2 2011-06-23 00:19:06

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: How Do you...

Can I see what you have so far? Then I might be able to help you.  smile

Offline

 

#3 2011-06-23 00:56:38

LordSydney
Scratcher
Registered: 2011-04-20
Posts: 100+

Re: How Do you...

You might consider having the "if touching colour" script in each individual person being shot, that way, when the bullet hits the person only the person hit hides.

I hope this helped!


Need help with BBCode?
http://i.imgur.com/IfWrL.gifAlso check this out!http://i.imgur.com/YgF2v.gif

Offline

 

#4 2011-06-23 08:59:45

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: How Do you...

You might be better off putting the script to sense if the ammo is touching someone on the people sprites themselves. That way they can have their own individual hide scripts instead of receiving a universal broadcast.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#5 2011-06-23 14:37:16

MrByram
New Scratcher
Registered: 2011-06-22
Posts: 2

Re: How Do you...

This is the set up we have right now.
<when I receive[ die]>
<if><color[blue  ]is touching[ grey]>
<hide>
<wait( 1 )secsc>
<show>

we put it on each individual person supposed to get hit, now noone is dissapearing

Offline

 

#6 2011-06-23 14:54:19

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: How Do you...

So that broadcast is set to go off when the bullet touches a person, right?  Most likely no one is disappearing because the bullet is disappearing too fast for them to sense.  So for the bullet's sensor you can put in an empty repeat (1) block before it hides, like this:
http://i56.tinypic.com/282ds6.gif

This way the bullet stays showing for an extra frame before disappearing, giving the people time to sense the bullet.


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#7 2011-06-23 18:44:07

Jawaria
New Scratcher
Registered: 2011-06-23
Posts: 1

Re: How Do you...

how do u add scratch projects to gallaries?

Offline

 

#8 2011-06-23 18:52:41

LordSydney
Scratcher
Registered: 2011-04-20
Posts: 100+

Re: How Do you...

Jawaria wrote:

how do u add scratch projects to gallaries?

It depends on how the gallery owner has set the gallery...If he set it for everybody then press the "add my projects" button. If not then you can't add... If you want to add other people's projects to your galleries click the "add to gallery" button on the project and select which one. Hope this helped!

Last edited by LordSydney (2011-06-23 18:53:48)


Need help with BBCode?
http://i.imgur.com/IfWrL.gifAlso check this out!http://i.imgur.com/YgF2v.gif

Offline

 

Board footer