var/turf/home |
this is an npc that is soppost to follow mobs with the team= "Alliance" and then when that mob gets out of range, this npc goes back to its home. but then this npc just stays in 1 spot and when a mob comes closer to it, it attacks but doesn't follow
----
This is how it is when it follows every mob.
var/turf/home
New()
. = ..()
home = loc
spawn Life()
proc/Life()
while(1)
var/mob/M
for(M in oview(5, src)) break
while(M)
if(M in oview(1, src))
step_towards(src, M)
else if(M in oview(5, src))
step_to(src, M)
else
M = null
break
sleep(10)
if(home in oview(6, src))
step_towards(src, home)
sleep(25)