This is part 2 of the Random Name Picker Game. If you have missed part 1 click here.
In the game editor go to File in the menu on the top left, click it and go down to New Level.
A new tab will show up, click on the empty new level as show in the GREEN BOX.
A new level has been created and we need to save the level, so we don't have to do it later. Once again go to file up in the top left of the editor, and this time go down to SAVE CURRENT.
A save level tap will open up, go to the bottom of the tab and you'll see Name: NewMap shown in the GREEN BOX. You can name the level what ever you want. In my case I'm going to call it GameRoom.
You'll see now in the content browser that there is a new level saved and in your content folder. Shown in the GREEN BOX.
Now we need to set the new level as the default on editor startup. Go to the menu at the top left. click on Edit, then go down to Project Settings as shown in the picture.
The Project Settings tab will open up. Click on Maps and Modes indicated with the GREEN ARROW. Then go to Default Maps, click on Editor Startup Map shown with the ORANGE ARROW. Then Click on the map you just saved shown in the GREEN BOX. Then do the same for the Game Default Map.
So it should look like this. But what ever you named your level. Then close that tab.
Now right click in the content browser. A menu should show up, move your mouse up to Blueprint Class and click to open Blueprint Class tab.
Click on Game Mode Base as shown in the GREEN BOX.
This will create a new Game Mode Blueprint. Name that Blueprint what ever name you want. But remember to have _GM or_GAMEMODE in your name so you remember that this is the gamemode blueprint. In my case I named mine RNP_GAMEMODE.
Once you have named the blueprint, click the Save All button as shown in the picture. you'll be prompted with a popup tab to show what files need to be saved. just save all.
Now go over to the right hand side of your screen. you'll see a tab called World settings. look down to Game Mode in there you'll see game mode override click the drop down and select the game mode you just saved.
Then go to the selected game mode drop down and you'll see all the setting in that game mode blueprint.
Once again click save all, So it will save the gamemode to the level.
Now we need to create a Pawn for the player/user. As we did with creating a new Game mode Blueprint, this time we'll select Pawn. Right click in content browser go to Blueprint class and click on Pawn.
This Time a Pawn Actor Blueprint will be created and once again name it what ever. But add the prefix BP_ NamePawn or Pawn_BP so you remember its the Pawn Blueprint.
In my case I named mine CameraPawn_BP.
Remember once again to click Save all in the content browser like before. Once saved, double click on your Pawn_BP which will open it in a new tab. you can either make it full screen or tab it to the top. I like to move my tabs to the top. Now the fun begins.
Make sure you are in the Pawn Blueprint, Also make sure you are in the viewport area on the blueprint. Highlighted with a GREEN BOX. look to the top left you'll see a tab called Components. Click Add Component shown with the RED ARROW. in the Drop down box type camera. And select CAMERA not Cine Camera.
Now a new camera component is created. Call it what ever you want. I have just left it as the default name.
Once you have named it and hit enter. put your mouse cursor over the camera component you have just created and drag it over the top of Default Scene Root and drop it. So will will look like this.
Then click On CameraPawn_BP(selft) in the Components tab. On the Right hand side of the screen you'll see a details tab. Look down to Pawn and Auto Possess Player, click the drop down and select player 0 .Compile and then save. Now click back to the main editor window.
In the main editor go to the right side of your screen and look at World Settings and the Selected GameMode. Where it says Default Pawn, hit the drop down and select your Pawn Blueprint. In my case its called CameraPawn_BP. This will set the default pawn for the gamemode you created earlier. Then once again save all.
That is it for this Post. It might seem quick to read and follow. But it actually takes me 3 hours to go through step by step screen shot everything, edit the shot and write the process for your to understand. I hope you like this tutorial series. Follow me for more game development tutorials.