mob/npc
Rogue
name = "name"
icon = 'icon.dmi'
icon_state = "iconstate"
Health = 25
team = "team"
New()
..()
spawn(5)
src.Live()
proc/Live()
while(src)
var/mob/e
if(usr.team == "Alliance" in oview(5,src)).
step_towards(src,e)
else
sleep(10)
sleep(5)
Bump(mob/M)
if(istype(M,/mob/))
src.Eattack(M)
proc/Eattack(mob/A)
if(!canAttack) return
canAttack = FALSE
var/damage = rand(1,5)
view() << "[name] Attacked [A]"
A.Health -= damage
A.death(src)
spawn(20) canAttack = TRUE
this npc is soppost to step_towards any mobs that have team = alliance. but it doesn't step_towards any mobs.