Monday, 3 March 2014

The "action" Macro

The <<action>> macro is useful for when you want to present the player a set of choices several times, but at each point, previously chosen options cannot be chosen again. For example, the player arrives at a junction, and can go any of three ways. Ahead leads to the rest of the game, but he might first go left, then come back here, then have the option to go ahead or right.

Set up the options in a passage of their own. It might look like this (in this case, I called the passage "Courtyard actions"):

"Talk to the men"
"Try the big double doors"
"Try the small door"
"Leave the castle" >>

In the passage where the player arrives at the courtyard looks like this:

The stairs led down to another door, which opened into a courtyard. Two men were repairing a cart.

<<display "Courtyard actions">>

All this does is import the "Courtyard actions" into the text, so the player sees four options. The "Try the big double doors" is similar:

The hero went to the big double doors, and tried to open them, but they were locked.

<<display "Courtyard actions">>

But in this case any choices that have already been taken will not get displayed. Talking to the men has other choices:

The hero walked over to the men repairing the cart. 'Hi.'
They looked her up and down. 'Hi!'

[[Ask them to take her out of the castle]]
[[Try to learn more]]
<<display "Courtyard actions">>

No comments:

Post a Comment