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,
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,