Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How to get llDetectedGroup to work.

Karolly Logan
Registered User
Join date: 12 Jan 2006
Posts: 5
03-31-2006 21:21
Hi. I'm trying to get into scripting and have run into a problem. I'm working on a project for my group and I'm trying to get llDetectedGroup to work. Can anyone give me an example as to how this is supposed to work? Thanks!
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
04-01-2006 00:51
well

From: someone
Returns TRUE if detected object or agent number has the same user group active as this object. It will return FALSE if the object or agent is in the group, but the group is not active.


so you can use it in a lets say touch event

CODE

touch_start(integer t)
{
if (llDetectedGroup(t) == 1) do stuff; // 1 is the same as TRUE
else return;
}


From: someone
Note: The llDetected* functions will only return a meaningful value in the collision(), collision_start(), collision_end(), sensor(), touch(), touch_start(), or touch_end() events.

llSameGroup does a similar thing but you can specfy a av key, instead of having someone touch ect
Karolly Logan
Registered User
Join date: 12 Jan 2006
Posts: 5
04-01-2006 08:49
From: Osgeld Barmy
well



so you can use it in a lets say touch event

CODE

touch_start(integer t)
{
if (llDetectedGroup(t) == 1) do stuff; // 1 is the same as TRUE
else return;
}



llSameGroup does a similar thing but you can specfy a av key, instead of having someone touch ect


You have no idea how much you have just cleared up for me. Thank you soo much!