i am having trouble moving sprites, i need the comp to move a sprite slowly so the player can go around it, i am workin on a 2d game for a start, and it is lookin down on the main charecter as they collect power ups to fight through the enemies. this is the code and i need another way of moving the sprite
gosub _load_lv1
while score = 0
gosub _play_lv1
gosub _movin
endwhile
cls
end
_load_lv1:
load image "media\boxxy.bmp",1
load image "media\boxxy-power up.bmp",2
load image "media\C-1.bmp",3
load image "media\upgrade chip.bmp",4
SPRITE 1,20,200,1
SPRITE 4,20,200,4
SPRITE 5,400,200,4
SPRITE 3,300,0,3
return
_play_lv1:
intlife= 1
intscore =1
rem this works fine
do
if upkey () =1 then rotate sprite 1,0 : move sprite 1,1
if downkey ()= 1 then rotate sprite 1,180 : move sprite 1,1
if leftkey ()= 1 then rotate sprite 1,270 : move sprite 1,1
if rightkey ()= 1 then rotate sprite 1,90 : move sprite 1,1
if sprite collision (1,4) then life = life + 1 : delete sprite 4 :print life
if sprite collision (1,5) then life = life + 1 : delete sprite 5 :print life
if sprite collision (1,3) then life = life - 1 : delete sprite 3 :print life : score = score + 1
if life < 1 then print "game Over!" : end
if life = 2 then set sprite image 1,2: print life
if life = 1 then set sprite image 1,1: print life
return
loop
rem this is the pesky sprite, it worrks fine too, but not at the samer time as the first loop
_movin:
do
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, -20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
move sprite 3, 20;wait 300
return
loop