Step 2: Adding a Sequence of Moves

Now that you have solved level 1, we can move on to level 2.

Note - if you are still in the script editor, click the X button in the top right corner to return to the level editor. This will automatically save your code.

> Click on Level 2 in the levels tab to switch to the next level.

Our chicken need to be able to do more than just go 'straight ahead'. Let's add some directions to our script.

> Right-click on the chicken in level 2 and select Edit Script.

> Open Events and drag "When the level starts" into the work space.

We can broadcast more messages to tell the chicken to move left, right, up, and down. How many movements does the chicken need to get to the coin in level 2?

> Open Events and drag "broadcast message" into "When the level starts". You will need a broadcast block for each movement, so drag in as many as you think you'll need.

The chicken will follow your instructions step by step starting from the top block and going down to the bottom block.

> Tell the chicken to move in different directions by typing them in the blue text box on that "broadcast" block. You can type "up", "down", "left", and "right".

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

If the chicken gets to the coin, continue to the next step.

Otherwise, have a look back over your script and make sure you are using the correct blocks. Also make sure you use correct spelling and don't use capital letters.

results matching ""

    No results matching ""