Move away from player Event stuck at corner of map

Hi experts, I set an event route to move away from player but noticed that my events that is moving away will get stuck at corners. Any idea how to resolve this? Goblin is the event and the dog is the player. There is ample space for the Goblin to move upwards but he doesn't bother to do it.
Screenshot 2022-04-08 153320.jpg
That is the result of the rather simple algorithms for pathing that come with the engine.

Theoretically it is possible to event your own evading path that works slightly better, but that is a lot of work unless you know what you're doing.

If you have no idea about pathfinding mathematics your best option is to install a plugin that provides advanced pathfinding to events.
That is the result of the rather simple algorithms for pathing that come with the engine.

Theoretically it is possible to event your own evading path that works slightly better, but that is a lot of work unless you know what you're doing.

If you have no idea about pathfinding mathematics your best option is to install a plugin that provides advanced pathfinding to events.

Someone wrote this on another thread which helps event find player by using pathfinding. This short code made the event a bit more intelligent and walk towards me instead of banging the wall silly. Was wondering if it can be reversed coded to do the same?

Game_Character.prototype.moveTowardPlayer = function() {
const d = this.findDirectionTo($gamePlayer.x, $gamePlayer.y)
this.moveStraight(d);
};

Game_Event.prototype.searchLimit = function() {
return 9999;
};
That is the result of the rather simple algorithms for pathing that come with the engine.

Theoretically it is possible to event your own evading path that works slightly better, but that is a lot of work unless you know what you're doing.

If you have no idea about pathfinding mathematics your best option is to install a plugin that provides advanced pathfinding to events.
After re-reading Andar's message I google a different set of keywords and true enough, someone else did write a code to improve the move away behavior. Here's a link to the solution.


Thanks @Andar for your comments. It helped me find the correct answer in another thread.

Original thread: https://forums.rpgmakerweb.com/threads/move-away-from-player-event-stuck-at-corner-of-map.146544/