ID:154895
 
I was creating a zombie game and I want the player to be able to start the game and all the zombies rush at him. I was thinking that I could make a loop that would run and locate the zombies and make them move. how would I do this?

My current code:
proc
Hunt()
var
mob/M = /mob/zombie
for(M)
walk_towards(src,M,1)

but this only moves 1 zombie instead of all of them? how would I do this. (examples please)
proc
Hunt()
var
mob/M = /mob/zombie
for(M)
walk_towards(src,M,1)


for(var/mob/zombie/Z in world)
walk_towards(src,Z,1)


Untested perhaps it won't work :P