To make your project more like
the signal episode, use code to move your
characters around the scene.
In this video, you will use move blocks
to add drama to the story.
To start, select the sprite to move.
Blocks that move sprites are in the motion menu.
Select the motion menu.
To try a block, click it.
(upbeat music)
(upbeat music)
Some blocks have values that determine
how and where the sprite moves.
For example move 10 steps moves the sprite a short distance.
Move 100 steps moves the sprite a longer distance.
Blocks with x and y values move the sprite to a specific
location on the stage.
To find the value for a location, move your sprite to it.
The values below the stage
are the coordinates for that location.
To make a sprite move to that location
enter those values in a move block.
This example uses a glide block, but you can use any
move block you'd like.
Enter the values then click the block to try it out.
The sprite moves to a new location.
To add the block to your program, drag it out.
Run it again to test.
Oh no! The sprite doesn't move.
The glide block moves a sprite to a specific location.
You also need to tell the sprite where to start.
To do this, use a go to block.
Move the sprite to where you would like it to start.
The values in the go to block automatically update
with the sprite's position.
Attach the go to block to the glide block in your program.
Click the stack to run it.
Great!
Add as many movements as you'd like to your character.
Try it out!
(upbeat music)
If you use a turn block in your program
and you want to return your sprite to its original direction
click the point in direction block.
Add it to the top of your program.
To make your characters movements and speech match
program your sprite to wait before moving.
Drag out a wait block from the control menu
and place it after the go to block.
To test this block stack in your program
click the green flag, then the block stack.
Your characters' movements and speech may not match,
but that's okay.
Tinker with the value in the wait block
until the sprite's movement works with your story.
Try it out.
In this example, the sprite waits six seconds before
moving to a new location.
(upbeat music)
To sequence your characters' movements with the conversation
add a when flag clicked block from the events menu
to the top of your stack.
Try it out.
(upbeat music)
Nice job!
To add more movements to any character
select the sprite and drag out blocks from the motion menu.
(upbeat music)
(upbeat music)
Now it's your turn!
Add move blocks for your character.
Set a starting position for the character
using a go to block.
Add wait blocks to sequence your story.
And finally, add a when flag clicked block
to start your code.