Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 78 - 2607_Trackpad_Pro_5.1_flipbook_C6
P. 78

    This block  is  the  value  block  that  can  hold
                       Reporter Block
                                                  Rounded edges          numbers and strings.

                                                                         This block  loops  the other blocks  within it.
                       C-Block                                           It is also called a wrap block. This block is also
                                                                         used to repeat an action.
                                                     C shaped

                                                                         This block stops the script  from functioning.

                       Cap Block                                         It is shaped in such a way that no other block
                                                 Notch at the top
                                                  and fat bottom         can be placed below it.

                      Scratch blocks are divided into different categories based on their functions. In most of these
                      blocks, you can change the value in the block to suit your script. Let us learn about these blocks
                      in detail.

                      MOTION BLOCKS

                      Motion blocks are used to control the movement of a Sprite. They are blue in colour. Some motion
                      blocks need values for coordinates and directions.

                      Coordinates

                      Coordinates     are    numbers      that
                      represent the exact location in the form                             Y
                      of (X,Y) coordinates,  X is the sprite’s
                      horizontal  position.  The Y-coordinate                            3
                      is a sprite’s vertical position. X and Y                           2             (2,2)
                      coordinates  when written  together
                      indicate the exact location or position            (-2,1)          1

                      of the sprite on the stage.                                                                     X
                                                                       -3    -2     -1       (0,0) 1    2      3
                      While    writing    coordinates,     the                          -1
                      X-coordinate always comes first, and                              -2
                      the coordinates  are separated  by  a
                      comma. For example, an X- coordinate                              -3
                      of 2 and a Y-coordinate of 2 would look
                      like this: (2, 2). In the very center of the
                      Stage is a point marked (0, 0), which is
                      called the origin.

                      In the same way, Scratch determines the positions on its screen. Positions are known as pixels in
                      Scratch. The ‘X’ and ‘Y’ positions in Scratch are used to determine the location of a sprite (object)
                      on the stage.

                       76   Premium Edition-VI

| 73 74 75 76 77 78 79 80 81 82 83 |