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

#1 2008-12-14 15:45:37

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

mouse following

When you do 'point towards mouse pointer' and 'move 10 steps' ,it moves but if you stop the mouse pointer, the sprite moves to it and starts to bounce around. Any idea to prevent that?.  hmm


Hai.

Offline

 

#2 2008-12-15 09:45:12

ScratchScripter
Scratcher
Registered: 2008-08-21
Posts: 73

Re: mouse following

Use this script:
http://img237.imageshack.us/img237/814/towardsmousefw2.gif

BTW, I don't think this is the correct forum for this kind of post...

Last edited by ScratchScripter (2008-12-15 09:46:09)

Offline

 

#3 2008-12-15 14:19:53

Buddy_ca111
Scratcher
Registered: 2008-08-30
Posts: 100+

Re: mouse following

Thanks for the script!

Last edited by Buddy_ca111 (2008-12-15 14:28:07)


By reading this you agree to giving me your soul, money, passwords, projects, abiltys and your bases

Offline

 

#4 2008-12-16 09:59:00

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: mouse following

<when green flag clicked>
<forever>
  <go to[ mouse pointer ]
<end>

Offline

 

#5 2008-12-16 15:38:09

ScratchScripter
Scratcher
Registered: 2008-08-21
Posts: 73

Re: mouse following

yambanshee wrote:

[blocks]<when green flag clicked>
<forever>
  <go to[ mouse pointer ]
<end>[/blocks]

I think fg123 asked for a script that stops the sprite from bouncing around when it has reached the mouse cursor.

Last edited by ScratchScripter (2008-12-16 15:38:41)

Offline

 

#6 2008-12-17 00:02:27

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: mouse following

Thanks


Hai.

Offline

 

#7 2008-12-19 17:23:51

teguki
Scratcher
Registered: 2008-03-06
Posts: 72

Re: mouse following

do you mean like in my "AUGH! Arrows!" game?
(play it, now. why? cuz Elmo knows where you live...)

Offline

 

#8 2008-12-19 17:32:55

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: mouse following

This is not really a suggestion.

I am moving this to "all about Scratch", try posting in the correct forum.

JSO


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#9 2008-12-22 20:38:43

Buddy_ca111
Scratcher
Registered: 2008-08-30
Posts: 100+

Re: mouse following

@JSO Why isn't there a "Toturials" forum? It would make it easier  smile


By reading this you agree to giving me your soul, money, passwords, projects, abiltys and your bases

Offline

 

#10 2008-12-24 01:05:17

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: mouse following

Sorry I did it in the wrong forum.


Hai.

Offline

 

#11 2008-12-27 00:55:58

techy
Scratcher
Registered: 2008-12-17
Posts: 100+

Re: mouse following

ScratchScripter wrote:

Use this script:
http://img237.imageshack.us/img237/814/towardsmousefw2.gif

BTW, I don't think this is the correct forum for this kind of post...

I would use what ScratchScripter said...

Last edited by techy (2008-12-27 00:56:25)


Guppy Inc. making projects famous!
http://web-geeks.com/techy.gifhttp://web-geeks.com/grid.gifhttp://web-geeks.com/challenge.gif

Offline

 

#12 2009-10-21 17:32:04

shamrocker
Scratcher
Registered: 2009-03-19
Posts: 1000+

Re: mouse following

what about:

[when flag clicked]
forever
go to [ mouse-pointer]
point towards [mouse pointer]


try that!

Last edited by shamrocker (2009-10-21 17:33:17)


http://i46.tinypic.com/2s1b32e.png
respect the oxford comma

Offline

 

#13 2010-01-16 15:06:14

darkknuckles
Scratcher
Registered: 2009-09-20
Posts: 100+

Re: mouse following

[blocks]<glide( 1 )secs to x sad <mouse x>)y sad  <mouse y>

Last edited by darkknuckles (2010-01-16 15:06:42)

Offline

 

#14 2010-01-16 15:12:14

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: mouse following

darkknuckles wrote:

[blocks]<glide( 1 )secs to x sad <mouse x>)y sad  <mouse y>

fg123 wants to make it that the sprite moves a constant speed towards the mouse pointer. With that, no matter how far away the sprite is, it will take 1 second to reach the mouse.

Mods or scratch team, might want to close this... It seems to be getting filled with people who just post blocks without testing/explanation and there is already a working answer.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#15 2010-01-16 15:21:42

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: mouse following

Yes. Close this. I'm not a n00b anymore. xP


Hai.

Offline

 

#16 2010-01-16 15:34:56

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: mouse following

If you delete the first post it deletes the thread.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#17 2010-01-16 15:44:01

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: mouse following

Lol, just noticed. This was posted in 2008.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#18 2010-01-16 16:04:54

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: mouse following

Good point. Meh. I don't want to delete.


Hai.

Offline

 

#19 2010-01-16 16:27:21

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

Re: mouse following

Closing topic at request of the owner.


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

Offline

 

Board footer