If the other sprite knows when it stops, it can
broadcast sprite-one-stopping
and other sprites can use the message to start some action.
That is probably more reliable than watching for the x y position not to change for a while, which is what you would have to do to see the mouse stop moving.
Offline
kevin_karplus wrote:
If the other sprite knows when it stops, it can
broadcast sprite-one-stopping
and other sprites can use the message to start some action.
That is probably more reliable than watching for the x y position not to change for a while, which is what you would have to do to see the mouse stop moving.
I meant how could the sprite sense when it stops. So say sprite1 moves toward a random place. Is there a way to sense when the spirte gets to this place? (Note: I'm not asking if it can sense Where it is, I asking if it can sense When it stops)
Offline
It depends on how you tell the sprite to move.
I'd need to check, but I think if you used the glide command to go to x,y, the next instructions will not happen until it arrives.
If that isn't the case then having given a glide command you can either put a "wait" with the same duration immediately afterwards or a "wait until x x) AND y
y).
Then put whatever it is you want to happen on stopping after that command.
***
Conversely, if the sprite in question is directly controlled by the player, then you would only need to check that it wasn't recieving a move instruction.
Unless its a permanently moving sprite that the player only steers, like Pacman or my powerboat. Then it gets more complicated...
Offline