59 — BP_PatrolPath
Blueprint Spec — UE 5.5–5.7
Parent Class
Actor
Dependencies
Purpose
Waypoint-based patrol route for AI characters. Defines a sequence of points (spline or actor array) that AI follows during patrol state. Supports looping, ping-pong, random selection, and conditional stops. Visualized in-editor with spline or point indicators for level designers.
Variables
| Name |
Type |
Description |
PatrolPoints |
Array |
World-space waypoints |
PatrolMode |
EPatrolMode |
Sequence mode |
bIsLooping |
Bool |
Restart from first after last |
bIsPingPong |
Bool |
Reverse direction at end |
PointRadius |
Float |
Acceptance radius for reaching a point |
WaitTimeAtPoint |
Float |
Pause at each waypoint (seconds) |
bRandomizeOrder |
Bool |
Shuffle points on each loop |
bUseSpline |
Bool |
Draw spline between points |
SplineComponent |
USplineComponent |
Optional spline path |
bDrawDebug |
Bool |
Editor visualization toggle |
DebugPointColor |
FColor |
Point color in editor |
ConnectedAI |
Array<BPC_AIControllerBase> |
AI using this path |
Enums
| Enum |
Values |
Description |
EPatrolMode |
Sequential, Random, PingPong, Reverse |
Point selection order |
Functions
| Name |
Inputs |
Outputs |
Description |
GetNextPatrolPoint |
CurrentIndex: Int |
FVector, NewIndex: Int |
Next waypoint based on mode |
GetPatrolStartPoint |
— |
FVector, StartIndex: Int |
First point |
GetPatrolPointCount |
— |
Int |
Total points |
GetPatrolPointByIndex |
Index: Int |
FVector |
Specific point |
AddPatrolPoint |
Location: FVector |
— |
Add waypoint |
RemovePatrolPoint |
Index: Int |
— |
Remove waypoint |
ClearPatrolPoints |
— |
— |
Reset path |
SetPatrolMode |
Mode: EPatrolMode |
— |
Change movement pattern |
IsPatrolComplete |
CurrentIndex: Int |
Bool |
End of path |
RegisterAIUser |
AIController: BPC_AIControllerBase |
— |
Track who uses this path |
UnregisterAIUser |
AIController: BPC_AIControllerBase |
— |
Remove usage |
Blueprint Flow
Editor Visualization
Communications With
| Target |
Method |
Why |
BPC_AIControllerBase |
Direct call |
AI requests next waypoint |
BP_EnemyBase |
Direct (via controller) |
Move-to destination |
| Level Designer |
Editor visualization |
Place and configure in world |
Reuse Notes
- World-placed actor, assignable to any AI via DA_AIProfile or direct reference
- Multiple AI can share one patrol path (squad patrol)
- Spline mode allows smooth curved paths (for flying/gliding enemies)
- Works with any AI that reads patrol index from blackboard