WEBVTT

00:06.900 --> 00:07.920
Welcome back.

00:08.010 --> 00:12.530
Now we've made quite a few changes and added quite a few features.

00:12.540 --> 00:18.870
I'm going to run in debug mode and I think it's about time that we test things in multiplayer and make

00:18.900 --> 00:21.480
sure that we don't have any issues.

00:21.570 --> 00:27.570
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

00:27.570 --> 00:28.860
to see what happens.

00:28.890 --> 00:35.100
First of all, I want to make sure that we get some damage done to us with that melee attacker.

00:35.100 --> 00:37.200
And I see my health going down.

00:37.200 --> 00:41.460
I can full screen this and damage appears to be working.

00:41.460 --> 00:43.580
We get the damage numbers as well.

00:43.590 --> 00:46.680
I saw a block earlier, so that's looking good.

00:48.280 --> 00:51.250
And it looks like we got an exception.

00:51.280 --> 00:53.560
Let's see what happens here.

00:53.590 --> 00:57.580
So here we have ora enemy hit react tag changed.

00:57.790 --> 01:00.850
And that's taking us to the ora enemy class.

01:00.850 --> 01:04.480
Where right here we have get blackboard component.

01:04.480 --> 01:13.780
We're calling a function on it and it looks like we're trying to use a invalid memory location here.

01:13.900 --> 01:20.950
Now, this makes sense because hit react tag Changed is being called on both server and clients, but

01:20.950 --> 01:25.180
our ora AI controller isn't going to be valid on clients.

01:25.180 --> 01:27.470
It's only going to be valid on the server.

01:27.490 --> 01:30.220
So this should be an easy enough fix.

01:30.220 --> 01:35.190
We should be able to just check that pointer for whether or not it's null.

01:35.200 --> 01:38.740
So I'm going to place an If check here.

01:38.740 --> 01:42.510
I'm going to go ahead and check ora AI controller as well.

01:42.520 --> 01:48.320
So we'll say ora AI controller and ora AI controller get blackboard component.

01:48.320 --> 01:54.680
And if those are both valid, then we'll go ahead and set that value as bool.

01:54.710 --> 01:57.650
The hit reacting blackboard key.

01:57.680 --> 01:59.750
Let's go ahead and play test this again.

02:00.290 --> 02:02.840
Okay, so I'm going to press play.

02:02.840 --> 02:07.520
We're still playing in a multiplayer game and things are looking good.

02:07.520 --> 02:11.840
I'm going to make that enemy hit React and that's looking good.

02:11.840 --> 02:14.180
It's hit reacting just fine.

02:14.540 --> 02:15.440
Excellent.

02:17.820 --> 02:19.110
Hit reacting.

02:19.440 --> 02:20.820
Looking good.

02:21.850 --> 02:24.220
Let's do it on the other one, which is the server.

02:24.220 --> 02:29.380
And of course we can test this in the play as client mode.

02:30.140 --> 02:31.910
Testing a dedicated server.

02:31.910 --> 02:33.490
Both of these are clients.

02:33.500 --> 02:36.950
Both should be behaving the same.

02:38.150 --> 02:40.130
Things look like they're working?

02:40.340 --> 02:41.090
Yes.

02:41.090 --> 02:43.970
Things are working perfect.

02:44.420 --> 02:45.020
Okay.

02:45.020 --> 02:47.700
So that was a pretty successful test.

02:47.720 --> 02:49.400
I don't see any other problems.

02:49.400 --> 02:51.170
If they pop up, we'll deal with them.

02:51.170 --> 02:54.210
But things look like they're working just fine.

02:54.230 --> 02:59.180
I'm going to set this back to play as listen server and set the number of players to one.

02:59.390 --> 03:03.170
That way we just play with the server character.

03:08.120 --> 03:08.990
Excellent.

03:10.690 --> 03:13.300
Great job and I'll see you in the next video.
