thx i have tried myself here is the code i had
SYNC ON:SYNC RATE 0:HIDE MOUSE
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
make object sphere 5,20:color object 5,rgb(000,000,255):position object 5, 5,50,50
make object box 6,500,1,600:color object 6,rgb(100,100,000):position object 6,-1,-20,0
load object "sword.3ds", 8
load image "cube1_au.bmp", 1
texture object 8, 1
Fix object pivot 8
Scale object 8,100,100,100
position object 8,0,-7,15
Lock object on 8
if mouseclick()=1;
rotate object 8,0,90,0
if object collision (8,2)
dec enemyHP# - 500
wait 3000
rotate object 8,0,-90,0
endif
endif
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
ADD LIMB 1,2,1
OFFSET LIMB 1,2,0,-50,0
DELETE MESH 1
HIDE LIMB 1,2
EnemyHP#=2000` Enemy's Health
Ammo#=1000` Starting Ammo
MaxAmmo#=1000` Maximum amount of Ammo
Clips#=3` Starting Clips
MaxClips#=3` Maximum amount of Clips
JUMPING#=0
JUMP$="Jumping"
gravity#=0
gravity$="gravity"
DO
POSITION CAMERA OBJECT POSITION X(1),OBJECT POSITION Y(1),OBJECT POSITION Z(1)
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
IF SPACEKEY()=1 AND JUMPING#=0 THEN JUMP#=1
IF JUMP#=1
GROUND#=OBJECT POSITION Y(1)
JUMP_SPEED#=0.5
JUMPING#=1
JUMP#=0
ENDIF
IF JUMPING#=1
DEC JUMP_SPEED#,.001
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
CAMY#=CAMY#+MOUSEMOVEX()*.1
CAMX#=CAMX#+MOUSEMOVEY()*.1
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#
IF EnemyHP#=0 AND OBJECT EXIST(2)=1 THEN DELETE OBJECT 2
IF MOUSECLICK()=0 AND KEYSTATE(19)=1 AND Ammo#<MaxAmmo# AND Clips#>0
Reload#=1
ENDIF
IF Reload#=1 THEN INC Time#,.001
IF Time#>=1 THEN Ammo#=MaxAmmo#:DEC Clips#,1:Time#=0:Reload#=0
IF OBJECT EXIST(4)=1
INC Clips#,(MaxClips#-Clips#)
INC Ammo#,(MaxAmmo#-Ammo#)
DELETE OBJECT 4
ENDIF
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"
TEXT 0,SCREEN HEIGHT()-50,"Ammo: "+str$(Ammo#)
TEXT 0,SCREEN HEIGHT()-40,"Clips: "+str$(Clips#)
IF Reload#=1 THEN CENTER TEXT SCREEN WIDTH()/2,SCREEN HEIGHT()/2,"Reloading... please wait"
CIRCLE SCREEN WIDTH()/2,SCREEN HEIGHT()/2,5
SYNC
loop
i allways try befor i ask
www.madninjas.co.nr we are mad and we are ninjas