From Second Life Wiki
Revision as of 13:55, 3 April 2014 by Rolig Loon (Talk | contribs)

Jump to: navigation, search


Function: integer llSameGroup( key uuid );

Returns an integer boolean, that is TRUE if uuid has the same active group, otherwise FALSE

• key uuid group, avatar or prim UUID that is in the same region

Also returns TRUE if the object is deeded to the same active group as uuid Also returns TRUE if the object is "set to" or deeded to the same group as group UUID (i.e. key OBJECT_GROUP)


  • Also returns TRUE if the object is not set to a group (i.e. "(none)") and either the AV with the given key has no group active or the function is called with a NULL_KEY

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   Attachments only change/inherit the active group when they're "rezzed"


<lsl> // Gives inventory object only to agents with the same active group

default {

   touch_start(integer total_number)
       key id = llDetectedKey(0);
       integer sameGroup = llSameGroup(id);

// same as llDetectedGroup(i) (with llDetectedGroup, detected does not need to be in the sim)

       if (sameGroup)
           integer numberOfObjectsInPrim = llGetInventoryNumber(INVENTORY_OBJECT);
           if (numberOfObjectsInPrim)
               llGiveInventory(id, llGetInventoryName(INVENTORY_OBJECT, 0));
           llRegionSayTo(id, 0, "Wrong active group!");



Useful Snippets

To determine if an avatar is an object's owner when deeded to group, you should use a function similar to that provided for llGetOwner().


Child Prims

It is possible for the group of a child prim to differ from that of the root prim. To build such an object it must first be unlinked, the groups set, and then relinked. Rezzing an objects resets the group of the object to that of the group that the user currently has activated. Changing the group of an object changes the group for the entire object. This may only be an artifact or manifestation of VWR-5044.

See Also


•  llDetectedGroup Used in conjunction with detection events

Deep Notes

All Issues

~ Search JIRA for related Issues
   Attachments only change/inherit the active group when they're "rezzed"


•  llSameGroup Test


function integer llSameGroup( key uuid );


Do you belong or
Are you alien, unknown
To us, unwanted?