Game Development Reference
In-Depth Information
Create a new when I start as a clone script.
You can't use the other one, because that will be busy gliding the clones from
point to point. These glide blocks are efecively worked through one at a ime.
So the script will pause for a short while at each step. Adding a repeated condiion
check would disrupt the fluid movement of the enemy sprites.
Add a forever loop.
Place the copied segment inside the forever loop to check coninuously.
Now change the object to be checked to cannonball .
You can remove the wait … secs block because the enemy is allowed to
respond immediately when it touches a cannonball.
Save the project.
Objective complete - mini debriefing
Test your game and see how it works. The bare basics of the game are now in place. Enemies
move along a given path and you can place cannons that shoot cannonballs at them to stop
the horde from reaching their desinaion. You might also note that this game is way too
easy. Cannonballs are spawned at a rapid rate and cannons can be placed anywhere on the
field in large numbers. This makes it impossible for the enemies to reach the other side of
the map intact, unless you decide to do nothing.
The rest of the project will focus on adding more to the basic scripts to make the game more
challenging. We will slow down the spawning of cannonballs, create more enemies, and limit
where and when you can place cannons.
Search WWH ::

Custom Search