I am surprised to discover that engine does not have that feature and my current tutorial project could benefit from it. Can you make something similar with lua manipulation(i am new to lua) and messaging system? Messages work fine 50% of the time for simple stuff, but sometimes you want to play chains of animations and have some sort of loops and states. Complicated animations are possible with current messaging system, but code is not going to look good, especially on_message part is going to be really giant and messy. I would like to see on_message part filled with gameplay events and not animation events. Are there any good practices or that feature is in development?
It’s kind of an advanced feature. Are you talking about 3D animation? Spine animation?
Sprite animation and 2d skeleton animation benefit from that feature as much as any 3d models. Actually, such state machines and entangled logic really challenge event based coding philosophy. You will need a lot of if statements and extra variables to handle all the complexity. Also code is going to be too complicated to understand. I am not really good at codding, but I tried to code dialogue system in UE4 with my own state logic and it was really hard and I needed to simplify and completely change my initial idea.
I think there is a lot to win by using coroutines to untangle sequenced and nested callbacks. Being able to do things like this is very useful:
-- play shoot animation and when done switch to idle animation sequence.sprite_play_flipbook("#sprite", "shoot") sequence.sprite_play_flipbook("#sprite", "idle")
This could also be done for spine animations.