Welcome back.
Now we've made quite a few changes and added quite a few features.
I'm going to run in debug mode and I think it's about time that we test things in multiplayer and make
sure that we don't have any issues.
So I'm going to set my number of players to two and my net mode to play as listen server and I'm going
to see what happens.
First of all, I want to make sure that we get some damage done to us with that melee attacker.
And I see my health going down.
I can full screen this and damage appears to be working.
We get the damage numbers as well.
I saw a block earlier, so that's looking good.
And it looks like we got an exception.
Let's see what happens here.
So here we have ora enemy hit react tag changed.
And that's taking us to the ora enemy class.
Where right here we have get blackboard component.
We're calling a function on it and it looks like we're trying to use a invalid memory location here.
Now, this makes sense because hit react tag Changed is being called on both server and clients, but
our ora AI controller isn't going to be valid on clients.
It's only going to be valid on the server.
So this should be an easy enough fix.
We should be able to just check that pointer for whether or not it's null.
So I'm going to place an If check here.
I'm going to go ahead and check ora AI controller as well.
So we'll say ora AI controller and ora AI controller get blackboard component.
And if those are both valid, then we'll go ahead and set that value as bool.
The hit reacting blackboard key.
Let's go ahead and play test this again.
Okay, so I'm going to press play.
We're still playing in a multiplayer game and things are looking good.
I'm going to make that enemy hit React and that's looking good.
It's hit reacting just fine.
Excellent.
Hit reacting.
Looking good.
Let's do it on the other one, which is the server.
And of course we can test this in the play as client mode.
Testing a dedicated server.
Both of these are clients.
Both should be behaving the same.
Things look like they're working?
Yes.
Things are working perfect.
Okay.
So that was a pretty successful test.
I don't see any other problems.
If they pop up, we'll deal with them.
But things look like they're working just fine.
I'm going to set this back to play as listen server and set the number of players to one.
That way we just play with the server character.
Excellent.
Great job and I'll see you in the next video.