|
Lion Regent
Registered User
Join date: 22 Nov 2006
Posts: 34
|
12-06-2007 12:04
I'm trying to create a door that goes phantom for a few seconds when a person clicks on it, and the door texture becomes slightly transparent. I would also like it to have an access list. Does anyone know where I can find a script like this or a link? Thanks to anyone who is able to provide assistance. One other thing I should mention: I know very little about scripting, and have never created my own script. So the more detail you can provide, the better. Thanks!
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
12-06-2007 13:21
untested, but should work //-- Edit here, add names, must match exactly including case list vgLstAccessNames = ["Void Singer", "Lion Regent", "name 3", "etc"];
default{ touch_start( integer vIntTouches ){ do{ --vIntTouches; //-- check to see if touching av is in our list if(~llListFindList( vgLstAccessNames, (list)llDetectedName( vIntTouches ) )){ llSetStatus( STATUS_PHANTOM, TRUE ); //-- make door phantom llSetAlpha( .5, ALL_SIDES ); //-- make door half transparent llSetTimerEvent( 15.0 ); //-- wait 15sec from last valid touch before closing } }while (vIntTouches); }
timer(){ llSetTimerEvent( .0 ); //-- stops the timer from repeating every 15sec llSetStatus( STATUS_PHANTOM, FALSE); //-- make door solid llSetAlpha( 1.0, ALL_SIDES ); //-- make door opaque again } }
if you change this line: if(~llListFindList( vgLstAccessNames, (list)llDetectedName( vIntTouches ) )){ to if(llDetectedGroup( vIntTouches )){ and remove this line list vgLstAccessNames = ["Void Singer", "Lion Regent", "name 3", "etc"]; it will work for any avatar in the same group as the object, while they are wearing those group tags
_____________________
| | . "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... | - 
|
|
Lion Regent
Registered User
Join date: 22 Nov 2006
Posts: 34
|
12-06-2007 16:23
Thanks very much for your help! The only problem is that the door constantly remains phantom. I would prefer it to be phantom only when the door is touched by people on the access list. Do you know if that is possible?
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
12-06-2007 16:40
From: Lion Regent Thanks very much for your help! The only problem is that the door constantly remains phantom. I would prefer it to be phantom only when the door is touched by people on the access list. Do you know if that is possible? whoops, cut n paste bites again... change the second call to llSetStatus (the one inside timer) to FALSE instead of true, I'll edit that
_____________________
| | . "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... | - 
|
|
Lion Regent
Registered User
Join date: 22 Nov 2006
Posts: 34
|
12-06-2007 16:56
Oh, wonderful, I changed it and it works! Thanks SO much for your help, I appreciate it.
|