So I am trying to make my character to double jump, but I either make him only jump once or jump for as many times as they want. Here is my code:
jumps = 0;
jumpsmax = 2;
jumps = jumpsmax;
if(jump && !jumpHold && jumps > 0)
jumps -= 1;
ySpeed = jPower...
I want my character to have the ability to double jump, but I'm not sure how to go about it.
This is my Step event:
key_right = keyboard_check(ord ("D"));
key_left = -keyboard_check(ord ("A"));
key_jump = keyboard_check_pressed(ord ("W"));