# Makecode If statements

**URL:** <https://forum.makecode.com/t/makecode-if-statements/19688>\
**Category:** Help\
**Created:** [May 5, 2023, 3:56am UTC](https://forum.makecode.com/t/makecode-if-statements/19688 "2023-05-05T03:56:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bestie](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@bestie](https://forum.makecode.com/u/bestie)\
**Post date:** [May 5, 2023, 3:56am UTC](https://forum.makecode.com/t/makecode-if-statements/19688/1 "2023-05-05T03:56:13Z")

</div>

Hey guys. I’m trying to make a game where its a story but it continues depending on what option you pick. I know there is an if true statement for this but i need to know how to make it so if the player picks on option over the other, then a different event will happen. if someone could help with that 😀

---

<div class="post-metadata">

**Author:** ![Salex](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/salex/32/15835_2.png) [@Salex](https://forum.makecode.com/u/Salex)\
**Post date:** [May 5, 2023, 3:40pm UTC](https://forum.makecode.com/t/makecode-if-statements/19688/2 "2023-05-05T15:40:43Z")

</div>

You can override the `True` part of the block by dragging another block into it, so long it’s a boolean type (in blocks, it has jagged edges instead of rounded)

---

<div class="post-metadata">

**Author:** ![Samsano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/samsano/32/8307_2.png) [@Samsano](https://forum.makecode.com/u/Samsano)\
**Post date:** [May 5, 2023, 3:50pm UTC](https://forum.makecode.com/t/makecode-if-statements/19688/3 "2023-05-05T15:50:40Z")

</div>

Here i have created a simple game where you change the colour of the sprite

> **[Choose Output](https://arcade.makecode.com/S94485-99855-89808-33156)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Blobbey](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blobbey/32/20831_2.png) [@Blobbey](https://forum.makecode.com/u/Blobbey)\
**Post date:** [May 5, 2023, 4:38pm UTC](https://forum.makecode.com/t/makecode-if-statements/19688/4 "2023-05-05T16:38:37Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/7239be51d5e71d42dedbdff15e7416f58dbc6266.png)  
Go to the extensions, scroll down until you find the story extension, and click on it. It will give you a variety of blocks. The block shown can create 4 options. Then just use if and else if statements to get which answer the player chose.

---

<div class="post-metadata">

**Author:** ![bestie](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@bestie](https://forum.makecode.com/u/bestie)\
**Post date:** [May 5, 2023, 6:20pm UTC](https://forum.makecode.com/t/makecode-if-statements/19688/5 "2023-05-05T18:20:18Z")

</div>

That’s really cool!

---

<div class="post-metadata">

**Author:** ![bestie](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@bestie](https://forum.makecode.com/u/bestie)\
**Post date:** [May 5, 2023, 6:21pm UTC](https://forum.makecode.com/t/makecode-if-statements/19688/6 "2023-05-05T18:21:10Z")

</div>

Oh thank you guys for helping me! I got it fixed 😊

---

<div class="post-metadata">

**Author:** ![labfox29](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/labfox29/32/9252_2.png) [@labfox29](https://forum.makecode.com/u/labfox29)\
**Post date:** [May 8, 2023, 4:34pm UTC](https://forum.makecode.com/t/makecode-if-statements/19688/7 "2023-05-08T16:34:02Z")

</div>

Cant wait to see the game!

---

<div class="post-metadata">

**Author:** ![bestie](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@bestie](https://forum.makecode.com/u/bestie)\
**Post date:** [May 8, 2023, 5:16pm UTC](https://forum.makecode.com/t/makecode-if-statements/19688/8 "2023-05-08T17:16:39Z")

</div>

Ill show you guys when its finished 😊
