Game Development Reference
In-Depth Information
In the last secion, we will add the hit point bar for our character and the enemy to show
how much is the damage caused when we are atacked by the enemy or when we shoot at
the enemy.
Why Is It Awesome?
When we complete this chapter, we will be able to create the simple AI behavior, which is
smart enough to detect the player and response to the player's reacion. From this chapter,
we begin to create a smart AI for any kind of game. Most of the methods or equaions in
this chapter are very straighforward and easy enough to create a simple AI, and can be
developed to make the AI smarter.
Your Hotshot Objectives
We will use the New3PSController script from the last chapter for our character and the
rocket launcher. For the enemy, we will adapt the CharacterControl script from Project 4 ,
The Hero/Heroine Part II - Animaion and Controls , to control the AI movement and behavior
by implemening the new waypoint system to limit the movable area of our enemy. Then,
we will create the hit point UI for both player and enemy, as well as the Restart buton when
either one dies. Here are the steps that we will go through in this chapter:
F Creaing the waypoint and gizmos
F Creaing an AI enemy
F Creaing the enemy movement with AIController script
F Creaing a hit-point UI
Mission Checklist
First, we need the project created in Project 5 , Creaing a Rocket Launcher , and assets for
this chapter . We can start a new project by going to the URL http://www.packtpub.
com/support?nid=8267 and downloading the Chapter 6 package. The package will
contain all resources from Project 5 , Creaing a Rocket Launcher , and some new assets for
this chapter.
 
Search WWH ::




Custom Search