Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 103 - logicode 2609 C5
P. 103

    In your previous class, you learnt different types of blocks and how to create custom sprites
                     and costumes. In this chapter, you will learn how to make a project with multiple sprites,

                     broadcast messages between them, tell stories, create games and even use AI in Scratch.

                               WORKING WITH MULTIPLE SPRITES

                     You can create projects that feature multiple sprites. Each sprite can be coded separately
                     allowing you to bring your project to life with fun interactions. Let’s create an exciting
                     project with two sprites that combines movement and sound using Scratch blocks. To

                     create a project with two sprites, follow the given steps:
                     Step  1    Choose multiple animal sprites from

                               the Scratch library.

                     Step  2    Select  a jungle-themed backdrop  to
                               create a natural environment.

                     Step  3    Change  the  size  and position  of the
                               sprites from the Sprite Info Pane.

                     Step  4    Click  the  Lion sprite  and  create  the
                               given script.

                                when    clicked

                                play sound  grunt  until done

                                glide  1  secs to x:  50  y:  30

                     Step  5    Click the   play sound  grunt  until done   block drop-down arrow to add sound.
                               If the desired sound is not available, you can add it from the Sound library under

                               the Sound tab.

                     Step  6    Click the   glide  1  secs to x:  0  y:  0   block text box to set the gliding position of

                               the sprite.

                     Step  7    Now, click  the  Monkey sprite  and create  the           when    clicked
                               given script.                                              wait  0.5  seconds

                     Step  8    Make the necessary changes in the blocks as per
                                                                                          say  Oh! Its a lion.  for  1  seconds
                               the script to bring your project to life.
                                                                                         glide  1  secs to x: -202 y:  56
                     Step  9    Click the Green Flag to run the project.
                                                                                         play sound Chee Chee  until done

                                                                                                     Scratch Meets AI  101

| 98 99 100 101 102 103 104 105 106 107 108 |