Hero movement only on Y axis

Hi!

I want my hero only to be moving on the Y axis. For that I placed 4 events around his position. To the left/right a blockade. Above and below a player touch event. If touched, all events and the player move up/down 1 tile. The Y range is limited by a variable.

-> This works very well until I stay on the up-key instead of only pushing it shortly. Then the strangest things happen. The hero for example walks several tiles at once up, also above the limited Y range. Interestingly enough this only happens with up, not with down even though the events are the same.

I attached the -very simple- event. Do you guys know what is happening?
most likely because you have waits in the event. A wait basically tells the engine "do not process this event for x frames, then continue" - and if you make multiple steps in that sequence, you're skipping.

but why do you make this with complex events? why not simply make a special tileset where the tiles are set to only allow movement up and down?
directional passability is an option in the tileset definition....
Haha wow that is SO easy. Sometimes it is embarrassing, how complicated my mind is searching for solutions. Thank you! 😀

p.s.: Out of curiousity I tried to remove the wait time but that didn't work. But problem solved 🙂
Blackfield, what were you exactly planning to do for your game? Only a defined spot where you can move only up and down or something else?
It will be only a small minigame as part of my main game. Basically a party member is taken hostage and the player is chasing the cabin on a horse. Then I will send im some events from left to right that the player needs to avoid. 🙂

Is there maybe a minigame publicly available that I can work with already and don't have to start from scratch?
Blackfield, for what you want to do, what Andar said will be just enough to restrict your movements.

Besides that, I would recommend taking a look at the "Events I" lesson (from my signature project). It can give you some directions on how to use events for things like that.

You will need to create events with "event touch" triggers and use switches for the desired effects. The rest is up to you! 😉

Original thread: https://forums.rpgmakerweb.com/threads/hero-movement-only-on-y-axis.136553/