Page 36 - Touchcode_C8_Flipbook
P. 36
Coding in Minecraft
Raining pigs and pandas
In this task, you will see how you can rain pigs and pandas from the sky.
To perform the task, follow these steps:
Step 1: Visit the link, https://minecraft.makecode.com/
Step 2: Click on ‘New Project’. Write the name of your project as ‘Raining pigs and pandas’
and click on ‘Create’.
Step 3: Click on the ‘Variable’, select ‘Make a variable’.
Step 4: Write the name of the variable ‘animal’, and click
on ‘Ok’.
Step 5: Select ‘set animal to 0’ block, and drop it to ‘on start’ block.
Step 6: From ‘Loop’ select the ‘while loop’.
Step 7: From ‘Logic’ select the ‘comparison’ operator.
Step 8: Move the ‘comparison’ block to ‘While’ block.
Step 9: From ‘Variable’ drag the ‘animal’ block and drop
it to first ‘0’ of ‘comparison’ block in ‘while’ loop.
Step 10: Drag the ‘While’ block and drop it to ‘on start’
block. Change the operator of ‘comparison’ block
to ‘<=’, and change the value of 0 to 100.
Step 11: From ‘Mobs’ select two ‘spawn’ block.
34 Touchcode-VIII

