How would I optimize this for better input?

Heya! I've been having some issues with this movement route loop I have for a short segment in my game.

This segment is mainly a vertical infinite runner, where the player continuously runs down a hallway avoiding holes in the floor, while being chased.

While this does work, some of the players inputs seem to get kind of eaten while this loop is going on. I've tried taking off the wait commands for each option, all options, one at a time, etc. but they all break the game in some way, mostly by having the players speed increase substantially.

(Event's trigger is Parallel)
1684578535841.png

Is there anything I can do to stop this from happening? I've let some people review the segment and the inputs not being registered has been the biggest issue.
hard to tell, as it also miss some fraction of the entire event page.
do you also have a gif or video what happens on the running?

as I think it's the "Skip" command added, what happens if you leave
that part out?

is there other events running? like timer, and what happens when it hit
the obstacle?
The problem is that if the player presses a key fast enough while the Move Down command is still executing, it will no longer be pressed when you go back to the beginning of the loop, and therefore not get detected.

The simplest solution would probably be to have another parallel event checking for keys being pressed with a short wait time, and setting a switch if they are. The main event would react to those switches instead of keys, and set the switches back to false before using the move route.
Try this Eventcode instead, its working like this in MZ, should also work in MV.
Its for 1 Parallel Event.
Code:
◆If:Switch1 is OFF
  ◆If:Button [Left] is being pressed
    ◆Control Switches:#0001 Switch1 = ON
    ◆Set Movement Route:Player (Skip)
    :                  :◇Move Lower Left
    :                  :◇Switch OFF:0001
    ◆
  :End
  ◆If:Button [Right] is being pressed
    ◆Control Switches:#0001 Switch1 = ON
    ◆Set Movement Route:Player (Skip)
    :                  :◇Move Lower Right
    :                  :◇Switch OFF:0001
    ◆
  :End
  ◆
:End
◆If:Switch1 is OFF
  ◆Set Movement Route:Player (Skip)
  :                  :◇Move Down
  ◆
:End
Try this Eventcode instead, its working like this in MZ, should also work in MV.
Its for 1 Parallel Event.
Code:
◆If:Switch1 is OFF
  ◆If:Button [Left] is being pressed
    ◆Control Switches:#0001 Switch1 = ON
    ◆Set Movement Route:Player (Skip)
    :                  :◇Move Lower Left
    :                  :◇Switch OFF:0001
    ◆
  :End
  ◆If:Button [Right] is being pressed
    ◆Control Switches:#0001 Switch1 = ON
    ◆Set Movement Route:Player (Skip)
    :                  :◇Move Lower Right
    :                  :◇Switch OFF:0001
    ◆
  :End
  ◆
:End
◆If:Switch1 is OFF
  ◆Set Movement Route:Player (Skip)
  :                  :◇Move Down
  ◆
:End
Works! Input lag is completely gone, would've never thought of this myself. Thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/how-would-i-optimize-this-for-better-input.157664/