Support Forum

How to Detect Rich AI Has Reached Destination?

Hi! I am trying to know when the RichAI has reached its destination.

private bool HasReachedPoint => !Owner.RichAI.pathPending || Owner.RichAI.reachedEndOfPath;

protected override void UpdateCombat()
if (HasReachedPoint)
wanderPoint = GetPointAroundTarget();

        Owner.SetDestination(wanderPoint, true);


Right now this code constantly resets the position so HasReachedPoint is always true. How would you detect when RichAI reaches its destination?

Just found it!

It seems like that this works for me :

private bool HasReachedPoint => Owner.RichAI.reachedEndOfPath || Owner.RichAI.isStopped;

1 Like