Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

door script options: what would you like to see?

Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
07-03-2009 00:53
and I'm late as usual, it was going so well... here's the beta version, it only supports the swing style atm, but all other listed features are active... and the code hasn't been cleaned up yet (I'm very unhappy with the size of the notecard reader, half the damn script!)

the script:
CODE

/*//( v7-D Zen Entry v0.9 )//*/

/*//-- Main Config Variables --//*/
list gLstAlw;
list gLstCfg =
["SOUND_RADIUS", "OPEN_AMOUNT", "TRANSIT_TIME", "AUTO_CLOSE_TIME", "DOUBLE_DIRECTION",
"MATCHED_MOVEMENT", "ACCESS_TYPE", "SOUND_NAME", "SOUND_NAME", "ALLOWED_NAME",
0, 90, 3, 10, 1, 0, 0];

/*//-- Tracking Variables --//*/
integer gBooOpn;
integer gBooUlk;

/*//-- handle open/close activity --//*/
uTransit( integer vIntNxt ){
if (gBooOpn | (vIntNxt *= !gBooOpn)){
if (llList2Vector( gLstCfg, 0 )){
llTriggerSoundLimited(
llList2String( gLstCfg, 7 + (gBooOpn != 0) ),
1.0,
llGetPos() + llList2Vector( gLstCfg, 0 ),
llGetPos() - llList2Vector( gLstCfg, 0 ) );
}
if (llGetLinkNumber() < 2){
llSetStatus( STATUS_PHANTOM, TRUE );
}

rotation vRotAng = llList2Rot( gLstCfg, -2 );
llTargetOmega( (< 0.0, 0.0, 1.0 > * llGetLocalRot()),
(llList2Float( gLstCfg, -1 ) * (1 | -(vIntNxt > gBooOpn))), 1.0 );
llSleep( llList2Float( gLstCfg, 2 ) );
llTargetOmega( ZERO_VECTOR, 0.0, 0.0 );
llSetLocalRot( < vRotAng.x, vRotAng.y, vRotAng.z, (1 | -(vIntNxt > gBooOpn)) * vRotAng.s > * llGetLocalRot() );

if (!(llGetLinkNumber() >> 1)){
llSetStatus( STATUS_PHANTOM, FALSE );
}
llSetTimerEvent( llAbs( !gBooOpn | (gBooOpn = vIntNxt) ) * llList2Float( gLstCfg, 3 ) );
}
}

/*//-- read the notecard if present --//*/
default{
state_entry(){
gLstAlw = llList2List( gLstCfg, 0, 6 ) + gLstAlw + (list)(llGetScriptName() + ".cfg";);
if (~llGetInventoryType( llList2String( gLstAlw, -1 ) )){
gLstAlw += (list)llGetNotecardLine( llList2String( gLstAlw, -1 ), gBooOpn );
}
else{
state sRdy;
}
}

dataserver( key vKeyChk, string vStrDta ){
if (llList2Key( gLstAlw, -1 ) == vKeyChk){
if (EOF == vStrDta || "== END ==" == vStrDta){
state sRdy;
}else if (~(gBooUlk = llSubStringIndex( vStrDta, "=" ))){
gLstAlw += (list)llDeleteSubString( vStrDta, gBooUlk, -1 );
vStrDta = llToLower( llStringTrim( llDeleteSubString( vStrDta, 0, gBooUlk ), STRING_TRIM ) );
if (~(gBooUlk = llListFindList( gLstCfg, (list)llList2String( gLstAlw, -1 ) ))){
if (9 == gBooUlk){
gLstAlw += (list)vStrDta;
}else{
gLstCfg = llListReplaceList( gLstCfg, (list)vStrDta, gBooUlk, gBooUlk );
}
}
}
gLstAlw =
llListReplaceList( gLstAlw, (list)llGetNotecardLine( llList2String( gLstAlw, -3 ), ++gBooOpn ), -2, -1 );
}
}

changed( integer vBitChg ){
if ((CHANGED_OWNER | CHANGED_INVENTORY) & vBitChg){
llResetScript();
}
}

/*//-- Clean-Up on Aisle 3 --//*/
state_exit(){
gBooOpn = 6;
string vStrTmp;
do{
/*//-- Set Default --//*/
list vLstTmp = (list)llList2String( gLstCfg, gBooOpn );
if (llList2String( gLstAlw, gBooOpn ) == (string)vLstTmp){
vLstTmp = (list)llList2String( gLstCfg, gBooOpn + 10 );
}
/*//-- Convert Cfg --//*/
if (4 & gBooOpn){
if (2 & gBooOpn){
vLstTmp = (list)((integer)((string)vLstTmp) % 1); //-- change to allow other types
}else{
vLstTmp = (list)(((integer)((string)vLstTmp) != 0) * (-(1 & gBooOpn) | 1));
}
}else if (gBooOpn){
vLstTmp = (list)((float)((string)vLstTmp));
}else{
vLstTmp = (list)(< 1.0, 1.0, 1.0 > * (float)((string)vLstTmp));
}
gLstCfg = llListReplaceList( gLstCfg, vLstTmp, gBooOpn, gBooOpn );
}while (gBooOpn--);

/*//-- Take out the trash --//*/
gBooUlk = -1;
while(llList2Key( gLstAlw, gBooUlk-- ));
gLstAlw = llList2List( gLstAlw, 7, gBooUlk );
gBooOpn = 6;
if (llList2Vector( gLstCfg, 0 )){
while(llList2Key( gLstCfg, ++gBooOpn ));
if (7 == gBooOpn){
gLstCfg = llListReplaceList( gLstCfg, (list)ZERO_VECTOR, 0, 0 );
}
if (8 == gBooOpn){
gLstCfg = llListInsertList( gLstCfg, (list)llList2String( gLstCfg, 7 ), gBooOpn++ );
}
}else{
++gBooOpn;
}
gLstCfg = llDeleteSubList( gLstCfg, gBooOpn, -1 );

/*//-- Add Type Dependencey Variables --//*/
if (!llList2Integer( gLstCfg, 6 )){
gLstCfg +=
[llEuler2Rot( < 0.0, 0.0, (llList2Float( gLstCfg, 1 ) * DEG_TO_RAD) > ),
llList2Float( gLstCfg, 1 ) * DEG_TO_RAD /
(llList2Float( gLstCfg, 2 ) + (llList2Float( gLstCfg, 2 ) == 0.0)) ];
}

if (llGetOwner() != (key)((string)llGetObjectDetails( llGetKey(), (list)OBJECT_GROUP ))){
gLstAlw = (list)llToLower( llKey2Name( llGetOwner() ) ) + gLstAlw;
}

gBooOpn = FALSE;
gBooUlk = TRUE;
}
}

/*//-- this is the working state --//*/
state sRdy{
/*//-- reset the timer for checking lock requests --//*/
touch_start( integer vInt ){
llResetTime();
}

touch_end( integer vInt ){
/*//-- check permissions --//*/
integer vBooAlw = (~llListFindList( gLstAlw, (list)llToLower( llDetectedName( 0 ) ) ) ||
(llDetectedGroup( 0 ) && llGetObjectPermMask( MASK_GROUP)) );
if ((integer)llGetTime()){
if (vBooAlw){
llInstantMessage( llDetectedKey( 0 ), "/me is " + llGetSubString( "unlocked.", (gBooUlk * 2), -1 ) );
llMessageLinked( LINK_SET, !gBooUlk, llGetObjectName(), "LOCK" );
}
}else if (gBooUlk || vBooAlw){
vector vPosOfs = (llGetPos() - llDetectedPos( 0 )) / llGetLocalRot();
llMessageLinked( LINK_SET,
(-(vPosOfs.x < 0 ) | 1) * (1 | llList2Integer( gLstCfg, 5 )), llGetObjectName(), "OPEN" );
}else{
llWhisper( 0, "/me appears to be locked" );
}
}

/*//-- Status Triggers are reflected out of the script so they can trigger linked doors --//*/
link_message( integer vInt, integer vBooVal, string vStrTgt, key vKeyCmd ){
if (llGetObjectName() == vStrTgt){
if ("LOCK" == vKeyCmd){
gBooUlk = vBooVal;
}else if ("OPEN" == vKeyCmd){
uTransit( ((vBooVal != 0) |
(vBooVal * llList2Integer( gLstCfg, 4 ))) * (1 | llList2Integer( gLstCfg, 5 )) );
}
}
}

/*//-- autoclose only if the door isn't locked in place --//*/
timer(){
llSetTimerEvent( 0.0 );
if (gBooUlk){
uTransit( 0 );
}
}

changed( integer vBitChg ){
if ((CHANGED_OWNER | CHANGED_INVENTORY) & vBitChg){
uTransit( 0 );
llResetScript();
}
}
}
/*//-- License Text --//*/
/*// Free to copy, use, modify, distribute, or sell, with attribution. //*/
/*// (C)2009 (CC-BY) [ http://creativecommons.org/licenses/by/3.0 ] //*/
/*// Void Singer [ https://wiki.secondlife.com/wiki/User:Void_Singer ] //*/
/*// All usages must contain a plain text copy of the previous 2 lines. //*/
/*//-- --//*/


the notecard:
CODE

ACCESS_TYPE= 0
OPEN_AMOUNT= 120
TRANSIT_TIME= 3
AUTO_CLOSE_TIME= 10
MATCHED_MOVEMENT= 0
DOUBLE_DIRECTION= 1
SOUND_RADIUS= 5
SOUND_NAME= 977dac77-7f0b-d022-74db-62d1f6862844
SOUND_NAME= 843dea69-326e-09d0-d6b0-6e6fa1e3a4bf
== END ==


== Notes on Configuration ==
; this notecard will only be read if it matches the script name + ".cfg"
; any lines that do not start with "VARIABLE_NAME=" will be ignored
; any lines after "== END ==" will not be read
; Door Names Control double triggering for linked doors (must have the same name)

== Entry Style Parameters ==

ACCESS_TYPE= 0
; 0=Hinge(rotation)[default]
; 1=Slide(move local x position)
; 2=Iris(hole Size)
; 3=Compress(shrinks x size)
; 4=Force Field(phantom + transparency)

OPEN_AMOUNT= 90
; if ACCESS_TYPE=...
; 0(angle in degrees when open compared to closed)[default=90]
; 1(move distance in meters [(+/-)local X])
; 2(max hollow percentage when open)
; 3(max shrink percentage when open)
; 4(max alpha percentage when open)

TRANSIT_TIME= 3
; [default=3]
; transit time in seconds between Open and close (0 for instant)

AUTO_CLOSE_TIME= 15
; [default=10]
; time to wait before autoclosing

MATCHED_MOVEMENT= 0
; [default=0]
; set 1 for the second entry in a matched set to enable consistent direction detection.
; (unused if ACCESS_TYPE > 1)

DOUBLE_DIRECTION= 1
; [default=1(true)]
; controls whether the entry moves in both directions
(unused if type > 1)


== Sound Parameters ==

SOUND_RADIUS=
; [default=0]
; cubic radius to limit sound to (0 to disable sounds[this is the default])

; specifying only one sound will play that sound for both open AND close
; specifying multiples will play the first on open, the second on close (all others are ignored)

SOUND_NAME=
SOUND_NAME=
;must be the name of a sound in object inventory, or the key of a sound in the linden library


== White list ==

; thanks to the following people for idea contributions and feedback

ALLOWED_NAME= madddyyy Schnook
ALLOWED_NAME= Ee Maculate
ALLOWED_NAME= Ephraim Kappler
ALLOWED_NAME= Rygel Ryba
ALLOWED_NAME= Lee Ponzu
ALLOWED_NAME= Dytska Vieria
ALLOWED_NAME= Kaylan Draken
ALLOWED_NAME= Dragger Lok
ALLOWED_NAME= Soen Eber
ALLOWED_NAME= Dekka Raymaker
ALLOWED_NAME= Jesse Barnett
ALLOWED_NAME= Darien Caldwell
ALLOWED_NAME= Rolig Loon
ALLOWED_NAME= Drongle McMahon
ALLOWED_NAME= Bubblesort Triskaidekaphobia
; [default=none]
; avatar name(s) to allow setting/ignoring of built-in lock Status (capitilization/leading-trailing spaces don't matter)
; group shared items enable extended group whitelisting automatically (must be wearing group tags)
; (owner is added automatically, if the object is not deeded.)

== END ==
;tells the notecard reader to stop reading the card



=== Original Post Starts Here ===
ok, so door scripts are a pretty common request, and there are some with some great features, but horribly ineffecient code... so I'm curious what options people would like to see in them... currently I have a script prety much ready for release with the following options/features

works at any angle
auto close in X seconds
swings both ways (opens away from the touching av)
locking via click (or listen for for locking multiple doors)
timed smooth opening
open/close sounds
double door triggering
group friendly ((un)locks/opens/closes for group members wearing tags)
linked single prim or unlinked any prim count

I'm considering doorbell sounds when locked and clicked by non group members, and while I personally hate the announcements, I'll consider them if people are interested. I'm also considering different styles of opening, like collapse (up/dwn/lft/rht), sliding (as before), Iris, and forcefield.

any other features that would be great to have?

EDIT:
Current Feature List / Planned Inclusions (recent updates are highlighted)
CODE

done:
meta Features:
uses filtered, controller friendly, link messages
works at any building angle!
No Manual Resets EVER!
Friendly to Group Deeding!
Works in attachments/vehicles!
Compatible with Box Vendors (RezFoo, RezFaux, Jack-in-the-Box, Builders Buddy, etc)
configurable via notecard, or by direct script edit
styles:
Hinge:
ALL:
Configurable degrees of Rotation
Single swing Direction:
configurable swing direction (in/out)
Double swing Direction:
Configurable Direction (towards/away from clicking av)
Smooth Transit:
configurable in seconds to open/close (optional)
phantom while in transit (IF in the root prim)
Auto-Close:
configurable seconds to wait before closing (optional)
open/close Sounds:
configurable Sound Radius (for low sound spaming)
Single or separate sound support (optional)
Locking:
Click + hold to un/Lock (2sec)
Lock Overrides Auto-Close regardless of position
Double Door Triggering:
ability to trigger linked Door to open simultaneously
Controller Enables Unlinked Triggering
Remote Control Access:
uses linked messages
un/lock
open/close
supports multiple controls
Door Grouping:
Uses Prim Name (description field has a flaw)
Access White Listing:
Uses names not keys (via optional notecard)
Optionally includes Group
Grants Access to built in lock functions.
Overrides Lock Status (can always open/close)

essentially done but not incorporated:
in process:
styles: iris, slide, compress, phantom


in queue:
fail safe (remember open/close state despite abnormal reset)

Not Done:
near term consideration:
doorbell
dialog configuration
far term consideration:
Multi-prim required styles (accordion, one way, pass restricted)


CODE

Known Issues:
if the script is reset while in the open state, it will treat this as it's new closed position. to
repair, simply pop into edit and manually rotate the door back to it's closed position. it's
pretty rare, but occasionally sim crashes will cause this, as will shift dragging a copy of an
open door while building
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
madddyyy Schnook
SLGuides Virtual Worlds
Join date: 2 Jan 2006
Posts: 207
07-03-2009 01:56
One way only would be good. ( i have one inworld, i do not understand how it works but its a feature i get asked for quite alot. stops an av of any group going through one side but allows on the other side.

Entry via a list of avs allowed via a notecard.

And you have the others covered.

And thanx by the way. lots of your posts have helped me in the past.
Ee Maculate
Owner of Fourmile Castle
Join date: 11 Jan 2007
Posts: 919
07-03-2009 02:21
Oooh.. great thread Void! The most annoying doors are those that you need to reset the script if you move them, or copy them, to a new location. Is it the timeless that has that problem? So portability would be my contribution to this wishlist!
Ephraim Kappler
Reprobate
Join date: 9 Jul 2007
Posts: 1,946
07-03-2009 02:48
Being something of a door obsessive, I must have tinkered with just about every variation there is with a great deal of help from you, Void, and I think you covered most of the options above.

One type I plan to use in the not-to-distant-future is the folding door system employed in older houses to separate the front and back areas of the drawing room. I'm sure you know the type: it walls off the two parts into more intimate areas or opens back, accordion-style with two panels in each direction, to create a salon the full length of the house. Thanks to your advice in the past, I'm pretty sure I can manage that myself with llMessageLinked but it would probably be a good option to include in your package.

Also, it may be slightly beside the point but door scripts can also be used for windows and just recently I managed to get a curtain drawing/blowing-in-the-breeze effect going on mine depending on how they are opened. It occurred to me that the billowing curtains would be virtually useless feature to include in a no-mod script since almost every window requires a certain amount of tinkering with the flexi parameters to prevent them flying through walls. However, I can see that simple hanging curtains with perhaps a little bit of flexi on opening/closing would be a nice detail to include.
Rygel Ryba
Registered User
Join date: 12 Feb 2008
Posts: 254
07-03-2009 04:28
One tip I can think of is put a "sleep" in the on_rez event for about 4 seconds. Then have it reset and figure it's position and what it is supposed to do from there. This is to make it so that it will work with big build rezzer type things. The problem with so many doors that people use in these is that the door (or the object the door is in) gets rezzed with the same rotation as the rez box - and THEN it gets moved into place. Most door scripts calculate their position and rotation right at the moment they are rezzed - which is why so many prefabs you make have you run around and reset all the door scripts in the build before you can use them. (The four second delay before reset and recalculate gives it enough time to move into position before it does it's thing to figure out where it is and what it needs to do from there).

Another cool thing I have had on my wishlist for ages but haven't gotten around to it - so I might as well share the idea with you - is to make it a "two script" system. Once you try to make a door that behaves in a whole bunch of different ways and makes everyone happy, you are going to end up with a complicated menu system with a zillion options that are going to confuse the user and make it so hard to set up.

But, if you sold it with one script that "opens and closes" the door and does that work. (Or maybe it's two scripts - swing door and slider door. (Thinking more - maybe it's even more choices than that - iris doors are fun too - and there are probably other kinds too). So anyway - you have one script in the door that listens for a link message that simple says "open" or "close" or "do whatever it is that you do Mr. Door!"

And then you have a set of scripts that act as the "controller". Drop in the "Standard Controller" and it'll open and close on touch. No whistles and bells. Drop in the "Group" script and the door will only open for the group it's set to (or maybe it looks for a notecard that lists the UUID's of a set of groups that it will work for). And so on. This way - you end up with a door system that does EVERYTHING - but you don't have to have a big hefty script with all kinds of confusing options for the user to set up. They look in the controller's folder and find the script they need for what they want to use the door for. Then the read the notecard on just THAT controller and they learn the one or two things they need to do in order to get it working right, not read a novel about all the features and things they won't ever use.

Hope some of those ideas work for ya and help you!
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
07-03-2009 04:44
From: madddyyy Schnook
One way only would be good. ( i have one inworld, i do not understand how it works but its a feature i get asked for quite alot. stops an av of any group going through one side but allows on the other side.

that sounds like a fun one, but I'll have to research if it can be done in a single prim (I've seen 2 prim versionsespecially of the only pass group variety)

From: someone
Entry via a list of avs allowed via a notecard.

I should've expected that one... not one of my favorites (I prefer the group variant) but I know how often it's requested, so in the list it goes =)

From: Ee Maculate
Oooh.. great thread Void! The most annoying doors are those that you need to reset the script if you move them, or copy them, to a new location. Is it the timeless that has that problem? So portability would be my contribution to this wishlist!

yup that's actually already in there (it's based on my simplest door script). makes it great for box vended houses. (and yeah most of them, including the Timeless one have that issue)

From: Ephraim Kappler
One type I plan to use in the not-to-distant-future is the folding door system employed in older houses to separate the front and back areas of the drawing room. I'm sure you know the type: it walls off the two parts into more intimate areas or opens back, accordion-style with two panels in each direction, to create a salon the full length of the house. Thanks to your advice in the past, I'm pretty sure I can manage that myself with llMessageLinked but it would probably be a good option to include in your package.

Also, it may be slightly beside the point but door scripts can also be used for windows and just recently I managed to get a curtain drawing/blowing-in-the-breeze effect going on mine depending on how they are opened. It occurred to me that the billowing curtains would be virtually useless feature to include in a no-mod script since almost every window requires a certain amount of tinkering with the flexi parameters to prevent them flying through walls. However, I can see that simple hanging curtains with perhaps a little bit of flexi on opening/closing would be a nice detail to include.

I'm thinking accordion doors would be fun, but you're looking at ~1prim per ridge to do it realistically (or a creatively textured collapsible single prim) so that's probably gonna be far down on the list... but I think the double door method I'm using will be adapted to affect curtains or other similar items.

there's even a slight modification that will allow pivot opening for things like lamborghini's... oh did I mention it work correctly for single prims in attachments (for all you super realistic car makers)? check =)

more... please, if anyone has any others I'll be happy to add them
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Ee Maculate
Owner of Fourmile Castle
Join date: 11 Jan 2007
Posts: 919
07-03-2009 05:37
From: Rygel Ryba
One tip I can think of is put a "sleep" in the on_rez event for about 4 seconds. Then have it reset and figure it's position and what it is supposed to do from there. This is to make it so that it will work with big build rezzer type things. The problem with so many doors that people use in these is that the door (or the object the door is in) gets rezzed with the same rotation as the rez box - and THEN it gets moved into place. Most door scripts calculate their position and rotation right at the moment they are rezzed - which is why so many prefabs you make have you run around and reset all the door scripts in the build before you can use them. (The four second delay before reset and recalculate gives it enough time to move into position before it does it's thing to figure out where it is and what it needs to do from there).


Yes, my boxed buildings have something like this, the first touch of the door after rezzing resets it... the bigger problem isn't boxed buildings for me, it's when you're doing your own building, copy a door from one doorway to another, touch it and... woah! Where'd it go?! I think I'm right in saying that drag-copying something won't trigger a rez detection because the one you're dragging is the original, and the copy is the one that stays put.
Ephraim Kappler
Reprobate
Join date: 9 Jul 2007
Posts: 1,946
07-03-2009 06:41
From: Rygel Ryba
One tip I can think of is put a "sleep" in the on_rez event for about 4 seconds. Then have it reset and figure it's position and what it is supposed to do from there. This is to make it so that it will work with big build rezzer type things.

From: Ee Maculate
... the bigger problem isn't boxed buildings for me, it's when you're doing your own building, copy a door from one doorway to another, touch it and... woah! Where'd it go?!

I've tinkered with variations of Void's script in the LSL Wiki and I haven't noticed these problems at all. I use Builders' Buddy to rez quite a big build that has several rotating doors and they always work fine from go (of course they're always in the closed position when they're rezzed). Also, I regularly click drag to copy doors in my house that use the same script and again they work fine even when I rotate them to open in the opposite direction.

It would be worth looking at this if you haven't done so already:



From: Void Singer
... you're looking at ~1prim per ridge to do it realistically ...

Yeah, I'm a prim eejit and I'll use any number to get the look I want. I guess it wouldn't be a popular feature but some folk might like to have it. Another bit of prim lunacy I was thinking about would be an iris door. I've seen it done with variations of Seagel Neville's single prim door script, using a circular hollow instead of a square but there are quite a few spacey builds around that could do with a full-prim version as an occasional feature.

Maybe you should consider a You've-got-to-be-kidding-me-I-need-another-frickin-parcel-of-prims-to-make-this-work package for indiscriminate prim-proliferators?
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
07-03-2009 07:19
I am mobility challanged. What often happens to me is that I cannot maneuver thru the door very well, or it starts to close on me before I get there.

How about Door becomes phantom while opening, open, and closing. I'd have more time to get thru...

lee
_____________________
So many monkeys, so little Shakespeare.
Dytska Vieria
+/- .00004™
Join date: 13 Dec 2006
Posts: 768
07-03-2009 10:10
One of the options on my scripted doors that haven't already been mentioned above are:

- Quiet mode toggle - Some doors don't need to talk!

I've also made my door script able to handle doors open and close by rotate, pathcut, slide and hollow, depending on the design and they can also handle any combination of those 4 motions. All in one script and config notecard.

The open/close functions calculate the positions before motion so a reset is not needed if they are moved or rezzed. The only time the script needs a reset is when the door changes owners.
_____________________
+/- 0.00004
Kaylan Draken
Registered User
Join date: 2 Dec 2006
Posts: 127
07-03-2009 13:17
What also can be annoying is if you have several doors and you have to lock them one by one. So it would be nice that there will be a option to close one door or close all doors.

and if you need a real challenge then you can divide the doors in groups and close a door, a group or all doors/groups. Example the outside doors are group 1, the doors inside are group 2 and the door to the bedrooms are group 3.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
07-03-2009 16:52
From: Ee Maculate
Yes, my boxed buildings have something like this, the first touch of the door after rezzing resets it... the bigger problem isn't boxed buildings for me, it's when you're doing your own building, copy a door from one doorway to another, touch it and... woah! Where'd it go?! I think I'm right in saying that drag-copying something won't trigger a rez detection because the one you're dragging is the original, and the copy is the one that stays put.

yeah I always hated that problem, and fixed it (mostly)... the only problem with my doors has been that if it's reset while it's open it treats the current position as being Closed, (so you wouldn't want to shift drag it to a closed position from an open one)... I'm actually working on a way to get around even that (~.005% transparecy on an off face only when open) which will make it infinitely portable even if it's reset. (it's actually made to never need resets).

and technically I don't even define it as a door, but rather a hinge, but conceptually it was easier to talk about doors to get people's attention =)

From: Ephraim Kappler
Another bit of prim lunacy I was thinking about would be an iris door. I've seen it done with variations of Seagel Neville's single prim door script, using a circular hollow instead of a square but there are quite a few spacey builds around that could do with a full-prim version as an occasional feature.

Maybe you should consider a You've-got-to-be-kidding-me-I-need-another-frickin-parcel-of-prims-to-make-this-work package for indiscriminate prim-proliferators?

the single prim variant of the iris is easy (although getting the slow iris is a bit difficult). and I have considered high prim variants, but they're down the road..

From: Lee Ponzu
I am mobility challanged. What often happens to me is that I cannot maneuver thru the door very well, or it starts to close on me before I get there.

How about Door becomes phantom while opening, open, and closing. I'd have more time to get thru...

lee

good point, and I actually need to add that to my slow open variant, although it's dangerous in certain builds (linked doors) so I'll need to do some detection.

From: Dytska Vieria
One of the options on my scripted doors that haven't already been mentioned above are:

- Quiet mode toggle - Some doors don't need to talk!

I've also made my door script able to handle doors open and close by rotate, pathcut, slide and hollow, depending on the design and they can also handle any combination of those 4 motions. All in one script and config notecard.

The open/close functions calculate the positions before motion so a reset is not needed if they are moved or rezzed. The only time the script needs a reset is when the door changes owners.

my doors work on the same principle (calc at swing time), and the current setup limits sound to 5m and only talks when you un/lock it (it's a hold click to lock) if you try to open it when locked (and aren't authorized)... yeah I hate talkative doors too, and have no intention of adding announcement features unless it becomes a HEAVILY requested item.

From: Kaylan Draken
What also can be annoying is if you have several doors and you have to lock them one by one. So it would be nice that there will be a option to close one door or close all doors.

and if you need a real challenge then you can divide the doors in groups and close a door, a group or all doors/groups. Example the outside doors are group 1, the doors inside are group 2 and the door to the bedrooms are group 3.

current method supports an outside control that will open/lock all doors with the same script via a limited listen (listens for key words responds on an owner specific channel, responds to owner or owner items (which could be group enabled))

whew.... I have a lot more work to do if I'm going to add all these features... originally hoped to avoid a notecard, but meh, looks to be simpler that way.

the final script will be a conglomerate (as I intend to sell and optimizer that cuts clutter as a profit project.) with all listed feature available in a single script.... should be a week or so at the current rate to incorporate all features I've accepted so far (barring person needs)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
07-04-2009 09:55
Void,
Not sure how much of this was covered but here is something dear to my heart:

Doors that stay open via controller command
Time delay settable from a controller
All Lock command
Interior doors that don't announce and don't lock yet listen to the stay open and/or time delay
A user and "super user" list
simply put a user list can pass through locked doors as usual- super users can control the system via controllers
"slave controllers" while it's fun the first dozen times to cam down from a bedroom or from the back deck- it becomes quite a pain.

Best of luck

PS
A system that does not "cross talk" on a sim.
Soen Eber
Registered User
Join date: 3 Aug 2006
Posts: 428
07-04-2009 11:46
Its pretty easy for a door to become a door "system" that evolves into a network and then a "plug and play" network that interfaces with things like security and window tinting and say lets add encryption and ... which is where things start falling apart for me when I start conceptualizing it.

I would propose to just have a clean, simple basic script, and extra functionality can be added in via scripts you drop in or take out, which means you'll need some kind of service discovery and message queuing. Separate the access code from the operation code. Make setup menu driven instead of automatic so the user has control over it. When I was serious about making the "ultimate door script" I realized I'd have to modularize the access, the door operation, and the user interface and the interface would vary based on the type of door.

Use the last few digits of an avatar's key to create a sufficiently unique channel number as the control channel, so matter how or where something is rezzed it can't desync from its controller.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
07-04-2009 14:48
From: Dragger Lok
Void,
Not sure how much of this was covered but here is something dear to my heart:

Doors that stay open via controller command: current version is lockable in place, open or closed

All Lock command: done

Interior doors that don't announce and don't lock yet listen to the stay open and/or time delay

A user and "super user" list: mostly done (styled on group membership atm, may change)

simply put a user list can pass through locked doors as usual- super users can control the system via controllers: Done (super users ignore locking restrictions)

Time delay settable from a controller: maybe... I tend to leave this in config as it's rare enough to change it

"slave controllers" while it's fun the first dozen times to cam down from a bedroom or from the back deck- it becomes quite a pain.: any number of customized controllers is supported.

A system that does not "cross talk" on a sim.: all messages are filtered by trigger phrase, owner/group and on a channel that is (mostly) unique.

From: Soen Eber
Its pretty easy for a door to become a door "system" that evolves into a network and then a "plug and play" network that interfaces with things like security and window tinting and say lets add encryption and ... which is where things start falling apart for me when I start conceptualizing it.

always easier to build the features in a modular manner, then layer in networking.

From: someone
I would propose to just have a clean, simple basic script, and extra functionality can be added in via scripts you drop in or take out, which means you'll need some kind of service discovery and message queuing. Separate the access code from the operation code. Make setup menu driven instead of automatic so the user has control over it. When I was serious about making the "ultimate door script" I realized I'd have to modularize the access, the door operation, and the user interface and the interface would vary based on the type of door.

I've considered the drop in component model, and it is nice, but questions about upcoming script/memory limits and idle time for multiple scripts has me shelving this for the moment. The commercial product lines will optimize based on a build menu/notecard and deliver custom optimized scripts to the user based on a largely single script model.

From: someone
Use the last few digits of an avatar's key to create a sufficiently unique channel number as the control channel, so matter how or where something is rezzed it can't desync from its controller.

check, something like this is in place, see last response line from previous poster... I use a similar setup in all my stuff now to lower chatter, guarantee consistent communications, and avoid crosstalk

current setup for channels is something like
channel = (integer)lGetSubString( llGetOwner(), 0, 7 ) | 0x8000000;
and optionally is bitmasked against a product line ID# to clear channels between products

so not only is the channel fairly unique for each av, but for each product an av uses, yet it's still discoverable for future plugins and or objects for different av's/groups that may need to communicate



I also may revive my "group enabled" flagging system, which allows owner retained (not deeded) objects to toggle between adding group members to the super-users command access as an easier solution for those functions.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
07-04-2009 17:42
"Doors that stay open via controller command: current version is lockable in place, open or closed

All Lock command: done"

Oops- a bit too easy to have outside doors then locked in an open position (assuming lock call is from a controller) ... better to have interior doors ignore a close on lock call. Seriously interior doors could be non auto closing as in the real life ones. Sets the tone for normal in house foot traffic.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
07-04-2009 19:12
From: Dragger Lok
Oops- a bit too easy to have outside doors then locked in an open position (assuming lock call is from a controller) ... better to have interior doors ignore a close on lock call. Seriously interior doors could be non auto closing as in the real life ones. Sets the tone for normal in house foot traffic.

each door is separately configurable, and there ARE situations were you would want to lock doors open (say an office that operates when the owner is around?), similarly there are times when you'd want interior doors locked closed (random guest you don't want wandering around your dungeon?) but it's easy enough to configure the controller to send and all-close before an all-lock, or to do similar functions for specific groups of doors (interior, exterior, private, staff only, etc)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
07-05-2009 03:18
ok here's the update on where I'm at so far... wrote it from memory so if I forgot something throw something heavy...


major features
done:
meta Features:
uses (mostly) unique, non-coliding, filtered, controller friendly listen(s)
works at any building angle
never needs reset
Friendly to Group Deeding!
Works in attachments/vehicles!
styles:
Hinge:
ALL:
Configureable degrees of Rotation
Single swing Direction:
configurable swing direction (in/out)
Double swing Direction:
Configuable Direction (towards/away from clicking av)
Smooth Transit:
configurable in seconds to open/close (optional)
phantom while in transit (IF in the root prim)
Auto-Close:
configurable seconds to wait before closing (optional)
open/close Sounds:
Low Spamming (range limited to 5m cube)
Single or separate sound support (optional)
Locking:
Click + hold to un/Lock (2sec)
Lock Overrides Auto-Close regardless of position
Double Door Triggering:
ability to trigger nearby Door to open simultaneously
Remote Control:
uses (mostly) unique Channel
un/lock
open/close
supports multiple controls

essentially done but not incorporated:
in process:
whitelist full access (ignores locked status, allows setting locked status)

in queue:
door grouping
group flagging (extended whitelisting for single group)
styles: iris, slide, compress, phantom
failsafe (remembers status despite rests)

Not Done:
near term consideration:
doorbell
dialog configuration
far term consideration:
Multiprim required styles (accordian, one way, pass restricted)

Known Issues:
if the script is reset while in the open state, it will treat this as it's new closed position. to repair, simply pop into edit and manualy rotate the door back to it's closed position. it's pretty rare, but occasionaly sim crashes will cause this, as will shift dragging a copy of an open door while building
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
07-05-2009 05:38
Very impressive!

Looked it over a couple of times,

"styles: iris, slide, compress, phantom"

sliding doors- dual sliding doors?
If you have any spare time I would make double doors the centerpiece, nothing more elegant than two doors swinging open at the same time.

Including hinge is brilliant, should be pointed out hinge allows compound door construction although at the expense of not being able to be linked to structures.

WTG-
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
07-05-2009 13:19
From: Dragger Lok
Very impressive!

Looked it over a couple of times,

"styles: iris, slide, compress, phantom"

sliding doors- dual sliding doors?
If you have any spare time I would make double doors the centerpiece, nothing more elegant than two doors swinging open at the same time.

Including hinge is brilliant, should be pointed out hinge allows compound door construction although at the expense of not being able to be linked to structures.

WTG-

slide would be the sliding doors, and dual opening applies to ALL styles (I know, cool huh?)
I'm thinking I might have the sound radius configurable to since some one might want giant doors double doors to be heard at the center (duh newb assumptions).

@compound doors: I'm working on a an optimization that will at least cut these style to half the prim count but in the meantime yeah they'll work as multi-prim unattached to larger structures (gotta remember to feed lock/open commands to to the other prims) (it's workable for french/accordian/shoji panel/privacy screen styles)

I left out that single swing doors can have correct hinge locations... it's more of a build issue than a script issue.

on a side note, I don't know what to call the script when it's done... it's not really a "door" script, since it'll work for lids, containers, windows, trap doors, and even secure rooms entries.... I'm think "portal" but that has quasi mystical connotations, and gateway seems to exclude container/lid styles... ingress/egress have similar issues... hmmm...

biggest challenge so far?
incorporating single and double swing styles in the same script while preserving the direction of rotation for single swing (I finally parsed out a formula of [A*!B+B] where A=[-1,1] and B=[-1,0,1] pass B
if not 0 else pass A)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
07-05-2009 13:59
"hmm"
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
07-06-2009 04:29
OP updated.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
07-07-2009 04:17
'Not Just A Door" script?
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
07-07-2009 05:52
"door and More" script
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
07-07-2009 13:17
I'm leaning towards "Zen Master Door++"

< insert "one with everything" joke here >
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
1 2