Transition text

This seems like an extremely simple thing and yet I’m having so much trouble finding out how to do this;

I just want some text to describe the player’s transition from one room to another. Simple example - player climbs a wall, or goes down an elevator. This text needs to be displayed for story purposes.

My problem is if the doors are automatically opened in the process, if I use a “Before going to A from B, say…” I get the “(opened the door)” message come up after the message describing how they got there.

If I use “After going from A to B, say…”, sure enough the “(opened the door)” message comes before the description, but now the one time “[if room B is unvisited]…[otherwise]…[end if]” always shows the “unvisited” text unless I “look”. Here’s my code…

[code]The Parking lot is a room.

The Lab is a room.

Elevator doors are a closed door. Elevator doors are north of The Parking Lot and south of the Lab.

After going from The Parking Lot to The Lab, say “[if The Lab is unvisited]You get a long winded explanation of how the elevator takes you down and a scanner scans you before entering the lab.[otherwise]The elevator takes you down to the bottom floor, to the Lab, and you get scanned.[end if]”.[/code]

The problem is just that your “After” rule is preventing the automatic “look” (which is carried out by a report rule). If you put a “continue the action” in, you should be fine.

After going from The Parking Lot to The Lab:
	say "[if The Lab is unvisited]You get a long winded explanation of how the elevator takes you down and a scanner scans you before entering the lab.[otherwise]The elevator takes you down to the bottom floor, to the Lab, and you get scanned.[end if]";
	continue the action.

(The “visited” flag is set by a successful “look”.)

Thank you :slight_smile: Is this the right way to do “transition text”?

I don’t think there really is a “right” or “wrong” way to do anything. Inform is just so extensive that there are usual multiple ways to solve this. For example, in one situation I wanted something similar: everytime a player would go north the adventure would make it clear that they were going through a door (pushing the door open, stepping through and the door autoclosed).

I solved it like this:

Before opening:
	If the noun is blue door:
		say "You open the door, and soon after it automatically closes again.";
		stop the action;

Before going through the blue door:
	If buildingFloor is 0:
		say "You push the door open and step through.."

After going through the blue door:
	say "The door automatically closes behind you.";
	continue the action

Although someone the same it’s also a little bit different. And there are many more ways in which you could do this.

In my opinion the best way would be the one which works for you.

That’s good to know. Thanks to both of you :slight_smile: I’m getting the idea that something I think is actually a common thing that might happen has many subtleties with how differently it can be executed, and so it’s better that Inform is so open ended.