Time for action — making some enemies
Players look for challenge and reason to play a game. Let us give our game one by adding in some enemy robots.
1. On the
Objects
layer of our layout, create aSprite
calledSentryBot
and paste our robot body into it. Place thehotspot
of this object at its middle-bottom position (num-pad 2).2. Set this object to
Auto Mirror
and scale it to being roughly shorter than the player objects. Add an image point1
at the centre of the shoulder hole for the robot and add it to the familyEnemy
. Change theRotation
setting of the object toNo rotation
.3. Next, create another sprite named
TurretArm
and paste in the robot's gun image. Change theCollisions
mode toNone
and go back to theSentryBot
object to addTurretArm
into its container.4. Now place multiple
SentryBot
objects around the level. Remember that theTurretArm
objects are automatically created at runtime and do not need to be added in.5. Create a
Sprite
calledEnemyFire
and paste the laser shot graphic...