# Tamagotchi

**URL:** <https://forum.makecode.com/t/tamagotchi/12693>\
**Category:** micro:bit\
**Created:** [March 14, 2022, 4:22pm UTC](https://forum.makecode.com/t/tamagotchi/12693 "2022-03-14T16:22:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![annemarievanaert1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/annemarievanaert1/32/5938_2.png) [@annemarievanaert1](https://forum.makecode.com/u/annemarievanaert1)\
**Post date:** [March 14, 2022, 4:22pm UTC](https://forum.makecode.com/t/tamagotchi/12693/1 "2022-03-14T16:22:51Z")

</div>

Hello everyone, I’m trying to make a Tamagotchi with the micro bit. But I have a problem: I want that the micro bit is automatically hungry so I have set a variable hungry and it counts automatically. But if I set the block the whole time look happy then he looks the whole time happy (ok, logical) but I want that if he is a little bit hungry that he only looks sad but now he looks take turns sad and happy.  
Can someone help me?  
Thanks in advance.  
Anne-Marie

> **[Tamagotchi](https://makecode.microbit.org/61185-39796-62822-74856)**
>
> Gemaakt met ❤️in Microsoft MakeCode for micro:bit.

Here’s a link to my project;)

---

<div class="post-metadata">

**Author:** ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/36648_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)\
**Post date:** [April 22, 2022, 12:04am UTC](https://forum.makecode.com/t/tamagotchi/12693/2 "2022-04-22T00:04:33Z")

</div>

Hello! I think because the happy face is in the “forever block” it overrides the sad face. The solution I would go for is putting the happy face in “on start” and then after the face changes, adding a wait block and then a happy face. Also the “if” statements could be condensed into an if-else. Here, I think I fixed it 🙂 [https://makecode.microbit.org/\_Vf3KyDLWwK8q](https://makecode.microbit.org/_Vf3KyDLWwK8q)

---

<div class="post-metadata">

**Author:** ![codecat1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codecat1/32/29634_2.png) [@codecat1](https://forum.makecode.com/u/codecat1)\
**Post date:** [September 20, 2024, 4:59pm UTC](https://forum.makecode.com/t/tamagotchi/12693/3 "2024-09-20T16:59:59Z")

</div>

Hey, Can you make one of these on the arcade? I’m really interested in this topic (yes, I know this died like, 3 years ago, just so you know, yeah, I’m talking to you specifically)
