• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Immediate button press. Help!

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;
}
 

jo-thijs

Member
If I recall correctly,
a double tab on an iphone is registered as a right mouse click,
so check for that instead.
 
D

Danr96

Guest
What if I have a double jump feature hence the jumps variable.. I only want the double jump on the on the second tap and thats the part that is delayed
 

jo-thijs

Member
I can't test on iphone myself,
but try double jumping when pressing the right mouse button
instead of at a double tab when on the iphone target.
 
Top