All right, so now that we have some damage parameters, it's time to start using them.
So how do we use them.
Well for one we have an aura ability system library function.
If we go into Aura ability system library and search for our apply damage effect, we have one here
that takes in damage effect params.
So in a way, most of the work that has to be done in gas is being done for us by these worker functions
that just set things right, and it's setting all of our set by color magnitudes, and it's setting
our death impulse and knockback force on the effect context.
And as soon as we call apply damage effect, we can pass those parameters in for radial damage.
And then later on down the pipeline, we can see about calculating how much damage was actually done
for those given parameters.
Right.
So right here when we're setting our death impulse and our knockback force, I think it would be a great
idea to set those radial damage parameters on our effect context as well.
And it'd be handy if we had these setters, these functions that do all of the dirty work for us, so
to speak.
So let's make those setter functions and getter functions here in Aura Ability System library that we
can use now scrolling I just see kind of a wall of text.
I'd like to categorize these into categories.
At this point I'd like to say something like widget controller right here.
And then underneath that.
We'll say ability system startup.
Right or even just ability system class defaults.
And then we have these functions for our gameplay effect context.
Right.
Gameplay effects like is blocked hit is successful debuff.
So I'm going to have effect context getters.
Because these are all getters.
And then we have the setters as well.
So this will be effect context setters.
There.
Now we can see where things are.
Now the setters end right here.
No they don't.
They end down here.
And then we have things like get live players within radius, get closest targets is not friend, right?
These are for gameplay mechanics.
So those are our gameplay mechanics algorithms.
And then of course apply damage effect is I'll consider that some gameplay mechanics.
It's related to gameplay effects, but it's actually applying an effect.
So I'd say all of these can be in gameplay mechanics.
So now that we have an easy way to find where all the setters and getters are, we can add our getters
right here.
I'm going to go ahead and make these static functions.
So first static bool is radial damage.
It's going to get the effect context handle and we'll give it blueprint pure gameplay effects.
We're also going to make a static float returning function get radial damage inner radius.
And all the getters are going to get these.
Const refs to affect context handle.
Now I'm going to just copy this one because the next one is going to be the radial damage outer radius.
And finally a f vector returning function.
So static f vector.
Get radial damage origin.
With the same you function.
All right.
So we can implement these functions.
And I'm going to steal some code from is critical hit, because it's going to be nearly the same.
We're just going to call is radial damage.
And I'm going to steal one that returns a float.
I'll take git debuff frequency.
And we'll just call get radial damage in a radius for this one.
And get radial damage.
Outer radius for this one.
And then we have get radial damage origin.
I'm just going to steal the contents of one that returns a vector.
And paste it in and call git radial damage origin.
So we have our getters.
Now for the setters I'm going to copy set is successful debuff.
Just because it takes in a boolean and this will be set is radial damage.
Its input will be called B in is radial damage.
I'm also going to copy one that takes in a float.
And this one can be called.
Set radial damage.
Inner radius with a float called in inner radius.
I'll just make it easy.
We'll also have the outer radius version.
Set radial damage outer radius and it'll have an outer radius.
And let's get a function that takes in a vector.
Here's one.
And this will be set.
Radial damage.
Origin.
And it'll take in in origin.
And with that.
We can define these functions.
Now it's given me inline functions.
Unfortunately I'm going to control X.
Cut those and we'll paste them here.
And we'll just get them right here.
I'm going to remove the inline keyword.
And let's find a setter that takes in a bool.
Set is successful.
Debuff will do.
And we'll call.
In this function set is radial damage and pass in B in is radial damage.
Let's find one of our setters that takes in a float.
Here's one.
And we'll use that here.
We're going to call set radial damage.
Inner radius passing in in inner radius.
And we'll copy this.
Paste it in the set radial damage outer radius.
We'll call the outer version passing in an outer radius.
And let's find a function that takes in a vector.
This one will do.
Set death impulse and we'll paste its contents here.
And instead of set death impulse we're going to call set radial damage origin passing in the in origin
okay.
So for getters for setters we're all set.
Now we can go back down to our apply damage effect.
And just after setting death impulse and knockback force we can set the four parameters on our effect.
Context we're going to set is radial damage.
So first we pass in the effect context handle and then we get our damage effect params dot b is radial
damage.
Next we can set radial damage inner radius.
And really, it doesn't matter if B is radial damage is false.
We could place all this in an if check, but it doesn't matter if we set it anyway because the context
isn't going to serialize it if this boolean is false.
So we'll just go ahead and set them and keep our code cleaner without an if statement here.
And we'll set this to radial damage inner radius on the damage effect params.
Let's also set radial damage outer radius passing in the context handle getting our damage effect params
radial damage, outer radius and the origin.
So set radial damage origin.
First we got the handle, then the damage params dot radial damage origin.
And we've set those four parameters.
Now we can pass those along through the pipeline and access them anywhere, such as in our exact calc
damage for example.
So now that that is complete, we can then move on to using these in the context handle and we'll do
that next.
I'll see you soon.