In my recent posts, I introduced a #WAOTL series where you and your students experience computer science by using Scratch to create and code an interactive experience with bioluminescent characters from the children's book "Whose Afraid of the Light" by Anna McGregor.
Here are the posts in the series so far
Today's post will introduce Challenge 5 where we will learn to add dialogue to our interactive experience.
By completing this challenge you will create confidence with code using the following blocks of code:
Let's add some dialogue to our experience. We can make the dialogue displayed in text form whenever you click on the character.
Select one of the character sprites in your project, then drag out the "When this sprite is clicked block."
Next, drag a purple "SAY" block.
After you snap these two together, add text to let your character introduce themselves with an interesting fact.
Have students reread the book and look at the appendix of the book for facts that can help them understand the role of bioluminescence in your character.
Next, decide how long you should display the “speech bubble”.
What if you want to also add a ‘real voice” along with the text dialogue when you click on your character.
Use what you learned in the last challenge to record you voice and add a Start Sound block.
Where would you put that that code block so that you could read AND listen to the sea character introduce itself when you click on it.?
As I was playing with dialogue, I decided that I wanted the characters to show when they talked.
I added a Show Costume block, but got some unpredictable results.
After some troubleshooting, I found a solution that worked. I knew that the costume always showed up when the diver was touching the sprite. What if I used the GO TO block to move the character to the diver? That worked well, and also added a fun element to my project.
Note: There are additional solutions that would require more advanced skills. I chose not to use those to stay within the skills that 4th grade students might have after completing these challenges.
Did you know that Scratch also offers some additional experimental code blocks including a Text to Speech Extension? If you have extra time, you might want to explore this, by adding the extension, and dragging over the "speak" blocks to replace the START SOUND block.
Here is a partial solution of Challenge 5 to explore. . https://scratch.mit.edu/projects/1097888175/
I’ve coded only the Vampire Squid to have speak when you click in it. Try adding dialogue boxes to the other characters.
A nice thing about this story is that there are 4 characters giving the students a chance to repeat the code they just learned 3 more times.
GROUP PROJECT: If you want students to work in groups, you can ask each student to code the same story with only ONE character. Then export all the characters into ONE project. The code will also export with the character. To export a sprite or a stage, simply Right click in the sprite collection area of your project. This could allow students to work in groups to create and code different parts of a project. They could them email or upload their sprite to a folder for ONE person to collect them all and assemble them into one project.
Challlenge 5 will be the last in this short beginning Coding Who's Afraid of the Light Series series, but we are working on some BONUS Challenges were we will use Circuits and Circuits Boards such as Makey Makey, Fun Key, and Micro:bits that will be released later this month. Stay tuned.
You can subscribe to this blog to get notified when the next challenge is posted.
Originally created for CSTA-Vermont during Computer Science Education Week 2024
CS Inspired by Literature © 2024 by Lucie deLaBruere is licensed under CC BY-NC-SA 4.0