Relevant Halo Posted January 15, 2025 Posted January 15, 2025 (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 January 15, 2025 by Relevant Halo g
traison Posted January 15, 2025 Posted January 15, 2025 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.
Relevant Halo Posted January 16, 2025 Author Posted January 16, 2025 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now