Example code i used a long time ago to help someone else. Still works:
rem ==========================================
rem Setup
rem ==========================================
sync on : sync rate 0 : hide mouse : cls
rem ==========================================
rem Messing around
rem ==========================================
ink rgb(255,0,0),0
line 0,5,4,5 : line 6,5,10,5 : line 5,0,5,4 : line 5,6,5,10
get image 1,0,0,11,11
cls
line 0,6,4,6 : line 8,6,12,6 : line 6,0,6,4 : line 6,8,6,12
get image 2,0,0,13,13
cls
line 0,7,4,7 : line 10,7,14,7 : line 7,0,7,4 : line 7,10,7,14
get image 3,0,0,15,15
cls
line 0,8,4,8 : line 12,8,16,8 : line 8,0,8,4 : line 8,12,8,16
get image 4,0,0,17,17
cls
line 0,9,4,9 : line 14,9,18,9 : line 9,0,9,4 : line 9,14,9,18
get image 5,0,0,19,19
cls
rem ==========================================
rem Make matrix
rem ==========================================
make matrix 1,2500,2500,50,50
rem ==========================================
rem Make hilly
rem ==========================================
randomize matrix 1,30
rem ==========================================
rem Make guns
rem ==========================================
make object cylinder 1,100 : color object 1,rgb(128,128,128)
make object cylinder 2,100 : color object 2,rgb(128,128,128)
rem ==========================================
rem Scale guns
rem ==========================================
scale object 1,10,100,10
scale object 2,10,100,10
rem ==========================================
rem Rotate guns
rem ==========================================
xrotate object 1,90
xrotate object 2,90
rem ==========================================
rem ********_-~Lock guns to screen~-_*********
rem ==========================================
lock object on 1
lock object on 2
rem ==========================================
rem Position guns
rem ==========================================
position object 2,15,-25,50
position object 1,25,-25,50
rem ==========================================
rem Camera setup
rem ==========================================
Set camera range 1,5000
camerax = 1250
cameray = 50
cameraz = 1250
position camera camerax, cameray, cameraz
xrotate camera 0
rem ==========================================
rem pointer effect
rem ==========================================
sprite 1,315,235,1
sprite 2,314,234,2
sprite 3,313,233,3
sprite 4,312,232,4
sprite 5,311,231,5
hide sprite 1
hide sprite 2
hide sprite 3
hide sprite 4
hide sprite 5
spr=1
rem ==========================================
rem Main loop
rem ==========================================
do
rem ==========================================
rem Gun control and movement
rem ==========================================
camangy#=camera angle y()
if rightkey()=1
yrotate camera wrapvalue(camangy#+2)
if rot#>-6 then rot#=rot#-0.4
if spr=5
else
spr=spr+1
endif
endif
if leftkey()=1
yrotate camera wrapvalue(camangy#-2)
if rot#<6 then rot#=rot#+0.4
if spr=5
else
spr=spr+1
endif
endif
if leftkey()=0 and rightkey()=0
if rot#>0
rot#=rot#-0.2
endif
if rot#<0
rot#=rot#+0.2
endif
endif
if leftkey()=0 and rightkey()=0 and upkey()=0 and downkey()=0
if spr=1
else
spr=spr-1
endif
endif
if upkey()=1
move camera 2
if spr=5
else
spr=spr+1
endif
endif
if downkey()=1
move camera -2
if spr=5
else
spr=spr+1
endif
endif
for num=1 to 5
if num=spr
show sprite num
else
hide sprite num
endif
next num
position camera camera position x(),get ground height(1,camera position x(),camera position z())+50,camera position z()
position object 1,25+rot#,-25,50
position object 2,15+rot#,-25,50
rem ==========================================
rem End Gun control and movement
rem ==========================================
sync
loop