35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
# ============================================================
|
|
# Pattern 4 Target: Started by GDScript Signal Handler
|
|
# ============================================================
|
|
# This timeline was started by gym_controller.gd in response
|
|
# to the "demo_chain" signal from gym_pattern4_signal_chain.dtl.
|
|
# ============================================================
|
|
|
|
join Advisor right
|
|
|
|
Advisor (surprise): I was started by GDScript!
|
|
Advisor (pl5): The `dialogic.signal_event` signal fired with\
|
|
the argument "demo_chain".
|
|
|
|
[wait time="1.0"]
|
|
|
|
Advisor (pl5): The controller script caught it and called\
|
|
`Dialogic.start_timeline("gym_pattern4_signal_target")`.
|
|
|
|
Advisor (doubt): This is the most flexible pattern because...
|
|
Advisor (pl5): ...GDScript can do ANYTHING before starting the next timeline:\
|
|
load scenes, animate sprites, play audio, check conditions...
|
|
|
|
[wait time="2.0"]
|
|
|
|
Advisor (pl5): Signal args can be strings (like "demo_chain")\
|
|
or full dictionaries for complex data.
|
|
|
|
Advisor (surprise): One caveat: `start_timeline()` doesn't use the jump stack.
|
|
Advisor (pl5): So there's no automatic `return` path. You control flow in code.
|
|
|
|
[wait time="1.5"]
|
|
|
|
Advisor (pl5): Ready to go back to the hub?
|
|
jump gym_main/menu
|