Do you mean you want the sprite to move in steps of ten, the sprite to move every time the mouse moves 10 X, or sprite move every time the sprite moves 10?
Offline
Just add a point towards mouse pointer block in there.
Offline
Oh and do move 10 steps instead of change X by
Offline
<when green flag clicked>
<forever>
<point towards( mouse pointer)>
<move( 10 )steps>
<wait( 1 )secsc>
<end>
Last edited by Telemachus (2010-07-24 09:35:17)
Offline
Gveradux wrote:
No.. Umm....
say the mouse was on the right hand side, I want my spirte to move in 10 X until it reaches the destination, bit like a robot.
Yes thats what the script will do.
Offline
So you mean like this:
<when green flag clicked>
<forever>
<wait(0.1 secsc>
<if><( <abs( (( <x position> <-> <mouse x> )) <>> <abs( (( <y position> <-> <mouse y> )) )>
<change x by( <mouse x> <-> <x position> </> <abs( <mouse x> <-> <x position> )> <*> 10
<else>
<change y by( <mouse y> <-> <y position> </> <abs( <mouse y> <-> <y position> )> <*> 10
<end>
<end>
Something to that extent, right?
Last edited by graham7sarah9 (2010-07-24 12:51:13)
Offline
I would do something like this:
It checks if the mouse x position is divisible by 10 - essentially what you need - and then moves accordingly. There's a bit of lag, but that'll happen with any script you have that involves fast-moving mouse pointers.
Offline