Moving a spaceship arnd :)

Started by PanTheMan, May 21, 2010, 02:05:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PanTheMan

Hi pple,

need your help heres my code want to move the ship around the screen with the joystick but it wont work below is my code can you tell me what i`ve done wrong:

Screen open 0,320,256,32,lowres
cls 0 : flash off
x=1
y=100
bob 1,x,y,3
do
if jright(1) then x=x+1
if jup(1)    then y=y+1
if jdown(1) then y=y-1
if jleft(1) then   x=x-1
bob 1,x,y,3
loop

thnxs guys

pan


SamuraiCrow

Maybe you should look into the Double Buffer, Autoback, Wait Vbl, and Bob Update commands in the AmosPro Manual.  Particularly the Bob Update command should be what you are looking for.


PanTheMan

yay!!! it works just got it working :)