# ============================================================ # Pattern 2 Subroutine: The "Called" Timeline # ============================================================ # This is the subroutine — a reusable dialog chunk that does # some work and then returns to wherever it was called from. # ============================================================ label start leave Miko leave Advisor join Merchant left Merchant (happy): I'm the subroutine timeline! Merchant (blink): I can do work independently and then return. [wait time="1.0"] Merchant (happy): First, let me set a variable... set {Gym.sub_value} = 42 Merchant (happy): Variable `Gym.sub_value` is now 42. Merchant (blink): The calling timeline will see this change! [wait time="1.0"] Merchant (surprise): Now watch this — I'll call `return`... # This pops the jump stack and resumes the caller # right after the `jump` that called us return # Nothing below here will execute Merchant (happy): You should never see this text!