In this video, you will program your sprite to talk while its mouth is moving.
To make the sprite say something, use the “say” block.
The say block has two sections: the words the sprite says, and how long it says them.
In this example, the sprite says “We both look very bored” for 2 seconds, but youcan make your sprite say anything for however long you want. Tinker with the time and thewording until you are happy with what’s happening in your project!
To run this code, you have to click each block stack. This looks kind of weird. To run twostacks of blocks at once, you can use the same event to start both.
Go to the “events” menu, and drag a “when this sprite is clicked” block onto bothblock stacks. Test it by clicking on the sprite.
The mouth should move, and the sprite should talk.
You are using a computer science concept called Parellelism. Parallelism is when you run twoblocks of code simultaneously. In this case, the sprite both talks and changes costumeat the same time. Now that you have your two block stacks, addmore say blocks to your code. Also, program the other sprites to talk as well. Click onthe new sprite. Add a “when sprite clicked” block and at least two say blocks.
Have fun customizing your project by having the sprites interact with the user and the other sprites.
When you finish, go to the project page and add instructions about how to interact with your project.
Now, it’s your turn:1. Drag out a “say” block. Give the sprite something to say. Tinker with the time.
2. Add a “when this sprite is clicked” block at the beginning of the code for themouth animation and the “say” block.
3. Program the other sprites to talk using at least 2 say blocks.