AAIController::GetMoveStatus
#include "AIController.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Returns the current movement state of the PathFollowingComponent — Idle, Waiting, Paused, or Moving. Use this to poll whether the AI is actively following a path.
Caveats & Gotchas
- • Returns EPathFollowingStatus::Idle both when the AI has never moved and when it has just finished a move — there is no 'completed' state. Always react to OnMoveCompleted/ReceiveMoveCompleted for completion logic rather than polling this.
- • If PathFollowingComponent is null (can happen in edge cases such as immediately after possession), this function returns Idle without crashing, but the result is meaningless.
Signature
EPathFollowingStatus::Type GetMoveStatus() const Return Type
EPathFollowingStatus::Type Examples
Skip issuing a new move if the AI is already moving
Blueprint
Check if the AI is currently moving before issuing a new command C++
if (GetMoveStatus() == EPathFollowingStatus::Moving)
{
// Don't interrupt an active move
return;
}
MoveToActor(Target); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?