//There is more code above this. Just using the end as example
if(M.health<=0)
del(M)
mob/someone
icon = 'monster.dmi'
health = 50
strength = 5
New()
start
for(var/mob/M in get_step(src,src.dir))
walk_rand(src,5)
sleep(10)
goto start
Problem description: I'm trying to get my mob to respawn after it is defeated. I could just give the mob its 50 health and move its location to a random location but I want it to run the New() proc again so I can make any mob regardless of its skills refresh. I can't call the New() proc.
I dont want the straight answer as I want to learn from my mistakes. Any advice you can give will be greatly appreciated. Thank you
P.S. If something in my code is "seriously" bad/wrong let me know so I can work on learning how to correct it. Thanks
Also, you probably shouldn't be using goto in that case, since a normal loop would work just fine. Your New() will actually never return, so you should probably place the AI into a separate function and spawn it.