Okay, so we have our shaman.
We have an attack montage for the shaman.
It's time for our shaman to have an attack ability.
Now, that means we need to figure out what exactly we want this goblin to do.
And I'd like to launch a projectile.
Perhaps a fireball.
Maybe this can be a fire shaman, at least for now, just so we can have something happening.
So for that reason, I'd like to take a look at the abilities we already have.
Now, if we go into blueprints, ability system, enemy abilities, we have this ranged attack and ranged
attack seems to have everything we need for a shaman to launch a projectile.
Let's go through it and see if that's the case.
As soon as we activate the ability, we get our combat target that should be set from our behavior tree
in the behavior tree task attack.
Then we update the facing target.
That's for motion warping.
We get our attack montages and get a random element from that.
If there's more than one.
If there's just one, we get that one.
It's a tag montage that we get from this array, which has a montage and a montage tag.
We play that montage.
We could totally do that with our shaman.
The shamans tag is set to the weapon where waiting for a gameplay event with that tag.
Once that event is received, we get the combat socket location using that tag, and then we get our
combat target, get its location and spawn a projectile at that target.
That is basically everything we need for our shaman as well.
Now, there are a couple of things that we'd probably want to change.
If we go to our class defaults, we'll see that we have the projectile class set to rock.
Well, we could probably change that out, but the damage effect could be the same.
Now we'd want to change the damage type, probably to abilities firebolt, but basically everything
else here could be the same.
So for that reason, I'd like to make a child blueprint based on the ranged attack ability and call
this enemy fireball.
So I'm going to right click on GA Ranged Attack, create a Child Blueprint class and call this GA underscore
enemy fireball or Firebolt.
That's what it's called.
So we'll open up our enemy Firebolt and just change this so that it has everything we need for the projectile
class.
I'm going to choose Bpy Firebolt for the damage type.
I'm actually going to change the key because this is no longer a physical damage type.
I'm going to change it to fire and I'm going to change the curve from the curve table to abilities.
Dot Firebolt Notice that it starts off at ten damage and it's a little bit more formidable.
That's what I want.
So now that I have an enemy firebolt ability, I can assign that in the class defaults.
We can go to blueprints, ability system data and open character class info.
And we know that our BP shaman is an Elementalist and it's going to be granted the primary attributes
for an Elementalist as well as the start up abilities for the Elementalist.
We can click plus and add a start up ability and choose enemy firebolt and now the enemy will have the
ability to launch a firebolt Let's just see how this works straight out of the box and see if there's
anything else that we need to do.
Of course we're going to need to bring in a shaman, aren't we?
So to make things a little less distracting, I'm going to go ahead and take out a couple of these spear
goblins.
I'll leave one of them and I'll go ahead and move my big beast ghoul over there.
Make some room here, and let's bring in the goblin shaman.
So, character shaman, BP shaman.
I'm going to bring one in right there.
I'll go ahead and rotate it so it's facing the correct direction.
Same for my ghoul.
And let's go ahead and.
Playtest.
Here comes the goblin shaman.
And look at that.
It is definitely launching fireballs at me.
And the fireballs can hit other enemies.
So we'll have to take care of that.
But it's causing a good amount of damage.
Now I'm noticing the Goblin shaman is a little fast.
I'd like to slow it down a bit.
So let's go to Shaman.
We have our own base walk speed variable.
I'm going to set that down a bit.
Let's try 75.
That's the max on its blend space, I believe.
And let's see if that looks better.
I do believe I like that better now.
I also see that it's a little bit choppy when it comes to turning, just like we had that issue with
our.
Ghoul.
And I believe I can adjust its rotation rate on the character movement component.
So I'm going to search for that.
And these are things that you'll typically adjust based on the different types of enemies.
They're all going to have slightly different stats here.
I'm going to bring this down to 200 and see if that looks better when that shaman turns.
It's a little bit fast still, but I'm kind of okay with it.
I think that's fine.
Now he's launching fireballs at me as soon as it gets in range.
And that fireball does a good deal of damage.
And I just got taken out.
All right.
So that's pretty cool.
I'm liking that.
I'm liking it.
Now that we have a shaman that can launch fireballs, we're going to want to make sure that those fireballs
can't hit the other enemies.
We saw that that was a problem, right?
Or is it?
Let me just make sure.
It should still launch one here in a second.
Let's see if it launches one and hits.
Nope, it doesn't hit the other enemies.
We took care of that.
Excellent.
All right.
Now, something I'm noticing is when we launch a fireball, we don't get that sound, the fireball launching
sound.
And in fact, our slingshot enemies don't have any sounds when they're launching their slingshots.
It'd be kind of nice to add some sounds.
And those sounds are typically what we add to our animation montages as sound notifies.
That's typically the best way.
Now there are gameplay cues which we haven't gotten into yet, and don't worry, we will.
But sounds for launching projectiles and attacking those belong on animation montages.
So we could really just quickly add that to our game.
We can go to our montage for our Shaman attack and we can add a sound notify.
I'm going to add a notify track for sound and right click here, add a notify play sound.
And for that sound I'm going to search for Fire Bolt and here's SFX Fire Bolt and we can browse to it
and hear it.
That's what it sounds like.
So I'd like that for my shaman, but I'd also like to go to my assets.
Enemies.
Goblin animations.
Slingshot and get my goblin slingshot attack montage.
And I'd like to play a sound here.
So let's add another track here called Sound and add a notify play sound.
And what do we have?
Let's actually go and check our assets folder.
Go to Sounds Slingshot.
And there's a perfect sound.
I'm going to click on that and hear for the sound.
I'm going to stick it in there and I'm going to put it right there at the beginning.
And let's see how that sounds.
Oh, that's nice.
That is a huge difference.
Amazing.
What a huge difference just a couple sounds can make.
So that is really improving.
Our combat.
Things are looking really nice.
So excellent job.
And I'm noticing that some of my enemies are a little too high.
So just a quick little tweak here.
I'm going to right click on my ghoul and edit ghoul and just bring it on down just a tad.
Without snapping on.
I just wanted a little bit lower.
That's a little bit better.
Maybe an inch or so more.
It's even okay if the feet go into the ground a little, that's better.
And I believe my other enemies are a little high off the ground, too.
So just a little tweak before we wrap up.
Let's get those feet down on the ground, shall we?
Just a little lower there.
And these ones are a little bit noticeable.
And, of course, this is going to depend on the ground that they're on as well.
I'm just going to move them over to a flat ground as that's going to be more representative.
These ones are actually not too bad, but we can go into their blueprints and bring them down just slightly.
Like so and now everything is actually on the ground.
Let's look at our shaman.
Can't forget the shaman.
The shaman looks good.
And that's going to do it.
Excellent job.
I'm going to save all.
And I'll see you in the next video.