mob
Spider
name = "Spider"
icon = 'Monsters.dmi'
icon_state = "spider"
HP = 30 //this defines "Killers" health
MAXHP = 30
DMG = 1
MDMG = 5
Player = 0
EXP = 5
GOLD1 = 0
GOLD2 = 3
Respawn = 1000
delay = 20
var/mob/M
New()
. = ..()
spawn()
Wander()
proc/Wander()
while(src)
if(M in oview(5))
step_towards(src,M)
for(M in oview(1))
break
for(M in oview(2))
break
for(M in oview(3))
break
for(M in oview(4))
break
else
step_rand(src)
sleep(10)
for(M in oview(5))
break
sleep(10)
spawn(10)
Wander()
Bump(mob/M)
Fight(M)
return
proc/Fight(mob/M)
if(istype(M,/turf))
return
if(istype(M,/obj))
return
else
var/damage = rand(DMG,MDMG)
M.HP -= damage
world<< "[src] attacks you for [damage] damage!!"
Dcheck(M)
return
Problem description:At first the monsters are fine. they come after me, but if I get too far away they just group up together and sit there waiting for me to come back. I just want them to Wander() after I get out of the way.