Hi All, I feel like every day brings something new to the table. It is not always a huge find, but sometimes the little things are just the more rewarding.
Searching the forum gave me this: Asking questions of the player before play begins - Authoring / Inform 7 - The Interactive Fiction Community Forum (intfiction.org)
However I wanted to achieve a relatively simple effect:
- Print some introductory text leading into the…
- Print game’s banner text
- Ask a yes/no question to the player
- Show starting room description
And then allow the player to start commanding the game.
I remembered Emily Short asks a tutorial question in Bronze, and so I had a look at the source code: http://inform-fiction.org/I7Downloads/Examples/bronze/source.txt.
The answer was much simpler than I expected. I have taken the liberty to rewrite it a bit in order to be able to use it (replaced the change commands by now commands):
The story description is "Once upon a time..." [the introductory text]
When play begins:
say "[the story description][paragraph break]".
Setting is a kind of value.
The settings are unset, functioning and dead.
Novice mode is a setting that varies. Novice mode is unset.
After printing the banner text:
if novice mode is unset:
say "[line break]Have you played interactive fiction before? >";
if the player consents:
now novice mode is dead;
say "[line break]If you have not played [story title] before, you may still want to type HELP to learn about special commands unique to this game.";
otherwise:
now novice mode is functioning;
say "[line break]Some extra command help is provided, though you may turn it off at any time.".
Of course to complete implementation of “novice mode”, you no doubt want to add commands to disable or enable it later on. For further details check out the source code link provided above.