1 00:00:00,459 --> 00:00:05,200 Well, hello, my name is Charita Carter. I'm a senior creative producer here at Walt Disney 2 00:00:05,200 --> 00:00:09,550 Imagineering. I'm responsible for leading teams that actually produce the attractions 3 00:00:09,550 --> 00:00:16,569 that our guests get to experience. We are always looking for ways that we can improve 4 00:00:16,569 --> 00:00:21,220 and make a better experience for our guests and technology is at the heart of that. 5 00:00:21,220 --> 00:00:27,640 Congratulations, you did it! You programmed BB-8. Now I think we're ready for something 6 00:00:27,640 --> 00:00:33,250 harder. Let's go for it. Now that you've learned the basics of programming, we're going to 7 00:00:33,250 --> 00:00:40,160 back in time to build your own game, starring R2-D2 and C3PO. To make a game, we need to 8 00:00:40,160 --> 00:00:45,989 learn about something that game programmers use every day: they're called events. 9 00:00:45,989 --> 00:00:51,089 Events tell your program to listen or wait for when something happens and then when it 10 00:00:51,089 --> 00:00:56,829 does, it performs an action. Some examples of events are listening for a mouse click, 11 00:00:56,829 --> 00:01:02,710 an arrow button or a tap on the screen. Here we're going to make R2-D2 move up to deliver 12 00:01:02,710 --> 00:01:07,090 a message to a rebel pilot and then move down to the other rebel pilot. 13 00:01:07,090 --> 00:01:12,570 We'll use events to make him move. When the player uses the up/down arrow keys, or the 14 00:01:12,570 --> 00:01:19,549 up/down buttons. We use the when up event block and attach the go up block to it. When 15 00:01:19,549 --> 00:01:25,270 the player presses the up arrow key, the code attached to the when up block is run. And 16 00:01:25,270 --> 00:01:28,710 we'll do the same thing to make R2-D2 move down. 17 00:01:28,710 --> 00:01:34,740 Now instead of writing all the code to control our droid in advance, we can let R2-D2 react 18 00:01:34,740 --> 00:01:40,810 to button press events that move him around the screen. Step by step, your game is getting 19 00:01:40,810 --> 00:01:42,510 more interactive.