Candy Logo Copyright © 2025-2026 Candy Arts

Ending Dialogues
A Dialogue ends when:
  • The last Line of a Block has run, with no Bridge command to return from.
  • An End command runs.
  • A Return command unwinds past the Dialogue's first Block, when it's set to end the Dialogue in that case.
What Happens When a Dialogue ends, the Engine cleans up after it:
  • The UI Elements are cleared. Some retain their content, according to their own settings: the Chat can retain its lines on screen, for example.
  • Media played by the Dialogue is stopped. A media player shared between Engines can be set to continue playing instead.
  • Open choice menus and Input scenes are closed.
  • The mouse is set to the Engine's mouse_mode_end.
  • Settings changed by Engine Commands are restored, unless revert_engine_settings is turned off.
The Engine can then run another Dialogue. Reacting to the End Your game reacts to the end of a Dialogue in several ways:
  • The x_end() hook function is called when an End command runs, before anything is cleaned up. The other ways of ending don't call it.
  • The change_game_state() hook function is called when the Dialogue ends, to switch your game back from its dialogue state (to return control to the player, for example).
  • The x_dialogue_end() hook function is called at the end of the cleanup.
  • The Engine's dialogue_fully_ended signal is emitted once everything is done.