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
Gamesalad Essentials

You're reading from   Gamesalad Essentials Create awesome cross-platform games in no time, and with no coding

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher
ISBN-13 9781784391973
Length 154 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Miguel DeQuadros Miguel DeQuadros
Author Profile Icon Miguel DeQuadros
Miguel DeQuadros
Arrow right icon
View More author details
Toc

Creating enemies


Let's start setting up our enemies. If you haven't drawn some up yet, no worries, you can use the ones I've created. Import all the enemy images into our project and create a new actor from the images. Open it up so we can bring the enemy to life.

First thing we should do is change his Bounciness to 0; we don't want him bouncing all over the place.

Secondly, we want to drag in a Collide behavior, and change the options so it's colliding with Any actor in the Platform tag.

If you want, you can de-select the Fixed Rotation option under the Physics drop down. This way, if your enemy falls off a platform, he doesn't flip around like crazy and fall flat on his face. For this guy, however, I am going to allow him to automatically rotate because when he reaches inclines and declines, I want him to rotate accordingly.

I also changed his Max Speed option to 250 so he doesn't start moving superfast.

Tip

Try this

Do you want an infinite horde of enemies instead of having to place them all...

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