![]() | Chapter 17: Activities | ![]() ![]() |
17.1. What are activities? |
It is poor form to define with negatives, but the first thing to say about activities is that they are not actions. This needs saying because Inform often seems to treat them as if they are, by allowing us to write rules like so:
Before printing the name of a woman, say "Ms ".
With this rule in place, someone called "Daphne" will always be described as "Ms Daphne", and so on. The language looks as if we were imposing a rule on an action called "printing the name of", but there is no such action: instead, it is an "activity". To spell out the difference:
An action is a simulated task for the fictional protagonist.
An activity is a real task for the computer program doing the simulation.
Activities allow us to influence or change some of the standard habits of Inform, using rules as flexible and powerful as those applicable to actions, though activities are in several ways simpler and easier.
| ![]() What are activities good for? Controlling output when we want the same action to be able to produce very flexible text depending on the state of the world -- in this case, making highly variable room description and object description text. |
|
Previous | Contents | Next |