Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Limited Access Volume Detect Door

TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
10-20-2005 16:26
Ok I seen this sumwhere the other day and cant seem to find it agine...
The script I am looking for is a Volume Detect script that only lets ppl on a list pass thru


Can sumone <A> point me in the direction of this script? or <B> Post the script here please?
_____________________
Drunken Monkeys danceing on the tables.
Falling from the sky just like in a fable.
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
10-20-2005 23:04
CODE

list authorized = ["Jesrad Seraph", "TXGorilla Falcone"];

default
{
state_entry()
{
llSetAlpha(0.0, ALL_SIDES); // turn transparent
llVolumeDetect(TRUE);
}

collision_start(integer c)
{
if (llListFindList(authorized, [llDetectedName(0)]) < 0)
{
llVolumeDetect(FALSE);
llSetAlpha(0.33, ALL_SIDES);
llSetTimerEvent(1.0);
}
}

timer()
{
llSetAlpha(0.0, ALL_SIDES);
llVolumeDetect(TRUE);
llSetTimerEvent(0.0);
}
}
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Alexander Yeats
Registered User
Join date: 8 Sep 2005
Posts: 188
10-20-2005 23:31
which is great BUT


using a simple device like an xrod or neoflight rod you can fly faster than the detect will work, so I can easily get inside.

Or if someone sits on a phatom object and moves themselves inside.

just an fyi
Fenrir Reitveld
Crazy? Don't mind if I do
Join date: 20 Apr 2005
Posts: 459
10-20-2005 23:40
As an aside, those are known ways to get around ANY detector/obstruction. Heck, one can make their entire avatar go phantom and walk past any SL object.

However, a scripted door such as Jesrad posted will keep out most who don't know any better. Besides, I view such things as more of a message, such as, "This is private, I don't want random folks here." Kind of a virtual "OCCUPIED" sign.

Of course, what you could do is litter your house with turrets, so if they get inside they gotta deal with your pet defense network. ^_^
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-21-2005 00:06
From: Fenrir Reitveld
Of course, what you could do is litter your house with turrets, so if they get inside they gotta deal with your pet defense network. ^_^


This causes lag and makes you *very* unpopluar. Also it's against the rules to leave turrets active while you're offline (a turret being an automated gun).

Doors just keep honest people out. Privacy can only be attained with a private island. You would be amazed what you can see from a half sim away if you know how to control the camera.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
10-21-2005 00:34
Want to keep other people off your oh-so-precious furniture ? Then fill the whole "private space" with one (or more if it's over 10m in dimension) prim containing the above script, and lock all the sit targets. This way only authorized people can interact with your room.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
10-21-2005 11:50
TY I will test this later tonight after work. Yes I know theres millions of ways to get past defences and stuff but meh...
_____________________
Drunken Monkeys danceing on the tables.
Falling from the sky just like in a fable.
Sue Stonebender
Piano Craftsman
Join date: 7 Jan 2005
Posts: 219
Question about Reliability
06-22-2006 19:47
Jesrad, first let me say thanks for sharing this.

I've been playing with the script tonight, and wonder if perhaps I'm doing something wrong, as it seems to fail and let me pass about once in every five tries, even though I've removed myself from the access list for testing.

Does this have anything to do with being able to circumvent it between timer cycles?

Just wondering if there is a way to strengthen the integrity of the script without adding to lag.

Thanks a bunch,
Sue.
_____________________
Kokiri Saarinen
Quoted for truth
Join date: 7 Jan 2006
Posts: 44
06-23-2006 00:22
From: Strife Onizuka
This causes lag and makes you *very* unpopluar. Also it's against the rules to leave turrets active while you're offline (a turret being an automated gun).

Doors just keep honest people out. Privacy can only be attained with a private island. You would be amazed what you can see from a half sim away if you know how to control the camera.


If the turrets are firing bullets that unsit and eject users instead of push, than its perfectly legal.

The best way to do this is with a scanner script with a range equal to the size of your plot. Limiting it to the door allows people to get in quite simply, but having a scanner checks Av's means that if they do get in, its only for a second or so. Heres a sample script you can use.

CODE

integer range = 20; //Approzimate size of parcel. Its possible to get very exact by using other means, but I find a sensor with an approximate range is good enough.
list accepted = ["Me","My Friend1","My Friend2"]; //adjust list for people you want allowed in
default
{
state_entry()
{
llSensorRepeat("","",AGENT,range,PI,1);
}
sensor(integer num)
{
integer index;
for (index = 0;index<num;index++)
{
if (llListFindList(accepted,[llDetectedName(index)])== -1)
{
llUnSit(llDetectedKey(index));
llEjectFromLand(llDetectedKey(index));
}
}
}


}


This is a lot laggier compared to a simple collision script, but limiting the time to 1-2 seconds makes it fairly un-noticiable. Of course, you may also want to integrate a timer and a little message that says "Your not welcome here, leave in 10 seconds or else :) "

-Kokiri
Sean Olbers
Registered User
Join date: 21 Jun 2006
Posts: 3
Question.....
06-23-2006 03:47
Ok... new to this coding malarchy but keen to learn ( only been in 2 days but intrigued already

One comment made was that you could shout through the detection if fast enough ( ignoring the obviously more awkward transparent issue )

would the script work better if rather than setting the state set on entry to transparent and detecting if you are NOT on the list.... have the check detect if you ARE on the list and then set transparent ...

CODE


state_entry()
{
llSetAlpha(0.33, ALL_SIDES); // not sure if that is right... anyone ??
llVolumeDetect(TRUE);
}
collision_start(integer c)
{
if (llListFindList(authorized, [llDetectedName(0)]) > 0)
{
llVolumeDetect(FALSE);
llSetAlpha(0.00, ALL_SIDES);
llSetTimerEvent(1.0);
}
}



like I said, please no flames, just a poor skint newbie, trying to understand...
Bitzer Balderdash
Dazed and Confused
Join date: 21 Dec 2005
Posts: 246
06-23-2006 05:10
ok - I've not done much with volume detect, but I think that.....

first off, there should be a call to set the prim phantom or not as well as invisible or not

and second offm with the origingal script it triggers once you are actually overlapping the prim in question, and would - in theory eject you from the prim through the nearest side (i.e. the way you came in)

whereas, your way around, it would default to blocked, and only if someone was already overlapping it would it clear and allow them inside, but, since it was solid, you couldn't overlap it with an authorised user, and therfore it would never let you it.

Also, there would be unsightly bars (or plywood) on your doors all the time, rather than only when they are barring someone from access.

I could be wrong on some of the above - feel free to test in-game and learn for yourself - that's how I learned ;)

Edit:
just been over to the wiki, and I take back some of what I said about phantom - llVolumeDetect sets phantom automatically, which means that all this script does is makes a phantom prim appear if somone unauthorised walks through it and disappear when they aren't doing.....
Sean Olbers
Registered User
Join date: 21 Jun 2006
Posts: 3
ok... got it...
06-24-2006 05:28
Understand, thanks for the explanation, question of also getting to understand how things get triggered ie at what point, I was thinking more along the lines of having a closed door, and then when 'open'ing that door, it would perform the check then if on the allowed list then the door would swing open...
Sean Olbers
Registered User
Join date: 21 Jun 2006
Posts: 3
Another question regarding access..
06-24-2006 05:30
Rather than having an array of users that have access, is there no way the script can check your friends list ?

I understand that in some cases you may not want your friends in, but for those times that you do can that be done so that at least it's a dynamic script.
FireEyes Fauna
Registered User
Join date: 26 Apr 2004
Posts: 138
06-24-2006 08:36
There's no way to check it against your friends list. However, if you and your friends are all in a group together, you could run a llSameGroup() which would return TRUE if your active group is the same group the prim is set to.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
06-24-2006 14:55
if (llListFindList(authorized, [llDetectedName(0)]) > 0)


since list's start @ 0 the first name on the list should be ignored by using >0
try >=0 or != -1 (-1 means not on the list)
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
06-24-2006 15:02
Sean, it seems to me your "default closed, and open only for people on the white list" idea will work fine if you construct your door out of 2 prims. The outermost prim ("screen door";) would always be llVolumeDetect(TRUE), and thus always phantom, and would tell the main door to become phantom or not (or open and close in some other manner) via llMessageLinked.

Of course there may better ways to build a door, but that would seem to satisfy some requirements implied in the thread here:

- defaults to "closed" so people can't just go whizzing by it quite as easily
- uses llVolumeDetect and therefore remains "hands free"
- remains fairly simple