Candy Logo Copyright © 2025-2026 Candy Arts

Running Dialogues
Running a Dialogue takes two calls on an Engine node: one loads the Dialogue, the other starts it. 1. Loading a Dialogue from a TXT file Call load_scripted_dialogue() with the name of the Dialogue's TXT file, without its .txt extension. For example, to load dialogue_1.txt:
load_scripted_dialogue("dialogue_1")
The file must be in the Candy_DE/Dialogues folder, or in the folder Candy_Properties.gd names instead. 2. Starting the Dialogue On the same Engine node, call start_dialogue() with the names of the Conversation and Block to start in, and the Line to start at: its index, or the Reference of a Line Mark. For example:
start_dialogue("Conversation_1", "Block_1", 0) start_dialogue("Conversation_1", "Block_1", "Dialogue Start")
Reacting to the Start Your game reacts to the start of a Dialogue through two hook functions:
  • change_game_state() is called first, to switch your game to its dialogue state (see Game State).
  • x_dialogue_start() is called next, once the Engine is shown, right before the first Line runs. It receives the Conversation, the Block and the Line the Dialogue starts at (see Hook Functions).
The Engine waits for both before it runs the first Line.