Hi !
in my game i used a poor code to move my ship with the mouse !!! Could you help me to transform this to an interesting very cool super pro movement code ! ;-)
Thanks !
see also : http://www.blitzbasic.com/Community/posts.php?topic=57242
in my game i used a poor code to move my ship with the mouse !!! Could you help me to transform this to an interesting very cool super pro movement code ! ;-)
Thanks !
see also : http://www.blitzbasic.com/Community/posts.php?topic=57242
Graphics 800,600 HideMouse() MoveMouse GraphicsWidth()/2, GraphicsHeight() / 2 OldMouseX = MouseX() OldMouseY = MouseY() PosX = MouseX() PosY = MouseY() While Not KeyDown (KEy_ESCAPE) DeltaX = MouseX() - OldMouseX DeltaY = MouseY() - OldMouseY If DeltaX <> 0 Then If (DeltaX > 0 And PosX < GraphicsWidth() - 20) Then PosX = PosX + DeltaX If (DeltaX < 0 And PosX > 20) Then PosX = PosX + DeltaX End If If DeltaY <> 0 Then If (DeltaY > 0 And PosY < GraphicsHeight() - 20) Then PosY = PosY + DeltaY If (DeltaY < 0 And PosY > 20) Then PosY = PosY + DeltaY End If OldMouseX = MouseX() OldMouseY = MouseY() Cls DrawOval PosX, PosY, 50,50 Flip Wend ShowMouse()