Jump to content

Send Avatar Home if not wearing specific attachment


MinaPhoenix
 Share

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

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

Recommended Posts

Hi. I am not very advanced with scripting, but learning daily.

I have made a masquerade mask system. The mask uses RLVa so when it is temp attached to an Avatar it transports itto a dance venue and all the other avatar names are changed to silly names so no one knows who is there. I have all that working well.

However, what I would also like to do is have some sort of sensor that will check to see if that specific mask is attached to an avatar and if not the Avatar is sent home.

Could anyone please give me a nudge in the right direction as to how I might achieve this?

 

many thanks

Link to comment
Share on other sites

Just use a timer to check llGetAgentList with the parameter AGENT_LIST_PARCEL to get a current list of everyone in the parcel once a minute or so.  Then ping everyone on the list with a ping message like this

llRegionSayTo( (key)llList2String(All_agents,i), my_special_channel, "Do you have a mask on?");

Assuming that everyone's mask has a script in it that listens on my_special_channel, then make that script reply

llRegionSayTo (id, my_special_channel, "Yup.  Mask in place.");

As the replies come in, just save the UUID of each agent who replied in a temporary list.  Anticipating some lag, wait a few seconds to be sure that they all had a chance to respond and then compare that list with the list of people you detected in the parcel. Send home anyone in the parcel who did NOT respond.

Link to comment
Share on other sites

I'm curious -- as a temp attached object, is the attach event raised when the object is removed/detached?  If it is, you might also try to act on that short window when the avatar manually removes the mask to return them back to the "start point".  Then use the the room sensor act as a backup to send them home if that fails.  If that would work it would have the duel benefit of not only removing them immediately, but also elegantly sending them to the  "threshold" area instead of simply 'home'.

 

 

  • Like 1
Link to comment
Share on other sites

As @KT Kingsley said already, I would advise against "actively" querying an object through scripts.

With llGetAttachedList and llGetObjectDetails You can easily find your "special" object by checking creator uuid + creation date (this SHOULD be unique and impossible to forge if you play your cards right)

No need to go into message processing at all.

Edited by Kyrah Abattoir
Link to comment
Share on other sites

@Kyrah Abattoir  As you said before editing it out, llGetAttachedList and llGetObjectDetails will help you verify all of the attachments except HUDs, but the except HUDs part is important, especially in an application like the OP's. Some of the best "secret keys" used for things like group discount cards and gift cards  and for letting club members into private areas are HUDs, rather than objects worn outside the avatar where the world can see them.  llGetAttachedList will not detect them, so you need to use messaging. (Besides, there's nothing inherently wrong with sending a simple handshake message unless you are doing something silly like firing it 20 times a second.) 

Link to comment
Share on other sites

6 minutes ago, Kyrah Abattoir said:

why not avoid object comms when possible?

Why?  Unless you plan on flooding a region repeatedly with a monstrous number of messages, their effect on load is trivial. There's no reason not to keep handshake messaging in your toolkit..

  • Like 1
Link to comment
Share on other sites

Thank you so much everyone for the ideas. It has given me a lot to consider. Anna's idea was interesting, but not practical for my situation as we typically remove the masks 15 mins before the end to see who it is we have actually been dancing with. I would expect that if I use a messaging system it would only have to fire once a minute, so from what Rolig is saying, shouldn't pose a problem, even though it is going to test my low level of expertise with creating and comparing lists. No matter, a challenge is good.

Thanks again to all 🙂

Link to comment
Share on other sites

2 hours ago, MinaPhoenix said:

Thank you so much everyone for the ideas. It has given me a lot to consider. Anna's idea was interesting, but not practical for my situation as we typically remove the masks 15 mins before the end to see who it is we have actually been dancing with. I would expect that if I use a messaging system it would only have to fire once a minute, so from what Rolig is saying, shouldn't pose a problem, even though it is going to test my low level of expertise with creating and comparing lists. No matter, a challenge is good.

Thanks again to all 🙂

You can still use that even with your 15 min window at the end, it just complicates things a trifle.

Have the object send a message on a control channel, along the ID of the avatar when detached. (no more  sending back to starting point, but oh well).

Have a room object/sensor listening for that detach event from the mask and send whoever removed the attachment home.  If you are at the end of the party, the host can deactivate the send home control device and everyone can take off their mask for the reveal at the end.  Perhaps you can even incorporate that in to the masks and event:  have the room object when deactivated send it's own control message on a common channel to all the masks to detach when the "room sensor" is turned off. 

You get the benefits of sending people home right away still, and you have a benefit of everyone does the reveal at the same time.  That last bit night be an iffy option if some people might want to leave at the end so as to remain anonymous, but it's an option you can look at.

Just thoughts and brainstorming ideas.  Good luck.

Edited by Anna Salyx
clarifing that the object/sensor is listening for is a mask detach
Link to comment
Share on other sites

Just a thought, though it could be exploited.

 

If you want the send home system to be completely seamless, without a toggle on off, you could set it to simply not issue the command if it detect a large number of avatars not wearing a mask.

For example,

I don't know how many people we are talking, but say there are normally 10 people at the event with masks.  If it does a check and says "these two people are not wearing masks" it should boot those two people.  But if it detects say, 8+ without masks, it "says" to itself "the unmask event must be happening, I should boot no one."  (Not literally says but that's the logic.)

This could be exploited though if enough people just showed up without masks, or enough people decided to unmask all at once randomly.  You probably would want to do it as a percentage and not just a thresh hold number.

 

Also, you mentioned using RLV for the masks I believe.  You could also, instead, have a trigger that the host controls, that will disable the mask detector, and automatically force the removal of all masks.

Link to comment
Share on other sites

On 5/9/2020 at 4:18 PM, Anna Salyx said:

I'm curious -- as a temp attached object, is the attach event raised when the object is removed/detached?  If it is, you might also try to act on that short window when the avatar manually removes the mask to return them back to the "start point".  Then use the the room sensor act as a backup to send them home if that fails.  If that would work it would have the duel benefit of not only removing them immediately, but also elegantly sending them to the  "threshold" area instead of simply 'home'.

i agree with this approach. Send people back to the start point and fit them with another mask. Rather than send them home

people make mistakes sometimes, and stuff can go wonky sometimes when laggy.  Like they meant to take something else off rather than their mask

Link to comment
Share on other sites

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