ID:1148819
 
Basically am trying know how make a loop for NPC Procs. Because once my NPC hit my KnockOut Proc it does not return to its job :). Also to prevent a double forum post how do i make it so while ko nothing hits the dead.Example, I use a AOE skill and it still apply damage to the KO Proc and make it health goes negative.

    monster
New()
for(var/client/M in oview(6)) AI(src,M)//Checks for any players and if found calls the AI code with the NPC and said player
..()


mob
proc
ko()
if(src.dead) return
if(src.hp <= 0)
src.hp=0
src << "You've have been KO by [M]! (You will be KO for 2 minutes.)"
flick("KO",src)
icon_state="Dead"
src.frozen=1
src.dead=1
sleep(175)
src << "You've have been recover."
src.icon_state = ""
src.frozen=0
src.dead=0
src.run=1
sleep(80)
src.run=0
Have you tried:
spawn()src.ko()
spawn()M.ko()//something like this