§9.10. Telephones
Telephones are much harder to achieve than televisions and in some ways as difficult to make convincing as a human character is - though of course there are corners which can be cut: we could have the reception drop off, or the other party hang up in a misunderstanding, and so on.
A single telephone line is tricky enough to provide that one might just as well have a general solution providing a whole network. Four Cheeses demonstrates a system where we can dial either people or numbers: CALL JANET ON TELEPHONE, or CALL 7103, for instance.
While Four Cheeses provides only four-digit phone numbers, like internal company extensions, Alias shows how to manage US-style seven digit numbers.
Finally, we might occasionally want the player to be able to address a microphone or telephone receiver directly when the identity of the person on the other end is unknown, in the form TELL MICROPHONE ABOUT CRIME. Ordinarily Inform will disallow this because we're not allowed to talk to inanimate objects, but the extension Inanimate Listeners provides more options.
See Saying Complicated Things for more approaches to conversation
![]() | Start of Chapter 9: Props: Food, Clothing, Money, Toys, Books, Electronics |
![]() | Back to §9.9. Televisions and Radios |
![]() | Onward to §9.11. Clocks and Scientific Instruments |
|
Seven-digit telephone numbers are too long for Inform to handle when compiling to the Z-Machine, but they will work under Glulx. To have this example succeed, make sure that you have selected the Glulx option in your settings menu.
Now we borrow some techniques from the Understanding chapter to set up dialing actions:
This much is enough to let us dial telephone numbers and have Inform report that we've done so; it doesn't actually provide a telephone system such that we could reach and converse with other characters (but see the other telephone examples in the recipe book for more on how one might do that). We'll set up a little political espionage scenario from which our player can make calls:
Borrowing again from the chapter on Understanding, we might arrange things so that the player knows and can call a few standard numbers with such syntax as CALL HOME:
And what if we'd like to have the player learn some phone numbers during the game?
This will understand CALL STEPHEN once the paper is examined; before that, the player will just get the "That's not a number you know" response that Inform uses for all attempts to call unknown names. We'd better plant this paper for the player to find:
|
|
Seven-digit telephone numbers are too long for Inform to handle when compiling to the Z-Machine, but they will work under Glulx. To have this example succeed, make sure that you have selected the Glulx option in your settings menu.
Now we borrow some techniques from the Understanding chapter to set up dialing actions:
This much is enough to let us dial telephone numbers and have Inform report that we've done so; it doesn't actually provide a telephone system such that we could reach and converse with other characters (but see the other telephone examples in the recipe book for more on how one might do that). We'll set up a little political espionage scenario from which our player can make calls:
Borrowing again from the chapter on Understanding, we might arrange things so that the player knows and can call a few standard numbers with such syntax as CALL HOME:
And what if we'd like to have the player learn some phone numbers during the game?
This will understand CALL STEPHEN once the paper is examined; before that, the player will just get the "That's not a number you know" response that Inform uses for all attempts to call unknown names. We'd better plant this paper for the player to find:
|