Game Development Reference
In-Depth Information
Increasing the horde
Limiing the ofensive power of the player helps to make the game a bit more challenging.
But a single group of ive enemies isn't much of an atack force to withstand. Let's give the
player some more work to do by increasing the number of enemies and then create more
enemy variants.
Engage thrusters
We will copy and edit a few scripts that we have already built to create more waves of
enemies as shown in the following steps:
1. Go to the enemy's
Scripts
tab.
2. Look at the
<green lag>
script and see how we first set the enemy sprite to the
correct posiion and then made a few clones in a limited
repeat
loop.
3. Right-click on the
wait
block just before the
repeat
loop and select
duplicate
.
This will create a copy of the block and everything underneath it.
4. Drag the copy to the botom of the script and click on it again to atach it.
5. Move the cursor back to the first
wait
command and repeat the process to create
four consecuive
repeat
loops.
6. Change the numbers in the second, third, and fourth
wait
block from
3
to
10
.
This will increase the ime between waves and makes sure one wave has moved
a good distance along the road before the next wave is spawned.
7. Instead of just five enemies to defeat, we now have 20, separated in four waves.
A fair challenge but sill not too exciing.