Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Group Touch?

Corporal Candour
Registered User
Join date: 3 Sep 2005
Posts: 38
01-29-2006 05:41
How would I go about making a touch script only work when an avatar from a specific group touches it?
Moonshine Herbst
none
Join date: 19 Jun 2004
Posts: 483
01-29-2006 05:54
You must set the object to that specific group and use llSameGroup.
http://secondlife.com/badgeo/wakka.php?wakka=llSameGroup

Put it in the touch event. Example:
CODE

if (llSameGroup(llDetectedKey(0))==TRUE)
{Do stuff}


Also, there is a minor error in the description of the function, you don't have to be in the same sim as the object for the function to work. I've used a script like this from the neighbor sim since August.
_____________________

Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
a caveat
01-29-2006 06:27
As I understand it, though, this only recognizes the one "active" group. That is, I can be a member of 15 different groups, but the only objects that will recognize me as a member are the ones in the group in which I am active, whose title is floating above my head.

If there is a way to recognize a member of a group who does not have that group set as the active one, I would like to know it!

Baron
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
01-29-2006 09:56
No, this is all we get as far as determining whether someone's in a group. Incidentally, this is exactly equivalent to Moonshine's code:

CODE

if (llDetectedGroup(0)) {
do stuff here;
}