Twine Version: 2.3.14
Format: Sugarcube2
I’m working on a cassette system where players can load and play different cassettes, both for the information, via a dialog box that pops up, and for activating events if in the right passage with the correct requirements. It’s very simple and everything works fine except for one thing. The current way that I’m trying to detect when a cassette is played is by using a temporary variable, but it obviously gets deleted during the refresh that’s necessary for anything to change.
<<script>>
state.display(state.active.title, null, "back")
<</script>>
<<set _cassette to $loadedcassette>>
This is in the dialog box that pops up when a cassette is played. Very half hearted attempt but I wanted to avoid using a bunch of <<if>>
and <<set>>
to solve my problems, I’ll never learn that way. Basically I need _cassette to exist in some way after the passage is refreshed.