How the #Scratch username block works
This simple demonstration only works in Scratch 2.0, but it enables you to greet the player by username if they're logged in.
This simple script works like this:
- when green flag clicked: starts the script when the player clicks the green flag to run the program
- say: This block will display whatever's inside it in a speech bubble
- join: This block enables you to combine two pieces of text together. Using it, you can combine the message 'Hello' and the player's name inside one speech bubble
- username: This sensing block enables you to see the player's username if they're logged in. You can surprise players by greeting them by name like this, or perhaps display their name next to their score on screen.
Feel free to share that image on your social networks, or to use it with your students or Code Club members!