WEBVTT

00:07.010 --> 00:08.330
Welcome back.

00:08.570 --> 00:11.210
So we have our arcane Shards ability.

00:11.210 --> 00:16.520
It's pretty empty, but we've created some other things we know we're going to use, such as our magic

00:16.520 --> 00:17.240
circle.

00:17.240 --> 00:22.190
So it'd be nice to show that magic circle when we activate the ability.

00:22.640 --> 00:25.520
So that can be our first thing we do.

00:25.520 --> 00:31.670
In Activate Ability, we can right click and we can show Magic Circle.

00:31.700 --> 00:33.530
We can call this function.

00:33.530 --> 00:37.340
And the target here can be our avatar actor.

00:37.340 --> 00:40.010
So we can get avatar actor from actor info.

00:40.010 --> 00:45.410
We can pass that straight in because this is an interface blueprint native event.

00:45.410 --> 00:48.440
And we don't need to pass in a decal.

00:48.440 --> 00:50.120
That's just a nice to have.

00:50.120 --> 00:55.700
We don't really need to change it, but if we really wanted to, we could have multiple spells that

00:55.700 --> 01:02.540
have their own decals, and we could add a variable for the decal that we could pass in there if we

01:02.540 --> 01:03.710
wanted to do that.

01:03.740 --> 01:05.930
Now we're showing the magic circle.

01:05.930 --> 01:08.330
I'm going to go ahead and make a sequence here.

01:10.440 --> 01:18.330
And after showing the magic circle, I'd like to wait for our input to be pressed.

01:18.330 --> 01:23.460
And of course, when showing the magic circle, I'd like to hide the mouse cursor.

01:23.460 --> 01:29.940
And then once we press with our input, we can hide the magic circle and show that mouse cursor again.

01:29.940 --> 01:35.430
Now show Magic Circle could simply take care of that mouse cursor for us.

01:35.430 --> 01:39.390
We could go back and change our implementation for this.

01:39.390 --> 01:47.190
In our Aura Character class in the private folder, I can go into character or a character and I can

01:47.190 --> 01:50.040
find Show Magic Circle.

01:50.040 --> 01:53.400
And right here we have access to the Aura Player controller.

01:53.400 --> 02:03.060
We could take Aura Player controller here and we can set be show mouse cursor to false and then in Hide

02:03.060 --> 02:05.820
Magic Circle we could set it back to true.

02:05.820 --> 02:08.850
So this could just take care of that for us.

02:09.090 --> 02:11.460
So from the editor I'm going to save all.

02:11.700 --> 02:13.170
And then back to writer.

02:13.170 --> 02:17.580
I can just hit rerun and we can just compile and launch again.

02:17.580 --> 02:22.110
So we know that show Magic Circle is going to take care of that mouse cursor.

02:23.500 --> 02:26.050
Okay, so we're back in the editor.

02:26.440 --> 02:31.000
We don't get the option to open our last assets because we hit rerun in writer.

02:31.000 --> 02:39.130
But I'm going to open Arcane Shards, and I'd like to wait until we press our mouse button again.

02:39.130 --> 02:45.280
And I say again, assuming that we just clicked to activate this, but that doesn't necessarily have

02:45.280 --> 02:46.270
to be the case.

02:46.270 --> 02:51.910
Whatever our input is assigned to our arcane shards, that's the input we're talking about.

02:51.910 --> 02:55.060
So I'm going to wait for an input press.

02:55.060 --> 02:58.360
So we've seen how wait input release works.

02:58.360 --> 03:01.030
We can also use wait input press.

03:02.850 --> 03:08.700
And weight input press is going to execute on press when we press our input.

03:08.910 --> 03:12.870
So what we can do is we can call hide magic circle.

03:12.870 --> 03:18.180
So I can take my avatar actor that I've gotten here, I can duplicate that.

03:18.180 --> 03:26.550
I can right click and use hide magic circle passing in the avatar actor here and hooking this up to

03:26.550 --> 03:27.690
on press.

03:28.360 --> 03:31.030
We can see how this works by pressing play.

03:31.060 --> 03:34.840
We're going to have to actually get that ability equipped.

03:35.080 --> 03:39.460
So we could just assign that to one of our abilities we start out with.

03:39.460 --> 03:43.810
But I'm going to take it, spend a point and equip it to the one key.

03:43.810 --> 03:47.980
And I'm going to press the one key and I get my magic circle.

03:47.980 --> 03:52.540
And if I press the one key again, we hide the magic circle.

03:52.540 --> 03:56.830
Now we're not actually ending the ability, so we won't be able to activate it again.

03:56.830 --> 04:00.460
If we wanted to, we could just use end ability.

04:02.150 --> 04:10.610
So that we can continue testing this, but we have successfully waited for an input process and as soon

04:10.610 --> 04:13.430
as we press again, we hide that circle.

04:13.430 --> 04:17.660
So we have the ability to show and hide the circle based on an input press.

04:17.660 --> 04:21.320
Now, I don't want to have to level up just to test this ability.

04:21.320 --> 04:28.220
So I'm going to go to blueprints Character Aura and Open Aura character and search for those startup

04:28.220 --> 04:29.180
abilities.

04:32.420 --> 04:33.860
So we have startup abilities.

04:33.860 --> 04:35.450
I'm going to add one to it.

04:36.100 --> 04:42.340
And I'm going to choose GAA Arcane Shards and Arcane shards.

04:42.340 --> 04:50.320
If it's going to start off equipped, it needs to have its starting input tag set so we know where to

04:50.320 --> 04:51.430
assign that.

04:51.430 --> 04:57.430
So we have a start up input tag and I can just assign it to two.

05:00.880 --> 05:03.010
Oh, I guess I have one open.

05:03.010 --> 05:04.960
I'll go ahead and set it to one.

05:05.910 --> 05:07.410
Input tag one.

05:07.530 --> 05:10.920
And with that we'll start off with it and I can press one.

05:11.820 --> 05:15.060
And we get that decal and I can press one again.

05:15.090 --> 05:21.570
Now, of course, I pressed one and the decal went away, but came back.

05:21.570 --> 05:25.650
And that's because we're actually ending the ability.

05:25.650 --> 05:31.770
So if we want, we can have a little bit of a delay here before we actually end the ability like point

05:31.770 --> 05:32.460
two.

05:34.200 --> 05:41.400
And then if we go ahead and press and release, we won't automatically activate that ability again.

05:41.960 --> 05:44.300
But if we press and we hold.

05:45.110 --> 05:52.670
Well, then as soon as that ability is ended, as long as we're holding that button down, we're actually

05:52.670 --> 05:59.120
sending that ability input tag held status right on over to the ability system component.

05:59.120 --> 06:05.660
We'll take care of this with cooldowns, of course, as our spells are going to use cooldowns in order

06:05.660 --> 06:07.820
to avoid spamming them of course.

06:07.820 --> 06:13.910
But now our ability has the capability of showing a decal.

06:14.000 --> 06:17.120
We can move it around, we can aim.

06:17.450 --> 06:20.660
Now we get our highlighting behavior.

06:20.660 --> 06:26.300
And of course if we hover over the enemy, we get a bit of a jump.

06:26.300 --> 06:34.550
So if you didn't like that jump, you could figure out a way to suppress the trace against the enemy.

06:35.130 --> 06:42.120
Now we don't want to suppress cursor trace in general, because cursor trace is giving us the location

06:42.120 --> 06:43.230
of the mouse cursor.

06:43.230 --> 06:46.950
So we don't actually want to disable cursor trace.

06:46.950 --> 06:49.260
But you could create another block tag.

06:49.260 --> 06:56.460
And based on that tag you could change the collision channel that you're tracing against.

06:56.460 --> 06:59.160
For example, you could do it in a number of ways.

06:59.160 --> 07:03.360
So there are ways to avoid that little bit of a jump.

07:03.360 --> 07:06.660
I'm okay with it, but you could avoid that if you wanted to.

07:06.690 --> 07:07.230
Okay.

07:07.230 --> 07:16.350
So Arcane Shards has a very basic ability to create a decal, and it's waiting for us to aim at something

07:16.350 --> 07:17.610
and then do something else.

07:17.610 --> 07:25.800
So as we use our wait input press, we have the ability to have this sort of intermediate step in our

07:25.800 --> 07:27.630
arcane Shards spell.

07:27.630 --> 07:31.830
We wait until that input is pressed before we hide the magic circle.

07:31.830 --> 07:37.080
And of course, in the ability we're going to do things a little bit more gracefully than that.

07:37.080 --> 07:42.570
And of course, this ability has to do a lot more things before we're done, but at least we have that

07:42.570 --> 07:44.010
basic functionality.

07:44.700 --> 07:50.610
And I'm just going to remind you of something in our ability system component that's allowing us to

07:50.610 --> 07:55.320
use these weight input, press and release gameplay ability tasks.

07:55.320 --> 08:00.900
And we can go to ability input tag pressed.

08:00.900 --> 08:05.910
And remember that we're calling Invoke Replicated Event.

08:06.210 --> 08:12.990
This is what allows us to have that predictive behavior for press and release events, where literally

08:12.990 --> 08:18.210
sending this across the network that we're pressing our input.

08:18.210 --> 08:20.280
And the same goes for released.

08:20.280 --> 08:27.690
We're invoking replicated event when ability input tag is released as well specifying that we're releasing.

08:27.690 --> 08:33.930
So without this, those weight input press and release gameplay ability tasks don't work.

08:33.930 --> 08:37.650
So I just thought I would remind you of that very important detail.

08:37.650 --> 08:41.910
This is what's allowing us to be able to use those ability tasks.

08:42.330 --> 08:45.240
Okay, so that's looking great.

08:45.240 --> 08:53.670
We now need to put some things right here after we've pressed our input, and we'll start implementing

08:53.670 --> 08:55.530
those in the videos to come.

08:56.040 --> 08:58.110
Great job and I'll see you soon.
