Skip to reading
The Dialogue Designer

53. Use dialogue events and quest completion

Edition 0.86.3.4

Build branching conversations with choices, conditions, actions, timed responses, voices, portraits and custom windows.

Download PDFView PDF page

Scripts and visual scripts can listen for OnDialogueStarted and OnDialogueEnded. Register the event in the script’s event settings, then use the event’s dialogueId to decide which conversation it concerns.

Source table from 53. Use dialogue events and quest completion, page 57
Event dataUse
dialogueIdIdentifies the conversation that started or ended.
playerIdIdentifies the active player at the event.
interrupted, on the ended eventDistinguishes deliberate cancellation from a normal completion.
Caller contextCan carry additional information from the action or script that started the dialogue.

A normal dialogue completion also notifies the quest system. An interrupted session does not count as that normal completion. If a quest only needs a particular clue, recording a variable on that branch is more precise than assuming any ending means the clue was heard.

Start with simple logging or a harmless counter when testing an event. After verifying which dialogue and completion route fired it, add the intended game change.

A global event handler can observe several conversations, including nested ones. Filter by ID. Otherwise one side exchange may trigger a reward intended for the main conversation.

Do not restart a dialogue from its own started event, or call the same closing sequence recursively from its ended event. An event is a hook, not an instruction to repeat the event that called it.

Page 57 of 77Permalink
Go to page