Hey
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)
Offline
Simple, just:
(Whatever triggers the bullet)
Point towards mouse
Move () steps etc...
Offline
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

Offline
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.
Offline
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!!
Offline