Tuesday, 12 December 2017

M:EE Make Code blog 2: Get coding.

M:EE Make Code blog 2: Get coding.

This first real coding in Minecraft is usually walking blocks, so lets see how you would achieve this with Make Code.

Step 1: Ensure you have followed blog 1. link:

Step 2: Drag in the 'On Chat' command from 'Player' menu on the left.  

Step 3: From the 'Blocks' menu drag in the 'Place' command. Using the drop down list chose the block that you want to drop. By changing the middle 'Y' value you can lay blocks blow Alex. -1 is one block below and -2 one below that and so on.

Step 4: Repeat this with as many further blocks as you wish I did another block.

Step 5: In the 'On Chat' block type in 'Set', this will act at the trigger to launch the code in game.

Step 6: Click on the button in Make code that is a red square in picture above it should be a Green this will start off the command.

Step 7: Go back to  M:EE and press 't' on the keyboard, then type in 'Set' you should see blocks appear beneath your character (see below).

Extension: Walking blocks.......

Step 1: Remove the 'On Chat' command.

Step 2: Replace it with 'Forever' loop from 'Loops' menu

Step 3: Add in a time delay from the 'GamePlay' menu.

Step 4: Try rerunning your code by click on the Green/Red button. You should end up with this code:

And this output:

Well done! you have completed your first mod in M:EE.


No comments:

Post a Comment