Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 105 - logicode 2609 C5
P. 105

    when  space   key pressed                       when I receive  Wizard's reaction

                      say  My magic broom, where are you!  for  2  seconds  say  I am coming my dear Mistress of Magic!  for  2  seconds

                      broadcast  Wizard's reaction                    glide  3  secs to x:  -51  y:  -105

                     Step  9    Press the Spacebar key to run your project.

                          Tick ( ) if you know this.

                          ▶    The Broadcast and Receive blocks are found in the Events block category.

                          ▶   Broadcast  and Receive blocks  are useful for  controlling different parts of a
                              story/game.

                               VARIABLES

                     Variables are like labelled boxes that store information your
                     program can use, change and display. You can use them to
                     store  numbers,  text  or  other information  that needs  to  be

                     updated or referenced throughout your project. You can create
                     your own variable by clicking on Make a Variable button.
                     There are two types of variables in Scratch:

                       Global  Variables: These variables  are created  on any                Create a New Variable
                        sprite and can be accessed or modified by other sprites in
                        the project by choosing For all sprites.
                       Local Variables: These variables are created for a specific sprite and can only be used

                        by that sprite, selected by choosing For this sprite only.
                     The variable blocks used in Scratch are:

                                                       This block refers to a custom variable that you create in
                                         my variable
                                                       your project.

                           set  my variable  to  0     This block sets the selected variable to a specific value.

                                                       This block adds  or subtracts  a certain  number to  the
                        change my variable  by  1
                                                       variable.

                                                                                                     Scratch Meets AI  103

| 100 101 102 103 104 105 106 107 108 109 110 |