WEBVTT

00:07.600 --> 00:12.550
All right, so now that we have some damage parameters, it's time to start using them.

00:12.550 --> 00:13.900
So how do we use them.

00:14.290 --> 00:18.670
Well for one we have an aura ability system library function.

00:18.670 --> 00:27.520
If we go into Aura ability system library and search for our apply damage effect, we have one here

00:27.520 --> 00:29.440
that takes in damage effect params.

00:29.440 --> 00:38.800
So in a way, most of the work that has to be done in gas is being done for us by these worker functions

00:38.800 --> 00:44.530
that just set things right, and it's setting all of our set by color magnitudes, and it's setting

00:44.530 --> 00:49.090
our death impulse and knockback force on the effect context.

00:49.090 --> 00:55.030
And as soon as we call apply damage effect, we can pass those parameters in for radial damage.

00:55.030 --> 01:01.900
And then later on down the pipeline, we can see about calculating how much damage was actually done

01:02.110 --> 01:04.270
for those given parameters.

01:04.270 --> 01:04.930
Right.

01:04.930 --> 01:10.630
So right here when we're setting our death impulse and our knockback force, I think it would be a great

01:10.630 --> 01:16.150
idea to set those radial damage parameters on our effect context as well.

01:16.150 --> 01:24.160
And it'd be handy if we had these setters, these functions that do all of the dirty work for us, so

01:24.160 --> 01:24.910
to speak.

01:24.910 --> 01:31.630
So let's make those setter functions and getter functions here in Aura Ability System library that we

01:31.630 --> 01:36.160
can use now scrolling I just see kind of a wall of text.

01:36.160 --> 01:40.150
I'd like to categorize these into categories.

01:40.150 --> 01:47.710
At this point I'd like to say something like widget controller right here.

01:47.710 --> 01:50.140
And then underneath that.

01:52.960 --> 01:56.920
We'll say ability system startup.

01:59.080 --> 02:03.880
Right or even just ability system class defaults.

02:05.200 --> 02:11.170
And then we have these functions for our gameplay effect context.

02:11.170 --> 02:11.830
Right.

02:11.830 --> 02:15.820
Gameplay effects like is blocked hit is successful debuff.

02:15.820 --> 02:20.560
So I'm going to have effect context getters.

02:21.320 --> 02:23.300
Because these are all getters.

02:24.040 --> 02:26.290
And then we have the setters as well.

02:27.510 --> 02:31.470
So this will be effect context setters.

02:31.980 --> 02:32.340
There.

02:32.340 --> 02:33.810
Now we can see where things are.

02:33.840 --> 02:36.300
Now the setters end right here.

02:36.870 --> 02:38.040
No they don't.

02:38.040 --> 02:40.800
They end down here.

02:44.050 --> 02:50.380
And then we have things like get live players within radius, get closest targets is not friend, right?

02:50.380 --> 02:52.510
These are for gameplay mechanics.

02:54.740 --> 02:57.500
So those are our gameplay mechanics algorithms.

02:57.500 --> 03:03.410
And then of course apply damage effect is I'll consider that some gameplay mechanics.

03:03.410 --> 03:09.020
It's related to gameplay effects, but it's actually applying an effect.

03:09.020 --> 03:12.680
So I'd say all of these can be in gameplay mechanics.

03:12.680 --> 03:18.680
So now that we have an easy way to find where all the setters and getters are, we can add our getters

03:18.680 --> 03:19.220
right here.

03:19.220 --> 03:22.190
I'm going to go ahead and make these static functions.

03:22.580 --> 03:27.530
So first static bool is radial damage.

03:28.040 --> 03:36.320
It's going to get the effect context handle and we'll give it blueprint pure gameplay effects.

03:36.320 --> 03:43.910
We're also going to make a static float returning function get radial damage inner radius.

03:49.000 --> 03:51.940
And all the getters are going to get these.

03:53.040 --> 03:56.100
Const refs to affect context handle.

03:56.460 --> 04:03.300
Now I'm going to just copy this one because the next one is going to be the radial damage outer radius.

04:05.670 --> 04:09.030
And finally a f vector returning function.

04:09.030 --> 04:11.610
So static f vector.

04:12.600 --> 04:15.990
Get radial damage origin.

04:21.860 --> 04:23.840
With the same you function.

04:26.130 --> 04:27.300
All right.

04:30.620 --> 04:33.140
So we can implement these functions.

04:38.100 --> 04:45.090
And I'm going to steal some code from is critical hit, because it's going to be nearly the same.

04:45.090 --> 04:47.460
We're just going to call is radial damage.

04:48.650 --> 04:51.800
And I'm going to steal one that returns a float.

04:54.380 --> 04:56.570
I'll take git debuff frequency.

04:58.340 --> 05:04.820
And we'll just call get radial damage in a radius for this one.

05:06.000 --> 05:07.410
And get radial damage.

05:07.410 --> 05:09.300
Outer radius for this one.

05:13.830 --> 05:16.260
And then we have get radial damage origin.

05:16.260 --> 05:19.920
I'm just going to steal the contents of one that returns a vector.

05:21.610 --> 05:26.560
And paste it in and call git radial damage origin.

05:26.560 --> 05:28.030
So we have our getters.

05:28.480 --> 05:33.610
Now for the setters I'm going to copy set is successful debuff.

05:36.010 --> 05:43.450
Just because it takes in a boolean and this will be set is radial damage.

05:46.870 --> 05:51.220
Its input will be called B in is radial damage.

05:52.560 --> 05:55.290
I'm also going to copy one that takes in a float.

06:00.790 --> 06:02.560
And this one can be called.

06:03.930 --> 06:06.180
Set radial damage.

06:06.180 --> 06:12.750
Inner radius with a float called in inner radius.

06:13.230 --> 06:14.400
I'll just make it easy.

06:14.430 --> 06:18.120
We'll also have the outer radius version.

06:18.540 --> 06:23.970
Set radial damage outer radius and it'll have an outer radius.

06:25.350 --> 06:28.890
And let's get a function that takes in a vector.

06:29.980 --> 06:31.060
Here's one.

06:35.230 --> 06:37.120
And this will be set.

06:37.810 --> 06:39.790
Radial damage.

06:39.790 --> 06:40.750
Origin.

06:42.890 --> 06:45.530
And it'll take in in origin.

06:47.110 --> 06:48.370
And with that.

06:49.080 --> 06:51.120
We can define these functions.

06:56.950 --> 06:59.320
Now it's given me inline functions.

06:59.320 --> 07:01.900
Unfortunately I'm going to control X.

07:01.900 --> 07:04.360
Cut those and we'll paste them here.

07:05.850 --> 07:08.490
And we'll just get them right here.

07:08.490 --> 07:10.890
I'm going to remove the inline keyword.

07:14.100 --> 07:17.880
And let's find a setter that takes in a bool.

07:21.780 --> 07:23.040
Set is successful.

07:23.040 --> 07:24.150
Debuff will do.

07:29.780 --> 07:31.820
And we'll call.

07:32.810 --> 07:41.330
In this function set is radial damage and pass in B in is radial damage.

07:41.930 --> 07:45.080
Let's find one of our setters that takes in a float.

07:45.860 --> 07:46.970
Here's one.

07:50.860 --> 07:52.450
And we'll use that here.

07:53.560 --> 07:57.550
We're going to call set radial damage.

07:57.550 --> 08:01.600
Inner radius passing in in inner radius.

08:03.270 --> 08:04.800
And we'll copy this.

08:05.070 --> 08:08.640
Paste it in the set radial damage outer radius.

08:08.670 --> 08:14.610
We'll call the outer version passing in an outer radius.

08:15.240 --> 08:18.360
And let's find a function that takes in a vector.

08:18.360 --> 08:19.350
This one will do.

08:19.350 --> 08:24.030
Set death impulse and we'll paste its contents here.

08:24.030 --> 08:32.760
And instead of set death impulse we're going to call set radial damage origin passing in the in origin

08:32.760 --> 08:33.690
okay.

08:34.020 --> 08:37.770
So for getters for setters we're all set.

08:37.770 --> 08:42.120
Now we can go back down to our apply damage effect.

08:42.120 --> 08:47.670
And just after setting death impulse and knockback force we can set the four parameters on our effect.

08:47.670 --> 08:50.940
Context we're going to set is radial damage.

08:51.680 --> 08:58.640
So first we pass in the effect context handle and then we get our damage effect params dot b is radial

08:58.640 --> 08:59.420
damage.

09:01.060 --> 09:05.530
Next we can set radial damage inner radius.

09:05.530 --> 09:10.900
And really, it doesn't matter if B is radial damage is false.

09:10.900 --> 09:16.540
We could place all this in an if check, but it doesn't matter if we set it anyway because the context

09:16.540 --> 09:19.600
isn't going to serialize it if this boolean is false.

09:19.600 --> 09:26.350
So we'll just go ahead and set them and keep our code cleaner without an if statement here.

09:27.100 --> 09:33.220
And we'll set this to radial damage inner radius on the damage effect params.

09:33.220 --> 09:43.180
Let's also set radial damage outer radius passing in the context handle getting our damage effect params

09:43.180 --> 09:47.650
radial damage, outer radius and the origin.

09:47.650 --> 09:49.930
So set radial damage origin.

09:50.650 --> 09:56.470
First we got the handle, then the damage params dot radial damage origin.

09:57.070 --> 09:59.230
And we've set those four parameters.

09:59.230 --> 10:06.910
Now we can pass those along through the pipeline and access them anywhere, such as in our exact calc

10:06.910 --> 10:08.830
damage for example.

10:08.830 --> 10:15.700
So now that that is complete, we can then move on to using these in the context handle and we'll do

10:15.700 --> 10:16.840
that next.

10:16.840 --> 10:17.800
I'll see you soon.
