How to isolate customer orders in a cooking game?

Hey! A friend and I are making this for class, but we are total novices and we have run into some bumps. Gonna try and be as specific as possible! Think of this as a papas pizzeria style game but extremely simplified (and its an ice cream parlor).

How do I…

Our game’s mechanics are very simple. A customer comes in, says what ice cream they want, and the player hits a key to give them the ice cream they requested. FOR EXAMPLE: customer wants strawberry, so the player hits “s”.

What is the expected result

If they hit the right key, the customer is satisfied and leaves so the next customer comes in. If they hit any other key, however, the customer leaves angry.

What is the actual result

There are 2 problems we have faced with this.

  1. I cannot figure out how to make it so any other key pressed will trigger the angry reaction. When I press other keys, nothing happens.
  2. When the next customer comes in, we changed the order to be “vanilla” accompanied by pressing the “v” key. We noticed, however, that this event is not isolated from the first one- if you press “v” on the “strawberry/s” prompt, the customer will still be happy, despite it not being what customer 1 asked for. I think this second issue could be fixed if the first issue would be fixed as well.

TLDR; how can we make each customer’s request totally isolated from the requests of other customers?

Related screenshots

heres some screenshots, dont clown on me too hard if its unorganized or absurd since we are basically learning this program as we go. Any and all critiques are welcome though!

The best way to do this in my opinion is to have a separate event for each flavor.
I’ll use strawberry and vanilla as examples

If the flavor is Strawberry have a Boolean variable that says so. Set up an event to check that the Boolean is true and reward the player if they hit “s”

Then set up a second event that checks if the player is hitting “any key”
Using the “and” condition, combine this check with another “s” key check but have it reversed.
This function should ultimately have one condition, checking if the player is hitting any key except for “s” then the action is whatever happens when the player gets it wrong.

You would also need events that set each Boolean to true or false depending on if it is currently that flavor.

I’m away from my computer at the moment but if you have further questions or would like some screenshots don’t hesitate to ask!

  • Obee