LlDetectedGroup

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Buggy
Function: integer llDetectedGroup( integer number );
39 Function ID
0.0 Delay
10.0 Energy

Returns an integer that is a boolean representing if the detected object or avatar is in the same group that the prim containing the script is set to.

• integer number Index of detection information

number does not support negative indexes. Returns FALSE if number is out of range or if the detected event does not support this attribute.

Specification

llDetected* functions can be called anywhere but will only return usable values if called from within Detection events (collision, collision_start, collision_end, sensor, touch, touch_start, touch_end) and functions called by Detection events.

Caveats

  • If number is out of bounds the script continues to execute without an error message.
  • Events that enable the llDetected* functions always return at least one detected item.
    • Detection events are not raised if there is nothing detected (with the slight exception of no_sensor but it doesn't enable llDetected* functions).
    • The event detection count parameter value is initially never less than 1.

Important Issues

~ Search JIRA for related Bugs
Bug - A problem which impairs or prevents the functions of the product. Open - The issue is open and ready for the assignee to start work on it.    Attachments only change/inherit the active group when they're "rezzed"

Examples

//Gives inventory only to agents with the same active group
default
{
    touch_start(integer total_number)
    {
        integer number = 0;
        do
        {
            if (llDetectedGroup(number)) //same as llSameGroup(llDetectedKey(number)) (with llSameGroup, detected must be in the sim)
                llGiveInventory(llDetectedKey(number), llGetInventoryName(INVENTORY_OBJECT,0));
            else
                llSay(0, "Wrong active group!");
        }while(total_number > ++number);
    }
}

See Also

Functions

•  llSameGroup

Articles

•  Detected

Deep Notes

Issues

~ Search JIRA for related Issues
Bug - A problem which impairs or prevents the functions of the product. Open - The issue is open and ready for the assignee to start work on it.    Attachments only change/inherit the active group when they're "rezzed"
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.
In other languages