AutoDoor bug

Robert Eric I used AutoDoor today to test it out. I used: (instance aDoor of AutoDoor (properties y 100 x 210 view 2 entranceTo 2 locked FALSE doorCtrl 1 ) ) When I wasn't on the blue control, 1, it opened. When I was, it closed. I changed some code in the AutoDoor script from: (if( & (send gEgo:onControl) doorCtrl) (self:open()) )( else (self:close()) ) To: (if( & (send gEgo:onControl) doorCtrl) (self:close()) )( else (self:open()) ) And it worked fine. Any thoughts? It's probably not a bug, but I figured I'd call it that until someone told me otherwise.
Brian_Provinciano Your control colours must be wrong. I tested it by taking the Tutorial Quest game, exactly as it is from doing the tutorial and changing the following in rm001.sc:

(use "door")
to:
(use "autodoor")

(instance aDoor of Door
   (properties
      y 100
      x 195
      view 2
      entranceTo 2
      locked TRUE
   )
)

to:
(instance aDoor of AutoDoor
   (properties
      y 100
      x 195
      view 2
      entranceTo 2
      locked FALSE
   )
)


It is identical to the normal door in the tutorial except for the minor changes ("use autodoor" and "of AutoDoor").
Brian_Provinciano Oh, by the way, look in the help file. Colour "1" for doors and such is Black, "2" is navy, "4" is green, "8" is teal, etc. Since all normal areas on the control screen are black, it's going to open up all the time unless you're on a controlled area.
Brian_Provinciano Always use the colours for controls as defined in SCI.SH:

(define ctlBLACK          $0001)
(define ctlNAVY          $0002)
(define ctlGREEN          $0004)
(define ctlTEAL          $0008)
(define ctlMAROON       $0010)
(define ctlPURPLE       $0020)
(define ctlBROWN          $0040)
(define ctlSILVER       $0080)
(define ctlGREY          $0100)
(define ctlBLUE          $0200)
(define ctlLIME          $0400)
(define ctlCYAN          $0800)
(define ctlRED          $1000)
(define ctlFUCHSIA       $2000)
(define ctlYELLOW       $4000)
(define ctlWHITE          $8000)
Robert Eric Now why would blue be 2 and black 1? Is it just something to do with the interpreter. That was all that through me off. Sorry.
Robert Eric Oh, I missed that last post. Never mind.
Brian_Provinciano In the case of controls, each colour is a bit. There are 16 bits and 16 colours. This is because some control areas could have more than one colour, so instead of a number from 0 to 15, it uses bits.