Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

LSL Needs More Group Access!

Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
06-17-2004 00:04
Hello everyone.
One thing that's been missing from LSL is more group manipulating/accessing functions.

We already know that every group has a UUID, the only thing missing is functions that allow the accessing of real data concerning that group.
(I know that groups have UUIDs since llGetLandOwnerAt when targeted at a group-owned parcel returns a valid UUID that's not the previous agent owner's UUID.)

I propose a list of functions/function constants that will (hopefully ;)) satasfy group manipulation and access:

1. key llRequestGroupData(key group, integer data);
This function takes a group's key and data constant and returns a query key. Data resulting from calling this function is passed to the script through the dataserver event.

Data constants:

GROUP_MEMBER_NAMES
This constant returns a comma-seperated string of the names of the members of the group. If necessarry, this constant will trigger multiple dataserver events with the same query key if the size of the data returned is greater then a set limit.

GROUP_SIZE
This constant will cause the dataserver to return an integer representing the number of members in the group.

GROUP_NAME
Not to be confused with GROUP_MEMBER_NAMES, this constant will cause the dataserver to return the group's actual name.

GROUP_TITLES
This constant will cause the dataserver to return a comma seperated string containing the titles given to the group members. The highest ranking title will have the lowest index (0) in the string. This allows LL to expand our title giving abilities in the future (maybe allow for subrankings lower or higher then member or officer).

GROUP_DESCRIPTION
Pretty much self-explanatory. This constant will return the group's description.

2. I'd also like to request that AGENT_GROUP be added to the llRequestAgentData function constant list.
AGENT_GROUP would ask the dataserver for the key of the group that the agent has currently active. NULL_KEY if the agent doesn't have a group active.

3. integer llSetOwnerGroup(key group)
This function sets the active group of the owner of the object the script is in. It requires that PERMISSION_CHANGE_GROUPS be granted and that the owner of the object be *in* the group specified by the argument. This function returns an integer boolean (TRUE/FALSE) that tells if the group change was successful.

4. A request to add a PRIM_GROUP constant to the llSetPrimitiveParams function.
This would change the prim's group to another key. This also requires that PERMISSION_CHANGE_GROUPS be granted via llRequestPermissions.

5. That llKey2Name would also take a group key and return the group's name if a member of that group is in the task's sim.

Feel free to add more to the list! :D
Adam Zaius
Deus
Join date: 9 Jan 2004
Posts: 1,483
06-17-2004 00:26
key llGetAgentGroups(key id);

Retrieves a list of group's the agent 'id' is in. This would complement llSameGroup, as you do not need to be on with the 'active' group set. Returns a key to match a corresponding dataserver event.

-Adam
_____________________
Co-Founder / Lead Developer
GigasSecondServer