Step 1: Get the Coin!

Our chicken really wants that shiny coin.

The chicken is just like an actor in a movie. To tell the chicken how to move to the coin we will give it a script to read! This script will have all the instructions the chicken needs.

> Right-click on the Crossy Road chicken and select Edit Script.

The chicken needs to know when to run our instructions. At the the start of the level would be good.

> Click on Scratch Blocks, and drag the "When the level starts" block out into the empty work space.

Now we need some blocks to tell the chicken to move. Let's broadcast a message to the game to tell the chicken to move up.

> Click on Scratch Blocks and drag the "broadcast message" block inside "When the level starts".

> Click on the blue text box, delete "message" and type in "up".

> Click Play, enter a name for your script and then click Done.

> Your game will automatically open. Select Level 1 to see your code in action.

Once the chicken has the coin, you can continue to the next step. Otherwise, have a look back over your script and make sure it matches the instructions.

results matching ""

    No results matching ""