how can you check if 2keys are pressed ie right and up arrows
i tried 'if keydown(200) and keydown(205) then ' but doesnt work
thanks
i tried 'if keydown(200) and keydown(205) then ' but doesnt work
thanks
Graphics 640,480,0,2 Type Player Field Image Field X Field Y End Type Global p1.Player = New Player p1\X = 320 p1\Y = 240 p1\Image = CreateImage(32,32) SetBuffer ImageBuffer(p1\Image) Color 255,0,0 Rect 0,0,32,32,1 HandleImage p1\Image,16,16 SetBuffer BackBuffer() While Not KeyDown(1) If KeyDown(200) Then p1\Y=p1\Y - 1 If p1\Y < 0 Then p1\Y = 0 If KeyDown(205) Then p1\X=p1\X + 1 If p1\X > 640 Then p1\X = 640 EndIf EndIf If KeyDown(208) Then p1\Y=p1\Y + 1 If p1\Y > 480 Then p1\Y = 480 If KeyDown(203) Then p1\X=p1\X - 1 If p1\X < 0 Then p1\X = 0 EndIf EndIf DrawImage p1\Image, p1\X, p1\Y Flip Cls Wend End
down_key = KeyHit(208) If down_key = True Then ... If down_key = True Then ... If down_key = False Then ...