i've made some simple code, you go forward and backwards with the w and s key, mouse to look, click to shoot, 1,2 and 3 to change type
have a look:
REM 888888888888888 READ THIS 88888888888888888
rem i made 3 difrent types, a rifle, that always hit,
rem machine gun(that hase a big spray) and a rocket launcher, you can change them
rem with the numbers 1,2 and 3 while playing.
`sync on etc
sync on
sync rate 60
autocam off
`variables
dim bullet_life#(20)
dim bullet_shot(20)
`making the bullets
for bullet = 1 to 20
make object cube bullet,2
next bullet
`simple level
make matrix 1,200,200,10,10
make object cube 30,50
position object 30,100,25,100
`main loop
do
`gosubs
gosub control_player
gosub check_type
gosub control_bullets
`sync
sync
loop
`controlling the player
control_player:
`moving
if keystate(17)=1 then move camera 1
if keystate(31)=1 then move camera -1
`get the angles
cangx#=wrapvalue(cangx#+mousemovey())
cangy#=wrapvalue(cangy#+mousemovex())
`rotate the camera
rotate camera cangx#,cangy#,0
`return to the main loop
return
`the weapon type
check_type:
if inkey$()="1"
shotgun=0
rocket=0
endif
if inkey$()="2"
shotgun=-1
shotang=rnd(30)
rocket=0
endif
if inkey$()="3"
shotgun=0
rocket=28000
rocketspeed=-2
endif
return
`controlling the bullets
control_bullets:
set cursor 0,0
`the for next bullet loop
for bullet = 1 to 20
`check if you may shoot
if may > 0 then may = may -10
if may < 1
`check if a bullet must shot
if mouseclick()=1
if bullet_shot(bullet)=0
set object to camera orientation bullet
if shotgun=-1
rotate object bullet,object angle x(bullet)-3+rnd(6),object angle y(bullet)-3+rnd(6),0
endif
bullet_shot(bullet)=1
bullet_life#(bullet)=140
may = 2000-shotgun+rocket
endif
endif
endif
`move, if may
if bullet_shot(bullet)=1
`reduce the bullet life
bullet_life#(bullet)=bullet_life#(bullet)-1
`check bullet life
if bullet_life#(bullet) < 1 then bullet_shot(bullet)=0
move object bullet,3+rocketspeed
endif
`reposition the bullets if they arent shot
if bullet_shot(bullet)=0
position object bullet,camera position x(),camera position y(),camera position z()
endif
next bullet
return
i hope that you mean something like this, good luck!
cya
syntax error??? it isn't an error, it is a feature