Custom Door Script – CDS
Tired of limited door options? The Custom Door Script Kit empowers you to design and create unique, interactive doors with ease.
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 locally and remotely
- Access Server can log player actions (open, close, access granted or denied)
- Access Plugins can provide additional security options (Keycard, Keypad, Password)
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 everything 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 define 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 to open/close that door.
Now that you’ve set a DoorPartName, rename the linked prims that need to move the same way.
When you’re done, place it inside your root prim the CDS_Core_vX.lsl in it.
It will automatically 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 CDS_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 part there is.
When the process is complete, the Wizard will delete itself and the door will restart 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:
Standalone vs Non-Standalone Core Scripts:
You may notice you have two Core scripts to choose from in your package.
This is because the code to use the Access Control Server takes someplace, if you don’t expect to use it later on, you may want to use the Standalone which is stripped out of that part. Meaning it also has a bit more memory room to control more moving parts.
You can always change your mind later and replace the Core script with the other, the configuration won’t be lost.
Customization – internal Config notecard details:
Your door has multiple settings you can change 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 separately), must match, its case case-sensitive. No symbols.
- ServerChannel
- Defines the communication channel to your Access Control Server. Numerical Only.
- ServerPassword
- V5 now encrypts communications between the Access server and the doors to avoid exploits. Alphanumerical only.
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 plugins to request access permission (more details below)
- ExclusiveUser:
- List of avatar names (full names like AppleEater Resident or Vala Avro) separated by commas. This sets a specific list of people who can interact with the door.
This setting is not compatible with the Access Control Server or the Plugins.
- List of avatar names (full names like AppleEater Resident or Vala Avro) separated by commas. This sets a specific list of people who can interact with the door.
- UsersGroups:
- If you use the Access Control Server, this is where you put the list of server groups (exact names separated by commas) that can use the door.
- If you use the Plugins, this is where you set the Group Keys instead.
In Animation door configuration section
- DoorSteps
- This integer is the number of divisions the movement makes to go from closed to open (or vice-versa) the higher the number the slower the animation
- DoorSleep
- This float sets the time in between each step from DoorSteps, the higher value the more ‘choppy’ the animation looks
- 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
- Smoothing:<Yes/No>
- Available in Update 5.1 this helps smooth the start and end of the animation
In Options section
- Verbose:<Yes/No>
- Toggles the chat whispers of the door script
- Hold For Lock:<Yes/No>
- Allows you to hold your click on the button to locally lock the door.
- Max Touch Distance
- Value of the maximum allowed distance a user can click/interact with the buttons.
- Lock Public:<Yes/No>
- Allows anyone to lock and unlock the door by holding the buttons.
- 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
- Locking Sound
- Button Sound
- Volume
- Value in float to set the sound volume.
Default Notecard
#Server access (for non-standalone version)
ServerName:
ServerChannel:
ServerPassword:
#Access List
OwnerOnly:No
Same Group:No
ExclusiveUser:
UsersGroups:
UseAccessPlugin:No
#Animation door configuration
DoorPartName:door
ButtonPartName:button
CollisionPartName:door
DoorSteps:40
DoorSleep:0.05
Smoothing:Yes
#Sound Configuration
Loop Moving Door Sound:
Open Door Sound:
Close Door Sound:
Locked Door Sound:
Locking Sound:
Button Sound:
Volume:0.5
#Options
Verbose:Yes
Max Touch Distance:15
Hold For Lock:Yes
Lock Public:No
Avatar Collision Open:Yes
AutoCloseTimer:40
Power Ignore:No
Code9/Quarantine Ignore:No
Code9/Quarantine End Open:No
ExtraChannel:0
#BUILDER EDITION
ActivationKey:
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 greeted 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 prims from the animation, do that and also rename the prim something else.
Builder Edition:
The Builder edition allows you to include the script in your creation to sell them.
You’ll get to use the ‘Activator‘ found in the main package to receive your activation key, then copy and paste the key into the Notecard of each door you set up.
Don’t forget to remove the Transfert permission from the CDS Core script otherwise, it will self-destruct when initiating in your customer’s hand.
After-sale, your customers can come grab the Access Control Server for additional security controls as long as you keep your Config notecard in the doors editable.
API Documentation
Incoming API:
If you didn’t set an Access Control Server, the door will listen by default for these:
Channel | Message | Description |
-99 | powerup | Turn on the door |
-99 | powerdown | Turn off the door |
-99 | code9|<1/0> | Switch for Code9 without ACS (in v5.3) |
ExternalChan: If you’ve set an ExternalChan, this allows sending 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() with the channel you’ve set in the notecard.
Outgoing API:
Channel | Message | Description |
-56035 | open_close|<1/0> | Sends a signal of the status of the door. |
-56035 | power_change|<1/0> | The power state has changed |
-56035 | lock_change|<1/0> | Lock status changed |
Internal (Link) API – Outgoing
There’s a link message being sent out to the LINK_SET so you can add more scripts or animations depending on the door status.
Number (num) | String (str) | Key | Description |
-78791 | open_me | <door_steps>|<door_sleep> | Opening animation starts |
-78791 | close_me | <door_steps>|<door_sleep> | Closing animation ends |
-3100 | startup_done | Door startup finished | |
-3100 | setup_done | Door setup finished | |
-3100 | check_activate_door | <avatar key> | Request access check for the avatar who clicked the door when the “UseAccessPlugin” is enabled. |
Internal (Link) API – Incoming
-3300 | access_ok | <avatar key> | Response from the plugin script when granted. |
-3300 | access_denied | <avatar key> | Response from the plugin script when denied. |
Box content :
- CDS_Core (Door script core)
- CDS_SetupWizard
- Config (Default config notecard)
- Updater disk (Little disk that automatically updates previous versions)
- Activator (Builder edition only)
- Read-me
Addons – Sold separately:
- Access Control Server
- Keycard Plugin (TBA)
- Passcode/Keypad Plugin (TBA)
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.