Welcome back.
Now our ability draws a debug sphere.
Great.
We've seen enough of those in our lives, haven't we?
We want to play a montage, which means our ranged attackers need an attack montage.
So why don't we go and see what assets we have?
We're going to go into assets, enemies, goblin animations, slingshot.
And here we have a few things.
We already have the hit React.
Here's an attack slingshot animation and here's what it looks like now without a slingshot in its hand.
It doesn't look like much, does it?
But we're going to make this look like something very convincing for this little guy.
We're going to make an attack montage for this, so let's do it.
Now we are going to want root motion, so I'm going to scroll down and make sure enable root motion
is checked.
It is.
So now I'm going to right click on the attack animation, go to create, create anim montage and call
this aim underscore attack goblin slingshot.
So we now have an attack montage.
Now our attack montage needs a couple of notified tracks.
We are going to want to do motion warping so it orients in the correct direction.
So I'm going to rename the first notify track to motion warping and add another notify track called
events.
And for motion warping, I'm going to make a motion warping notify state, right click, notify state
motion warping and I'm going to have him rotate from the beginning to just about before letting go of
the slingshot pouch.
So about there.
So pretty quick.
And we do need to expand root motion modifier and change warp target name to facing Target.
That's our warp target.
We're not going to warp translation.
We're going to scroll down and make rotation type facing and we have motion warping.
Now we need to decide when we're going to launch our projectile and that's going to be just about here.
We're probably going to tweak this once we implement having a slingshot, but we're going to right about
where we let go of this slingshot.
So about right here, when that hand goes back, right, right about here, that's where I'd like to
launch the projectile.
So I'm going to right click on my events track, add, notify and Montage event, select that, and
we're going to want to set that event tag.
And the event tag is going to be montage attack.
And we're going to choose weapon because we want the socket on our slingshot weapon.
And the socket on the slingshot weapon is going to be its pouch.
So we're going to choose montage attack weapon like.
So now we know that we have an array in our base character class that is a tagged montage.
In other words, we link up the montage with this event tag so we choose the correct socket.
So we do need to do that.
Now that's going to be in our Goblin Slingshot blueprint.
So we need to go into content, blueprints, character Goblin Slingshot and open that blueprint.
I'm going to go ahead and open the full blueprint window.
And here we need to search here for attack and we have attack montages.
I'm going to click plus add an element to that and select my goblin slingshot attack montage, aim,
attack, goblin Slingshot.
And for the montage tag, we're going to go to Montage Attack and Choose Weapon.
So now that that is set, we now have the ability to play an attack montage and then retrieve the correct
socket that corresponds to that attack montage.
And that way we can spawn something from the socket and the socket is going to be on the slingshot.
And by the way, the slingshot does have a socket if we select our weapon.
And we browse to it.
Here's the skeletal mesh for the weapon.
And the weapon has a socket called pouch.
And believe it or not, this pouch can move.
And we actually have weights skinned on this slingshot, which is pretty awesome because we're going
to want to stretch that thing out and make it look like our slingshot flings forward.
In fact, our slingshot has a slingshot attack animation, which is doing just that.
It looks pretty funny, but it's pretty cool because if we play that animation, then that pouch will
fling forward and it'll look like we're shooting that slingshot.
So pretty sweet.
So this is great.
We're one step in the right direction.
Our goblin has a tagged montage on it and it's attack montages array.
And this is great because now we can actually play a montage and spawn a projectile.
So we're going to do those things in the videos to come.
Excellent job and I'll see you soon.