um i still have the same problem. heres the code and the exe
its probably just me doing something wrong
sync on
rem make object plane 1,25,.5
rem position object 1,0,0,0
rem make object cylinder 2,3
rem position object 2,0,1,5
load image "media\f_z_01_d2.dds" ,1
load object "media\HUD.dbo" ,99
make object cube 3, 5
scale object 3, 1000,1,1000
position object 3, 0,-3,0
texture object 3,1
scale object texture 3,10,10
rotate object 99,0,180,0
scale object 99,10,10,10
load mesh "media\HUD.x" ,1
hide mouse
load sound "media\Automatic loop.wav" ,1
make object sphere 50,.5
hide object 50
set object speed 99,5
hide light 0
make light 1
position light 1, 0,15,0
set light range 1,15
set ambient light 80
color backdrop rgb(230,230,255)
ammo#=30
fire#=1
reload#=1
idle#=1
_LAST_SHOT = TIMER()
_BULLET_DELAY=1000
do
if idle# =1 then loop OBJECT 99, 29,55
rem if keystate(19) =1 then play object 99, 90,202
if keystate(17) =1 then loop object 99,56,71
if keystate(30) =1 then loop object 99,56,71
if keystate(32) =1 then loop object 99,56,71
if keystate(32) =1 then loop object 99,56,71
if keystate(31) =1 then idle#=0 else idle#=1
if keystate(30) =1 then idle#=0 else idle#=1
if keystate(32) =1 then idle#=0 else idle#=1
if keystate(17) =1 then idle#=0 else idle#=1
remstart camx# = camera position x()
camy# = camera position y ()
camz# = camera position z ()
camAx# = camera angle x () + 10
camAy# = camera angle y () + 180
remend camAz# = camera angle z ()
lock object on 99
offset limb 99,0,0,-3.6,10.5
ControlCamera( 0.05 )
rem position object 99, camx#,camy#,camz#
rem rotate object 99, camAx#, camAy#, camAz#
if sound playing(1) =0 then fire#=1 else fire#=0
if mouseclick () =1 and fire#=1 and ammo# =>0 then play sound 1
if sound playing(1) =1 then loop OBJECT 99,78,84 rem then play object 99,85,89
if sound playing(1)=1 and (TIMER() - _LAST_SHOT)>= _BULLET_DELAY
wait 1000
dec ammo#
_LAST_SHOT = TIMER()
endif
print ammo#
sync
loop
function ControlCamera( velocity# as float )
camXSpd# = keystate(17) - keystate(31) : camXSpd# = camXSpd# * velocity#
camZSpd# = keystate(30) - keystate(32) : camZSpd# = camZSpd# * velocity#
camYSpd# = keystate(16) - keystate(18) : camYSpd# = camYSpd# * velocity#
x# = camera position x() : y# = camera position y() : z# = camera position z()
yrotate camera wrapvalue( camera angle y() + mousemovex() / 2.0 )
`90 and 270 are the boundaries for the camera rotation in this case
`If the camera rotates out of those boundaries, the program sets it to the closest boundary
temp= wrapvalue( camera angle x() + mousemovey() / 2.0 )
if temp > 270
xrotate camera temp
else
if temp >= 180 then xrotate camera 270
endif
if temp < 90
xrotate camera temp
else
if temp < 180 then xrotate camera 90
endif
ny# = y# - camYSpd#
nx# = x# + camXSpd# * sin( camera angle y() ) + camZSpd# * sin( camera angle Y() - 90.0 )
nz# = z# + camXSpd# * cos( camera angle y() ) + camZSpd# * cos( camera angle Y() - 90.0 )
position camera (nx#), (ny#), (nz#)
endfunction
god im a pain arent i?