keyboard input

Blitz3D Forums/Blitz3D Beginners Area/keyboard input

bazziman(Posted 2003) [#1]
Hi,

I'm having trouble with the keyboard input in my game. I have to depress and press the keys again. How do I program it so that the player can keep the keys pressed?


bazziman(Posted 2003) [#2]
Here's a code snippet btw:

Function stuur(void); rotate or move 
st=GetKey()
	
	Select st
	Case 29; down
	st=shape(px,py+1)+shape(px+plx(pr),py+ply(pr)+1)
		If st=0 
		t=speed ;(reset 'timer') 
	EndIf





Perturbatio(Posted 2003) [#3]
try Keydown instead of getkey, you'll need to change the code slightly.


bazziman(Posted 2003) [#4]
Thanks


bazziman(Posted 2003) [#5]
it works...too well! The pills in my dr. Mario clone game have gone beserk! I guess I'll have to build in a timer of sorts.