Inform 7 Home Page / Documentation


§8.8. Moving backdrops

A backdrop can be in several rooms at once. When created, its position can be given as any specific collection of rooms, or as a region, or even as "everywhere". For instance:

The Upper Cave is above the Rock Pool. The Ledge is east of the Pool.

The stream is a backdrop. It is in the Upper Cave and the Ledge.

Moving backdrops is not like moving other things, because there's no single destination. There are several possibilities:

(a) A backdrop can be moved to a region. If we define:

Lower Level is a region. The Rock Pool and the Ledge are in the Lower Level.

then we can write either of

move the stream to the Lower Level;
now the stream is in the Lower Level;

and either way, the stream is now found in the Rock Pool and the Ledge but nowhere else.

(b) A backdrop can be moved to a category of rooms:

move (object) backdrop to all (description of objects)

This phrase moves the backdrop so that it is now present in every room matching the given description. Example: If we define

A room can be wet or dry. A room is usually dry. The Rock Pool is wet.

then we can write

move the stream backdrop to all wet rooms;

This phrasing, "move the ... backdrop to all ..." is deliberately meant to look unlike the simpler "move ... to ...", to emphasise that this kind of movement is possible only for backdrops.

What then happens is that the stream is present in whichever rooms are currently wet. But the stream's position is ordinarily checked only after movements, for efficiency's sake. So if the player is in a room which suddenly changes from being dry to being wet, the stream will not magically appear (though it will be there if the player goes out and comes in again). If this is not good enough, the phrase "update backdrop positions" can be used to ensure the accuracy of all backdrop locations after a dramatic change:

update backdrop positions

This phrase runs through all backdrops in the model world and makes sure they are correctly in, or not in, the current location, so that everything appears right from the player's point of view. Example:

The Upper Cave is above the Rock Pool. The Ledge is east of the Pool. The stream is a backdrop.

When play begins:
    move the stream backdrop to all wet rooms.

A lever is in the Cave. The lever is fixed in place.

Instead of pulling the lever when the Cave is dry:
    now the Cave is wet;
    now the lever is in the Rock Pool;
    now the lever is portable;
    update backdrop positions;
    say "The old rusty lever pulls away, and the thin cave wall goes with it, so that a stream bursts into the cave, falling to the pool below."

(c) A backdrop can be moved to be either everywhere or nowhere:

After sleeping:
    say "It's a bright new day!";
    now the stars are nowhere.

After waiting:
    say "Darkness falls rapidly here.";
    now the stars are everywhere.


arrow-up.png Start of Chapter 8: Change
arrow-left.png Back to §8.7. Moving things
arrow-right.png Onward to §8.9. Moving the player

***ExampleOrange Cones
Creating a traffic backdrop that appears in all road rooms except the one in which the player has laid down orange cones.