View Single Post
  #560  
Old 05-29-2008, 11:33 PM
BatCountry
Fire Beetle
 
Join Date: Mar 2006
Posts: 24
Red face

Ugh, 5 minute edit rule.

I was playing with this last evening and just started tinkering again. There's really no sensible way to make the bots fan out when the group is at rest without risking pulling aggro, walking into somebody else's face, teleporting them into a wall, etc, without making them aware of the path grid.

The follow train seems to work well on my system, although I'm beefing up the movement code so it looks a bit more natural and makes them less fidgety when you're moving only short distances (making a range in which they decide they don't need to follow, only following if they get too far away).

I'll tinker with these ranges and see what kind of results I get and post here with them. Part of the problem with how sticky the bots seem to be is the unit size you're using.

Code:
if(dist2 >= 50)
{
	if( dist2 >= 100)
		speed = GetRunspeed();
	CalculateNewPosition2(px,py,follow->GetZ(),speed);
}
Remember that you're using DistNoRoot, so it's the square of the actual distance between the bot and its follow target, meaning they want to hug you. Root 50 is about 7 units, which is not more than one or two steps.