|This page has links to websites or programs not trusted by Scratch or hosted by Wikipedia. Remember to stay safe while using the internet, as we cannot guarantee the safety of other websites.|
Tera and Pico hold a conversation.
[0:15] Let us find out how this is done.
[0:17] I will begin by deleting the default sprite. Done.
[0:22] Now I need a new sprite, so I will get one by clicking on the new sprite icon, and I will select Pico.
[0:32] Since Pico needs someone to talk to, I will get another sprite.
[0:39] This time, I will select Giga. You can play around with different characters here.
[0:47] Okay, so when our story begins, both Pico and Giga are outdoors, but right now, it doesn't seem like they're outdoors. It seems like they're in front of a white backdrop. So let's change the backdrop.
[1:00] I will click on the new backdrop icon... and select a backdrop labeled "Pathway".
[1:18] At this point, we can see two backdrops: a white space, and the pathway. Since we don't need the white backdrop for our story, we will delete it.
[1:28] Okay, now I will make the two sprites talk to each other. Since Pico starts the story, I will click on Pico, and go back to the Scripts tab.
[1:41] Now in my story, Pico starts the conversation by saying "Hello" to Giga.
[1:48] Next, I have to program the story in such a way that Giga says "Hello" back to Pico. Well Giga needs to know when to say "Hello".
[1:57] To do this, I will grab the broadcast block. This block can send messages back and forth between Giga and Pico, and can thus help show the dialog at the right time.
[2:11] I will broadcast a new message called "giga1".
when gf clicked say [Hi Giga!] for (2) secs broadcast [giga1 v]
[2:19] Now when Giga receives this message, it knows that it is his turn to say "Hello" back, so I will click on Giga, and get the "When I Receive The Message" block, so when Giga receives this message sent by Pico, it says "Hi Pico!"
[2:36] Okay, now let's continue the conversation between Giga and Pico. After Giga has said "Hello" back, it is Pico's turn to talk, so I will grab the broadcast block, and send a message called "pico1"
when I receive [giga1 v] say [Hi Pico!] for (2) secs broadcast [pico1 v]
[2:51] When Pico receives this message called "pico1"... it asks a question.
[3:11] "Would you like to go to the moon?", asks Pico.
[3:25] And then it broadcasts another message called "giga2".
when I receive [pico1 v] say [Would you like to go to the moon?] for (2) secs broadcast [giga2 v]
[3:38] And when Giga receives this new message called "giga2"... it replies by saying, "Sure, let's go!"
when I receive [giga2 v] say [Sure, let's go!] for (2) secs
[4:00] Okay, let's run this program.
[4:11] Now I have to make both Giga and Pico go to the moon, so after Giga has said, "Sure, let's go!", I will broadcast a new message... and I will call this new message "GoToMoon".
when I receive [giga2 v] say [Sure, let's go!] for (2) secs broadcast [GoToMoon v]
[4:29] And then, I will change the backdrop to moon. To do this, I will get a new backdrop... and this time, I will select a backdrop that looks like the moon.
[4:43] Now, there are two backdrops inside my project: a pathway, and the moon.
[4:49] While the backdrop is selected, I will go back to the scripts tab, and then add logic which says that when the message "GoToMoon" is received, change the backdrop to backdrop moon.
when I receive [GoToMoon v] switch backdrop to [moon v]
[5:04] Okay, let's run this program.
[5:10] Wait, when the story starts, both Giga and Pico are outdoors.
[5:17] So let me add logic which says, that when I hit the green flag, switch the backdrop to pathway.
when gf clicked switch backdrop to [pathway v]
[5:31] Okay, now let's run this program again.
[5:45] Finally, what do you think happens next in this story?