Once upon a time, Variable Vinnie decided to go for a pleasant walk in the woods. But wouldn't you know it? The moment he shut his front door, he realised he'd left his keys inside.
He'd have to work out where he'd left his spare key - perhaps in [[the shed]] or [[at the bottom of the garden]] - before he would be able to open [[the door]].Vinnie stepped into the shed and looked around.
It was completely empty. He had no idea why he thought his spare house key might be in here.
He decided that he would most likely have to check [[at the bottom of the garden]] if he were to have any hope of opening [[the door]].(set: $key to true)Vinnie checked the bottom of the garden and saw a gnome.
Suddenly, he remembered: during a session of late night drunk internet shopping, he'd bought one of those garden gnomes with a hollow rubber butt in which to store your spare house key.
(Note from the author: I vaguely recall this being a real product available for sale at one point. If I have in fact just made it up, then I have many concerns.)
Vinnie retrieved his spare house key from the gnome's hollow rubber butt, content in the knowledge that he would now be able to open [[the door]] once more.{
(if: $key is true)[The key turned in the lock, granting Vinnie access to his beloved home.]
(elseif: $rattled > 5)[Vinnie rattled the door one more time, and it came right off its hinges! Success!!! Except now he had to get a new door...]
(else:)[(set: $rattled to it + 1)Vinnie rattled the door like some kind of helpless loser. Perhaps he should have checked in [[the shed]] or [[at the bottom of the garden]] instead. That would have been far less embarrassing. Of course, there was nothing stopping him from simply rattling [[the door]] again.]
}{
(set: $key to false)
(set: $friend to "none")
(set: $rattled to 0)
}