UnrealScript Game Programming Cookbook

(Chris Devlin) #1

8


Miscellaneous Recipes


In this chapter, we will be covering the following recipes:


f Creating an army of companions
f Having enemies flash quickly as their health decreases
f Creating a crosshair that uses our weapon's trace
f Changing the crosshair color when aiming at a pawn
f Drawing a debug screen
f Drawing a bounding box around pawns

Introduction


In the previous chapters, we've covered topics that ranged from weapons and navigation, to
a heads-up display and AI. In this chapter, our recipes are going to cover things that may not
necessarily fit in one particular chapter, but are still very valuable in a number of applications.


We'll go over a new scheme for aiming our weapons and drawing a crosshair, as well as
allowing our pawn to flash continuously as its health depreciates, among other things.


Creating an army of companions


Going through a game alone is seldom any fun. We're social creatures so we enjoy the
company of others. What better way to celebrate this than by creating a group of companions
to follow us along on our journey? In this chapter, we'll explore how to create a small party of
companions who spawn at our location and reap the rewards of our adventure!

Free download pdf