# Door (of `Prop`)

class `Door`

  Defined in Door.sc.

  Door offers support for automatically managing the open and close state of the door, and optionally offering access to another room.

  Example definition:

      (instance frontDoor of Door
              (properties
                      x 39
                      y 167
                      noun N_FRONTDOOR
                      approachX 36
                      approachY 175
                      view 210
                      entranceTo 230
                      moveToX 22
                      moveToY 169
                      enterType 0
                      exitType 0
              )
      )

## Properties

Inherited from `Prop`:

Property | Description
--- | ---
x |
y |
z |
heading |
noun |
modNum |
nsTop |
nsLeft |
nsBottom |
nsRight |
sightAngle |
actions |
onMeCheck |
state |
approachX |
approachY |
approachDist |
_approachVerbs |
yStep |
view |
loop |
cel |
priority |
underBits |
signal |
lsTop |
lsLeft |
lsBottom |
lsRight |
brTop |
brLeft |
brBottom |
brRight |
scaleSignal |
scaleX |
scaleY |
maxScale |
cycleSpeed |
script |
cycler |
timer |
detailLevel |
scaler |
case |
name |

Defined in Door:

Property | Description
--- | ---
entranceTo | Entrance to which room?
locked | Is the door locked?
lockedCase | The message condition to use when displaying a “locked” message.
openSnd | Open sound number.
closeSnd | Close sound number.
openVerb | The verb to use for opening and closing the door.
listenVerb | The verb to use for listening.
doubleDoor |
forceOpen |
forceClose |
caller |
moveToX |
moveToY |
enterType |
exitType |
closeScript |
openScript |
doorPoly |
polyAdjust | Amount to inflate base rect when creating a polygon.

## Methods

`init`()

`dispose`()

`doVerb`(theVerb)

`cue`()

`open`()

  Opens the door if it’s not locked.

`close`()

  Closes the door.

`listen`()

  Override this method in your door instance to provide logic for listening.

`createPoly`([polyPoints])

  Adds a `Polygon` for the door to the gAltPolyList.

  Parameters: | polyPoints (number) – A list of points for the polygon. If none are provided, the Door’s base rect is used.