Jump to content

Same group question


Domitan Redenblack
 Share

You are about to reply to a thread that has been inactive for 4064 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

The person has to be wearing a group tag that matches your hat's group.  You could each have several groups in common, but there's no way that you can have a script look to see what groups another person might belong to.  You can only check for a match against your hat and then only if the person has that group active at the moment.

Link to comment
Share on other sites

Function: integer llSameGroup( key

Returns an integer boolean, that is TRUE if agent has the same active group, otherwise FALSE

• key agent avatar UUID that is in the same region  

Also returns TRUE if the object is deeded to the same active group as agent Also returns TRUE if the object is "set to" or deeded to the same group as group UUID (i.e. key OBJECT_GROUP)

Your hat doesn't care (or know) what your current group is. llSameGroup is comparing your hat's group (look on the General page of Edit if you really don't know what your hat's group is for some reason) with the active group of the agent whose key you put into the function(in your example, fed by llDetectedKey because the agent touched the hat).  It's a nice, simple, straightforward function.  No frills.

Link to comment
Share on other sites

Sorry, still confused. llSameGroup(toucher_key) checks the group of the whole object, or the group of the root, or the group of the prim?

When I am wearing the "whole" hat now, and click Edit on it, it shows Group = (none) .... with a "Set" button. Is there another place for the object's group to be set? Or only there?

 

 

Link to comment
Share on other sites

Read the LSL Wiki : "Also returns TRUE if the object is not set to a group (i.e. "(none)") and either the AV with the given key has no group active or the function is called with a NULL_KEY."

Your hat's group is the group of the hat: the whole hat and nothing but the hat.  While it is possible under unusual circumstances to set different prims in the same linkset to different groups, that's not what happens by default.  Also, if you do that and then take the hat to inventory and re-rez it, the entire hat will be reset to the same group.

 

Link to comment
Share on other sites

by default all prims in an object are set to the group that you had active when the object is rezzed. if you change your active group, or change the group via edit, they will not match, and it will use whatever that prim is set to.

you cannot set the group for a single prim of an object, only the whole object. the only special case is setting multiple unlinked prims to different groups before linking them... rezzing wipes this out as described above.

Link to comment
Share on other sites

All: Sorry, this is my first programming with groups, and I find the Wiki very confusing since I am apparently not clear on how groups work with objects... And there is setting the group plus deeding the object to a group as well, as for TV sets with parcel media. Not sure how that affects our discussions.

I think I understand now why the dance pole in a friend's club got broken so often. It was set to allow only group members to be able to dance on it, and you had to wear your tag. But sometimes it would not let you dance even if you were wearing your tag correctly. Resetting the scripts in the dance pole did not seem to help either, only the group/club owner could reset the pole I think. Of the 20+ members around, no one seemed to know why it kept breaking.

 

If I change my group, then detach and re-attach the hat to my skull, will that then reset the hat to my current group? Is there a way to detect if I change my group tag in LSL? If so, I could auto detach and re-attach, yes?

Is there a way to set the group of the hat *permanently* (until reset scripts etc) ? Will deeding the hat to a group do this?

 

Link to comment
Share on other sites

(1) When you make an object, its group defaults to whatever tag are wearing at the time.

(2) An object's group won't change unless you do it deliberately.

(3) To change an object's group, you have to open the General page of Edit and set a new group by choosing the little wrnch and screwdriver tool icon next to "Group" and select a group name (one of the groups that YOU belong to) from the list presented.

(4) Rarely, you may need to deed some objects, like radios, to the group in order to have access to some parcel properties. If so, then you have to click the Deed button on the General page.  Once you do that, you are no longer the owner.  The group is.

There's not much else you need to know.  It is all very simple.

Link to comment
Share on other sites


Domitan Redenblack wrote:

If I change my group, then detach and re-attach the hat to my skull, will that then reset the hat to my current group?
(yes)
Is there a way to detect if I change my group tag in LSL?
(sort of
*
)
If so, I could auto detach and re-attach, yes?
(correct)

Is there a way to set the group of the hat *permanently* (until reset scripts etc) ?
(sort of
**
Will deeding the hat to a group do this?
(see
**
)

 

* the only way to detect changes in an avatars group is to poll for it. and then you can only tell if it changes to or from the same group. if the change is from one different group, to another different group, it cannot be detected.

** Deeding does lock down the group of an object, but you no longer own it so you can't wear it. the only way to undeed it by script is to force it to go offworld (forces return). someone with group ability to rerurn it can also do that.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4064 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...