1.4 Dress Up

Students will use events to trigger action and events to reset game.

OBJECTIVES



OBJECTIVES: By the end of this lesson, students will:

        • Trigger events, when sprites are clicked.

        • Initialize scene when green flag is clicked

        • Gain familiarity with move and glide commands.

TEACHER RESOURCES:

Standards

    • CSTA 2-AP-13: Decompose problems and subproblems into parts to facilitate the design, implementation, and review of programs.

CSTA

Do Now (5 minutes)

Digital Citizenship


Students watch the video Digital Life 101 (1:45) then answer the following discussion questions:

    • What types of technology did you see in this video? How is each technology being used, and what is it being used for?

    • What role does digital media play in your life?

Potential Responses

    • smartphones (used for texting, music, maps/directions, capturing video)

    • computers (used for internet searches, messaging, email, music, maps/directions, sharing/watching video, writing/commenting on blogs, video calling)

    • tablets (used for web browsing, online shopping)

Mini-Lesson (5-10 minutes)

Show students the three finished Scratch projects: Harper, Dani, Black Knight.

Let students know they can pick which project to work on.

Ask students what two events are triggering action?

      • EVENT: when a sprite is clicked, ACTION: sprite moves.

      • EVENT: when green flag clicked, ACTION: sprite resets to initial position

The goal of today's lesson is to realize that games and animations require a RESET - Initialization, before starting. In scratch, the green flag button, is commonly associated with RESET or START. In this game, when Green Flag clicked, resets sprites to their initial positions.

        • Explain that each sprite can be represented by it's position on screen. Use the move command to show different X,Y positions.

        • Ask students what the difference is between the move and glide commands? ( Move takes you straight there, Glide animates you there).

        • Ask the students why do you think they may want to use the front command? ( So that the sprite in-front can be seen.)

        • Show students how to move code between sprites. Video (14 seconds)


Project (20-30 minutes)

Go to student page or student handout to begin working on the project.

Close-Out (5 minutes)

Discuss the following questions:

    • What happens when you press the green button in your program?

    • What is the difference between the Move and Glide commands?

    • Where is location (0,0) on the stage? ( x coordinate equals zero, y coordinate equals zero)

Potential Responses

  • Clicking the green flag, resets the clothing sprites to their initial position.

  • Move command will pop you straight to a new location. Glide command takes a certain time to moves sprite to new location.

  • Multiple sprites should react to this event, which is known as parallelism.

  • Location (0,0) is the middle / center of the stage.

Standards CSTA

    • CSTA 2-AP-13: Decompose problems and subproblems into parts to facilitate the design, implementation, and review of programs.