O'Reilly logo

Creating Interactive Fiction With Inform 7 by Aaron A. Reed

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Making Things Happen

In the last chapter, we introduced the concept of the condition: a phrase, like the blanket is in the wire mesh cage, that’s either true or false at any given moment. So far, I’ve shown you two ways to use conditions. Used as assertions, they set the initial state of a story when play begins:

When prefaced by “if” in conditional text substitutions, they do one thing if the condition is true and another if it is false:

But if we want to change the story world, we need a way to cause something to be. The special word now, when placed at the start of a condition, makes it so:

As with “if,” though, “now” ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required