WEBVTT 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 00:00:05.200 --> 00:00:09.550 Imagineering. I'm responsible for leading teams that actually produce the attractions 00:00:09.550 --> 00:00:16.569 that our guests get to experience. We are always looking for ways that we can improve 00:00:16.569 --> 00:00:21.220 and make a better experience for our guests and technology is at the heart of that. 00:00:21.220 --> 00:00:27.640 Congratulations, you did it! You programmed BB-8. Now I think we're ready for something 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 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 00:00:40.160 --> 00:00:45.989 learn about something that game programmers use every day: they're called events. 00:00:45.989 --> 00:00:51.089 Events tell your program to listen or wait for when something happens and then when it 00:00:51.089 --> 00:00:56.829 does, it performs an action. Some examples of events are listening for a mouse click, 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 00:01:02.710 --> 00:01:07.090 a message to a rebel pilot and then move down to the other rebel pilot. 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 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 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 00:01:25.270 --> 00:01:28.710 we'll do the same thing to make R2-D2 move down. 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 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 00:01:40.810 --> 00:01:42.510 more interactive.