Welcome to your next quest.
Now, our Arcane Shards ability needs a montage, so I'd like you to implement the montage.
You know how to do this and there are several steps involved.
Make sure you remember all of them.
And I'd like you to decide when to call end ability so that we can go and cast it again.
Now, of course, we're going to implement cost and cooldown for Arcane Shards, but until then we need
to end it at some point, right?
So take care of that and make sure that casting Arcane shards looks good.
Playtest it a little bit.
So pause the video and conquer this quest.
Okay, so there are several steps to implementing this montage.
We're first going to need a montage.
So for that let's go into assets characters or a animation's abilities and see if we have a cast arcane
shards.
And sure enough, we do.
It looks like this.
So I'm going to create a montage based on cast arcane shards.
Before I do though, I'm going to make sure that it has root motion enabled.
And it does.
So I'm going to go ahead and right click on it.
Go to create Create Anim Montage and call this am underscore cast arcane shards.
I'm going to open it up and I'm going to go to my preview scene settings and just show environment and
floor there so we can see this a bit better.
So here's what it looks like.
We have a cast for Arcane Shards.
Looks pretty cool.
And I'm going to of course add some notifies here.
I'm going to change this notify track to say motion warping.
And I'll add another one for the events.
We'll call it events and we'll add a motion warping notify state.
So I'm going to right click Add Notify State motion warping.
And I'm going to make sure that this warps to just before or lifts up the staff like that.
So we're rotating towards the target and then lifting the staff.
And I'm going to select motion warping.
And in the details panel I'm going to set my warp target name to facing target I believe it's called
I'm going to uncheck warp translation and rotation type can be facing.
And we have motion warping.
Now as soon as aura gets to about here I'm going to execute that anim notify add Notify and Montage
event.
And we're going to want to send a gameplay event.
And we need an event tag.
So I'm going to go to Project Settings into my gameplay tags where I have my event tags.
We have event montage, electrocute and Firebolt.
I'm going to add one for Arcane Shards now so I can have montage selected.
I can click, plus I get event dot montage and it's going to be Arcane Shards.
And with that, I'm done with project settings.
I can go back to my Arcane Shards montage and set its event tag to Event montage.
Arcane shards, and we'll be sending that event right about then.
I'm going to keep it open though, in case I need to tweak it and go back to GA Arcane Shards.
Okay.
So here in our ability we're going to want to use a play montage and wait.
And await gameplay events.
I'm going to get event on and ability out of my way, and just make sure we can keep these things organized
here.
Now, I don't like splitting this node, so what I'm going to do is go ahead and promote that to a variable.
I'm going to call this mouse hit location.
So we'll have that.
From our mouse target data.
And I'm just going to plug that in right here instead of impact point.
Right there and I'm going to plug it in to get ground points as well.
And then I don't have too many wires going all over the place.
And then I can also make this a little bit more nice, a little bit neater.
We have a point collection.
We're storing this in a variable, so no need to split off multiple wires here.
We can just hook in point collection to this.
Like that.
So let's just clean this up just a bit.
There we go.
So this looks a lot better.
We'll clean things up on this side as well.
Like so.
Okay, so when are we going to play a montage?
Well, literally it could be at any point before we do all of this stuff.
So I'd like to do it probably before we spawn our point collection.
Or we could do it after.
We could do it before we set our timer by event.
All of this other stuff is kind of atomic in a sense that it happens all at once.
So why don't we just take all of the events from set timer by event onward and just move them?
We'll move them all forward, make sure they're all selected, and we'll stretch this wire out.
And right after we've gotten our ground points, we can play montage and wait.
So I'm going to use play montage and wait.
And my arcane shards can have a montage to play.
I'm just going to type in arcane and use my arcane shards.
If I plan on using this ability for other characters, then I can turn that into a variable.
Now I'm going to uncheck stop when ability ends.
So my montage is sure to play, and I'm going to immediately after this use wait gameplay event.
And for weight gain play events we're going to listen for.
Event montage.
Arcane shards.
And I'm also going to check only trigger once.
And as soon as we've received an event, that is when we're going to want to set our timer and do everything
else.
So with that, we've basically just added these two nodes here.
To play a montage and wait, I'm going to start organizing this.
I'm going to say for these two nodes, play montage and wait for event.
For these nodes here.
These can all get a comment.
And these will say spawn point collection and get ground points.
We'll start giving these a few colors.
Just choosing some colors here.
And then all of this stuff is kind of just the ability getting started, right?
Right here.
We're getting target data.
Get target data under mouse.
And the first thing we do is show the magic circle.
And really, we could start using our sequence a little bit more for these things.
I could take this sequence and I can break this.
And we can have this next part.
Go right after.
Wait input press is kind of its own thing.
But we do need it hooked up directly here because on press needs to go straight in.
We can't just put this in the sequence because things have to go in order.
In fact, for target data under mouse we should go after we have valid data right here.
So really this shouldn't actually be a Pin.
We actually need this to be right after target data.
But these two can be one after the other in sequence.
So we could have a sequence after the orange part here.
And this will kind of help things not be one big long block of nodes.
So play montage and wait for event can go immediately after.
Like that.
Now.
Once the event has been received, we set the timer.
And then we spawn our first shard we call our Spawn Shard event.
And hide the magic circle.
I think it's more appropriate to call spawn shard last in this line of things here.
It's not really important, but I think I like it that way better.
Okay.
And all of this stuff is our loop, basically.
Our async loop.
And this can be show magic circle.
Okay, so now we're playing a montage.
We're going to be doing more here.
So I think we can clean this up a little bit later.
I'm going to make sure that we end the ability as soon as our loop is done here.
So I'm just going to keep inability right there.
And let's give this a try.
I'll try with one player first.
Okay, so I didn't turn to face the target.
And that's because I forgot one crucial step to set my facing target.
And that should be done before play montage and wait.
And for that reason, I'm just going to put it as one step in my sequence right here.
So I'm going to add a pen.
I'm going to bring this wire to the second.
Or I should say the third pen.
And then I'm going to update facing target.
So I'm going to call update.
Facing target.
We're going to pass in.
Get avatar actor from actor info.
As the target and we have our mouse hit location, we're going to get that and pass that in.
Those interface functions sure are handy.
And with that we're updating our facing target.
This can get a comment as well.
Update facing target.
This will get a little bit darker green.
Okay, so this is looking pretty organized, at least on this side of things.
Over here it's a little less organized, but that's okay.
And I'm going to set my numb points to four.
That feels like a pretty good number to test this with.
And I'm going to cast this again.
Okay, so we rotated to face the target.
Looks good.
I think I might like that window to be a little bit shorter, so I'm going to bring it to about here.
And I'm going to bring this an montage event.
To about here.
It's looking good.
All right, let's set the number of players to two and just test this in multiplayer with two players.
Looking good.
Sometimes we get it up there on, say, a baluster.
But it does look pretty good if we do it on the stairs.
We do have those points at locations on the stairs and I'm happy with that.
Now we're not orienting it towards the normal because we saw the limitations of gameplay cue, notify,
burst.
We know that we could pass in data in through our parameters and orient those if we wanted to.
I'm actually happy with how they are though.
I think this is looking great.
Awesome.
Okay, so that is the next step.
We're now playing our montage.
Our spell is looking great.
We'll continue in the next video.
Great job on the quest and I'll see you soon.