Built-in action handlers
Reference handler patterns for the four default Convai character actions, including parameters, completion rules, and Blueprint flow.
Choosing the right handler
Action
Parameters
Purpose
Completion model
Move To
Name
Type
Description
// Blueprint pseudocode
// Custom Event named "Move To" with one FConvaiResultAction input
Event Move To(ActionData: FConvaiResultAction)
// Read and resolve the destination
DestEntry = GetParamAsRef(ActionData, "destination")
ResolveGoalLocation(
Entry = DestEntry,
SourceActor = Self,
// outputs:
OutGoalActor, OutGoalComponent, OutGoalLocation,
OutAcceptanceRadius, OutMode,
bSuccess, bAlreadyThere, bReachable, PathEnd, PathPoints
)
// Guard: destination Actor must be alive
if not bSuccess:
AbortActionSequence(
EventText = "Navigation target no longer exists",
ShouldRespond = Always
)
return
// Skip movement if already at the goal
if bAlreadyThere:
HandleActionCompletion(IsSuccessful = true)
return
// Branch on the resolved mode and issue AI Move To with the correct pin
if OutMode == Actor:
AIMoveTo(Target = OutGoalActor, AcceptanceRadius = OutAcceptanceRadius)
else:
AIMoveTo(Destination = OutGoalLocation, AcceptanceRadius = OutAcceptanceRadius)
// Wait for OnMoveCompleted (bind to AIController.ReceiveMoveCompleted or use
// a task/latent action), then call:
HandleActionCompletion(IsSuccessful = true)Follow
Name
Type
Description
Stop Moving
Wait For
Name
Type
Description
Modifying the default actions
Next steps
Building custom action handlersParameterized actionsCharacter actions examplesLast updated
Was this helpful?