Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

group checker script

Iraefer Revnik
Registered User
Join date: 3 Dec 2007
Posts: 10
09-24-2008 15:31
hello,
i need a group checker scipt that lets only people in listed groups can sit on it.
i will use it to camp. if it can check more than one group is better or can let people camp only same group with the object
can anyone suggest me any script like that?
Pedro McMillan
SLOODLE Developer
Join date: 28 Jul 2007
Posts: 231
09-24-2008 16:27
Unofortunately, you can only check one group directly in LSL, and it has to be the same group as the object belongs to. The LSL function "llSameGroup(..)" is what you need -- you just give it an avatar key, and it returns TRUE if the avatar is in the same group, or FALSE if not.

http://www.lslwiki.net/lslwiki/wakka.php?wakka=llSameGroup
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
09-25-2008 12:03
However, you could setup a kind of group membership server (or set of them) nearby your object that could listen for requests to check residents against a group and then respond with the result.

Note also that you CANNOT check for group MEMBERSHIP from a script. You can only check whether a resident is CURRENTLY SET to that group's tag (if so, group membership is implied, of course, but if the resident is NOT set to that group tag, it does NOT imply they are NOT members of the group).

(tag set -> member), NOT (member -> tag set)