Jump to content

Checking against several groups


Darkie Minotaur
 Share

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

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

Recommended Posts

I'm not 100% sure, but I think we had that here not too long ago - but I can't find it :(

Is it possible to check not for one group but for a number of groups? An example: You have a gift giver that you want not only members of group A be abe to use, but also members ao group B and C.

I think there was a solution fr that, but I can't think of it - this brain is getting too old. ;)

Link to comment
Share on other sites

if(Groupdetected == group1 | group2 | group3){} might work...seriously, I didn't try it and you might have to use ||...but you tried this already and it is harder to do than this, right? lol. | is "or" and will work if it is one of the other.

Hey, maybe it is

if((groupdetected == group1)|(groupdetected == group2) | (groupdetected == group3)){givestuff();}

yeah, that might be it.

Link to comment
Share on other sites

llDetectedGroup does not return a key. There are no functions to return a key of an agent's group. llDetectedGroup returns a boolean value denoting whether or not their key matches the objects key. llSameGroup does the same thing except it works outside of the detected events and takes a key as input.

Link to comment
Share on other sites

the standard method is indeed setting multiple prims to different groups, a script in each one checks if the avatar's active group matches with llSameGroup, and if any match, report back. you can link them after setting all the groups, but the groups will default to the root group if rerezzed, I can't remember if they also reset with the region or not...

but you don't have to necessarily link them, you can always just have them as separate objects if land permissions allow, and communicate by whatever method works for you, or have each one do the giving itself.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4122 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...