WEBVTT

00:07.020 --> 00:14.310
Okay, so my next thing I'd like to do to polish this up is as soon as I reassign a globe to a new input,

00:14.310 --> 00:24.450
I want to inform the spell menu to deselect that globe and also to hide the selection circle and perhaps

00:24.450 --> 00:25.620
play a sound.

00:26.210 --> 00:34.130
So I think I'd like a new delegate to broadcast that will broadcast the ability tag for and all of the

00:34.130 --> 00:37.520
globe buttons in our trees are going to listen to it.

00:37.520 --> 00:44.420
And if it's their particular ability tag, it knows that it should remove that selection circle and

00:44.420 --> 00:45.470
play a sound.

00:45.500 --> 00:47.600
So that's what I'm going to do.

00:50.290 --> 00:51.970
And this will be a delegate.

00:52.000 --> 00:58.450
We broadcast from the Spell menu widget controller and it's going to broadcast a gameplay tag.

00:58.540 --> 01:04.630
Now, we could reuse this one, but I'm going to make a new one that's just like this one, but it's

01:04.630 --> 01:09.070
going to be called F spell globe reassigned.

01:09.940 --> 01:12.310
And it's going to be an ability tag.

01:13.290 --> 01:22.050
So I'm going to make this spell globe reassigned and I'll call it just spell globe reassigned Delegate.

01:22.200 --> 01:27.180
I'll go ahead and actually make it have signature just like the others in this class.

01:27.920 --> 01:36.320
So spell globe reassigned signature will make it blueprint assignable and we'll broadcast this delegate

01:36.350 --> 01:43.190
when we've equipped an ability so an ability equipped we'll go ahead and broadcast spell globe reassigned.

01:44.750 --> 01:47.180
And we'll broadcast the ability tag.

01:48.260 --> 01:56.750
At the same time, I'm also going to use Globe Deselect so that we can clear out the description boxes

01:56.750 --> 01:59.090
and disable the buttons.

01:59.090 --> 02:00.590
That's what those are going to do.

02:00.620 --> 02:03.710
So we'll go ahead and broadcast these.

02:03.740 --> 02:10.670
Let's go back into the editor and make sure that our spell globes are subscribing to spell globe reassigned.

02:10.700 --> 02:11.810
We'll do that now.

02:13.310 --> 02:19.610
So back in the editor let's go into our spell globe but the button version.

02:20.090 --> 02:24.320
So in UI spell globes, it's the spell globe button.

02:24.350 --> 02:28.780
Here is where we're going to assign that delegate.

02:28.790 --> 02:32.420
So we'll do it right here after receive ability info.

02:33.590 --> 02:36.170
We'll get spell globe reassigned.

02:36.870 --> 02:37.950
Delegate.

02:40.740 --> 02:46.320
And when the spell globe has been reassigned, we're going to check the ability tag against our own.

02:46.320 --> 02:49.260
Let's go ahead and make a function to handle it.

02:49.500 --> 02:54.960
It's going to be on spell globe reassigned.

02:56.570 --> 02:58.520
And it'll take an ability tag.

02:59.180 --> 03:01.100
So gameplay tag.

03:02.550 --> 03:04.140
Called ability tag.

03:07.550 --> 03:11.150
And we'll check the ability tag with matches tag exact.

03:12.390 --> 03:12.930
Checking.

03:12.930 --> 03:14.460
Exact match, that is.

03:15.780 --> 03:21.000
And we're going to check against the ability tag this particular icon has.

03:23.020 --> 03:31.970
And if it is a match, then the spell globe has been reassigned and we can now hide the image selection.

03:31.990 --> 03:33.970
So let's get image selection.

03:35.920 --> 03:38.260
Set render opacity to zero.

03:44.780 --> 03:46.460
And we can play a sound.

03:51.630 --> 03:53.820
And what sound can we play?

03:55.200 --> 03:57.180
Maybe a more heavy sound.

03:57.870 --> 04:03.420
So sounds ui we can try select skill.

04:06.710 --> 04:08.390
So let's see how this works.

04:12.080 --> 04:13.580
So I'm going to reassign.

04:17.550 --> 04:18.060
Okay.

04:18.060 --> 04:19.230
So.

04:22.310 --> 04:24.920
Oh, we're not calling on spell globe reassigned.

04:30.590 --> 04:31.790
So let's call it.

04:31.790 --> 04:33.770
And now check it out.

04:37.430 --> 04:38.210
Okay.

04:39.110 --> 04:40.610
And it worked.

04:41.000 --> 04:41.870
Excellent.

04:42.810 --> 04:48.600
Okay, let's go ahead and level up and just test it with another ability.

05:00.520 --> 05:00.910
Okay.

05:00.910 --> 05:07.690
So one thing I'm noticing is if I click on something, it appears it thinks it's still selected.

05:19.340 --> 05:26.210
It's okay if I click on a different skill, but if I click on the same one, I hear that sound for the

05:26.240 --> 05:27.500
deselect.

05:31.600 --> 05:39.490
So that means if I go to my spell glow button to its onClick event, it thinks it's still selected in

05:39.490 --> 05:40.660
this case.

05:40.660 --> 05:48.850
So when we get back to spell Glow reassigned, we're going to have to set that boolean selected to false.

05:53.010 --> 05:54.840
That should fix that problem.

05:58.120 --> 06:01.600
So if we click again, it selects again.

06:05.710 --> 06:06.640
Perfect.

06:19.510 --> 06:20.260
Perfect.

06:20.260 --> 06:21.100
All right.

06:21.130 --> 06:25.960
Things are working, and I believe we're done with our spell menu.

06:25.990 --> 06:27.670
What a section.

06:27.670 --> 06:28.600
Right.

06:28.630 --> 06:30.160
Excellent job.

06:30.160 --> 06:32.920
That was really a good milestone.

06:32.920 --> 06:35.500
And now we can continue.

06:35.500 --> 06:43.390
And this is going to be my favorite part of the course because now we get to make some more magic spells

06:43.390 --> 06:47.140
and get really creative with how we can make these abilities.

06:47.140 --> 06:53.020
We can make passive and active abilities, and we're going to be able to start filling up this offensive

06:53.020 --> 07:00.220
and passive spell tree and fill up this row of spells and really start to make some really fun levels

07:00.220 --> 07:01.930
with lots of enemies in them.

07:01.930 --> 07:03.250
It's going to be great.

07:03.250 --> 07:05.350
So really great job.

07:05.350 --> 07:09.760
I'm really proud of you and I can't wait to see you in the next section.

07:09.760 --> 07:10.960
I'll see you soon.
