Flipbook "OnAnimationEnd"

Hello everyone,
Awhile back i suggested that we need a way to know when our flipbook animation has finished playing so we can execute another command when its done.
About a month ago i saw that Mr.Noland has actually made this happen but i can’t seem to find it in my blueprints.
Has his code been ported over to Blueprints and if not could someone please explain to me how can i use it in state that it is currently at?

Thank you.

Hey ,

If you have a reference to Flipbook in your EventGraph, you can pull off of it and search for OnFinishedPlaying. You’ll see some Event Dispatcher options that you can use to detect when Flipbook animation has finished.

Hope that helps!

Thanks for your help but i cant seem to be able to make it work.I must be missing something.I cant seem to find a way to reference which animation is playing at that moment.

Could you please show me how i can achieve this?

I want when flipbook animation finishes to be able to change those 2 booleans.
Before this, i had set it up with a timer but it was just a workaround before i could actually could do it right way,and now that i am able to do it i don’t know how!
:slight_smile:

You don’t need to Bind Event. If you have Flipbook selected in MyBlueprint tab, you can right-click and search for OnFinishedPlaying Event. You want to make sure that your Flipbook is NOT looping, or it will never finish playing.

A simple setup would look like this:

In your case, it might look like this:

Setting a Name variable lets us check in OnFinishedPlaying event to see which Flipbook has ended. This way, if you have multiple places where a Flipbook ends, it will only perform actions you specifically want it to in particular instances.

I hope that makes sense. Let me know if any of that is unclear.

EDIT: Whoops, forgot to set Looping to false in that second image. But I think you get idea =)

1 Like

Thank you for your help,
without you i would have never thought about this!

I am posting a picture below in case some fellow Unreal user needs this in future.

Although this works, it was kind of impossible to figure out without you guys showing us way so i would like to take this opportunity and make a workflow suggestion to as a everyday user of Paper2d.

I believe that we should have a looping TRUE/FALSE tickbox inside flipbook editorso system would automatically know if this is one time only.I believe it would make more sense that way to a newcomer and it would look a bit cleaner.

you ROCK!

It looks like you got OnFinishedPlaying Event already, but yes, you get it by clicking on Flipbook component in MyBlueprints tab. Your character’s Flipbook component is named Sprite; you can get access to that variable if you enable Show Inherited Variables. It should look like this:

16640-onfinishedplayingforsprite.png

You’re probably using many different Sprite Flipbooks (animations) in your game, but only one Flipbook Component in your character BP. So your OnFinishedPlaying(Sprite) event will need to have as many branches as you have Flipbooks.

In example above, you see I have a sequence that does a check for two different Flipbook possibilities. I’m checking value of same Name variable. In this case, you can see Flipbook set that variable when it finishes. There will probably be several instances of a Flipbook finishing, and after each one you want to make sure you set this same variable so same OnFinishedPlaying event will can check it.

reason it might not be working for you is that you’re setting Looping on Begin Play. You should set this immediately before Set Flipbook that will finish.

It looks like you got OnFinishedPlaying Event already, but yes, you get it by clicking on Flipbook component in MyBlueprints tab. Your character’s Flipbook component is named Sprite; you can get access to that variable if you enable Show Inherited Variables. It should look like this:

16640-onfinishedplayingforsprite.png

You’re probably using many different Sprite Flipbooks (animations) in your game, but only one Flipbook Component in your character BP. So your OnFinishedPlaying(Sprite) event will need to have as many branches as you have Flipbooks.

In example above, you see I have a sequence that does a check for two different Flipbook possibilities. I’m checking value of same Name variable. In this case, you can see Flipbook set that variable when it finishes. There will probably be several instances of a Flipbook finishing, and after each one you want to make sure you set this same variable so same OnFinishedPlaying event will can check it.

reason it might not be working for you is that you’re setting Looping on Begin Play. You should set this immediately before Set Flipbook that will finish.

EDIT: Hah, you got it as I was typing this response. I would still consider renaming your Name variable and using same one for each time you use a Flipbook that will finish, but that’s just for simplification purposes. It might also be handy to drop everything after OnFinishedPlaying event into it’s own function, to keep your Event Graph clear, especially once you start using this for multiple checks.

hi what i can do for enable OnFinishedPlaying event, it not do any thing(don’t send execute)

Hi ,

If OnFinishedPlaying event is not firing, then its flipbook is not finishing. You need to make sure flipbook is set to not loop right before you want OnFinishedPlaying event to fire, as shown in image above.

thx for reply, but if all my system work with looping flipbooks(like in epic and others tutors), so for me better find a way to get a current play flipbook name and check it on last frame and then do my stuff, its possible with BP flipbooks?

PS maybe some one see tutorials from start to finish with NOT looping flipbooks something like in examples above, because i see only tutorials with system what epic show in their official tutorials?

PS for now i fixed this with timeline node

and there is not working example(event don’t fire)

Addressed here:

Work solution for me:

A variable “is fire”, changed by other functions