Welcome back.
Now we have a beautiful fireball effect, but it doesn't really cause any damage.
We need to take care of that.
So we'll start by specifying how much damage our fire blast ability should cause.
Now that means it needs some parameters in here to be set right.
So what we're going to do is first go to blueprints ability system data and open up our CT damage.
And our fire blast ability doesn't exist here.
So we need to add a curve, rename it and call this abilities dot fire blast.
And I'm going to go ahead and add two keys.
One, two.
Now this one is going to be at one.
And it's going to cause we'll say 15 damage per fireball.
Now this key which looks like it's the first one I've made this mistake before.
This was the one I just set.
This was the one I haven't set yet.
That's going to be at level 40.
And I'll make it.
Let's just make it 150.
Now, this will be per fireball.
And I'm going to make it a auto curve like this.
Okay, cool.
So we have fire blast in our CT damage.
We can go back to our fire blast ability and we can start setting some of our properties here.
Now we have damage type.
I'm going to set this to of course fire.
Right.
And damage is going to use CT damage scaled by abilities.
Fire blast debuff charts can be 2025 whatever we want.
Debuff damage I'm going to let it be five.
Debuff frequency can be one.
Debuff duration can be five.
Again, these could all be curved tables if you wanted them to be.
I'm going to leave death impulse magnitude at a thousand, but I'm going to set knockback force magnitude
to zero because these fireballs are going to pass through things.
I only want to add a death impulse if it kills them, but the knockback force is going to be zero because
I don't want to knock back until we get to the explosion at the end.
So knockback chance is also going to be zero and I'm going to leave.
Is radial damage unchecked?
I'd like this to be not radial, at least for the damage from overlapping.
Once we get to the explosion, that's another story.
Okay, so we're going to leave it like this.
And with that, we just need to make sure that we're causing damage on overlap.
And for that I'm going to go into C plus plus.
So closing the editor I'm going to go into my fireball on sphere overlap function here.
And here's where I'd like to configure some things.
First, we know that we have if we go to our fire blast damage effect params.
So this is great.
We have damage effect params set from our class defaults, but we need to set a few things because on
overlap is when we actually have access to the overlapped actor.
And we can check some things.
If we go to Aura Projectile, we can see some of the things we're checking here.
We're checking the source ability system component making sure that's not null.
We're getting our source avatar actor from the effect params and making sure it's not the other actor.
We're making sure the other actor is not a friend.
And then if we haven't already hit, we call on hit.
That's not what we want to do.
But these other things we do want to do so we can copy them, or we can simply make them a protected
function.
So or a projectile in the protected section this can be a bool returning function called is valid overlap.
And it can check those conditions.
So here in generate definition we're going to copy these lines where we're checking things.
And we can check the damage effect params.
If it's null, we can return false.
We can check the source avatar actor, see if it's equal to the other actor.
Which, by the way, we should pass into this, right?
So let's pass it in.
A actor.
Other actor.
And if source avatar is equal to other actor, return false.
And we can also check is not friend and return false.
So basically all of these conditions can cause us to not want to return.
Basically we'll just replace these right here with if is valid overlap and if is valid overlap returns
false return.
Right.
And we of course have to pass in other actor.
And we can just use this line and on a sphere overlap in or a fireball.
So that gives us an early out.
Now, after that, let's take a look at how we're calculating death impulse here.
We're getting the target ability system component.
We're getting the forward vector of our projectile multiplying by death impulse magnitude and setting
the death impulse here.
We can do that same thing.
Now it also sets knockback, which we don't want to do, but after that we're setting the target ability
system component and we're applying the damage effect.
So this is almost all the stuff we want to do.
So why don't we just copy this.
In fact we can just copy everything up to destroy.
And even the else case where we're setting be hit to true.
We can copy all this.
And come back to Aura Fireball.
Paste it in.
We're going to want to include Ability System, Blueprint Library and Aura Ability System library as
well.
And of course, Be Hit is inaccessible.
That's a private variable that's going to need to become protected.
So we'll just drag it right on up to the protected section.
No problem.
And now an aura fireball.
We just want to do all of this stuff except for knockback.
This is not going to be a knockback effect.
So we're setting the death impulse, setting the target AC and applying the damage effect.
So this is all that we need to do except let's think about this.
We don't want to destroy.
So we actually don't want that call.
And we don't want to set be hit to true.
That's for when we explode on contact with things.
So actually that's stuff we want out of this function.
All we want to do is apply the damage gameplay effect.
So let's compile and see how this works and is valid.
Overlap does not return from all control paths.
And that's of course because we should have a return statement at the end that returns true obviously.
And if we don't return early from all these, we return true.
And we don't get the early return here.
Okay.
Let's compile.
All right.
I'm going to go ahead and open up my asset editors.
I'm done with CT damage, though.
For now I'm going to keep Fireball and Fire Blast open, and I just want to see if my fireballs pass
through things and cause damage on the way.
Oh, and they do.
They caused kind of a lot, didn't they?
This ability might be a little too op.
Let's find out.
We're launching 12 fireballs, each causing 15 damage.
It seemed like we did too much.
That was nine, right?
Okay.
That did 13.
Let's see how much this causes.
Trying to hit this guy.
There.
We did 13 and 13 back on the way back in.
So I think we're doing enough or an appropriate amount, I should say so.
And it's a higher level skill.
I mean, I did set its level requirement to two, but realistically this would be up there, right?
Probably level seven, eight, maybe even 9 or 10.
So I think that's fine.
Awesome and it also has a burn chance.
So let's just make sure that we get some burns.
Not sure what my ghouls starting stats are.
Let's just see.
It starts as a level one warrior.
Initial primary values.
Let's go to character Classinfo look at warrior.
We have GE primary attributes.
Warrior.
We start the warrior off with vigor based on primary attributes.
Warrior.
And at level one, its vigor is 11, so it's going to have a pretty low health value.
So yes, it's going to have a low health.
So a higher level ability like this is going to cause some damage right.
Okay.
Oops.
Wrong spell I meant to press two.
Excellent.
Now we also want an explosion.
And that's going to be a completely different effect.
Right.
But we can do that.
We can go back to BP fireball.
And we know right here that we're going to do on hit.
And before we destroy the actor, we are going to want to do something like apply damage.
Right.
And I'd like to apply radial damage, which means I'd like my fireball to have another set of damage
parameters.
And these ones can be set to use knockback, radial damage, and what have you.
And we're going to add that to this class and we'll do that next.
So great job and I'll see you soon.