Inform 7 Home Page / Documentation

§18.19. Printing the announcement of darkness

1. When it happens. Inform frequently calculates to see if the player is in light or darkness: this activity happens on the change from light to darkness.

2. The default behaviour. To print "It is now pitch dark in here!".

3. Examples. (a) The most obvious use is to change the text:

Rule for printing the announcement of darkness: say "Ooh-er! It's now very nearly pitch dark in here." instead.

(b) But we could also use this activity for sneakier purposes, silently moving things around:

Before printing the announcement of darkness: now all of the gremlins are in the kitchen.

(c) A special description for occasions when the player has climbed into a container and shut it (so that the darkness is the result of his own actions, rather than some external circumstance):

Rule for printing the announcement of darkness when closing a container which contains the player:
    say "Congratulations: now you can't see a thing." instead.

arrow-up.png Start of Chapter 18: Activities
arrow-left.png Back to §18.18. Printing a refusal to act in the dark
arrow-right.png Onward to §18.20. Printing the announcement of light