ID:172387
 
I'm not sure if this procedure will do what I want. I want a mine that walks to any enemy within an oview of 20, but I'm unsure if this does what I'm asking.

mob
mine
HP = 1
MHP = 1
Team = ""
icon = 'mine_hunt.dmi'
icon_state = "stationary"
proc
Walk()
for()
var/mob/M
for(M in oview(20))
if(M.Team == src.Team)
return 0
else
walk_to(src,M,20,20)

New()
var/mob/mine/P
P.Walk()
..()


And what creates the mine:

mob/hidden/verb/Mine()
var/mob/P = /mob/mine
new P(usr.loc)


I'm not sure where this goes, but I think it goes in Newbie Central. If it's not, feel free to move it to the right spot, mods.
try it before you ask what it does please.

yes, it looks to me as if it would work(disclaimer, i ain't that good at this)