|
Double Automatic Locking Doors
by Dreamless Dancer
* // begin locking automatic doors * // toggle the lock, only if door is closed * // we test this real simply by checking the hall door. (0:7) When somebody moves into position (22,24), (1:1014) and position (16,20) is not object type 0,   (3:2) at position (22,22) on the map,     (5:6) swap object types 161 and 162. * // unlock the doors (0:7) When somebody moves into position (22,24), (1:54) and 2 step(s) NE & 1 step(s) NW from the triggering furre is object 161,   (3:2) at position (20,23) on the map,     (5:5) change object type 538 to type 539.   (3:2) at position (16,20) on the map,     (5:5) change object type 538 to type 539. * // lock the doors (0:7) When somebody moves into position (22,24), (1:54) and 2 step(s) NE & 1 step(s) NW from the triggering furre is object 162,   (3:2) at position (20,23) on the map,     (5:5) change object type 539 to type 538.   (3:2) at position (16,20) on the map,     (5:5) change object type 539 to type 538. * // if door is locked and trying to get out, unlock the door if needed, * // then switch to opened door state (0:7) When somebody moves into position (20,23), (1:16) and the triggering furre is facing northwest (up and left),   (3:2) at position (22,22) on the map,     (5:5) change object type 162 to type 161.   (3:2) at position (20,23) on the map,     (5:5) change object type 538 to type 531.     (5:5) change object type 539 to type 531.   (3:2) at position (16,20) on the map,     (5:5) change object type 538 to type 0.     (5:5) change object type 539 to type 0. * // when inside the room, bump the furre back if they walk into the open door, * // then close the door. (0:1) Whenever somebody moves, (1:19) and they (moved from/are standing at) position (20,23), (1:13) and the triggering furre is facing northeast (up and right), (1:1013) and position (20,23) is object type 531,     (5:18) move the triggering furre back where they came from.   (3:2) at position (20,23) on the map,     (5:5) change object type 531 to type 539.   (3:2) at position (16,20) on the map,     (5:5) change object type 0 to type 539. * // open the door only if a furre approaches the door straight on, * // prevents doors from popping open as furres pass them (0:7) When somebody moves into position (16,19), (1:14) and the triggering furre is facing southeast (down and right), (1:1101) and there's no furre at (20,23), (1:1013) and position (22,22) is object type 161,   (3:2) at position (20,23) on the map,     (5:5) change object type 539 to type 531.   (3:2) at position (16,20) on the map,     (5:5) change object type 539 to type 0. * // only if the is door open, allow a furre to exit the room. * // note that the design of this code, prevents a furre from leaving * // if the space outside in the hall is occupied, * // but will attempt to clear the hallway square of any furres. (0:7) When somebody moves into position (18,22), (1:1013) and position (20,23) is object type 531,     (5:14) move the triggering furre to (16,19) if there's nobody already there. (0:7) When somebody moves into position (18,22), (1:1013) and position (20,23) is object type 531, (1:1100) and there's a furre at (20,23),   (3:2) at position (16,19) on the map,     (5:83) move any furre present 1 step(s) northwest (up and left) if there's nobody already there.     (5:80) move any furre present 1 step(s) northeast (up and right) if there's nobody already there.     (5:82) move any furre present 1 step(s) southwest (down and left) if there's nobody already there. * // otherwise open the door * // if door is locked, unlock and open (0:7) When somebody moves into position (18,22), (1:16) and the triggering furre is facing northwest (up and left),   (3:2) at position (22,22) on the map,     (5:5) change object type 162 to type 161.   (3:2) at position (20,23) on the map,     (5:5) change object type 538 to type 539.     (5:5) change object type 539 to type 531.   (3:2) at position (16,20) on the map,     (5:5) change object type 538 to type 539.     (5:5) change object type 539 to type 0. * // enter the room if door is unlocked, * // can always enter without throwing door open first. * // again, code design is to prevent a furre from entering * // if the space just inside the door occupied, * // code attempts to clear space. (0:7) When somebody moves into position (16,20), (1:1013) and position (22,22) is object type 161,     (5:14) move the triggering furre to (20,23) if there's nobody already there.   (3:2) at position (16,20) on the map,     (5:5) change object type 539 to type 0.   (3:2) at position (20,23) on the map,     (5:5) change object type 539 to type 531. (0:7) When somebody moves into position (16,20), (1:1013) and position (22,22) is object type 161, (1:1100) and there's a furre at (16,19),   (3:2) at position (20,23) on the map,     (5:81) move any furre present 1 step(s) southeast (down and right) if there's nobody already there.     (5:82) move any furre present 1 step(s) southwest (down and left) if there's nobody already there. * // here for completeness, not possible in the test dream for this door, * // but this closes the inside door if run into from the opposite side. (0:7) When somebody moves into position (20,23), (1:15) and the triggering furre is facing southwest (down and left), (1:5) and they successfully moved,   (3:2) at position (20,23) on the map,     (5:5) change object type 531 to type 539.   (3:2) at position (16,20) on the map,     (5:5) change object type 0 to type 539. * // close the door, furre leaves the target area on inside, * // not going through the door, not running into door. (0:1) Whenever somebody moves, (1:19) and they (moved from/are standing at) position (20,23), (1:113) and the triggering furre is not facing northeast (up and right), (1:116) and the triggering furre is not facing northwest (up and left), (1:1101) and there's no furre at (16,19),   (3:2) at position (20,23) on the map,     (5:5) change object type 531 to type 539.   (3:2) at position (16,20) on the map,     (5:5) change object type 0 to type 539. * // close the door, when the furre leaves the target area out in the hallway. * // note that neither section will trigger if another furre steps * // into the trigger square on the other side of the door.
(0:1) Whenever somebody moves,(1:19) and they (moved from/are standing at) position (16,19), (1:114) and the triggering furre is not facing southeast (down and right), (1:1101) and there's no furre at (20,23),   (3:2) at position (20,23) on the map,     (5:5) change object type 531 to type 539.   (3:2) at position (16,20) on the map,     (5:5) change object type 0 to type 539. * // end locking automatic doors Generated by DragonSpeak Editor, Jun. 21 2004, 21:08
|