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

#1 2012-07-10 08:23:25

DPS2004
Scratcher
Registered: 2012-07-07
Posts: 3

how do make a space ship shoot when you press space???????????

i can't do it

Offline

 

#2 2012-07-10 08:29:13

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: how do make a space ship shoot when you press space???????????

DPS2004 wrote:

i can't do it

when gf clicked
forever if <key [space v] pressed?>
wait until <not <key [space v] pressed?>>
shooting script here


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#3 2012-07-10 09:51:53

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: how do make a space ship shoot when you press space???????????

jontmy00 wrote:

DPS2004 wrote:

i can't do it

when gf clicked
forever if <key [space v] pressed?>
wait until <not <key [space v] pressed?>>
shooting script here

That script would have to be on the projectile.
Shooting script:

goto [SpaceShip v]
point in direction ([direction v] of [SpaceShip v])
repeat until <<touching [Target v]?> or <touching [edge v]?>>
move [Projectile Speed] steps

Offline

 

#4 2012-07-10 13:26:50

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

Re: how do make a space ship shoot when you press space???????????

when gf clicked
if when space pressed
forever
show
go to [space ship]
point towards [mouse pointer]
repeat until [touching edge]
move 15 spteps
if touching [edge]
hide


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

#5 2012-07-10 13:44:43

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: how do make a space ship shoot when you press space???????????

I have a shooting game that is like that.  Check out my profile and go to Zombie Defense or Two-player Shooter.


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#6 2012-07-13 11:32:24

marcin388
Scratcher
Registered: 2011-11-24
Posts: 100+

Re: how do make a space ship shoot when you press space???????????

You can use code from my game, it has shooting spaceships  smile

My game with spaceships


If you like shooter and adventure games: Space Adventures Underwater Adventures These are the two professional scratch games made by me, hope you enjoy them.

Offline

 

#7 2012-07-13 22:26:08

lhlien
Scratcher
Registered: 2012-02-05
Posts: 23

Re: how do make a space ship shoot when you press space???????????

This might help. Make the spaceship, and the object that you want to shoot two separate sprites.

when gf clicked
go to (spaceship)
repeat until <touching edge>
     change y by (10)
end


http://s1162.beta.photobucket.com/user/Victini999/media/e350abb2.png.html

Offline

 

#8 2012-07-13 22:27:39

lhlien
Scratcher
Registered: 2012-02-05
Posts: 23

Re: how do make a space ship shoot when you press space???????????

lhlien wrote:

This might help. Make the spaceship, and the object that you want to shoot two separate sprites.

when gf clicked
go to (spaceship)
repeat until <touching edge>
     change y by (10)
end

Oopss.... The spaceship is a sprite and the touching edge is did wrong. You'll understand.


http://s1162.beta.photobucket.com/user/Victini999/media/e350abb2.png.html

Offline

 

#9 2012-07-14 02:41:42

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: how do make a space ship shoot when you press space???????????

bullelk12 wrote:

when gf clicked
forever
if <key [space v] pressed?>
show
go to [SpaceShip v]
point towards [mouse-pointer v]
repeat until (touching [edge v]?)
move [ProjectileSpeed] steps
end
hide
end

It would look better if the spaceship were facing the same way... I improved it as well as fixing it.

lhlien wrote:

This might help. Make the spaceship, and the object that you want to shoot two separate sprites.

when gf clicked
go to (spaceship)
repeat until <touching [edge v]?>
     change y by (10)
end

Fixed

Last edited by Splodgey (2012-07-14 02:48:30)

Offline

 

#10 2012-07-14 04:58:02

Gamingrulez
New Scratcher
Registered: 2012-07-13
Posts: 4

Re: how do make a space ship shoot when you press space???????????

could people please look at some of my stuff not many people are

Offline

 

#11 2012-07-14 07:01:01

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: how do make a space ship shoot when you press space???????????

Gamingrulez wrote:

could people please look at some of my stuff not many people are

If you want people to view your projects, post a thread in the show and tell section to advertise it.

Last edited by Splodgey (2012-07-14 07:01:26)

Offline

 

#12 2012-10-04 14:56:35

DPS2004
Scratcher
Registered: 2012-07-07
Posts: 3

Re: how do make a space ship shoot when you press space???????????

i think that is all i need_meow_

Offline

 

#13 2012-10-04 20:39:52

awesomeness321
Scratcher
Registered: 2012-08-10
Posts: 100+

Re: how do make a space ship shoot when you press space???????????

Splodgey wrote:

bullelk12 wrote:

when gf clicked
forever
if <key [space v] pressed?>
show
go to [SpaceShip v]
point towards [mouse-pointer v]
repeat until (touching [edge v]?)
move [ProjectileSpeed] steps
end
hide
end

It would look better if the spaceship were facing the same way... I improved it as well as fixing it.

lhlien wrote:

This might help. Make the spaceship, and the object that you want to shoot two separate sprites.

when gf clicked
go to [spaceship v]// [spaceship v], not (spaceship)
repeat until <touching [edge v]?>
     change y by (10)
end

Fixed

Fixed again.


My newest project:http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1Color:#30F9A5 I am currently http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=onlineStatus&amp;type=text

Offline

 

#14 2012-10-05 12:04:56

dvd4
Scratcher
Registered: 2010-06-30
Posts: 1000+

Re: how do make a space ship shoot when you press space???????????

DPS2004 wrote:

i think that is all i need_meow_

_meow_ only works on the main site


I made a mod  big_smile  It's called blook!
http://i49.tinypic.com/16ia63p.png

Offline

 

Board footer