When I are any of my team go past a nother team mate he stops attacking then when hes out of range he starts attacking again.
proc/move2()//Now, this proc handles NPC movement
for(var/mob/M in oview(5))//loops over all mobs in view
if(get_step_away(src,M,5))//checks distance
if(M.team==src.team)//Not a player
continue//continues through the loop
move2()
else//Player
attackplayer2()
else//4-or-more spaces away
continue
spawn(15) move2()//loops the proc after 2 seconds
ID:149038
Jul 22 2002, 2:35 pm
|
|
Tell me if this works, i havn't tested. So just let me know.
RaeKwon