Problems with triggering events + key input processing

A friend and I both are having issues with having a run button in our RPG Maker 2003 games in combination with triggering events on the bottom layer when touched by the hero. If the event is on the same layer as the hero or activated ANY other way besides it being on the bottom layer, it works but it's really awkward having a game where if you step into a tile one tile behind a door, you automatically teleport or something similar. So this run button thing works but once I try to step on an event tile absolutely nothing happens. Neither of us have figured out how to fix this and we've worked on it at streams for extended periods of time to no avail.

For reference, I used the "shift" key as my "run" button.

The following are links to screenshots of my method of making the aforementioned run button, all are in the common event tab:

This is the overview of how the running event is activated.

This is the running event itself.

This is the walking event / not holding down shift button event.

This is the key input processing page.

And this is the conditional branch page.

What do I do, can someone tell me what I'm doing wrong? I have no idea how this is linked to how I can't activate "Touched by Hero" events on the bottom layer and I've observed that if the character can only walk, she activates everything just fine but the moment I fix it so that she can run it just won't work. If I didn't post enough screenshots to describe what's going on, I'll be willing to post more but to my knowledge those are the only windows and pages I could think to screenshot, I don't remember there being any more to it than that. I've also tried making it so other keys were the run button but nothing happened there either.
It's because that way the run/walk common event is constantly called because "shift" is either seven or something else, and the move event probably takes precident over the one on the ground.

So use a switch to check if your running.Something like this:

>key input()

>if "shift" == 7

>  {

>  if "Running_Switch" == off

>    {

>    Call Event "Run"()

>    }

>  }

>else

>  {

>  if "Running_Switch" == on

>    {

>    Call Event "Walk"()

>    }

>  }

Of course you will have to flip the switch inside the walk/run-Event on or off respectivly

That way the Walk/Run Event is only ever called once.

I would also add a triggerswitch to the shift common event so you can disable or enable running.

One last thing if you press the shift button in the right (or rather wrong) moment you can still walk over ground level events I assume.

edit: Typo ^^
Erm, it still isn't working for me. The closest I've gotten it to work is the hero running as soon as you boot up the game but when you press shift she walks and won't run again. Another time I'm not sure what I did but she ran at random when pressing the button (sometimes it worked, sometimes it wouldn't). I've even tried recreating this but once again it doesn't work. I've tried switching the order of the called events and that didn't prove successful either. Any other methods or am I thoroughly screwed?
Can you show me the changed events? Most likely something wrong with the switches I think...

I recreated the events and it works fine for me:

Run:

[IMG]https://picload.org/image/pipraig/run.png[/IMG]

Walk:

[IMG]https://picload.org/image/pipraic/walk.png[/IMG]

Shift:

[IMG]https://picload.org/image/pipraio/shift.png[/IMG]

edit: added pictures
This  is what I ended up with. The actual "run" and "walk" events stayed the same (except when I tried putting turn on switch/turn off switch/toggle on or off switches before or after each event which didn't work either). I also tried switching the "run" with the "walk" call events, I tried putting a "toggle on/off" switch in a few places and a couple other things with the same results. She either sometimes runs and sometimes doesn't or doesn't run at all.
Ah I see you forgot to use the else handler for the variable check. ^^
OH MY GOD
IT WORKS NOW
THANK YOU SO MUCH FOR THIS WOW, I DIDN'T EVEN SEE THAT ELSE HANDLER WAS MISSINg


Allow me to bash my face into a wall for an hour or two
Very glad I could help ^^ I would strongly advice against the headbashing-thing though does not sound helpful xD

Just keep in mind that without a switch to turn it off the shift event works in cutscenes as well 😉

ps.:

for events that absolutely have to be triggered when the player is on a certain position there is a way around the possibility of pressing shift in the wrong moment and thereby skipping the event:

instead of actually using an "on player touch"-event you can make it happen by the player-position.

You need a parallel-process event that constantly saves the heroes position in two variables (one for X and Y axis)

And you need the actual event (also parallel process so don't forget to turn it off afterwards ^^) and have conditional branches to check if the position is correct and only then execute

edit: you could also add wait 0.2 sec after the key input but that of course makes it less responsive

Original thread: https://forums.rpgmakerweb.com/threads/problems-with-triggering-events-key-input-processing.51769/