Time for action – Creating and spawning the boss
Let's start by creating the boss class:
Create a new file in
Development\Src\AwesomeGame\Classes
calledAwesomeBoss.uc
.Let's write the class declaration:
class AwesomeBoss extends AwesomeEnemy;
We'll change two default properties to make him bigger and slower than the minions:
defaultproperties { MovementSpeed=128.0 Begin Object Name=EnemyMesh Scale3D=(X=1.0,Y=1.0,Z=2.0) End Object Begin Object Name=CollisionCylinder CollisionRadius=128.0 CollisionHeight=256.0 End Object }
This will make him pretty huge.
Now that we have the basic boss class created, let's integrate him into the game. As we don't want the game to end when the minions are defeated, let's change the way their deaths are reported. First, delete the
EnemyDied
function fromAwesomeEnemySpawner
.Now, let's rewrite the
TakeDamage
function in ourAwesomeEnemy_Minion
class:event TakeDamage(int DamageAmount, Controller EventInstigator, vector HitLocation, vector Momentum...