AAIController::PauseMove
#include "AIController.h"
Access: public
Specifiers: AIMODULE_API
Description
Temporarily halts the active path-following move without cancelling it, provided the active request ID matches RequestToPause. Returns true if the move was successfully paused.
Caveats & Gotchas
- • PauseMove only works if the currently active move request ID exactly matches RequestToPause. Passing a stale or mismatched ID silently fails and returns false.
- • The pawn's movement component is not stopped — only the path-following logic is paused. If you want the pawn to physically halt, also call GetPawn()->GetMovementComponent()->StopMovementImmediately().
Signature
bool PauseMove(FAIRequestID RequestToPause); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| RequestToPause | FAIRequestID | The ID of the move request to pause. Only the currently active move matching this ID will be paused. | — |
Return Type
bool Example
Pause movement during an interaction C++
void AMyAIController::StartInteraction()
{
SavedMoveID = GetCurrentMoveRequestID();
if (PauseMove(SavedMoveID))
{
// AI is now paused at its current position
}
} Tags
Version History
Introduced in: 4.7
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?