Welcome back everyone in this video we will be creating two functions that we're going to be making use of when we script our Miss on and off ability. So let's jump inside of our BP player here. And over along the left hand side in the My Blueprint panel, let's create these functions so come under functions plus function. This first one will be called missed FX underscore on. Now you remember we did this for a lens of truths, we're going to be doing a lot the same here. So with our Miss effects on function created, we now have a new tab across the top.
And the first thing we're going to do when we call this function is we want we have a variable called is using missed. It's set is using missed we're gonna set that to To be true. And you can find that in your missed section of variables, I found it you could have just dragged and dropped this into here and done a center. But I found it through the right click menu. Next I'm going to drag off of this we're going to plays sound 2d. The sound that I would like to play here is our missed transforms.
So I'm just going to type in missed is that w magic? Missed transform sound effect. Then scrolling over to the right, we're going to drag off this. We're going to spawn each jmeter at location, what emitter you say Well, how about our missed transform that one that we created earlier, we need to feed this a location. So let's get our capital component. I'm going to left click and drag this in gonna drag off of that we're gonna say get world location, that's where we want to spawn that effect.
Then after this, I want to grab our mesh our mesh is that right there, basically our character model. Jumping back to our function tab here. I'm going to drag this into the graph. And I'm going to drag off of our mesh here, and we're going to set visibility and the new visibility will be unchecked, meaning hidden. Now I also want to set the visibility for a couple more things are a V effects w magic missed active. Let's drag that from our components panel into the graph, and then our widget magic timer.
Let's drag that one into the graph. You can drag off either one of these and do a set visibility Plug both of these into this set visibility in this one, we're going to say yes, we're going to toggle you on. So make sure you have that toggled on. Okay and more in this function that's going to happen, we are going to drag in our missed pawn movements. Let's drag and drop this in here. Drag off of that, and we're going to say activate.
We're going to activate that because remember, we had a D activated by default. That's not the only thing I want to activate though, however, I want to activate my s effects w magic missed active sound effects here. So let's drag that into the graph. Hook that into activate as well, too for one activation. In addition to that, I want to grab our character movement component and drag off of this and we want to de activate this one. So we're activating our Miss pawn movement and we're directing debating our character movement.
And then I'm gonna grab my capsule component here, drag that into the graph. We're going to drag off this and I'm going to set capsule set capsule half height is one I want to set and we're going to change our capsule half height to be 45. Now the reason I'm doing this is because if you check our capsule component right here in the viewport, our capsule, half height normally is 96. When I set it to 45, which I'll do temporarily here, it's gonna squish it down. So the reason I'm doing that and let me set this back to 96 before I forget is because our mist is not going to be as tall as this on essentially clamping down cramping down the collision size. They're jumping back to our Miss effects on okay, I also want to drag off of our capital Point A one more time here, and I'm going to set collision object type.
And here is where I'm going to be changing our collision type to now be missed. See you remember by default we are pawn. Now we're going to be labeling This is not a pawn, but were missed instead, that's going to be very, very important when we create our gates to pass through. Okay, so let me just kind of drop on back here and kind of walk you through our missed effects on one more time. Pause the video as you see needed here. This is our w magic mist transform.
This is our P Miss transform. Note that we are setting our mesh to be invisible here. However, we are setting our mist active in widget timer here to be visible. We're going to activate our panel movement or our Miss pawn movement, I should say Miss pawn movement. As well as our es effects missed active, we will be deactivating our character movement component. And we will be setting our capital components halfway to be 45 and changing our object type to be missed.
Very important. Let's go ahead and Compile and Save that quickly. And now we're ready to work on our Miss FX off function which we still have to create. Now before we create that, I just want to point out that even while we are missed, the reason I set our half height here to be 45 is because we are still going to be colliding with some things. We're just going to be allowed to pass through that gate. I don't want to make it all willy nilly so you can basically pass through anything.
Okay, so let's go ahead and create a new function here. function this is going to be missed FX underscore off and for this function Let's drag off of this and type in is using Miss, we're going to set that here it's going to be false to indicate that we're not using our missed. Let's play a sound, play a sound 2d. The sound effects that I want to play here is going to be our mis transformation once again. So it's kind of that whooshing sound going into and coming out of that. Then we're going to drag off spawn emitter at location.
We're going to spawn that Miss transformation one more time missed. Trends. Form I can't spell transform there we go Miss transform. course we got to feed this location. So let's do like we did before capsule components. Drag off we will get the world location Okay, next we will grab our mesh.
We will drag off of that and set visibility. Of course, this time we want to make our mesh visible once again because we can now see it. Then let's scroll over to the right here a little bit, we're going to get our V effects w magic missed active, that visual effect right there. And our widget timer. Suppose I could have cut down on some time here by duplicating that previous function we just made. Drag off of either one of these, let's do a set visibility.
Plug both of these into the target. Only this one we want to leave it unchecked because we are not missing anymore. So we're going to not have that visual effect and we are not going to have that timer above our heads. Then let's grab our character movement component. Drag off this, we will activate this guy so that we can move like a person again. And let's find our Miss pawn movements.
Drag off of this and we will deactivate this. Then let's grab our SF x w magic, Mr. Active. Plop that into our graph, drag off of this and let's type in fade out. So instead of just cutting the music off harshly, let's fade this out. Let's make our fade out duration be one seconds.
And then let's grab our capital component once again. Drag off this we're going to set capsule half height once again. Here we're going to set it to be 96 because that is our default capsule half height. Then we're going to drag off our capsule component one more time and we're going to set our collision object type. And here is where we are going to set our collision object type back to pawn. Right there.
Go through this one more time quickly. There is our missed effects off function. That is false Miss transform, Miss transform. Making our Miss mesh Miss mesh visible once again, making this not visible our VFX missed active and our timer. Character movement you are activated once again. Missed pawn movement you are deactivated, fading out our sound here and then setting our capsule back to what it was before.
All right, guys, great job in this one. Let's Compile and Save. We've got a lot of prep work out of the way we are ready to script our missed ability. We will see you in the next video.