Inform 7 Home Page / Documentation
§8.4. Change of either/or properties
When we have an either/or property, we can set it like so:
Instead of waiting when the oaken door is closed:
say "There is a slow, creaky click! sort of noise as the door swings open, apparently all by itself.";
now the oaken door is open.
If it is open already, nothing changes: in any case nothing is said to the player unless we give explicit instructions to that effect, as we've done here.
Inform protects its model world from accidental damage in several ways, one of which is to ensure that things are not given properties which they are not allowed to have. So this, for instance, will not be accepted:
now the oaken door is unvisited
More subtle problems arise if it is not possible to tell, when the story is being constructed, what the object in question will be: for instance, if we try to change a randomly chosen object to be "unvisited". Inform therefore makes additional checks during play, printing up a suitable message only if the rules are violated. The net effect is that it is impossible for the oaken door ever to have the "unvisited" property.
|Start of Chapter 8: Change|
|Back to §8.3. Changing the status line|
|Onward to §8.5. Change of properties with values|
Plaza View is a room. "Your uncle's apartment, on loan to you for viewing the parade and celebrations today. This would be more of a sacrifice on his part if he weren't currently yachting around Corfu."
The smart window is a device in Plaza View. It is fixed in place. "A vast smart window [if transparent]overlooks the park[otherwise]has turned to a sheet of hazy blue[end if]." The smart window can be transparent. The smart window is transparent. The description is "An electrochromic device which changes shade and transparency in response to the application of current.
Note the "can be transparent" line. Devices ordinarily are not allowed to have transparency or opaqueness, but we can make an exception in this case. Without that line, attempts to change the transparency of the window will fail.