It still does not work, nothing is happing at all when there health hits 0, the effect does not even dissiaper, here is my whole code in this loop of for next, look at it and mabey some one can help me n this, all the timer does is repeate its self over and over.
top of code
Dim enimyanim(20)
Dim idle(20)
Dim enemy1(20)
Dim enemy2(20)
Dim enemy3(20)
dim hittime(20)
dim EnemyHealth(20)
for nights = 5 to 20
EnemyHealth(nights)=5
next nights
Dim killed1(20)
Dim timekill(1000)
FOR NIGHTS=5 TO 20
oldx# = object position x(nights)
oldy# = object position y(nights)
oldz# = object position z(nights)
if enimyanim(nights)=1 and idle=0 then loop object nights,1,59:move object nights,0
if enimyanim(nights)=2 then loop object nights,67,97:move object nights,0.6
if enimyanim(nights)=3 then loop object nights,102,134
x# = object position x(nights)
y# = object position y(nights)
z# = object position z(nights)
rem little spheres collide with all (0)
collide = sc_sphereSlide(0,oldx#,oldy#,oldz#,x#,y#,z#,littleRadius#,nights)
if collide>0
position object nights,sc_getCollisionSlideX(),sc_getCollisionSlideY(),sc_getCollisionSlideZ():move object nights,0
endif
enemy1(nights)= CheckObjectCollisionArea(2,nights,350)
if enemy1(nights) = 1 then enimyanim(nights)=1
enemy2(nights) = CheckObjectCollisionArea(2,nights,200)
if enemy2(nights) = 1 then enimyanim(nights)=2: point object nights,object position x(2),object position y(nights),object position z(2)
enemy3(nights) = CheckObjectCollisionArea(2,nights,90)
if enemy3(nights) = 1 then enimyanim(nights)=3: point object nights,object position x(2),object position y(nights),object position z(2)
if object Collision ( 3, nights )=1 then position object 4,object position x(nights), object position y(nights)+50, object position z(nights):showstun2=1
if showstun2=1
show object 4
point Object 4, camera position x(0), camera position y(0)-2, camera position z(0)
showstuned2=showstuned2+1
endif
if showstuned2=60
showstun2=0
hide object 4
dec EnemyHealth(nights)
showstuned2=0
endif
if EnemyHealth(nights)=0 then killed1(nights)=1
if killed1(nights)=1
show object 4
point Object 4, camera position x(0), camera position y(0)-2, camera position z(0)
timekill(nights)=timekill(nights)+1
endif
if timekill(nights)=30
hide object 4
hide object nights
timekill(nights)=0
killed1(nights)=0
endif
NEXT NIGHTS
my signature keeps being erased by a mod So this is my new signature.