Makecode If statements

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 :grinning:

2 Likes

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)

3 Likes

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

3 Likes


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.

1 Like

That’s really cool!

2 Likes

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

2 Likes

Cant wait to see the game!

1 Like

Ill show you guys when its finished :blush: