Time for action – Bossing around
Alright, let's get this going! We'll be working in AwesomeBoss.uc
for this.
The first thing we'll need to do is make sure the states are working properly, so make sure we have the
simulated
keyword on all of the functions in theSeeking
andStageTwo
states.The
Attack
functions in those two states both callEndAttack
, but if we look inAwesomeEnemy
that function isn't simulated. Let's add thesimulated
keyword to it.As it is now, the boss won't enter the
StageTwo
state on the client because the call to do that is in theTakeDamage
function, which isn't simulated. We don't want the client running that function since it's the server's job to keep track of that, so instead let's add a variable we can use in a similar way to what we did with the minions to get them to flee. Add this variable toAwesomeBoss
:var bool bStageTwo;
Now let's add that to a replication block for
AwesomeBoss
:replication { if(bNetDirty) bStageTwo; }
Now let's alter the
TakeDamage...