obj/seeker
icon='seeker.dmi';density=1
Bump(mob/M)
..()
view(M)<<"[M] was hit by the [src]"
//Damage stuff here
del(src)
Del()
view()<<"[src] explodes!"
//More damage stuff here
..()
//Now this is where the missile launches at the victim's position
proc/track(mob/M,X,Y,Z)
do
sleep(1)
step_towards(src,locate(X,Y,Z))
if(get_dist(src,locate(X,Y,Z))==1)
if(M.loc==locate(X,Y,Z))
Bump(M)
while(get_dist(src,locate(X,Y,Z))!=1&&src)
The reason I made my own is because missile() launches directly at the victim or won't bump into them if they cross paths, and walk_to() won't call bump()... It only hovers around the spot until the victim moves from it. I wish to know if there is a more efficient way I can do this, to cut down on any lag this would produce having at least 30 people doing it at the same time.
Thanks
~Ken~
I think that would work. It would walk the obj to the mob, and then when it was next to it, use step_towards to make it call bump(). I think....