# ============================================================ # Pattern 4: Signal Event → GDScript → New Timeline # ============================================================ # This timeline emits a signal. GDScript in gym_controller.gd # catches it and starts the target timeline. # ============================================================ label start join Miko center Miko (neutral): This pattern uses a signal to bridge timelines. Miko (smile): I'm going to emit a signal, and GDScript will react. [wait time="1.0"] Miko (joy): Emitting signal: "demo_chain"! # This emits Dialogic.signal_event("demo_chain") # gym_controller.gd listens for this and starts # gym_pattern4_signal_target.dtl [signal arg=demo_chain] # This timeline continues until it ends... Miko (neutral): I'll keep going while the signal fires in the background. [wait time="0.5"] Miko (smile): ...and now I'm done here! # That's it. The signal handler in code started # gym_pattern4_signal_target.dtl which will take over. [end_timeline]