Can I animated with code?

Started by RustingStudios, September 19, 2022, 09:00:42 PM

Previous topic - Next topic

RustingStudios

Working on the heavy attack for The Tzar at the moment. However what I simply want is a fluid sprite animation of the knight showing up behind the king swinging his dumb sword then moving back to then disapear.


I want it to look like a shitty flash animation on a rail but when I tried doing that (on clip studio by the way) I was thirty frames in and all I got was this



Feeling like I am putting too much work into something thinking there has to be a simpler way is there a way to animate this guy moving forward from behind the king then moving back behind the king in a flash animation esk way using Mugen/FighterFactory code?




Odb718

So you could do this all in Mugen. Get the few images that make up the swinging of the sword and make that an anim.
Then in the state you want this to happen, you should make a helper.
In that new, helper's, statedef use the anim you made. Set the Vel in the header part of the statedef. Then make an additional VelSet going the opposite direction after the amount of tics you want.

If you want to have the anim move left and slowdown and then start to move right, you can use VelAdd instead of VelSet. You'd set the value of the add a lot smaller. As the tics go by it'll move faster and faster.

Then you have 2 options for the attack part. I would suggest making the hitdef in the helper's state. But for comboing simplicity, you could have the main anim of the king standing there, and the hitboxes are in the king's animation. The hitdef would be in the root state you called the helper from.
vVv Gouken718 vVv SabreTooth718 vVv