LlSameGroup - Second Life Wiki

LlSameGroup

From Second Life Wiki

Jump to: navigation, search

Contents

Description

Function: integer llSameGroup( key agent );
219 Function ID
0.0 Delay
10.0 Energy

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

• key agent must be in the same sim


Also returns TRUE if the object is deeded to the same active group as agent

Examples

// Gives inventory object only to agents with the same active group
default
{
    touch_start(integer total_number)
    {
        integer i;
 
        for (i = 0; i < total_number; i++)
        {
            if (llSameGroup(llDetectedKey(i))) // same as llDetectedGroup(i) (with llDetectedGroup, detected does not need to be in the sim)
              llGiveInventory(llDetectedKey(i), llGetInventoryName(INVENTORY_OBJECT, 0));
           else
              llSay(0, "Wrong active group!");
        }
    }
}

See Also

Functions

•  llDetectedGroup Used in conjunction with detection events