Difference between revisions of "LlSameGroup"

From Second Life Wiki
Jump to navigation Jump to search
(added example)
Line 12: Line 12:
|caveats
|caveats
|constants
|constants
|examples
|examples=<pre>//Gives inventory object only to agents with the same active group
default
{
    touch_start(integer total_number)
    {
        if(llSameGroup(llDetectedKey(0)))
            llGiveInventory(llGetInventoryName(INVENTORY_OBJECT,0),llDetectedKey(0));
        else
            llSay(0, "Wrong active group!");
    }
}
</pre>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llDetectedGroup]]|Used in conjunction with {{LSLGC|Detected|detection}} events}}
|also_functions={{LSL DefineRow||[[llDetectedGroup]]|Used in conjunction with {{LSLGC|Detected|detection}} events}}

Revision as of 15:09, 9 March 2007

Summary

Function: integer llSameGroup( key agent );

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)
    {
        if(llSameGroup(llDetectedKey(0)))
            llGiveInventory(llGetInventoryName(INVENTORY_OBJECT,0),llDetectedKey(0));
        else
            llSay(0, "Wrong active group!");
    }
}

See Also

Functions

•  llDetectedGroup Used in conjunction with detection events

Deep Notes

Search JIRA for related Issues

Signature

function integer llSameGroup( key agent );