1. Draw costumes

In this practice we are going to program a game that consists of drawing different characters on the screen applying effects such as rotation or resize.

_images/scratch3-p12-screen.png


  1. We start the Scratch editor.


  2. Press the language button boton-idioma in the top bar and choose English.


  3. We add a new extension with the button add extension aniadir-extension down left.

    We select the Pencil extension to be able to draw.

    _images/scratch3-extension-lapiz.en.png

    A new icon will appear in the code bar, the Pencil boton-lapiz, with dark green instructions.


  4. In the costumes tab pestania-disfraces, we delete one of the cat's costumes and add several more characters that we like.

    _images/scratch3-p12-disfraces.en.png


  5. Now in the code tab pestania-codigo, we are going to add a small program that is executed when the flag is clicked.

    _images/scratch3-p12-prog01.en.png


  6. Press the green flag bandera-verde to test the operation of the program.

    Pressing the flag will clear the entire screen and moving the mouse will cause the cat to move across the screen.


  7. We will complete the program with functions for pressing various keys.

    _images/scratch3-p12-prog02.en.png


    _images/scratch3-p12-prog03.en.png


  8. Press the green flag bandera-verde to test the operation of the program.

    Pressing the arrow keys now makes the costume increase and decrease in size and rotate from right to left.

    With the space key you will change the costume.

    Clicking on the screen will seal the costume.



Challenges

  1. Create a drawing made of various costumes sealed on the screen, with different sizes and twists.


  2. Add new costumes and a setting to make a more complete drawing.


  3. Adds a new function so that pressing the "a" key will stamp the costume on the screen 24 times. Each time it is sealed, the costume will rotate 15 degrees.


  4. Adds a new function so that pressing the "b" key will seal the costume on the screen 6 times. Each time it is sealed, the costume will increase in size by 10.