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

#1 2010-11-08 23:25:01

armin300
New Scratcher
Registered: 2010-11-08
Posts: 3

please help!

I didn't know where to post, so i put it here...

Anyways, I'm trying to make a game of space invaders, but no matter what I try, I cannot get the bullet to hide once it hits one of the aliens. It just keeps on going and takes out the whole line of aliens, thus making it possible to win the game with only 7 shots. Does somebody know how I can fix this?

Thank you!

Offline

 

#2 2010-11-08 23:40:02

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: please help!

Do something like this:

http://img80.imageshack.us/img80/2757/346makingabullethidewhe.png

If you have more aliens, add them in.  wink

EDIT: Wait - if you have tons of aliens, that'll be pretty big... if the aliens are made up of just a few colors, just replace the <touching [Sprite1]?> block with <touching color [ ]?>. Don't forget to select the right colors!

Oh - the Troubleshooting forum is for reporting bugs with Scratch. For programming help, try the All About Scratch forum.  smile

Last edited by Jonathanpb (2010-11-08 23:41:24)


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#3 2010-11-08 23:44:31

armin300
New Scratcher
Registered: 2010-11-08
Posts: 3

Re: please help!

<glide(  )secs to x sad   )y sad 

i'm using one of these blocks.. so even when i try that sort of script, i'm guessing this block contradicts it and it keeps on going?  sad

Offline

 

#4 2010-11-08 23:47:24

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: please help!

Could you post the project of what you have so far?
And, yes, that block contradicts what jonathanpb said. You have to use [blocks]<move(  )steps>[/blocks] in order for that to work. You should do: [blocks]
<when I receive[ shoot ]
<repeat until><touching[ Alien ]
<move( 10 )steps>
<end>
<stop script> [/blocks]
That should work. Try that, or post the project and I'll try to fix it.

Last edited by kayybee (2010-11-08 23:48:07)

Offline

 

#5 2010-11-08 23:54:07

armin300
New Scratcher
Registered: 2010-11-08
Posts: 3

Re: please help!

<hide><when green flag clicked>

<when[ space ]key pressed><go to[ spaceship]><point in direction( 90)><show><glide(  1)secs to x sad  <x position> )y:(178)><hide>

Offline

 

#6 2010-11-09 06:02:53

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

Re: please help!

kayybee wrote:

Could you post the project of what you have so far?
And, yes, that block contradicts what jonathanpb said. You have to use [blocks]<move(  )steps>[/blocks] in order for that to work. You should do: [blocks]
<when I receive[ shoot ]
<repeat until><touching[ Alien ]
<move( 10 )steps>
<end>
<stop script> [/blocks]
That should work. Try that, or post the project and I'll try to fix it.

This is probably the best solution. Just adapt it to what Jonathanpb said.  smile


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

Offline

 

Board footer