Difference between revisions of "LlDetectedGroup"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
m |
|||
Line 16: | Line 16: | ||
{ | { | ||
if(llDetectedGroup(0))//same as llSameGroup(llDetectedKey(0)) (with llSameGroup, detected must be in the sim) | if(llDetectedGroup(0))//same as llSameGroup(llDetectedKey(0)) (with llSameGroup, detected must be in the sim) | ||
llGiveInventory( | llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_OBJECT,0)); | ||
else | else | ||
llSay(0, "Wrong active group!"); | llSay(0, "Wrong active group!"); |
Revision as of 13:49, 28 April 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: integer llDetectedGroup( integer number );39 | Function ID |
0.0 | Forced 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 |
number does not support negative indexes. Returns FALSE if number is out of range or if the detected event does not support this attribute.
Caveats
- If number is out of bounds the script continues to execute without an error message.
Examples
//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!"); } }