Using Custom Autonomous Movement to bring Event back to Map Point

Hi all!

I've got an Event that Moves Away from Player with each press of the action button (it's for a block pushing puzzle).

What I'm curious about is having the Event slowly return back to its original position if it's not being bothered.

I'm looking through the Autonomous Movement options, but I'm not seeing one for a "Return" or "Move to X,Y."

The Set Movement options under Custom allow for a Script Call, but I'm not sure how to properly format one for this instance.

Any help would be appreciated! Thanks < 3
you'll need a pathfinding plugin that adds such commands to the script option of the movement options.

Theoretically it might be doable by eventing, but that would be a mess of conditional branches and single-step moves, having a plugin to handle that is much easier.
You could try this in a move route Script:
Code:
this.moveStraight(this.findDirectionTo(5, 6));
Replace 5 and 6 with the x and y coordinates of the destination, respectively. This should make the character take one step toward the destination using the built-in pathfinding (reliable for paths up to 12 tiles).

Like Andar says, though, a plugin (e.g. Yanfly's Move Route Core) may well be a better option.
You could try this in a move route Script:
Code:
this.moveStraight(this.findDirectionTo(5, 6));
Replace 5 and 6 with the x and y coordinates of the destination, respectively. This should make the character take one step toward the destination using the built-in pathfinding (reliable for paths up to 12 tiles).

Like Andar says, though, a plugin (e.g. Yanfly's Move Route Core) may well be a better option.
For my purposes (which are pretty small), I think this will work - it even pathfinds across the border of a scrolling map (which is cool).

thank you < 3

Original thread: https://forums.rpgmakerweb.com/threads/using-custom-autonomous-movement-to-bring-event-back-to-map-point.107307/