Home ] Up ] 

Double Automatic Doors
by Dreamless Dancer
DSPK V02.00 Furcadia New Dragonspeak Script: Double Automatic Doors
Created by: Dreamless Dancer
  • Furre position on the outside #FPOX, #FPOY
  • Inside the door position on the outside #FTOX, #FTOY
  • Furre position on the inside #FPIX, #FPIY
  • Inside the door position on the inside #FTIX, #FTIY
  • Closed door #DOOR1
  • Open door #DOOR2
  • Direction of the door NE or NW, this is a template reference line, the 'cell' contains NE to indicate to the code generator that the code needs to be oriented for NE-SW directions in the bump lines.
  • Names of the Rooms ROOM OUT | ROOM IN
Definitions for the locations and objects used in the below snippet.

 FYI, I use an Excel work sheet to generate the code using cell references, I only enter the position numbers in the 'cells' above, and the sheet writes the code out in the spaces below.

ROOM OUT generally refers to what I term the Outside of the room and the furre is moving from SW towards the NE. Using default as a reference, that also means that the door and the furre share the same position, #FPO will equal the door's position.

The other assumption is that ROOM IN is the inside and the furre is moving from NE towards the SW. Again, using default as a reference, that means that the door actually exists in what I call the triggering position, #FTI.

Using this as a guide, the lower left hand door is the FPO(X,Y) position and the purple tile is the FTO(X,Y). Normally, I use 161's for the floors on the 'other' side of the door, but there may be instances where I wish to show a little floor 'from the other side', in which case I would put an object 254 there. This is so that the furre doesn't end up there should the teleport be blocked. The upper right is the #FPI(X,Y) and #FTI(X,Y) positions. For the most part, at least in areas of 'dark rooms', that is, rooms surrounded by 161's and / or I'll use walls to edge the room and use 177/624's to mask out the lower part of the wall.

* // begin ROOM OUT to ROOM IN
* // This part merely opens the door, or attempts to open the door, if the door is already open because someone else had just passed through, then nothing of course happens.

(0:7) When somebody moves into position (#FPOX, #FPOY),
(1:13) and the triggering furre is facing northeast (up and right),
(3:2) at position (#FPOX, #FPOY) on the map,
   (5:5) change object type #DOOR1 to type #DOOR2.
(3:2) at position (#FTIX, #FTIY) on the map,
   (5:5) change object type #DOOR1 to type 0.

* // outside ROOM OUT bump furre if they attempt to walk NW into opened door
* //
(0:1) Whenever somebody moves,
(1:19) and they (moved from/are standing at) position (#FPOX, #FPOY),
(1:16) and the triggering furre is facing northwest (up and left),
(1:1013) and position (#FPOX, #FPOY) is object type #DOOR2,
   (5:18) move the triggering furre back where they came from.
(3:2) at position (#FPOX, #FPOY) on the map,
   (5:5) change object type #DOOR2 to type #DOOR1.
(3:2) at position (#FTIX, #FTIY) on the map,
   (5:5) change object type 0 to type #DOOR1.
* // open the door, inside ROOM IN, only going SW, and nobody standing outside
(0:7) When somebody moves into position (#FPIX, #FPIY),
(1:15) and the triggering furre is facing southwest (down and left),
(1:1101) and there's no furre at (#FPOX, #FPOY),
(3:2) at position (#FPOX, #FPOY) on the map,
   (5:5) change object type #DOOR1 to type #DOOR2.
(3:2) at position (#FTIX, #FTIY) on the map,
   (5:5) change object type #DOOR1 to type 0.
* // enter the ROOM IN
* // only if the is door open
(0:7) When somebody moves into position (#FTOX, #FTOY),
(1:1013) and position (#FPOX, #FPOY) is object type #DOOR2,
(3:2) at position (#FPIX, #FPIY) on the map,
   (5:80) move any furre present 1 step(s) northeast (up and right) if there's nobody already there.
   (5:81) move any furre present 1 step(s) southeast (down and right) if there's nobody already there.
   (5:83) move any furre present 1 step(s) northwest (up and left) if there's nobody already there.
(3:2) at position (#FPOX, #FPOY) on the map,
   (5:16) move any furre present to (#FPIX, #FPIY) if there's nobody already there.
* // otherwise open the door
(0:7) When somebody moves into position (#FTOX, #FTOY),
(1:1013) and position (#FPOX, #FPOY) is object type #DOOR1,
(3:2) at position (#FPOX, #FPOY) on the map,
   (5:5) change object type #DOOR1 to type #DOOR2.
(3:2) at position (#FTIX, #FTIY) on the map,
   (5:5) change object type #DOOR1 to type 0.
* // exit the ROOM IN to ROOM OUT, can always exit, pushing door open
(0:7) When somebody moves into position (#FTIX, #FTIY),
(3:2) at position (#FTIX, #FTIY) on the map,
   (5:5) change object type#DOOR1 to type 0.
(3:2) at position (#FPOX, #FPOY) on the map,
   (5:5) change object type #DOOR1 to type #DOOR2.
   (5:82) move any furre present 1 step(s) southwest (down and left) if there's nobody already there.
   (5:81) move any furre present 1 step(s) southeast (down and right) if there's nobody already there.
(3:2) at position (#FPIX, #FPIY) on the map,
   (5:16) move any furre present to (#FPOX, #FPOY) if there's nobody already there.
* // bump door closed if open and move from NW-SE, outside in ROOM OUT
(0:7) When somebody moves into position (#FPOX, #FPOY),
(1:14) and the triggering furre is facing southeast (down and right),
(1:5) and they successfully moved,
(3:2) at position (#FPOX, #FPOY) on the map,
   (5:5) change object type #DOOR2 to type #DOOR1.
(3:2) at position (#FTIX, #FTIY) on the map,
   (5:5) change object type 0 to type #DOOR1.
* // close the door, outside ROOM OUT
(0:1) Whenever somebody moves,
(1:19) and they (moved from/are standing at) position (#FPOX, #FPOY),
(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 (#FPIX,#FPIY),
(3:2) at position (#FPOX, #FPOY) on the map,
   (5:5) change object type#DOOR2 to type #DOOR1.
(3:2) at position (#FTIX, #FTIY) on the map,
   (5:5) change object type 0 to type #DOOR1.
* // close the door, inside ROOM IN
(0:1) Whenever somebody moves,
(1:19) and they (moved from/are standing at) position (#FPIX, #FPIY),
(1:115) and the triggering furre is not facing southwest (down and left),
(1:1101) and there's no furre at (#FPOX,#FPOY),
(3:2) at position (#FPOX, #FPOY) on the map,
   (5:5) change object type#DOOR2 to type #DOOR1.
(3:2) at position (#FTIX, #FTIY) on the map,
   (5:5) change object type 0 to type #DOOR1.
* // end ROOM OUT to ROOM IN main *Endtriggers* 9999 *Endtriggers*
Generated by DragonSpeak Editor, Apr. 27 2004, 19:00