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.