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

#1 2009-01-19 13:13:07

Lex224
Scratcher
Registered: 2008-11-28
Posts: 4

How do I shoot more then one bullet a time?

Hey all.

I've been searching around all day and looking at example games and such to try and help me but nothing worked.

What I'm trying to do is press a button to shoot, but I want it so that the bullets can be shot one after another and not so that you have to wait for the bullet to collide with something before you can shoot again.

I understand that you have to use as many sprites as you want bullets, which I've done. I've tried various scripts from games where it worked good but for some reason when I tried to place it in my game it didn't work.

So, how exactly can I do this? Let's say I want there to be 3 bullets one after another before it waits for one to collide before it can shoot again.

Thanks in advance!

Offline

 

#2 2009-01-19 14:50:36

Lex224
Scratcher
Registered: 2008-11-28
Posts: 4

Re: How do I shoot more then one bullet a time?

Nevermind, after hours of work I've finally got something working.

Offline

 

#3 2009-01-19 14:53:21

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: How do I shoot more then one bullet a time?

Here: http://scratch.mit.edu/projects/shadow_7283/386470 is an example. It needs to be edited, but I just left it that way you can change it to fit your needs.

Offline

 

#4 2009-01-19 14:59:38

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: How do I shoot more then one bullet a time?

Lex224 wrote:

Nevermind, after hours of work I've finally got something working.

Whoops! I guess you won't be needing mine then (you posted this while I was making it).

Offline

 

#5 2009-01-20 05:22:21

pokemon_master12
Scratcher
Registered: 2008-09-26
Posts: 100+

Re: How do I shoot more then one bullet a time?

Well, instead of using a

[blocks]<broadcast[  ]and wait c>[/blocks]

you'll need to use a

[blocks]<broadcast[ [/blocks]

block. Then the computer won't wait for the message to work, it will just do it and be ready to do it again.
Hope this helps!

Happy Scratch-ing!  smile


My Dragon Egg! http://dragcave.net/image/5YUA.gif
Visit my blog: http://freyasworld.wordpress.com/

Offline

 

#6 2009-01-20 18:44:30

EveningSage
Scratcher
Registered: 2009-01-10
Posts: 65

Re: How do I shoot more then one bullet a time?

I have wondered that too how can you make a never ending gun burst.

Offline

 

Board footer