[I6] How many doors can a single room have?

Just to double check.
Is it one door per compass object thingie?

I’m trying to make a room (a hallway, actually) a sort of hub for quite a few other rooms.
Can this be done with an arbitrary amount of doors? Or will I have to split the hallway into chunks every time a “wall side” has all its slots exhausted.
As in, the hallway goes from west to east, leaving northeast, north and northwest for “doors on the northern wall”, if things are restricted by slots.

That feels kind of clunky to me, but the many door solution might be clunky, as well, just differently.

I have a vague recollection of working on something like this. I think I ended up going the route of creating a new door class that was an enterable container, then upon entry, I moved the player to whichever room I liked. I would have another “door-container-teleporter” in that room which would return the player to the hall…

I believe I was using/looking-at some of the code in the Elevator example as well: ifwiki.org/index.php/Elevator_an … _6_example

In the end, I decided to simply segment the hall.

The Window Room example might help as well, since it’s a set of rooms in which you can see what’s in other rooms:


I know this is an I6 question, but I created an I7 extension called “Easy Doors” that allows the author to place doors anywhere without using map connections. I basically just made a new object that behaves like a door and moves the player to a linked destination when they ENTER it. If you do a lot of these, you’ll want a mechanism so that you can link two such doors so they remain consistently closed/open and locked/unlocked on both sides.

Any number of doors in a room can accept ENTER DOOR. However, if the player types NORTH there can only be one door to the north from that room – you’re putting it in the n_to property.

Thanks for the replies. The examples are good inspiration and I’ll try and make something from them on the side.
(For now I"m working on some other rooms)
Also, thanks for the extension, I’ll be using it from now on, most likely, but the problem remains.
I can’t seem to enter the door unless the big hall has the door set as its “n_to”.

I might just end up segmenting the hall if this continues to be a roadblock for too long, hehe.
For now, though, not giving up just yet, merely putting it as a side problem.

I’ll try making the doors catch the go or enter message and set the parent to their direction or something for now.

I’ve been having some success by giving the hallway an “n_to” but keeping it “0”.
The door to be entered then sets that up to lead into the room the door leads to, which has the corresponding “s_to”.

It’s somewhat clunky, though, maybe defining a new compass direction is the way to go?
Like “manydoor_to”, or something.
I’ll post the code here if I manage to figure the whole thing out.
Right now I have to do a bit of bookkeeping like calling library messages to deal with closed door cases and stuff, which is a bit smelly to me, but I think I’m on the right track, or at least vaguely right one.

I didn’t realize that the library would get upset about the door when the room’s direction property is unset. I apologize for the bad advice.

Would it suffice to have a scenery object which is not a door, but just looks like a door? Have it handle the Enter action (in a before clause) by moving the player to a new room. That would avoid everything to do with directionality.

No worries about that, worst that happens is me asking me questions :stuck_out_tongue:.
But yeah, I came up with a solution and it still requires the “room with the many doors” to have “settable directions” the doors can temporarily write to when entered, but it works.

Include "Parser";
Include "VerbLib";
!uses the easydoors extension
Include "easydoors"; 

Class ManyDoor class Doorway with
            if(noun ~=self) rfalse;
        Go: self.side2_to.(self.side1_dir) =0;
    before [;
            if (noun ==self)

            if(self hasnt open)return L__M(##Enter, 3, self);
            location.(self.side1_dir) = self.door_to();

Object BigHall "Many Door Hall" with 
        "This hall is bigger than the average hall,
         and has two doors on the northern wall that must be entered by name.",

    n_to, !the north wall is lined with many doors, which will overwrite "n_to" upon 
          !entering and once the player is through, set it back to 0
    has light;

Object Room1 "The first room" with 
    description "Clearly the better room.",
    s_to BigHall, !simple way out that works with "s" or "go south" etc
    has light;
Object Room2 "The second room" with
   description "Wishes to be the first room", 
   s_to BigHall,!simple way out that works with "s" or "go south" etc
   has light;

ManyDoor TestDoor1 "Northern Door #1" 
   with name 'first',
   side1_to Room1,  
   side1_dir n_to, 
   side2_to BigHall,
   side2_dir s_to, 
   isconcealed 0,
   autoopen 1,
   found_in BigHall Room1; 
ManyDoor TestDoor2 "Northern Door #2" 
   with name 'second',
   side1_to Room2, 
   side1_dir n_to,
   side2_to BigHall,     
   side2_dir s_to,    
   isconcealed 0,
   autoopen 1,
   found_in BigHall Room2; 

[ Initialise;
location = BigHall;

Include "Grammar";

It’s not the best solution, it would be better if the room asked “which door” when going north, but at least it works and retains the easydoor functionality, too.