Jump to content
You are about to reply to a thread that has been inactive for 864 days.

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

Recommended Posts

Posted (edited)

I seem to have run into a small problem.

I have an object that has animations for the left hand (keyframed L bones) and an identical object with the same mirrored animation for right hand.

I'm using this snippet from llStartAnimation wiki

 

    attach(key id)

    {

        if (id)

        { // If it was just attached, request permission to animate.

            llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);

        }

        else

        { // It's being detached...

            if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION)

            { // If we have permission to animate, stop the animation.

                llStopAnimation(animation_name);

            }

        }

    }

I'm stopping animations on detach in the else flow control (where // it's being detached).

 

The problem is if I detach the right hand object the animations in left hand stop and vice versa.

I made sure multiple times that neither animation contains keyframes from the opposite hand. I keyframed only the bones I need and exporting as .anim.

I've noticed that just opening an animation in my inventory (not hitting play ) stops the animations from playing and get stuck.

Is stopping the animations on detach the correct way to script and object or can I just delete the lines? 

Im curious as to why detaching one side object stops animation in the other hand, if the animation doesn't contain keyframes from the other hand.

Im using priority 5 animation because I want the animation to play over AO but got the same result with priority 6.

I wasn't sure whether to post this in here or scripting forum. What is the reason the animation stop by just opening the animation window from the inventory?

 

 

Edited by arisaie
Posted

It is good practice to stop animations when an avatar stands up from or detaches an object. You have very little time in the attach event when it's a null key but what you've posted looks close enough to what I would do. (How many different viewers have you tried this won?)

I would test this with one animation at a time, attaching and detaching it, and using llGetAnimationList(avatar) watch what happens prior to attach, on attach, and on detach. When happy with each individual attachment and the animation, try two and see what happens.

I can't reproduce what you've said about opening an animation from inventory and the effect on currently playing animations, but I was only able to test with P4 or lower priorities.

 

  • Like 1
Posted
On 7/25/2022 at 6:53 AM, arisaie said:

I seem to have run into a small problem.

I have an object that has animations for the left hand (keyframed L bones) and an identical object with the same mirrored animation for right hand.

I'm using this snippet from llStartAnimation wiki

 

    attach(key id)

    {

        if (id)

        { // If it was just attached, request permission to animate.

            llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);

        }

        else

        { // It's being detached...

            if (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION)

            { // If we have permission to animate, stop the animation.

                llStopAnimation(animation_name);

            }

        }

    }

I'm stopping animations on detach in the else flow control (where // it's being detached).

 

The problem is if I detach the right hand object the animations in left hand stop and vice versa.

I made sure multiple times that neither animation contains keyframes from the opposite hand. I keyframed only the bones I need and exporting as .anim.

I've noticed that just opening an animation in my inventory (not hitting play ) stops the animations from playing and get stuck.

Is stopping the animations on detach the correct way to script and object or can I just delete the lines? 

Im curious as to why detaching one side object stops animation in the other hand, if the animation doesn't contain keyframes from the other hand.

Im using priority 5 animation because I want the animation to play over AO but got the same result with priority 6.

I wasn't sure whether to post this in here or scripting forum. What is the reason the animation stop by just opening the animation window from the inventory?

 

 

Make sure you're not getting bit by this bug.

The last comment explains what is going on.

  • Thanks 3
Posted
16 hours ago, Lucia Nightfire said:

Make sure you're not getting bit by this bug.

The last comment explains what is going on.

Wow..so after I tried the script you provided and reattached my attachment I got this:

Left Hand got 1 attachment at risk - listed as the correct attachment. This is what I saw when I made this thread (only I swapped the hands in the title x.x) When I detach this L hand object it keeps on playing R animation.

Right hand tells me theres 11! attachments at risk. Including my hair, body, head (which should not matter as rigged objects dont play animations, unless its animesh..i guess?)and also the L hand attachment.

I am having a hard time understanding how to determine which key is lower. Is there any way to circumvene this? Do I just copy paste objects and wish for a different key? 

But then theres a chance the other object will get a lower key.

Since the bug seems to be from 2018, I think I will just have to live with it.

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...