Hello guys! Thank you very much for your help!
Hello everybody!
I created a crappy game that the only thing it does is to show an aircraft and by pressing the arrow keys can go up,down,left,right.. and with the space.. shoots!
The problem is that if I press the space bar to shoot while I have the UP button pressed, the aircraft stops, shoots and stays there.. I have to press again the UP button so the aircraft to continue going UP.. When I need to shoot many times, I have to press space and UP button all the time..
For example..
I also use an arcade joystick to play the game(it is connected through arduino ) and this problem does not occur probably because serial sends data continuously while the key variable holds the last button pressed..
So the question is.. Is there anyway to make the aircraft to continue its movement after the space bar is pressed?
I hope you understand what I ask..
Thank you in advance!
Hello everybody!
I created a crappy game that the only thing it does is to show an aircraft and by pressing the arrow keys can go up,down,left,right.. and with the space.. shoots!
The problem is that if I press the space bar to shoot while I have the UP button pressed, the aircraft stops, shoots and stays there.. I have to press again the UP button so the aircraft to continue going UP.. When I need to shoot many times, I have to press space and UP button all the time..
For example..
I also use an arcade joystick to play the game(it is connected through arduino ) and this problem does not occur probably because serial sends data continuously while the key variable holds the last button pressed..
So the question is.. Is there anyway to make the aircraft to continue its movement after the space bar is pressed?
I hope you understand what I ask..
Thank you in advance!
1