How to Make Flappy Birb With Block Editor: 9 Steps

From here the steps get hard. Always check back on the picture to make sure you’re doing it right.

First we need three new variables. “ticks”, “emptyObstacleY” and “index2”.

Take an If block from the Logic section. This is where everything will go inside.

Inside Logic, under comparisons , take a “0=0” block.

From Math, take a remainder block.

For the first number, we put in the variable ticks.

The for the second value put a 3.

Then put this newly finished block into the first number value of the 0=0 block turning it into ” Remainder of ticks divided by 3 = 0.

Then take this block and put it in the If block instead of true. Then it should say ” If remainder of ticks divide by 3 = 0 then”

Now we can put things in the block.

From Variables. Take the set block

Make it ” Set emptyObstacleY”

Then from Math, take the pick random block and set the values to “pick random form 0 to 4”

then put this pick random block into your set emptyObstacleY block. Refer to the picture to see if you did it right.

Put this set block under and inside the larger If block.

Now from Loops, take the third block there, For (Variable) from 0 to 4 do.

For the variable, insert “index2”

It should now be, For index2 from 0 to 4 do.

Now put this under and in the larger If block.

Now take another If block and put it in the for block.

Now from the Logic, subsection Comparison, take another if 0=0 block but change it to if 0 does not equal 0.

Replace the first 0 with variable index2

Replace the other variable with emptyObstacleY

Now take this block and put it instead of true.

Now from Arrays, take the add value to end block.

Make the first variable obstacles.

Now in the blank we put a create sprite at x,y block.

X will be 4 and Y will be variable index 2

Now put this Array block in the smaller If block which is in the For block.

Leave a Reply

Your email address will not be published. Required fields are marked *