Strict
SetGraphicsDriver GLMax2DDriver()
Graphics 640, 480, 16, 60
Global img:tImage = LoadImage("images/1.png")
Global x:Int
Global y:Int
Repeat
If (KeyDown(KEY_RIGHT))
x:+2
End If
If (KeyDown(KEY_LEFT))
x:-2
End If
If (KeyDown(KEY_UP))
y:-2
End If
If (KeyDown(KEY_DOWN))
y:+2
End If
DrawImage img, x, y
Flip
Cls
Until (KeyHit(KEY_ESCAPE))
EndGraphics()
End
When i Press simultaneous, (Up and Left) and (Up and Rigth) and (Down and Left ) and space key the image move well. In the code i don't chek the space key but when i press Down and Right and Space keys the image don't move. Any idea?.
Only happen with space key.
SetGraphicsDriver GLMax2DDriver()
Graphics 640, 480, 16, 60
Global img:tImage = LoadImage("images/1.png")
Global x:Int
Global y:Int
Repeat
If (KeyDown(KEY_RIGHT))
x:+2
End If
If (KeyDown(KEY_LEFT))
x:-2
End If
If (KeyDown(KEY_UP))
y:-2
End If
If (KeyDown(KEY_DOWN))
y:+2
End If
DrawImage img, x, y
Flip
Cls
Until (KeyHit(KEY_ESCAPE))
EndGraphics()
End
When i Press simultaneous, (Up and Left) and (Up and Rigth) and (Down and Left ) and space key the image move well. In the code i don't chek the space key but when i press Down and Right and Space keys the image don't move. Any idea?.
Only happen with space key.