For the upcoming challenge, you will need to program some objects to fall from the top of the screen to the bottom while the program runs as shown below.
The above code is what’s used to make the object fall. It detects if the sprite has reached the bottom with the If touching edge block and sensor and when it reaches the bottom it will move back to the top of the screen and randomly choose how far across the screen it is.
The falling is done by using a change y block.
Have a go running this code and try to change various things such as:
https://scratch.mit.edu/projects/349006217/editor/
- The speed the apple falls
- Add more falling sprites
- Make the sprites go the opposite direction
- Add a variable to count how many times the sprites touch the bottom of the screen