1.1 KiB
1.1 KiB
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_doneacts as a flag between scenes[signal arg=start_minigame]triggersget_tree().change_scene_to_file()- The controller's
_ready()checks the flag to know which timeline to start