Again. How can I implement a complex 2D animation?

Again, it’s me. I still have a some problem on how to create a complex 2d animation by using blueprints(BP).
OK, First I will show the problem during my practice.
Problem:how can I use BP to make a complex animation.Such as following pics show:

264810-asm.png

And the following is what I used to implement it:
I define a function named “Animation State Machine” and use Tick to call it.

These is “Animation State Machine” I define in my characterBP:

I will have a clear explain about it. local Var to store the some boolean var, and use some logic conditions to decide which flipbook as the current clip.(I just followed the youtube videos to do it )

The problem is :
I dont know how to design the logic by using BP. the above pics I used is not work well.
I mean for instance I used velocity’s z value to check if the character is up/rising (z > 0) down/falling (z < 0).
the logic path is : check the velocity’s z ,then set boolean “isJumping” then play "start jump"clip, when the current frame = that clip length, turn to play “rising” clips. the following pic show the logic code:

Please correct my design.
and, I also wonder if there is smarter way or some professional way to implement, please tell me.
Thx first.

The way you described it I would say that virtually how the state machines for skeletal mesh animation work. They constantly check a bunch of parameters on tick and transition between animations accordingly.

Just one thing about your logic: checking only Z Velocity is not enough, because your character may move up or down the slope, and it will trigger rise/fall animation in your case. You have to check the “Is Falling” bool as well.

Yeah, you are right. I just show a little, I has check more var about my BP. But, I just want to know if the way I used is correct? I check too many boolean var in my blueprint. But is there any better way or method to implement (maybe some high technology from blueprint or some professional idea from game design). I was mad for my blueprint. >_<

Idk, I think if the Epics use practically the same way of doing that in the UE, so that must be the best mass way of doing that at the moment. I’m sure you can implement it wa-ay better and more efficient via C++ code, but we’re using BPs so that’s how it is.

I just had a thought about events, maybe it would be better to track some parameters using events instead of checking them on tick, if something happens quite rarely. But I’m not sure state machines can bind to events, I’ll check it later. But since you’re using a custom state machine in your Character BP, you can certainly use events.

Like, let’s say. you have a grenade throw animation, but you can throw a grenade once every minute or so, so there’s really no point in tracking the Is Throwing Grenade bool on tick. When the event fires, bool is set to true, and when the respective animation is almost over, back to false.

Yeah, thx again. I hope can have more discuss with you about that. I will try the suggestion that you give to me. And I am excited about that. As I said, I am just a hobbyist but I want to create my own 2d game. I like 2d game, such as dragon’s crown, Metroid, Castlevania and so on. :slight_smile:

That is my e-mail: jkbasara@yahoo.com
Hope can get more ideas from your excellent suggestions. Cool~~~