[slscripters] Looking to find a reliable way to tell if an attachment is speaking...

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[slscripters] Looking to find a reliable way to tell if an attachment is speaking...

Corvan Nansen
I honestly thought I had is sussed, until a HUD came along and defeated my simple method.

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
Reply | Threaded
Open this post in threaded view
|

Re: [slscripters] Looking to find a reliable way to tell if an attachment is speaking...

Niel Archer-4
> I honestly thought I had is sussed, until a HUD came along and defeated my simple method.
>
> 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?

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

_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
Reply | Threaded
Open this post in threaded view
|

Re: [slscripters] Looking to find a reliable way to tell if an attachment is speaking...

Niel Archer-4
> > I honestly thought I had is sussed, until a HUD came along and defeated my simple method.
> >
> > 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?
>
> llGetAttached returns the attachment point or zero if not attached

oops, just reread your question. I missed the from a key part, so ignore
this

> > 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
>
> _______________________________________________
> 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

_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
Reply | Threaded
Open this post in threaded view
|

Re: [slscripters] Looking to find a reliable way to tell if an attachment is speaking...

Eloise Pasteur
In reply to this post by Corvan Nansen
Try if(llGetOwnerKey(id)==id) instead of the llGetAgentSize - it might be faster.

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.


On 19 Dec 2011, at 23:04, Corvan Nansen wrote:

> I honestly thought I had is sussed, until a HUD came along and defeated my simple method.
>
> 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

http://educationaldesigns.eloisepasteur.net/
http://eloisepasteur.net/blog/




_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
Reply | Threaded
Open this post in threaded view
|

Re: [slscripters] Looking to find a reliable way to tell if an attachment is speaking...

Corvan Nansen
Hmm, hadn't thought of GetOwnerKey, thanks!

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

On Dec 19, 2011, at 4:19 PM, Eloise Pasteur wrote:

> Try if(llGetOwnerKey(id)==id) instead of the llGetAgentSize - it might be faster.
>
> 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.
>
>
> On 19 Dec 2011, at 23:04, Corvan Nansen wrote:
>
>> I honestly thought I had is sussed, until a HUD came along and defeated my simple method.
>>
>> 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
>
> http://educationaldesigns.eloisepasteur.net/
> http://eloisepasteur.net/blog/
>
>
>
>

_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
Reply | Threaded
Open this post in threaded view
|

Re: [slscripters] Looking to find a reliable way to tell if an attachment is speaking...

Harold Brown
On Mon, Dec 19, 2011 at 9:59 PM, Corvan Nansen <[hidden email]> wrote:

> Hmm, hadn't thought of GetOwnerKey, thanks!
>
> 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
>
> On Dec 19, 2011, at 4:19 PM, Eloise Pasteur wrote:
>
>> Try if(llGetOwnerKey(id)==id) instead of the llGetAgentSize - it might be faster.
>>
>> 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.
>>
>>
>> On 19 Dec 2011, at 23:04, Corvan Nansen wrote:
>>
>>> I honestly thought I had is sussed, until a HUD came along and defeated my simple method.
>>>
>>> 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.

llGetObjectPrimCount returns zero for attachments -
http://wiki.secondlife.com/wiki/LlGetObjectPrimCount
_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters
Reply | Threaded
Open this post in threaded view
|

Re: [slscripters] Looking to find a reliable way to tell if an attachment is speaking...

Corvan Nansen
On Dec 20, 2011, at 12:49 AM, Harold Brown wrote:

> On Mon, Dec 19, 2011 at 9:59 PM, Corvan Nansen <[hidden email]> wrote:
>> Hmm, hadn't thought of GetOwnerKey, thanks!
>>
>> 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
>>
>> On Dec 19, 2011, at 4:19 PM, Eloise Pasteur wrote:
>>
>>> Try if(llGetOwnerKey(id)==id) instead of the llGetAgentSize - it might be faster.
>>>
>>> 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.
>>>
>>>
>>> On 19 Dec 2011, at 23:04, Corvan Nansen wrote:
>>>
>>>> I honestly thought I had is sussed, until a HUD came along and defeated my simple method.
>>>>
>>>> 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.
>
> llGetObjectPrimCount returns zero for attachments -
> http://wiki.secondlife.com/wiki/LlGetObjectPrimCount

Perfect! Thanks very very much!

Cheers,
Corvan
_______________________________________________
Click here to unsubscribe or manage your list subscription:
https://lists.secondlife.com/cgi-bin/mailman/listinfo/secondlifescripters