Welcome back everyone in this video we will be creating a Game Instance blueprint. Now this is a special blueprint type that can store information about our game over an entire session and will not have its variables reset when transitioning to a new level. Now we'll need this in order to set up our game timer properly. First, let's just focus on creating the necessary assets to make our timer work as intended. Remember, those game mode blueprints the variables contained within a game mode blueprint revert back to their default values. Whenever you enter in a new level with a Game Instance blueprint that is not the case.
Okay. You will see why this is important for our timer as we go on. So without further ado, in our framework folder, let's create a Game Instance Blueprint by right clicking blueprint. class, you will not see it in the common classes. So you have to search for it in the all classes section down here, just type in Game Instance. And we want to select this Game Instance not platform game instance, just Game Instance and select.
And we'll name this BP underscore Game Instance. Like so. Now, we are also going to create an innum variable within this framework folder as well and you'll see what this is used for in just a moment. And innum is short for an enumerated list. And what I'm going to use this for is to list out some possible level names. So I'm going to right click come under my blueprints option right here.
And over in this file menu is an enumeration. So we can left click on this guy I'm going to call this E underscore level selected. Now I am only going to create one playable level in this project. But with this timer system set up, you should be able to extend this to set how much time you want to have available as your time limit for level one, the level two or level three, etc. Okay, so with this acid created, I'm gonna go ahead and double click on this and it's gonna look rather empty. Currently, we have nothing in our enumerated list.
And what I want to do here is list out some level names. So I'm going to click this new button on the far right, and I'm going to type in for our display name. Level underscore o one. Click New again. I'm gonna list this as level underscore oh two And then once more, I'm only gonna go up to level underscore oh three. If you eventually build out this project to have 10 levels, you're gonna want to add to this, but I'm just going to do three as a quick example.
I'm going to save this and then I'm going to close this out. And then I'm going to jump into my BP Game Instance double click on this guy to open them up. And I'm going to create a new variable inside of here, and this variable is going to simply be called level selected. Now for the variable type, I'm going to come over to the Details panel under variable type, click this drop down, and I'm going to search for this. We're going to be searching for the enumeration we just created. So if I type a level selected, we can see there isn't enough Level selected, that is the enumeration that we just created.
So go ahead and click on this, you can compile and you can see you can set a default level, we want this to be level one and you can set this to be any level that you select right here, but I want it to be all one again, we're just setting the groundwork for our timer system in this one, this is all going to come together in the coming videos. Okay, so with that, make sure again, you've compiled and saved one more thing I need to make sure that we do we have created this Game Instance blueprint but this is not currently been set in our project settings. So come back to your main level editor come under Settings, project settings, and in our maps and modes over on on the left hand side, down at the very bottom. For our Game Instance class. We need to to swap out this default Game Instance with our newly created BP Game Instance Now note that there is no like Save button here or anything like that as soon as you slot that in, you are good to go.
That is literally going to do it all for this one we just needed to set the groundwork for our timer system by creating a Game Instance class or mission accomplished guys, we will see you in the next videos.