(Sorry for long thread!!)
So we want to add a cafeteria minigame to our project, where you have to serve drinks and food to certain clients in a specific amount of time. By watching a few tutorials, we wrote down how the game will work:
So we tried to code this and it just didn't work. For starters, we wanted to try our idea with only one costumer, but the sprite of the costumer just disappears, and it all works very weird and not correctly. I attach some screenshots of how we programmed it, and I would appreciate it if someone could bring me a solution to this 🙂.
So we want to add a cafeteria minigame to our project, where you have to serve drinks and food to certain clients in a specific amount of time. By watching a few tutorials, we wrote down how the game will work:
1. Main Mechanic: The player is responsible for serving customer orders. Each customer will sit at one of the available tables and, upon doing so, an exclamation mark (“!”) will appear above their head to indicate they want to place an order.
2. Customer Interaction: The player must approach the customer and press to interact with them. When they do so, the customer will show an icon corresponding to their order, which can be one of the following:
* Coffee
* Cupcake
3. Order Delivery: After the customer indicates their order:
A timer will start (for example, 100 seconds).
The player must go to the appropriate area to pick up the item:
Coffee machine (for coffee)
Counter or tray (for cupcakes)
Once picked up, the item will be automatically stored in the inventory or in a temporary variable.
When the player returns to the customer, if they serve the delivers the correct order within the time limit:
The customer will be happy ''😀'', pay, and leave.
If they don't make it in time:
The customer will show an angry icon ''>:('' and leave without paying.
Note: If the player delivers the wrong item, the customer will complain and ask where their real order is.
4. End of the Minigame: At the end of the shift (once a set number of customers have been served or after a certain amount of time), the total amount of money the player has collected in the register will be calculated. Based on the total, a different line of dialogue will appear between Amy (the protagonist) and Chengbo, her assistant.
2. Customer Interaction: The player must approach the customer and press to interact with them. When they do so, the customer will show an icon corresponding to their order, which can be one of the following:
* Coffee
* Cupcake
3. Order Delivery: After the customer indicates their order:
A timer will start (for example, 100 seconds).
The player must go to the appropriate area to pick up the item:
Coffee machine (for coffee)
Counter or tray (for cupcakes)
Once picked up, the item will be automatically stored in the inventory or in a temporary variable.
When the player returns to the customer, if they serve the delivers the correct order within the time limit:
The customer will be happy ''😀'', pay, and leave.
If they don't make it in time:
The customer will show an angry icon ''>:('' and leave without paying.
Note: If the player delivers the wrong item, the customer will complain and ask where their real order is.
4. End of the Minigame: At the end of the shift (once a set number of customers have been served or after a certain amount of time), the total amount of money the player has collected in the register will be calculated. Based on the total, a different line of dialogue will appear between Amy (the protagonist) and Chengbo, her assistant.
So we tried to code this and it just didn't work. For starters, we wanted to try our idea with only one costumer, but the sprite of the costumer just disappears, and it all works very weird and not correctly. I attach some screenshots of how we programmed it, and I would appreciate it if someone could bring me a solution to this 🙂.
(Since it's just a test, my friend programmed it in Spanish, I'll translate it for you if it helps)
Pedido --> Order
''Coges una magdalena'' --> ''You take a cupcake''
''No hay pedidos ahora'' --> ''There's currently no orders''
''Coges un café'' --> ''You take a coffee''
Pedido cliente --> Client's order
*Note: The sprite is different in this screenshot than in the other because we thought that maybe the fact that it didn't appeared it was because of the sprite itself, but the code is the same, so this shouldn't matter
Lleva pedido --> Deliver order
Producto actual --> Actual object
Perfecto! Gracias! --> Perfect! Thank you!
Cliente satisfecho --> Satisfied client
Eso no es lo que pedí! --> That's not what I ordered!
Mi pedido?... --> My order?...
Pedido 1 hecho --> Order 1 done
Me voy, esta tardando mucho --> I'll leave, this is taking too long
Pedido --> Order
''Coges una magdalena'' --> ''You take a cupcake''
''No hay pedidos ahora'' --> ''There's currently no orders''
''Coges un café'' --> ''You take a coffee''
Pedido cliente --> Client's order
*Note: The sprite is different in this screenshot than in the other because we thought that maybe the fact that it didn't appeared it was because of the sprite itself, but the code is the same, so this shouldn't matter
Lleva pedido --> Deliver order
Producto actual --> Actual object
Perfecto! Gracias! --> Perfect! Thank you!
Cliente satisfecho --> Satisfied client
Eso no es lo que pedí! --> That's not what I ordered!
Mi pedido?... --> My order?...
Pedido 1 hecho --> Order 1 done
Me voy, esta tardando mucho --> I'll leave, this is taking too long