Difference between revisions of "LlSameGroup"
Jump to navigation
Jump to search
m (<lsl> example) |
|||
Line 13: | Line 13: | ||
|caveats | |caveats | ||
|constants | |constants | ||
|examples=< | |examples=<lsl>//Gives inventory object only to agents with the same active group | ||
default | default | ||
{ | { | ||
Line 23: | Line 23: | ||
llSay(0, "Wrong active group!"); | llSay(0, "Wrong active group!"); | ||
} | } | ||
} | }</lsl> | ||
</ | |||
|helpers | |helpers | ||
|also_functions={{LSL DefineRow||[[llDetectedGroup]]|Used in conjunction with {{LSLGC|Detected|detection}} events}} | |also_functions={{LSL DefineRow||[[llDetectedGroup]]|Used in conjunction with {{LSLGC|Detected|detection}} events}} |
Revision as of 06:29, 2 January 2008
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: integer llSameGroup( key agent );219 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns an integer boolean, that is TRUE if agent has the same active group, otherwise FALSE
• key | agent | – | must be in the same sim |
Also returns TRUE if the object is deeded to the same active group as agent
Caveats
Examples
<lsl>//Gives inventory object only to agents with the same active group default {
touch_start(integer total_number) { if(llSameGroup(llDetectedKey(0)))//same as llDetectedGroup(0) (with llDetectedGroup, detected does not need to be in the sim) llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_OBJECT,0)); else llSay(0, "Wrong active group!"); }}</lsl>
See Also
Functions
• | llDetectedGroup | – | Used in conjunction with detection events |