intfiction.org

The Interactive Fiction Community Forum
It is currently Fri Nov 16, 2018 6:28 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Oct 16, 2018 5:10 am 
Offline

Joined: Thu Jun 28, 2018 4:13 am
Posts: 24
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.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Oct 16, 2018 5:52 am 
Offline

Joined: Tue Apr 06, 2010 6:53 pm
Posts: 37
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".


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'."


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Oct 16, 2018 8:26 am 
Offline

Joined: Mon Dec 15, 2014 9:15 am
Posts: 362
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.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Oct 16, 2018 8:58 am 
Offline

Joined: Tue Apr 06, 2010 6:53 pm
Posts: 37
jrb wrote:
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.


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.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Oct 16, 2018 10:24 am 
Offline

Joined: Thu Jun 28, 2018 4:13 am
Posts: 24
I got that runtime error! :) 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.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group