Making a navagent guider that makes a host follow the closest location and change when it finds an even closer one.
GameObject[] targets;
targets = GameObject.FindGameObjectsWithTag("GreenTeam");
Hashtable distances;
distances = new Hashtable();
foreach (GameObject gameobject in targets)
{
distances.Add(gameobject,Vector3.Distance(transform.position,gameobject.transform.position));
}