WEBVTT

00:07.710 --> 00:08.940
Welcome back.

00:08.940 --> 00:14.460
Now we have a beautiful fireball effect, but it doesn't really cause any damage.

00:14.460 --> 00:16.800
We need to take care of that.

00:17.100 --> 00:23.640
So we'll start by specifying how much damage our fire blast ability should cause.

00:23.970 --> 00:29.220
Now that means it needs some parameters in here to be set right.

00:29.460 --> 00:38.700
So what we're going to do is first go to blueprints ability system data and open up our CT damage.

00:39.180 --> 00:43.560
And our fire blast ability doesn't exist here.

00:43.560 --> 00:49.830
So we need to add a curve, rename it and call this abilities dot fire blast.

00:50.960 --> 00:53.330
And I'm going to go ahead and add two keys.

00:53.330 --> 00:54.980
One, two.

00:55.010 --> 00:57.140
Now this one is going to be at one.

00:57.140 --> 01:02.810
And it's going to cause we'll say 15 damage per fireball.

01:02.840 --> 01:08.210
Now this key which looks like it's the first one I've made this mistake before.

01:08.240 --> 01:10.100
This was the one I just set.

01:10.100 --> 01:11.900
This was the one I haven't set yet.

01:11.900 --> 01:15.020
That's going to be at level 40.

01:15.020 --> 01:15.800
And I'll make it.

01:15.800 --> 01:17.750
Let's just make it 150.

01:17.870 --> 01:20.120
Now, this will be per fireball.

01:21.010 --> 01:24.520
And I'm going to make it a auto curve like this.

01:26.910 --> 01:27.690
Okay, cool.

01:27.690 --> 01:30.240
So we have fire blast in our CT damage.

01:30.240 --> 01:35.910
We can go back to our fire blast ability and we can start setting some of our properties here.

01:35.910 --> 01:37.980
Now we have damage type.

01:37.980 --> 01:40.260
I'm going to set this to of course fire.

01:40.260 --> 01:40.890
Right.

01:41.870 --> 01:47.210
And damage is going to use CT damage scaled by abilities.

01:47.210 --> 01:53.060
Fire blast debuff charts can be 2025 whatever we want.

01:53.420 --> 01:55.760
Debuff damage I'm going to let it be five.

01:55.760 --> 01:57.740
Debuff frequency can be one.

01:57.740 --> 02:00.170
Debuff duration can be five.

02:00.170 --> 02:03.920
Again, these could all be curved tables if you wanted them to be.

02:04.370 --> 02:10.160
I'm going to leave death impulse magnitude at a thousand, but I'm going to set knockback force magnitude

02:10.160 --> 02:13.940
to zero because these fireballs are going to pass through things.

02:13.940 --> 02:21.020
I only want to add a death impulse if it kills them, but the knockback force is going to be zero because

02:21.020 --> 02:24.920
I don't want to knock back until we get to the explosion at the end.

02:24.920 --> 02:29.600
So knockback chance is also going to be zero and I'm going to leave.

02:29.600 --> 02:31.220
Is radial damage unchecked?

02:31.220 --> 02:37.070
I'd like this to be not radial, at least for the damage from overlapping.

02:37.070 --> 02:39.920
Once we get to the explosion, that's another story.

02:39.920 --> 02:42.410
Okay, so we're going to leave it like this.

02:43.120 --> 02:48.640
And with that, we just need to make sure that we're causing damage on overlap.

02:48.640 --> 02:50.980
And for that I'm going to go into C plus plus.

02:50.980 --> 02:58.150
So closing the editor I'm going to go into my fireball on sphere overlap function here.

02:58.150 --> 03:01.750
And here's where I'd like to configure some things.

03:02.410 --> 03:07.390
First, we know that we have if we go to our fire blast damage effect params.

03:08.760 --> 03:10.680
So this is great.

03:10.680 --> 03:18.210
We have damage effect params set from our class defaults, but we need to set a few things because on

03:18.210 --> 03:22.140
overlap is when we actually have access to the overlapped actor.

03:22.960 --> 03:24.490
And we can check some things.

03:24.490 --> 03:28.840
If we go to Aura Projectile, we can see some of the things we're checking here.

03:28.840 --> 03:33.700
We're checking the source ability system component making sure that's not null.

03:33.730 --> 03:39.880
We're getting our source avatar actor from the effect params and making sure it's not the other actor.

03:39.880 --> 03:42.610
We're making sure the other actor is not a friend.

03:42.610 --> 03:45.310
And then if we haven't already hit, we call on hit.

03:45.310 --> 03:46.900
That's not what we want to do.

03:46.900 --> 03:53.680
But these other things we do want to do so we can copy them, or we can simply make them a protected

03:53.680 --> 03:54.550
function.

03:54.880 --> 04:03.820
So or a projectile in the protected section this can be a bool returning function called is valid overlap.

04:04.720 --> 04:06.580
And it can check those conditions.

04:06.580 --> 04:11.920
So here in generate definition we're going to copy these lines where we're checking things.

04:13.890 --> 04:17.160
And we can check the damage effect params.

04:17.160 --> 04:19.740
If it's null, we can return false.

04:20.750 --> 04:25.520
We can check the source avatar actor, see if it's equal to the other actor.

04:25.520 --> 04:27.800
Which, by the way, we should pass into this, right?

04:27.800 --> 04:29.450
So let's pass it in.

04:29.750 --> 04:30.680
A actor.

04:31.760 --> 04:32.870
Other actor.

04:38.340 --> 04:42.480
And if source avatar is equal to other actor, return false.

04:43.180 --> 04:46.480
And we can also check is not friend and return false.

04:46.480 --> 04:52.150
So basically all of these conditions can cause us to not want to return.

04:52.150 --> 05:01.300
Basically we'll just replace these right here with if is valid overlap and if is valid overlap returns

05:01.300 --> 05:03.310
false return.

05:03.310 --> 05:04.090
Right.

05:04.090 --> 05:06.820
And we of course have to pass in other actor.

05:08.780 --> 05:15.170
And we can just use this line and on a sphere overlap in or a fireball.

05:16.280 --> 05:18.320
So that gives us an early out.

05:19.400 --> 05:24.200
Now, after that, let's take a look at how we're calculating death impulse here.

05:25.660 --> 05:28.510
We're getting the target ability system component.

05:28.510 --> 05:36.250
We're getting the forward vector of our projectile multiplying by death impulse magnitude and setting

05:36.250 --> 05:37.750
the death impulse here.

05:38.350 --> 05:40.120
We can do that same thing.

05:40.360 --> 05:46.240
Now it also sets knockback, which we don't want to do, but after that we're setting the target ability

05:46.240 --> 05:50.350
system component and we're applying the damage effect.

05:50.590 --> 05:53.830
So this is almost all the stuff we want to do.

05:53.860 --> 05:56.200
So why don't we just copy this.

05:56.200 --> 05:59.800
In fact we can just copy everything up to destroy.

05:59.800 --> 06:02.830
And even the else case where we're setting be hit to true.

06:02.860 --> 06:04.330
We can copy all this.

06:05.140 --> 06:06.970
And come back to Aura Fireball.

06:06.970 --> 06:07.990
Paste it in.

06:08.650 --> 06:14.350
We're going to want to include Ability System, Blueprint Library and Aura Ability System library as

06:14.350 --> 06:15.040
well.

06:15.400 --> 06:18.040
And of course, Be Hit is inaccessible.

06:18.040 --> 06:21.670
That's a private variable that's going to need to become protected.

06:22.270 --> 06:26.470
So we'll just drag it right on up to the protected section.

06:26.470 --> 06:27.550
No problem.

06:29.140 --> 06:31.210
And now an aura fireball.

06:31.210 --> 06:35.320
We just want to do all of this stuff except for knockback.

06:35.320 --> 06:38.320
This is not going to be a knockback effect.

06:39.370 --> 06:45.400
So we're setting the death impulse, setting the target AC and applying the damage effect.

06:45.400 --> 06:49.480
So this is all that we need to do except let's think about this.

06:49.510 --> 06:51.010
We don't want to destroy.

06:51.010 --> 06:54.010
So we actually don't want that call.

06:54.010 --> 06:55.990
And we don't want to set be hit to true.

06:55.990 --> 06:59.170
That's for when we explode on contact with things.

06:59.170 --> 07:02.980
So actually that's stuff we want out of this function.

07:02.980 --> 07:06.220
All we want to do is apply the damage gameplay effect.

07:06.250 --> 07:10.990
So let's compile and see how this works and is valid.

07:10.990 --> 07:15.100
Overlap does not return from all control paths.

07:15.100 --> 07:21.850
And that's of course because we should have a return statement at the end that returns true obviously.

07:22.720 --> 07:26.710
And if we don't return early from all these, we return true.

07:28.110 --> 07:30.360
And we don't get the early return here.

07:30.750 --> 07:31.410
Okay.

07:31.410 --> 07:32.460
Let's compile.

07:33.570 --> 07:34.470
All right.

07:34.470 --> 07:37.680
I'm going to go ahead and open up my asset editors.

07:37.680 --> 07:39.180
I'm done with CT damage, though.

07:39.180 --> 07:46.590
For now I'm going to keep Fireball and Fire Blast open, and I just want to see if my fireballs pass

07:46.590 --> 07:49.290
through things and cause damage on the way.

07:49.860 --> 07:51.990
Oh, and they do.

07:53.410 --> 07:55.690
They caused kind of a lot, didn't they?

07:59.670 --> 08:02.580
This ability might be a little too op.

08:04.670 --> 08:06.110
Let's find out.

08:06.140 --> 08:09.980
We're launching 12 fireballs, each causing 15 damage.

08:11.750 --> 08:13.730
It seemed like we did too much.

08:13.730 --> 08:15.500
That was nine, right?

08:22.210 --> 08:22.660
Okay.

08:22.660 --> 08:24.370
That did 13.

08:29.630 --> 08:31.220
Let's see how much this causes.

08:34.680 --> 08:36.150
Trying to hit this guy.

08:37.660 --> 08:38.050
There.

08:38.050 --> 08:42.370
We did 13 and 13 back on the way back in.

08:42.580 --> 08:48.190
So I think we're doing enough or an appropriate amount, I should say so.

08:48.190 --> 08:49.570
And it's a higher level skill.

08:49.570 --> 08:54.970
I mean, I did set its level requirement to two, but realistically this would be up there, right?

08:54.970 --> 08:59.140
Probably level seven, eight, maybe even 9 or 10.

08:59.140 --> 09:00.880
So I think that's fine.

09:03.450 --> 09:05.850
Awesome and it also has a burn chance.

09:05.850 --> 09:09.120
So let's just make sure that we get some burns.

09:10.510 --> 09:14.110
Not sure what my ghouls starting stats are.

09:14.140 --> 09:15.670
Let's just see.

09:20.090 --> 09:22.400
It starts as a level one warrior.

09:23.960 --> 09:26.630
Initial primary values.

09:27.590 --> 09:30.530
Let's go to character Classinfo look at warrior.

09:30.530 --> 09:33.560
We have GE primary attributes.

09:33.560 --> 09:34.640
Warrior.

09:39.460 --> 09:44.530
We start the warrior off with vigor based on primary attributes.

09:44.530 --> 09:45.490
Warrior.

09:47.280 --> 09:53.760
And at level one, its vigor is 11, so it's going to have a pretty low health value.

09:54.270 --> 09:57.090
So yes, it's going to have a low health.

09:57.090 --> 10:01.920
So a higher level ability like this is going to cause some damage right.

10:02.040 --> 10:02.940
Okay.

10:03.420 --> 10:03.750
Oops.

10:03.750 --> 10:06.000
Wrong spell I meant to press two.

10:08.250 --> 10:08.730
Excellent.

10:08.760 --> 10:12.390
Now we also want an explosion.

10:12.390 --> 10:15.630
And that's going to be a completely different effect.

10:15.630 --> 10:16.290
Right.

10:16.290 --> 10:17.790
But we can do that.

10:17.790 --> 10:20.040
We can go back to BP fireball.

10:20.040 --> 10:24.150
And we know right here that we're going to do on hit.

10:24.150 --> 10:30.030
And before we destroy the actor, we are going to want to do something like apply damage.

10:30.030 --> 10:30.750
Right.

10:31.370 --> 10:39.200
And I'd like to apply radial damage, which means I'd like my fireball to have another set of damage

10:39.200 --> 10:39.920
parameters.

10:39.920 --> 10:45.590
And these ones can be set to use knockback, radial damage, and what have you.

10:45.590 --> 10:48.530
And we're going to add that to this class and we'll do that next.

10:48.830 --> 10:51.200
So great job and I'll see you soon.
