zombie
New()
src.blood = 500
src.AI()
proc
AI()
while(src)
for(var/mob/player/M in view(0))
sleep(50)
var/dmg = rand(50,200)
M.blood -= dmg
Problem description:
Can anybody give me a tip on why this piece of code is lagging my entire project?
Whenever I disable it the game runs just fine, but with it, it's like running Crisis 3 on a 1980 laptop
Is the loop running infinitely and thus lagging the game ?
Ideally, when doing AI you'd do something that causes the AI to trigger when players move into view, as opposed to having them constantly checking for targets.