Jump to content

Detecting Attachments, is it possible?


Loki Eliot
 Share

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

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

Recommended Posts

Ive been trying out many ways to try and make the attaching of important HUDS for experiences as seemless as possible. I would like for a hud to be automatically attached across multiple regions for an experience i am working on but no matter what i try , i just cant work out a reliable accurate way how.

The thing that throws a spanner into what would seem to be a simple task of 'checking wether the visiting avatar has the hud attachment ON or OFF' is that i can not  target or detect an object attached to an avatar. This has resulted in me having to use elaberate work arounds with messages sent, database lists, sensors, all of which are oopen to inaccuracey when someone crashes.

Is there truley no way at all to simple script "Dear Avatar, do you currently have this HUD attached, Yes or No?"

 

Does anyone have any suggestions?

Link to comment
Share on other sites

Just to answer the title of the thread, you can detect attachments using llGetAttachedList() -- but only those attached to "visible" (non-HUD) attachment points. Presumably that's to keep HUD-wearing private.

Thing is, even if you could get the UUID of the attached HUD, you might want to interrogate it to make sure it's really what it appears by name. Whatever the protocol you'd use for that interrogation you could get the same effect merely using llRegionSayTo the avatar's UUID (because an attachment's listen() gets all messages to the avatar).

Now, if you weren't worried about the avatar removing the HUD once they're in the region, the HUD could volunteer it's existence with a broadcast llRegionSay() on CHANGED_REGION. That's not as targeted as polling each avatar of interest, but might be easier than llGetAgentList bookkeeping if you care about every avatar in the region, and could be particularly useful if avatars' HUDs should know about each other.

  • Like 1
Link to comment
Share on other sites

oooh i had no heard of llGetAttachedList() this might get me closer to a more reliable system. I could rez both a HUD and a doppleganger attachment, and trust that both would attach at the same time, so when one is gone, so the other is also gone in cases such as crashing. 

Thanx for the tip :)

Link to comment
Share on other sites

One problem with that approach, brilliant though it is, is that we are limited to wearing no more than 38 attachments, including HUDs. So, attaching two objects instead of just the HUD pushes the total up a bit, perhaps unnecessarily.  More importantly, if a user already has 37 attachments, then one of your two won't attach.  If it's the HUD, you'll never know.  I never would have thought this could be an issue myself, but I'm discovering that it's not uncommon for residents to have WAY more attachments than I would ever have imagined.

ETA:  In fact, a player can prevent your HUD from attaching deliberately by filling all attachment slots.

  • Like 1
Link to comment
Share on other sites

  • 4 years later...
14 hours ago, Qie Niangao said:

Nope, and unlikely to ever happen. The viewer can't see them, and it's considered a privacy concern (otherwise they wouldn't have been excluded from llGetAttachedList).

For what it's worth, I'm 80% sure there's some data about HUD attachments (at least names) being communicated between viewers, I recall seeing something about it in the source code. But yeah, scripts don't have access to that info.

  • Like 1
Link to comment
Share on other sites

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