Checking a Door's State

Checking a door's state is incredibly easy. Each door contains a property named doorState. By reading the doorState property, you can find out whether the door is opened, closed or opening.

Here's an example of finding out the state:

(if( == (aDoor:doorState) DOOR_OPEN)
  Print("The door is open")
  (if( == (
aDoor:doorState) DOOR_CUED)
    Print("The door is opening")

    Print("The door is closed")

That sums it up! Good luck!

Back To The Table of Contents