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,
I want to inform the spell menu to deselect that globe and also to hide the selection circle and perhaps
play a sound.
So I think I'd like a new delegate to broadcast that will broadcast the ability tag for and all of the
globe buttons in our trees are going to listen to it.
And if it's their particular ability tag, it knows that it should remove that selection circle and
play a sound.
So that's what I'm going to do.
And this will be a delegate.
We broadcast from the Spell menu widget controller and it's going to broadcast a gameplay tag.
Now, we could reuse this one, but I'm going to make a new one that's just like this one, but it's
going to be called F spell globe reassigned.
And it's going to be an ability tag.
So I'm going to make this spell globe reassigned and I'll call it just spell globe reassigned Delegate.
I'll go ahead and actually make it have signature just like the others in this class.
So spell globe reassigned signature will make it blueprint assignable and we'll broadcast this delegate
when we've equipped an ability so an ability equipped we'll go ahead and broadcast spell globe reassigned.
And we'll broadcast the ability tag.
At the same time, I'm also going to use Globe Deselect so that we can clear out the description boxes
and disable the buttons.
That's what those are going to do.
So we'll go ahead and broadcast these.
Let's go back into the editor and make sure that our spell globes are subscribing to spell globe reassigned.
We'll do that now.
So back in the editor let's go into our spell globe but the button version.
So in UI spell globes, it's the spell globe button.
Here is where we're going to assign that delegate.
So we'll do it right here after receive ability info.
We'll get spell globe reassigned.
Delegate.
And when the spell globe has been reassigned, we're going to check the ability tag against our own.
Let's go ahead and make a function to handle it.
It's going to be on spell globe reassigned.
And it'll take an ability tag.
So gameplay tag.
Called ability tag.
And we'll check the ability tag with matches tag exact.
Checking.
Exact match, that is.
And we're going to check against the ability tag this particular icon has.
And if it is a match, then the spell globe has been reassigned and we can now hide the image selection.
So let's get image selection.
Set render opacity to zero.
And we can play a sound.
And what sound can we play?
Maybe a more heavy sound.
So sounds ui we can try select skill.
So let's see how this works.
So I'm going to reassign.
Okay.
So.
Oh, we're not calling on spell globe reassigned.
So let's call it.
And now check it out.
Okay.
And it worked.
Excellent.
Okay, let's go ahead and level up and just test it with another ability.
Okay.
So one thing I'm noticing is if I click on something, it appears it thinks it's still selected.
It's okay if I click on a different skill, but if I click on the same one, I hear that sound for the
deselect.
So that means if I go to my spell glow button to its onClick event, it thinks it's still selected in
this case.
So when we get back to spell Glow reassigned, we're going to have to set that boolean selected to false.
That should fix that problem.
So if we click again, it selects again.
Perfect.
All right.
Things are working, and I believe we're done with our spell menu.
What a section.
Right.
Excellent job.
That was really a good milestone.
And now we can continue.
And this is going to be my favorite part of the course because now we get to make some more magic spells
and get really creative with how we can make these abilities.
We can make passive and active abilities, and we're going to be able to start filling up this offensive
and passive spell tree and fill up this row of spells and really start to make some really fun levels
with lots of enemies in them.
It's going to be great.
So really great job.
I'm really proud of you and I can't wait to see you in the next section.
I'll see you soon.