Book Image

Scratch 2.0 Game Development Hotshot

Book Image

Scratch 2.0 Game Development Hotshot

Overview of this book

Table of Contents (18 chapters)
Scratch 2.0 Game Development HOTSHOT
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating cannons


Now that we have enemies running around our game, we need to find a way to stop them. To do this, let's use the tried and tested way of shooting them to bits. In our last game, we already made something to shoot with—the cannon and the cannonball. We can easily reuse these sprites in this game and write new scripts for them.

Prepare for lift off

To transfer sprites and scripts from one project to another easily, we can use the new Backpack feature. Look at the bottom of the Scratch window and you will see a narrow bar with the word Backpack on it and a small arrow pointing up. Click on the bar to open your backpack. If you haven't used this feature before (or aren't logged into your account), your backpack will be empty.

We will get the sprites from the previous project and place them in the backpack as shown in the following steps:

  1. First, save your active project so you won't lose any progress that you've made.

  2. To save, click on the File drop-down menu, and select Save now...