Skip to main content

Functions

Dialogue contains a bunch of functions to help you use dialogue in any way you need.

Adjust Player Transform

Adjusts the player's position in one-on-one dialogues.

dialogue-adjust-player-transform.webp

Can Skip Dialogue

Returns whether skipping is allowed for the current dialogue.

This function determines if the dialogue as a whole permits skipping, regardless of the current line.

It is commonly used to:

  • Globally disable skipping for important conversations
  • Control skip behavior for cinematic or story-critical dialogue
  • Gate UI controls such as Skip or Fast Forward

dialogue-can-skip-dialogue.png

Output

NameTypeDescription
Return ValueboolWhether dialogue skipping is allowed.
note

This function is evaluated in addition to per-line skip checks.

For a line to be skippable:

  • CanSkipDialogue must return true
  • CanSkipCurrentLine must also return true

Get Speaker Head Location

Returns the location of the actor's head, where the dialogue camera will aim.

dialogue-get-speaker-head-location.webp

Inputs

NameTypeDescription
ActorAActor*The actor whose head location is being retrieved.

Output

NameTypeDescription
-FVectorThe location of the actor's head.

Tick Dialogue

Called every tick to update the dialogue.

dialogue-tick-dialogue.webp

Inputs

NameTypeDescription
DeltaTimefloatThe time elapsed since the last frame.

Links a dialogue speaker to a Speaker Avatar actor.

Narrative uses Speaker Avatars to determine:

  • Where to point the camera
  • Which actor should play animations
  • Who dialogue lines are associated with in the world

This function attempts to resolve the correct avatar for a speaker using the following order:

  1. Spawn an actor if the speaker has an AvatarActorClass set
  2. Find an existing actor in the world with the speaker’s SpeakerID set as a tag
  3. Fallback behavior
    • NPC speakers → DefaultNPCAvatar
    • Player speakers → The player’s Pawn

If none of these methods succeed, no avatar will be linked.

note

If this default behavior does not suit your game, you can override this function in Blueprint or C++ to implement custom avatar resolution.

dialogue-link-speaker-avatar.png

Inputs

NameTypeDescription
InfoFSpeakerInfoInformation about the speaker being linked, including ID and avatar data.
Idxint32The index of the speaker within the dialogue’s speaker list.

Output

NameTypeDescription
Return ValueAActor*The actor linked as the Speaker Avatar, or null if none.
note

Speaker Avatars are cached after linking and reused throughout the dialogue.

Overriding this function allows for:

  • Custom spawn logic
  • Dynamic actor selection
  • Integration with existing NPC systems

Destroy Speaker Avatar

Removes a speaker avatar from the world.

dialogue-destroy-speaker-avatar.webp

Inputs

NameTypeDescription
InfoFSpeakerInfoThe speaker information.
SpeakerAvatarAActor*The speaker avatar to destroy.

Play Dialogue Animation

Plays a dialogue animation on the given speaker.

dialogue-play-dialogue-animation.webp

Inputs

NameTypeDescription
NodeUDialogueNode*The dialogue node.
LineFDialogueLineThe dialogue line being spoken.
SpeakerAActor*The speaker's avatar.
ListenerAActor*The listener's avatar.

Stop Dialogue Animation

Stops any currently playing dialogue animations.

dialogue-stop-dialogue-animation.webp

Play Dialogue Sound

Plays a dialogue sound.

dialogue-play-dialogue-sound.webp

Inputs

NameTypeDescription
LineFDialogueLineThe dialogue line being spoken.
SpeakerAActor*The speaker's avatar.
ListenerAActor*The listener's avatar.

Play Dialogue Node

Plays a dialogue node with audio, animations, and camera updates.

dialogue-play-dialogue-node.webp

Inputs

NameTypeDescription
NodeUDialogueNode*The dialogue node.
LineFDialogueLineThe dialogue line being spoken.
SpeakerFSpeakerInfoThe speaker information.
SpeakerActorAActor*The speaker's avatar.
ListenerActorAActor*The listener's avatar.

Finish Dialogue Node

Stops the dialogue node, ending any playing audio or animations.

dialogue-finish-dialogue-node.webp

Inputs

NameTypeDescription
NodeUDialogueNode*The dialogue node.
LineFDialogueLineThe dialogue line being spoken.
SpeakerFSpeakerInfoThe speaker information.
SpeakerActorAActor*The speaker's avatar.
ListenerActorAActor*The listener's avatar.

Play NPC Dialogue

Plays an NPC's dialogue with audio, animations, and cinematic shots.

dialogue-play-npc-dialogue.webp

Inputs

NameTypeDescription
NPCReplyUDialogueNode_NPC*The NPC's dialogue node.
LineFDialogueLineThe dialogue line being spoken.
SpeakerFSpeakerInfoThe speaker information.

Play Player Dialogue

Plays the player's dialogue with audio, animations, and cinematic shots.

dialogue-play-player-dialogue.webp

Inputs

NameTypeDescription
PlayerReplyUDialogueNode_Player*The player's dialogue node.
LineFDialogueLineThe dialogue line being spoken.

Get Line Duration

Returns how long the dialogue system should wait before moving to the next line.

dialogue-get-line-duration.webp

Inputs

NameTypeDescription
NodeUDialogueNode*The dialogue node.
LineFDialogueLineThe dialogue line being spoken.

Output

NameTypeDescription
-floatThe duration of the line in seconds.

Get String Variable

Resolves a variable name within a dialogue line.

dialogue-get-string-variable.webp

Inputs

NameTypeDescription
NodeUDialogueNode*The dialogue node.
LineFDialogueLineThe dialogue line being spoken.
VariableNameFStringThe name of the variable to resolve.

Output

NameTypeDescription
-FStringThe resolved string value.