Adam Ferrell

Veteran
Veteran
Joined
Dec 12, 2012
Messages
173
Reaction score
19
First Language
English
Primarily Uses
RMMZ
Hello again.

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

Thank you.
 

Attachments

  • Ladder Turning.png
    Ladder Turning.png
    115.2 KB · Views: 9

Ahuramazda

The Last Elementalist
Veteran
Joined
Nov 9, 2012
Messages
356
Reaction score
262
First Language
English
Primarily Uses
RMMZ
Flag the tile in your tileset as a ladder and it prevents this automatically
1660499426746.png
 

Adam Ferrell

Veteran
Veteran
Joined
Dec 12, 2012
Messages
173
Reaction score
19
First Language
English
Primarily Uses
RMMZ
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.
 
Last edited:

Ahuramazda

The Last Elementalist
Veteran
Joined
Nov 9, 2012
Messages
356
Reaction score
262
First Language
English
Primarily Uses
RMMZ
*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. o_O

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.
 
Last edited:

SGHarlekin

Orc Jester
Veteran
Joined
Jun 29, 2020
Messages
555
Reaction score
479
First Language
German
Primarily Uses
RMMV
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.
 

Adam Ferrell

Veteran
Veteran
Joined
Dec 12, 2012
Messages
173
Reaction score
19
First Language
English
Primarily Uses
RMMZ
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.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,762
Reaction score
609
First Language
German
Primarily Uses
RMMV
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.
 

Adam Ferrell

Veteran
Veteran
Joined
Dec 12, 2012
Messages
173
Reaction score
19
First Language
English
Primarily Uses
RMMZ
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!
 
  • Like
Reactions: Bex

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,920
Reaction score
2,977
First Language
EN
Primarily Uses
RMMZ
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);
 

Latest Threads

Latest Posts

Latest Profile Posts

I've never felt prouder of my little game!! *o*
DamageEvil_2.png added!
index.php

Forum statistics

Threads
125,672
Messages
1,172,706
Members
164,802
Latest member
thesailing
Top