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
The Convai Unreal Engine plugin is installed and the API key is configured. See Install the Convai plugin and Configure your API key.
A character
ActorBlueprint with aUConvaiChatbotComponent(Convai Chatbot) andCharacterIDset to a valid ID. See Add your first Convai character.At least one section and one trigger configured in the Convai dashboard for that character ID. See Narrative Design | Playground.
Before you open Unreal Engine, confirm in the dashboard:
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
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).
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.
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 worksUse the troubleshooting page if the trigger call runs but no section ID prints in Play In Editor.
Last updated
Was this helpful?