Files

28 lines
1.1 KiB
Markdown

# Gym 09 — Scene Switching
Demonstrates switching between a Dialogic timeline scene and a non-Dialogic gameplay scene.
## Flow
```
gym09_main.tscn gym09_minigame.tscn
┌─────────────────┐ ┌──────────────────┐
│ gym09_intro.dtl │ │ Press button 5x │
│ ↓ │ │ ↓ │
│ [signal] │ ───→ │ set variable │
│ │ ←─── │ change_scene back │
│ gym09_congrats │ │ │
│ .dtl │ └──────────────────┘
└─────────────────┘
```
## How to Run
Open `gym09_main.tscn` in the Godot editor and press **F6** (Run Current Scene).
## Key Mechanic
- `Dialogic.VAR.Gym.minigame_done` acts as a flag between scenes
- `[signal arg=start_minigame]` triggers `get_tree().change_scene_to_file()`
- The controller's `_ready()` checks the flag to know which timeline to start