Jump to content

"sit" considered harmful


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

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

Recommended Posts

Riddle: Why can't I stop sitting?

When scripts do llStopAnimation("sit") -- almost a universal in poseballs and systems like nPose, they're really trying to stop the built-inanimation called "sit"... but if there's an animation in the scripted object's contents with that same name, it will try to stop that one instead, which doesn't do anything, and the priority 4 built-in "sit" will continue to play. That built-in sit, of course, has the avatar knees-up and in default orientation, and won't be overridden by lower-priority anims played on top.

It took me hours of debugging to figure out what was going on -- I didn't realize the object I was re-scripting even contained an animation called "sit", so I was instead testing all sorts of crazy theories of what was going wrong.

Thing is, I'm not sure how to help others avoid wasting time with the same mistake.  Right now, I'm thinking it's most likely to arise in applications using multi-sit scripts without poseballs -- so I'll mention it to the nPose folks, at least. Not sure if I should add a note to llStopAnimation() on the wiki. Thought it was something animators should know about, if they don't already, hence this post.

 

Link to post
Share on other sites

A possible way out is to use a function like this one

 

StopAnims(){    list anims = llGetAnimationList(llAvatarOnSitTarget());    integer i = (anims !=[]);    while (i)    {        llStopAnimation(llList2Key(anims, --i);    }}

 It won't touch an animation that keeps being re-triggered by your AO, but it cleans out most background anims that you may have been unaware of.

 

Link to post
Share on other sites

Yup, that's what I'd gotten working before I even realized there was a "sit" animation, and I think it's a good practice for posng scripts, although rarely done. In this case, however, I was hacking others' widely distributed source, so was happy to revert my changes and remove the animation.

Thanks.

Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 3222 days.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...