"Deleting Variables": SugarCube (v2.18)#
Summary#
In SugarCube, <<unset>>
works as a "reverse" to <<set>>
. Instead of setting a value, it deletes it. <<unset>>
works on both temporary and story variables.
Example#
Twee Code#
:: StoryTitle
SugarCube: Unsetting Variables
:: Start
<<set $proof to "hand-written letter">>
[[Accidentally drop the letter]]
:: Accidentally drop the letter
<<unset $proof>>
[[Present the letter to the sheriff]]
:: Present the letter to the sheriff
You present the $proof to the sheriff, not realizing the rain has washed away the ink from the hand-written letter.