# A way to override or bind OnMoveCompleted inside pawn class?

**URL:** <https://forums.unrealengine.com/t/a-way-to-override-or-bind-onmovecompleted-inside-pawn-class/435392>\
**Category:** AI\
**Tags:** ai-move-to, ai-controller, unreal-engine, CPP, question\
**Created:** [October 10, 2018, 2:48pm UTC](https://forums.unrealengine.com/t/a-way-to-override-or-bind-onmovecompleted-inside-pawn-class/435392 "2018-10-10T14:48:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sardorian](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sardorian](https://forums.unrealengine.com/u/Sardorian)\
**Post date:** [October 10, 2018, 2:48pm UTC](https://forums.unrealengine.com/t/a-way-to-override-or-bind-onmovecompleted-inside-pawn-class/435392/1 "2018-10-10T14:48:43Z")

</div>

Is there way to override or bind to event aicontroller-\>onmovecompleted event inside pawn class?

---

<div class="post-metadata">

**Author:** ![STUDIOAI](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@STUDIOAI](https://forums.unrealengine.com/u/STUDIOAI)\
**Post date:** [October 22, 2018, 4:36am UTC](https://forums.unrealengine.com/t/a-way-to-override-or-bind-onmovecompleted-inside-pawn-class/435392/2 "2018-10-22T04:36:11Z")

</div>

Bind a delegate called OnRequestFinished in BeginPlay()

```
AAIController* AIC = Cast(GetController());

AIC->GetPathFollowingComponent()->OnRequestFinished.AddUObject(this, &YourPawnClass::YourMethod);

```

The method have to take 2 parameters FAIRequestID and const FPathFollowingResult&

OnMoveCompleted Delegate is deprecated, Use OnRequestFinished instead

---

<div class="post-metadata">

**Author:** ![ExUltraGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exultragames/32/699494_2.png) [@ExUltraGames](https://forums.unrealengine.com/u/ExUltraGames)\
**Post date:** [April 24, 2025, 10:50am UTC](https://forums.unrealengine.com/t/a-way-to-override-or-bind-onmovecompleted-inside-pawn-class/435392/4 "2025-04-24T10:50:55Z")

</div>

If still relevant it is possible to override AIController-\>OnMoveCompleted() as it is a public virtual function.

So create your own child the from the AIController class then create following:

.h (public)  
virtual void OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult& Result) override;

.cpp  
void AYourAIController::OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult& Result)  
{  
UE\_LOG(LogTemp, Warning, TEXT(“OnMoveCompleted\_Override”));  
}
