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

#1 2008-07-18 10:38:35

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Bullet Sprite

Hey  smile

I was wondering if there is anyway to make a bullet rotate to the direction of the mouse pointer.

I have a gun, which points towards the mouse pointer and the bullet points towards the mouse pointer, however it is just a horizontal bullet, so it looks a bit stupid if you are shooting at an angle.

So my question is, can you make it so the bullet rotates to the direction of the mouse?

http://scratch.mit.edu/projects/Dan01/218712

Last edited by Dan01 (2008-07-19 05:27:32)


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#2 2008-07-19 05:22:38

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Bullet Sprite

Bump!

Help please?


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#3 2008-07-19 05:24:26

Llamalover
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: Bullet Sprite

Simple, just:
(Whatever triggers the bullet)
Point towards mouse
Move () steps etc...


Be nice, I'm an old lady  wink

Offline

 

#4 2008-07-19 05:25:56

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Bullet Sprite

Llamalover wrote:

Simple, just:
(Whatever triggers the bullet)
Point towards mouse
Move () steps etc...

Actually, you need it like this:

<point towards( mouse-pointer
<repeat until>

That way it only points when you fire it


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#5 2008-07-19 05:26:18

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Bullet Sprite

Nah still doesn't work.

I'll upload it and if you could, download it and have a look at it please?


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#6 2008-07-19 05:27:19

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Bullet Sprite

http://scratch.mit.edu/projects/Dan01/218712


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#7 2008-07-19 05:28:23

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Bullet Sprite

Press space to fire the bullet. You will see what I mean...


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#8 2008-07-19 05:33:14

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

Re: Bullet Sprite

The problem is that your first bullet sprite has the costume set to "left-right face only".  Set it to "rotate" and your problem is cured.  Look for the little buttons near the top of the center scripting area, up by the sprite name.


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

Offline

 

#9 2008-07-19 05:39:37

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Bullet Sprite

Paddle2See wrote:

The problem is that your first bullet sprite has the costume set to "left-right face only".  Set it to "rotate" and your problem is cured.  Look for the little buttons near the top of the center scripting area, up by the sprite name.

Thanks so much!!  big_smile


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

Board footer