How do I create a cafe game that has customers with orders?

Not favoritedFavorited Favorited 0 favourites
  • 4 posts
From the Asset Store
20 high quality click sounds, ready to improve your game's UI instantly
  • I want to create a cafe game with customers and they each have a random order. I have it so that each ingredient in the menu has a certain value and if it adds up to another value it creates a new food. But how do I make the food created be identified as correct if it matches what the customer ordered +makes that customer be destroyed? I also have customers spawn every few seconds, so I have to make it so that if the order is correct the customer with that specific order is destroyed. Im very beginner so I'm probably missing something simple!

    Tagged:

  • I suggest starting small and developing the game in stages. Forget the cooking part for now — just create a sprite with 2–3 simple meals like pizza, hamburger, and lasagna.

    Randomly spawn customers and assign each one a random meal request. Serve the meals and remove the customers once they're served.

    Once that’s working, you can move on to developing the crafting mechanic for different meals.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • ...each ingredient in the menu has a certain value and if it adds up to another value it creates a new food. But how do I make the food created be identified as correct if it matches what the customer ordered ...

    Is the order of ingredients also important or not?

    For easy debugging, I would use strings. So the customer order would be a value like this: "ketchup_fries_salt".

    You can separate cooking process into steps/actions, each step adds a bit of string to existing string like this: new food == food & "_" & "ketchup", and then: food == new food.

    In the end you compare the food string to customer order string.

    If the ingredients are in any order, you can separate the strings via delimiter into an array or list and loop through that.

  • The customer gets destroyed just for ordering food how harsh T_T

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)