Why not just make an event that sets the move route (through an event command, not setting) for exactly the amout of squares it has to move. Set it to wait until it makes all those moves, and then use a set event position command back to the other edge of the map and repeat the event. Or, alternatively, just set up the route in the event and have a parallel process event check the X position of that event and, once it reaches the edge of the map, use the set event location command.