"Deleting Variables": SugarCube (v2.18)#
<<unset>> works as a "reverse" to
<<set>>. Instead of setting a value, it deletes it.
<<unset>> works on both temporary and story variables.
:: 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.