mob/Zombie//Defines a /mob/NPC
icon = 'Zombie.dmi'
hp = 10//different health than the main mob
Click()//When clicked
usr.attack(src)//attack!
proc/move()//Now, this proc handles NPC movement
rundelay=12
for(var/mob/M in oview())//loops over all mobs in view
if(get_step_away(src,M,3))//checks distance
if(!M.client)//Not a player
continue//continues through the loop
else//Player
walk_to(src,M,1,2)//Move to the person
else//4-or-more spaces away
continue
spawn(40) move()//loops the proc after 2 seconds
proc/attackplayer()//Handles attacking
for(var/mob/M in oview(1))//Within one space this time
if(get_step_away(src,M,1))
if(!M.client)
continue
else
src.attack(M)//Calls the attack proc
else
return..()
spawn(20) attackplayer()
New()//When created
attackplayer()//Calls the procs for it
move()
mob
var
speeding = 0
rundelay = 3 //Set this to different settings to control how slow the mob walks.
crundelay = 0
client/Move()
if(mob.speeding <= 0)
mob.speeding = 1
..()
sleep(mob.rundelay)
mob.speeding = 0
else
return
zombies are supposed to be slow, this makes them too fast, i need help.