Skip to content

llDetectedGroup

integer llDetectedGroup(integer Number)

Returns TRUE if detected object or agent Number has the same user group active as this object.

It will return FALSE if the object or agent is in the group, but the group is not active.

Parameters
Number (integer)
  • There is no way to detect if the prim is in the same group as one of the agent’s inactive groups.
//Gives inventory only to agents with the same active group
default
{
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!");
}
}