GM Tips - Gravity and Platform Games
General Notes:
- You want gravity turned on when there is nothing below you.
- You want gravity turned off when there is something below you.
- Do not forget to use a Collision event to stop your vertical speed when you hit your ground.
- Look through the screenshots first as it should be all you need for the basics. If you want to add ladders, etc. There is also a Gravity and Platform Games Google presentation created by past students that might help. The ladders comes later in the presentation.
Part 1: Gravity
In the STEP event:



ELSE…

Part 2: Jumping
In your Up Arrow event:

In the IF statement below, the y = 5 (relative) says that there is a solid object below you so it will allow you to jump.
