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

#1 2012-01-11 15:27:27

matthrew
New Scratcher
Registered: 2012-01-10
Posts: 8

how to shoot

im gonna make a space invaders game so could someone tell me how to make a sprite come from wherever the character is thanks

Offline

 

#2 2012-01-11 15:41:35

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

Re: how to shoot

Here is the most basic kind of script you could use to fire one bullet at a time:
http://img51.imageshack.us/img51/6850/script.gif

I could add a script to show you how to fire several at once, give me a second.

Last edited by Kileymeister (2012-01-11 15:45:53)


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

 

#3 2012-01-11 15:45:11

matthrew
New Scratcher
Registered: 2012-01-10
Posts: 8

Re: how to shoot

is it aall of that apart from the speed

Offline

 

#4 2012-01-11 15:55:10

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

Re: how to shoot

matthrew wrote:

is it aall of that apart from the speed

That should include the speed, changing the 10 in "move 10 steps" will adjust the speed of 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

 

#5 2012-01-11 16:00:54

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

Re: how to shoot

Here's one for multiple bullets:
This script goes in the ship sprite, all the variables should be "for all sprites":
http://img515.imageshack.us/img515/8739/scripti.gif
This script goes in your bullet sprite(s):
http://img825.imageshack.us/img825/6850/script.gif
The BulletNumber variable should be for that sprite only.  The first bullet gets BulletNumber set to 1, the next one 2, and so on.


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

 

#6 2012-01-11 16:15:22

matthrew
New Scratcher
Registered: 2012-01-10
Posts: 8

Re: how to shoot

thanks alot

Offline

 

Board footer