Step 4 of 7
57%
Purchases
The seller sprite needs to:
- ask if the customer is ready to pay for the items
- take payment
- get ready for the next customer

When they have finished choosing items, the customer will click on the seller sprite to pay.
Tell the customer how much their items will cost.
when this sprite clicked
say (join [That will be ] (total)) for (2) seconds
Add a payment sound to your seller sprite so the customer knows that payment is taking place.

Add the play sound until done block to your script.
when this sprite clicked
say (join [That will be ] (total)) for (2) seconds
+ play sound [machine v] until done
Finish the sale. Set total back to 0 after payment, say goodbye and broadcast next customer.
when this sprite clicked
say (join [That will be ] (total)) for (2) seconds
play sound [machine v] until done
+ set [total v] to (0)
+ say (join [Thanks for shopping at ] (name)) for (2) seconds
+ broadcast (next customer v)
Test: Test your project and make sure:
- The customer can check out with the correct sound effects
- The total gets set back to
0after a customer pays or cancels.
Debug: You might find some bugs in your project that you need to fix.
Here are some common bugs:
Tip: Compare your code with the code examples. Are there any differences that shouldn't be there?
JuaraKu