For the complete documentation index, see llms.txt. This page is also available as Markdown.

Narrative design quick start

Invoke a named narrative trigger from Blueprint and confirm a section change by printing the new section ID to the screen.

We will invoke a named narrative trigger on a Convai character and confirm that the story graph advances. After setup, pressing a bound key calls Invoke Narrative Design Trigger; when Convai advances the graph, On Narrative Section Received prints the new Narrative Section ID to the screen.

What we will build

A character Blueprint that binds On Narrative Section Received on its UConvaiChatbotComponent, then calls Invoke Narrative Design Trigger when the player presses a key. A Print String node and the Output Log confirm the section change.

Prerequisites

Before you open Unreal Engine, confirm in the dashboard:

Check
What to verify

Graph exists

The character has at least one section and one outbound trigger.

Trigger name

Copy the trigger name exactly — it is case-sensitive.

Reachable edge

The trigger is an outbound edge from the section the character starts on.

Character ID

The CharacterID on UConvaiChatbotComponent matches the dashboard character.

Build the Blueprint

1

Open the character Blueprint

Open the Actor Blueprint that contains your UConvaiChatbotComponent. In the Event Graph, click the component in the Components panel to select it.

2

Bind On Narrative Section Received

Drag the UConvaiChatbotComponent reference from the Components panel into the Event Graph. From the component pin, drag off and search for On Narrative Section Received. Select Assign On Narrative Section Received to create a bound event node.

The generated event node exposes two output pins: Chatbot Component (UConvaiChatbotComponent reference) and Narrative Section ID (FString).

3

Connect a Print String node to the event's execution pin. Feed the Narrative Section ID output pin into Print String's In String input. This prints the new section ID to the screen whenever Convai advances the story graph.

4

Call Invoke Narrative Design Trigger on a key press

From the Event Graph, add a Keyboard event node (for example F key). Drag the UConvaiChatbotComponent reference from the Components panel and call Invoke Narrative Design Trigger from it.

Set Trigger Name to the trigger name exactly as it appears in the Convai dashboard (for example start_inspection). Connect the Pressed execution pin of the keyboard event to Invoke Narrative Design Trigger.

bAutoInitializeSession defaults to true on UConvaiChatbotComponent, so the session opens on Begin Play. If you press the key before the session connects, the trigger queues in PendingTriggers and replays once the connection is open.

5

Play In Editor and activate the trigger

Click Play In Editor. After the session connects, press the key you bound. Watch the screen for a printed section ID string.

If the trigger name matches a trigger reachable from the character's current section, Convai advances the story graph and On Narrative Section Received fires with the new Narrative Section ID.

If nothing prints, see Troubleshoot narrative design. Common causes: trigger name mismatch, wrong CharacterID, or a trigger not connected to the current section in the dashboard.

A non-empty section ID printed to the screen confirms that Convai received the trigger and advanced the story graph.

Next steps

Narrative triggersTemplate keysHow narrative design works

Use the troubleshooting page if the trigger call runs but no section ID prints in Play In Editor.

Troubleshoot narrative design

Last updated

Was this helpful?