Now the script for the bat. Actually...
bats.
The first portion runs when the program first starts, and:
- Sets the score to zero
- Hides the original bat
- Continually waits a short amount of time, then clones itself
The second portion runs
for each clone.
- It shows the clone at a random position at the top of the stage
- The clone slides down the screen
- If it reaches the bottom, the score goes up and the clone evaporates
Have a close look at this code and be sure you totally understand how it works.