Talk:LlAvatarOnLinkSitTarget
Paramter for unlinked prim
The specification for an unlinked prim has changed at some point
- llAvatarOnLinkSitTarget( LINK_THIS)
- llAvatarOnLinkSitTarget( LINK_ROOT)
- llAvatarOnLinkSitTarget( 1)
All return the correct key of the sitting agent
- llAvatarOnLinkSitTarget( 0)
returns the NULL_KEY always. Dora Gustafson 15:10, 3 November 2013 (PST)
The described behavior can be explained by the fact that the prim number in the root prim changes from 0 to 1 the moment someone sits on it
When someone sits, the root prim is no longer alone but linked to the agent and becomes prim number one
This behavior should be pointed out in the article
Unfortunately I am almost certain I am not able to edit the article within it's framework. Dora Gustafson 03:51, 4 November 2013 (PST)
- I think the text in Link Numbers makes it pretty clear but I can see where your misunderstanding is coming from, the description for link isn't appropriate for this context or entirely correct. I'll do some template diving, which should help alleviate things. -- Strife (talk|contribs) 21:37, 4 November 2013 (PST)
- How are things now? Most of the text is coming from Template:LSL_Function/link btw. -- Strife (talk|contribs) 22:36, 4 November 2013 (PST)
Things look good to me now. I like the (injection?) cursor over explanation you have added. There is one thing though: The root prim can still be link number zero, even with this function. You said it loud and clear in: Link Numbers and I can't do it better. It is a complex matter where one parameter changes conditions for another. Pitfalls are inevitable. Dora Gustafson 04:40, 5 November 2013 (PST)
- The template is Template:HoverText, you will find many constants have a similar hover explanation on them (via Template:HoverLink). I do worry that people don't go looking at the HoverText, there is a lot of good stuff in there. I took your point about llAvatarOnLinkSitTarget( 0) being useless and confusing as a good reason to not include "unlinked". My thought was that the "unlinked" description was a big part of what lead us here. Just as LINK_SET isn't included in the LINK_* tables, 0 shouldn't be included for much the same reason: it doesn't work. I'm glad you brought this up. -- Strife (talk|contribs) 22:08, 5 November 2013 (PST)
How I got trapped by this
I was testing a script for a link set and wanted to make sure it worked in an un-linked prim too. It did not because of this matter. Normally I would use llAvatarOnSitTarget() in a script for a single prim. For the general script I ended up making an exception where I use llAvatarOnSitTarget() when the link set has only one prim.Dora Gustafson 04:55, 5 November 2013 (PST)