Jump to content

Script that checks if you wear tag for Group 1 or Group 2 - Else: Eject.


Narsiph
 Share

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

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

Recommended Posts

Heya.

 

In very short words: Is there a pssibility to get a security orb into checking if someone wears group tag 1 or 2 and if not, ejecting that residnt from the land? Seems i cant find anything... Everything just works for 1 group. And i dont wanna give up just yet.

I want to avoid micromanaging my fan-group and the roleplay-group. Fan-Group should get on land for party-time and roleplay-group should have always access, but no public access is allowed.

 

Stay crunchy and thanks for your invested time.

Link to comment
Share on other sites

Hi there!

Correct that LSL functions only test against one group - the current group the script-container (object) belongs to.

Solution therefore is the use two objects (one per group), and pass avatars to be tested between the two.

If the party-group was the second-tested group (TestObject2 in my code) then you could easily remove this second test, leaving only the roleplay group access to the land - for times when there aren't parties.

Pseudo-code follows!

 

    If(!sameGroup(avKey) && Me == TestObject1) { AskTestObject2("Failed1:" + (string)avKey); }
else { Passed(avKey); } ...    If(!sameGroup(avKey) && Me == TestObject2) { InformAv(avKey,"You've failed both tests, bye!"); Eject(avKey); }
else { Passed(avKey); }

 

 

Link to comment
Share on other sites


Freya Mokusei wrote:

Correct that LSL functions only test against one group - the current group the script-container (object) belongs to.

Right. There is, however, a way to see more from a single script. Although OBJECT_GROUP returns NULL_KEY for avatars, it gives a valid response for avatar attachments (excluding HUDs) obtained with the newish function, llGetAttachedList().  

Couple caveats: It's certainly possible to wear no attachments, and if an already rezzed-in-world attachment is added by "Put On" it will retain its group until the wearer changes active group.

Link to comment
Share on other sites


Qie Niangao wrote:


Freya Mokusei wrote:

Correct that LSL functions only test against one group - the current group the script-container (object) belongs to.

Right. There is, however, a way to see more from a single script. Although
returns NULL_KEY for avatars, it gives a valid response for avatar attachments (excluding HUDs) obtained with the newish function,
.  

Cool! This is a function I've only used a couple times since it was released to us. Definitely a fun use-case I hadn't considered.

Maybe if this method is being used, pick an attachment point that changes regularly - and if the RP location uses a mandatory titler object, try there?

Link to comment
Share on other sites

I love this function. I used it in a particle script to target the objects attached to various points of an avatar instead of their center. It's certainly possible for an avatar not to wear any attachments, but I'd say it's pretty rare these days. Even the starter avatars have hair and other attachments already.

Link to comment
Share on other sites

To be honest, I don't use it a lot so there may be other caveats about the group identity thing. One that I didn't mention is (I think) Experience-specific: items attached by an Experience scripts' llAttachToAvatarTemp() don't seem to have any Group at all, rather than the group to which the Experience script is set. That's true in the viewer, too, not only by script. I have no idea if that's intentional.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for your answers, that helped me a lot actually. Sorry if i didnt reply instantly but i let things like this run for a while so i get as much informations as possible.

 

Alghouth i must say i found meanwhile another solution :) That solution is a item-check, like a vip-pass or something like that and people that dont wear that get ejected.

 

Stay crunchy :3

Link to comment
Share on other sites

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...