1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-08 01:54:21 +03:00
inform7/resources/Documentation/Examples/Query.txt

22 lines
1 KiB
Plaintext

Example: * Query
Location: Understanding mistakes
RecipeLocation: Helping and Hinting
Index: Responding to questions starting with WHO, WHAT, etc.
Description: Catching all questions that begin with ``WHO``, ``WHAT``, ``WHERE``, and similar question words, and responding with the instruction to use commands, instead.
For: Z-Machine
First, we create a single `"[query]"` token so that we can capture all instances of such sentences in a single line:
{*}"Query"
Blank Room is a room.
Understand "who" or "what" or "when" or "where" or "why" or "how" or "who's" or "what's" or "when's" or "where's" or "why's" or "how's" as "[query]".
Understand "[query] [text]" as a mistake ("[story title] understands commands, such as '[command prompt]examine [a random thing that can be seen by the player]', but not questions. For more instructions, type HELP.").
Test me with "who am I? / who are you? / where is this place?".
Now the game will respond to all questions novice players might type with this reminder to look for help information.