How do I make the player jump?

 

There are a number of steps we have to take.

 

In the Step Event we have to check whether the player is in the air, see screenshot below for order.

 

If a position is collision free

x = 0, y = 1, Objects = Only solid and the Relative box should be ticked.

 

Set the gravity

Direction = 270 (down), gravity = 0.5 (this can be changed to suit your needs).

else

Set the gravity

Direction = 270 (down), gravity = 0 (this stops the character from falling if there's something below him).

 

Jumpscreenshot

 

Now in the jump key (<Up> in the above screenshot), drag 'If there is a collision at a position', make X = 0, Y = 1, Objects = Only solid and tick the Relative box. Now drag 'Set the vertical speed' over and make this -10.

 

A better understanding can be found in the Gravity tutorial.