Project 210: Maze Game

3. Make your main character move up

Get your main character to move up when you press the up arrow key on the keyboard.
Starting point file for this challenge

Your goal

Steps

1. Add a "when green flag clicked" block to your main character

This can be found in the yellow "events" blocks. 

2. Add a "change y by 10" block

This will make your character move 10 units on the Y axis. This block is found in the dark blue "motion" blocks. 

3. Add an if-statement block

You only want the main character to move up if you press the up arrow key. To help write the sentence, "If I press the up arrow key, then my character moves up" grab the "if-statement" block from inside the orange "control" blocks. 

4. Add a "up-arrow pressed" condition

If-statements only work if they have a condition that tells them when to run. When do you want your character to move up? Only if the player presses the up arrow key! This block can be found in the light blue "sensing" section. 

5. Make your code repeat with a "forever" loop

Right now, this code is only checking if you're pressing the up-arrow at the start of the game. But you want to check if the player is pressing the up-arrow key for the whole game! This block is found in the orange "control" section. 

6. Test out different speeds

Try changing how fast your character moves up. Is 10 too big or small a number?