Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / How to do a Jumping Animation

Years of Service
User Offline
Joined: 21st Jul 2015
Posted: 23rd Oct 2016 00:23
Hello how do I do a jumping animation?
I am aware of using the AKG 2D Physics, but I do not want to use it for this.

I have an animation for Idle (10 Images) and an animation for jumping (10 Images). If I use the following code, my sprite will rise higher with each jump. How do I avoid this?

I probably already know the problem with this code. I guess Mark.CurrentY = Mark.CurrentY - 10 is not done as much as Mark.CurrentY = Mark.CurrentY + 10 is done. But I have no clue what to do about it
User Banned
Posted: 12th Nov 2016 14:35
reset the "Mark.CurrentY=0"

into the IF condition where the sprite is on Frame 20

Where the Jump=0 and the Play of the Idle animation

Also noticed the in the 4th IF condition where its checking the jumping animation going down that you are checking for frame


but then immediately checking =20 in the 5th IF condition

Try changing the <=20 to <=19

Like this

Using Tier 1 AppGameKit V2
Started coding with AMOS

Login to post a reply

Server time is: 2018-03-24 00:14:44
Your offset time is: 2018-03-24 00:14:44