Difference between revisions of "LlMatchGroup"

From Second Life Wiki
Jump to: navigation, search
(Created page with "{{LSL_Function |inject-2={{Issues/SCR-79}}{{Issues/SVC-2818}}{{Issues/SVC-708}}{{LSL_Function/uuid|id|sim=*}} |func=llMatchGroup |sort=llMatchGroup |func_id |func_sleep0.0 |func_…")
 
Line 6: Line 6:
 
|func_sleep0.0
 
|func_sleep0.0
 
|func_energy=0
 
|func_energy=0
|func_desc=This function is a request from several scripters to reach what llDetectedGroup and llSameGroup is not able to provide. It would not cause any security and/or privacy issues due the fact it will return a integer as {{HoverText|boolean|TRUE or FALSE}} instead of any information about the group.
+
|func_desc=This function is a request from several scripters to reach what [[llDetectedGroup]] and [[llSameGroup]] is not able to provide. It would not cause any security and/or privacy issues due the fact it will return a integer as {{HoverText|boolean|TRUE or FALSE}} instead of any information about the group.
 
|func_footnote=
 
|func_footnote=
 
|return_type=integer
 
|return_type=integer
|return_text=that is a {{HoverText|boolean|TRUE or FALSE}} representing if '''group''' is the same the object's group or avatar's active group.
+
|return_text={{HoverText|boolean|TRUE or FALSE}}, that is [[TRUE]] if '''agent''' has '''group''' as active group, otherwise [[FALSE]]
 +
|spec=* Still unknow.
 
|p1_type=key|p1_name=group|p1_desc=group [[UUID]] of the group that is going to match with [[Avatar|avatar]]'s active group|p1_hover=group UUID of the group that is going to match with avatar's active group
 
|p1_type=key|p1_name=group|p1_desc=group [[UUID]] of the group that is going to match with [[Avatar|avatar]]'s active group|p1_hover=group UUID of the group that is going to match with avatar's active group
 
|p2_type|p2_name|p2_desc|p2_hover
 
|p2_type|p2_name|p2_desc|p2_hover
Line 23: Line 24:
 
|p12_type|p12_name|p12_desc|p12_hover
 
|p12_type|p12_name|p12_desc|p12_hover
 
|constants
 
|constants
|spec
 
 
|caveats=* Still unknow.
 
|caveats=* Still unknow.
|examples
+
|examples=<lsl>key group_key = "cd505f45-a33c-dcd5-eb7e-cad27847a4af"; //Key of some group
 +
 
 +
default
 +
{
 +
    touch_start(integer total_number)
 +
    {
 +
        if (llMatchGroup(group_key) == TRUE) {  //It checks if the agent (avatar) has
 +
                                                // the group of "group_key" as active group
 +
            llSay(0,"You belong to the group secondlife:///app/group/" + (string)group_key + "/about");
 +
        } else {
 +
            llSay(0,"You don't belong to the group secondlife:///app/group/" + (string)group_key + "/about");
 +
        }
 +
    }
 +
}</lsl>
 
|helpers
 
|helpers
 
|also_header
 
|also_header
|also_functions
+
|also_functions={{LSL DefineRow||[[llDetectedGroup]]|Used in conjunction with {{LSLGC|Detected|detection}} events}}
 +
{{LSL DefineRow||[[llSameGroup]]}}
 
|also_tests
 
|also_tests
 
|also_events
 
|also_events

Revision as of 15:13, 18 January 2012

Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Summary

Function: integer llMatchGroup( key group );

This function is a request from several scripters to reach what llDetectedGroup and llSameGroup is not able to provide. It would not cause any security and/or privacy issues due the fact it will return a integer as boolean instead of any information about the group.
Returns an integer boolean, that is TRUE if agent has group as active group, otherwise FALSE

• key group group UUID of the group that is going to match with avatar's active group

Specification

  • Still unknow.

Caveats

Examples

<lsl>key group_key = "cd505f45-a33c-dcd5-eb7e-cad27847a4af"; //Key of some group

default {

   touch_start(integer total_number)
   {
       if (llMatchGroup(group_key) == TRUE) {  //It checks if the agent (avatar) has
                                               // the group of "group_key" as active group
           llSay(0,"You belong to the group secondlife:///app/group/" + (string)group_key + "/about");
       } else {
           llSay(0,"You don't belong to the group secondlife:///app/group/" + (string)group_key + "/about");
       }
   }
}</lsl>

See Also

Functions

•  llDetectedGroup Used in conjunction with detection events
•  llSameGroup

Deep Notes

All Issues

~ Search JIRA for related Issues
   Request for llMatchGroup() function

Signature

//function integer llMatchGroup( key group );