llDetectedGroup
function
Function syntax
integer llDetectedGroup(integer number// Index of the detection information.
);- Returns
integer- Energy
- 10
Returns TRUE if the detected object or avatar specified by number has the same active group as the prim containing the script. Returns FALSE if the group is not active or if they are not in the group.
Returns FALSE if number is out of range.
Returns an integer that is TRUE if the detected object or agent has the same active group as the prim containing the script. Otherwise FALSE is returned.
integer result = llDetectedGroup(0);Caveats
Section titled “Caveats”- There is no way to detect if the prim is in the same group as one of the agent’s inactive groups.
Examples
Section titled “Examples”Example 1
//Gives inventory only to agents with the same active groupdefault{ touch_start(integer total_number) { if (llDetectedGroup(0) ) //same as llSameGroup(llDetectedKey(0) ) (with llSameGroup, detected must be in the sim) llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_OBJECT, 0) ); else llSay(0, "Wrong active group!"); }}See also
Section titled “See also”Functions
Section titled “Functions”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.