Start the story... [[Variables Home]]
Initialize the variables.
{
(set: $has_key = false)
(set: $num_visits = 0)
(set: $last_page = "Variables Init")
}
Home page for variables.
The key question:
(if: $has_key)[You have the key, open the [[Locked Door]]](else:)[Look for the key!]
You have visited the rooms $num_visits times.
The last page you visited was $last_page.
Num visits testing:
(if: $num_visits > 3)[Three is enough](else-if: $num_visits < 1)[Try a room](else:)[Keep trying]
Visit [[Room 1]]
Visit [[Room 2]]
[[Restart Game->Variables Init]]
Just an empty room.
Increase the page count and set the last visited page name.
{
(set: $num_visits to it + 1)
(set: $last_page to "Room 1")
}
Return [[Variables Home]]
You found the key!
{
(set: $has_key = true)
}
Return [[Variables Home]]
Using the key, you unlock the door and ... find the Twine logo!
Twine <img src="https://twinery.org/icons/twine.svg" width="50" height="50" title="Twine Logo"/>
Return to [[Variables Home]]
[[Restart Game->Variables Init]]