Jump to content

llsamegroup question


Xander Lopez
 Share

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

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

Recommended Posts

Question 1:

It seems like these following codes pretty much bring the same result altho how it determines to see if both parties are in the same group is different. So which one would be faster to process?

case 1:
if (llDetectedGroup(0)) llOwnerSay("true");

case 2:
if (llSameGroup(llDetectedKey(0))) llOwnerSay("true");

Question 2:

I have Avatar A, and Avatar B comparing groups to see if they are wearing the same group.  The problem is that the above fuctions will return true if both Avatar A and B are NOT wearing any group. I guess it treat as Avatar A and Avatar B are wearing the same group cuz technically both are wearing "no" groups.

Is there anyway to return False if these avatars are not wearing any group??

Link to comment
Share on other sites

Hi,

On your example case 1 is faster.. if someone touches an object, the detected function is triggered anyways, so better use it, if there is no event that triggers the detected function you can only use the llSamegroup, i.e. you can run the return of an llGetAgentList request through llSameGroup one by one to determine if the avatars in a region or parcel are in the same group as the object holding the script.

on your second question, the simple answer is no, the more elaborate one is that there is no return key from the detected group function (to protect the account's privacy) just a simple integer 1 or 0, in case you use this function in an HUD or attachment, there is a possibility that there is no active group.

You can however in a HUD or attachment run llGetObjectDetails(id,[OBJECT_GROUP]) This will return the objects group key, and a NULL_KEY if there is no group, you can compare the result of this key with another HUD or attachment to verify if both object have the same active group. attachments and huds will change the group when the avatar changes the group.

 

Hope this helps,

have fun ;)

Dargo

Link to comment
Share on other sites

yes that is correct

None & None = TRUE

a way to have an object set to a group and detect if an avatar has their group tag set to None is

two linked prims.  Set the root prim to the group.  Use this normally for group activities

set the linked prim to group None.  In the linked prim put a script that checks llSameGroup(avatar uuid). When the result is TRUE then the avatar is not wearing any Group tag

 

add more:

being able to set prims in the same linked object to different groups can be useful in some situations

a common situation is our store on a parcel we have rented from somebody else

typically our object has to be in our landlord's group for it to not be auto-returned.  So we set the root prim to our landlord's group and our linked prim to our own store group.  This way we can check if our visitor is wearing our store group tag

 

Edited by Mollymews
explain more
  • Like 1
Link to comment
Share on other sites

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