Thanks, it's working except for one thing, u have to keep pressing the mouse , ill keep trying to fix but here is my code.
(im working on another project but right now im using ruccus's fps tutorial code)
heres all the code
`Setup Client Options
SYNC ON:SYNC RATE 0:HIDE MOUSE
`Create all media needed
load object "C:\Documents and Settings\Kenny\Desktop\M16\m16.x", 10
position object 10,1,-1,4
rotate object 10,0,270,0
lock object on 10
MAKE OBJECT SPHERE 1,50:COLOR OBJECT 1,RGB(000,255,000)
MAKE OBJECT SPHERE 2,50:COLOR OBJECT 2,RGB(255,000,000):POSITION OBJECT 2,130,0,0
MAKE OBJECT BOX 3,100,100,5:POSITION OBJECT 3,0,0,150
MAKE OBJECT BOX 4,15,20,50:COLOR OBJECT 4,RGB(000,255,255):POSITION OBJECT 4,-40,0,0
`Add limb for intersection checks
MAKE OBJECT SPHERE 9999,10
MAKE MESH FROM OBJECT 1,9999
DELETE OBJECT 9999
ADD LIMB 1,1,1
OFFSET LIMB 1,1,0,0,500
HIDE LIMB 1,1
`Make a matrix
make matrix 1,500,500,50,50
position matrix 1, matrix position x(1)-50,matrix position y(1)-20,matrix position z(1)-50
`Add a second limb for ground checks
ADD LIMB 1,2,1
OFFSET LIMB 1,2,0,-50,0
DELETE MESH 1
HIDE LIMB 1,2
`Define the main variables needed
EnemyHP#=5000` Enemy's Health
Ammo#=30` Starting Ammo
MaxAmmo#=30` Maximum amount of Ammo
Clips#=6` Starting Clips
MaxClips#=3` Maximum amount of Clips
JUMPING#=0
JUMP$="Jumping"
ShootDelay = Timer()
`Start main DO/LOOP
DO
`Camera Positioning
POSITION CAMERA OBJECT POSITION X(1),OBJECT POSITION Y(1),OBJECT POSITION Z(1)
if object position y(1) > matrix position y (1)+6 and JUMPING#=0 then position object 1,OBJECT POSITION X(1),matrix POSITION Y(1)+6,OBJECT POSITION Z(1)
if object position y(1) < matrix position y (1)+6 then position object 1,OBJECT POSITION X(1),matrix POSITION Y(1)+6,OBJECT POSITION Z(1)
`Movement Controls
IF KEYSTATE(17)=1 THEN MOVE OBJECT 1,.5
IF KEYSTATE(31)=1 THEN MOVE OBJECT 1,-.5
IF KEYSTATE(30)=1 THEN MOVE OBJECT LEFT 1,.3
IF KEYSTATE(32)=1 THEN MOVE OBJECT RIGHT 1,.3
`Space key Controls
IF SPACEKEY()=1 AND JUMPING#=0 THEN JUMP#=1
`JUMP Variable Definition
IF JUMP#=1
GROUND#=OBJECT POSITION Y(1)
JUMP_SPEED#=.5
JUMPING#=1
JUMP#=0
ENDIF
`Jumping
IF JUMPING#=1
DEC JUMP_SPEED#,.015
POSITION OBJECT 1,OBJECT POSITION X(1),OBJECT POSITION Y(1)+JUMP_SPEED#, OBJECT POSITION Z(1)
IF OBJECT POSITION Y(1)<=GROUND# THEN JUMPING#=0
ENDIF
`Mouse Camera Movement
CAMY#=CAMY#+MOUSEMOVEX()*.3
CAMX#=CAMX#+MOUSEMOVEY()*.3
IF CAMX#>90 AND CAMX#<135 THEN CAMX#=90
IF CAMX#>270 AND CAMX#<225 THEN CAMX#=90
YROTATE CAMERA CAMY#
XROTATE CAMERA CAMX#
YROTATE OBJECT 1,CAMY#
XROTATE OBJECT 1,CAMX#
`Mouseclick Shooting
IF KEYSTATE(19)=0 AND MOUSECLICK()=1
IF Ammo#>0
`bullet delay
if mouseclick()=1 and Timer()-ShootDelay > 5000/30 then dec Ammo#
IF OBJECT EXIST(2)=1
IF Ammo#>0 AND INTERSECT OBJECT (2, LIMB POSITION X(1,1), LIMB POSITION Y(1,1), LIMB POSITION Z(1,1), OBJECT POSITION X(1),OBJECT POSITION Y(1), OBJECT POSITION Z(1))>0 THEN DEC EnemyHP#,1
shootdelay = Timer()
ENDIF
ENDIF
ENDIF
`Check if the enemy should die, if so delete it
IF EnemyHP#=0 AND OBJECT EXIST(2)=1 THEN DELETE OBJECT 2
`Reloading (press R)
IF MOUSECLICK()=0 AND KEYSTATE(19)=1 AND Ammo#<MaxAmmo# AND Clips#>0
Reload#=1
ENDIF
`Reloading Part 2 (delay)
IF Reload#=1 THEN INC Time#,.001
IF Time#>=1 THEN Ammo#=MaxAmmo#:DEC Clips#,1:Time#=0:Reload#=0
`Ammo Crate code (obtain ammo from ground)
IF OBJECT EXIST(4)=1
IF Ammo#<MaxAmmo# AND INTERSECT OBJECT (4, LIMB POSITION X(1,2), LIMB POSITION Y(1,2), LIMB POSITION Z(1,2), OBJECT POSITION X(1),OBJECT POSITION Y(1), OBJECT POSITION Z(1))>0
INC Clips#,(MaxClips#-Clips#)
INC Ammo#,(MaxAmmo#-Ammo#)
DELETE OBJECT 4
ENDIF
ENDIF
`Display text above enemy and crate object
IF OBJECT EXIST(2)=1 THEN CENTER TEXT OBJECT SCREEN X(2),OBJECT SCREEN Y(2)-70,"Enemy Health: "+str$(EnemyHP#)
IF OBJECT EXIST(4)=1 THEN CENTER TEXT OBJECT SCREEN X(4),OBJECT SCREEN Y(4)-20,"Ammo Crate"
`Display our Ammo and Clips on-screen
TEXT 0,SCREEN HEIGHT()-50,"Ammo: "+str$(Ammo#)
TEXT 0,SCREEN HEIGHT()-40,"Clips: "+str$(Clips#)
`Show that we're reloading
IF Reload#=1 THEN CENTER TEXT SCREEN WIDTH()/2,SCREEN HEIGHT()/2,"Reloading..."
`Add a target reticule to the screen
CIRCLE SCREEN WIDTH()/2,SCREEN HEIGHT()/2,5
`Refresh the screen(SYNC) and call the LOOP function
SYNC
LOOP
what is left behind is left behind, but what is ahead might make a difference to whats left behind.