Step 2

Duplicate movement for all 4 directions

Let's add movement in all 4 directions. Click Edit to return to the script editor. We'll keep working on the script we've built.

Make 3 more copies of the "When right arrow pressed" block by right-clicking on the block, and selecting Duplicate. Change the duplicates to left arrow, up arrow, and down arrow.

In the left arrow block, set the x velocity to -200. In the up arrow block, change the x velocity to y velocity, and change the number to -200. In the down arrow block, change the x velocity to y velocity, and the number to 200.

Now test the game out again, and use all the arrow keys to move around

results matching ""

    No results matching ""