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

#1 2010-10-23 00:19:29

Pinkchibs
Scratcher
Registered: 2010-07-27
Posts: 9

How do I make a Sprite follow the mouse pointer?

Can someone please help me?
Thanks in advance!


http://i422.photobucket.com/albums/pp307/SkyStalkah/Emoticonz/imhappyplz.gif I'm an idiot sometimes.
But sometimes I'm not! http://i598.photobucket.com/albums/tt62/OkamiPet/Plz/icameplz.gif

Offline

 

#2 2010-10-23 00:34:21

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: How do I make a Sprite follow the mouse pointer?

If you want the sprite to 'stick' to the mouse-pointer:

[forever]
[][go to [mouse-pointer]]
[end forever]

If you want the sprite to 'move towards the mouse-pointer':

[forever]
[][point towards [mouse-pointer]]
[][move (10) steps]
[end forever]

You can change the amount of steps to increase or decrease the speed.


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#3 2010-10-23 00:58:34

Pinkchibs
Scratcher
Registered: 2010-07-27
Posts: 9

Re: How do I make a Sprite follow the mouse pointer?

Wow, I'm stupid! Thanks alot!!!


http://i422.photobucket.com/albums/pp307/SkyStalkah/Emoticonz/imhappyplz.gif I'm an idiot sometimes.
But sometimes I'm not! http://i598.photobucket.com/albums/tt62/OkamiPet/Plz/icameplz.gif

Offline

 

#4 2010-10-23 09:28:56

GraemeK
Scratcher
Registered: 2010-06-14
Posts: 73

Re: How do I make a Sprite follow the mouse pointer?

http://scratchr.webs.com/images/followmouse.gif
(Click the picture to download
the script - in a blank sprite)

Last edited by GraemeK (2010-10-24 14:31:41)


http://internetometer.com/image/13865.png

Offline

 

Board footer