Follow Command?

Is there anyway to script an event to follow a player while on the same map? I'm using the button command under conditional if shift is pressed move toward player. However while functional is very inconvenient. and if i set it to repeat movement it just continues to run into the player. What i really am trying to do is have the event follow the player naturally stopping one tile away from the player. Any advice is welcome.
you'll need to work with speed (how fast to move) and frequency (how often to move) in addition to just give the move toward player or approach commands.

but to stop the event one step away from the player you most likely will have to ask for a custom plugin
You could try a repeating move route with a single Script command (untested):

if ($gameMap.distance(this.x, this.y, $gamePlayer.x, $gamePlayer.y) > 1) this.moveStraight(this.findDirectionTo($gamePlayer.x, $gamePlayer.y));
I.e. "if more than 1 tile away from player, move 1 step towards player (using built-in pathfinding)".

Probably a good idea to enable Skip if Cannot Move on that route, too.
You could try a repeating move route with a single Script command (untested):

if ($gameMap.distance(this.x, this.y, $gamePlayer.x, $gamePlayer.y) > 1) this.moveStraight(this.findDirectionTo($gamePlayer.x, $gamePlayer.y));

I.e. "if more than 1 tile away from player, move 1 step towards player (using built-in pathfinding)".

Probably a good idea to enable Skip if Cannot Move on that route, too.
Thank you so much! The Script worked perfectly. Tweaked it to work with my abs system and now have a summonable creature to follow on map. Used button commands to initiate follow script and abs combat.

Original thread: https://forums.rpgmakerweb.com/threads/follow-command.149079/