WEBVTT

00:01.000 --> 00:02.710
Welcome to your next quest.

00:02.740 --> 00:09.520
Now, our Arcane Shards ability needs a montage, so I'd like you to implement the montage.

00:09.550 --> 00:13.090
You know how to do this and there are several steps involved.

00:13.090 --> 00:15.010
Make sure you remember all of them.

00:15.010 --> 00:21.700
And I'd like you to decide when to call end ability so that we can go and cast it again.

00:21.700 --> 00:28.600
Now, of course, we're going to implement cost and cooldown for Arcane Shards, but until then we need

00:28.600 --> 00:30.940
to end it at some point, right?

00:30.940 --> 00:36.670
So take care of that and make sure that casting Arcane shards looks good.

00:36.670 --> 00:38.230
Playtest it a little bit.

00:38.230 --> 00:41.260
So pause the video and conquer this quest.

00:44.420 --> 00:49.070
Okay, so there are several steps to implementing this montage.

00:49.100 --> 00:51.140
We're first going to need a montage.

00:51.500 --> 00:59.870
So for that let's go into assets characters or a animation's abilities and see if we have a cast arcane

00:59.870 --> 01:00.410
shards.

01:00.410 --> 01:01.670
And sure enough, we do.

01:01.700 --> 01:02.930
It looks like this.

01:03.790 --> 01:09.100
So I'm going to create a montage based on cast arcane shards.

01:09.100 --> 01:13.090
Before I do though, I'm going to make sure that it has root motion enabled.

01:13.090 --> 01:14.080
And it does.

01:14.380 --> 01:16.510
So I'm going to go ahead and right click on it.

01:16.510 --> 01:25.660
Go to create Create Anim Montage and call this am underscore cast arcane shards.

01:26.940 --> 01:35.100
I'm going to open it up and I'm going to go to my preview scene settings and just show environment and

01:35.100 --> 01:38.040
floor there so we can see this a bit better.

01:38.040 --> 01:39.300
So here's what it looks like.

01:39.300 --> 01:41.370
We have a cast for Arcane Shards.

01:41.370 --> 01:42.390
Looks pretty cool.

01:42.390 --> 01:46.710
And I'm going to of course add some notifies here.

01:46.710 --> 01:50.970
I'm going to change this notify track to say motion warping.

01:50.970 --> 01:53.820
And I'll add another one for the events.

01:53.820 --> 01:57.840
We'll call it events and we'll add a motion warping notify state.

01:57.840 --> 02:01.290
So I'm going to right click Add Notify State motion warping.

02:01.290 --> 02:06.900
And I'm going to make sure that this warps to just before or lifts up the staff like that.

02:06.900 --> 02:11.730
So we're rotating towards the target and then lifting the staff.

02:11.970 --> 02:14.520
And I'm going to select motion warping.

02:14.520 --> 02:21.540
And in the details panel I'm going to set my warp target name to facing target I believe it's called

02:21.540 --> 02:26.910
I'm going to uncheck warp translation and rotation type can be facing.

02:26.910 --> 02:28.650
And we have motion warping.

02:28.650 --> 02:38.220
Now as soon as aura gets to about here I'm going to execute that anim notify add Notify and Montage

02:38.220 --> 02:38.880
event.

02:38.880 --> 02:42.420
And we're going to want to send a gameplay event.

02:42.420 --> 02:43.770
And we need an event tag.

02:43.770 --> 02:50.640
So I'm going to go to Project Settings into my gameplay tags where I have my event tags.

02:50.640 --> 02:54.270
We have event montage, electrocute and Firebolt.

02:54.270 --> 02:59.400
I'm going to add one for Arcane Shards now so I can have montage selected.

02:59.400 --> 03:05.280
I can click, plus I get event dot montage and it's going to be Arcane Shards.

03:06.340 --> 03:08.530
And with that, I'm done with project settings.

03:08.530 --> 03:16.540
I can go back to my Arcane Shards montage and set its event tag to Event montage.

03:16.570 --> 03:21.490
Arcane shards, and we'll be sending that event right about then.

03:21.490 --> 03:27.010
I'm going to keep it open though, in case I need to tweak it and go back to GA Arcane Shards.

03:27.600 --> 03:28.050
Okay.

03:28.050 --> 03:32.730
So here in our ability we're going to want to use a play montage and wait.

03:33.370 --> 03:34.840
And await gameplay events.

03:34.840 --> 03:40.840
I'm going to get event on and ability out of my way, and just make sure we can keep these things organized

03:40.840 --> 03:41.500
here.

03:41.740 --> 03:48.400
Now, I don't like splitting this node, so what I'm going to do is go ahead and promote that to a variable.

03:48.400 --> 03:52.930
I'm going to call this mouse hit location.

03:54.490 --> 03:56.020
So we'll have that.

03:56.960 --> 03:58.940
From our mouse target data.

04:00.610 --> 04:07.630
And I'm just going to plug that in right here instead of impact point.

04:11.270 --> 04:15.110
Right there and I'm going to plug it in to get ground points as well.

04:19.390 --> 04:22.540
And then I don't have too many wires going all over the place.

04:22.540 --> 04:27.700
And then I can also make this a little bit more nice, a little bit neater.

04:29.710 --> 04:31.270
We have a point collection.

04:31.270 --> 04:35.980
We're storing this in a variable, so no need to split off multiple wires here.

04:35.980 --> 04:38.770
We can just hook in point collection to this.

04:40.900 --> 04:42.040
Like that.

04:43.090 --> 04:45.940
So let's just clean this up just a bit.

04:52.060 --> 04:52.780
There we go.

04:52.780 --> 04:54.490
So this looks a lot better.

04:54.940 --> 04:57.220
We'll clean things up on this side as well.

04:58.900 --> 04:59.830
Like so.

05:02.210 --> 05:05.150
Okay, so when are we going to play a montage?

05:05.480 --> 05:10.250
Well, literally it could be at any point before we do all of this stuff.

05:11.070 --> 05:16.800
So I'd like to do it probably before we spawn our point collection.

05:16.800 --> 05:18.420
Or we could do it after.

05:18.450 --> 05:21.330
We could do it before we set our timer by event.

05:21.330 --> 05:26.100
All of this other stuff is kind of atomic in a sense that it happens all at once.

05:26.100 --> 05:33.390
So why don't we just take all of the events from set timer by event onward and just move them?

05:36.460 --> 05:41.980
We'll move them all forward, make sure they're all selected, and we'll stretch this wire out.

05:41.980 --> 05:46.480
And right after we've gotten our ground points, we can play montage and wait.

05:47.900 --> 05:50.540
So I'm going to use play montage and wait.

05:53.440 --> 05:57.100
And my arcane shards can have a montage to play.

05:57.100 --> 06:03.940
I'm just going to type in arcane and use my arcane shards.

06:03.940 --> 06:10.180
If I plan on using this ability for other characters, then I can turn that into a variable.

06:10.660 --> 06:12.790
Now I'm going to uncheck stop when ability ends.

06:12.790 --> 06:21.580
So my montage is sure to play, and I'm going to immediately after this use wait gameplay event.

06:24.430 --> 06:27.490
And for weight gain play events we're going to listen for.

06:30.540 --> 06:32.670
Event montage.

06:32.670 --> 06:33.900
Arcane shards.

06:34.840 --> 06:37.570
And I'm also going to check only trigger once.

06:38.270 --> 06:44.180
And as soon as we've received an event, that is when we're going to want to set our timer and do everything

06:44.180 --> 06:44.780
else.

06:50.350 --> 06:55.150
So with that, we've basically just added these two nodes here.

06:55.790 --> 06:59.390
To play a montage and wait, I'm going to start organizing this.

06:59.390 --> 07:04.880
I'm going to say for these two nodes, play montage and wait for event.

07:13.240 --> 07:15.040
For these nodes here.

07:15.070 --> 07:16.750
These can all get a comment.

07:19.000 --> 07:26.770
And these will say spawn point collection and get ground points.

07:28.750 --> 07:31.210
We'll start giving these a few colors.

07:38.560 --> 07:40.540
Just choosing some colors here.

07:42.440 --> 07:48.380
And then all of this stuff is kind of just the ability getting started, right?

07:51.460 --> 07:51.910
Right here.

07:51.910 --> 07:53.350
We're getting target data.

07:54.010 --> 07:56.530
Get target data under mouse.

08:09.010 --> 08:11.770
And the first thing we do is show the magic circle.

08:11.770 --> 08:16.450
And really, we could start using our sequence a little bit more for these things.

08:16.450 --> 08:20.710
I could take this sequence and I can break this.

08:24.710 --> 08:27.200
And we can have this next part.

08:27.850 --> 08:29.200
Go right after.

08:39.590 --> 08:42.650
Wait input press is kind of its own thing.

08:44.770 --> 08:50.680
But we do need it hooked up directly here because on press needs to go straight in.

08:50.680 --> 08:55.750
We can't just put this in the sequence because things have to go in order.

08:55.750 --> 09:00.310
In fact, for target data under mouse we should go after we have valid data right here.

09:00.310 --> 09:03.820
So really this shouldn't actually be a Pin.

09:09.480 --> 09:14.310
We actually need this to be right after target data.

09:15.670 --> 09:20.860
But these two can be one after the other in sequence.

09:20.860 --> 09:24.670
So we could have a sequence after the orange part here.

09:29.450 --> 09:35.120
And this will kind of help things not be one big long block of nodes.

09:37.030 --> 09:41.260
So play montage and wait for event can go immediately after.

09:50.760 --> 09:51.780
Like that.

09:54.280 --> 09:54.730
Now.

09:54.730 --> 09:57.850
Once the event has been received, we set the timer.

09:58.420 --> 10:03.130
And then we spawn our first shard we call our Spawn Shard event.

10:04.270 --> 10:06.100
And hide the magic circle.

10:07.480 --> 10:13.180
I think it's more appropriate to call spawn shard last in this line of things here.

10:14.670 --> 10:18.870
It's not really important, but I think I like it that way better.

10:19.520 --> 10:20.390
Okay.

10:21.670 --> 10:25.420
And all of this stuff is our loop, basically.

10:26.650 --> 10:28.270
Our async loop.

10:32.920 --> 10:36.340
And this can be show magic circle.

10:44.430 --> 10:47.850
Okay, so now we're playing a montage.

10:48.300 --> 10:50.100
We're going to be doing more here.

10:50.100 --> 10:52.920
So I think we can clean this up a little bit later.

10:52.920 --> 10:57.360
I'm going to make sure that we end the ability as soon as our loop is done here.

11:00.170 --> 11:02.960
So I'm just going to keep inability right there.

11:02.960 --> 11:04.550
And let's give this a try.

11:06.980 --> 11:09.110
I'll try with one player first.

11:14.290 --> 11:17.290
Okay, so I didn't turn to face the target.

11:17.290 --> 11:21.850
And that's because I forgot one crucial step to set my facing target.

11:21.850 --> 11:25.030
And that should be done before play montage and wait.

11:26.250 --> 11:33.000
And for that reason, I'm just going to put it as one step in my sequence right here.

11:33.570 --> 11:34.950
So I'm going to add a pen.

11:34.950 --> 11:37.560
I'm going to bring this wire to the second.

11:38.390 --> 11:40.010
Or I should say the third pen.

11:40.010 --> 11:42.890
And then I'm going to update facing target.

11:42.890 --> 11:44.390
So I'm going to call update.

11:46.680 --> 11:48.000
Facing target.

11:48.870 --> 11:50.700
We're going to pass in.

11:50.700 --> 11:53.700
Get avatar actor from actor info.

11:54.450 --> 12:01.440
As the target and we have our mouse hit location, we're going to get that and pass that in.

12:01.980 --> 12:04.590
Those interface functions sure are handy.

12:04.980 --> 12:08.010
And with that we're updating our facing target.

12:10.110 --> 12:11.700
This can get a comment as well.

12:11.700 --> 12:15.750
Update facing target.

12:22.690 --> 12:24.700
This will get a little bit darker green.

12:28.810 --> 12:34.180
Okay, so this is looking pretty organized, at least on this side of things.

12:34.180 --> 12:37.300
Over here it's a little less organized, but that's okay.

12:37.300 --> 12:40.630
And I'm going to set my numb points to four.

12:41.910 --> 12:44.910
That feels like a pretty good number to test this with.

12:44.910 --> 12:46.680
And I'm going to cast this again.

12:48.280 --> 12:51.580
Okay, so we rotated to face the target.

12:55.300 --> 12:56.200
Looks good.

12:57.230 --> 13:02.510
I think I might like that window to be a little bit shorter, so I'm going to bring it to about here.

13:03.880 --> 13:06.610
And I'm going to bring this an montage event.

13:07.730 --> 13:09.020
To about here.

13:15.210 --> 13:16.200
It's looking good.

13:32.160 --> 13:38.700
All right, let's set the number of players to two and just test this in multiplayer with two players.

13:45.540 --> 13:46.260
Looking good.

13:46.260 --> 13:51.150
Sometimes we get it up there on, say, a baluster.

13:52.840 --> 13:55.300
But it does look pretty good if we do it on the stairs.

13:55.300 --> 14:01.120
We do have those points at locations on the stairs and I'm happy with that.

14:02.660 --> 14:07.820
Now we're not orienting it towards the normal because we saw the limitations of gameplay cue, notify,

14:07.820 --> 14:08.540
burst.

14:08.570 --> 14:15.440
We know that we could pass in data in through our parameters and orient those if we wanted to.

14:15.470 --> 14:17.750
I'm actually happy with how they are though.

14:17.780 --> 14:19.670
I think this is looking great.

14:21.080 --> 14:21.830
Awesome.

14:23.100 --> 14:25.590
Okay, so that is the next step.

14:26.540 --> 14:29.210
We're now playing our montage.

14:29.240 --> 14:31.130
Our spell is looking great.

14:31.160 --> 14:33.620
We'll continue in the next video.

14:33.650 --> 14:36.140
Great job on the quest and I'll see you soon.
