You can easily control a sprite's motion by making it go to the mouse pointer:
<go to[mouse-pointer]>
BUT...
what if you want the sprite to move in the opposite direction to the mouse.
In this case, you can:
Go to
X (mouse X - (mouse X*2)),
Y (mouse Y - (mouse Y*2))
For an example of how to reverse the mouse see MrShah's Feed Gobo project:
http://scratch.mit.edu/projects/MrShah/31797
Scratch On!
MrShah
Search for "Scratch On!" on Facebook. It's a new group...just for us!
http://www.facebook.com/group.php?gid=4750062684
Last edited by MrShah (2007-08-25 14:59:39)
Offline
Would
Goto x: (Mousex * -1), y:(mouseY * -1)
work as well?
Offline
(mouse X - (mouse X*2 )) is equal to (mousex*-1)
(mouse Y - (mouse Y*2 )) is equal to (mousey*-1)
Offline
MrShah, ckeck out my virus game, you can get some of those little reverse mouse formulas from it
Offline
no prob
Offline