In this fun project you create a game where you shoot a canon at an egg, but the twist is that you must bounce your shoot a certain number of times. So you need to get your angles right!
We've created a starter project that has the sprites already added. Open this starter project by clicking on the following link and then click 'Remix' to create a copy of this project in your Scratch account (you must be signed in).
Click on the canon sprite so that we can add some code to it. We're going to program the canon to point wherever our mouse is. Add the following code to the canon:
Click on the egg sprite to give it some code. We're going to create two new messages called 'new position' and 'hit'. We'll then give the egg instructions on what to do when it receives either of these messages.
Add the following code to the egg:
The Hit sprite is some text that reads "Hit!!!", we're going to program this to display when you hit the egg and otherwise hide.
Add the following code to the Hit sprite:
The Fail sprite is some text that reads "Fail!!!", we're going to program this in a similar way to the Hit sprite.
Add the following code to the Fail sprite: