Welcome back.
So we have our arcane Shards ability.
It's pretty empty, but we've created some other things we know we're going to use, such as our magic
circle.
So it'd be nice to show that magic circle when we activate the ability.
So that can be our first thing we do.
In Activate Ability, we can right click and we can show Magic Circle.
We can call this function.
And the target here can be our avatar actor.
So we can get avatar actor from actor info.
We can pass that straight in because this is an interface blueprint native event.
And we don't need to pass in a decal.
That's just a nice to have.
We don't really need to change it, but if we really wanted to, we could have multiple spells that
have their own decals, and we could add a variable for the decal that we could pass in there if we
wanted to do that.
Now we're showing the magic circle.
I'm going to go ahead and make a sequence here.
And after showing the magic circle, I'd like to wait for our input to be pressed.
And of course, when showing the magic circle, I'd like to hide the mouse cursor.
And then once we press with our input, we can hide the magic circle and show that mouse cursor again.
Now show Magic Circle could simply take care of that mouse cursor for us.
We could go back and change our implementation for this.
In our Aura Character class in the private folder, I can go into character or a character and I can
find Show Magic Circle.
And right here we have access to the Aura Player controller.
We could take Aura Player controller here and we can set be show mouse cursor to false and then in Hide
Magic Circle we could set it back to true.
So this could just take care of that for us.
So from the editor I'm going to save all.
And then back to writer.
I can just hit rerun and we can just compile and launch again.
So we know that show Magic Circle is going to take care of that mouse cursor.
Okay, so we're back in the editor.
We don't get the option to open our last assets because we hit rerun in writer.
But I'm going to open Arcane Shards, and I'd like to wait until we press our mouse button again.
And I say again, assuming that we just clicked to activate this, but that doesn't necessarily have
to be the case.
Whatever our input is assigned to our arcane shards, that's the input we're talking about.
So I'm going to wait for an input press.
So we've seen how wait input release works.
We can also use wait input press.
And weight input press is going to execute on press when we press our input.
So what we can do is we can call hide magic circle.
So I can take my avatar actor that I've gotten here, I can duplicate that.
I can right click and use hide magic circle passing in the avatar actor here and hooking this up to
on press.
We can see how this works by pressing play.
We're going to have to actually get that ability equipped.
So we could just assign that to one of our abilities we start out with.
But I'm going to take it, spend a point and equip it to the one key.
And I'm going to press the one key and I get my magic circle.
And if I press the one key again, we hide the magic circle.
Now we're not actually ending the ability, so we won't be able to activate it again.
If we wanted to, we could just use end ability.
So that we can continue testing this, but we have successfully waited for an input process and as soon
as we press again, we hide that circle.
So we have the ability to show and hide the circle based on an input press.
Now, I don't want to have to level up just to test this ability.
So I'm going to go to blueprints Character Aura and Open Aura character and search for those startup
abilities.
So we have startup abilities.
I'm going to add one to it.
And I'm going to choose GAA Arcane Shards and Arcane shards.
If it's going to start off equipped, it needs to have its starting input tag set so we know where to
assign that.
So we have a start up input tag and I can just assign it to two.
Oh, I guess I have one open.
I'll go ahead and set it to one.
Input tag one.
And with that we'll start off with it and I can press one.
And we get that decal and I can press one again.
Now, of course, I pressed one and the decal went away, but came back.
And that's because we're actually ending the ability.
So if we want, we can have a little bit of a delay here before we actually end the ability like point
two.
And then if we go ahead and press and release, we won't automatically activate that ability again.
But if we press and we hold.
Well, then as soon as that ability is ended, as long as we're holding that button down, we're actually
sending that ability input tag held status right on over to the ability system component.
We'll take care of this with cooldowns, of course, as our spells are going to use cooldowns in order
to avoid spamming them of course.
But now our ability has the capability of showing a decal.
We can move it around, we can aim.
Now we get our highlighting behavior.
And of course if we hover over the enemy, we get a bit of a jump.
So if you didn't like that jump, you could figure out a way to suppress the trace against the enemy.
Now we don't want to suppress cursor trace in general, because cursor trace is giving us the location
of the mouse cursor.
So we don't actually want to disable cursor trace.
But you could create another block tag.
And based on that tag you could change the collision channel that you're tracing against.
For example, you could do it in a number of ways.
So there are ways to avoid that little bit of a jump.
I'm okay with it, but you could avoid that if you wanted to.
Okay.
So Arcane Shards has a very basic ability to create a decal, and it's waiting for us to aim at something
and then do something else.
So as we use our wait input press, we have the ability to have this sort of intermediate step in our
arcane Shards spell.
We wait until that input is pressed before we hide the magic circle.
And of course, in the ability we're going to do things a little bit more gracefully than that.
And of course, this ability has to do a lot more things before we're done, but at least we have that
basic functionality.
And I'm just going to remind you of something in our ability system component that's allowing us to
use these weight input, press and release gameplay ability tasks.
And we can go to ability input tag pressed.
And remember that we're calling Invoke Replicated Event.
This is what allows us to have that predictive behavior for press and release events, where literally
sending this across the network that we're pressing our input.
And the same goes for released.
We're invoking replicated event when ability input tag is released as well specifying that we're releasing.
So without this, those weight input press and release gameplay ability tasks don't work.
So I just thought I would remind you of that very important detail.
This is what's allowing us to be able to use those ability tasks.
Okay, so that's looking great.
We now need to put some things right here after we've pressed our input, and we'll start implementing
those in the videos to come.
Great job and I'll see you soon.