Patrol Function - is this normal?

thretch

Member
When I have an agent patrol waypoints, it will reach a waypoint OK, then go toward the next one. If it's interrupted before reaching the next waypoint (like to attack something), it will start over and head back to the first waypoint, instead of going on to the 2nd. Is there a way to tell it to keep going on to #2 instead of starting over?

Thanks!
 
When the patrol task starts it looks for the closest waypoint and moves to that destination. In order to change this you'll need to modify the OnStart method so it doesn't change the waypointIndex.
 
Top