Creating a game - Save the Bird
Such simple is the game. I have used most of the Sprites from the sprites library. I have downloaded an image of a green colored dustbin and used it in the program as this image was not available in the sprites library.
I have created two new sprites which are quite simple. One is the bird droppings, another is a horizontal line for the ground.
Below you can see the coding done for this game. You can also play the game on the project's homepage on MIT's scratch website on this link.
Sprites used in this game
I have added the following code in the backdrop.This code will switch the initial backdrop when the game starts.
Code in the droppings sprite
The clones of the droppings are visible. They will appear below the parrot sprite. Turn 0 to 180 degrees random is chosen to make the droppings to appear at different angles than each other. A sound pop2 is made when the dropping appears. The dropping will start moving downwards in the negative Y axis until it touches the Ground sprite or the Dustbin sprite. If the dropping touches the Ground then a message is broadcast. I have named it "hit". After that the dropping sprite is hidden.
Code in the parrot sprite
When the Lightening sprite touches the bird, it broadcasts a message "Bird Hit". When the parrot sprite receives this message then it will make a sound and then change its costume, and the backdrop is changed and the script stops.