Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

groups

GaL Soyer
Registered User
Join date: 24 Feb 2006
Posts: 47
04-13-2007 06:52
hello :)

how can i make a box that i enter it a name of group with a string, and only people from that group can touch it and it says "hello!!!"

tnx :)
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
04-13-2007 08:25
Use the llDetectedGroup function
http://www.lslwiki.org/index.php/LlDetectedGroup

You have to make the object associated with the group you are detecting.
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
04-13-2007 11:01
However, you can assign prims to different groups, link them together, and they will retain those individual group assignments, therefore scripts in those individual prims will respond accordingly to llDetectedGroup and llSameGroup. This is only for as long as the object stays in-world. If it is taken into inventory and re-rezzed, the entire object will take the group assignment of the agent's group tag at time of rez.

Also, it's possible to assign a prim/object to a group, then leave (or be ejected from) that group, but the prim/object will retain that group assignment. Again, so long as the object remains in-world.
Bartholomew Maverick
Registered User
Join date: 22 Nov 2006
Posts: 1
Need a more detailed look at this
04-19-2007 02:33
Could someone post a little code to illustrate this? The wiki doesn't have a very clear explanation of how it works
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
04-19-2007 08:12
CODE

default
{
state_entry()
{
llListen( 0, "", "", "" );
}

touch_start( intger Num )
{
// Use llDetectedGroup inside event handlers for which the
// llDetected* functions will return useful data,
// touch*, collision* and sensor

if( llDetectedGroup( 0 ) )
llSay( 0, llDetectedName( 0 ) + " is wearing the tag of the group I'm assigned to.";
else
llSay( 0, llDetectedName( 0 ) + " is NOT wearing the tag of the group I'm assigned to.";
}

listen( integer Chan, string Name, key ID, string Message )
{
// Use llSameGroup when you want to test an agent by their UUID key

if( llSameGroup( ID ) )
llSay( 0, Name + " is wearing the tag of the group I'm assigned to.";
else
llSay( 0, Name + " is NOT wearing the tag of the group I'm assigned to.";
}
}
Valradica Vanek
Registered User
Join date: 1 Aug 2006
Posts: 78
Invite to group in LSL?
04-19-2007 09:36
Is there a way to invite an agent to join a group through and LSL script. I have an app where I want to invite persons to join a group when they purchase something through a script. (I scoured the LSL wiki but did not find something - perhaps its not in the wiki)

Val
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
04-19-2007 09:40
From: Valradica Vanek
Is there a way to invite an agent to join a group through and LSL script. I have an app where I want to invite persons to join a group when they purchase something through a script. (I scoured the LSL wiki but did not find something - perhaps its not in the wiki)

Val



No I'm afarid that is not currently possible.
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
04-19-2007 10:54
From: Valradica Vanek
Is there a way to invite an agent to join a group through and LSL script. I have an app where I want to invite persons to join a group when they purchase something through a script. (I scoured the LSL wiki but did not find something - perhaps its not in the wiki)

Val


I was at ESC sim yesterday and that is what happened to me. I believe they used a regular avatar scanner that sent an IM to an avatarbot that sent the invite to me.
Sys Slade
Registered User
Join date: 15 Feb 2007
Posts: 626
04-19-2007 11:24
Ah, but it still can't be done through LSL :p
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
04-20-2007 00:43
From: Destiny Niles
I was at ESC sim yesterday and that is what happened to me. I believe they used a regular avatar scanner that sent an IM to an avatarbot that sent the invite to me.


Yeah a bot would be able to do so as its an avatar. Probably doesnt even need the scanner script as it could be build straight into the bot code.