Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 101 - KEC_2615
P. 101

    SETTING THE SPRITE POSITION

                     The stage is divided into different values of x and y. Each dot on the stage is made
                     up of both x and y values. The value of x gives the horizontal (left to right) location

                     of the Sprite. The value of y gives the vertical (top to bottom) location of the Sprite.
                     The centre of the stage has x and y values as 0 (zero).

                                       block under Motions block helps you to fix the position of the sprite
                     at the specified location of a script. Sometimes due to some scripts, the sprite goes

                     beyond the stage. This block helps to bring the sprite to the desired location.

                               CREATING A SCRATCH PROJECT

                     As you know, a sprite is controlled by a list of instructions known as code or script.
                     You create Scratch programs by putting code blocks together. Let us create some

                     projects in Scratch. Programs are written in Scratch to move sprites in x and y
                     coordinates on the stage area.

                     ACTIVITY 1: MOVING A SPRITE

                     To move a sprite around the stage, you need to learn how to work with Motion
                     blocks. A sprite can be moved a few steps ahead or turned by different angles. Let

                     us now create a project that instructs a sprite to move.

                     Step  1     From the Events block, drag a                        block.

                     Step  2       From the Motion block drag a                         block.

                     Step  3     Click  on  the  number  box  and  change  it  to                         (The number
                                 determines how far across the screen you want the sprite to move.)

                     Step  4     Drag a                       block. The sprite will rotate 15 degrees clockwise.

                                 (To change the angle of turn, change the number of degrees and then

                                 click on the block to make the sprite turn.)

                     Step  5     Now, click on move box steps and change it to                            .

                     Step  6     Click the      to run your program.

                                                                                         Getting Started with Scratch3.0  99

| 96 97 98 99 100 101 102 103 104 105 106 |