Events-554x368.png

Events

8-10 yrs old

11-13 yrs old

14-18 yrs old

Computer Science

Reading and Writing

Learn more how to use Events in blocks, JavaScript and Python with MakeCode Coding Editor.

1
avatar Submitted By: Minecraft Education

October 12, 2020

Skills

  • Creativity
  • Critical Thinking

Learning Objectives

  • Learn to code event handlers like on chat, on player, and on block to trigger intended results for a given action.
  • Learn to code event handlers to automatically replace one block with another.
  • Learn how defining event handlers effectively can produce both destructive and constructive results.
  • Utilize the following Common Core English Language Arts Standards: CCSS.ELA-LITERACY.CCRA.W.4, CCSS.ELA-LITERACY.W.6.3.B
  • Utilize the following CSTA standards: 1B-AP-10
  • Utilize the following ISTE standards: 6 Creative Communicator, 6C

Guiding Ideas

These learning activities are designed to provide the learner with flexibility and choice in his/her learning.

The learner will be introduced to three tutorials that are at three levels of difficulty (Novice, Intermediate and Expert) which are followed by an educational activity where he/she can apply coding skills.

Within each tutorial, the learner will have the option of selecting a coding language (Blocks, JavaScript or Python).

The learner may choose a tutorial at his/her appropriate difficulty level and language OR choose to complete all tutorials and the educational activity.  It will take approximately an hour to complete all the activities.

GUIDING QUESTIONS

  • Can you list the elements of a good short story? Can you give an example of each?

Character, Plot, Point of View, Setting, Theme, (Tension/Conflict), (Resolution)

  • What purpose do events serve in a short story? Can you give an example from a short story you have read in class?

By writing about the character’s reactions to events the author develops their character’s point of view within the setting and theme of the story.

The Three Little Pigs. Hansel and Grettel, The Princess and the Pea

  • How are events triggered in Coding (in Minecraft)? Can you give a few examples?

Events in Minecraft are triggered by commands.

Examples: on chat, on block placed, on block broken, on player fly, on player swim, on player riding.

  • How can events improve your game play in Minecraft?

The player can gain advantage in the game by creating commands that produce the desired effect when executed. If a player codes (or encounters) an “on block broken” event that opens a locked chest, when the block is broken the chest reveals hidden items that will benefit the player. 

Student Activities

TUTORIAL 1: CHICKEN RAIN (Novice - 10 minutes)

Main objective: The learner will utilize the on chat command to spawn chickens into the world at the player’s location.

Answer Key: https://makecode.com/_PqL305Y1Ja5P

TUTORIAL 2: FUN WITH EVENTS (Intermediate - 15 minutes)

Main objective: The learner will use three different event handler interactions to spawn animals into their world at various coordinates.

Answer Key: https://makecode.com/_1asifEeR4hUy

TUTORIAL 3: LINKED WALL (Expert - 20 minutes)

Main objective: The learner will use several different event handler interactions to position their player, build structures and replace existing blocks with other blocks of their choice.

Answer Key: https://makecode.com/_88T3ff9e28sH

EDUCATIONAL APPLICATION (20 minutes)

Subject Area: Language Arts

Main purpose of the activity:

  • Interact with multiple events to determine their path through the world.
  • Use the provided graphic organizer to plan out the 5 elements of the Short Story.
  • Use a camera and the book & quill to capture evidence from the events encountered.
  • Produce a well-developed Short Story that captures their Journey through the world.

Outcome of this activity:

The learner will have successfully visited all four locations, interacted with at least one event at each location and incorporated them into their completed short story in the book & quill. The player may elect to export their book & quill to share with others.

Possible Solution to this Activity: A Strange World (attached)

Performance Expectations

Ask the learners about the skills that they have practiced during the lesson to reinforce the concepts.

  • What does an event do?

An event uses the prescribed action to execute the code defined in the event handler.

  • Name three ways to trigger an event in Minecraft.

You can accept any of the following: on chat, on move, on use item, any iterations thereof.

  • In the game “Whack-a-mole” what is the event and what triggers the event?

The event is the score changing as a result of the player hitting the mole. The player hitting (or missing) the mole is the trigger.

  • What are the five key elements that go into every great short story?

The five key elements that go into every great short story are character, setting, conflict, plot and theme. 

  • How was the random generator used to help spawn animals in the tutorials?

The pick random position function was given a set of parameters that were chosen so they would be near enough to the player to be observed easily.

Skills

  • Creativity
  • Critical Thinking