Give the object two instance variables, oldX and oldY. Every tick, set oldX to Object.X and oldY to Object.Y. To check if Object is moving, in an event before you update oldX and oldY, check if oldX is different from X OR oldY is different from Y. If one of the two is different, Object has moved.