π₯ Random path
π₯ Random path
The Random Path block allows you to draw a path from several possibilities to introduce variability and replayability into a story. Great for creating unpredictable events like random encounters, rewards, or obstacles.
This block is particularly useful for simulating non-deterministic choices, such as opening a chest or meeting a character whose behavior varies each game.
π₯ Entries
- in (Flow): Triggers the draw when the flow reaches this block.
- number (Number): Number of possible paths from which the block will choose randomly (default: 2).
- draw without replacement (Boolean): If activated (
True), the block memorizes the paths already taken and excludes them until all have been used at least once.
π€ Outings
- 1, 2, 3... (Flow): Numbered outputs corresponding to the possible paths (their number depends on the value of
number). Only one output is activated randomly. - shuffleEnd (Flux): Exit triggered only if "shuffleend" mode is enabled and all paths have already been taken at least once.
π‘ Example of use
Scenario: Opening a mysterious chest
- The player finds a chest in a dark room.
- A message is displayed: "You open the trunk carefully...".
- The Random Path block is placed with
number = 3to simulate three possible outcomes. - The block randomly chooses an output:
- Exit 1: "The chest contains 100 gold coins!" (reward).
- Exit 2: "A trap is triggered! You lose 20 VP." (danger).
- Exit 3: "The trunk is empty..." (disappointment).
- The flow continues to the event corresponding to the selected output.
βοΈ Technical Details
- Path management: Outputs are generated dynamically based on the value of
number. Ifnumber = 2, only outputs 1 and 2 will be available. - "Draw without replacement" mode: When this mode is activated, the block uses an internal list to follow the paths already taken. Once all paths are used, the
shuffleEndoutput is triggered. - Reset: The block does not automatically reset its state between game sessions. For a complete new draw, disable then re-enable "no reset draw" mode.
Updated on: 04/03/2026
Thank you!
