Articles on: Blocks Creator
This article is also available in:

🟩 Choice

🟩 Choice


The Choice block allows you to pause an interactive experience and present buttons for the user to make a decision. The rest of the flow will depend on the button clicked, thus making it possible to create narrative or functional branches.


This block is essential for any interaction requiring explicit user selection, such as branching dialogs, action menus, or confirmations.


πŸ“₯ Entries


  • in (Trigger): Triggers the display of on-screen buttons and pauses the experience.
  • choice (List<Texts>): List of proposals which will generate the buttons to display. Each item in the list corresponds to a button.
  • timer (Number): (Optional) Time limit in seconds before the choice expires. If this parameter is empty or equal to 0, the player has unlimited time.


πŸ“€ Outings


  • (Name of each choice) (Trigger): An output is generated for each element of the "choice" list. The flow takes the output corresponding to the button clicked by the user.
  • timeout (Trigger): This output only appears if a timer is set. The flow takes this path if the allotted time elapses without user action.


πŸ’‘ Example of use


Scenario: Decision in an adventure game


  1. The player arrives in front of a mysterious door in a dungeon.
  2. A variable actionsPorte of type List<Texts> is created with the values: ["Open the door", "Search the lock", "Escape"].
  3. The Choice block is placed in the graph and the actionsPorte variable is selected in the "choice" field.
  4. Three exits are automatically generated: Open the door, Search the lock and Escape.
  5. Each output is linked to a different sequence:
  • Opening the door leads to a scene where the player encounters a trap.
  • Search the lock triggers a mini-puzzle to find a key.
  • Flee returns the player to the entrance of the dungeon.


βš™οΈ Technical Details

  • Dynamic generation of outputs: The number of "choice" outputs is determined automatically based on the number of elements in the list provided. Each output has the exact name of the corresponding element.
  • Timer management: If the timer is activated, the block displays a visual countdown. Once the time has elapsed, the stream is automatically redirected to the timeout output.
  • Contextual variables: The block exposes the variable lastChoice (Text) containing the label of the last choice made by the user, accessible in the following blocks.

Updated on: 04/03/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!