WEBVTT

00:08.280 --> 00:09.360
Welcome back.

00:09.360 --> 00:13.290
Now we're activating and deactivating our passive abilities.

00:13.290 --> 00:16.740
And we didn't test in multiplayer last video.

00:16.740 --> 00:18.540
But we can test that right now.

00:18.540 --> 00:25.140
And in this video I'm concerned with having more than just print strings.

00:25.140 --> 00:27.360
I want to see some Niagara systems.

00:27.360 --> 00:29.430
So let's just really quickly test this.

00:29.460 --> 00:33.030
In multiplayer, I'm going to equip my halo of protection.

00:33.030 --> 00:37.470
We see client one and server both say it was activated.

00:37.470 --> 00:39.690
We can go ahead and try to push it out.

00:39.690 --> 00:43.920
And we see that life siphon was activated both on server and client.

00:43.920 --> 00:46.830
Halo of protection was ended.

00:46.830 --> 00:50.370
And so it looks like in general all of these things are working.

00:50.370 --> 00:51.810
Mana siphon was activated.

00:51.810 --> 00:53.370
We didn't push anything out.

00:53.370 --> 00:55.800
Let's go ahead and replace mana siphon.

00:55.800 --> 00:57.030
Mana siphon ended.

00:57.030 --> 00:59.490
So it looks like things are working.

01:00.040 --> 01:03.430
And we're ready to start making some visual effects.

01:03.460 --> 01:10.060
Now I'm going to want a Niagara component just like our debuff component.

01:10.060 --> 01:16.180
We have a debuff component on our character for each debuff type.

01:16.180 --> 01:22.570
So if we go to aura BP Aura character, we have a stun debuff component and a burn debuff component.

01:22.570 --> 01:28.990
And they're not set to be activated automatically, but we can check Auto Activate to see them there.

01:28.990 --> 01:32.680
I'd like something similar, but for my passive abilities.

01:32.680 --> 01:40.090
And this is a good design pattern because if our debuff components themselves have their own unique

01:40.090 --> 01:47.200
tag to identify themselves, they can listen to a generic broadcast save from the ability system component,

01:47.200 --> 01:54.430
and whenever one of our passive abilities is activated, we could broadcast, say, the ability tag,

01:54.430 --> 02:01.240
and we could have a passive Niagara component that can activate and deactivate itself based on some

02:01.240 --> 02:02.680
delegate broadcast.

02:02.680 --> 02:04.930
So that's the approach I'd like to take.

02:05.170 --> 02:10.570
We already have a stun debuff component, which is basically a debuff component with a tag, and it

02:10.570 --> 02:15.190
listens for a delegate broadcast, but it listens for a change in a gameplay tag.

02:15.190 --> 02:19.510
So we're going to need something a little different and that merits a new class.

02:19.510 --> 02:23.470
So I'm going to make a new type of Niagara component.

02:23.470 --> 02:26.620
So let's go into Aura Public Ability system.

02:26.620 --> 02:31.330
And we'll put this in a new folder called passive.

02:31.330 --> 02:36.520
So I'm going to search for all classes and use Niagara component.

02:37.330 --> 02:43.360
We'll choose Niagara component as the parent class, and we'll put this in ability system slash passive.

02:43.360 --> 02:48.880
And we'll call this passive Niagara component.

02:49.440 --> 02:55.440
We can call it passive spell Niagara component, but I don't want it to get too long, so we'll call

02:55.440 --> 02:56.250
it this.

02:56.280 --> 02:58.770
We'll create the class and close the editor.

03:01.290 --> 03:10.470
So I'm going to go ahead and keep these tabs open for now and go to my public ability system passive

03:10.470 --> 03:13.230
and get that passive Niagara component open.

03:13.230 --> 03:17.940
I'll pull it all the way to the left and control Co to get the CP.

03:18.120 --> 03:21.420
I always like to move my CP files to the left.

03:21.420 --> 03:26.250
I don't know why, it just feels more comfortable that way for me, but I digress.

03:26.250 --> 03:32.730
We have passive Niagara component and what does our passive Niagara component need?

03:32.730 --> 03:34.680
It needs a couple things.

03:34.680 --> 03:38.040
It needs a gameplay tag and also needs a constructor.

03:38.040 --> 03:40.770
Those are things we can put in the public section.

03:40.770 --> 03:43.950
So we'll start with a constructor.

03:46.480 --> 03:47.830
And a gameplay tag.

03:47.830 --> 03:50.200
So f gameplay tag.

03:50.200 --> 03:57.220
We'll call this passive spell tag and it gets a U property and we're going to make it edit defaults

03:57.220 --> 03:58.060
only.

03:58.750 --> 04:04.060
We do need to include the header file in order to use gameplay tags.

04:04.060 --> 04:12.640
That header is gameplay tag container dot h, and now we can use that gameplay tag and we can generate

04:12.640 --> 04:15.130
a definition for our constructor.

04:15.130 --> 04:18.790
And all I want is to set be auto activate to false.

04:20.970 --> 04:23.130
Okay, so a couple things.

04:23.130 --> 04:28.980
I want this Niagara component to activate itself in response to a delegate broadcast.

04:28.980 --> 04:34.620
And that means we'll need a delegate to broadcast something to broadcast from the ability system component.

04:34.620 --> 04:40.020
So I'm going to make a new delegate on the ability system component that we can broadcast.

04:40.020 --> 04:43.290
So what's this delegate going to do.

04:43.320 --> 04:44.910
How many params does it need.

04:44.910 --> 04:52.650
Well I'd like to broadcast the ability tag so we know which ability is being activated and deactivated.

04:52.650 --> 04:58.290
And I'd also like to broadcast a boolean along with it for whether or not to activate or deactivate

04:58.290 --> 05:00.450
that Niagara component.

05:00.450 --> 05:03.000
So we're going to make a two params delegate.

05:03.000 --> 05:08.820
We're going to declare multicast delegate two params.

05:09.870 --> 05:12.450
And I'm going to call this delegate f.

05:13.140 --> 05:20.820
Activate passive effect and it'll take a const f gameplay tag reference.

05:22.230 --> 05:27.450
And I'll go ahead and give it an inline comment that says ability tag.

05:28.830 --> 05:33.240
And it's going to take a boolean, and I'll give this an inline comment as well.

05:33.240 --> 05:36.000
And this will say B activate.

05:36.780 --> 05:44.250
Just so at a glance, we can know what these are for, and we'll add this delegate right here to our

05:44.250 --> 05:44.790
delegates.

05:44.790 --> 05:48.930
And I'm going to call this simply activate passive effect.

05:49.320 --> 05:57.870
So now that this delegate exists, our passive Niagara component can now listen for it and have a callback

05:57.870 --> 05:59.760
to respond with.

05:59.790 --> 06:03.000
Now where are we going to bind this function?

06:03.330 --> 06:07.050
I'd like to do it early on, preferably in begin play.

06:07.710 --> 06:11.550
So I'm going to make a protected section and override Virtualvoid.

06:11.550 --> 06:11.880
Begin.

06:11.880 --> 06:13.710
Play, not begin.

06:13.710 --> 06:14.730
Destroy.

06:14.820 --> 06:15.420
Begin.

06:15.420 --> 06:16.290
Play.

06:16.290 --> 06:17.670
Override here.

06:18.660 --> 06:24.270
In addition to begin play, I'd like the callback for this, and I'm going to call it on Passive Activate

06:24.360 --> 06:33.150
for lack of a better name, and it will be const f gameplay tag, reference ability tag for the first

06:33.150 --> 06:40.680
input, and a bool called be activate for the second, and we can generate definitions for both of these.

06:42.910 --> 06:44.110
So we have begin play.

06:44.110 --> 06:46.270
We have on passive activate.

06:46.270 --> 06:51.040
Now begin play is where we want to bind the callback to that delegate.

06:51.040 --> 06:56.710
And I'm going to do something similar to what we did in our Debuff Niagara system.

06:56.980 --> 07:02.020
In other words, I'm going to check to see if the ability system component is valid first.

07:02.200 --> 07:09.310
If it's not, then I'm going to register to a delegate on the owner that will be broadcast when that

07:09.310 --> 07:11.920
ability system component becomes valid.

07:11.920 --> 07:18.430
So we're kind of making sure to cover ourselves in both cases.

07:18.430 --> 07:25.840
So first thing I'm going to do is I'm going to say if you aura ability system component I'll get that

07:25.840 --> 07:33.430
auto include I'll call this our ASC equals I'll cast to aura ability system component.

07:34.590 --> 07:41.490
And we're going to use the you ability system blueprint library function.

07:41.490 --> 07:46.530
Again there's another auto include get ability system component.

07:46.530 --> 07:49.470
What are we going to get the ability system component of.

07:49.470 --> 07:53.640
Well here in the Niagara component we can call get owner.

07:55.010 --> 07:56.540
So see how that works.

07:56.540 --> 08:03.020
We can always get the ability system component and get ability system component on.

08:03.020 --> 08:08.840
The blueprint library just requires an actor and that's pretty easy to access.

08:08.840 --> 08:14.210
So once we have this aura ask, we can bind our callback.

08:14.210 --> 08:20.150
But the thing is, you know, at this point the aura ask could possibly not be registered yet.

08:20.150 --> 08:22.700
So we're going to have an else in this case as well.

08:23.030 --> 08:25.010
Now first things first.

08:25.010 --> 08:32.780
If it is valid then we're going to take aura ask and get that activate passive effect and bind to it

08:32.780 --> 08:34.580
with Add you object.

08:34.580 --> 08:40.310
We'll bind this user object and we'll bind our callback on passive activate.

08:40.310 --> 08:42.710
We're going to go ahead and put that right there.

08:42.710 --> 08:44.900
And we've bound to it.

08:45.200 --> 08:52.430
But if the aura ask isn't valid yet then how did we get it from within the Debuff Niagara system?

08:52.430 --> 08:59.600
Well we did so by accessing a delegate that gets broadcast from our character, and that delegate is

08:59.600 --> 09:02.150
accessed through the combat interface.

09:02.150 --> 09:09.350
So I'm actually going to say else if and I'm going to see if the owner implements the combat interface.

09:09.350 --> 09:14.810
So I'm going to say I combat interface again another auto include there.

09:14.810 --> 09:16.820
We'll call it combat interface.

09:19.580 --> 09:23.690
And set that equal to the result of a cast to I combat interface.

09:24.690 --> 09:26.340
And we'll cast get owner.

09:27.210 --> 09:30.180
So in this case now we have the combat interface.

09:30.180 --> 09:36.720
And from the combat interface, if that's valid, which inside the if statement it is we can use that

09:36.720 --> 09:39.090
get on ASC register delegate.

09:39.090 --> 09:46.380
By the way, you can always go back to the combat interface to remind yourself what its signature is.

09:46.380 --> 09:52.320
Get on ASC register delegate is this function that returns an F on ASC registered.

09:52.320 --> 09:53.910
We can even check that out.

09:53.910 --> 10:00.600
It's defined up here F on ASC registered simply returns a pointer to the ability system component that

10:00.600 --> 10:02.010
just became valid.

10:02.920 --> 10:04.930
And what are we going to bind?

10:04.930 --> 10:07.480
Well, we could add a lambda to this.

10:07.480 --> 10:09.790
I'm going to go ahead and use Add lambda.

10:10.840 --> 10:12.790
And let's make a lambda.

10:16.760 --> 10:21.200
And the lambda can take in a you ability system component.

10:25.200 --> 10:26.430
I'll call it AC.

10:26.550 --> 10:29.850
And all I want to do is what I did here.

10:29.850 --> 10:35.610
I want to take these lines where we're binding our callback to activate passive effect.

10:35.610 --> 10:38.370
I'm just going to paste those into my lambda here.

10:38.820 --> 10:42.600
Now of course we need to capture this if we're going to be using it.

10:42.600 --> 10:46.380
So I have to pass this into my square brackets there.

10:46.380 --> 10:51.090
And with that I now have my callback bound.

10:51.090 --> 10:53.340
Now what does our callback need to do?

10:53.340 --> 10:57.420
It just needs to activate or deactivate itself based on two conditions.

10:57.420 --> 11:04.590
Is the ability to broadcast this component's ability tag, because remember it has a passive spell tag.

11:04.590 --> 11:09.510
If that's the case, then we should see if the boolean be activate is true or false.

11:09.900 --> 11:10.650
So let's do it.

11:10.650 --> 11:18.150
Let's first take that ability tag and call matches tag exact with our passive spell tag.

11:18.630 --> 11:20.370
Otherwise we do nothing.

11:20.370 --> 11:24.030
Then we can check if B activate.

11:26.090 --> 11:28.100
And we'll have an if and an else.

11:28.830 --> 11:35.370
Now if be activate could also get a little buddy here I'm going to add another condition.

11:35.370 --> 11:40.950
I'm going to say not is active because I don't want to activate if it's already active.

11:40.950 --> 11:47.100
But if we pass that then we can call activate the function all Niagara components have.

11:47.100 --> 11:53.130
And in the else case we'll call deactivate another function all Niagara components are blessed with.

11:53.130 --> 12:00.630
So now on passive activate is going to handle activating and deactivating in response to the delegate

12:00.630 --> 12:01.380
broadcast.

12:01.410 --> 12:05.640
Now the only thing left is to actually broadcast that delegate.

12:06.250 --> 12:09.790
Now here's the thing a delegate broadcast happens locally.

12:09.790 --> 12:11.710
It doesn't happen across the network.

12:11.710 --> 12:13.330
It's not like an RPC.

12:13.870 --> 12:21.280
And if we're broadcasting this from the ability system component in our function server equip ability

12:21.280 --> 12:23.560
implementation, we're on the server.

12:23.560 --> 12:26.170
It's called server equip ability implementation.

12:26.170 --> 12:29.140
So this would only be broadcast on the server.

12:29.560 --> 12:32.620
For that reason I'd like to make the broadcast in a.

12:32.620 --> 12:37.810
Net multicast RPC because all characters need to see these particles.

12:37.810 --> 12:40.720
Everyone deserves to see particles once in a while.

12:40.720 --> 12:49.690
So I'm going to go ahead and go into our ability system components H and add myself a nice RPC.

12:50.670 --> 12:52.230
I'll put it right here.

12:52.380 --> 12:54.330
I'll call it multicast.

12:54.540 --> 12:57.900
Activate passive effect.

12:58.080 --> 13:01.860
It's going to take a const f gameplay tag for the ability tag.

13:05.560 --> 13:08.110
And a bool called B activate.

13:09.970 --> 13:15.220
And because this is going to be an RPC, it gets net multicast.

13:15.220 --> 13:19.450
And I'm going to make this we can make it unreliable.

13:20.020 --> 13:21.640
It's a visual effect.

13:22.220 --> 13:29.300
As important as those beautiful effects are, as much joy they add to people's lives.

13:29.300 --> 13:30.710
They're unreliable.

13:30.920 --> 13:32.810
Now multicast.

13:32.810 --> 13:34.490
Activate passive effect.

13:34.490 --> 13:35.780
What's it going to do?

13:35.810 --> 13:37.370
Who's it going to call?

13:37.370 --> 13:38.750
Not Ghostbusters.

13:38.750 --> 13:40.700
It's going to call activate.

13:41.850 --> 13:42.810
Passive effect.

13:42.990 --> 13:43.890
Broadcast.

13:43.890 --> 13:48.570
And it's going to pass through that ability tag and that bull be activate.

13:49.200 --> 13:55.140
So the last last step is to get multicast activate passive effect.

13:55.140 --> 13:57.180
Call that where do we call it.

13:57.180 --> 14:02.550
Well all things lead back to server equip ability implementation.

14:02.550 --> 14:05.760
So when and where do we broadcast this.

14:05.760 --> 14:12.270
Well we're going to broadcast it in conjunction with activating and deactivating abilities.

14:12.270 --> 14:20.340
Really we're going to go down here to first of all where we're checking if it's a passive ability and

14:20.340 --> 14:26.850
if it's a passive ability here, remember, this first check is checking that pesky slot that's already

14:26.850 --> 14:30.300
occupying the slot we're trying to push an ability into.

14:30.300 --> 14:35.160
And if we deactivate that, we should call our multicast delegate.

14:35.160 --> 14:39.570
I'm going to call it first here multicast activate passive effect.

14:39.570 --> 14:43.830
And we're going to pass in the ability tag for this slot.

14:44.160 --> 14:46.920
Now this slot that's sitting here we only have its spec.

14:46.920 --> 14:48.420
We don't have its ability tag.

14:48.420 --> 14:52.050
But we have nice functions like get ability tag from spec.

14:52.050 --> 14:56.550
We can call that passing in this spec with slot.

14:57.000 --> 15:01.200
Very important that we don't pass in the wrong ability spec for these.

15:01.200 --> 15:06.180
And we're going to pass in false in this case because we're deactivating that ability.

15:06.180 --> 15:11.190
We're going to want that Niagara component deactivated as well.

15:11.490 --> 15:15.990
And if we scroll down just a little bit, we'll see that we're activating an ability here.

15:15.990 --> 15:20.760
And if we activate it we want to see that effect get activated as well.

15:20.760 --> 15:24.480
So we're going to call multicast activate passive effect here.

15:24.480 --> 15:28.170
And in this case we're going to pass in the ability tag.

15:28.590 --> 15:29.850
Ability tag.

15:31.160 --> 15:35.750
And we're going to pass in true there and that's going to activate those effects.

15:36.370 --> 15:39.730
Okay, so now we have all the parts in place.

15:39.730 --> 15:48.490
But what we need to do is add three of these passive Niagara components to our character.

15:49.810 --> 15:58.090
Now we can put this on base character, but then we'd have to go and activate abilities separately if

15:58.090 --> 16:00.790
we want our enemies to have passive abilities.

16:00.790 --> 16:02.290
But that's fine.

16:02.290 --> 16:06.250
We can put it on our base character or a character base.

16:06.250 --> 16:09.430
We can have those three Niagara systems here.

16:09.430 --> 16:13.300
So let's go into our protected section.

16:14.040 --> 16:16.170
We could even put these in the private section.

16:16.200 --> 16:17.550
Doesn't really matter.

16:17.580 --> 16:27.330
We'll put them in the private and we'll make these T object pointers of type U passive Niagara component.

16:27.330 --> 16:38.040
We'll add a forward declaration and we'll call this halo of protection Niagara system actually Niagara

16:38.040 --> 16:39.270
component right.

16:44.060 --> 16:46.280
And I'm going to have two more.

16:49.320 --> 17:01.020
I'll paste them both and I'll call this life siphon Niagara component and mana siphon Niagara component.

17:01.020 --> 17:06.330
And these can be you properties with visible anywhere.

17:07.980 --> 17:11.040
So all three get the U property.

17:13.760 --> 17:15.860
Now what are we going to attach them to?

17:15.890 --> 17:18.470
We can attach them simply to the root component.

17:18.470 --> 17:25.700
But what I'd like to do is I'd like to create a scene component to attach them to, because I'd like

17:25.700 --> 17:33.170
that scene component to have its rotation controlled so that I can make sure my Niagara system looks

17:33.170 --> 17:33.560
good.

17:33.560 --> 17:40.010
So I'm going to make a t object pointer to a u scene component.

17:41.150 --> 17:45.770
And I'm going to call this effect attach component.

17:47.550 --> 17:49.980
And I'll make this one visible anywhere as well.

17:49.980 --> 17:52.830
And this will be what I attach my effects to.

17:53.190 --> 17:57.240
Now I can construct these in the character constructor.

17:57.510 --> 18:02.400
So we'll go into the cpp file, and we'll do this at the end of the constructor.

18:02.430 --> 18:06.030
I'm going to first construct my effect attach component.

18:06.030 --> 18:08.850
We'll use create default Subobject.

18:09.120 --> 18:16.260
Using a you seen component I'm going to call this effect attach point.

18:17.790 --> 18:20.340
And I'm going to attach this to the root.

18:20.820 --> 18:23.610
So effect attach component.

18:23.610 --> 18:27.000
We can call setup attachment with git root component.

18:27.630 --> 18:31.080
That's not what I meant to call git root component.

18:31.080 --> 18:32.040
There we go.

18:32.610 --> 18:37.530
And with that we can create the halo of protection Niagara component.

18:37.770 --> 18:39.690
We'll use Createdefaultsubobject.

18:39.690 --> 18:44.970
This though is going to be a U passive Niagara component.

18:45.300 --> 18:48.270
Notice writer gave me an auto include there.

18:48.270 --> 18:52.290
I'll call this Halo of Protection comp.

18:52.950 --> 19:00.450
And I'm going to take Halo of Protection component and call setup attachment and pass in effect attach

19:00.450 --> 19:01.350
component.

19:02.020 --> 19:11.320
And I'm just going to copy these lines and paste them and change this to life siphon component and change

19:11.320 --> 19:14.440
the name to Life Siphon Niagara component.

19:14.440 --> 19:19.900
I'll just call these component and this will be life Siphon Niagara component.

19:19.900 --> 19:23.080
Set up attachment and we'll set it to the attach component.

19:23.080 --> 19:26.080
And last but not least we have mana siphon.

19:26.080 --> 19:31.180
So I'm going to use the mana siphon Niagara component.

19:31.360 --> 19:34.870
Change its name here call Setup attachment.

19:34.870 --> 19:36.430
And we're attaching it.

19:37.220 --> 19:41.270
Now, I mentioned I want to manipulate the effect attach component.

19:41.270 --> 19:42.890
I want to keep it still.

19:42.890 --> 19:45.860
I don't want it to rotate along with my character.

19:45.860 --> 19:49.970
And an easy way to do that is to just go to our character base.

19:51.930 --> 19:54.510
And we can override the tick function.

19:54.630 --> 19:56.460
I can do it right up here.

19:57.300 --> 20:01.920
Virtualvoid tick takes a float called Delta time.

20:04.020 --> 20:05.310
It's an override.

20:05.460 --> 20:07.410
I'm going to override it.

20:07.440 --> 20:10.740
We'll call super and I'm going to take my effect.

20:10.740 --> 20:14.640
Attach component and call set world rotation.

20:15.120 --> 20:17.190
Passing in F rotator.

20:18.820 --> 20:20.110
Zero rotator.

20:20.500 --> 20:27.010
And if I want tick, I need to go into my constructor and set primary actor tick be can ever tick equal

20:27.010 --> 20:28.090
to true.

20:28.910 --> 20:32.240
And with that, I can compile and I can launch.

20:34.540 --> 20:35.050
Okay.

20:35.050 --> 20:43.750
So we've made a lot of changes and we need to go into blueprints character aura and open BP Aura Character

20:43.750 --> 20:47.110
Blueprint and take a look at our components.

20:47.110 --> 20:52.930
We have the effect attach component along with mana, siphon, life, siphon, and halo of protection.

20:52.930 --> 20:59.650
We need to set their Niagara systems now for the Niagara system asset for Halo of protection.

20:59.980 --> 21:02.560
We can just search for Halo and select that.

21:02.560 --> 21:07.420
And if you want to take a look at it, we can open it up and we can see what halo of protection looks

21:07.420 --> 21:07.690
like.

21:07.690 --> 21:08.770
It looks like this.

21:09.970 --> 21:12.880
And by the way, you have these Niagara assets.

21:12.880 --> 21:15.250
You can come in here and mess with them if you like.

21:15.930 --> 21:19.170
So I'm okay with NS Halo for that.

21:19.660 --> 21:20.500
For life.

21:20.500 --> 21:21.040
Siphon.

21:21.040 --> 21:23.500
We can search for life.

21:23.500 --> 21:26.200
And there's an s life siphon.

21:26.200 --> 21:28.990
If you want to take a look at that, it looks like this.

21:29.410 --> 21:33.850
So that's a little bit, uh, more wild and sporadic and smaller.

21:33.850 --> 21:35.620
So kind of cool.

21:38.120 --> 21:43.880
And then from Anti-siphon, if we search for mana, we have mana drain and mana siphon.

21:43.880 --> 21:45.410
I'm going to choose Mana Siphon.

21:45.410 --> 21:47.900
And here's what that looks like.

21:50.370 --> 21:52.320
It's a little bit too light blue for me.

21:52.320 --> 21:59.010
So I'm going to go to initialize particle and under selection take the color and just move it more towards

21:59.010 --> 22:00.510
the deeper blue here.

22:03.460 --> 22:08.380
I think I like those colors, those deeper blue colors a little bit better.

22:12.930 --> 22:19.020
And if you really want to drive this color, you could take that blue and make it bigger, like 100.

22:20.800 --> 22:22.930
Make it nice and glowy.

22:22.960 --> 22:23.770
Nice.

22:23.770 --> 22:26.080
Okay, so I have mana siphon.

22:27.060 --> 22:32.070
Now that we have these Niagara components, I'm going to save all.

22:32.220 --> 22:35.280
I'm going to set it to one player just at first.

22:35.280 --> 22:37.110
And I'm going to go ahead.

22:37.110 --> 22:39.510
And first of all I need to level up.

22:41.510 --> 22:47.570
And then I can go ahead and spin some spell points on all three and start equipping.

22:47.570 --> 22:53.240
So I'm going to full screen this and let's see what happens if I take my halo of protection and equip

22:53.240 --> 22:53.780
it.

22:55.270 --> 22:59.770
Do I get my Niagara system?

23:00.860 --> 23:01.970
No.

23:08.450 --> 23:11.000
So we need to find out why.

23:13.460 --> 23:17.750
Let's place a breakpoint in Onpassive activate in our Niagara component.

23:27.170 --> 23:27.860
All right.

23:27.860 --> 23:32.900
It is being called with halo of protection be activate O.

23:32.930 --> 23:38.150
However, our passive spell tag hasn't been set, so I did forget a step.

23:39.690 --> 23:46.020
Of course, these need their spell tags set so Halo of Protection has a passive spell tag.

23:46.020 --> 23:48.660
It needs to be set to abilities.

23:48.660 --> 23:51.120
Passive halo of protection.

23:51.120 --> 23:53.700
Easy to forget when you have a lot of moving parts.

23:54.060 --> 23:58.350
Life siphon gets life siphon and mana siphon gets mana siphon.

23:58.350 --> 24:00.540
Let's try this again.

24:01.390 --> 24:04.990
Saving all pressing play and leveling up.

24:06.230 --> 24:10.580
Let's full screen and let's activate Halo of Protection.

24:12.120 --> 24:14.580
All right, there we go.

24:14.580 --> 24:15.570
Looking nice.

24:15.570 --> 24:18.000
I'm really enjoying this, especially in the dark.

24:18.000 --> 24:22.380
I like to go into the dark with these really pretty Niagara effects.

24:24.290 --> 24:31.310
And it's cool because now you can totally see that its halo of protection that's active and whatever

24:31.310 --> 24:36.530
that means, whatever mechanics that you programmed for it, that's up to you.

24:36.530 --> 24:38.960
But at least you know that it's active.

24:38.960 --> 24:42.260
Let's activate our life siphon.

24:44.620 --> 24:45.910
There's the red one.

24:45.970 --> 24:50.950
I think I might tweak the red one and make it glow a little brighter, but now we have both.

24:50.980 --> 24:53.890
Let's try pushing out one of our abilities.

24:53.890 --> 24:56.560
I'm going to spend a point on Mana siphon.

24:56.560 --> 25:00.430
I'm going to equip it in place of Halo of protection.

25:01.570 --> 25:02.230
There it goes.

25:02.230 --> 25:03.220
Halo of protection.

25:03.220 --> 25:04.240
It's gone away.

25:04.240 --> 25:07.180
And here is my mana siphon.

25:08.380 --> 25:13.270
So we have blue and red, and of course we can push out the blue with the red, even though we already

25:13.270 --> 25:14.260
have the red.

25:15.030 --> 25:17.370
Hopefully that means the blue goes away.

25:17.370 --> 25:17.850
Yes.

25:17.850 --> 25:19.170
And we just have red.

25:19.650 --> 25:24.030
And if we take the yellow and push out the red, the red should go away.

25:24.030 --> 25:25.260
And we just have yellow.

25:25.260 --> 25:25.830
Perfect.

25:25.830 --> 25:27.450
Things are working.

25:27.450 --> 25:32.970
That is so satisfying after doing so much work now we do need to test multiplayer.

25:32.970 --> 25:36.510
And I'm going to test three players because.

25:37.360 --> 25:44.770
I just want to see if, first of all, if my server change is propagated to clients, and then if one

25:44.770 --> 25:48.310
client changes, do we see it on the server and the other client.

25:48.310 --> 25:55.690
So if you really want to test your multiplayer mechanics, a really good way to do so is with three

25:55.690 --> 25:56.140
players.

25:56.140 --> 26:02.680
So I'm going to go ahead and just try to fill the screen as much as I can here and see if we can really

26:02.680 --> 26:03.940
test this out.

26:04.660 --> 26:05.650
Now.

26:06.160 --> 26:10.000
I'm going to first try on the server, so I'm going to level up on the server.

26:11.690 --> 26:16.820
And I'm going to see if I can get that spell menu open.

26:16.850 --> 26:21.620
I'm going to have to sort of push this off a little bit off the screen.

26:21.980 --> 26:22.520
Okay.

26:22.520 --> 26:24.830
I'm going to first equip.

26:25.650 --> 26:27.150
Halo of protection.

26:27.540 --> 26:28.800
I see the yellow.

26:29.740 --> 26:31.930
And I see it on both clients.

26:31.930 --> 26:33.040
So far so good.

26:33.040 --> 26:35.230
Let's equip our life siphon.

26:36.290 --> 26:40.490
I see both red and yellow on both clients looking good.

26:40.490 --> 26:46.970
And let's just try equipping our mana siphon in place of halo of protection.

26:46.970 --> 26:48.590
We should see the yellow go away.

26:48.590 --> 26:49.430
It does.

26:49.430 --> 26:50.540
Red and blue.

26:50.540 --> 26:52.970
Stay there and we'll test one more.

26:52.970 --> 26:55.010
We'll go to, uh.

26:55.010 --> 26:58.460
Let's take our red and equip it on the blue.

26:58.490 --> 27:00.680
We should no longer see blue, just red.

27:00.680 --> 27:01.460
And we do.

27:01.460 --> 27:02.570
And it's looking good.

27:02.810 --> 27:03.830
Okay, cool.

27:03.830 --> 27:06.140
So server works.

27:06.140 --> 27:07.520
Clients see it.

27:07.520 --> 27:10.490
Let's try now on a client.

27:10.490 --> 27:16.820
We'll make some changes and see if we can see that on the server and on the other client.

27:21.690 --> 27:24.390
So we'll start with this client.

27:24.390 --> 27:25.530
We'll level up here.

27:28.730 --> 27:34.670
And we'll go ahead and spend a point on each of the three abilities.

27:34.700 --> 27:41.660
I know it's kind of hard to see, but I'm going to equip the halo of protection, and I see the gold

27:41.660 --> 27:43.280
on all three machines.

27:43.280 --> 27:44.570
It's looking great.

27:44.570 --> 27:49.220
And I'm going to equip my mana or my life siphon rather.

27:50.490 --> 27:54.030
And I see red and yellow on all machines looking great.

27:54.030 --> 28:00.420
And I'm going to take my blue and equip it to the yellow, pushing out the yellow, out with the yellow

28:00.420 --> 28:03.210
and with the blue we have red and blue.

28:03.960 --> 28:04.980
Looking good.

28:04.980 --> 28:09.960
And let's just try taking the blue and pushing out the red.

28:09.990 --> 28:12.840
We should only have blue now, and we only have blue.

28:12.840 --> 28:15.480
And we see it on the other client and on the server.

28:15.480 --> 28:19.740
So it works perfectly in multiplayer.

28:20.070 --> 28:20.940
All right.

28:20.940 --> 28:27.090
So now we have passive abilities and the framework is there the main framework.

28:27.090 --> 28:33.150
All I really cared about was getting three abilities that we could equip.

28:34.100 --> 28:36.530
And activate as we equip them.

28:36.530 --> 28:41.240
And that just gives us a new kind of dynamic here.

28:41.240 --> 28:49.160
We now have the ability to equip something in the menu, and as we do so, that means it becomes active.

28:49.160 --> 28:53.180
We have a passive ability going on in the background.

28:54.160 --> 28:57.310
It can be doing things, it can be responding to things.

28:57.310 --> 29:01.360
And we also have a visual component to that that we can see.

29:01.360 --> 29:08.620
And we know that we can activate and deactivate based on what's going on in the menu.

29:08.620 --> 29:09.700
And.

29:11.280 --> 29:13.830
It's a really nice system that we have in place here.

29:14.310 --> 29:18.480
Okay, so the last thing I'm going to do is go to effects.

29:19.400 --> 29:22.310
And these effects are actually in the stun folder.

29:22.310 --> 29:28.760
And I'm going to go to Life siphon and I'm going to go to initialize particle and take this color.

29:29.030 --> 29:31.730
It looks like it's already ramped up pretty high.

29:31.730 --> 29:34.610
So I don't think I should mess with the color much.

29:34.610 --> 29:40.970
I can make it 500, but we can mess with these in other ways like curl noise force.

29:40.970 --> 29:42.530
This makes it more sporadic.

29:42.530 --> 29:49.010
I can take the noise frequency and put it up to 50, and it's really going to swirl off into the distance.

29:49.220 --> 29:52.580
Noise strength I can increase to 2000.

29:53.760 --> 30:00.120
And now our life syphon particles are swimming around in a lot more of a sporadic manner and kind of

30:00.120 --> 30:00.600
like that.

30:00.600 --> 30:04.170
So I'm going to avoid trying to do too many tweaks.

30:05.950 --> 30:08.110
In this video, I think that.

30:09.220 --> 30:11.200
That's something you can just do.

30:11.230 --> 30:18.700
You can always tweak things for hours, and you know it'll never look perfect until it does.

30:18.700 --> 30:23.440
But with that, we have passive abilities.

30:23.440 --> 30:24.610
They're active.

30:24.610 --> 30:26.500
We have Niagara systems.

30:26.500 --> 30:27.580
It's looking great.

30:27.580 --> 30:28.570
Excellent job.

30:28.570 --> 30:30.970
And I'll see you in the next video.
