# I need help with making my code

**URL:** <https://forum.makecode.com/t/i-need-help-with-making-my-code/28673>\
**Category:** Help\
**Created:** [May 9, 2024, 3:49pm UTC](https://forum.makecode.com/t/i-need-help-with-making-my-code/28673 "2024-05-09T15:49:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![broski](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/broski/32/15131_2.png) [@broski](https://forum.makecode.com/u/broski)\
**Post date:** [May 9, 2024, 3:49pm UTC](https://forum.makecode.com/t/i-need-help-with-making-my-code/28673/1 "2024-05-09T15:49:38Z")

</div>

what i’m making is a game where it’s essentially a cafe. what i need is a way to make selectable food icons at the bottom of the screen, and i need to figure out how to make the game take or give points based on whether you gave the customer what they want or not. i don’t know if this is too complicated or anything, but any possible assistance would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![mcodez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mcodez/32/30743_2.png) [@mcodez](https://forum.makecode.com/u/mcodez)\
**Post date:** [May 9, 2024, 10:00pm UTC](https://forum.makecode.com/t/i-need-help-with-making-my-code/28673/2 "2024-05-09T22:00:25Z")

</div>

I would suggest posting the game and saying @richard with the question

---

<div class="post-metadata">

**Author:** ![RobbyZero](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/robbyzero/32/17188_2.png) [@RobbyZero](https://forum.makecode.com/u/RobbyZero)\
**Post date:** [May 10, 2024, 8:01pm UTC](https://forum.makecode.com/t/i-need-help-with-making-my-code/28673/3 "2024-05-10T20:01:35Z")

</div>

Step #1. Create a variable for every food. This way if it’s a needed food item set it to true.  
Step #2. Create a trigger. This will be used when a customer comes with there request so we can tell what food was selected. The best way we can do this is create a timer and when it’s done it will check the food that was clicked. If you have the Mini-menu extension you won’t need a timer and you can detect clicks.  
Step #3. Create another variable for the food that activates when the trigger runs. This way when you click it the variable will read the number for amount clicked.  
Step #4. When the variable goes off you can run this code:  
If “bread” is equal to (1) or (2) then  
+1 point

Do that for every food you added

If you need a more in depth explanation. I can recommend asking the mods.

---

<div class="post-metadata">

**Author:** ![broski](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/broski/32/15131_2.png) [@broski](https://forum.makecode.com/u/broski)\
**Post date:** [May 13, 2024, 2:07am UTC](https://forum.makecode.com/t/i-need-help-with-making-my-code/28673/4 "2024-05-13T02:07:12Z")

</div>

thank you
