Trying to make overshooting/undershooting jump mechanic.

I've been trying to create a jumping mechanic by hand, without plugins, where it is possible to overshoot or undershoot a jump.

What I tried to start off with is a common event 'Jumptime' to time the jump. Where when a second goes by, the 'jumptimer' variable changes and determines. In a nutshell, it goes like:

If Button 'OK' is pressed;
If player is facing 'Right';
then
-set the variable 'jumptimer' to 0 (this is the value that cancels the 'Jumptimer' event)
-wait 60 frames (1 second)
-set the variable 'jumptimer' to 1
-wait 60 frames (1 second)
-set the variable'jumptimer' to 2
-wait 60 frames (1 second)
-set the variable 'jumptimer' to 1
-wait 60 frames (1 second)
loop

What is supposed to happen, according to my next common event, is while the 'Jumptime' event is running, pressing the OK button would initiate the jump.

If the 'jumptimer' variable is NOT = to 'badjump' variable (which is preset to 1 or 2 when you walk onto the square), you hop to the other side.

But if the 'jumptimer' = 'badjump', you fall in the water instead.

When 'jumptimer' is 0, it cancels the 'Jumptime' event.

So far, it's all done with common events, but it's not quite working. Does anyone have any suggestions?

So far,
I'm not 100% sure I understand what you're trying to achieve. Do you want to start the jump event (in a specific spot) with action button and then wait for another action button press and the result depends on how much time has passed between the presses?

What you could do is have the first press turn on a switch to start a parallel common event. There you have a conditional checking for the button press and also a timer variable that increases. Then when you press the button to jump it checks that variable. If variable is <60 -> short jump, if variable is 60-120 -> good jump, if variable >120 long jump, if variable >180 cancel jump (turn off switch). Then when you jump or cancel you also set the timer variable back to 0. And you can also set that if the player moves, the jump is cancelled (switch turned off).
(I guess you also have to set it up so that the parallel event doesn't activate until you have released the first action button press from the jump event start.)

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-make-overshooting-undershooting-jump-mechanic.168250/