Diagonal Movement Problem

Hello, I have yet another problem. Apparently, when I set a movement route to move an event diagonally, and set it to "skip if cannot move," instead of skipping the diagonal movement, the event moves orthogonally instead. I'm trying to make a bouncing effect for an event and this ruins it.
Hi there!

You should send a screenshot of your move route command.

The problem is that when trying to move diagonally and fails, the code still changes the character direction:
JavaScript:
Game_CharacterBase.prototype.moveDiagonally = function(horz, vert) {
    this.setMovementSuccess(this.canPassDiagonally(this._x, this._y, horz, vert));
    if (this.isMovementSucceeded()) {
        this._x = $gameMap.roundXWithDirection(this._x, horz);
        this._y = $gameMap.roundYWithDirection(this._y, vert);
        this._realX = $gameMap.xWithDirection(this._x, this.reverseDir(horz));
        this._realY = $gameMap.yWithDirection(this._y, this.reverseDir(vert));
        this.increaseSteps();
    }
    if (this._direction === this.reverseDir(horz)) {
        this.setDirection(horz);
    }
    if (this._direction === this.reverseDir(vert)) {
        this.setDirection(vert);
    }
};

So, after that, the move route advances if your movement succeeds or if the move route is skippable. So if you have a next command that is face forward or backward, it will move aqccording to the direction the event is, which the moveDiagonally method changed.
JavaScript:
Game_Character.prototype.advanceMoveRouteIndex = function() {
    var moveRoute = this._moveRoute;
    if (moveRoute && (this.isMovementSucceeded() || moveRoute.skippable)) {
        var numCommands = moveRoute.list.length - 1;
        this._moveRouteIndex++;
        if (moveRoute.repeat && this._moveRouteIndex >= numCommands) {
            this._moveRouteIndex = 0;
        }
    }
};

Without a plugin, I believe the solution would be to use a script condition on the move route itself to check if the character can move diagonally. If it can't move diagonally, then you try to force the end of the movement route. Something like that:

1779846442346.png


Another problem is, I don't know if 1 Step Forward will move your character diagonally. Well, but I really do not have any details of your move route, so i'm not going into this right now.
The script calls:

if(!this.canPassDiagonally(this._x, this._y, horz, vert)) this._moveRouteIndex = -1
Or
if(!this.canPassDiagonally(this._x, this._y, horz, vert)) this._moveRouteIndex = this._moveRoute.list.length

Change the horz to a horizontal direction (4 or 6)
Change vert to a vertical direction(2 or 8)
Screenshot 2026-05-26 185904.png

In it's simplicity, it's just this, except with about 15 of each command to ensure it hits the walls before "bouncing"
On second thought, this wouldn’t even work for a realistic ricochet effect. I need the event in question to move like the classic DVD bouncing logo.

Original thread: https://forums.rpgmakerweb.com/threads/diagonal-movement-problem.183822/