5. Events
Next, drag out a “when green flag clicked” block and a “set variable” block from the “Data” tab. Connect the blocks so that the “Guest List” variable is set to an empty string when the project starts.
Go back to the birthday party invitation sprite and create a “when I receive” block from the “Events” tab, and select the “Cola Invited” message.
Add a “set variable” block and connect it to the “Guest List” variable. In the block, set the variable to the current value of the variable plus the name of the guest, followed by a comma and a space. For example, if Cola is the first guest invited, the “Guest List” variable would be set to “Cola, “.