if you want to make go towards the sprite "3" change the angleo# code to this:
Angleo#=atanfull(sprite x(3)-sprite x(1), sprite y(1)-sprite y(3))
so the code is:
sync on
sync rate 30
load bitmap "bullet.bmp",1
get image 2,0,0,1,19
sprite 2,0,0,2
hide sprite 2
delete bitmap 1
cls
circle 10,10,10
get image 1,0,0,21,21
x=screen width()/2
y=screen height()/2
sprite 1,x,y,1
OFFSET SPRITE 1, 10, 10
cls
x=screen width()/2
y=screen height()/2
sprite 3,x+10,y+10,1
newsprite=10
do
x=sprite x(1)
y=sprite y(1)
sprite 1,x,y,1
gosub controls
gosub angle
gosub bullets
sync
loop
controls:
rotate sprite 1, Angleo#
if upkey()=1 then move sprite 3,5
if leftkey()=1 then rotate sprite 3,sprite angle(3)-5
if rightkey()=1 then rotate sprite 3,sprite angle(3)+5
return
angle:
Angleo#=atanfull(sprite x(3)-sprite x(1), sprite y(1)-sprite y(3))
set cursor 0,0
print screen fps()
return
bullets:
if mouseclick()=1
newsprite=newsprite+1
sprite newsprite ,x,y,2
rotate sprite newsprite, Angleo#+rnd(20)-10
endif
for move=11 to newsprite
if sprite exist(move)=1
move sprite move,20
if sprite X(move)<0 or sprite X(move)>screen width() or sprite Y(move)<0 or sprite Y(move)>screen height()
delete sprite move
endif
endif
next move
return
note are quite a few changes in that..
also if you don't want the inacurracy of the bullets get rid of the random bit. but then you would have to have a timer on the shot or else they just look like a line.