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

#1 2008-07-16 09:45:20

younganimator12
Scratcher
Registered: 2008-07-16
Posts: 1

space bar fire object

i am currently building a scracth animation and i need some help with. my animation script is:
when left arrow key is pressed
turn left 15  degrees
when right arrow key is pressed
turn right 15 degrees.
and it is animating a cat which spins around and i need to make fire other objects to hit oppents.
how do you program the space bar to fire other objects when pressed?

Offline

 

#2 2008-07-16 13:24:14

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: space bar fire object

You actually program the projectile.  Create a ball or a bullet sprite and script it something like:

When Green Flag Clicked
Hide

When Space Pressed
Go To Cat
Show
Point in Direction Direction of Cat
Repeat Until Touching Edge or Touching Target
     Move 5 Steps
End Repeat
Hide


Something along those lines.  Hope that helps


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2008-07-16 13:35:55

Super_smash_brother
Scratcher
Registered: 2008-07-16
Posts: 5

Re: space bar fire object

And too this aint real(impossible).Zelda123 has 2800 messages
_________________________________________________________________________________

ok too mun

Offline

 

#4 2008-07-16 16:08:30

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: space bar fire object

Super_smash_brother wrote:

And too this aint real(impossible).Zelda123 has 2800 messages
_________________________________________________________________________________

ok too mun

Please keep the formum posts on-topic.  Thank you.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer