30 lines
1.2 KiB
Plaintext
30 lines
1.2 KiB
Plaintext
# ── Rewind mechanic (shared across all scripts) ──────────────────────────────
|
|||
|
|
# Where the next rewind lands. Set this to a label string at each checkpoint.
|
||
|
|
default checkpoint = None
|
||
|
|
|
||
|
|
# Optional: a label to `call` for per-checkpoint flag resets, or None.
|
||
|
|
# Define it like: label .my_checkpoint_reset: $ some_flag = False return
|
||
|
|
default rewind_reset_label = None
|
||
|
|
|
||
|
|
# Plays the shared rewind effect, then returns to `destination` (a label string).
|
||
|
|
# Uses `call` (not `jump`) so it is re-entrant: rewinding to a label that is
|
||
|
|
# already on the call stack (e.g. back to a choice mid-spar) returns cleanly
|
||
|
|
# to the caller instead of corrupting the stack.
|
||
|
|
# Call as: call rewind_to ".some_label"
|
||
|
|
label rewind_to:
|
||
|
|
scene black
|
||
|
|
with dissolve
|
||
|
|
show screen teal_wash
|
||
|
|
"The world pulls back."
|
||
|
|
"Colour drains to teal. Sound slows to nothing."
|
||
|
|
hide screen teal_wash
|
||
|
|
scene black
|
||
|
|
with dissolve
|
||
|
|
# Run any per-checkpoint reset statements (e.g. $ rewind_used = False)
|
||
|
|
if rewind_reset_label is not None:
|
||
|
|
call expression rewind_reset_label
|
||
|
|
call expression checkpoint
|
||
|
|
|
||
|
|
screen teal_wash():
|
||
|
|
zorder 20
|
||
|
|
add Solid("#1a4a4a") alpha 0.7
|