Jump to content

How to detect an animation (idle) has completed?


PJMail

Recommended Posts

Is there an animation variable I can check to see if the animation I am playing on an actor is complete?

 

I basically do aActor.PlayIdle(aIdle) or aActor.PlayIdleAction(aAction) then do a utility.wait(1.0).

Sometimes the idle hasn't finished after that wait (the idles could be anything) so really need a better 'idle finished' detection method.

 

The idles are poses so don't repeat.

Thanks.

Link to comment
Share on other sites

Is there an animation variable I can check to see if the animation I am playing on an actor is complete?

In general, no.
A .hkx animation may has own set of events. There is no strict standard.
IDLE object has a start event name, so the system is able to start animation playing. But finishing event name may be any... if any! %) It is possible to create .hkx animation without "finishing" event at all.
You can try to change your approach and define duration for each animation somehow in the design time. So you can interrupt idle animation on this duration expiration.
Another option - define event name (in the design time) that represents animation finish for each animation. So you can subscribe to this event
I suppose that many of existing .hkx files has similar events naming convention, that may allow to handle many of them, but not all of them.
Edited by DlinnyLag
Link to comment
Share on other sites

I know I asked this before but I was not able to find a general solution that I wanted so thought I should ask again. New eyes etc.

 

I still believe there must be something game level rather than specific animation/hkx level, as the game needs to generically know when an animation is complete so it can run the next one.

 

Remember I am not creating these so have no control over them, I am just playing them.

Link to comment
Share on other sites

I remember there was a way to get the Idle performed by an Actor from the game code through F4SE but in the vanilla game you can probably use the Condition IsIdlePlaying(). It seems to be a bool function with no additional required parameters.

 

I saw you wrote "Idles can be anything" but you could still take a look the GetAnimationVariableXXXXX functions.. like MyRef.GetAnimationVariableInt("isBlocking") for the "blocking with a weapon" animation and such.

Edited by LarannKiar
Link to comment
Share on other sites

South8028 - they are not my animations, they are 3rd party NPC poses. I have zero knowledge on making animations, but I agree - the shuffling at the end is a bug. If I disable AI at the end it resolves it, so thus this set of questions. A workaround I know, but it is one I can do until/if those animations are fixed.
Link to comment
Share on other sites

South8028 - they are not my animations, they are 3rd party NPC poses. I have zero knowledge on making animations, but I agree - the shuffling at the end is a bug. If I disable AI at the end it resolves it, so thus this set of questions. A workaround I know, but it is one I can do until/if those animations are fixed.

What animation? What should an actor do?
Link to comment
Share on other sites

  • Recently Browsing   0 members

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