movement-lv1

Move your character in 4 directions with the Arrow Keys (or WASD).

Use two blocks to create: The Game Loop. Things that need to happen repeatedly go inside this loop.

Screen Shot 2016-05-31 at 5.35.57 PM

Add Move 3 Steps inside the loop. The character should move forever.

Screen Shot 2016-05-31 at 6.50.28 PM

Use an IF block to make the movement only happen if something is true. Something like the user pressing a key.

Screen Shot 2016-05-31 at 5.40.29 PM

If the right arrow key is pressed, then move.

If the right arrow key is pressed, then move.

Screen Shot 2016-05-31 at 5.44.29 PM

Let’s use all 4 arrow keys. Switch the IF block for the IF / Else block.

Tynker-if-else-to-else-if

Set the character’s direction using point in direction.

Screen Shot 2016-06-06 at 9.05.59 PM

Platformer

Add a walk left block. When this block happens, the actor will walk left.

Screen Shot 2016-06-18 at 7.17.24 PM

When will this block happen?

 

Attach an Event block to the top.

When the left arrow is pressed, now the character will walk left.

Screen Shot 2016-06-18 at 7.21.03 PM

What is the 10 for?

 

 

 

Do the same for the Right arrow key.

When the right arrow key is pressed, walk right.