Enemy
Blob
HP = 20
MaxHP = 20
icon = 'Blob.dmi'
New()
..()
while(src)
sleep(10)
var/way = pick(NORTH,SOUTH,WEST,EAST)
step(src,way)
for(var/mob/M in world)
if(M.client && M in oview())
if(HP >= 7)
Chase(M)
else
Run(M)
proc
Chase(mob/M in world)
while(HP >= 7 && M in oview())
walk_towards(src,M,10)
sleep(8)
Run(mob/M in world)
while(src.HP <= 7 && M in oview())
walk_away(src,M,10)
Problem description:
The problem seems to only occur when there's more than one enemy on screen, but when I get the enemy's HP low enough for it to run, the game freezes.
This is a really easy fix, and you have been posting a lot lately. Try to take a look at the code and fix it yourself first, and then if you're truely stumped, we're glad to help.
Edit: And I would suggest using step_towards() and step_away() instead of walk_towards() and walk_away().