Cancelling animations from a script ?

Post » Wed Jun 20, 2012 7:13 pm

I'm using EnableAI(false) in some scripts to simulate a paralysis in place effect.

But I noticed that when the target has some animation going on and I disable their AI, that animation gets stuck, sometimes in a very weird way. For example, disabling the AI just when someone is casting Frostbite gets the ray of frost animation going and going while the target is paralyzed, which is pretty bad.

I solved this by applying a small stagger animation just before executing EnableAI(false), this way the target stops doing any old animation and start staggering just before getting disabled. This works pretty nice, with one exception: After executing EnableAI(true) to restore the AI, the target keeps staggering a little bit. And I wish I could completely remove this delayed stagger effect, making the target come back naturally from the paralysis.

So, my question is: Can I stop the stagger animation from the script to avoid it keep going after re-enabling the AI?
Or even better: Is there any way (other than a stagger effect) to stop everything the target is doing just before executing EnableAI(false)?
User avatar
trisha punch
 
Posts: 3410
Joined: Thu Jul 13, 2006 5:38 am

Return to V - Skyrim