FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

Door pushing/pulling

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Wed Oct 10, 2012 2:02 pm    Post subject: Door pushing/pulling Reply with quote

The other day, I noticed that in a game compiled with USE_VERBSTUB, when it comes to doors, >PUSH always means >OPEN DOOR and >PULL always means >CLOSE DOOR. Of course, hinged doors in real life have 'interior' and 'exterior' sides, depending on which way they swing. Now, I don't consider myself a "simulationist", but this seems like an easy enough thing to fix. Here is the new code:
Code:
#ifset VERBSTUBS
   before
   {
      object DoPush
      {
         if location = self.between
            return Perform(&DoOpen, self)
         else
            return Perform(&DoClose, self)
      }
      object DoPull
      {
         if location = self.between
            return Perform(&DoClose, self)
         else
            return Perform(&DoOpen, self)
      }
   }
#endif


In the above code, between #1 is always the exterior side and between #2 is always the interior side.

Anyhow, I thought I'd share that. I haven't thought of ways to simplify/represent it further, but people are welcome to try.
Back to top
View user's profile Send private message AIM Address
Tdarcos



Joined: 16 May 2008
Posts: 4441
Location: University Park, Maryland

PostPosted: Wed Oct 10, 2012 2:54 pm    Post subject: Re: Door pushing/pulling Reply with quote

Roody_Yogurt wrote:
Of course, hinged doors in real life have 'interior' and 'exterior' sides, depending on which way they swing.

And then there are swinging doors that you can push either way, as well as revolving doors (hint, hint) that you can only push. About the only place I see swinging doors are in commercial restaurants and in the kitchens of some older houses as an easier way to allow people in and out of the kitchen where it had doors on it. (Most places today do not put a door on the kitchen.)

But I think your pointing out that doors have specific directions is an excellent addition. Have you ever looked at the Half Life series of games; when you go through a door, it always opens either toward the player or away from them? So the way the door is open depends on which side you were standing in front of it when you activated it. And I think Portal does the same thing when you escape into the back of the Enrichment Center.
_________________
The lessons of history teach us - if they teach us anything - that no one learns the lessons of history.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended