< Return to Video

Minecraft Hour of Code: Events

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

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

more » « less
Video Language:
English
Team:
Code.org
Project:
Hour of Code
Duration:
01:32

English subtitles

Revisions