WEBVTT

00:07.240 --> 00:08.380
Welcome back.

00:08.380 --> 00:14.830
So now that we have our passive abilities, it's time for some more offensive spells.

00:14.860 --> 00:19.240
I'd like to make use of our arcane damage type.

00:19.270 --> 00:26.890
I'd like to make a new ability that uses this, and here is a really nice Niagara system I'd like to

00:26.890 --> 00:27.640
use for this.

00:27.640 --> 00:28.960
Now this looks the best.

00:28.960 --> 00:35.920
If you go to window and preview scene settings and show the floor, as this is meant to be spawned on

00:35.920 --> 00:36.610
a floor.

00:36.610 --> 00:42.280
So yes, there are parts of it beneath the floor, but it's meant to be spawned on a flat surface or

00:42.280 --> 00:46.900
an angled surface, as long as it's oriented correctly on that surface.

00:46.900 --> 00:52.330
Now, this effects system is pretty nice because it has several components to it.

00:53.360 --> 01:01.490
We can zoom in on the emitters and click on isolate in order to just see one emitter at a time.

01:01.520 --> 01:05.360
Now there's always one large crystal being spawned here.

01:05.360 --> 01:13.340
And if we click on isolation for shards small, we'll see that there's several smaller shards.

01:13.340 --> 01:20.060
And if we go to the right, we'll see that there are even smaller shards that get spawned out randomly

01:20.060 --> 01:21.560
in a torus shape.

01:21.710 --> 01:28.580
And then, of course, there's debris, which are little shards of arcane crystals, and all together

01:28.580 --> 01:30.350
they make up this effect.

01:30.350 --> 01:36.080
And those debris are actually configured to bounce off of the ground.

01:36.080 --> 01:43.940
If we're using a ground that has some sort of collision hall on it, you'll see that those shards actually

01:43.940 --> 01:45.620
do bounce off of the ground.

01:45.620 --> 01:48.890
So they have some physics properties to them.

01:48.890 --> 01:50.210
I'm going to go ahead and delete that.

01:50.210 --> 01:55.520
So I'd like to make a spell that that summons these shards.

01:55.520 --> 01:57.710
We'll call it arcane shards.

01:57.710 --> 02:05.600
And I think for this spell, we have a unique opportunity to start thinking about magic circles and

02:05.600 --> 02:08.750
how we can use decals to implement magic circles.

02:08.750 --> 02:15.410
Magic circles are circles that appear on the ground based on where your mouse cursor is, usually allowing

02:15.410 --> 02:22.550
you to aim and specifically decide where you'd like to start that ability activation.

02:22.550 --> 02:31.580
And if we go into our assets folder into magic circles, we'll see that we have a texture called Magic

02:31.580 --> 02:32.750
Circle one.

02:33.140 --> 02:39.080
And next to that texture we have a material called Magic Circle one.

02:39.080 --> 02:43.820
And if we set the preview mesh to plane, we can see what it looks like.

02:43.820 --> 02:49.340
It's this magic circle using that texture as the opacity.

02:49.340 --> 02:50.810
And it has a color.

02:50.810 --> 02:57.080
So you could easily change the color and even has a multiply here for overdriving the color.

02:57.080 --> 03:01.310
If you'd like it to glow even more, you can set it to a higher value.

03:02.600 --> 03:07.790
So we have this Magic circle material, and I'd like to use this in a decal.

03:07.790 --> 03:15.650
So I'd like to have an actor that has a decal component, which we can use this material for allowing

03:15.650 --> 03:24.080
us to project this material onto the floor when we're targeting, and getting ready to spawn some arcane

03:24.080 --> 03:27.800
shards for our Arcane Shards ability.

03:28.190 --> 03:34.220
So for that reason, I'm going to create a new actor that has a decal component on it, and I'm going

03:34.220 --> 03:40.040
to go into ability system aura abilities, and we have fire and lightning, but we don't have an arcane

03:40.040 --> 03:40.820
folder.

03:40.820 --> 03:43.910
I'm going to create a new folder called arcane.

03:44.030 --> 03:49.940
We're going to go into that and make a new folder here for our Arcane Shards ability.

03:49.940 --> 03:52.040
I'm going to call it Arcane Shards.

03:52.040 --> 03:58.250
And in here is where we'll have all classes related to Arcane shards, except for perhaps our gameplay

03:58.250 --> 04:02.540
cues, which we're keeping in our centralized gameplay queue.

04:02.540 --> 04:03.950
Notifies folder.

04:04.890 --> 04:05.310
Now.

04:05.310 --> 04:11.580
Arcane shards, as I mentioned, is going to use a decal, and I'd like to make an actor specifically

04:11.580 --> 04:19.140
with a decal component that we can spawn and destroy on demand, so that we're only using this special

04:19.140 --> 04:22.200
actor with a decal component when we need to.

04:22.230 --> 04:27.750
So for that reason, I'm going to make a brand new actor and I'm going to make a C plus plus class for

04:27.750 --> 04:28.170
it.

04:28.170 --> 04:32.280
So I'm going to go into Aura Public and this will just be an actor.

04:32.280 --> 04:38.490
So I'm going to put it in the actor folder, and I'll go ahead and create a new C plus plus class based

04:38.490 --> 04:39.510
on actor.

04:39.510 --> 04:41.190
We'll go ahead and click next.

04:41.190 --> 04:45.030
And I'm going to call this Magic Circle.

04:45.330 --> 04:47.970
So this will be our Magic Circle actor.

04:47.970 --> 04:51.540
So let's go ahead and create the Magic Circle actor.

04:51.570 --> 04:54.390
We'll go ahead and close the editor as well.

04:54.720 --> 04:58.740
Now it's asking if I'd like to apply changes to my material.

04:58.740 --> 05:04.080
I'm going to click no so that it remains unchanged and save.

05:04.200 --> 05:13.020
Now I'm going to close all my tabs and go into my new actor class, which will be in actor and it's

05:13.020 --> 05:13.830
Magic Circle.

05:13.830 --> 05:17.940
Here's the CPP file and here's our header file.

05:17.940 --> 05:22.470
I'm going to go ahead and just clear out all of these comments that I don't care about.

05:22.470 --> 05:29.970
And I'd like to move my tick function up to the public section just under my constructor.

05:29.970 --> 05:35.280
I don't feel like I need a public section down there and in magic circle dot CPP.

05:35.280 --> 05:36.150
Same thing.

05:36.150 --> 05:40.110
We'll go ahead and clear out the comments and we have tick.

05:40.110 --> 05:41.580
We have begin play.

05:41.850 --> 05:47.850
Things are looking good and the only thing our magic circle is going to need for now is a decal component.

05:47.850 --> 05:52.260
And a decal component has the class you decal component.

05:52.260 --> 05:58.110
So I'm going to make a T object pointer of type U decal component.

05:58.740 --> 06:03.060
And I'm going to call this Magic Circle decal.

06:04.260 --> 06:08.130
And I'd like this to be a U property with visible anywhere.

06:10.900 --> 06:15.100
And I'm going to construct this in our magic circle constructor.

06:15.130 --> 06:24.490
I'm going to say magic circle decal equals Createdefaultsubobject using U decal component.

06:25.030 --> 06:31.060
And I'm going to give this the name Magic Circle decal.

06:33.800 --> 06:36.920
Now you decal component is incomplete.

06:36.920 --> 06:40.670
So that means we're going to need to know where to go now.

06:40.670 --> 06:48.860
Writer just happens to give me a link to you decal component in the Unreal Engine documentation, and

06:48.860 --> 06:54.410
we see that the module is an engine and the include is component slash decal component.

06:54.410 --> 07:00.170
So I should be able to just include component slash decal component.

07:00.620 --> 07:04.580
And we have a default scene route component.

07:04.580 --> 07:11.990
And I can take Magic circle decal and call Setup attachment and just attach it to the root component.

07:13.080 --> 07:19.410
And with that, we have our decal component and we can go ahead and create a blueprint based on our

07:19.410 --> 07:20.850
decal component.

07:21.300 --> 07:23.490
So I'm going to compile and launch the editor.

07:24.900 --> 07:31.140
And with that, I can open up what I had before, which was just my Magic Circle material.

07:31.170 --> 07:32.880
Actually, I can close that.

07:32.880 --> 07:41.670
And what I'm going to do is open up Blueprint's ability, system or abilities arcane arcane shards,

07:41.670 --> 07:47.250
and I'll make the blueprint based on my new actor here, as it's related to this class.

07:47.250 --> 07:53.970
So I'm going to create new blueprint class and search for Magic Circle and make my Magic Circle Blueprint.

07:53.970 --> 07:58.110
I'll call this BP underscore Magic Circle.

07:59.770 --> 08:00.910
I can open it up.

08:00.910 --> 08:06.430
And if I zoom out and select Magic Circle decal, we have a decal.

08:06.850 --> 08:17.200
By default it's facing this direction, and decals have a material, a decal material, and I can search

08:17.200 --> 08:18.580
for Magic Circle.

08:19.420 --> 08:22.090
Magic Circle one and I can put that on there.

08:22.090 --> 08:28.870
Now we can't see it, but we can see that material once the decal is projecting on to something.

08:28.870 --> 08:36.280
So if I compile and save and I bring in one of these magic circle actors, I can bring it in right here

08:36.580 --> 08:41.470
and notice that it's showing right there that decal on the wall.

08:42.170 --> 08:46.460
So as you can see, the decal actor is projecting sideways.

08:46.460 --> 08:48.740
It's not projecting from top to bottom.

08:48.740 --> 08:54.860
Now we can rotate this around and you can see that it gets stretched if I rotate it 180 degrees.

08:54.860 --> 08:56.780
Now it's facing the other way.

08:56.780 --> 09:02.930
But of course it's still just showing that circle on the wall and not the floor.

09:02.960 --> 09:04.580
Now this looks pretty cool.

09:04.580 --> 09:06.350
You could just leave it like that.

09:06.350 --> 09:11.090
And now in our level, we have this really cool decal on the wall.

09:11.090 --> 09:15.230
And that can make for some really nice decorations if you want that.

09:15.230 --> 09:21.590
That's actually a pretty cool idea, but I'm going to remove the decal.

09:21.620 --> 09:27.350
The Magic Circle actor I'm actually not going to remove it, but I'd like to move it.

09:27.350 --> 09:32.540
I'd like to move it over here because I want to show this on the ground now because it's projecting

09:32.540 --> 09:33.530
sideways.

09:33.530 --> 09:36.140
It looks really stretched on the ground there.

09:37.010 --> 09:44.630
So our decal itself, since it projects itself sideways, we're going to rotate it here relative to

09:44.630 --> 09:45.350
the root.

09:45.380 --> 09:50.990
I'm going to rotate it by 90 degrees like this so that it's facing this way.

09:50.990 --> 09:52.880
So its x vector.

09:52.880 --> 09:55.310
Its forward vector is facing up.

09:55.310 --> 09:58.400
So really it's on its side now.

09:58.490 --> 10:05.270
And I can go ahead and just take this magic circle and remove it and bring in a new one.

10:05.270 --> 10:08.930
And we'll see that this one is now projecting onto the ground.

10:08.930 --> 10:10.160
This is interesting.

10:10.160 --> 10:13.550
Notice that the geometry on this brick here goes up.

10:13.550 --> 10:17.660
And the decal actually is going up onto that brick.

10:17.660 --> 10:23.120
So it's almost like someone just spray painted onto a stencil here on the ground.

10:23.120 --> 10:27.140
And so decals are actually really nice for that reason.

10:27.140 --> 10:35.060
Now if I press play and I walk onto it, notice that aura is also getting that decal sort of spray painted

10:35.060 --> 10:36.500
onto her body too.

10:36.530 --> 10:41.570
So anything that's within that decal volume is also going to get the decal.

10:41.600 --> 10:47.720
For that reason, I typically like to take the decal and make it a little bit shorter, so I can press

10:47.720 --> 10:52.040
R and move this down so that it's only, you know, yay high.

10:52.040 --> 10:53.000
And.

10:53.650 --> 11:00.430
With that, we can walk on to it and you'll see that only Ora's ankles really are getting that deckle

11:00.430 --> 11:02.200
sort of spray painted on.

11:02.200 --> 11:08.170
And it's the floor here that gets the majority of it, and I kind of like that effect.

11:08.590 --> 11:12.280
Now, decals can act a little funny when you move them.

11:12.280 --> 11:18.910
If you move it, say over here to this pillar or piece of the stair, you'll see that it's kind of going

11:18.910 --> 11:22.000
up the sides of it, and you can't really see it at certain angles.

11:22.000 --> 11:25.750
It also stretches with really, really vertical angles.

11:25.750 --> 11:29.740
And if you move it up, you'll see that it does move up those stairs.

11:29.740 --> 11:36.070
But if you want it to say be painted down the entire length of the stairs, you'd have to go in and

11:36.070 --> 11:41.140
actually increase its size like this, which I'm going to just keep it nice and short.

11:41.140 --> 11:47.830
So anyway, there's our magic circle, and the magic circle is going to be nice and useful for us,

11:47.830 --> 11:55.840
because I'm going to want to show this circle when Ora is casting arcane shards and deciding where those

11:55.840 --> 12:00.640
shards should appear, where to spawn those effects and cause damage.

12:00.640 --> 12:08.080
So my goal is to activate the ability and then pop up with this decal and have it follow my mouse cursor

12:08.080 --> 12:10.390
until I click and confirm.

12:10.390 --> 12:12.160
That's our next step.

12:12.160 --> 12:14.230
So we have some things to do, right?

12:14.230 --> 12:17.920
So this is the beginning of the Arcane Shards.

12:17.920 --> 12:19.690
We have our Magic Circle class.

12:19.690 --> 12:23.710
It's looking great and we'll continue in the next video.

12:23.740 --> 12:24.880
I'll see you soon.
