Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Scratch 2.0 Game Development Hotshot

You're reading from   Scratch 2.0 Game Development Hotshot Get up to date with Scratch 2.0 and build brilliant games without having to code. Including 10 exciting projects that cover most game genres, you'll quickly learn the sophisticated possibilities of Scratch. Have fun!

Arrow left icon
Product type Paperback
Published in Feb 2014
Publisher
ISBN-13 9781849697569
Length 330 pages
Edition Edition
Tools
Arrow right icon
Toc

Table of Contents (18) Chapters Close

Scratch 2.0 Game Development HOTSHOT
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Blowing Things Up! FREE CHAPTER 2. Beating Back the Horde 3. Start Your Engines 4. Space Age 5. Shoot 'Em Up 6. Building a Worthy Boss 7. Creating a Level Editor 8. Dungeon Crawl 9. Hunger Run 10. Sprites with Characters The New Scratch Interface Index

Tying up loose ends


The game is almost complete. There are just a few final adjustments to be made for all the sprites to interact properly.

Engage thrusters

Let's first solve the issue where the enemies don't respond to being hit by the sword or the arrow. What we are lacking is a collision check for these items. This can be easily fixed by the following steps:

  1. We look at the Knight scripts.

  2. In the clone script, we find a collision detection for the explosion block. We can add more checks here.

  3. We expand the existing condition with the or touching <sword>? or touching <arrow>? block.

  4. Then, we switch to the ghost sprite and add the same blocks there.

That fixes our collision problem, but not all the problems. As you may have noticed, the cat isn't actually harmed when touched by either one of the enemies. That's rather unfair, so let's change that as well.

  1. We check the scripts for the cat sprite.

  2. There we also find a collision check for explosion.

  3. We add to this an if touching <Knight...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image