PJMail Posted October 4, 2023 Share Posted October 4, 2023 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 More sharing options...
hereami Posted October 4, 2023 Share Posted October 4, 2023 Possibly, bAnimationDriven could fit if tested in loops. There's also a curious Condition IsLastIdlePlayed, but not sure about exact use. Link to comment Share on other sites More sharing options...
DlinnyLag Posted October 4, 2023 Share Posted October 4, 2023 (edited) 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 October 4, 2023 by DlinnyLag Link to comment Share on other sites More sharing options...
PJMail Posted October 4, 2023 Author Share Posted October 4, 2023 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 More sharing options...
PJMail Posted October 4, 2023 Author Share Posted October 4, 2023 Possibly, bAnimationDriven could fit if tested in loops. There's also a curious Condition IsLastIdlePlayed, but not sure about exact use.I will give it a go - thanks! Link to comment Share on other sites More sharing options...
South8028 Posted October 4, 2023 Share Posted October 4, 2023 Wouldn't it make more sense to just make the animation without the shuffling? Is this one hkx file, or many? What should an actor do? Link to comment Share on other sites More sharing options...
LarannKiar Posted October 5, 2023 Share Posted October 5, 2023 (edited) 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 October 5, 2023 by LarannKiar Link to comment Share on other sites More sharing options...
PJMail Posted October 5, 2023 Author Share Posted October 5, 2023 Thanks LarannKiar - it was the animation variables I was hoping someone would know the correct one to use for any animation. Somehow I missed the isIdlePlaying() - that looks hopeful. Link to comment Share on other sites More sharing options...
PJMail Posted October 5, 2023 Author Share Posted October 5, 2023 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 More sharing options...
South8028 Posted October 5, 2023 Share Posted October 5, 2023 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 More sharing options...
Recommended Posts