Jump Common Event Issues for Platformer in MV

Trying to make a platformer in MV without any plugins, and below are the common events I have for jumping so far.

Jump up works fine normally, but I also want to have a double jump feature. It would either be double pressing up, or holding up, and the holding up script I have doesn't seem to work, since the player just jumps up regularly before the key can be held for long enough. If there's a way to do either a double jump, or a way to make holding the key work, please let me know!

I also wanted to do a diagonal jump, where the player holds both the up and left keys at the same time, but when tested it ends up just being a regular jump up. Are there any problems with my script?

Spoiler: Jump Up Common Event
1676223518650.png
Spoiler: Jump Up and Right Common Event
1676223538920.png
Try putting the Script version with arrowup AND arrowright BEFORE the version that's just the arrow up. Then put some sort of switch or such to pop it out of the event page, and then pop it back in to the event page. That way, it will check to make sure that firstly, if both are pressed, do this, if not, keep scrolling down, and see if JUST the upkey is pressed.
Hi there!

I believe the event should follow the logic that the player can only double-jump if he is already jumping and it also is not double jumping.
Some script calls that may be helping you out:

  • The button is just pressed: Input.isTriggered("buttonname")
  • The button is being held down: Input.isPressed("buttonname")
  • The player is jumping: $gamePlayer.isJumping()

So if a key is triggered and the player is not jumping, he can jump.
If a key is pressed and the player is jumping and it is not double-jumping, he can make the double jump.

I would set a switch to true when the player is double jumping. This way you can use it to check if the player is double jumping.
And set it to off when the player is not jumping anymore.
Can't believe I didn't think about switching around the order of the keys being pressed... For some reason pressing both at the same time doesn't seem to be working for me, so I decided to get rid of the script and just do if right is pressed and then another conditional branch in that for if up is pressed, and it works!

Working on the regular jump right now!

Original thread: https://forums.rpgmakerweb.com/threads/jump-common-event-issues-for-platformer-in-mv.154916/