WEBVTT

00:06.810 --> 00:07.830
Welcome back.

00:07.860 --> 00:11.370
It's time to make our demon attack montage.

00:11.580 --> 00:17.510
Now the thing is, we can make a melee attack with our tail swipe or we can make a ranged attack.

00:17.520 --> 00:18.960
So why not both?

00:18.990 --> 00:21.110
Let's start with a melee attack.

00:21.120 --> 00:28.410
We're going to go into the animations folder and we have an attack L and attack R so we can have two,

00:28.440 --> 00:32.420
much like our ghoul has a left and right attack.

00:32.430 --> 00:35.640
So here's our left attack.

00:35.640 --> 00:37.230
I'm going to right click on it.

00:37.230 --> 00:45.600
Go to create create anim montage and call this Am attack demon L.

00:45.900 --> 00:47.850
So here's our attack montage.

00:47.850 --> 00:55.350
Now notice that the demon ends up facing the side, and that's because that's how this animation was

00:55.350 --> 01:04.980
made and because it's a root motion animation, it's not going to spin all the way around because that

01:04.980 --> 01:08.340
attack L has a key baked into it.

01:08.340 --> 01:15.330
So it looks this way in the montage, but we'll see how it looks when we actually play it in the game.

01:15.330 --> 01:18.990
So we have a montage and we need a couple of things here.

01:18.990 --> 01:22.500
For one, we need to use motion warping.

01:22.500 --> 01:27.360
In fact, let's take a look at one of our other enemies attack montages.

01:27.360 --> 01:28.680
Let's go to Goblin.

01:28.680 --> 01:33.720
Let's go to animations Spear, and we'll take a look at the goblin attack.

01:33.720 --> 01:40.080
So we have a couple things we need a motion warping notify State and we need to send a montage event

01:40.080 --> 01:42.360
and perhaps some sounds.

01:42.390 --> 01:42.740
Right.

01:42.750 --> 01:45.120
So let's start with motion warping.

01:45.120 --> 01:49.770
So here in the demon attack, we'll rename the first track to motion warping.

01:51.270 --> 01:55.050
Right click add, notify state motion warping.

01:55.050 --> 02:03.750
I'm going to select the right handle hold shift and I'd like to motion warp our rotation up to about

02:03.750 --> 02:04.320
here.

02:04.320 --> 02:11.440
So we're facing our motion warping target right about there and then our demon will continue through

02:11.440 --> 02:12.520
with that swing.

02:12.520 --> 02:21.460
Now we need to select the root motion modifier change, warp target name to facing target, uncheck

02:21.460 --> 02:25.210
warp translation and set rotation type to facing.

02:25.210 --> 02:28.450
And there's our motion warping notify state.

02:28.480 --> 02:30.970
Next we need to send a gameplay event.

02:30.970 --> 02:37.810
So right about here I'm going to right click and add a notify using a montage event.

02:37.810 --> 02:42.070
And this is where we specify the montage tag.

02:42.070 --> 02:49.690
So we're going to take our event tag and use Montage Attack one and that will be for our left attack.

02:49.720 --> 02:55.840
Now aside from that, really all we need to do is add a sort of swoosh sound.

02:55.870 --> 02:59.050
So I'm going to add a new notify track.

02:59.230 --> 03:08.740
I'm going to call it sounds right, click add a notify play sound and let's see if we can use that swoosh

03:08.770 --> 03:09.460
again.

03:12.000 --> 03:13.350
That's actually one.

03:13.350 --> 03:15.870
That sounds kind of like a weapon swoosh, isn't it?

03:15.870 --> 03:20.790
But if we go to the Google into the swipe, I think that one sounds a little better.

03:20.790 --> 03:22.380
I'll change it to that.

03:23.860 --> 03:25.250
Yeah, that sounds pretty good.

03:25.270 --> 03:31.540
And now we just need to make sure that our enemy is triggering this event at the correct space so that

03:31.540 --> 03:34.180
it actually hits our character.

03:34.450 --> 03:41.910
Now, before we test it out, though, we need to add tagged montages to our Demons attack array.

03:41.950 --> 03:43.990
And so far we only have one.

03:43.990 --> 03:50.680
So I'm going to go to the Demon search for attack, click plus to the attack montages, and we'll select

03:50.680 --> 03:53.950
our new demon attack Demon L.

03:54.190 --> 03:56.920
The montage tag is Attack one.

03:57.660 --> 04:01.560
Now the socket tag, this is kind of new, right?

04:01.560 --> 04:06.060
Because it's not really the left hand socket or the right hand socket.

04:06.060 --> 04:13.350
But if you'll recall, we set our weapon type socket name to the tail, but that's not going to really

04:13.350 --> 04:14.100
work, is it?

04:14.100 --> 04:19.470
Because if we use the weapon, then it's going to try to get our weapon.

04:19.470 --> 04:29.790
If we go into a character based CP and we search for combat socket location, we'll see here that if

04:29.790 --> 04:35.790
that montage tag is combat socket weapon, it's going to try to get the socket location from the actual

04:35.790 --> 04:37.860
weapon and our demon doesn't have that.

04:37.860 --> 04:43.110
So really in this case, we're going to need another type of socket tag.

04:43.110 --> 04:46.020
We're going to need a tail socket, right?

04:46.020 --> 04:49.020
So we can add that type of gameplay tag.

04:49.020 --> 04:55.080
Let's go ahead and close and save all and we'll go into our aura gameplay tags.

04:55.840 --> 05:02.980
Dot h and we'll add a new type of combat socket instead of weapon, right hand, left hand.

05:03.010 --> 05:05.890
We're going to have combat socket tail.

05:06.340 --> 05:09.070
Now we can accommodate for tail creatures.

05:09.280 --> 05:15.640
And we'll go into our gameplay tags, dot CPP and we'll create this native gameplay tag here.

05:15.640 --> 05:19.990
So it's going to be combat socket underscore tail.

05:20.140 --> 05:27.160
And for the F name it'll be combat socket dot tail and the F string can just say tail.

05:27.610 --> 05:31.300
So now that we have this kind of socket, that's what we're going to use.

05:31.330 --> 05:37.990
Now we have to go into our character base and to get combat socket location and we have to accommodate

05:37.990 --> 05:43.390
for the tail socket, which means we should have a tail socket name.

05:43.390 --> 05:48.880
Now this is kind of unique to tailed creatures, but I don't really feel like making a subclass of our

05:48.880 --> 05:51.910
character specifically for tail creatures.

05:51.910 --> 05:55.210
So we're just going to have this on our character base.

05:55.490 --> 06:01.790
So right here with our other socket names, we're going to have a tail socket name as well.

06:02.640 --> 06:05.700
So this name, tail socket name.

06:05.820 --> 06:08.760
Now we have that and we can check.

06:08.790 --> 06:14.790
So we're going to add another if statement here and if the number of different types of sockets grew

06:14.820 --> 06:19.590
considerably, then we would start thinking about a different solution to this.

06:19.590 --> 06:25.530
But in the case where we only have four and I don't foresee very many more, even though I said that

06:25.530 --> 06:29.010
before, I think that this solution is fine.

06:29.010 --> 06:37.080
So we're checking combat socket, underscore tail and we're going to get the socket location using our

06:37.080 --> 06:38.460
tail socket name.

06:38.460 --> 06:43.770
So with that we can compile and we'll set that tail socket name for our daemon.

06:45.470 --> 06:47.120
All right, clicking open.

06:47.540 --> 06:52.640
We can go back to Daemon and I'm going to search for tail socket name.

06:52.640 --> 06:53.770
Here it is.

06:53.780 --> 06:59.840
And instead of using the weapon type socket name, I'm going to now use tail socket name.

07:01.550 --> 07:03.650
And that's now set to tail socket.

07:03.650 --> 07:07.880
And I set that weapon tip socket name to none.

07:08.120 --> 07:10.910
So now we'll be using the tail socket.

07:10.940 --> 07:18.740
So if we search for attack, we can now set the socket tag to combat socket dot tail and we can use

07:18.740 --> 07:20.090
an impact sound.

07:20.120 --> 07:25.690
Let's just take a look at what our goblin impact sound is.

07:25.700 --> 07:27.860
So we'll go to Goblin Spear.

07:28.580 --> 07:29.960
Search for attack.

07:30.950 --> 07:33.320
And it looks like it's using swipe.

07:33.320 --> 07:36.920
And I think that's what we're using in our attack montage.

07:36.980 --> 07:45.620
So I think what I'll do is take my demon attack and instead let's set it to ghoul attack.

07:48.750 --> 07:50.040
Yeah, that sounds better.

07:50.040 --> 07:55.890
And then we'll use that swipe sound right here for the impact swipe.

07:56.400 --> 08:01.530
And you could duplicate these and change their pitch and make them sound different if you like.

08:01.800 --> 08:03.720
So that's our demon L.

08:04.350 --> 08:09.420
We also need the demon R So I'm going to browse to my attack demon.

08:09.420 --> 08:12.060
L I'm going to right click on my demon attack.

08:12.060 --> 08:20.550
R Create an anim montage call this am underscore attack demon.

08:22.220 --> 08:24.710
Ah, open that up.

08:25.340 --> 08:27.230
And same deal.

08:27.440 --> 08:35.630
We'll call the first notify track motion warping and we'll give this a notify state motion warping.

08:38.340 --> 08:39.770
And set the parameters.

08:39.780 --> 08:42.270
Warp Target name is facing Target.

08:44.010 --> 08:47.760
Uncheck warp translation rotation type facing.

08:48.000 --> 08:49.200
There we go.

08:49.230 --> 08:50.970
Let's add that event.

08:51.360 --> 08:53.370
I'll add a new notify track.

08:53.670 --> 08:55.560
Actually, I'll just have to like the other one.

08:55.560 --> 09:00.870
This one will be sounds and I'll have my event on the same track as the motion warping, add, notify

09:00.900 --> 09:02.430
and montage event.

09:02.430 --> 09:09.690
And for this the event tag is going to be montage attack to the left was attack one.

09:09.690 --> 09:10.960
This will be attack two.

09:10.980 --> 09:17.670
That way we can tell between the two in our attack gameplay ability and we can just add that swipe.

09:18.770 --> 09:22.130
I'm going to just double click on my other attack.

09:22.280 --> 09:25.700
Select this one, Ctrl C, come back.

09:26.880 --> 09:31.800
Click here Ctrl V and there's our Ghoul attack sound.

09:31.950 --> 09:33.930
And it looks and sounds great.

09:33.960 --> 09:38.680
Now we can go back to Demon, add a new attack montage.

09:38.700 --> 09:47.550
We'll set the montage to attack Demon R, set the montage tag to attack to set the socket tag to the

09:47.550 --> 09:52.160
tail and set the impact sound to the same SFX swipe.

09:52.170 --> 09:54.600
And now we have two attacks.

09:54.720 --> 09:57.810
Okay, so what's left is to test this.

09:58.020 --> 09:59.560
I'm going to save all.

09:59.580 --> 10:07.590
And before we test, I'd like to go to my melee attack in Blueprint's ability system, enemy abilities

10:07.620 --> 10:10.130
G a melee attack.

10:10.140 --> 10:16.140
And as soon as we get live players within radius, I want to draw a debug sphere.

10:16.290 --> 10:22.380
It'd be nice if I just had a check box right here for get live players within radius for drawing a debug

10:22.380 --> 10:28.840
sphere, but I'm going to draw a debug sphere right here because I want to make sure that throughout

10:28.840 --> 10:34.030
all that spinning and everything that the attack is positioned correctly.

10:34.210 --> 10:36.490
So draw debug sphere.

10:38.380 --> 10:40.270
I'm going to draw it at the same radius.

10:40.270 --> 10:45.070
And this should probably be a parameter on the melee attack, but that's okay.

10:45.220 --> 10:47.200
I'll hardcode 45.

10:48.740 --> 10:52.970
We're going to use the combat socket location for the center.

10:53.300 --> 10:56.870
I'm going to draw it for five seconds.

10:56.870 --> 10:58.880
And the line color can be red.

11:00.620 --> 11:03.230
So now we can test out our demon.

11:03.850 --> 11:06.520
So I'm going to drag in one of our demons.

11:06.700 --> 11:12.460
Actually, before I do that, I want to set my demons character class to warrior.

11:12.700 --> 11:15.010
And I see that it already is.

11:15.340 --> 11:17.170
All right, let's get it in here.

11:17.900 --> 11:19.250
I'm going to browse to it.

11:19.700 --> 11:23.510
Drag it in, and we'll see if there's anything we missed.

11:24.460 --> 11:25.660
Pressing play.

11:26.680 --> 11:28.510
Here comes the demon.

11:28.510 --> 11:29.710
And.

11:31.470 --> 11:36.420
I see that its tail is a little bit off to the side.

11:38.060 --> 11:40.220
And so it's missing a little bit.

11:40.370 --> 11:43.490
I'm going to set this to number of players to one.

11:45.530 --> 11:50.990
And I notice a little bit of a jerk when the demon was moving in.

11:50.990 --> 11:55.070
And that is going to be because of its blend space.

11:55.100 --> 11:57.320
I'm going to fix that really quick.

11:57.590 --> 12:04.250
Assets, enemies, demon animations, blend space and go down to that weight speed.

12:04.250 --> 12:05.630
I'm going to set it to four.

12:08.090 --> 12:10.160
So let's look at that debug sphere.

12:10.840 --> 12:13.420
So it's a little bit to the side there, right?

12:19.700 --> 12:26.270
So what we can do is we can place that notify a little earlier in the attack.

12:26.660 --> 12:31.370
So let's go to that attack montage.

12:32.000 --> 12:32.810
Attack daemon.

12:33.380 --> 12:35.210
So we're doing it here.

12:35.210 --> 12:37.690
It should be probably more like here.

12:37.700 --> 12:42.290
I'm going to move it back and I'm going to do that for the other attack as well.

12:42.290 --> 12:45.910
It should be about here when it's about 90 degrees out there.

12:45.920 --> 12:47.780
Let's see if that fixes it.

12:48.840 --> 12:51.060
Saving all and pressing play.

12:53.890 --> 12:55.090
Actually, it's a little worse.

12:55.090 --> 12:56.650
I think I needed to go the other way.

12:56.650 --> 13:02.590
So instead of right there, it needs to go to about probably what they're.

13:05.820 --> 13:07.980
So I'm going to push it out a little bit.

13:15.540 --> 13:17.070
That looked a little better.

13:18.170 --> 13:20.960
So a little bit farther out about right there.

13:21.620 --> 13:26.810
We'll do it for both of them and we'll play test.

13:30.820 --> 13:32.140
That one missed.

13:40.690 --> 13:43.120
So it just takes a little tweaking here.

13:43.930 --> 13:45.070
I don't need the goblin.

13:45.070 --> 13:46.690
I don't know why I have that open.

13:56.400 --> 13:58.110
That was a dead hit.

13:58.590 --> 14:00.180
Yeah, that's much better.

14:00.840 --> 14:03.000
And it looks great with the blood, doesn't it?

14:08.270 --> 14:09.350
Excellent.

14:09.860 --> 14:12.080
That is looking really nice.

14:12.960 --> 14:15.650
Nice little round house.

14:15.690 --> 14:16.440
Perfect.

14:16.440 --> 14:18.780
So we have working attacks.

14:19.110 --> 14:27.660
So now that we have a attacking demon and it's looking really nice, I'd like a ranger attacker so we

14:27.660 --> 14:31.020
could have another type of demon that throws things.

14:31.200 --> 14:32.370
And we can do that.

14:32.370 --> 14:39.540
Next, before we wrap up, I'm going to remove that debug sphere and I'm going to remove that debug

14:39.540 --> 14:41.370
sphere there and.

14:42.710 --> 14:45.110
We now have an attacking demon.

14:45.290 --> 14:46.220
Excellent.

14:46.250 --> 14:48.800
We'll continue in the next video.

14:48.830 --> 14:49.850
We'll see you soon.
