mob/Death_Eater_NPC
name = "Death Eater"
icon = 'Death Eater.dmi'
HP = 4000
Attack = 1000
var/target
New()
spawn(1)
Look()
proc/Look()
set background = 1
while(src)
for(var/mob/M in oview())
if(M.client)
if(M.DE)
return
else
target = M
src.dir = get_dir(src,target)
step(src,dir)
sleep(10)
new/obj/projectile/confringo(usr)
Projectile_Check()
proc/Projectile_Check()
for(var/obj/projectile/P in oview())
if(get_dist(src,P)<3)
if(P.owner == src)
return
else
var/stepchance = rand(1,2)
if(stepchance == 1)
step_away(src,P)
else
return
else
return
Problem description:
When featured in the game, it causes lag. I think it has to do with the "while" loop, but I don't know how to fix it.