proc/Chase(var/mob/player/M)
while(src)
soundmoan(src)
if(M in world)
for(M in world)
if(M:team=="Player")
step_to(src,M,1)
sleep(src.speed)
break
for(M in world)
if(M:team=="Player")
step_towards(src,M)
sleep(src.speed)
break
else
step_rand(src)
sleep(rand(20,50))
for(M in world)
if(M:team=="Player")
sleep(8)
break
spawn(rand(2,5))
Chase()
ID:270725
![]() Aug 10 2006, 5:07 am (Edited on Aug 10 2006, 5:53 am)
|
|
ok I need help with this code I learned coding a month back so I dont know all of byonds features yet. am trying to get this to go after random players in world but it will go after one player in world and after that player dies it will go after another player in world. -.- ive spent to much time on trying to figure this out so mind helping me out with this.
|
also, add in safety checks:
2) You duplicated that part so delete one off.
PS: When pasting code, use the following tags: