Step 3: Gravity
In the previous tutorial, we ran the "Gravity" loop 4 times. This meant for every frame the object was not overlapping an obstacle, it would fall 4 pixels. This time, the loop is run 200 times and because the frame is only 200 pixels high, it means the Wallaby will instantly appear at ground level after the loop.- Always
: Start loop "Gravity" 200 times
- On loop "Gravity"
is overlapping a backdrop
: Set Y position to Y( "
" )+1
- On loop "Gravity"
is overlapping a backdrop
: Set Y position to Y( "
" )-1

Note: running the loop 200 times is extremely excessive and is only to illustrate how to "glue" an object to the ground at creation. To seamlessly move an object across sloped surfaces, you only need to run the loop as many times as the largest distance between pixels vertically in the ground image. In our case, 3 pixels.
6