Two Friends Talking
๐ฏ Two characters have a short conversation, taking turns.
๐ก The idea behind it
Each sprite has its own code, and they can wait for each other.
๐งฑ Blocks you will need
when green flag clickedsay โฆ for 2 secswait 2 secondsbroadcast message1when I receive message1
๐จ Build it
- Add a second sprite with the cat-face button at the bottom right.
- Give the first sprite: when flag clicked โ say 'Hello!' for 2 seconds โ broadcast message1.
- Give the second sprite: when I receive message1 โ say 'Hello to you too!' for 2 seconds.
- Run it. One speaks, then the other. That is a conversation built out of a message.
๐ Make it harder
- Add a third line so the first sprite replies again โ it will need a second message.
- Make each sprite move a little as it speaks.
๐ Bugs you will hit
- They both speak at once: the second sprite is using 'when green flag clicked' instead of 'when I receive'.
โฌ Need Scratch itself?
Free from MIT, in a browser or as an offline app that needs no connection at all.