Charger/Bull type enemy

I'm having some issues making an enemy (out of combat) that can pace in the players general direction, then when its x or y axis match the player it will charge it.
Thus far I've only made it charge constantly and, worse, force the player to wait to completion which never happens once it gets stuck.
I think I might recommend using something like Yanfly's Event Chase Player plugin.

Alternatively: this is a fairly simple approach, but works well in an open area without obstacles. Just give the event a Custom move route and paste these two lines into that move route as separate Script commands:
Code:
this.setMoveSpeed((this.x == $gamePlayer.x || this.y == $gamePlayer.y) ? 5 : 3);
this.moveStraight(this.findDirectionTo($gamePlayer.x, $gamePlayer.y));
The first line sets the speed of the character depending on whether the event is at either the same X or Y map coordinate as the player. The second line makes the event path toward the player using the built-in pathfinding.

Works best with the event set to maximum movement frequency (i.e. "5: Highest"). If there are obstacles you might see the event speed up when you wouldn't expect, because the speed adjustment is only based on X/Y coordinates rather than something more sophisticated.

Original thread: https://forums.rpgmakerweb.com/threads/charger-bull-type-enemy.91983/