Jump to content

Does anyone know why animations stop when an actor equip/unequips items?


Recommended Posts

Posted (edited)

I'm writing my own script and notice whenever an actor is playing an animation (eg. stagger), if you equip or unequip any items on the actor, the animation immediately ends.

 

Eg. if I try to unequip an item on an actor in the onAnimationEvent callback, the animation plays briefly for a split second and then the actor unequips the item and the animation stops, and the actor is free to move again without having completed the usual stagger animation.

 

Does anyone know how to fix this?

Edited by Relevant Halo
g
  • Relevant Halo changed the title to Does anyone know why animations stop when an actor equip/unequips items?
Posted
Quote

Does anyone know why animations stop when an actor equip/unequips items?

 

My first guess would be that it might have something to do with the ninode update that gets pushed out when an item is equipped.

 

1 hour ago, Relevant Halo said:

Does anyone know how to fix this?

 

I don't think I've even seen this issue before. Then again, not sure I've ever attempted to equip anything like this.

 

Here's a silly idea, don't equip the armor in the OnAnimationEvent event. Instead, do a RegisterForSingleUpdate with 0 delay, and do it in OnUpdate instead, See if it changes how this behaves any.

Posted
15 hours ago, traison said:

 

My first guess would be that it might have something to do with the ninode update that gets pushed out when an item is equipped.

 

 

I don't think I've even seen this issue before. Then again, not sure I've ever attempted to equip anything like this.

 

Here's a silly idea, don't equip the armor in the OnAnimationEvent event. Instead, do a RegisterForSingleUpdate with 0 delay, and do it in OnUpdate instead, See if it changes how this behaves any.

Thanks for the tip.

 

I've tried attaching it to other events like onDeath, but it always seems to happen.

 

I've also tried swapping outfits which triggers item changes (although I'm not sure if it uses the same mechanism under the hood), and still see the same results.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...