Inform 7 Home Page / Documentation


§7.12. Characters Following a Script

So far we've seen characters who will answer questions whenever the player feels like asking, and characters who will use some reasoning procedure to direct the conversation. There is a third option, often useful in IF with a fast-paced narrative: the character follows a conversational script, making sure to cover a series of points before the scene ends.

There are more and less tedious ways to implement this kind of scene. The worst case is one in which the player is not allowed to interrupt or ask any questions; he must merely wait until the character runs out of things to say. This can be useful and plausible in very small doses - say, two or three turns - but if the character has more information than that to impart, we may want to make the scene more interactive.

Pine 2 partly addresses this challenge: the character has a line of conversation that she wants to follow to its conclusion; we may ask questions along the way, but if we're silent, she'll take up the slack, and the scene won't end until she's done with what she has to say.

Another kind of script is a series of actions for the character to perform. Robo demonstrates a programmable robot that will observe what the player does, then try to emulate the actions later when switched into play-back mode. Robo 2 extends this capacity to allow the robot to contain fifteen different scripts which the player can store, list, run, and erase.

Your Mother Doesn't Work Here offers a character with a list of tasks but whose plans can be interrupted by more urgent demands. This verges on not being a simple script any more: if we carry the idea to its natural conclusion, we get characters capable of planning scripts for themselves to accomplish their aims. This is conventionally called "goal-seeking".

* See Goal-Seeking Characters for characters that work out plans for themselves in order to accomplish various outcomes


arrow-up.png Start of Chapter 7: Other Characters
arrow-left.png Back to §7.11. Character Knowledge and Reasoning
arrow-right.png Onward to §7.13. Traveling Characters

*ExampleRobo 1
A robot which watches and records the player's actions, then tries to repeat them back in the same order when he is switched into play-back mode.

*ExampleYour Mother Doesn't Work Here
Your hard-working mother uses a list as a stack: urgent tasks are added to the end of the list, interrupting longer-term plans.

***ExamplePine 2
Pine: Adding a conversation with the princess, in which a basic set of facts must be covered before the scene is allowed to end.

***ExampleRobo 2
A robot which watches and records the player's actions, then tries to repeat them back in the same order when he is switched into play-back mode.