Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Mouse
- Failord
- Scratcher
1000+ posts
Mouse
forever
go to mousepointer
Actually,
forever
point towards mousepointer
move (10) steps
end
or if you want to get slightly more complicated,
forever
point towards mousepointer
if <not <touching mousepointer>>
move (10) steps
end
end
Thanks for the ride, Scratch Team and community! Unfortunately, the time has come for me to move on from Scratch, so I'll no longer be using the forums. Thanks again, and farewell!
Invisible text! This will show you if a profile I claim to be mine IS mine. Just remember to visit the profile and see if I confirmed in the comments.
For old time's sake, see the revolutionary Laser Battle 2.0! Also see Unstoppable Game!
And no, the evil kumquats didn't alter my signature…
- lalala3
- Scratcher
100+ posts
Mouse
Or, if you want to get even more complicated,forever
go to mousepointer
Actually,
forever
point towards mousepointer
move (10) steps
end
or if you want to get slightly more complicated,
forever
point towards mousepointer
if <not <touching mousepointer>>
move (10) steps
end
end
forever
point towards mousepointer
if<distance to mousepointer < 10>
move (distance to mousepointer) steps
else
move (10) steps
end
end
Well, that's “follow”. If you want it to just go to the same location as the mouse, use drmcw's method.
- Failord
- Scratcher
1000+ posts
Mouse
more complicated,Or, if you want to get even
forever
point towards mousepointer
if<distance to mousepointer < 10>
move (distance to mousepointer) steps
else
move (10) steps
end
end
Well, that's “follow”. If you want it to just go to the same location as the mouse, use drmcw's method.
Yup. That works as well. And it was explained better.
Thanks for the ride, Scratch Team and community! Unfortunately, the time has come for me to move on from Scratch, so I'll no longer be using the forums. Thanks again, and farewell!
Invisible text! This will show you if a profile I claim to be mine IS mine. Just remember to visit the profile and see if I confirmed in the comments.
For old time's sake, see the revolutionary Laser Battle 2.0! Also see Unstoppable Game!
And no, the evil kumquats didn't alter my signature…
- alexphan
- Scratcher
1000+ posts
Mouse
http://mv.ezproxy.com.ezproxy.canberra.edu.au/wiki/Making_a_Sprite_Follow_the_Mouse
I hope the link helps!
I hope the link helps!
- Discussion Forums
- » Help with Scripts
- » Mouse