Does anyone have any experience creating a second jump animation using 2D sprites? I have found many tutorials about triggering a second jump animation with 3D actions but none that translate this to 2D.
I have a character who can double jump but I can’t change the animation on the second jump, does anyone have any suggestions??
Could we get some screenshots to see how you have your Update Animation and Set Flipbook functions set up?
For instance, you could be using a state machine to determine the state of the character and outputting animation through functions, as opposed to the event graph. If you’re simply using Update Animation and Set Flipbook based solely on an Enum to determine what animation to set to the sprite you’ll need to add a DoubleJump option in the Enum.
Click here for Paper animation documentation if you haven’t looked at it yet. It’s an example of one way to do things, if you did it this way you’ll need to add an Enum entry on your state machine to be a Double Jump and make a new function to set the animation, similar to the jump notated there but checking for double jump instead and referencing another flipbook.
There are many ways to set up a sprite! Once we get those screenshots we can get that figured out for your specific project setup!
Hey @ajgarces_1. In case you are using a state machine to update the animation playing for your character, then it can be as simple as adding a transition from every state of the first jump (you may have 1 or many states of animation for a jump) to a state where you start playing your second jump animation. Then, since you already have a second jump functionality implemented, you can set a boolean, such as bStartSecondJump, in your state machine to true and that should fire the transitions you just created.
I haven’t messed with 2D animations in Unreal, so I’m not sure what the differences are for the setup, this applies if you are using a state machine only.
Here is how the flipbooks are currently set up. Pretty standard as I just recently have gotten the hang of blueprint. Everything works as it should, though I have thought about an Enum, I have little knowledge on how to create one.
If you want to keep going with what you’ve got, would you mind opening up your “Jump” function and giving us a screenshot of that? I have something halfway in mind to achieve the double jump animation change, but we need to know what’s in that function first to give you a full fix. Just post it here and we’ll get back to you ASAP!
So currently, under functions, it only has “construction script”, which when opened is empty and the details panel displays, “graph cannot be edited.” My Jump function has no details panel and cannot be opened.
Instead of trying to steer you a different direction I went with how you already had things built. This will get your Jump Counter integer and overwrite your previous animations in the chain with the DoubleJump flipbook once you insert it. This is really all about prioritization and creating a hierarchy with your setup. Hope that works! Get back with us either way!
THIS IS AWESOME! Thank you so much again for the help. I can apply this to a bunch of other actions as well, this just took my characters to a whole new level!