ArchTx Edo
Mystic/Artist/Architect
Join date: 13 Feb 2005
Posts: 1,993
|
09-13-2006 12:12
This script uses voice/chat passwords on private channel 5 to make a door or wall open/close and lock/unlock. You can give the passwords to anyone you want to be able to access the door. Shazam = 0pen/unlocked: wall is invisible and you can walk through it. Presto = Closed/Locked, alpha shows all of texture and you cannot walk through it. //Phantom Alpha Door or Wall by ArchTx Edo //This script uses voice-chat commands to make a door or wall open/close and lock/unlock using voice/chat commands on channel 5. //
default { state_entry() { //llListen(5,"",llGetOwner(),""); //only owner can change it. llListen(5,"","",""); //anyone can change it. } listen(integer chan, string name, key id, string msg) { //------------------------------------------------------ if(msg=="presto")//close { llSetAlpha(1,ALL_SIDES);//1.0 shows all of the texture, no transparency. llSetStatus (STATUS_PHANTOM, FALSE); //FALSE object collides with others (is not phantom), you cannot walk thru it. } //------------------------------------------------------ if(msg=="shazam")//open { llSetAlpha(0,ALL_SIDES);//0.0 shows none of the texture, it is transparent. llSetStatus (STATUS_PHANTOM, TRUE); //TRUE object does not collide with others (is phantom), you can walk thru it. } } }
_____________________
 VRchitecture Model Homes at http://slurl.com/secondlife/Shona/60/220/30 http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=2240 http://shop.onrez.com/Archtx_Edo
|
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
|
Discussion Thread
09-13-2006 20:05
_____________________
i've got nothing. 
|
Jesseaitui Petion
king of polynesia :P
Join date: 2 Jan 2006
Posts: 2,175
|
09-13-2006 20:07
Wow cool, thanks
|
Meghan Eldrich
Registered User
Join date: 27 Mar 2006
Posts: 7
|
09-14-2006 04:11
That's a nice verbal way of doing things... But how about a non-verbal access list system that isn't laggy with listeners for opening doors and so forth?.. This would work for that, I whipped this up in like 5 minutes not 100% tested but it should work and not cause to much SIM lag. integer iAccessList = FALSE; // Set this to TRUE use the access list method integer iOwnerOnly = FALSE; // Set this to TRUE to make door OWNER only
// If using access list fill in your names here.... list AccessNames = [ "Joe Smith", "Meghan Eldrich", "John Doe" ];
default { collision_start(integer n) { // See if the collider is an agent (don't open for prims... if (llDetectedType(0) & AGENT) { // Test here to see if we are OWNER ONLY and if the collider is an owner if (iOwnerOnly && llDetectedKey(0) != llGetOwner()) { return;} string x = llKey2Name(llDetectedKey(0)); // Check if we're using an access list, if we are look for the person, if we're the owner // Let us in even if we're not in the bloody access list. If collider isn't the owner // and isn't in the guest list, don't open the door. if (iAccessList && llListFindList(AccessNames, [x]) < 0 && llDetectedKey(0) != llGetOwner()) { return;} // Set the alpha to 0, set the status to phantom and start a 1 second timer.. llSetAlpha(0, ALL_SIDES); llSetStatus(STATUS_PHANTOM, TRUE); llSetTimerEvent(1); // 1 second timer, you can change this to a higher value if desired. } } timer() { llSetStatus(STATUS_PHANTOM, FALSE); llSetAlpha(1, ALL_SIDES); llSetTimerEvent(0); } }
|
Markus Brendel
Registered User
Join date: 16 Oct 2006
Posts: 13
|
03-24-2007 14:02
Meghan, Worked great for me. Thanks alot!
|