Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

How do I make a command fire only once?

$
0
0
I've been working with Sugarcube in Twine 2 to produce a fairly simple adventure game of branching narrative paths.

I've found that the main thing I keep running up against is the need to run a command or function only the first time the passage is read--i.e. I want a <<set>> command in the passage "Meet the wicked witch" to increment $witchesmet by 1, but I don't want it to increment again until passage "Meet the good witch," even if the player reads through "Meet the wicked witch" a second time.

I've come up with an assortment of jury-rigged hacks for this in the form of an unwieldy sequence of <<if>> and <<else>> calls, but it's getting difficult to sustain them, and I can't help but feel that I'm missing something obvious. Does anyone have any help for me?

Viewing all articles
Browse latest Browse all 1844

Trending Articles