mob/living/monster/butterfly
icon = 'Butterfly.dmi'
icon_state = "butterfly_white"
New()
AI()
mob/living/proc/AI()
spawn while(src)
start
walk_rand(src,10)
sleep(10)
goto start
BUT no matter what I use I can't seem to get the AI() proc to stop when the mob dies.
I have this for the death part
mob
proc
DeathCheck() //check to see if an attack is deadly
if (hp <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //give the death messaging
src.icon_state = "dead" //Also trying to find a replacement for this but ill save it for another time
src.dead = TRUE
Before you say it I have tried using
mob/living/monster/butterfly
icon = 'Butterfly.dmi'
icon_state = "butterfly_white"
New()
if(src.dead == FALSE)
AI()
As well as trying to while(src.dead == FALSE) instead of if but nothing has worked so far and I'm at a loss.
In the loop to make sure it breaks out of the loop early if need.