Prevent turning on a ladder

Hello again.

I would like to prevent my character from turning on a ladder. I attached a picture showing my issue.

Thank you.
Flag the tile in your tileset as a ladder and it prevents this automatically
1660499426746.png
I did, but I can still turn. Must be a plugin issue.

*Edit* Okay so I checked the original RPG Maker MZ project and the ladder still allows you to turn left and right. You can't move but you can still turn. I'd like to make it so you cannot turn.
That is pretty weird to be honest, but it's a vanilla issue.

One workaround is having an event at the top and bottom of the ladder that fixes your direction, and one off the ladder that unfixes it. One annoying thing is that literally any movement process on the player freezes him in place for a brief but noticeable moment, which means any direction fixing in a parallel process freezes you in place completely.
*Edit* Okay so I checked the original RPG Maker MZ project and the ladder still allows you to turn left and right. You can't move but you can still turn. I'd like to make it so you cannot turn.
That is really weird, but looking at the base code it only changes your direction while standing on them... that seems like wrong behavior to me. 😳

You would think it would change and lock direction as long as you were on the ladder tile.

Edit: Making it set fixed direction in the code while on the ladder tile works, but if you are using show party members on map, it locks the direction they were facing before climbing the ladder. If you use a single character on the map screen it would work fine, but based on this I am def going to go with what @RianQuenlin said would probably be best even if it can be a bit janky.
I mean it is totally physically possible to stand sideways on a ladder though... I wouldn't fuzz over it too much, considering how much of a nuisance it is to fix.
I mean it is totally physically possible to stand sideways on a ladder though... I wouldn't fuzz over it too much, considering how much of a nuisance it is to fix.
I agree. I am not bothering with it anymore.

Thanks everyone.
Did you retest it in a fresh Project?
As soon you enter the ladder Tile, the Hero turns up and direction gets fixed.
The followers act correctly one by one when they follow.
Just tested in MV, works fine. Maybe something is causing this behavior, test it in a fresh MZ Project.

Edit:
Hero Enters Tile, turns up, locks direction.
Than each step one of the followers does the same.
Did you retest it in a fresh Project?
As soon you enter the ladder Tile, the Hero turns up and direction gets fixed.
The followers act correctly one by one when they follow.
Just tested in MV, works fine. Maybe something is causing this behavior, test it in a fresh MZ Project.

Edit:
Hero Enters Tile, turns up, locks direction.
Than each step one of the followers does the same.
Turns out it was a plugin. I got rid of it and now I don't turn.

Thanks!
By default ladder tiles force upward facing immediately after movement (Game_CharacterBase#increaseSteps). If you try, for example, to move sideways into an impassable wall, then you will end up facing sideways because even though you're still on a ladder tile, you haven't actually moved.

A plugin like this may work to force upward facing on ladders, but I'm not sure if it'd have any unwanted side-effects:
JavaScript:
/*:
 * @target MZ
 * @plugindesc Make characters always face up when on ladders.
 * @help Free to use and/or modify for any project, no credit required.
 */
;void (alias => {
  Game_CharacterBase.prototype.direction = function() {
    return this.isOnLadder() ? 8 : alias.apply(this, arguments);
  };
})(Game_CharacterBase.prototype.direction);

Original thread: https://forums.rpgmakerweb.com/threads/prevent-turning-on-a-ladder.150423/