1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-07 17:44:22 +03:00
inform7/resources/Documentation/Examples/ShawnsBadDay.txt
2023-07-24 11:56:58 +01:00

23 lines
1.3 KiB
Plaintext

Example: * Shawn's Bad Day
Location: Standard tokens of grammar
RecipeLocation: Actions on Multiple Objects
Index: EXAMINE multiple things at once
Description: Allowing the player to EXAMINE ALL.
For: Z-Machine
We can add the handling of multiple objects to an existing action simply by adding in a line of grammar using "[things]". In response, Inform will consider every object accepted by the token, and perform the action once for each of those objects. Thus:
{*}"Shawn's Bad Day"
The Treasury is a room. The vault is a lockable locked closed openable container in the Treasury. It is fixed in place. "A massive vault fills up one wall." The description is "The vault's system includes [a list of things which are part of the vault]."
A little green light, a little blue light, a little red light, a thin black pane of glass, a laser beam, a retinal scanner, a thumbprint ID plate, a dial, and a large lever are part of the vault.
The security guard is a man in the Treasury. The description is "His name is Shawn, and he doesn't look happy."
The description of the green light is "Off." The description of the blue light is "Tranquilly on." The description of the red light is "Angrily flashing."
Understand "examine [things]" as examining.
Test me with "examine all".