Object jump

Hi guys.

I’m working on a game.

I got the ball to jump when I touch the screen.

I can’t figure out how to make the ball jump only once? 
Now I can touch the screen, and the ball keeps on jumping.

I want it so the player only can make the ball jump when the ball is on the ground.
and jump only once.

How would I approach this ?

Thanks guys!

There are a few ways you can do this.

On the same listener you have to make the ball jump also attached a boolean(true or false) that checks to see if can jump.

This tutorial is probably a good place for you to start.

http://coronalabs.com/blog/2013/02/19/more-physics-tricks-explained/

[/lua]

Second way, use collision listenters in the same fashion. I used these methodes in my first game over a year ago.

[media]https://www.youtube.com/watch?v=PndM8d85iB0[/media]

There are a few ways you can do this.

On the same listener you have to make the ball jump also attached a boolean(true or false) that checks to see if can jump.

This tutorial is probably a good place for you to start.

http://coronalabs.com/blog/2013/02/19/more-physics-tricks-explained/

[/lua]

Second way, use collision listenters in the same fashion. I used these methodes in my first game over a year ago.

[media]https://www.youtube.com/watch?v=PndM8d85iB0[/media]