WEBVTT

00:07.320 --> 00:12.570
Okay, so we've got some really nice fireballs, and they're causing damage on the way out.

00:12.570 --> 00:13.860
Didn't mean to cast that spell.

00:13.860 --> 00:17.580
I keep hitting the one key instead of the two key, but let's hit the two key.

00:19.640 --> 00:25.610
And of course, our fireballs are a little op, but we can take our ghoul and set its character class

00:25.610 --> 00:28.250
level to something higher, like seven.

00:28.250 --> 00:32.660
And then we shouldn't be causing fatal damage anymore.

00:32.660 --> 00:36.740
But the point here is that we need some explosive damage.

00:36.740 --> 00:43.250
We're going to want these fireballs to blow up and actually blast our enemies away.

00:43.250 --> 00:50.780
And for that reason, I'd like some damage effect parameters specifically on our fireball for radial

00:50.780 --> 00:51.350
damage.

00:51.350 --> 00:51.590
Right.

00:51.590 --> 00:53.270
For explosive damage.

00:53.570 --> 00:57.560
So we're going to close the editor and open up Aura Fireball.

00:58.290 --> 01:01.530
And we're going to add another variable to this.

01:01.560 --> 01:06.120
I'd like this to be specifically for radial damage.

01:06.930 --> 01:09.270
So this could be in the protected section.

01:09.270 --> 01:18.840
It can be an f damage effect params called explosion damage params.

01:19.490 --> 01:23.360
Now explosion damage per rams is going to need to be set.

01:23.360 --> 01:26.390
Of course I'm going to expose it to blueprint.

01:27.470 --> 01:29.510
I'm going to make it blueprint red right.

01:30.860 --> 01:34.670
So we'll have write access to it in blueprint.

01:34.910 --> 01:39.140
And I'd like to be able to apply damage using this from blueprint.

01:39.320 --> 01:43.550
So now we just need to set these explosion damage params.

01:43.550 --> 01:46.550
Now we need to set some things on this.

01:46.550 --> 01:51.620
As soon as we've spawned our fireball in our fire blast.

01:52.100 --> 01:59.780
So what I'm going to do is I'm going to call make damage effect params from class defaults, but I'm

01:59.780 --> 02:11.210
going to make a local f damage effect params called explosion damage effect params and call make damage

02:11.210 --> 02:13.670
effect params from class defaults.

02:13.670 --> 02:16.400
So most of the parameters will be filled in.

02:16.400 --> 02:20.780
But we're going to want to set more of these later, right?

02:20.780 --> 02:25.790
I'd like to be able to set some of those damage params a little bit more easily.

02:26.300 --> 02:33.980
Now it'd be nice if we could just go into aura ability types into our struct f damage effect params

02:33.980 --> 02:39.980
and put some blueprint callable functions like set is radial damage and so on.

02:39.980 --> 02:44.600
But unfortunately we can't put blueprint callable functions into a struct.

02:44.600 --> 02:48.320
What we have to do instead is use other means.

02:48.320 --> 02:55.700
One thing we could do is we could use an aura ability system library function to set some parameters

02:55.700 --> 02:57.560
on our damage effect params.

02:57.860 --> 02:58.940
Let's do that.

02:58.940 --> 03:07.130
I'm going to go to Aura Ability System library and we'll make a couple of static functions.

03:08.170 --> 03:13.720
And this is going to be under the comment damage effect params.

03:17.050 --> 03:22.420
So I'm going to make a static void function called set is radial damage.

03:23.370 --> 03:29.940
Now we already have a set is radial damage I believe, which takes in an effect context handle.

03:31.070 --> 03:36.710
So I'm going to call this set is radial damage effect param.

03:37.130 --> 03:47.810
And this is just going to take in a f damage effect params struct called damage effect params.

03:48.170 --> 03:50.720
And a bool called b is radial.

03:52.580 --> 03:56.810
And this is going to be a blueprint callable function.

04:01.380 --> 04:05.970
And I do need to use my upper ram ref right here.

04:09.890 --> 04:13.640
That way this can be an input parameter even though it's a reference.

04:13.970 --> 04:16.490
Now I'm going to go ahead and generate a definition.

04:16.490 --> 04:24.410
And all I'm going to do is take damage effect params dot is radial damage and set it to be is radial.

04:26.000 --> 04:28.970
Now I'm just going to debug real quick.

04:29.660 --> 04:36.350
And we'll go ahead and get that fireball back and here in the fireball before destroying the actor after

04:36.380 --> 04:41.930
on hit, I'd like to go ahead and get my explosion.

04:43.770 --> 04:45.180
Damage per amps.

04:47.980 --> 04:51.460
And I'm going to call set is radial damage.

04:52.380 --> 04:55.500
Effect Param passing this in.

04:56.320 --> 04:57.970
Checking is radial.

05:01.530 --> 05:08.190
Dragging off and breaking the damage effect params getting that is radial damage.

05:10.240 --> 05:11.620
Using a branch.

05:13.660 --> 05:15.610
And checking is radial damage.

05:15.610 --> 05:16.990
It should be true now.

05:17.140 --> 05:18.610
So I'm going to print.

05:20.600 --> 05:21.710
Is radial.

05:26.480 --> 05:27.890
So saving all.

05:29.270 --> 05:30.590
Pressing two.

05:32.200 --> 05:36.040
And look at all that is radial lots of times.

05:37.960 --> 05:39.940
So we see that that's working.

05:46.410 --> 05:52.620
So rather than creating a whole bunch of functions I'd like to make one called set is radial damage

05:52.620 --> 05:57.390
effect params and pass in a whole bunch of parameters here.

05:57.540 --> 06:04.860
And then we'll have one for knockback force as well, and death impulse as well, because now that we

06:04.860 --> 06:11.640
have this additional explosion damage params, we can cause radial explosive damage with it.

06:11.910 --> 06:14.880
We just have to be able to set some of its params here.

06:15.240 --> 06:16.860
So I'm going to close the editor.

06:18.240 --> 06:22.260
And let's change this function to take in a few more inputs.

06:22.260 --> 06:24.330
We have bool b as radial.

06:24.360 --> 06:31.110
Now we have to remember that our damage effect params are partially being set already, because in aura

06:31.110 --> 06:35.340
fireblast we're calling make damage effect params from class defaults.

06:35.340 --> 06:38.250
Now if we peek that if we go to its definition.

06:40.430 --> 06:43.850
We'll see that we're all ready, setting a lot of things.

06:48.140 --> 06:56.720
But we're not setting these radial damage parameters because is radial damage for our ability is false.

06:56.720 --> 07:01.100
So we need to set the origin inner and outer radius.

07:03.800 --> 07:11.600
So this function can take a float called inner radius, a float called outer radius.

07:13.830 --> 07:17.160
And an F vector called origin.

07:20.310 --> 07:23.760
So we'll add these inputs to our function.

07:28.270 --> 07:31.330
And we'll just set our damage effect parameters.

07:31.690 --> 07:36.460
So we're going to set radial damage inner radius to inner radius.

07:37.060 --> 07:41.290
We'll take the damage effect params dot radial damage outer radius.

07:41.290 --> 07:50.050
Set that to outer radius and take our damage effect params dot origin, radial damage origin that is

07:50.050 --> 07:51.550
and set it to origin.

07:52.450 --> 07:55.960
And so we can set those properties from within blueprint now.

07:55.990 --> 07:57.970
And we can do the same thing for knockback.

07:57.970 --> 08:06.280
So I'm going to go ahead and make a new static void function called set knockback.

08:06.940 --> 08:13.450
And we'll just use set knockback direction because in aura damage gameplay ability.

08:15.150 --> 08:18.960
We are setting the knockback force magnitude already.

08:19.860 --> 08:22.380
As well as death impulse magnitude.

08:22.380 --> 08:24.960
So we just need to set those directions.

08:25.870 --> 08:34.090
So set knockback direction can take an f vector called knockback direction, but it also is going to

08:34.090 --> 08:37.840
need the damage effect params as a u param ref.

08:37.840 --> 08:44.410
So we'll put that in first and we'll give it blueprint callable with a category.

08:44.440 --> 08:48.670
Now in addition to this I'm going to have a set death impulse as well.

08:50.030 --> 08:59.480
So set death impulse and it'll actually be set impulse direction and its input is going to be impulse

08:59.480 --> 09:00.350
direction.

09:04.080 --> 09:06.990
So I'm going to create function definitions for these two.

09:13.380 --> 09:15.420
And they'll be super simple.

09:15.420 --> 09:20.940
This one is going to take damage effect params, and there's really not any point in setting the knockback

09:20.940 --> 09:21.990
force direction.

09:21.990 --> 09:28.920
We just need to take the knockback force and set it equal to knockback force direction times damage

09:28.920 --> 09:31.830
effect params dot, knockback, force magnitude.

09:31.830 --> 09:38.250
It doesn't really matter what we set that direction to, it's the knockback force that's actually used.

09:38.250 --> 09:44.760
But what we can do is take knockback direction and call normalize on it first, just in case we don't

09:44.760 --> 09:46.290
pass in a normal vector.

09:47.130 --> 09:49.440
And we'll do the same thing for impulse direction.

09:49.440 --> 09:52.980
So we'll say impulse direction dot normalize.

09:55.660 --> 10:03.850
And then we'll take damage effect params dot def impulse and set it equal to impulse direction times

10:03.850 --> 10:06.250
death impulse magnitude.

10:06.790 --> 10:09.460
And that's going to be on damage effect params.

10:09.580 --> 10:12.490
So death impulse magnitude.

10:13.120 --> 10:16.990
So now we have two functions to set those parameters as well.

10:17.770 --> 10:21.940
Okay, now we do need one more thing and that's that.

10:21.940 --> 10:27.400
Our knockback force magnitude is zero for this particular fireblast ability.

10:27.400 --> 10:35.470
So if we're going to set the knockback direction, I'd like to have an optional override of the magnitude

10:35.470 --> 10:35.980
itself.

10:35.980 --> 10:43.390
So I'm going to have an additional float parameter called magnitude and set it equal to zero.

10:44.200 --> 10:48.850
And I'll do this for both death impulse and knockback.

10:48.850 --> 10:53.500
So we'll have a float magnitude input parameter that's optional.

10:53.500 --> 11:02.530
And then in these setters we'll only override the magnitudes if this magnitude is not zero.

11:03.070 --> 11:11.050
So what we can do here is we'll check if magnitude is zero.

11:13.750 --> 11:15.430
Then we'll do what we were doing here.

11:15.430 --> 11:19.600
We'll just use the knockback force magnitude that was already there.

11:20.170 --> 11:24.880
Otherwise, we'll override the knockback force magnitude.

11:24.880 --> 11:29.650
We'll multiply knockback direction by the magnitude passed in.

11:31.950 --> 11:35.160
And we'll do this same thing for the death impulse.

11:36.210 --> 11:44.310
We'll say if magnitude is zero, then we'll do what we were doing.

11:45.600 --> 11:46.470
Else?

11:47.450 --> 11:54.350
Will do the same thing, except we're going to use magnitude instead of the damage effect per Ram's

11:54.350 --> 11:55.280
magnitude.

11:56.450 --> 12:02.960
So we can just pass in a zero if we're confident that that magnitude is set in the damage effect params.

12:02.960 --> 12:06.680
Otherwise we can pass in an override for that magnitude.

12:07.070 --> 12:09.530
Okay, let's compile and launch.

12:10.920 --> 12:13.920
Okay, so we're back now.

12:14.530 --> 12:20.380
Here in the fireball on hit, we're going to take our explosion damage params.

12:21.250 --> 12:22.390
Now we're going to set some things.

12:22.390 --> 12:27.220
I want it to be radial, and we'll set an inner and an outer radius.

12:27.220 --> 12:33.190
For this I'll just use 50 and 200 for now, maybe even 300.

12:33.580 --> 12:37.480
And the origin is going to be this fireballs location.

12:37.480 --> 12:39.070
Get actor location.

12:42.770 --> 12:45.620
Now we can also set some additional parameters.

12:48.160 --> 12:49.510
Such as knockback.

12:49.510 --> 12:53.110
So I'm going to say set knockback direction.

12:57.980 --> 13:00.710
And we're also going to set the death impulse direction.

13:06.060 --> 13:08.340
And how are we going to calculate these?

13:08.490 --> 13:14.850
Well, if this is going to be radial damage, then I'd like to get all actors that are alive within

13:14.850 --> 13:15.450
radius.

13:15.450 --> 13:18.780
In other words, get live players within radius.

13:18.810 --> 13:20.730
Well, I have a nice function for that.

13:20.730 --> 13:28.500
Get live players within radius will return an array of actors, and I can even pass in actors to ignore,

13:28.500 --> 13:31.830
such as the owner of this fireball.

13:32.620 --> 13:36.190
Now we are going to want to avoid overlapping aura.

13:36.190 --> 13:38.740
So we could call get owner.

13:38.740 --> 13:40.990
But are we setting the owner?

13:41.260 --> 13:43.570
Well, let's make sure we are.

13:43.600 --> 13:51.250
We'll just close real quick and we'll go back into aura Fireblast when we're spawning the fireball and

13:51.250 --> 13:52.480
we can set the fireballs.

13:52.480 --> 13:52.930
Owner.

13:52.930 --> 13:58.090
We can take fireball and we can call set owner.

13:59.320 --> 14:02.650
Setting it to get avatar actor from actor info.

14:03.920 --> 14:08.420
Now we can be confident that the fireball is going to have its owner set.

14:08.960 --> 14:11.180
So with that, let's go back into the editor.

14:11.210 --> 14:13.190
We'll get our fireball back open.

14:13.190 --> 14:18.470
We'll get our owner and we can plug that in and use make array.

14:18.500 --> 14:23.270
Now we could also take this array and we can add the self to it.

14:23.990 --> 14:25.490
So we can use AD.

14:28.720 --> 14:31.660
Hook that in and we can get a reference to self.

14:33.960 --> 14:38.010
And we can make sure this projectile doesn't overlap with itself either.

14:39.820 --> 14:46.420
So we're getting live players within radius world context object can also be self.

14:51.290 --> 14:52.970
So I'm going to pass that in.

14:54.290 --> 14:58.280
And the radius is going to be the same as our outer radius.

14:58.970 --> 15:01.160
We can make these variables as well.

15:01.160 --> 15:07.940
And the sphere origin is going to be the same as our projectiles location.

15:07.970 --> 15:10.340
So now we have an array to loop over.

15:10.340 --> 15:12.260
So we're going to loop over this.

15:13.110 --> 15:14.400
With for each.

15:18.120 --> 15:22.140
And in our loop body we're going to take our damage effect params.

15:22.410 --> 15:29.130
And for each iteration of the loop we're going to overwrite some properties in our explosion damage

15:29.130 --> 15:34.050
params, namely our knockback direction and our magnitude.

15:34.350 --> 15:37.500
We don't have to set the radial params.

15:37.500 --> 15:39.510
We can do that before the loop.

15:40.930 --> 15:43.030
We can even do it after the loop.

15:43.990 --> 15:47.860
But in the loop body we need to set our knockback directions.

15:47.860 --> 15:51.940
So we need to get our array element and get actor location.

15:53.800 --> 15:57.400
And we need to calculate the direction for the knockback.

15:58.130 --> 16:03.920
So I'm going to get the vector from my projectiles location.

16:05.080 --> 16:07.630
To the victim's location.

16:07.630 --> 16:08.920
The thing we're hitting.

16:09.590 --> 16:12.380
Or almost hitting or getting close to hitting.

16:12.380 --> 16:19.970
So if I want the vector from the fireball to the victim, then I'm going to subtract the destination

16:19.970 --> 16:24.680
from the start point of the vector destination being the actor we're hitting.

16:24.680 --> 16:26.090
So we're going to subtract.

16:26.630 --> 16:28.070
We'll get that direction.

16:29.120 --> 16:30.260
And.

16:31.970 --> 16:37.430
So we can pass this in as the knockback direction and we can give a knockback magnitude.

16:37.460 --> 16:39.590
I'm just going to give it 800 for now.

16:40.900 --> 16:46.360
And I'm going to use the same vector for the death impulse and give it 600.

16:47.850 --> 16:52.170
So for each loop body here, we're setting those parameters.

16:52.170 --> 16:59.880
And if we're going to apply damage to each one we actually need to set the radial damage params as well.

16:59.910 --> 17:04.260
Before we do that so we can set them first.

17:22.120 --> 17:22.900
Like that.

17:22.900 --> 17:27.520
And I'm going to actually promote this array to a variable.

17:27.760 --> 17:31.930
And we'll call this overlapping players.

17:37.190 --> 17:37.790
That way.

17:37.790 --> 17:39.530
We don't need this reroute node.

17:43.350 --> 17:46.230
And we'll hook up overlapping players to the for loop.

17:50.100 --> 17:53.220
So now we have our explosion damaged params.

17:53.220 --> 17:56.490
We're calculating knockback and death impulse.

17:56.490 --> 18:02.730
So for each of these actors I'm going to call apply damage effect.

18:05.040 --> 18:09.210
And hook in my explosion damage params.

18:10.940 --> 18:13.580
And then at the end of this loop.

18:15.750 --> 18:19.290
I'm finally going to destroy the actor.

18:22.900 --> 18:28.480
And we could do on hit there, but it's fine that we're doing it before, so let's test this out.

18:32.800 --> 18:36.100
Okay, so I got a exception.

18:38.320 --> 18:40.540
And apply damage effect.

18:41.250 --> 18:46.080
And my source ability system component is not valid.

18:46.110 --> 18:51.150
Looks like it's a null pointer and I have some empty damage effect params.

18:51.150 --> 18:57.360
Actually, I've just set the death impulse, but nothing else is being set here, just the things we

18:57.360 --> 18:59.040
set in blueprint, right?

18:59.250 --> 19:01.800
So it's not being filled in.

19:02.220 --> 19:05.550
And we need to see why in aura Fireblast.

19:05.940 --> 19:10.980
And sure enough, here's why I never actually set it on my fireball.

19:10.980 --> 19:14.310
I just made a local variable, which makes sense.

19:14.310 --> 19:19.830
So I'm going to go ahead and hit stop and make sure that I'm setting this.

19:19.830 --> 19:22.710
I'm going to go to my fireball.

19:22.710 --> 19:31.590
I'm going to take my fireball and set its explosion damage effect params.

19:31.920 --> 19:33.030
I don't see it here.

19:33.030 --> 19:36.660
So let's go to Aura Fireball and it's protected.

19:36.660 --> 19:38.190
I need to make it public.

19:43.670 --> 19:45.620
And here in aura Fireblast.

19:45.920 --> 19:48.110
I can set it here with that.

19:48.110 --> 19:49.550
Now it should be set.

19:49.670 --> 19:50.930
Let's try this again.

19:52.040 --> 19:55.400
Okay, so I need to go back into my.

19:59.430 --> 20:00.420
Fire, fire!

20:00.420 --> 20:02.550
Blast and open up BP.

20:02.580 --> 20:03.540
Fireball.

20:04.300 --> 20:11.650
And it looks like I have lost some of my progress here because of that exception.

20:14.020 --> 20:15.490
No worries.

20:15.520 --> 20:17.110
After on hit.

20:18.130 --> 20:21.430
I'm going to go ahead and set my radial damage effect params.

20:26.740 --> 20:29.410
And then we'll get live players within radius.

20:34.980 --> 20:39.030
I'm going to take the owner and make an array, passing it in.

20:47.180 --> 20:48.170
Hook that up.

20:48.500 --> 20:51.350
But I'm also going to add the self to this array.

20:52.540 --> 20:53.800
So I'm going to call AD.

20:55.190 --> 20:56.630
Get a reference to self.

20:57.850 --> 20:58.900
Hook that in.

20:59.800 --> 21:01.420
And that's going to go in here.

21:03.050 --> 21:04.100
Right here.

21:16.250 --> 21:19.820
And self is also going to be the world context object.

21:24.440 --> 21:30.800
Now, if I can't help but cross wires, I make sure that the wires are as short as possible so you can

21:30.800 --> 21:31.790
see where they go.

21:33.840 --> 21:36.630
Okay, so I have live players within radius.

21:36.630 --> 21:40.170
I need the sphere origin that's going to be get actor location.

21:41.870 --> 21:43.070
I need my radius.

21:43.070 --> 21:50.180
I'm just going to promote that to a variable and call this radial damage radius.

21:53.710 --> 21:54.250
I'll make it.

21:54.250 --> 21:54.970
Radial damage.

21:54.970 --> 21:57.010
Outer radius.

21:58.770 --> 22:02.550
And I'll compile and set this to a default value of 300.

22:11.680 --> 22:15.820
And I'll use it here when setting my radial damage effect params.

22:17.010 --> 22:19.770
And I'll promote the inner radius to a variable to.

22:21.690 --> 22:23.400
Radial damage.

22:23.400 --> 22:24.930
Inner radius.

22:25.530 --> 22:27.390
That way we have parameters.

22:32.350 --> 22:35.830
This is why I save before play testing.

22:36.430 --> 22:40.630
Usually looks like I forgot this time, but this is why I do it.

22:40.630 --> 22:41.590
Because.

22:43.150 --> 22:47.050
When you crash in debug mode and you haven't saved, you lose progress.

22:48.680 --> 22:52.040
Okay, so we're getting live players within radius.

22:52.040 --> 22:53.990
We're going to do a loop.

22:55.560 --> 22:56.520
For each.

23:00.870 --> 23:04.860
And we need to calculate knockback direction and impulse direction.

23:04.860 --> 23:08.490
So I'm going to use Get actor location.

23:08.580 --> 23:13.290
And I'm also going to get actor location of the array element.

23:13.290 --> 23:18.510
And I want the vector from the fireball to the array element.

23:19.200 --> 23:24.210
In other words, from the fireball to the hit actor.

23:25.620 --> 23:31.710
We always subtract the destination from the starting point of a vector.

23:33.730 --> 23:36.130
And that's going to be our knockback direction.

23:36.580 --> 23:40.060
And we'll just have a knockback magnitude here.

23:40.060 --> 23:41.890
We'll promote this to a variable.

23:41.920 --> 23:45.400
Call it knockback magnitude.

23:47.130 --> 23:48.420
I'll make it 800.

23:50.630 --> 23:53.180
And for the loop body, we'll set this.

23:57.480 --> 24:03.360
And we'll use the same vector for knockback direction as death impulse direction.

24:03.360 --> 24:05.970
So I'm going to promote it.

24:07.050 --> 24:10.020
To a variable and we'll just overwrite it every time.

24:10.020 --> 24:12.600
We'll call this knockback direction.

24:18.740 --> 24:22.250
And I'm going to use it instead of having more than one wire here.

24:22.250 --> 24:25.190
So I'm going to use knockback direction here.

24:27.320 --> 24:30.890
And I'm going to use the same vector for the death impulse.

24:32.860 --> 24:34.120
Knocked back.

24:34.810 --> 24:35.920
Direction.

24:36.580 --> 24:39.070
And I'll just have a knockback magnitude.

24:39.070 --> 24:40.480
So promote to variable.

24:41.510 --> 24:46.910
I said knock back, but I mean death impulse magnitude and death impulse magnitude.

24:47.690 --> 24:50.180
Can be 600.

24:50.360 --> 24:52.970
Okay, now with that.

24:53.700 --> 24:55.590
We have these parameters.

24:56.210 --> 25:04.460
Again, we're going to call apply damage effect and pass in these parameters which should no longer

25:04.460 --> 25:05.450
be empty.

25:06.750 --> 25:08.880
As we're actually setting them.

25:09.860 --> 25:11.690
In our game play ability now.

25:12.080 --> 25:16.400
And with that, when this loop is done, we'll destroy the actor.

25:16.400 --> 25:19.160
Okay, this time I'm going to save all.

25:20.190 --> 25:23.730
And press play and try it out.

25:25.520 --> 25:29.180
Okay, so the target ability system component is null.

25:29.890 --> 25:30.520
So.

25:30.520 --> 25:36.400
Yet one more thing that I haven't set that I need to set in that for loop.

25:36.400 --> 25:40.000
Getting the ability system component from the other actor.

25:40.240 --> 25:40.780
It's okay.

25:40.780 --> 25:43.360
This is sometimes an iterative process.

25:43.720 --> 25:49.720
Sometimes we have to try things and find where they break and fix the issue at hand.

25:49.720 --> 25:53.560
Try them again, see where they break again, and fix the issue again.

25:53.560 --> 25:56.380
Sometimes this is the development process.

25:57.120 --> 25:58.860
But we're getting closer now.

25:58.860 --> 26:03.150
We know that we're getting to just about the end of that function.

26:03.180 --> 26:04.710
Let's go to fireball.

26:04.710 --> 26:12.480
And here in this iteration of the loop, we need to be setting the target ability system component pointer

26:12.480 --> 26:14.520
on our damage effect params.

26:16.100 --> 26:21.440
And we can get our array element and we can call get ability system component.

26:22.990 --> 26:28.660
On the ability system blueprint library and we can take those explosion damage params.

26:29.890 --> 26:33.610
And we can set and we don't have a setter.

26:33.610 --> 26:38.710
So let's just really quickly make one in our ability system library.

26:39.160 --> 26:44.710
So static void set effect params AC.

26:46.190 --> 26:47.870
It's going to take in.

26:51.120 --> 26:59.340
A upper arm ref damage effect params and a new ability system component pointer in ASC.

27:00.600 --> 27:02.700
It's going to be blueprint callable.

27:04.790 --> 27:06.830
We can generate a definition.

27:09.490 --> 27:14.170
We can take the damage effect params dot target ability.

27:14.170 --> 27:15.340
System component.

27:16.700 --> 27:18.650
And set it equal to nasc.

27:19.040 --> 27:23.390
And we should probably specify that this is for the target.

27:23.390 --> 27:28.310
So we're going to say set target effect params asc.

27:29.600 --> 27:34.100
And with that we should be able to set it.

27:35.360 --> 27:37.430
Okay, back into the fireball.

27:37.430 --> 27:39.980
And this should be our last step.

27:39.980 --> 27:42.590
We're going to take the damage params.

27:42.590 --> 27:48.380
We're going to call set target effect params as passing in that ASC.

27:48.770 --> 27:49.970
Looking this up.

27:53.820 --> 27:54.720
Like so.

28:07.680 --> 28:10.020
And with a little slight cleanup.

28:12.250 --> 28:13.750
We can try this out.

28:17.710 --> 28:19.390
All right.

28:23.020 --> 28:27.040
Now they're dying because they can't take that much damage.

28:27.070 --> 28:32.380
So to really test this, we can take our damage.

28:33.650 --> 28:37.280
For Fireblast and we can just scale it by zero.

28:39.950 --> 28:43.310
That way we'll only see the effects of.

28:46.630 --> 28:47.950
Our knockback.

28:55.940 --> 29:01.700
And I'm going to set my knockback magnitude to 2000.

29:01.730 --> 29:03.560
There's no way we can miss that.

29:07.600 --> 29:08.230
All right.

29:08.230 --> 29:12.940
I'm going to have to override that pitch, I think, because it is knocking them back.

29:14.360 --> 29:17.060
But it's not knocking them upward.

29:22.020 --> 29:26.550
So I'm just going to alter my knockback direction.

29:27.470 --> 29:29.570
So I'm going to take knockback direction.

29:29.570 --> 29:33.320
I'm going to make a rotator I can use make wrote from X.

29:36.790 --> 29:38.650
I can break it.

29:39.500 --> 29:41.210
Or split the struct pin.

29:41.210 --> 29:44.360
I can take this and make a new rotator from it.

29:49.450 --> 29:54.580
And I can hook in yaw and roll and override pitch to 45.

29:55.790 --> 29:57.320
And I can make a vector.

30:02.020 --> 30:09.850
So we'll call get forward vector from this rotator and pass this in for the knockback direction.

30:16.130 --> 30:17.720
There we go.

30:17.750 --> 30:20.300
That's what I wanted to see.

30:20.330 --> 30:21.740
Okay.

30:23.410 --> 30:25.690
Kind of a lot of steps to this.

30:28.680 --> 30:30.720
I'm going to collapse this to a function.

30:30.720 --> 30:37.470
I'm going to call it override knockback pitch and I'm going to make it pure.

30:38.530 --> 30:39.700
And hook that in.

30:41.240 --> 30:44.360
And knockback magnitude doesn't have to be 2000.

30:44.390 --> 30:46.160
I'll set it back to 800.

30:52.210 --> 30:54.370
And it's working.

31:04.620 --> 31:05.880
Excellent.

31:05.880 --> 31:07.170
Excellent.

31:07.200 --> 31:07.950
All right.

31:07.950 --> 31:13.140
And I'm going to go ahead and take my fire blast and set its damage scale back to one.

31:13.140 --> 31:18.300
And with that we now have our fire blast ability.

31:20.290 --> 31:22.030
Beautiful.

31:22.690 --> 31:23.800
Excellent job.

31:24.590 --> 31:26.300
I'll see you in the next video.
