All instances in GameMaker: Studio have certain "built
in" properties that you can use and set to govern how they look and
behave. Gravity is one of those properties and, when set,
will apply a constant force in the gravity direction of the
instance, influencing its speed.
Note that gravity is a cumulative force and will accelerate the
object if you choose not to cap the final speed.
if !place_meeting(x, y + 1, obj_Ground)
gravity = 0.01;
gravity = 0;
The above code will only apply gravity if the instance does not find any instances of "obj_Ground" beneath it.