MOAB Universal

Modified: 9/11/2012 9:43 PM
Recently changed articles You can subscribe to this wiki article using an RSS feed reader.

MOAB Universal All-In-One Door

MOAB Universal Door
Scripts for an all-in-one, fully configurable door.
By Antonius Frentis. Copyright MiceOnABeam 2012.
v1.0.0

FEATURES
********
- ALL-IN-ONE DOOR! Swing, Pivot, Slide, Curtain, Iris, Clock or Transparent door;
- Works at ANY rotation. Can be linked or unlinked!
- NO NEED FOR PATH CUTS! WORKS WITH UNCUT PRIMS, SCULPTS & MESH!
- Fully configurable TRUE HINGE position & swing, slide direction & distance;
- Supports double or multi-doors without linking;
- Automatic close after configurable timeout;
- Lock/Unlock the door in the closed or open position;
- Security: Whitelist & Blacklist configurable;
- Control door via a chat command interface or the MOAB HUD Door Server (sold separately);
- Optional sounds on door open or close;
- Optional doorbell sound and/or send IM to owner on touch of locked door;
- Optional chat message & door title on door open;
- Limit distance from which door can be touched;
- Works with the MOAB HUD Door Server and MOAB RolePlay script (both sold separately);
- All easily configured via notecard including speed, smoothness, command channel, phantom, transparent, swing range, slide distance, and more;
- Modular construction: Separate configuration script that can be removed after use;

ACCESS CONTROL
**************
- The door maintains a Whitelist and a Blacklist which is read from the AccessList notecard.
- Members of the Whitelist can always open the door and if the ALLOWCMD option has been enabled can also issue Door Chat Commands on the command CHANNEL.
- Members of the Blacklist cannot open the door (even if their group matches).

- If the door is unlocked it can be opened by anyone.
- If the door is locked, it can be opened by someone who is one of the following:
  - Someone who is a member of the Whitelist (the door's owner is automatically
    added to the Whitelist whenever the door is reset);
  - Anyone whose active group is the same as the group set for the door, and is
    not on the Blacklist; (The GROUPCHK option must be enabled for this.)

  - Names can be dynamically added to the Whitelist or Blacklist via the door chat command "add aName",
     and removed via "remove aName", with aName prefixed with a "+" or "-" for the WhiteList or Blacklist
     respectively. Note names added or removed in this way are cleared on door reset when the AccessList
     notecard is re-read.

- The Whitelists and Blacklists for multiple doors can also be centrally managed through
   the use of the MOAB HUD Door Server (sold separately).

SETUP (IMPORTANT!)
******************
- Use the provided door, OR create your own door prim as follows:

1) Create a door prim with length, width, height along the Y, X and Z axes respectively.
     
2) Copy/move the MOABUniversalDoor & MOABUniversalDoorConfig scripts along with the AccessList and DoorOptions notecards to your door prim's inventory. If you are just updating a door with newer script versions, then just replace the MOABUniversalDoor & MOABUniversalDoorConfig scripts in the existing door with their newer versions.*

3) Edit the notecard named DoorOptions in your door prim's inventory setting the values of the various options. See below for a description of the options and for example configurations.

4) The door maintains a Whitelist and a Blacklist which is read from the AccessList notecard. To add a name to the Whitelist or Blacklist, edit the AccessList notecard and add a line with the avatar's (legacy) name prefixed with a "+" or "-" respectively (only one name per line). Note that there is currently a limit of 40 names max that can be entered in the AccessList notecard.
    
5) Position & rotate the door to it's desired closed position.
 
6) The door prim may then remain unlinked, or linked as a child prim to a root prim which MUST be stationary with respect to the door.

7) Touch the door or send it a chat command to open or close.

8) After configuring and testing the door, you may remove the MOABUniversalDoorConfig script from your
   door prim's inventory if:
  - no further config changes are required;
  - access to the chat command interface is not required;
  - the MOAB Door Server is not being used;

* Automatic updating of doors is available with the MOAB HUD Door Server (sold separately).

DOUBLE OR MULTI-DOOR SETUP
**************************
  1) Edit each door prim in the group and enter in a common Group Number (integer. Range: 0 - 6000) in the Object Description field.
 
  2) MASTER DOOR
     - Select one door to be the Master, and delete the AccessList notecard from all OTHER door's inventory.
       Changes to the AccessList for the Master Door will then be automatically propagated to all other doors
       in the group.
     
     - A) If all doors in the group will be configured with the exact same door options, delete the
          MOABUniversalDoorConfig script and DoorOptions notecard from every door's inventory except
          the Master Door. In this case, changes to the DoorOptions notecard for the Master Door will
          then be automatically propagated to all other doors in the group.
                                            *** OR ***
       B) Otherwise if all doors in the group will have their own unique door options, setup & configure
          each door prim separately, with it's own MOABUniversalDoor, MOABUniversalDoorConfig scripts
          and DoorOptions notecards. (Note: If used with the MOAB Universal Door Server, only the
          Master Door in the multi-door group should set the SERVER option.)
       
  3) Once all configurations have been completed, chat: /1 reset (If you changed the CHANNEL option use that number instead.)

MULTI-DOOR NOTES
****************
- All doors in the group MUST be owned by the same owner.
- Note that if the touched door permits entry for an avatar, then all remaining doors will open even if their AccessList disallowed that avatar.   
- Changing the lock status of one door will be automatically propagated to all other doors in the group.
- If multi-doors are linked they must still be linked to a stationary root prim.
- If you change the Group Number following the setup of the scripts, shift-click all the door prims in the group and select Build...Scripts...Reset Scripts from the top level window menu. (Note: To remove the Group Number in the Object Description field, enter a space).

GENERAL NOTES
*************
- DO NOT change the names of any of the scripts or notecards!
- By design, an "open" chat command bypasses the authorization checks of the AccessList. A command will be accepted from the door's owner or from another prim that shares the same owner.
- For a Combo Swinging and Sliding Door, the sliding door will swing around the center of the selected AXIS.
- In case of any difficulties, chat: /1 reset  (If you changed the CHANNEL option use that number instead.)

DOOR CHAT COMMANDS
******************
These chat commands are accepted on the command CHANNEL from the door's owner (or another prim with the same owner) or any member of the Whitelist if the ALLOWCMD option has been enabled. You must be within DISTANCE meters of the door for the chat to be accepted.

Chat "/1 aCommand aParm". (If you changed the CHANNEL option use that number instead.)
- reset:  Resets the door script to it's closed state.
- lock:  Locks the door in it's current state.
- unlock:  Unlocks the door.
- open:  Opens the door.
- close:  Closes the door.
- add +/-aName:  Adds aName temporarily to the Whitelist(+) or Blacklist(-). Will be cleared on door reset.
- remove +/-aName:  Removes aName temporarily from the Whitelist(+) or Blacklist(-). Will be cleared on door reset.
- list:  Displays the names in the access list
- help:  Shows the list of available commands.

CONFIGURED OPTIONS (Edit the DoorOptions notecard to change)
***************************************************
*** DOORTYPE ***
Select one of the following values for DOORTYPE to specify the type of door movement:
DOORTYPE: (integer. Default: 1)
0: No movement;
1: Swinging Door;
2: Sliding Door;
3: Curtain;
4: Combo Swinging (Center only) & Sliding Door;
5: Iris Door (Not compatible with sculpted or mesh prims);
6: Clock (Cut) Door (Not compatible with sculpted or mesh prims);

*** XSIDE YSIDE ZSIDE ***
For Swinging or Sliding/Curtain/Combo Doors: Select among the following values to specify the
hinge point or slide direction respectively. (HINT: Edit your door prim & display the *LOCAL*
coordinate axes to assist in making the selections below.)

XSIDE: (integer. Default: 0)
-1: Swing/Slide from/to the Back side (-X Axis);  
 0: Center;
 1: Swing/Slide from/to the Front Side (+X Axis);

YSIDE: (integer. Default: 1)
-1: Swing/Slide from/to the Right side (-Y Axis);
 0: Center;
 1: Swing/Slide from/to the Left Side (+Y Axis);

ZSIDE: (integer. Default: 0)
-1: Swing/Slide from/to the Bottom side (-Z Axis);
 0: Center;
 1: Swing/Slide from/to the Top Side (+Z Axis);

*** AXIS ***
For Swinging/Combo Doors: Select one of the following values to specify the LOCAL AXIS around which
to swing/rotate.
AXIS: (integer. Default: 3)
1: X-Axis;
2: Y-Axis;
3: Z-Axis

*** ANGLE ***
For Swinging/Combo/Clock Doors: Enter the ANGLE in terms of degrees the door should swing/rotate/cut open.
To reverse the swing enter a negative number.
ANGLE: (float. Range: -360->360 Default: 90.0)

*** OFFSET= ***
For Swinging Doors: Optionally select a percentage offset from the hinge point to the prim center.
By specifying an offset here you can have the door swing at a position offset from it's side, thereby creating a pivot hinge or pivot door.
OFFSET: (float. Range: -5000->5000 Default: 0.0)

***RANGE ***
For Sliding/Curtain/Combo & Iris Doors: Enter the percentage of the door's length along the selected
direction for the door to slide or percentage of hollowness for an Iris Door.
RANGE: (float. Range: 0-5000 (Capped at 100 for Curtain & Iris door) Default: 100.0)

*** THE FOLLOWING OPTIONS APPLY TO ALL DOOR TYPES ***

*** TIME ***
Enter the time to take to open/close the door in seconds.
TIME: (float. Range: 0.5-30.0 Default: 1.0)

*** RTIME ***
Select whether to automatically adjust TIME to compensate for lag.
RTIME: (integer. No: 0 Yes: 1 Default: 0)

*** TIMEOUT ***
Enter the TIMEOUT after which to automatically close the door in seconds. If the door is locked it
will not automatically close.
TIMEOUT: (float. Enter 0 for no timeout. Default: 10.0)

*** SMOOTH ***
Enter the SMOOTHness factor for the door movement.
SMOOTH: (integer. Range: 0-100 Default: 90)

*** CHANNEL ***
Enter the chat channel for door chat commands from the door's owner (or another prim with the same owner)
or any member of the Whitelist if the ALLOWCMD option has been enabled.
CHANNEL: (integer. Default: 1)

*** ALLOWCMD ***
Select whether members on the Whitelist can issue Door Chat Commands.
ALLOWCMD: (integer. Yes: 1 (Default) No: 0)

*** GROUPCHK ***
Select whether to allow members of the door's group to enter (member must have group set active).
GROUPCHK: (integer. Allow group: 1 (Default) Ignore group: 0)

*** PHANTOM ***
Select whether to make the door phantom on open and close, so as to not bump avatars in the way.
PHANTOM: (integer. Yes: 1 (Default) No: 0):

*** TRANSPARENT ***
Select whether to make the door 50% transparent on open and close.
TRANSPARENT: (integer. Yes: 1 No: 0 (Default)):

*** SERVER ***
Optionally enter the name of the MOAB Door Server.
SERVER: (string. Max 50 chars. Leave blank for no server.)

*** MESSAGE ***
Enter the message to chat on opening the door. %Name will be substituted by the name of the avatar.
MESSAGE: (string. Max 200 chars. Default: Welcome %Name! - leave blank for no message)

*** TITLE ***
Enter the title message to display above the door on opening. %Name will be substituted by the name of the avatar.
TITLE: (string. Max 100 chars. Leave blank for no title. Default: Welcome %Name)

*** NOTAUTH ***
Enter the message for non-authorized avatars. %Name will be substituted by the name of the avatar.
NOTAUTH: (string. Max 200 chars. Leave blank for no message. Default: Sorry %Name, you are not authorized to enter!)

*** OPENSOUND ***
Enter the sound's key or filename to be played when opening the door.
OPENSOUND: (string. Leave blank for no sound. Default: cb340647-9680-dd5e-49c0-86edfa01b3ac)

*** CLOSESOUND ***
Enter the sound's key or filename to be played when closing the door.
CLOSESOUND: (string. Leave blank for no sound. Default: e7ff1054-003d-d134-66be-207573f2b535)

*** KNOCKSOUND ***
Enter the sound's key or filename to be played when someone touches a locked door and is not authorized to enter.
KNOCKSOUND: (string. Leave blank for no sound. Default: 213aae54-6093-7fcc-118f-3039a5435986)

*** SENDIM ***
Select whether to Send an IM to door's owner when someone touches a locked door and is not authorized to enter.
SENDIM: (integer. Yes: 1 No: 0 (Default)):

*** DISTANCE ***
Enter the maximum distance from which a touch or chat command will be accepted.
DISTANCE: (float. Enter 0.0 for no distance check. Default: 3.0)
***************************************************************

EXAMPLE CONFIGURATIONS
**********************
For a Swinging Door:
 - Set DOORTYPE=1
 - As specified by the XSIDE, YSIDE, ZSIDE options, the door will swing from one of the following sides:
   Left, Center, Right, Front, Back, Top or Bottom.
 - As specified by the AXIS option, the door will swing clockwise around one of the following local axes:
   X Axis, Y Axis or Z Axis. To reverse the swing, specify a negative value for the DEGREES option.

For a Sliding or Curtain Door:
 - Set DOORTYPE=2 or DOORTYPE=3 respectively.
 - As specified by the XSIDE, YSIDE, ZSIDE options, the door will slide along one of the following local axes:
   Forward (+X Axis), Back (-X Axis), Left (+Y Axis), Right (-Y Axis), Up (+Z Axis) & Down (-Z Axis).

For an Iris Door:
 - Set DOORTYPE=5.
 - The door will hollow out to the percentage hollowness specified by the RANGE option.

For a Clock Door:
 - Set DOORTYPE=6.
 - The door will be cut open to the degrees specified  by the ANGLE option.
   To reverse the cut motion, specify a negative value for the ANGLE option.

- Simple Transparent Door:
 - DOORTYPE=0 TRANSPARENT=1

- Left Swing Door:
  DOORTYPE=1 XSIDE=0 YSIDE=1 ZSIDE=0 AXIS=3 OFFSET=0.0 ANGLE=90.0  
  To reverse the swing, set DEGREES to -90

- Right Swing Door:
  DOORTYPE=1 XSIDE=0 YSIDE=-1 ZSIDE=0 AXIS=3 OFFSET=0.0 ANGLE=90.0  
  To reverse the swing, set DEGREES to -90
   
- True Door Hinge (Swings on edge!), Right Swing Door:
  DOORTYPE=1 XSIDE=1 YSIDE=-1 ZSIDE=0 AXIS=3 OFFSET=0.0 ANGLE=-90.0
 
- Sliding Door to Right:
  DOORTYPE=2 XSIDE=0 YSIDE=-1 ZSIDE=0 SLIDE=100.0
 
- Pet Door:
  DOORTYPE=1 XSIDE=-1 YSIDE=0 ZSIDE=1 AXIS=2 OFFSET=0.0 ANGLE=90.0
 
- Drawbridge:
  DOORTYPE=1 XSIDE=-1 YSIDE=0 ZSIDE=-1 AXIS=2 OFFSET=0.0 ANGLE=-100.0
 
- Pivot Door, Left Swing Door:
  DOORTYPE=1 XSIDE=0 YSIDE=1 ZSIDE=0 AXIS=3 OFFSET=50.0 ANGLE=90.0
 
- Overhead Garage Door:
  DOORTYPE=1 XSIDE=1 YSIDE=0 ZSIDE=0 AXIS=2 OFFSET=2000.0 ANGLE=90.0
 
- Curtain, Slide Up:
  DOORTYPE=3 XSIDE=0 YSIDE=0 ZSIDE=1 RANGE=100
 
- Curtain, Slide Right:
  DOORTYPE=3 XSIDE=0 YSIDE=-1 ZSIDE=0 RANGE=100

- Iris Door, 50% Open:
  DOORTYPE=5 RANGE=50
 
- Clock Door, 180 degrees Open:
  DOORTYPE=5 ANGLE=180
*****************************************************************

Tags:
Home: MOAB Universal Copyright © 2010-2018 MiceOnABeam Software