mob
character
Normal
icon = 'NK Base.dmi'
density = 1
Click()
for(var/mob/clone/C in oview(src,9))
if(C.owner==usr)
walk_to(C,src,1,5)
So, im using this to make my clone walk to other mobs when i click on that mob. The thing is, if i click myself, it goes to me (obviously, which i dont really want). But the main problem is that im looking for how to make it that when my clone meets that mob, (next to it) it deletes itself (the clone). AZA told me to use
for(var/mob/clone/C in range(1,src))
Obviously after i would use del C. This doesn't seem to work though.
What im asking you is, whats the best way to do this? Please explain how to do this :)
Edit
The reason why the full code:
mob
character
Normal
icon = 'NK Base.dmi'
density = 1
Click()
for(var/mob/clone/C in oview(src,9))
if(C.owner==usr)
walk_to(C,src,1,5)
for(var/mob/clone/N in range(1,src))
N.overlays += 'poofy.dmi'
sleep(10)
del(N)
the for() doesn't activate because of the walk_to proc, because its not ending. How could i go about this?
Cap'n Lummox JR