WOnder

Blitz3D Forums/Blitz3D Beginners Area/WOnder

This works!!

But the thing is that you have to let the key go to make it work again!

Graphics 800,600,16,2

SetBuffer BackBuffer()

x#=0
y#=0

Repeat
Cls
Text x#,y#,"A"

If KeyHit(200)
y#=y#-5
EndIf

If KeyHit(208)
y#=y#+5
EndIf

If KeyHit(203)
x#=x#-5
EndIf

If KeyHit(205)
x#=x#+5
EndIf


Flip
Until KeyHit(1)


Pretty easy, isn't it?

If you want to make it so you don't have to release and press the key again, use KeyDown instead of KeyHit.

whats better and easier
Graphics 800,600,16,2
SetBuffer BackBuffer()

Global x#=0
Global y#=0

While Not KeyHit(1)
	Cls
	
	If KeyDown(200) Then y#=y#-5
	If KeyDown(208) Then y#=y#+5
	If KeyDown(203) Then x#=x#-5
	If KeyDown(205) Then x#=x#+5
	
	Text x#,y#,"A"
	Flip
Wend
End