Video: Minecraft Hour of Code - Functions
Video Player is loading.
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Your browser is not supported. Please upgrade your browser to one of our supported browsers. You can try viewing the page, but expect functionality to be broken.
CS in Algebra curriculum and content is being deprecated. Within the next few months, this lab will no longer be available. Please check out Bootstrap: Algebra instead. Learn More.
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
Preston: I'm not trying to brag, but I'm pretty good at parkour. Lizzy: Let's sleep so it's day when Stacy comes back.
Stacy: Ok guys, I am back from the Minecraft offices, and I think I know how to solve the problem I'm having in my game. I think I can use a function. Let me just open this.
So a function is a specific set of instructions to accomplish a certain task, kind of like a recipe. In the next few levels, you'll have access to functions that you can use to solve the puzzles.
Look at the code in the function when it's in the workspace to see what it does.
Then, find the block with that name in the toolbox and drag it from the toolbox to the when run block.
Remember, you can use the same function every time you need to run the same set of instructions to do something, like build a bridge. Good luck, I know you can do it!