D
Danr96
Guest
On my computer, the double jump in my game works immediately with the mouse double click function. But, when I am testing on my Iphone the double click with my finger is delayed/not working if done too quickly.
The code I use is this:
Step Event (Player):
if(mouse_check_button_pressed(mb_left) && (mouse_x < room_width / 2) && jumps > 0 && playerLeft == 1) {
jumps -= 1;
horizontalSpeed = -jumpSpeed;
}
if(mouse_check_button_pressed(mb_left) && (mouse_x > room_width / 2) && jumps > 0 && playerRight == 1) {
jumps -= 1;
horizontalSpeed = jumpSpeed;
}
The code I use is this:
Step Event (Player):
if(mouse_check_button_pressed(mb_left) && (mouse_x < room_width / 2) && jumps > 0 && playerLeft == 1) {
jumps -= 1;
horizontalSpeed = -jumpSpeed;
}
if(mouse_check_button_pressed(mb_left) && (mouse_x > room_width / 2) && jumps > 0 && playerRight == 1) {
jumps -= 1;
horizontalSpeed = jumpSpeed;
}