Jump to content

Get the group of the detected avatar


IZHRAH
 Share

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

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

Recommended Posts

This is a curious question, remarkably similar to a question that someone else asked earlier today.  You can certainly use llSameGroup to see whether a detected avatar is wearing the tag of whatever group owns the detector.   You can also write

    touch_start(integer total_number)    {        list Details = llGetParcelDetails(llGetPos(),[PARCEL_DETAILS_GROUP,PARCEL_DETAILS_OWNER]);        llSay(0,llList2String(Details,0));  // Group UUID        llSay(0,llList2String(Details,1)); //Parcel Owner's UUID    }

 If the parcel is group owned, though, the two UUIDs will be the same. The only time you will get a good answer is if the parcel is not group owned.  In that case, you could expect something like this to work.

    touch_start(integer total_number)    {        list Details = llGetParcelDetails(llGetPos(),[PARCEL_DETAILS_GROUP,PARCEL_DETAILS_OWNER]);        if (llDetectedKey(0) == llList2Key(Details,1))        {            llSay(0,llDetectedName(0)+" is this parcel's owner.");        }    }

 Even then, though, it's not going to tell you if the parcel owner is also the group's owner.

ETA:  Of course there is one trivial way to solve the problem, but I doubt that this is what you had in mind.

touch_start(integer num){    key OKey = "a63d10f1-44ce-bc2a-8bc1-f6342243ee03d";  //This is the UUID of the owner    if (llDetectedKey(0) == OKey)    {        llSay(0, "Hello, owner!");    }}

 :smileyvery-happy:

 

 

Link to comment
Share on other sites

I'm a bit puzzled about what you're trying to do.   Could you explain what you need the information for?   That would help us suggest ways of achieving your desired result.

I am really not sure what you mean by "the parcel group owner key".   Is that the key of the owner of the group to which the parcel is set (which I don't think you can discover by script)?   Or, if the parcel is group owned, the key of the group that owns it, or what?

In general, though, the only thing you can determine by script about an avatar's group is whether the group is the same as the one the prim containing the prim is set to.   

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4163 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...