Step 5: Multiple moving hazards!

> Open Level 5 in the levels tab.

Now there are multiple vehicles for our chicken to avoid while trying to get the coin.

Think about the path the chicken needs to take to get to the coin.

> Right-click on the chicken in Level 5 to Edit its Script.

>Start with "When the level starts" (from Events).

>Then drag in a "broadcast message" block (also from Events). Click on "message" and type in "up".

After that you'll need more broadcast blocks to get the chicken to move more. Here's a picture showing the movements the chicken will need to follow, and the first few blocks to achieve that:

Add more broadcast blocks to finish the sequence and to get the chicken to the coin.

> When you are ready to test your code, click Play and select Level 5 from the game menu.

If you can get the chicken to the coin, continue to the next step. Otherwise, have a look back over your script and see if you can spot the bugs.

results matching ""

    No results matching ""