Time for action – Rage mode activate
A lot of games have the boss change into a different form as it gets weaker, or use stronger attacks. Let's do the same thing with our boss by having him switch from spawning minions to shooting rockets right at your face. That'll teach you.
To do this, we'll create a subclass of the
Seeking
state inAwesomeBoss
and call itStageTwo
:state StageTwo extends Seeking { }
Now let's rewrite the
Attack
function here:function Attack() { local UTProj_Rocket MyRocket; MyRocket = spawn(class'UTProj_Rocket', self,, Location); MyRocket.Init(normal(Enemy.Location - Location)); MyMesh.SetMaterial(0, AttackingMat); SetTimer(1, false, 'EndAttack'); }
The Init
function for the projectile tells it which direction to travel.
Now to tell it when to move into this state. We'll do this in
TakeDamage
:event TakeDamage(int DamageAmount, Controller EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional...