Class: Door (of Prop)

The Door class is a prop class which handles all the door related functions. It saves a lot of time when using doors.

There are a number of properties you can set to get your door working. Three, (doorCtrl, roomCtrl and doorBlock) deal with the control screen. These specify the colour used in the control screen for the door events. For example, if ego is on an area of the control screen with blue pixels and the roomCtrl is set to $0200 (blue's identifier), then it realizes that the ego has "gone through the door" and will go to the room specified by entranceTo. For more information on each colour's identifier, read the kernel OnControl()'s documentation. Since a door event is set when the user if on a control, each door should use different colours.

Properties

  • y
  • x
  • z
  • heading
  • yStep
  • view
  • loop
  • cel
  • priority
  • underBits
  • signal
  • nsTop
  • nsLeft
  • nsBottom
  • nsRight
  • lsTop
  • lsLeft
  • lsBottom
  • lsRight
  • brTop
  • brLeft
  • brBottom
  • brRight
  • cycleSpeed
  • script
  • cycler
  • timer
  • entranceTo
  • locked
  • openSnd
  • closeSnd
  • doorState
  • doorCtrl
  • roomCtrl
  • doorBlock
  • code
  • illegalBits
  • force
  • notify

Methods

  • void init()

    Sets up the door.

  • void doit()

    Checks the ego and the door state to see if the ego can go through the door, and if the ego can go to the next room based on the control lines.

  • void cue()

    Stops update on the door and cues the object pointed to by the notify property.

  • void open()

    Opens the door.

    It handles opening the door, checking if the ego is close enough, if it's already open, etc.

  • void close()

    Closes the door.

    It handles closing the door, checking if the ego is close enough, if it's already closed, etc.