ID:162476
 
Yes i am creating a Chat/Action game where people can walk around talking to people and kill monsters like bugs and demons and what not. I put in a code for the persons HP and its for every other monster. How do I make them have different HP? How do i make the Monsters attack?
mob
var/HP = 10
bug
HP = 5
player
HP = 20
Basic AI:

mob
Monster
New()
..()
Begin()
proc
Begin()
while(src)
for(var/mob/M in oview(8))
if(M.client)
step_towards(src,M)
In response to Garthor
Thx
In response to Mendon
That would crash the server, since there's no sleep() inside the while() loop.
In response to Kaiochao2536
Aside from:

1) preventing New() from returning
2) taking a step for each and every mob that is found (which is silly)
3) using usr in procs (which is Bad)