Jump to content

Group Only Sit


Craznal
 Share

You are about to reply to a thread that has been inactive for 1298 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Looking for a script to add to my telporters for group only.  Only problem is I can't find one that I can put a group in by uuid, just ones that base off the item's group, which has to be the land group, or it will be returned.  Can't merge my club group with the land group I'm in

Link to comment
Share on other sites

17 minutes ago, Craznal said:

...  problem is I can't find one that I can put a group in by uuid, just ones that base off the item's group, which has to be the land group, or it will be returned.  Can't merge my club group with the land group I'm in

a way is to use 2 prims. The root prim is set to the land group (so the object will not be returned)

the second prim is set to your club group. Stick the script in the second prim. Then link the prims. When we change the root prim to some other land group then the linked prim is not changed. Is still set to our club group

when our script in the linked prim does llSameGroup() then it will TRUE when our person is wearing the same group tag as the linked prim (ther club group tag in this case)

  • Like 2
Link to comment
Share on other sites

Right.  The LSL functions that verify group membership all compare the UUID of the group that a detected avatar has active at the moment with the group UUID of the scripted object.  That's the way that they work.  If you want to allow a different group of people to activate your script, you will have to create a whitelist with all of their UUIDs in it, and then tell your script to compare a detected av's UUID with that list.  It's a totally different process.  If you look through the LSL Scripting Library, you will find several scripts that you can use as models, starting with 

Or, as Molly says, you can do a little subterfuge by linking a second "Lock" prim to your teleporter, first setting it to a different group.   Beware, though, that if you do that, you cannot take the object back to your inventory and re-rez it.  If you do, the second prim will no longer remember that it was set to a different group.

Edited by Rolig Loon
Link to comment
Share on other sites

3 minutes ago, Mollymews said:

a way is to use 2 prims. The root prim is set to the land group (so the object will not be returned)

the second prim is set to your club group. Stick the script in the second prim. Then link the prims. When we change the root prim to some other land group then the linked prim is not changed. Is still set to our club group

when our script in the linked prim does llSameGroup() then it will TRUE when our person is wearing the same group tag as the linked prim (ther club group tag in this case)

Well that's a rather clever way to work it.  Going to give this a shot now, thank you

  • Like 1
Link to comment
Share on other sites

1 minute ago, Mollymews said:

it works for all kinds of things.  Like doors/lights/controls/etc linked to a building  for example. The root prim of the building is set to the land group. The controls/doors/etc are set to the rental group

Answers a second question I never got around to asking, some idea though for a raffle board.  Oh all the tricks I never figured out XD

Link to comment
Share on other sites

Another way with overhead and slight false negative behavior(if no visible attachments or only temp attachments are worn) would be to target the clicker with llGetAttachedList() and check the attachment keys with llGetObjectDetails() & OBJECT_GROUP to see if any match a group UUID of interest.

default
{
    touch_end(integer i)
    {
        key group_of_interest = "19657888-576f-83e9-2580-7c3da7c0e4ca"; //Second Life Beta
        key dk = llDetectedKey(0);
        list T;
        for (i = -llGetListLength(T = llGetAttachedList(dk)); i < 0; i++)
        {
            if (llList2Key(llGetObjectDetails(llList2Key(T,i),[OBJECT_GROUP]),0) == group_of_interest)
            {
                llOwnerSay("group of interest secondlife:///app/group/" + (string)group_of_interest + "/about found with the agent secondlife:///app/agent/" + (string)dk + "/about");
                return;
            }
        }
        llOwnerSay("group of interest secondlife:///app/group/" + (string)group_of_interest + "/about NOT found with the agent secondlife:///app/agent/" + (string)dk + "/about");
    }
}

 

Edited by Lucia Nightfire
  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1298 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...