Hi,
I want to know how i can move an object on screen using the GetAsyncKeyState API.
This is what i have so far,
The second API call works fine if i comment out the first and vise-versa,
how can i get it so that when only the right arrow key is pressed, the character moves right, but when both the right and up arrow keys are pressed the character jumps.
Any help will be much appreciated, thanks.
I want to know how i can move an object on screen using the GetAsyncKeyState API.
This is what i have so far,
Code:
If (GetAsyncKeyState(vbKeyRight) And &H8000) <> 0 Then
'move right
ElseIf (GetAsyncKeyState(vbKeyRight) And &H8000) <> 0 And (GetAsyncKeyState(vbKeyUp) And &H8000) <> 0 Then
'jump
how can i get it so that when only the right arrow key is pressed, the character moves right, but when both the right and up arrow keys are pressed the character jumps.
Any help will be much appreciated, thanks.