- Code: Select all
A=GetJoystickButton[0];
if(A==1&&canjump==1&&canpress==1)
{
jump
canjump=0;
canpress=0;
}
The player keeps jumping. It's as if I have keydown set to repeat.
How do I tell it to only jump when I tap the button ?
A=GetJoystickButton[0];
if(A==1&&canjump==1&&canpress==1)
{
jump
canjump=0;
canpress=0;
}
if (A==1) {
switch(canjump) {
case 0: canpress=0;
break;
case 1:
if (canpress==1) {
//do jump code
canjump=0;
}
break;
}
}
Jagmaster wrote:I'm having trouble with Joypad input.
- Code: Select all
A=GetJoystickButton[0];
if(A==1&&canjump==1&&canpress==1)
{
jump
canjump=0;
canpress=0;
}
The player keeps jumping. It's as if I have keydown set to repeat.
How do I tell it to only jump when I tap the button ?
Users browsing this forum: No registered users and 1 guest