I have this shooter I have been working on and I'm trying to move the sprite for the shot across the screen, and i've tried everything and copied what I saw in the shooter tutorials but the most I could do for some reason was just put it on screen where it was supposed to start. I've included my code up till then and was wondering if anyone had any suggestions on how I could go about doin this, and how i could have it retart after it goes off screen.
rem start
sync on
sync rate 1000
hide mouse
set display mode 1024,768,32
rem images
load image "clouds.bmp",1,1
load image "yourship1.bmp",2,1
load image "Surge1.bmp",3,1
load image "Surge2.bmp",4,1
load image "Shot1.bmp",5,1
sprite 2,shipx,shipy,2
rem variables
shipx=200
shipy=100
enemx=rnd(1024)+500
enemy=rnd(768)
PF=0
Bx=sprite x(2)+73
By=sprite y(2)+15
enemx=rnd(1024)+500
enemy=rnd(768)
Fire=0
rem making world
make object cube 1,100
scale object 1,200,200,200
texture object 1,1
rem loop
do
scroll object texture 1,0.001,0.0
sprite 2,shipx,shipy,2
gosub Control
sync
loop
Control:
if upkey()=1 and shipy>3
dec shipy,3
endif
if downkey()=1 and shipy<740
inc shipy,3
endif
if leftkey()=1 and shipx>3
dec shipx,3
endif
if rightkey()=1 and shipx<950
inc shipx,3
endif
return