The MOVE SPRITE command was designed to work with the ROTATE SPRITE command. It will move the sprite based on the current rotation of the sprite.
` Make a box
ink rgb(0,255,0),0
box 0,0,50,50
ink rgb(0,0,255),0
circle 25,0,10
` Grab the image
get image 1,0,0,50,50,1
` Create a timer
tim=timer()
` Create the sprite
sprite 1,screen width()/2-25,screen width()/2-25,1
` Offset the sprite to it's center
offset sprite 1,25,25
do
` Check the timer
if timer()>tim+20
` Left Arrow
if keystate(203)
dec Angle
rotate sprite 1,wrapvalue(Angle)
endif
` Right Arrow
if keystate(205)
inc Angle
rotate sprite 1,wrapvalue(Angle)
endif
` Up Arrow
if keystate(200) and Speed+1<5
inc Speed,1
endif
` Down Arrow
if keystate(208) and Speed-1>-1
dec Speed,1
endif
` Check the speed
if Speed>0
` Move the sprite
move sprite 1,Speed
endif
` Reset the timer
tim=timer()
endif
loop