VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: Key Binding... Jack Hoxley (5 replies, 0 views) (2001-Jan-11) I think you're missing the power of things here....
take the keyboard for example;
Using DirectXEvent you check when a key event occurs and decide whether it's a Key_Up or Key_Down event (look at the numbers); then set a boolean flag
If (Event is Key_Down)
bKeyPressed = True
ElseIf (Event is Key_Up)
bKeyPressed = False
End if
therefore, the flag will be true from the time the key down occurs until the time a subsequent key_up is triggered... follow?
then, in the main loop write some code into a procedure that checks the state of a key, and if true performs that action...
If bKeyPressed = True then
'Move the player around
End if
Not too hard really :)
Jack;
|