04 December 2006

Sitting revisited.

There's two kinds of sitting. Sitting with a sit-target defined (via script) and plain old "click here" sitting. A casual user can't tell the difference. Both kinds will protect you from those annoying public sandbox griefer attacks.

You can't tell by looking in the editor. You could tell if you sat on it, got up, flipped it upside down, and sat on it again. If you're upside down the second time, it has a sit target.

LSL lets me detect someone sitting on my prim if I've previously defined a sit target for it. If I haven't defined one and they sit on it, I don't get a change event triggered, and llAvatarOnSitTarget() returns a NULL_KEY.

If you need to know if someone is sitting on your object, you must have a sit target defined.

I need to try llGetNumberOfPrims() and see if the two kinds of sitting give different results. Since I'm not getting a CHANGED_LINK message when doing untargetted sitting, I don't expect they're actually linking.


Early SitTarget article.

No comments: