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
Do something like this:
If you have more aliens, add them in.
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.
Last edited by Jonathanpb (2010-11-08 23:41:24)
Offline
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
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.
Offline