Discuss Scratch

VeeThaBee
New Scratcher
11 posts

How to make the code recognize right and wrong orders.

Hi, I have been trying to create a game, the code is so it randomizes costumes and orders, the thing is, I don't know how to make it so when you give the wrong order the code sees that and gives he response I want it too, and if it's the right you move on to the next customer, if anyone understands what I'm saying please help!
Hostcreator2
Scratcher
81 posts

How to make the code recognize right and wrong orders.

I might have a solution
wait a second

Last edited by Hostcreator2 (Aug. 23, 2024 23:44:30)

SpyCoderX
Scratcher
1000+ posts

How to make the code recognize right and wrong orders.

So, here’s what I would do.

I would have 4 lists.

2 of them are for the order
The first list stores the items in the order.
The second one stores how much of that item is in the order.

The other 2 are for the items you completed for the order.
The first list stores the items that were completed.
The second one stores how much of that item was completed.

Then, you can check if the lists contain the same items and the same amounts of item.
If so, it’s correct!
Hostcreator2
Scratcher
81 posts

How to make the code recognize right and wrong orders.

I will be helping you out today I am your tutor I will be helping you script now
I have a few questions would you have to make the food or the food is already prepared??
is it a multiple question or is this one question how much would they order or they order one??
when customer have been served would you like it skip costumes randomly or skips one??
would this be a 2d up view or 2d platformer

please answer these questions if you do not I cannot help you.
VeeThaBee
New Scratcher
11 posts

How to make the code recognize right and wrong orders.

Hostcreator2 wrote:

I will be helping you out today I am your tutor I will be helping you script now
I have a few questions would you have to make the food or the food is already prepared??
is it a multiple question or is this one question how much would they order or they order one??
when customer have been served would you like it skip costumes randomly or skips one??
would this be a 2d up view or 2d platformer

please answer these questions if you do not I cannot help you.


The cats will say their order, once they say it it goes on a list, then you click “Make Order” When you click that the backdrop changes, you make the drink for the customer, I believe it is a 2d platformer, they can only order some food or a coffee or milk, not multiple, when you give the customer an order or start the game it will select a random order and costume. I also have it published for now just incase it's not a 2d platformer.

Last edited by VeeThaBee (Aug. 24, 2024 00:52:17)

VeeThaBee
New Scratcher
11 posts

How to make the code recognize right and wrong orders.

SpyCoderX wrote:

So, here’s what I would do.

I would have 4 lists.

2 of them are for the order
The first list stores the items in the order.
The second one stores how much of that item is in the order.

The other 2 are for the items you completed for the order.
The first list stores the items that were completed.
The second one stores how much of that item was completed.

Then, you can check if the lists contain the same items and the same amounts of item.
If so, it’s correct!


Hi, I'm not sure if I miss understood what you said but I want it so you don't see if its correct until you click “Done” you don't see their order as the list dissapears when you go to make it, I want the code to be able to detect if what the played made is the customers order, if it's not then it triggers a reaction from the customer, the order is also randomized, they also only order 1 thing and then leave.

Powered by DjangoBB