There are lots of features you could add to improve your customers’ shopping experience. You don’t need to add everything. Just add improvements that you think are important.
You can ‘See inside’ the example projects to look at how they work.
Example projects:
Fresh Space Fruit: See inside
Cool Shirts: See inside
Ice cream shop: See inside
Vending machine: See inside
Tip: If you are logged in to a Scratch account, then you can use the Backpack to copy scripts or sprites to your project.
Do you think your checkout person (or machine) should ask more questions?
You can add ask
blocks to your seller’s when this sprite clicked
script and say
different things depending on the customer’s response.
You could ask whether the service was good, or if they’re having a nice day. Or something specific to your shop, like “What are you going to cook?”
Debug: Check that you have spelled the options correctly in your code and in your answer. It’s OK if you use capital letters, so “Yes” and “YES” will match “yes”.
Add multiple questions to create a chatbot or non-player character that you can talk to.
Do you want something else to happen when you add an item?
The Cool Shirts project has shirts that glide into a bag.
Add a Container sprite. You could use an existing sprite like the Gift or Take out sprite, or paint your own with simple shapes.
Add a script to make the Container always appear at the front:
Then you’ll need to add code to each Item you have for sale to make them glide to the container when they are clicked:
If you don’t want the container there all the time, you can add scripts to make it show and hide at the right time:
Test: Try your project and make sure items glide to the container and hide.
Debug: Check your scripts carefully and make sure you have updated all of your Item sprites. You can look at Cool Shirts if you need to see a working example.
The Ice cream project shows the ice cream as the customer chooses their options.
Each item needs to broadcast
in its when this sprite clicked
script:
Then the sprite you want to show or change needs to respond to that message:
You may also want to change or hide the sprite for a new customer:
If you have multiple items, then you will need to add more messages and scripts to to receive them.
Have you noticed that your customer can add items after they have started to check out?
If you want to stop the customer adding items when they are at the checkout, you can add a shop
variable and use it to control when items can be added.