WEBVTT

00:06.820 --> 00:08.010
Welcome back.

00:08.050 --> 00:11.290
So we're ready to make a ghoul enemy.

00:11.380 --> 00:14.110
And that's going to involve several steps, isn't it?

00:14.110 --> 00:19.600
Because we need several things that are ghoul enemy may not have yet.

00:19.600 --> 00:22.240
So let's start at the beginning.

00:22.360 --> 00:29.830
We're going to go into content, blueprints and character where we have our goblin slingshot and Goblin

00:29.830 --> 00:30.550
Spear.

00:30.580 --> 00:39.040
Let's make a new folder called Ghoul, and our Ghoul is going to have a character blueprint based on

00:39.040 --> 00:46.570
enemy base and an animation blueprint based on an enemy just like our spear, goblin and Goblin Slingshot

00:46.600 --> 00:47.170
have.

00:47.290 --> 00:56.200
So first I'm going to right click on Enemy Base, create a Child Blueprint class and call this Bpy underscore

00:56.200 --> 00:56.980
Ghoul.

00:56.980 --> 00:59.620
And I'm going to move that into the Ghoul folder.

01:00.010 --> 01:07.280
I'm also going to right click on AVP Enemy and create a Child and in Blueprint with Skeleton choosing

01:07.280 --> 01:15.080
the ghoul skeleton SRC ghoul create child and call this AVP underscore ghoul.

01:15.770 --> 01:18.140
So we have that as well.

01:18.140 --> 01:20.390
We'll move that into the ghoul folder too.

01:20.840 --> 01:28.190
Now for the ghoul, let's open up ghoul and first we can set its skeletal mesh.

01:28.190 --> 01:36.770
We're going to choose Mesh selecting Ghoul and I'm going to go ahead and press E I have snapping enabled,

01:36.770 --> 01:42.800
in fact 45 degree increments and I'm going to go ahead and move the ghoul down.

01:44.950 --> 01:48.250
Like so and I think that's pretty good.

01:48.700 --> 01:52.240
I'm okay with its head being completely out of the capsule.

01:52.390 --> 01:54.700
I think that's totally fine.

01:54.940 --> 01:58.600
But of course we can always adjust right now weapon.

01:58.600 --> 02:05.170
We're going to leave blank, but we're going to take BP Google Self and just take a look at some of

02:05.170 --> 02:08.020
the properties that we want to set here.

02:08.020 --> 02:10.270
We have combat lifespans.

02:10.270 --> 02:11.230
Five seconds.

02:11.230 --> 02:13.390
That's for when the ghoul dies.

02:13.420 --> 02:15.100
We have attack montages.

02:15.100 --> 02:17.170
We're going to need some montages.

02:17.170 --> 02:19.210
We have the weapon tip socket name.

02:19.210 --> 02:22.450
Well, it doesn't have a weapon, so we can leave that at none.

02:22.450 --> 02:27.340
But we did create left and right hand sockets on the skeletal mesh.

02:27.340 --> 02:30.640
We have left hand socket and right hand socket.

02:30.670 --> 02:32.830
We can set those here on BP ghoul.

02:32.830 --> 02:37.390
So left hand socket name will be left hand socket.

02:37.870 --> 02:42.190
Right hand socket name will be right hand socket.

02:42.580 --> 02:45.130
Now we need to hit react montage.

02:45.130 --> 02:47.800
So why don't we create that real quick?

02:47.800 --> 02:56.590
We'll go into content assets enemies, ghoul animations and looks like there's a typo in animations

02:56.590 --> 02:57.490
on mine.

02:57.490 --> 03:01.990
By the time you've taken the course you'll likely see that that's been fixed.

03:01.990 --> 03:03.640
I'm going to go ahead and fix it here.

03:05.210 --> 03:07.690
And we're going to make a hit React montage.

03:07.700 --> 03:09.620
I'm going to right click on Hit React.

03:09.800 --> 03:20.690
We're going to create and in montage and this will be a m underscore hit, react, underscore Google

03:20.690 --> 03:22.790
and I'm going to open it up now.

03:22.790 --> 03:27.350
Let's see what some of our other montages have in them.

03:27.350 --> 03:29.270
We're going to go to enemies.

03:29.300 --> 03:34.250
Let's go to Goblin Animations spear and see the hit React.

03:34.250 --> 03:35.540
And I see that it's empty.

03:35.570 --> 03:41.540
We're not doing anything here, so we can just leave that hit React for the Google as well.

03:41.660 --> 03:48.830
So we'll go back to BP, Google and set this hit React montage to a m hit React Google.

03:49.600 --> 03:51.700
And that takes care of that.

03:52.330 --> 03:53.570
Okay.

03:53.590 --> 04:01.210
We also have default primary attributes, secondary and vital, but those are actually not used anymore.

04:01.240 --> 04:05.610
That's something that we set in the data asset.

04:05.620 --> 04:12.400
So our ghoul should be initialized from that data asset provided that it has the correct class type.

04:12.430 --> 04:13.960
The character class.

04:13.960 --> 04:16.020
And that's under character class defaults.

04:16.030 --> 04:18.070
Character class here should be warrior.

04:18.100 --> 04:19.660
That's what it is by default.

04:19.660 --> 04:20.830
So that looks good.

04:21.130 --> 04:26.230
Okay, so we also need an animation blueprint assigned to our ghoul.

04:26.230 --> 04:33.220
Let's go to our animation blueprint and content Blueprints, Character ghoul, a Ghoul.

04:33.220 --> 04:37.660
And the only things we need to set here are the asset overrides.

04:37.660 --> 04:39.730
But we need a blend space.

04:39.730 --> 04:41.440
We don't have one for the ghoul.

04:41.440 --> 04:48.540
So we're again going to need to go back to our animations folder for the ghoul.

04:48.550 --> 04:54.350
I have my hit React, I'm going to browse to it and we need a blend space for idle walk.

04:54.350 --> 04:54.890
Run.

04:54.910 --> 04:58.580
Looks like I have an idle animation and a walk animation.

04:58.580 --> 05:00.830
These are perfect for a blend space.

05:00.830 --> 05:08.480
So we're going to right click, go to animation, go to blend space and choose our school and call this

05:08.510 --> 05:12.110
BS underscore idle walk.

05:12.110 --> 05:13.370
We'll call it idle walk.

05:13.400 --> 05:14.780
We'll open it up.

05:14.780 --> 05:17.960
And how fast is our ghoul going to travel?

05:17.960 --> 05:21.920
Well, we're not sure yet, but we're going to have horizontal axis.

05:21.920 --> 05:23.540
We're going to call it speed.

05:23.570 --> 05:25.580
The minimum can be zero.

05:25.610 --> 05:26.210
The max.

05:26.210 --> 05:29.360
We'll just leave it at 100 and we'll drag the idle in.

05:29.360 --> 05:35.750
I'm going to hold shift so it snaps all the way to zero and I'm going to drag, walk and shift, snap

05:35.750 --> 05:37.240
it to 100.

05:37.250 --> 05:39.770
So we have an idle walk.

05:40.630 --> 05:41.350
Okay, cool.

05:41.350 --> 05:47.320
So now that we have this blend space, we'll go ahead and save it and go back to app Google and choose

05:47.830 --> 05:52.420
Idle walk, compile, save and go back to our Google.

05:52.420 --> 05:57.520
Choose the mesh and use this animation blueprint app Google.

05:57.520 --> 06:02.560
And now we see that our Google is idling and it's looking pretty cool.

06:02.590 --> 06:04.960
Okay, so that was kind of a lot.

06:04.960 --> 06:08.170
But stuff that, you know, stuff that you've done before, right?

06:08.200 --> 06:10.630
We can compile and save that now.

06:10.630 --> 06:12.660
How's the Google going to move around?

06:12.670 --> 06:16.240
Well, it needs a behavior tree, doesn't it?

06:16.240 --> 06:24.520
So if we search for behavior Tree and we'll have to click on Google Self, we see that it has a behavior

06:24.520 --> 06:24.790
tree.

06:24.790 --> 06:28.390
That's because that's set in the base blueprint for our enemies.

06:28.390 --> 06:31.360
But it's good to check just to make sure it's set there.

06:31.390 --> 06:32.230
All right.

06:32.230 --> 06:35.800
So the next thing is to add some attack montages.

06:35.800 --> 06:38.500
I think that's a good thing to do in the next video.

06:38.500 --> 06:44.990
In the meantime, though, we can place one of these in the world and just kind of see what happens

06:44.990 --> 06:46.220
when we press play.

06:46.250 --> 06:51.320
So I'm going to take my BP ghoul and browse to it and then drag one out here.

06:51.930 --> 06:53.370
Right about there.

06:53.370 --> 06:57.960
And I'm just going to save all and press play.

06:58.890 --> 07:03.240
And here we see it is walking towards me.

07:03.510 --> 07:05.310
It's chasing me.

07:05.430 --> 07:07.650
And it looks like it hit reacted.

07:07.650 --> 07:08.580
Something hit it.

07:08.580 --> 07:10.770
Oh, it looks like the enemy hit it.

07:11.010 --> 07:13.070
I can also hit it myself.

07:13.080 --> 07:14.250
So that's working.

07:14.250 --> 07:15.390
So it's looking great.

07:15.390 --> 07:21.840
It has a little bit of clunkiness when it turns kind of like our enemy goblins had before we went into

07:21.840 --> 07:28.230
the blend space and set our setting for the weight right here under sample smoothing, we have weight

07:28.230 --> 07:28.920
speed.

07:28.920 --> 07:35.550
I'm going to set that to a value of about four and see if that looks a little bit better for our enemy.

07:35.580 --> 07:41.070
Now, another thing is our enemies walking a little bit too fast for its animation.

07:41.070 --> 07:48.270
So that's something I'd like to fix, but I am seeing that the enemy is still clunky and I do get a

07:48.270 --> 07:49.560
blueprint runtime error.

07:49.560 --> 07:54.060
We're trying to access index zero from Git attack montages.

07:54.060 --> 08:00.220
That's because our attack is trying to get index zero from an array that's empty.

08:00.220 --> 08:08.350
So really we should be checking length and making sure that it's greater than zero so we can have a

08:08.350 --> 08:10.540
condition here for that.

08:10.690 --> 08:12.670
I know that this is a little messy.

08:12.670 --> 08:17.680
I'd like to move this into C plus plus, but we're going to make sure that that's the case.

08:17.710 --> 08:20.920
Otherwise, I think we could just call end ability here.

08:22.810 --> 08:28.510
So making sure not to try to index an array out of bounds in blueprint blueprints.

08:28.540 --> 08:32.740
Nice to us in C plus plus, if we try to do this, it would crash, right?

08:32.830 --> 08:36.030
But let's go back to our BP goal.

08:36.040 --> 08:41.020
Let's make sure that use controller rotation, pitch yaw and roll.

08:41.020 --> 08:42.330
Those are all false.

08:42.340 --> 08:43.180
Perfect.

08:43.210 --> 08:50.140
We do want to use controller desired rotation on the character movement component and we want to check

08:50.140 --> 08:51.670
out the rotation rate.

08:51.670 --> 08:53.590
It's set to 360.

08:53.620 --> 08:56.530
We may want that rotation rate a little lower.

08:57.580 --> 08:59.050
I'm going to try 100.

09:01.900 --> 09:03.970
That might actually be too low.

09:04.000 --> 09:05.510
Yeah, that's way too low.

09:05.530 --> 09:07.690
Let's set it to 200.

09:08.080 --> 09:10.930
We'll maybe hone in on that before we wrap up.

09:12.660 --> 09:15.150
I think that's looking better.

09:18.890 --> 09:23.570
And of course, it's not going to get to attack me until we have some attack montages made.

09:23.570 --> 09:24.790
We'll do that next.

09:24.800 --> 09:27.530
But yeah, I think that's looking pretty good.

09:27.530 --> 09:35.600
And also, I did mention it's walking too fast, so we do have a walk speed variable that we added,

09:35.630 --> 09:37.310
I believe.

09:37.340 --> 09:39.080
Let's see what we called it.

09:39.110 --> 09:42.260
It was in the aura enemy class.

09:42.260 --> 09:45.230
We're setting it in hit react tag changed.

09:45.230 --> 09:53.420
We're setting the max walk speed to our variable base walk speed and I believe that should be exposed.

09:53.540 --> 09:57.800
Base walk speed is it's actually just blueprint read only.

09:57.800 --> 10:03.830
I'd like to expose that to the details panel so we can make our ghoul walk a little slower.

10:03.830 --> 10:08.020
So I'm going to close and just really quickly make this edit.

10:08.030 --> 10:09.500
We'll make it edit anywhere.

10:11.940 --> 10:15.420
And I'm going to adjust that on my Google blueprint.

10:16.690 --> 10:17.170
All right.

10:17.170 --> 10:19.030
Let's go ahead and open that back up.

10:19.620 --> 10:26.100
Here in the BP Goole open full blueprint editor I'm going to look for base walk speed and I'm going

10:26.100 --> 10:28.020
to set it down to a lower value.

10:28.020 --> 10:32.940
Let's first try 150, see if that doesn't look too low.

10:33.920 --> 10:36.890
That looks a great deal better.

10:37.160 --> 10:42.140
In fact, I might put it down to about 125, but not much lower.

10:42.990 --> 10:44.910
Let's see how that looks for our Google.

10:45.660 --> 10:48.120
He is just a big, lumbering guy.

10:49.370 --> 10:50.300
That looks good.

10:53.790 --> 10:56.520
Now he's turning a little bit quickly, I think.

10:56.640 --> 10:59.960
And this really just has to do with his sheer size.

10:59.970 --> 11:06.300
But I'm going to set his rotation rate to probably 150.

11:06.300 --> 11:07.110
But.

11:08.020 --> 11:09.760
We'll see if that's too low.

11:10.670 --> 11:13.130
No, that looks pretty good, actually.

11:15.220 --> 11:17.410
Yeah, it's going to be a slower anime.

11:18.150 --> 11:19.770
And it can take damage.

11:20.450 --> 11:21.440
Excellent.

11:23.000 --> 11:23.630
Okay.

11:23.630 --> 11:26.210
And I know that our enemies take way too much damage.

11:26.210 --> 11:28.940
Their health is too high for a level one enemy.

11:28.940 --> 11:29.600
I know.

11:29.600 --> 11:34.100
So that's something we are definitely going to fix, one thing at a time.

11:34.100 --> 11:34.760
Right.

11:34.760 --> 11:36.140
But we have an enemy.

11:36.170 --> 11:37.340
A second enemy, actually.

11:37.340 --> 11:38.240
A third enemy.

11:38.240 --> 11:39.950
Two different kinds of goblins.

11:39.950 --> 11:44.810
And we have this big dude, so great.

11:44.840 --> 11:46.340
Now it's not attacking.

11:46.340 --> 11:48.260
We need to make some attack montages.

11:48.260 --> 11:51.440
We need to set its array of attack montages.

11:51.440 --> 11:55.100
So a couple things left to do, and we'll do that next.

11:55.370 --> 11:57.800
Excellent job and I'll see you soon.
