can this help?
rem by Scorpyo
rem
rem ********** MAIN 1 ****************
hide mouse
sync on
backdrop on
grid=20
landsize=10000
gosub Setupland1
gosub Character
gosub Vars1
set global collision off
active=1
sync rate 60
set camera range 1,landsize+1000
gosub Resetcam
rem *****MAIN LOOP******
do
rem if inkey$()="o" then gosub shoot
gosub shoot
gosub Playercontrol
gosub camera_controls
rem Calculate position data
oldx#=x#
oldz#=z#
x#=newxvalue(x#,a#,s#)
z#=newzvalue(z#,a#,s#)
gosub update_camera
rem Update active model
h#=get ground height(1,x#,z#)
position object 1,x#,h#+5,z#
yrotate object 1,a#
rem gosub bulletpos
rem Update screen
sync
rem End loop
loop
rem ** SUBROUTINES ***************************
rem ****** CREATE LAND1 ******
Setupland1:
make matrix 1,landsize,landsize,grid,grid
update matrix 1
set ambient light 60
fog distance 20000
fog color rgb(255,255,255)
return
rem ******** VARIABLES ******
rem ****VARS1****
Vars1:
rem **Start position**
x#=landsize/2
z#=landsize/2
camdist=-300
camhgt=200
camrot=0
camlen=100
cannoncount#=50
anglecount#=0
cannonflag=0
bullcount=5
return
rem ***** PLAYERCONTROL *****
Playercontrol:
set cursor 0,0
print "Fps=",screen fps()
print "landsize=",landsize
print "grid=",grid
print "x=",x#
print "z=",z#
print "a#=",a#
print "bullx#=",bullx#
print "bullz#=",bullz#
print "cannoncount=",cannoncount#
print "anglecount#=",anglecount#
print "cannonflag=",cannonflag
print "anglrflag=",angleflag
print "bcounter=",bcounter
print "bullcount=",bullcount
rem ****Character****
if upkey()=1 and s#<12 then s#=s#+2
if downkey()=1 and s#>-12 then s#=s#-2
if leftkey()=1 then a#=wrapvalue(a#-4)
if rightkey()=1 then a#=wrapvalue(a#+4)
rem stop if "-"
if inkey$()="-" then s#=0.0
return
rem ***CONTROL EXTENSIONS ******
rem empty
rem ****ACTIVE CHARACTER****
Character:
rem tank
make object cube 1,200
scale object 1,100,60,200
rem cannon
make object cube 2,40
scale object 2,100,100,300
make mesh from object 1,2
add limb 1,1,1
offset limb 1,1,50,120,50
rem bullet
for n=5 to 30
make object sphere n,30
next n
return
camera_controls:
if inkey$()="<" then camrot2=wrapvalue(camrot2)+2
if inkey$()="z" then camdist=camdist+2
if inkey$()="x" then camdist=camdist-2
if inkey$()="b" then camrot=camrot+2
if inkey$()="n" then camrot=camrot-2
if inkey$()="c" then camhgt=camhgt+2
if inkey$()="v" then camhgt=camhgt-2
if inkey$()="m" then camlen=camlen+2
if inkey$()="," then camrot = 180
if inkey$()="." then gosub Resetcam
return
update_camera:
rem Position camera to the back of the character
cx#=newxvalue(x#,wrapvalue(a#+camrot),camdist)
cz#=newzvalue(z#,wrapvalue(a#+camrot),camdist)
cy#=get ground height(1,cx#,cz#)+playhgt
position camera cx#,cy#+camhgt,cz#
rem Point camera at object
point camera x#,y#+camlen,z#
return
rem camera reset
Resetcam:
camdist=-400
camhgt=200
camrot=0
camlen=100
return
bulletpos:
tankangle#=object angle y(1)
bullz#=z#+sin(tankangle#) * -50
bullx#=x#+cos(tankangle#) * 50
position object bullcount,bullx#,90,bullz#
yrotate object bullcount,tankangle#
return
shoot:
if cannoncount#>120 then cannonflag=1
if cannoncount#<51 then cannonflag=0
if cannonflag=0 then cannoncount#=cannoncount#+3
if cannonflag=1 then cannoncount#=cannoncount#-6
offset limb 1,1,50,120,cannoncount#
if bcounter>40 then bcounter=0
bcounter=bcounter+1
if bullcount>29 then bullcount=5:bcounter=0:hide object 30
if bcounter=40
hide object bullcount
bullcount=bullcount+1
gosub bulletpos
show object bullcount
endif
move object bullcount,100
return