Author Topic: Checking to see if a door is open or closed  (Read 19495 times)

0 Members and 1 Guest are viewing this topic.

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 729
    • View Profile
    • Email
Checking to see if a door is open or closed
« on: September 18, 2016, 07:25:12 pm »
I'd been whining about this for a while:
When you have an exit that has a door do you:
1) describe the door : like look east - you see a large oak door - since the player wouldn't know what room was beyond it unless they have already visited it, or
2) describe the room that lies beyond the door: like look east - you see the library there - since they should be able to know the neighboring room is a library if the door is open.

If the door is closed, 2 doesn't make sense.  If the door is open, 1 doesn't make sense, but there was always only one exit description.

After whining again yesterday, Roland did a look into it for me and found out this:

room trig:

if %self.east% /= closed
 
and in a mob trigger:

if %self.room.north% /= closed
 
See http://old.tbamud.com/Oasis_DG_pages/contents/variables.htm in the Rooms section for the details.

So now, if you're really into doing scripts and really want a different description for your exit if there is a door - you can do it. 

Yay.