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

#1 2010-05-22 00:15:38

Linerz
Scratcher
Registered: 2010-05-12
Posts: 15

Galaga Help

Hey everyone, what's going on?

I'm making a galaga game (Like space invaders) the game is now nearing completion, and I want to make it so that when all the enemies are defeated a new level begins. I want to do this by using a variable. I dont know what to do with the variable, but I want some things to happen in the levels after

1. Faster moving enemies
2. More enemies
3. Possibly make them fire back.

I can upload, and you can download the code if you would like to see what I have so far.

Thanks in advance,

Linerz

Offline

 

#2 2010-05-22 00:18:58

soupoftomato
Scratcher
Registered: 2009-07-18
Posts: 1000+

Re: Galaga Help

This would be much simpler using a broadcast.

In what senses if your levels over:
code for winning
<broadcast[ levelover

The enemies:
<when I receive[ levelover
code


I'm glad to think that the community will always be kind and helpful, the language will always be a fun and easy way to be introduced into programming, the motto will always be: Imagine, Program, Share - Nomolos

Offline

 

#3 2010-05-22 02:34:39

Chrischb
Scratcher
Registered: 2008-07-24
Posts: 1000+

Re: Galaga Help

Linerz wrote:

1. Faster moving enemies
2. More enemies
3. Possibly make them fire back.

Hmm... try this:

1. Use a variable that changes over time. The variable used in the blocks that move the enemies, something like:

[move ((variable)) steps]

Change the variable as required.

2. Are you having a sprite for every enemy, rather than multiple sprite use? If so, give each sprite a level requirement. It can check what the current level is and see if it's needed in the level preparation.

3. Make laser sprites for each spaceship. Give each of them some scripting like this:

[repeat until <<touching [your spaceship]>>]
[//[change y by (10)]
[endrepeat]

:)


I fall: It's a tragedy. You fall: It's comedy.
Hmph enjoy your fall - I get a lovely spring... without pans of new leaves.

Offline

 

Board footer