Need to change a room connection

#1

I was wondering if someone could tell me how to change which room is mapped north of another room. I found an example in the documentation, but it isn’t working. I have tried everything else I can think of, and all I’ve managed to do is create some really spectacular bugs. I know there are ways I could fake it, but I’m using Exit Lister so the wrong exits would show up in the status bar.

0 Likes

#2

[code]Place is a room. Eastplace is east of Place. Strangeplace is a room.

Instead of jumping:
now Strangeplace is mapped east of Place;
now Place is mapped west of Strangeplace;
now nothing is mapped west of Eastplace;
say “Your jumping has triggered a change in the rooms!”

Test me with “e/w/jump/e/w”.[/code]

The thing to note here is that you have to change the connections in all relevant rooms.

The initial “Eastplace is east of Place” sets up an implicit two-way street between those rooms, but afterward you need to be explicit about both rooms having connections to each other. If you set Strangeplace to east of Place but not Place west of Strangeplace, then you aren’t able to go back.

And if you don’t include “now nothing is mapped west of Eastplace,” then you can still get to Place from Eastplace but can’t go back (it goes to Strangeplace instead). You can have a bunch of rooms that all go west to the same room, but only one east of that room.

Furthermore, in this particular example you don’t want to remove Eastplace from play by saying “now Eastplace is nowhere,” because if the player is inside it when they jump it triggers an error for making the player go nowhere. Make sure your player never goes nowhere.

It’s possible your bugs could come from room names containing directions, like if one is called “north of the river” or something. You can fix this by calling it north-of-the-river and using “the printed name of north-of-the-river is ‘north of the river’.”

0 Likes

#3

I think you’ll get a runtime error from “now Eastplace is nowhere” (if it compiles at all) even if the player isn’t in Eastplace at the time. Rooms don’t have holders, so it doesn’t make sense to move them anywhere.

0 Likes

#4

You’re correct, I shouldn’t have even brought it up, just inexperience on my part. Just need to make or break the connections between rooms, that’s all.

0 Likes

#5

I got that runtime error! :slight_smile: And many other errors. Thank you so much! I think the only thing I haven’t tried is the ‘nothing is mapped’ part. That must be what I’m missing. This has been a bad one. I’ve spent so much time repeatedly getting my PC trapped in a church, and given that he’s the devil, that is just extra wrong. Thank you again.

0 Likes