User Tools

Site Tools


giving_the_reader_several_options

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
giving_the_reader_several_options [2013/11/13 05:15]
klembot created
giving_the_reader_several_options [2017/10/10 00:39] (current)
Line 1: Line 1:
-===== Giving the Reader Several Options ==== +#​redirect ​actions
- +
-Suppose you're writing a passage like this: +
- +
-> The door opens into a narrow sloping corridor which leads into another chamber. The walls are covered with hieroglyphics,​ and there are three clay pots standing on top of a stone table. Will you: +
->  +
-> Lift the lid of the white pot? Turn to **14** +
-> Lift the lid of the black pot? Turn to **156** +
-> Lift the lid of the red pot? Turn to **183** +
-> Walk through the chamber to the archway in the far wall? Turn to **20** +
- +
-(Ian Livingstone,​ //Temple of Terror//) +
- +
-Lifting the lid of one pot shouldn'​t preclude the protagonist from lifting the lid of another afterwards — assuming, of course, that the pots don't kill the protagonist (which, unfortunately,​ they often do in these kinds of gamebooks). The ''<<​actions>>''​ macro shows the reader a list of choices, excluding any he has already seen. You can combine this with the ''<<​display>>''​ macro to implement the passage above: +
- +
-<​code>​ +
-:: Pot Chamber +
-The door opens into a narrow sloping corridor which leads into another chamber. +
-The walls are covered with hieroglyphics,​ and there are three clay pots +
-standing on top of a stone table. +
-<<​display "Pot actions">>​ +
- +
-:: Pot actions +
-<<​actions "Lift the lid of the white pot" "Lift the lid of the black pot" +
-          "Lift the lid of the red pot" "Walk to the archway">>​ +
- +
-:: Lift the lid of the white pot +
-There are chocolates inside! And they'​re delicious. +
-<<​display "Pot actions">>​ +
- +
-:: Lift the lid of the black pot +
-There'​s licorice inside. You've never been that much of a fan, but maybe +
-someone you encounter on your quest will like them. +
-<<​display "Pot actions">>​ +
- +
-:: Lift the lid of the red pot +
-It's empty! Looks like someone got here before you did. +
-<<​display "Pot actions">>​ +
- +
-:: Walk to the archway +
-You continue on your brave quest... +
-</​code>​ +
- +
-The reader can open one, none, or several pots in the room before proceeding onward. Make sure you have at least one choice that does not lead back to the <<​actions>>​ macro. Otherwise, readers won't be able to continue. +
giving_the_reader_several_options.txt · Last modified: 2017/10/10 00:39 (external edit)