mob
proc
walkforever()
while(!inview)
var/list/dirs = list(NORTH,NORTHEAST,NORTHWEST,SOUTHEAST,SOUTHWEST,SOUTH,EAST,WEST)
var/a = pick(dirs)
Walk(rand(1,10),a,8)
spawn(30) walkforever()
Walk(Steps as num, Direction, Speed as num)
while(Steps)
Steps--
step(src,Direction)
sleep(Speed)
This is my only code for the npc, when the npc is made, it spawns this proc.
But, eventually the npc starts moving really fast, and starts lagging up the game, till eventually its practically frozen up.
Why is it doing that?
Thanks,
Farkas