RealDocs

AAIController::GetMoveStatus

function AIModule Blueprint Since 4.0
#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
Event Tick Delta Seconds Delta Seconds Cast To AAIController Object Cast Failed As AI Controller As AI Controller Get Move Status Target is AI Controller Target Return Value Branch Condition Condition True False Move To Actor Target is AI Controller Target Goal Acceptance Radius Acceptance Radius 100.0 100.0 Return Value Get Controller Target is Pawn Return Value Return Value Equal (EPathFollowingStatus) A B Moving Return Value Target Enemy Target Enemy Target Enemy
Edit Blueprint graph Skip issuing a new move if the AI is already moving
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
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);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.