Book Image

Scratch 2.0 Beginner's Guide: Second Edition

By : Michael Badger
Book Image

Scratch 2.0 Beginner's Guide: Second Edition

By: Michael Badger

Overview of this book

Table of Contents (18 chapters)
Scratch 2.0 Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – flipping the cat right-side up


Let's tweak our script so the cat rotates right-side up and see if we can speed up our steps:

  1. Scratch 2.0 introduced the set rotation style block in the Motion palette that will set our cat right-side up. From the Motion palette, find the set rotation style () block and add it to your script after the set rotation style () block. The default attribute for the set rotation block is left-right, which fixes our problem.

  2. Click on the stack of blocks to run the script. Your script should look like the following screenshot:

  3. Now, let's address the choppy movement of the sprite. From the Looks palette, drag the next costume block into the scripts area. Don't attach it to the script yet because we want to expose another one of Scratch's features. If the cat is still moving, you can stop it by clicking the stop sign.

  4. Click the next costume block directly. And then, repeatedly click on the block so that you see the cat switching between its costumes with...