Welcome back everyone. In this video we're going to continue on creating some more scripts for our Lens of Truth skill. In this video, specifically, we're going to be creating a camera effects to play once our Lens of Truth magic has been turned on. So we did a little effect, you may remember a few videos back where when we turned our Lens of Truth on and off, the camera sort of zoomed in zoomed out. It was a real subtle effect, but it looked kind of nice. Let us know the user know that something has taken place something different has taken place.
All these subtle effects really add up. Let's get right to it. We're going to work in our BP player for this one. Here is the pathway how to get there, double click on your BP player. And we're going to continue working on in our white magic tab over here. And if you don't see that, remember, you've got your Graph tab over here you can double click on white magic To open that tab in, here's where we were building out our Lens of Truth skill.
We have this sequence node right up here where we built off this Lens of Truth on section, right to the right of this is where we are going to be building a timeline that is going to be used to control our camera effect. We're going to right click in some empty space, and type in a time line and we're going to add a timeline. Let me zoom on up here a little bit. We'll call this lens camera FX. And this is a special note that allows us to double click on it and when we do, we open up our timeline editor here, let's add a float track and name it alpha. And this is going to be a really short track.
So I'm going to change the length here to be point one, five seconds and you can see that white portion of our graph is now shrunk to reflect that the length of our timeline here is really short. I'm just going to right click to center it up here, hold CTRL and mouse wheel and just to zoom on up a little bit. Okay, so I'm going to add two keys to this, I can hold down shift and left click, that'll add a key. And I can also right click to add a key two different ways to add keys here. Long story short, you want to have two keys out here. Let's select our first key.
And with the first key selected, I'm going to set the time to be zero and the value to be zero. And for our second key, select that so that it's yellow. Let's set the time to be point one five in the value to be one. So we're going from and if I click this zoom to fit vertical, you can now see both these keys in view. So we are going from a value of zero to a value of one over point one, five seconds, that is going to be very useful for us. As we make our way out of this timeline, let's click back in our white magic tab.
So now we got this timeline with an alpha output. How can we use this output? Well, we want to drag out of our alpha here. And we want to search for a alert node. We're looking for float loop. And the tooltip even tells you what this does it linearly interpolates between A and B based on an alpha 100% of a when alpha is zero and 100% of B when alpha is one.
So what that is saying and it plugged it into the wrong input for us, so I'm going to hold down alt and left click, we want to plug this into our alpha value here. So what this is saying is when, when a when a, we are at 100% of a when alpha is zero, so our timeline, remember, starts at a value of zero, our alpha is zero, meaning that our return value will be 100% of what we plug into a. and the value we're going to want here is 90. And you'll see what we're going to do with these values here in just a little bit. And then when we are when alpha is one, we are going to be at our value of be 100. So we're going between a value of a at zero seconds to value of b. at point one five seconds, that value is going to change from 90 to 100.
Let me show you exactly how this works. We're going to bring in our side view camera. Drag this in and off of our side view camera. We're going to drag off in this and we are going to set field of view. So fo V or field of view is essentially going to give us a sort of zoom in or zoom out effect, depending on what kind of number that you plug into it. Now how did I know that I could even modify this about my side view camera?
Well, if you select your side view camera over in the components panel, over in the Details panel, you have a field of view property that you can change and you can see that it defaults to 90, so it's no mistake that I'm starting at an A value here of 90. Okay, so I'm going to take the return value here and plug it into our new field of view here. And as we update our timeline here, we're going to plug this into our set field of view and out of our sequence node, then one is doing all this bit of script or the Then zeros doing this bit of script, then one we're going to play from start this timeline so very rapidly over the course of point one to five seconds, it's going to go from an F o v, a camera fo V of 90 to a camera field of view of 100.
Okay. That's not all we want to do. I also want to drag off of this one more time and bring in another loop node, I'm looking for a float loop. And again, it's going to have it plugged into the wrong one by default. I'm going to hold down the Alt key left click to break that. Let's plug this into our alpha right here.
And for this, I'm gonna have my a value bs zero and my B value is going to be point zero or not point 08 point eight. We're going to use this alpha for something else. My sideview camera I'm going to drag off of this one more time. And I'm going to type in post process settings. So what I'm looking for is a setting of post process settings. That guy right here.
Now post process is basically a visual effect that you can add to your camera, you can do all kinds of post process effects on a camera, things like just simply coloring your camera a certain tint, you can give it sort of that grainy television sort of filter, all kinds of things that are way beyond the scope of this video. But we are going to change one thing about this one of our post process settings if I drag backwards off of this, I want to make a post process setting. That's gonna give me this note in effect. If I click this drop down, you can see that there's nothing here. Because we need to specify over in the details, what post process setting we want to add to this make post process setting node, there are so many things that we could change. This is sort of a special note where we have to tell it, what do you want to change?
Well, there's one called vignette intensity. And I'm just gonna search for it up in the Details panel to make my life easier then yet intensity. There it is right there. If I click this, you'll now see it added to my make post process setting node. And I want to plug in the return value to my vignette intensity setting. What vignette intensity does is it sort of creates this shadowing effect around the borders of your screen, kind of like you're dreaming.
That's the kind of effect I'm going for here. And once we get this all fired up and working, I'll point that out to you. So let's plug this execution wire. into our set right here. And that is looking pretty good. Let's drag out a marquee selection around this bit of script, tap the C key, and I'll call this lens active camera.
Okay, so this is a sort of special camera effect that I want to do when we activate this camera, we're going to change our cameras Field of View from 90 to 100. And we're also going to do this sort of vignette intensity as a sort of the sort of black shadowing around the perimeter of the screen. But when I deactivate our Lens of Truth ability, I want to undo this effect. So how am I going to do that? Well, right in front of our timeline here, I'm going to right click and I'm going to add a custom event and I'm going to call this Custom Event lens D activated. And I'm going to plug this into the reverse input of my timeline.
So this is essentially going to play the timeline backwards to undo all of these settings. So our FLV, which changes from 90 to 100, will now go from 100 back to 90. And our vignette intensity will go from zero to 80 when it's first played, and then when this gets called, it'll go from point eight back to zero. Okay, so this is a custom event. Now something has to Call this Custom Event for actually to fire off. And one of the ways that we are going to deactivate our Lens of Truth is by basically using the Lens of Truth again.
So we have this thing where we can actually activate it, but we can also manually deactivated so when we do eventually activate it This is going to be set to true ease using the lens is going to be set to true. Now if it is true that we are using the lens when we press the appropriate button to eventually call this event, I'm going to drag off of this and type in lens D activated when we call it lens deactivated. There we go, spelt it wrong. So again, when we eventually fire this off, we're going to be checking are we using the Lens of Truth if we are not already using it, it'll evaluate to false and we're going to check to see if we have enough magic and eventually fire this all off. Now once it is activated, we're then going to be checking are we using it again, if we try to use it again, and if we are using it, we're going to deactivate it.
So essentially we're going to be able to toggle this one on and off manually. If we want you again this is just going to be one of the ways that our lens can be deactivated. alright with that, let's go ahead and Compile and Save guys that should just about do it for this one. We've got a comment box around all this. Still plenty more work to be done but we're making strides. See you all in the next video