Make multiple bots go to one NavPoint?
I have this code:
Collection navPoints = tabooNavPoints.filter(getWorldView().getAll(NavPoint.class).values());
Iterator itr = navPoints.iterator();
NavPoint target = null;
while(itr.hasNext())
{
NavPoint temp = (NavPoint)itr.next();
String id = temp.getId().getStringId();
if(id.equals("UTCTFRedFlagBase_2")) //The Goal
{
return temp;
}
}
So I iterate through the navpoints, but I've noticed the collection seems to change, it usually have a size of 548, but this goes down. Does anyone know why the navPoint count would go down? Is there a better way to make bots go to a specific navpoint?