This program illustrates a programming concept called a "barrier". It also illustrates how to assign a unique identifier to clones so that they can be independently controlled. A barrier is used to delay something from happening until other things have happened. Here's an example from real life. Have you ever had to wait in a line until everyone in your class has joined the line or until a store opened up. The "until ...." part is the barrier. You waited in line UNTIL everyone joined and then went to do something.
1. Run the program 2. Observe that each call has a number 3. Observe that the girl waits for all five balls to fall until she says "I did". The program uses a variable to count the number of balls that have fallen. When this number is 5, the girl says "I did". Try this 4. Change the program so the girl waits for 10 balls before saying "i did". 5. Change the program so the balls all disappear after they have all fallen. You will need to add a new message that is sent by the girl and received by the balls. 6. Change the program so you can move the girl left and right using the arrow keys. Then, have the gift count a ball only if the ball hits her, i.e., the two sprites touch. Then change the program so the girl says "I did" only if she "caught" all 10 balls.