I just started to implement separated animations for my characters and their weapons, and I’m struggling to synchronize them with precision, even though they have the same number of frames and animation speed.
Just run this code with the debugger, and when an attack is about to be finished, pause and advance step by step.
You’ll notice that the weapon will get into idle animation one frame before the knight, even though the sword is dependent on the knight attack animation to be finished to launch its idle animation.
If I move the action in event 4 to event 2, launching the 2 animations in the same event, the problem is STILL there!
The only workaround I found for that is to put a wait 0 action at the beginning of event 4, but I’m guessing this is not the proper way to do that kind of things.
Even weirder is that, even when I put the wait 0 action at the beginning of event 4, the idle animations are not synchronized. The sword is 1 tick earlier. And if I don’t put the wait 0 action at the beginning of event 4, then the sword animation is a huge 2 tick earlier than the knight!
Am I missing something here?
Is there a much more consistent way to do that kind of animation synchronization that I am not aware of?
Thanks for your help!