Minecraft Hour of Code: Events
0:00 - 0:05Hour of Code Minecraft | Events
0:05 - 0:10On this next level, you can pick to
be either Steve or Alex.
0:10 - 0:17Press the arrow buttons on your keyboard to
move up, down, left, and right.
0:17 - 0:21Now you can move around a level wherever you
0:21 - 0:27To use a creature, just walk towards it, turn
to face it, and press the spacebar.
0:27 - 0:34If you're using a touch screen, swipe up,
down, left, and right to move around.
0:34 - 0:39Then tap the game to use the item in front
0:39 - 0:41But what happens when you use it?
0:41 - 0:47In Minecraft, sheep drop wool when you shear
them, cows run away when you hit them, and
0:47 - 0:51creepers explode when you get near them.
0:51 - 0:55These reactions happen thanks to something
0:55 - 1:00Events tell your program to listen or wait
for when something happens.
1:00 - 1:03And when it does, perform an action.
1:03 - 1:08So far, you've used one event. Code you put
in the "when spawned" slot runs when your
1:08 - 1:12creature is created or when the game starts.
1:12 - 1:18Over the next few levels you'll have new slots
for events such as "when touched" that runs
1:18 - 1:23when you touch the creature, or "when used"
for when you use the creature.
1:23 - 1:30Or, if you want your zombie to disappear when
the sun comes up, put that in the "when day" slot
- Minecraft Hour of Code: Events
Start learning at http://code.org/
Stay in touch with us!
• on Twitter https://twitter.com/codeorg
• on Facebook https://www.facebook.com/Code.org
• on Instagram https://instagram.com/codeorg
• on Tumblr https://blog.code.org
• on LinkedIn https://www.linkedin.com/company/code-org
• on Google+ https://google.com/+codeorg
- Video Language:
- Hour of Code