 Here, let's make a fresh new project for this. Alright, so here we are with the blank project. Let's go ahead and let's just get rid of lots of this stuff. And so now let's go up here and let's add something. Let's do all classes and let's go to text. Let's see. Let's add a text field. Alright, there we go. Text Render Actor. Alright, let's see. Let's get this rotated around so we can actually see it. Yeah, there we go. I'm not sure if you guys have used the text field in Unreal Engine before. It's pretty neat. You can upload some fonts and change things around and have some 3D text in your screen. You can change the text here and just be example. So what we're going to do here is we're going to create an event that we can trigger that will update this text on a timeline in a sequencer. So if you wanted to have a message that was changing in your sequencer or if you wanted to do something like a lyric video or something and you wanted to be able to go back and adjust when the keyframes change at a later point along with the music, this is how you would do that. Alright, so we need this to be a blueprint so that we can add some code. So let's select this, use this button, go to Convert Selection to Blueprint Class. This will automatically select everything and create a new subclass of this text render actor. I'm just going to leave that name to that. This is just an example. Okay, so here we go. Now we're in the blueprint. So we want to go over to the event graph and we're not going to need either one of these. Let's get rid of those. So we're going to right-click to create a new node and we want to create, or sorry, this is Custom, create, add custom event. There we go. This is what we want. And let's name this Show Text, okay? And let's see. We want to go ahead and create a couple of variables here to hold our data. So let's say this is going to be our text items, okay? And this is going to be, this is going to be text. And we're going to see, right-click this so that, sorry, left-click that so that it can become an array. We're going to store all of our messages here. And we're going to create another variable that is just going to be the index. And this is going to not be an array and it's just going to be an integer. And this is going to be the index of which text item of this array that we're going to show. Okay. So let's go ahead and bring text items out to here. Let's go ahead and bring index out to here. Okay. So we're going to want to set the text on this. So let's do set text, set text to have the texture under object. And that goes ahead and gives you the proper target here. We'll just move that down here somewhere. This is all fine. And let's put this execution flow. Let's plug that in like that. And so now we need to know what the value is. And so we're going to grab one of the items from here and put it into here. So let's bring off of this. Let's say get. We want to get as reference. And what we want to get is whatever the index is. Okay. And then we're going to put that value into here. So whatever the index is, it's going to grab that number from this array and it's going to set the text of the text render object to that. Okay. So let's see. Let's go ahead and make sure that this, we want this to be private. We want the default value to be zero. Arrays always start with zero instead of one. And so that's the thing to keep in mind that the first item in this is actually the zero index. Okay. So let's see. Now we'll take the text items here and we can expose that instance editable. That way we can just change it in the editor. And that's fine for now. Let's actually, you know what? Let's just go ahead and add some things here. Let's see. Great. Okay. So we've got some words here that I would like to show to everyone. And so let's see. Let's compile this. Let's save this. And one more thing we need to do after we set the text, we need to increment. So we should just be able to plus plus increment integer. And what we want to increment is this index. Okay. And so what this is going to do is whenever this is set one, it's going to take that index and say, hey, just increment yourself and wait until you're called next time. So we'll compile that. We'll save that. And let's go back over here and let's go ahead and create a new level sequence. We'll just keep it named that. Let's see. Everything else here is fine. Let's go ahead and just select this again. That way we can add text render actor blueprint to the scene. We want to attach an event. We want to do a trigger here. Okay. And so we want to do a trigger. We want to actually we had already done that. So let's go out a little bit here and let's add a key frame like this. And so now once I've got that key frame, I will right click on the key frame, got a properties for the event. We want to create new endpoint and that's going to bring up the blueprint for the sequencer. Okay. And so this is the event that is called by the sequencer. And then this in turn is going to call the show text function that we created in our other one. I have to click off of this context sensitive so that it will know how to find that. But that's how you can make it find it. You just wire that to there. You wire that to there. And that's all good. So let's see. Maybe we should rename this to let's do that because we're going to be creating another one of these in just a minute. Okay. So let's just double check and make sure that this shows the first thing. So we want to first of all go into simulation mode so that this down here will work. And let's see if it changes the text. Great. So it changed to the first word. So now let's make it show all of the words. Let's add a key frame here. Let's add a key frame here. Let's add a key frame here. And I want to see within the bounds of our index, although we're getting ready to add a check for this in just a minute. So let's see. Let's go back. Oh, and as you can see, it's already incremented to the next one. It never does a reset. So actually, let's let's go ahead and fix that real quick. Let's go back over to our text render blueprint. And we are going to stop the simulation and let's add a new custom event here at custom event. And we're going to call this reset index. Okay. And so what we're going to do here is we're going to reset that index. Okay. And so let's see. Let's just pull this like this. Let's say set index. And we just want to set index back to zero. That's all we're doing there. So let's see. Let's compile. Let's save this. Let's close this out one more time. Let's go back to our sequencer. And here, let's add a new event track just to kind of keep this clean. So let's do a trigger here. And at the very beginning of it, I'm going to set a key frame here. And on this one, let's create another new endpoint. And this one, we're going to name reset index event like this. Okay. And so then we're going to, yep, you guessed it. We're going to reset index. Got to turn this off to make sure we get the right one from our blueprint. We wire this up, and this up. And so now we're good with this. We compile. We save. We close this. And so now this should be setting index back to zero every time that it goes through that key point. So let's see. Yeah. Okay. But we're not actually incrementing these other things just yet. So what's wrong with that? Let's go and figure out what's going on in our blueprint. Okay. So the thing that we forgot to do here is we forgot to, we created the key points, but we never actually set them to an event. And so I just need to do this. We want to go to this sequence. We want to call function. And here we want to show text event. Okay. Yep. I see that. It's going to do this every time. It just pops this up to say, here's the thing that you just selected. And I'm like, yeah, I'm aware that I just selected that. But in this case, I'm going to select it again. And there it is again. It's going to show it to me each and every time here. Let's see. Let's go to this, this sequence, call function, show text. Yes. There it is again. And we'll go to the final one and let's see, let's go to the sequence, call function, show text. Okay. Great. That should be the last time we need to look at that. Play. Oh, there we go. What a great message. Okay. So I want to go over one more thing just to kind of keep this clean from a code aspect. Let's go back into the blueprint for the text field here and let's see. Let's what we want to do here is we want to make sure that the index that we're going to use is actually within the bounds of this array. And so let's see what we want here is we want a branch, a branch is the way that you do a if else conditional and unreal engine. And so let's just go ahead and stick that in the middle here. So if this is true, we want to set the text and the condition that we want here is we want to pull off from the text items and we want to get the length of this. Okay. And so this is how many that there are. And keep in mind that this is going to be starting from one. So if there are five items in this, this is going to be five in the length, but the index would be zero to four. Okay. So it's a little confusing there. So now we want to make sure that the index that we're trying to use is within the bounds of the length of this so that the index of this is less than the length of this. So let's pull the index off here. Let's say less than, okay, and it's less than the length of this. Okay. And so if it is, then we're good. We know that we've got a value in this array and we're true here. If it's not, we're going to go through and reset. Okay. Let's compile this and let's give it a shot and make sure that this still works. Great. I hope that helps somebody. Thanks for watching.