TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 17 of 17

Thread: One-way doors, implementation and advice...?

  1. #1
    Member
    Registered: May 2017
    Location: USA

    One-way doors, implementation and advice...?

    In my current mission, there are a some rooms that are meant to be entered in a subtle way (e.g., window, vent shaft, etc...), but then can be easily exited (i.e., main door out of the room).

    While this is yields a natural flow from a game-play perspective, a lot of the implementation ends up feeling quite contrived. For example, (1) doors opened by a lever or button inside the room; or (2) there's a key to the room locked inside the room.

    Both of these work just fine (and are pretty common in FMs). But it bugs me. In most situations, this just doesn't make sense. Why would there only be a lever on one side of the bedroom door (why does it even use a lever to begin with)? Like seriously, how do they go to bed? And how many people leave their spare office key... in their office?

    I think a much more natural way to go would be one-way doors. Doors which are unlocked and frobbable to a player on the inside, but locked and/or unfrobbable to a player on the outside. These are ubiquitous in real life.

    My question is two-fold:

    First, what's the best way to do it? I've had moderate success using room brush triggers an bounds triggers (separately---two different attempts). It's about 95% successful when I'm not trying to break it. But when I *want* to break it, I can do weird things like leaning into the door, or approaching from really oblique angles, and typically within 10 seconds of frobbing, voila. Is there a better, more taffer-proof way to go about it?

    Second, *should* I do this? I'm not aware of any prior FMs doing this. I could see it being frustrating if a player knows that they're just on the other side of a door which they already know they don't have a key to. They might not even test it from the other side. Furthermore, using one way doors, once you close the door behind yourself, you’re back to square one. If you need to get back inside that room, you have to go the long way around...

    What do you all think?
    Last edited by trefoilknot; 13th Dec 2018 at 23:34.

  2. #2
    Dóttirin klęšist oft móšur möttli
    Registered: Apr 2015
    In Grimrock Reloaded, I put Frobinert on a door which has some planks in front of it. Removing the planks also removed FrobInert from the door.
    Similar things has been done in other FMs. A shelf/board is blocking a door/window which has FrobInert metaproperty. Removing the barricade removes FrobInert.

  3. #3
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Fields of bluegrass
    I think this may be one of those cases where good gameplay and not frustrating the player need to trump MUH REALISM.

  4. #4
    ZylonBane
    Registered: Sep 2000
    Location: ZylonBane
    Many real-life secure doors are in fact opened by pressing a button, so it's not unrealistic at all.

    Any type of one-way doors in someone's bedroom would be super weird though. That's all on you.

  5. #5
    Member
    Registered: May 2017
    Location: USA
    ...this is a very common type of bedroom door...? Not sure what you’re on about...

    My bedroom door will open from within when “locked” but won’t open from outside when locked (without a key). Same with my office, my apartment, my guest bedroom, and every hotel room I’ve ever been in. There’s some variation in whether opening from the inside also unlocks the door (as is the case for most bedrooms, but not most offices or hotel rooms).

    @Yandros, I agree--I would never prioritize realism over gameplay. But I'm not sure which one would be better from a gameplay standpoint...
    Last edited by trefoilknot; 14th Dec 2018 at 17:46.

  6. #6
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: Fields of bluegrass
    Within the context of ZB's security door example, his comment about it being odd for a bedroom makes sense. However now that you've pointed out other real-world scenarios like a hotel room door, I see where you're coming from now. I think it may take players off guard initially, though, but I wouldn't let that deter you from implementing it if it works within your story.

    Implementing it... a roombrush trigger is more reliable than a bounds trigger, and also if you are working in TG where there is no TrigOBBPlayer script (that is T2 only), then you're almost forced to go the roombrush trigger route. As long as the trigger brush is completely inside the room, I don't see an easy way to exploit or cheat around it. Can you give more detail on the setup you tried with roombrushes that still had a rate of failure?

  7. #7
    Member
    Registered: Apr 2011
    The least player-confusing way to do a one-way door is, to have some in-game reason why it's only openable from one side, like Unna's example. Something that the player actively removes and then the door works like an ordinary door. It doesn't have to be illogical: maybe a vase has fallen off the cabinet that's beside the door (I blame the cat), that the player picks up and then the door can open (inward) again. Or maybe the door has seven padlocks on the inside, and the paranoid owner of the place is the skeleton lying on the bed, the padlock key still clutched in his hand. Okay, that last one's pretty irrational, if not illogical

    But anyway, the thought of a fire-door like door that can only be pushed open, not pulled, was interesting. I don't know if it will suit your needs at all, but I decided to try writing a squirrel script for a one-way door. Drop this on a locked spinny door, and it'll open without a key from the inside, but still require a key from the outside.
    Code:
    class OneWayDoor extends SqRootScript
    {
        // Script for a door that can only be opened from the inside when
        // it is locked. The inside is the side that the door opens away
        // from. Only works on rotating doors, that rotate around Z axis.
        // If the door is not locked, it'll open from either side.
        // -- vfig 2018-12-15
        function OnFrobWorldEnd() {
            if ((Door.GetDoorState(self) == eDoorStatus.kDoorClosed)
                && Property.Possessed(self, "RotDoor")
                && (message().Frobber == Object.Named("Player"))
                && Locked.IsLocked(self))
            {
                local playerPos = Object.Position(message().Frobber);
                local localPlayerPos = Object.WorldToObject(self, playerPos);
                // Most doors are North-South oriented, but some
                // (like SecretDoor4x8) are East-West oriented, so
                // we need to account for that.
                local physBox = Property.Get(self, "PhysDims", "Size");
                local northSouth = (physBox.x >= physBox.y);
                local localOpenDirection = (northSouth ? vector(0, 1, 0) : vector(-1, 0, 0));
                local clockwise = Property.Get(self, "RotDoor", "Clockwise?");
                if (clockwise) {
                    localOpenDirection = -localOpenDirection;
                }
                // Finally, find out if the player is on the "inside" of the door.
                local playerOnInside = (localPlayerPos.Dot(localOpenDirection) < 0);
                if (playerOnInside) {
                    Door.OpenDoor(self);
                    // Cancel the message so the StdDoor script
                    // doesn't play a "locked" sound.
                    BlockMessage();
                }
            }
        }
    }

  8. #8
    Member
    Registered: May 2017
    Location: USA
    Wow Andy, this is great, thanks! This looks like it will work better than my prior approaches. I’ll give it a spin this week.

    I’m still undecided on whether to do it or not. The context is office doors, so it would feel perfectly natural. (I don’t even think it’s legal for an office door *not* to allow egress from within, in most countries). But still, throwing new mechanics in without warning is dicey...

    Maybe I’ll just mention in the readme file that some doors only open from one side—everyone will read that before playing, right...? Lol

    ps I still owe you a test of the other script you wrote for me. It’s near the top of my to-do list!

    Also, after re-reading ZBs comment, I’m legitimately concerned that he has a bedroom that he can lock people inside. Both creepy, and very much in violation of fire codes. Either that or he’s never seen a lockable bedroom door. *shrug*
    Last edited by trefoilknot; 15th Dec 2018 at 12:15.

  9. #9
    Member
    Registered: Apr 2011
    Quote Originally Posted by trefoilknot View Post
    But still, throwing new mechanics in without warning is dicey...
    If you do it as a one-off, for sure. But if you use it consistently, and it's easy to learn and consistent from the way things look, there's no problem.

    Also, after re-reading ZBs comment, I’m legitimately concerned that he has a bedroom that he can lock people inside. Both creepy, and very much in violation of fire codes. Either that or he’s never seen a lockable bedroom door. *shrug*
    As it happens, my bedroom door has a bolt… on the outside

    (Given that the door otherwise doesn't lock at all, opens into the bedroom, and the bolt is at the top of the door, I suppose some previous tenant wanted to be able to stop their cat or dog or toddlers from getting in there while they were elsewhere in the flat.)

  10. #10
    Member
    Registered: May 2017
    Location: USA
    I won’t tell the fire marshall

  11. #11
    ZylonBane
    Registered: Sep 2000
    Location: ZylonBane
    Quote Originally Posted by trefoilknot View Post
    Also, after re-reading ZBs comment, I’m legitimately concerned that he has a bedroom that he can lock people inside.
    Quote Originally Posted by ZylonBane View Post
    Any type of one-way doors in someone's bedroom would be super weird though.
    It would appear that re-reading comprehension isn't your strong suit.

  12. #12
    Member
    Registered: Mar 2001
    Location: Ireland
    The logical way to do this would be to have a bolt on the inside of the door.
    Make the door unfrobbable, make it only possible to frob the bolt from one side, and make frobbing the bolt slide it back and make the door frobbable.

    Alternatively, make door model with a joined bolt on it, and have the first frob (from the inside) open the bolt, and subsequent frobs act on the door as normal.

  13. #13
    Member
    Registered: Oct 2017
    Quote Originally Posted by ZylonBane View Post
    It would appear that re-reading comprehension isn't your strong suit.
    I'd also argue it isn't yours as well. His original post inquired about making doors locked on only one side. At no point did he say doors using buttons/levers entirely was unrealistic, just that in a bedroom they were not. So the first bit of your message above was irrelevant to the discussion at hand.

  14. #14
    Member
    Registered: May 2017
    Location: USA
    @NV, I think that’s a great idea. This would make sense logically, and would give a clear cue to the player, and solve the problem of forcing the player to go the hard way on subsequent entries.

    @ZB, how do you figure? I made a post about doors that can always be opened from one side, even when locked from the other side. From the player’s perspective, a “one way door.” By way of real world examples, I offered offices and bedrooms.* You expressed clear confusion at the idea. Logically, this means that either (1) you’re unfamiliar with the idea of a bedroom door being lockable; or (2) you’re unfamiliar with the notion that most bedrooms can be easily exited without a key, even while locked (as required under US law). Or more likely, (3) you decided to go with a convoluted interpretation of the original post, despite any and all contextual clues. Since you do this regularly (and most un-wittily for the most part), I find it more entertaining to imagine that you’re being sincere.

    *In practice, very few doors require a key both ways. Basically prisons, and other high security areas. It’s illegal in most situations for a door to disallow keyless exit. It’s a fire hazard.
    Last edited by trefoilknot; 16th Dec 2018 at 01:05.

  15. #15
    New Member
    Registered: Dec 2017
    They've got really lax fire safety laws in The City. :^)

  16. #16
    Member
    Registered: May 2002
    Location: Texas
    I've seen some bathroom doors that can be locked on inside (small button next to door knob) but become unlocked by simply turning the door knob. Although this doesn't keep the door locked, it could prevent player frustration if the player had to reaccess the room through a window or vent repeatedly. We have one in our house, and a small flat blade is used to unlock the door from the outside in an emergency.

  17. #17
    Member
    Registered: May 2017
    Location: USA
    Yeah, I definitely like the idea of making re-entry easy. I think NV’s idea of a bolt would be a nice time-appropriate analogue of the mechanism you describe.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •