Character actions examples
End-to-end action recipes for navigating to a registered object, following a character, and using parameterized actions in the Convai Unreal Engine plugin.
Example 1: Navigate to a registered object
Configuration
Blueprint handler — Move To
// Blueprint pseudocode
Event Move To(ActionData: FConvaiResultAction)
// Read the destination object reference
DestEntry = GetParamAsRef(ActionData, "destination")
// Resolve the entry to AI Move To inputs
ResolveGoalLocation(
Entry = DestEntry,
SourceActor = Self,
// outputs:
OutGoalActor, OutGoalComponent, OutGoalLocation,
OutAcceptanceRadius, OutMode,
bSuccess, bAlreadyThere, bReachable, PathEnd, PathPoints
)
if not bSuccess:
AbortActionSequence(
EventText = "Destination actor no longer exists",
ShouldRespond = Always
)
return
if bAlreadyThere:
HandleActionCompletion(IsSuccessful = true)
return
// Branch on Out Mode — wire the correct pin to AI Move To
if OutMode == Actor:
AIMoveTo(Target = OutGoalActor, AcceptanceRadius = OutAcceptanceRadius)
else:
AIMoveTo(Destination = OutGoalLocation, AcceptanceRadius = OutAcceptanceRadius)
// Wait for AIMoveTo to complete via OnMoveCompleted
// Then call:
HandleActionCompletion(IsSuccessful = true)Example 2: Follow a character
Configuration
Blueprint handler — Follow
Blueprint handler — Stop Moving
Example 3: Parameterized action with a string choice
Configuration
Blueprint handler
Example 4: Parameterized action with an enum
Configuration
Blueprint handler
Example 5: Print with a dynamic string parameter
Configuration
Blueprint handler
Example 6: Dance with Choices and a fallback
Configuration
Blueprint handler
Example 7: Start a sequence after speech begins
Configuration
Blueprint handler — Announce
Next steps
Parameterized actionsActions Blueprint referenceTroubleshoot character actionsLast updated
Was this helpful?