I'm blocked with this, i want to get up my player stenght jump when is on the object and animate the objet 1.
Thanks in advance!
Develop games in your browser. Powerful, performant & highly capable.
Test for an "On Collision" with the object while at the same time you are moving in a downward direction. This will satisfactorily ensure that you have jumped on the object. However, it won't work if the object is very tall because then you could satisfy both those conditions (collision and moving downwards) by falling against the side. But if the object is very short, it's unlikely
I would then cause the object to animate how you want by using animation frames.
The difficult part will be to make the player move down just a bit and spring back up to coinincide with the animation of the object. You'll have to take into account the speed of the player as well.
So right after the moment of impact, I would disable the jumping ability of the character and have the game control his Y movement to make him dip down a bit and up a bit just like someone who is jumping on a spring will sink down a bit and then up a bit while in contact with the spring. You will have to play with a bit so that he dips down a bit and springs up a bit and it looks like he is in contact with the object for a short period of time.
Once you get that looking good, just increase his jump strength temporarily until that jump is complete, then return his jump strength back to normal. This is assuming you are using the "platform" behavior.