Welcome back.
Now, our gay melee attack is working, at least for the spear goblin.
Right.
But I'd like to be able to use this melee attack for any melee enemy, and that includes enemies that
may not have a combat socket location on their weapon as jet combat socket location is retrieving a
socket location from the weapon specifically.
But we have an asset in our startup project, which is a character that doesn't have a weapon.
That's this ghoul here.
And the ghoul has some animations for attacking.
It has a left hand attack and it has a right hand attack.
And these don't use the weapon.
They use the hand.
So what if we need a socket location on the mesh itself?
So that's one limitation our system has that we need to account for.
Now, we can't just use a melee attack on all warriors and expect them to be able to play this montage
that works only for Goblin Spear.
We need to retrieve that montage from the character somehow because the montage is specific to the character.
So to me that means perhaps an interface function on the combat interface that we can use, or even
the enemy interface for retrieving the montage.
Now on top of that, though, there are more complications because, well, our ghoul has a left and
a right attack.
So how are we going to handle that?
Do we want our ghoul to attack with the left only or attack with the right only, or perhaps attack
with the left and right randomly.
So we need to take that into account as well.
One option is to have an array of montages to play and just pick one at random from within our attack.
That's a decent approach.
Now the thing is though, that we're waiting for a gameplay event that's sent from our attack montage,
and our montage very much determines which socket we want.
If we're playing a left hand swipe, we want the socket on the left hand.
If we're playing a right hand swipe, we want a socket on the right hand.
And if we're playing a montage for an enemy that has a weapon, we want the weapon socket.
So in other words, the montage is directly related to whatever socket we're getting and whether that's
from the mesh on the character or the mesh on its weapon if it has one.
So I like the versatility to be able to pass a specific gameplay tag from the montage and based on that
gameplay tag, get the correct socket.
In other words, get combat socket location should take a gameplay tag as an input parameter and wait
gameplay event should wait for an event that has the tag that's directly related to the montage.
In other words, montage and gameplay tag need to go together.
We need to link them together somehow and we need to get that information from our enemy, from its
combat interface or its enemy interface, whichever we choose.
So we have a number of things we want to change if we want this melee attack to be versatile enough
to be used by multiple different types of enemies, including those that have weapons and those that
don't.
So for that reason, we're going to make several changes.
For one, I now am going to want to access these event tags from within Cplusplus because get combat
socket location is implemented in C plus plus, and I'm going to want to retrieve the correct socket
location based on a gameplay tag and I'd like that gameplay tag to be related to the montage.
I want an event montage dot attack and I want one for weapons for the left hand and for the right hand.
So the first step we're going to do in this video is to add some native gameplay tags that we'll be
using and linking up with our montages.
And because those socket locations are so linked, we're going to change our get combat socket location
function as well.
But we'll get to that one thing at a time.
The first thing we need are some gameplay tags.
So I'm going to go into writer and into aura gameplay tags and add some new gameplay tags.
So we'll have an gameplay tag here.
And these gameplay tags are going to be for the socket and they're also going to be directly related
to attack montages.
So what we're going to do is call this montage, underscore attack, underscore weapon.
So we'll have one for the weapon.
We're also going to have one for the left and right hands.
So I'm going to paste this two more times.
Call this first one right hand and call the next one left hand.
Now we need to define those in the CPP file.
I'm going to go ahead and copy what we've already got down here at the bottom, including that last
comment.
And this is going to be a montage here.
So what are our tags?
Well, we're going to have montage attack weapon.
So the F name will be montage dot attack dot weapon.
The F string is just going to say weapon and we'll have two more.
So I'm going to copy this and paste it twice.
The next one will be montage.
Attack right hand.
We'll change the name.
It'll say right hand.
The F string will say right hand and the next one will be for the left hand.
And we'll change this to say montage, dot attack, dot left hand.
And the string will say left hand.
So now there are three new types of gameplay tags and we're going to need our jet combat socket location
to take a gameplay tag.
We'll get to that.
For now, let's just go ahead and launch and see those gameplay tags in our project settings.
So we'll go ahead and open everything back up.
And in project settings we can go to gameplay tags and now we have montage.
There it is, attack.
And we have left hand, right hand and weapon.
Looks like my left hand there has a space in it.
That's not what I wanted, so I'm going to go ahead and take that space out of it and that should fix
that problem.
Other than that, though, we have our new gameplay tags and that's great.
The next thing we need to do is associate these gameplay tags with montages so that we know which montage
uses which of these gameplay tags, and we'll do that next.
I'll see you soon.