Coding with Minecraft 2 Events Lesson A Introduction

  • Slides: 29
Download presentation
Coding with Minecraft 2: Events

Coding with Minecraft 2: Events

Lesson A: Introduction to Events

Lesson A: Introduction to Events

The concept and importance of events and event handlers in coding WHAT WE’LL LEARN

The concept and importance of events and event handlers in coding WHAT WE’LL LEARN Real-life events and how they can affect situations To create event handler blocks that trigger different actions and results To understand the importance of events while playing Minecraft

EVENTS Events and event handlers are important concepts in computer science and can be

EVENTS Events and event handlers are important concepts in computer science and can be found in all programming languages. 4

EVENTS AND HANDLERS An event in computer science is an action or occurrence that

EVENTS AND HANDLERS An event in computer science is an action or occurrence that is detected by a computer. An event handler is a part of your program that runs when a specific event happens.

YELLOW BRICK ROAD Configure an event handler to cause something to happen by using

YELLOW BRICK ROAD Configure an event handler to cause something to happen by using the player toolbox drawer. Make flowers and then gold appear wherever you walk. Modify the code so the effect of the event changes

LET’S DISCUSS What is an event? What is a real-life example of an event?

LET’S DISCUSS What is an event? What is a real-life example of an event? Describe an example of an event from your coding project. How did you sink the blocks into the ground to make your yellow brick road? 7

LESSON A What we learned today The definition of an event and what it

LESSON A What we learned today The definition of an event and what it can do in a computer program Event programming in Microsoft Make. Code To change our Minecraft world through coding

NEXT TIME Further exploration into event handlers and coding blocks. Learn how events can

NEXT TIME Further exploration into event handlers and coding blocks. Learn how events can be used to trigger another event Zombies! 9

LESSON B: Coding with Events

LESSON B: Coding with Events

WHAT WE’LL LEARN The concept of coordinates How to create an event that causes

WHAT WE’LL LEARN The concept of coordinates How to create an event that causes other events in Minecraft To design your own coding blocks to spawn animals and zombies

REVIEW EVENTS What is an event? What is a real-life example of an event?

REVIEW EVENTS What is an event? What is a real-life example of an event? 12

SING A SONG OF SIXPENCE Learn to check for broken blocks of code Make

SING A SONG OF SIXPENCE Learn to check for broken blocks of code Make parrots appear from a cake using an event handler code Make more parrots appear!

LAST STAND AT THE ALAMO • Create an event code that spawns zombies each

LAST STAND AT THE ALAMO • Create an event code that spawns zombies each time you kill a zombie. • Learn to set the location of where they appear. • Avoid zombies!

LET’S DISCUSS What is an event handler? What is the coding workspace in Minecraft?

LET’S DISCUSS What is an event handler? What is the coding workspace in Minecraft? 15

LESSON B What we learned today

LESSON B What we learned today

NEXT TIME Short quiz! Learn to use handler blocks 17

NEXT TIME Short quiz! Learn to use handler blocks 17

LESSON C: LINKING EVENTS

LESSON C: LINKING EVENTS

WHAT WE’LL LEARN How much we have already learned A simple Make. Code for

WHAT WE’LL LEARN How much we have already learned A simple Make. Code for Minecraft project that uses event handler blocks

LINKED WALL Build a wall of glass using code. Break the wall of glass

LINKED WALL Build a wall of glass using code. Break the wall of glass to make a diamond block appear. Break the diamond block to make orange wool appear. Make your own unique situations.

LESSON C WHAT WE LEARNED TODAY

LESSON C WHAT WE LEARNED TODAY

NEXT TIME Your independent project 22

NEXT TIME Your independent project 22

LESSON D : GET CREATIVE WITH EVENTS

LESSON D : GET CREATIVE WITH EVENTS

WHAT WE’LL LEARN To create your own Make. Code projects that use events to

WHAT WE’LL LEARN To create your own Make. Code projects that use events to activate different parts of your program

INDEPENDENT PROJECT In this project, your challenge is to come up with a simple

INDEPENDENT PROJECT In this project, your challenge is to come up with a simple Make. Code for Minecraft project that uses one or more of the following event handler blocks:

LESSON C What we learned today

LESSON C What we learned today

MINECRAFT DIARY ENTRY • What problem did you solve, or why did you decide

MINECRAFT DIARY ENTRY • What problem did you solve, or why did you decide to create this project? • What kind of event and event handler did you decide to use? • What does your program do? Describe how your program works (what the cause and effect are). • Include at least one screenshot of your program working. • Share your project to the web and include the URL here.

LESSON C What we learned today To take what you’ve learned about coding to

LESSON C What we learned today To take what you’ve learned about coding to the next level To create your own Make. Code projects that use events to activate different parts of your program

NEXT TIME Unit 3: Coordinates 29

NEXT TIME Unit 3: Coordinates 29