Candy Logo Copyright © 2025-2026 Candy Arts

Player Input
A Dialogue can react to the player's input through an Input command: the Engine instantiates a scene and waits for the scene to communicate back with it through the Engine's input_received signal. The signal carries arguments, which tell the Input command what to do, such as making the Dialogue run Lines while the scene stays open, or exiting the Input command and letting the Dialogue continue. Any scene can serve as an Input scene: a text field, a UI like a virtual keypad, a puzzle or mini-game, or even the game world itself, such as a duel in which an NPC comments on each hit. Input Scenes The Input command instantiates a scene as a child of the Engine's input node, or any other node you might want to use as a parent. It then waits for the input_received signal to be emitted by the scene. If the scene is already instantiated under the designated parent node, the Input command will just reconnect to it and wait for the signal, without instantiating it again. Note that the when the Input command instantiates an Input scene, it names the instance the same as the scene file: this makes the instance name predictable if your code relies on it, and it's how the Input command knows whether the scene is already instantiated. How to build an Input scene, and the rules its script follows, is explained in Input Menus (UI section). Text input A basic Input scene is provided for convenience and as a template: it's a text prompt, which allows the player to enter text. It can be used to let the player enter a name, a password or any short answer. See Text Input. Custom input You can modify the provided Input scene, or create any other Input scene you want. See Custom Input. Other input The Player_Advance command waits for the advance key, and the Mouse command sets the mouse mode. See Other Input. Suspension When a Dialogue is suspended (see Suspending Dialogues), an open Input scene is put on hold: the Engine calls its suspend_on() function, and suspend_off() when the Dialogue resumes. To leave the scene active during the suspension, call suspend_dialogue(0). When the Dialogue Ends An Input scene that is still open when its Dialogue ends is left in place, and the Engine calls its dialogue_ended() function. The shipped scene's function is empty: a scene decides for itself whether to close.