WEBVTT

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

00:08.010 --> 00:12.750
Now we know that our damage types map is filled out for the ranged attack.

00:12.930 --> 00:18.030
Now we need to make sure that our ranged attackers actually get granted this ability.

00:18.150 --> 00:24.840
And once they're granted this ability, our behavior tree is going to attempt to activate it through

00:24.840 --> 00:27.300
its behavior tree task attack.

00:27.300 --> 00:32.820
And that tries to activate abilities by tag, which means we need an ability tag.

00:32.820 --> 00:38.430
If we add the ability tag, we have abilities attack that needs to be there.

00:38.430 --> 00:43.530
So now we can activate this ability via that behavior tree.

00:43.530 --> 00:51.390
But we also need the enemy to have this ability and that involves going to ability system data under

00:51.390 --> 00:56.400
our blueprints folder and going to our character class info data asset.

00:56.430 --> 01:00.960
Now we see that our warrior is given the Gar melee attack ability.

01:01.080 --> 01:04.200
Our Ranger now needs its ranged attack.

01:04.200 --> 01:12.220
So for start up abilities, we're going to click plus and open the dropdown and choose Gar ranged attack.

01:12.220 --> 01:18.970
And now we know if our range attacker has this ability because our behavior tree should be activating

01:18.970 --> 01:19.390
it.

01:19.420 --> 01:26.320
Now why don't we just go into our ranged attack and in event activate ability, let's draw a debug sphere.

01:27.720 --> 01:30.600
And we'll draw it at the Avatar actor's location.

01:30.600 --> 01:33.990
So we're going to get Avatar actor from actor info.

01:34.020 --> 01:36.450
We're going to get its actor location.

01:37.110 --> 01:39.300
We're going to plug that into the center.

01:39.300 --> 01:41.490
Radius can be 50.

01:41.520 --> 01:49.140
We can make the line color, say blue, and we can make the duration, say 0.5.

01:49.140 --> 01:55.800
And now we should see a blue sphere if our enemies activate the ranged attack ability.

01:55.800 --> 02:03.750
Let's go ahead and just save all and press play and we'll see what happens when those range attackers

02:03.750 --> 02:05.400
get within attacking range.

02:05.400 --> 02:12.210
And I just saw there they are, they're attacking, they're activating their attack ability.

02:12.210 --> 02:13.950
This is great.

02:14.970 --> 02:15.600
Okay.

02:15.600 --> 02:21.220
So now we have our ranged attackers being granted their ranged attack ability.

02:21.240 --> 02:24.670
It's just drawing a debug sphere, but things are coming together.

02:24.690 --> 02:27.190
We have a projectile class to spawn.

02:27.210 --> 02:28.590
We have a damage effect.

02:28.590 --> 02:33.420
We have damage in our CT damage curve table.

02:33.450 --> 02:35.340
Our ability tag is set.

02:35.340 --> 02:37.350
So this is looking really good.

02:37.350 --> 02:43.200
We now need to actually do something visual so that our ranged attackers look like they're attacking.

02:43.200 --> 02:43.650
Right.

02:43.650 --> 02:45.960
And that's going to involve montages.

02:45.960 --> 02:48.690
And we'll get into that in the next video.

02:48.720 --> 02:50.940
Great job and I'll see you soon.
