Here is what I want to do:
when player jumps I would like to play an animation of jumping once
on playing it I would like to stop at the penultimate animation frame till the player falls to the ground
on falling to the ground I would like to play the last frame of the animation
Here is a screenshot which I hope will make my objective clearer:
Here is an idea I have right now:
I will add an event to occur exactly between penultimate and last animation frames, this even will stop animation.
When grounding I will add an event which will continue my animation to play till the end.
At the end I will use a flag to say all other animations that they are free to play.
Here is stuff which I think is a flaw:
using of flags will make any code messier in general
there will be problems if a user jumps once and try to run, jump again or do something that needs an animation right away after grounding because the last frame will be playing at that time
I do not know how to stop animation, since according to this stopping an animation also Rewinds it to the Start, while I do not want to rewind it to start, but stop before the last animation frame.