ID:169410
 
I need a group walk_to system. I've attempted to make it and have failed many of times. If anyone has ever made one or have seen a library of it, would you be kind enough to point me at it? Thank you.

-Ryan
Bump.

-Ryan
What exactly do you mean? A group, in which one member follows another one?
In response to CIB
A group of atom/movable types go to a block() style to a set turf location, the destination. Just move a group of them to a new location.

-Ryan
In response to Ry4n
Well, I believe something like this will work:
proc/group_walk_to(l,g,m,d)
if(!l.len||!isloc(g))return
for(var/atom/movable/a in l)walk_to(a,g,m,d)

Basically, it'd be exactly like walk_to, except instead of an atom/movable, a list.
In response to Ol' Yeller
Once the first mob gets to the location, the other mobs will circle them forever. I've already attempted this one.

-Ryan
In response to Ry4n
Most of the walk/step procs have a minimum/maximum distance argument attached to them, if the minimum is less than the distance from the target the proc will keep trying to get to that space (circling it) you'd probably want to base the argument on the party member's position. Another good idea is making your party non-dense and only the leader dense, it keeps long lines of people from blocking important areas, and it makes it so the party can 'walk on top' of the leader in shops and sort where you need to be at a counter to do anything.
In response to Ry4n
Sorry for stealing your code, but I don't want to rewrite it all.
proc/group_walk_to(l,g,m,d)
if(!l.len||!isloc(g))return
var/coming=0
var/min=0
for(var/atom/movable/a in l)
walk_to(a,g,m+min,d)
coming++
if(coming<=1)
min=1
else if(coming>1)
min=2
else if(coming>3)
min=3

Hope it works ^^
In response to CIB
Actually, let me make another shot at it, your way doesn't seem like it'd work.
proc/group_walk_to(l,g,m,d)
if(!l.len||!isloc(g))return
for(var/atom/movable/a in l)
walk_to(a,g,m,d)
m++