# Multiple Rooms to same Room

On to the next query. Multiple excits…

I have three rooms A,B,C
C is north of A
C is north of B

What is the syntax I should use,. I’ve tried what my limited knowledge can do.

Thanks!

That syntax will work as you have it

``````Lab is a room. Foyer is north of Lab. Foyer is north of Nook.
``````

However, as you can’t have two rooms mapped south of the same room, the connection from Foyer to Nook will be one-way; Foyer is north of Nook, but Nook is not north of Foyer. If you compile this and look at the Map tab of the index and click the + sign next to Nook, it says:
“north to Foyer (but south from Foyer is Lab)”

This is a design issue rather than a syntax issue; there can only be one room that you get to by going south from Foyer, unless you want to write special code to randomize going south or something like that. So if you don’t want a one-way connection, you need to figure out how to do that.

One thing that can sometimes work is to have a double connection, one of which is one-way:

``````Hall is a room. "The dining room is to the north."
Dining room is north of Hall. "The hall is to the south, and you can go down to the basement."
Basement is down from Dining room. "There are stairs to the north leading up to the dining room."
Dining room is north of Basement.
``````

You can go up or north from Basement to get to the dining room, but to get from the dining room to the basement you have to go down; south takes you to the Hall.

The problem with this is that this automatically defines the reciprocal relation that both A and B are south of C, and that’s not allowed – because then where would the player go if they tried to go south from C?

You would need to resolve this by making one or both of these into one-way connections, or creating a curving path – for example:

``````North of AA is southwest of CC.
North of BB is southeast of CC.
``````

Although I don’t recommend actually doing that without the use of some kind of exit-listing extension, or otherwise describing the exit paths very well in the description, as that would just confuse the player. It might be less confusing if you just make these mutual exits:

``````CC is northeast of AA and northwest of BB.
``````

Another option is to help disambiguate by putting in a door between the curving exits – this way the player can `go green` rather than needing to know that it’s southwest specifically. However AFAIK you do still have to give a unique direction to each door:

``````A green door is an open door.  It is southwest of CC and north of AA.
A red door is an open door .  It is southeast of CC and north of BB.
``````

This isn’t quite true–usually when you create a map connection Inform automatically creates the reciprocal connection if you tell it not to, but when the reciprocal connection is already “taken” then it creates a one-way connection. Which is often not what you want.

Anyhow, for Thalor, it’s probably worth looking at §3.3 of Writing with Inform, which talks about one-way connections. (I had forgotten the syntax for asymmetrical connections like “North of AA is southwest of CC”!)

1 Like