Custom Door Script – CDS

Easy to setup door scripts with a comprehensive wizard

This is V5 documentation page, currently being developped.

Features :

  • 1 Script to run the complete door
  • An easy setup with a wizard
  • Capable of moving, rotating and resizing the door parts (animation)
  • Remote Trigger (open/close) with API
  • Access list configurable by the Config notecard inside each door or via the addon external access server
  • Ability to lock and unlock the door localy and remotly
  • Access Server can logs player actions (open, close, access granted or denied)

Create your first door:

Create your door, it must be at least made of 2 prims; a root prim that’s not going to move and a door object that will move, rotate or resize (or all 3).

Link everthing together and put the Config notecard inside your root prim before anything else. In that notecard you’ll find multiple settings but the first few you need to take care of are the DoorPartName and ButtonPartName (in the Animation door configuration section), these defines which prims should act as a door and which act as an activator. (You can put the same name for the button as the door)
The button is where the user will have to click in order to open/close that door.

Now that you’ve set a DoorPartName, rename the linked prims that needs to move the exact same way.
When you’re done, place inside your root prim the DS_Core_vX.lsl in it.
It will automaticly read the notecard and locate the parts that are missing an animation config.

As this is the first time you make that particular door, it will now require you to put the Wizard script inside so it can help you configure the animation for each door parts.
Drop the script DS_SetupWizard.lsl inside.

Once initiated the Wizard will make the door part glow, asking you to click it when its in the “Closed” position (rotation/size), once you click it, he’s going to ask for the same but for the “Opened” position. It will repeat that process for each door parts there is.

When the process is complete, the Wizard will delete itself and the door will restart in order to take the changes into account.
After loading, the door will switch to its ‘enabled’ state, now if you click on the buttons (if you have any) the door will open and close.

Video Tutorial:

Customization – internal Config notecard details:

Your door has multiple settings you can change in order to adapt some parameters such as:

In Server Access section

Leave these settings blank if you don’t use the Access Control Server!

  • ServerName
    • Defines the name of your Access Control Server (sold seperatly), must match, its case sensitive.
  • ServerChannel
    • Defines the communication channel to your Access Control Server
  • ServerPassword
    • V5 now encrypts communications between the Access server and the doors to avoid exploits.
In Access List section
  • OwnerOnly:<Yes/No>
    • If set to Yes, sets the door to only open/close to the Owner
  • Same Group:<Yes/No>
    • Make the door only open/close to people wearing the same group as the door.
  • UseAccessPlugin:<Yes/No>
    • Sets the door to use local pluggins to request access permission (more details below)
  • ExclusiveUser:
    • List of avatar names (full names like AppleEater Resident or Vala Avro) seperated by commas. This sets a specific list of people who can interract with the door.
      This setting is not compatible with the Access Control Server or the Pluggins.
  • UsersGroups:
    • If you use the Access Control Server, this is where you put the list of server groups (exact names seperated by commas) of whom can use the door.
    • If you use the Pluggins, this is where you set the Group Keys instead.
In Animation door configuration section
  • DoorSteps
    • This integer is the number of divisions the movement make in order to go from closed to open (or vice-versa) the higher number the slower animation
  • DoorSleep
    • This float sets the time inbetween each steps from DoorSteps, the higher value the more ‘choppy’ the animation look
  • CollisionPartName
    • This defines which linked object name should trigger an opening when an avatar collides with it
  • DoorPartName
    • Like described in the How to above, this defines the linked object name that should move when the door opens/closes
  • ButtonPartName
    • This defines the linked object name that triggers the door to open/close
In Options section
  • Hold For Lock:<Yes/No>
    • Allows you to hold your click on the button to locally lock the door.
  • Avatar Collision Open:<Yes/No>
    • Allows avatars to open the door just by colliding with it, needs the parameter CollisionPartName
  • AutoCloseTimer
    • Set a timer of seconds for the door to automatically close after being opened.
  • Power Ignore:<Yes/No>
    • If set to Yes, the door will ignore Power API commands (power off/power on) from the ZPM HUB Mk2 or Naquadah Generators Mk2
  • Code9/Quarantine Ignore:<Yes/No>
    • If set to Yes, the door will ignore the Quarantine from Atlantis or Code 9 from SGC or DHDs
  • Code9/Quarantine End Open:<Yes/No>
    • if set to Yes, the door will not only unlock at the end of a quarantine/code 9 but also open.
  • ExtraChannel
    • Default value is 0, means disabled. If a different number is set, this allows a script to remotly open/close the door (more infos below in the API section)
Sound Configuration section

All the sounds specified in this section must be sounds UUIDs

  • Loop Moving Door Sound
  • Open Door Sound
  • Close Door Sound
  • Locked Door Sound
  • Button Sound
  • Volume
    • Value in float to set the sounds volume.

Default Notecard

#Server access
ServerName:
ServerChannel:
ServerPassword:

#Access List
OwnerOnly:No
Same Group:No
UseAccessPlugin:No
ExclusiveUser:
UsersGroups:

#Animation door configuration
DoorPartName:door
ButtonPartName:button
CollisionPartName:door
DoorSteps:40
DoorSleep:0.05

#Sound Configuration
Loop Moving Door Sound:
Open Door Sound:
Close Door Sound:
Locked Door Sound:
Button Sound:
Volume:0.5

#Options
Hold For Lock:Yes
Avatar Collision Open:Yes
AutoCloseTimer:40
Power Ignore:No
Code9/Quarantine Ignore:No
Code9/Quarantine End Open:No
ExtraChannel:0

Change or Remake the animation:

If you wish to change the animation of one part or the whole thing, it’s easy too!
Just drop the Wizard back into your object and wait for the door to load, you’ll be greated with a dialog with these options:

  • Wipe Config
  • Single Wipe

Wipe Config will remove all the animation and reset the main script so you’ll need to do the creation steps above again, while Single Wipe allows you to click on a single part to remove the configured animation of that particular prim. If you wish to remove one of the prim out of the animation, do that and also rename the prim something else.

Incoming API:

If you didn’t set a server channel and server name for the Access Control Server, the door will listen by default to channel -8 for these:

powerupTurn on the door
powerdownTurn off the door

ExternalChan: If you’ve set an ExternalChan, this allows to send open/close commands to the door with a simple message containing the user key so it can be checked against the access lists.

default
{
    touch_start(integer total_number)
    {
        llWhisper(0,"Activating the door...");
        llShout(-1234,(string)llDetectedKey(0));
    }
}

Replace the ‘-1234’ in the llShout() to the channel you’ve set in the notecard.

Box content :

  • DS_Core (Door script core)
  • DS_SetupWizard
  • Config (default config notecard)
  • Updater disk (Little disk that automaticly update previous versions)
  • Activator (builder edition only)
  • Read-me

The following links currently only sell V3. V5 is coming soon.

You can buy this build over the Second Life Marketplace or in-world at the Vk Labs vendors.

400 L$

You can buy this build over the Second Life Marketplace or in-world at the Vk Labs vendors.

1000 L$