What I have is a HUD attachment that listens to channel 0. It needs to take different action based on whether the speaker is an avatar, an object, or one of the owner's attachments.
Testing whether the speaker is an avatar or not is easy, llGetAgentSize returns a zero vector for non-avatars, and for avatars that are out of range, since I'm reacting to chat on channel 0, I know it's an object if I get a zero vector.
It gets tricker if I'm going to detect that the object is an attachment. What I've been using was llGetObjectDetails to get the object's location, and assumed that if the location == my location, then it's another attachment on the same avatar. This has worked well, except a customer of mine found a HUD they wear does not give back the same location (for a variety of reasons, I don't know what location it is returning).
Is there a reliable, reasonably simple way people have used to detect whether or not a particular key is an attachment?
Thanks much!
Corvan.
_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
llGetAttached returns the attachment point or zero if not attached
> Thanks much!
> Corvan.
>
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
> https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
Ima Mechanique
Check List
1) Check the documentation.
2) Drink coffee.
3) Check the documentation again, to see what I missed first time.
4) If I still can't solve it, ask if anyone else has the answer.
ima.mechanique(at)blueyonder.co.uk
oops, just reread your question. I missed the from a key part, so ignore
this
If it's an object, llSensor() is, sadly, your best bet. You can sense for the object by key. Attachments don't show, normal objects do.
There ought to be a nicer trick but I've not seen one.
http://educationaldesigns.eloisepasteur.net/
http://eloisepasteur.net/blog/
I hadn't thought of a sensor scan either, unfortunately for my purposes that's probably too slow... might need to just live with a few attachments that don't get detected properly.
Thanks,
Corvan
llGetObjectPrimCount returns zero for attachments -
http://wiki.secondlife.com/wiki/LlGetObjectPrimCount
Perfect! Thanks very very much!
Cheers,
Corvan