0:00:00.000,0:00:05.020 Hour of Code Minecraft | Events 0:00:05.020,0:00:10.320 On this next level, you can pick to [br]be either Steve or Alex. 0:00:10.320,0:00:16.670 Press the arrow buttons on your keyboard to[br]move up, down, left, and right. 0:00:16.670,0:00:20.890 Now you can move around a level wherever you[br]want. 0:00:20.890,0:00:27.340 To use a creature, just walk towards it, turn[br]to face it, and press the spacebar. 0:00:27.340,0:00:34.280 If you're using a touch screen, swipe up,[br]down, left, and right to move around. 0:00:34.280,0:00:38.829 Then tap the game to use the item in front[br]of you. 0:00:38.829,0:00:41.100 But what happens when you use it? 0:00:41.100,0:00:46.851 In Minecraft, sheep drop wool when you shear[br]them, cows run away when you hit them, and 0:00:46.851,0:00:51.219 creepers explode when you get near them. 0:00:51.219,0:00:55.440 These reactions happen thanks to something[br]called events. 0:00:55.440,0:01:00.010 Events tell your program to listen or wait[br]for when something happens. 0:01:00.010,0:01:02.859 And when it does, perform an action. 0:01:02.859,0:01:08.340 So far, you've used one event. Code you put[br]in the "when spawned" slot runs when your 0:01:08.340,0:01:12.120 creature is created or when the game starts. 0:01:12.120,0:01:17.780 Over the next few levels you'll have new slots[br]for events such as "when touched" that runs 0:01:17.780,0:01:23.060 when you touch the creature, or "when used"[br]for when you use the creature. 0:01:23.060,0:01:29.820 Or, if you want your zombie to disappear when[br]the sun comes up, put that in the "when day" slot