Hi all, I have a question:
I am trying to make a game where the sprite follows wherever you move your cursor, is this possible? Thanks!
Offline
As Flait pointed out, it is possible, but as a precaution to avoid jumping around and flashing, add:
[forever if <not<(distance to [mouse pointer]) less than 5> >]
[][point towards [mouse pointer]]
[][move (x) steps]
[end forever]
Here's an image to help you: http://img256.imageshack.us/img256/3167 … wmouse.gif
Last edited by fg123 (2012-01-02 14:13:17)
Offline
There are two ways to do it, one of them is Flait7´s way.
Flait7 wrote:
<point towards( mouse-cursor )>
<move( x )steps>
Another way to do it is:
<forever>
<go to[ mouse pointer
<end>
Last edited by Purika (2012-01-02 14:39:16)
Offline
A really good script to make a velocity-like way of following the mouse is to do:
<green flag clicked>
<forever
<point towards mouse-pointer>
<move <<distance to mouse>/10> steps>
Last edited by Freakish (2012-01-02 14:46:10)
Offline
Thank you! I'm testing different ways to do things so it helped a lot!
Offline