LlSameGroup: Difference between revisions
Jump to navigation
Jump to search
added NULL_KEY - no group behaviour (see talkpage) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{LSL Function/group}}{{LSL Function | {{LSL Function/avatar|agent|sim=*}}{{LSL Function/group}}{{LSL Function | ||
|func=llSameGroup | |func=llSameGroup | ||
|sort=SameGroup | |sort=SameGroup | ||
|func_id=219|func_sleep=0.0|func_energy=10.0 | |func_id=219|func_sleep=0.0|func_energy=10.0 | ||
|return_type=integer | |return_type=integer | ||
|p1_type=key | |p1_type=key|p1_name=agent | ||
|p1_name=agent | |||
|func_desc | |func_desc | ||
|func_footnote=Also returns [[TRUE]] if the object is deeded to the same active group as '''agent''' | |func_footnote=Also returns [[TRUE]] if the object is deeded to the same active group as '''agent''' |
Revision as of 18:01, 3 May 2009
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Caveats
Examples
<lsl>// 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!"); } }}</lsl>
Notes
Child Prims
It is possible for the group of a child prim to differ from that of the root prim. To build such an object it must first be unlinked, the groups set, and then relinked. Rezzing an object resets the group of the object to that of the group that the user currently has activated. Changing the group of an object changes the group for the entire object. This may only be an artifact or manifestation of VWR-5044.
See Also
Functions
• | llDetectedGroup | – | Used in conjunction with detection events |