Start Menu

12 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€93.07
List Price:  €130.30
You save:  €37.23
£79.62
List Price:  £111.47
You save:  £31.85
CA$136.60
List Price:  CA$191.24
You save:  CA$54.64
A$151.87
List Price:  A$212.63
You save:  A$60.75
S$135.20
List Price:  S$189.29
You save:  S$54.08
HK$781.33
List Price:  HK$1,093.90
You save:  HK$312.56
CHF 90.72
List Price:  CHF 127.01
You save:  CHF 36.29
NOK kr1,092.46
List Price:  NOK kr1,529.50
You save:  NOK kr437.03
DKK kr694.20
List Price:  DKK kr971.90
You save:  DKK kr277.70
NZ$167.15
List Price:  NZ$234.02
You save:  NZ$66.86
د.إ367.25
List Price:  د.إ514.16
You save:  د.إ146.91
৳10,946.16
List Price:  ৳15,325.07
You save:  ৳4,378.90
₹8,342.71
List Price:  ₹11,680.13
You save:  ₹3,337.42
RM473.95
List Price:  RM663.55
You save:  RM189.60
₦123,487.65
List Price:  ₦172,887.65
You save:  ₦49,400
₨27,847.21
List Price:  ₨38,987.21
You save:  ₨11,140
฿3,679.53
List Price:  ฿5,151.49
You save:  ฿1,471.96
₺3,232.18
List Price:  ₺4,525.18
You save:  ₺1,293
B$511.10
List Price:  B$715.57
You save:  B$204.46
R1,851.52
List Price:  R2,592.21
You save:  R740.68
Лв181.98
List Price:  Лв254.78
You save:  Лв72.80
₩135,881.87
List Price:  ₩190,240.05
You save:  ₩54,358.18
₪371.60
List Price:  ₪520.25
You save:  ₪148.65
₱5,713.97
List Price:  ₱7,999.79
You save:  ₱2,285.82
¥15,308.41
List Price:  ¥21,432.39
You save:  ¥6,123.98
MX$1,693.57
List Price:  MX$2,371.07
You save:  MX$677.49
QR364.01
List Price:  QR509.63
You save:  QR145.62
P1,365.33
List Price:  P1,911.52
You save:  P546.18
KSh13,468.65
List Price:  KSh18,856.65
You save:  KSh5,388
E£4,794.02
List Price:  E£6,711.82
You save:  E£1,917.80
ብር5,699.43
List Price:  ብር7,979.43
You save:  ብር2,280
Kz83,741.62
List Price:  Kz117,241.62
You save:  Kz33,500
CLP$94,755.52
List Price:  CLP$132,661.52
You save:  CLP$37,906
CN¥723.62
List Price:  CN¥1,013.10
You save:  CN¥289.48
RD$5,785.38
List Price:  RD$8,099.76
You save:  RD$2,314.38
DA13,457.99
List Price:  DA18,841.73
You save:  DA5,383.73
FJ$225.30
List Price:  FJ$315.43
You save:  FJ$90.13
Q775.21
List Price:  Q1,085.33
You save:  Q310.11
GY$20,876.73
List Price:  GY$29,228.26
You save:  GY$8,351.52
ISK kr13,989.60
List Price:  ISK kr19,586
You save:  ISK kr5,596.40
DH1,008.69
List Price:  DH1,412.20
You save:  DH403.51
L1,771.31
List Price:  L2,479.90
You save:  L708.59
ден5,730.13
List Price:  ден8,022.42
You save:  ден2,292.28
MOP$803.11
List Price:  MOP$1,124.38
You save:  MOP$321.27
N$1,860.85
List Price:  N$2,605.27
You save:  N$744.41
C$3,673.63
List Price:  C$5,143.23
You save:  C$1,469.60
रु13,311.40
List Price:  रु18,636.50
You save:  रु5,325.09
S/375.46
List Price:  S/525.66
You save:  S/150.20
K383.63
List Price:  K537.10
You save:  K153.47
SAR375.03
List Price:  SAR525.05
You save:  SAR150.02
ZK2,685.42
List Price:  ZK3,759.69
You save:  ZK1,074.27
L463.14
List Price:  L648.42
You save:  L185.27
Kč2,328.17
List Price:  Kč3,259.54
You save:  Kč931.36
Ft36,248.95
List Price:  Ft50,749.98
You save:  Ft14,501.03
SEK kr1,083.98
List Price:  SEK kr1,517.62
You save:  SEK kr433.63
ARS$87,816.53
List Price:  ARS$122,946.66
You save:  ARS$35,130.12
Bs689.12
List Price:  Bs964.79
You save:  Bs275.67
COP$389,940.87
List Price:  COP$545,932.82
You save:  COP$155,991.94
₡50,893.45
List Price:  ₡71,252.86
You save:  ₡20,359.41
L2,475.75
List Price:  L3,466.15
You save:  L990.40
₲747,391.81
List Price:  ₲1,046,378.43
You save:  ₲298,986.62
$U3,833.15
List Price:  $U5,366.56
You save:  $U1,533.41
zł402.67
List Price:  zł563.75
You save:  zł161.08
Already have an account? Log In

Transcript

Welcome back everyone, time for us to start putting all the pieces together for our game and I want to start right in the beginning at our start menu. The goal of this video is to start off our game by presenting a start menu to the player. Now this is going to involve us creating a new start menu level, as well as a game mode blueprints specific to our start menu. Since our Start Menu level is not going to share the rules that our game itself will have. For example, we're going to want this level I'm using air quotes there to have its own music playing in the background, as well as to not show HUD on the screen. So this is how we're going to do it.

And this is a very common approach that games made an unreal use to launch a game. come under your file menu way up in the left hand portion of the level editor. We want to create a brand new level. And for this one, we want it to be an empty level. So go ahead and select that guy. And right away, let's click this Save button.

And it's going to ask us where do you want to save this. Let's save this to our first project levels folder. And I'm going to call this simply start menu and click Save right there. And now you can see with this tab right here, our level is named Start Menu. Now obviously, we can't see anything in this level. There's nothing here and that's okay.

This is sort of an empty level in which we are going to be going into when we first start up our project. And then from here, we are going to show our actual Start menu screen. And then on that screen, we're going to be able to click that level one button. To launch our game and actually transfer over to our level one level. Before we do any of that we need to create a new game mode blueprint. So let's come under our first project blueprints framework folder.

Note that path. Then let's right click in some empty space new blueprint class. And here we want to create not an actor blueprint, a game mode base blueprint. We're going to name this one BP underscore game mode underscore Start Menu. Okay, so with that created let's go ahead and double click on them to open it up. And currently in our viewport you see nothing which is fine.

We don't want to see anything yet, we want to hop on over to our Event Graph tab. And we need to script some functionality to actually make our start menu screen appear. And we're going to do this off of Event Begin Play this node, which is here by default. But if you don't see it, you can right click and search for it. I'm going to get rid of this Event Tick right below because that is not needed. Okay, I'm gonna do one thing off of our Event Begin Play here, I'm going to look for a sequence node.

And the reason I'm going to look for a sequence node is because upon beginning play, I want to do two things I want to Firstly, search for a Create Widget. We want to create a widget which widget do we want to create? Well, we created something called w BP Start Menu. Ah and then out of this route, Hearne value I want to drag out a wire and type in Add to Viewport. So what we are saying here is that when we begin play, we want to add our start menu screen to our view viewport. To accompany that, wouldn't it be nice if we had a little background music playing?

I think so. So Drag off of this then one pin. Let's search for a place down 2d. And here I'm going to slot in starter Music cue. This one is located within your star content, just a nice little song to play in the background. So with that, let's go ahead and Compile and Save.

And now let's go ahead and play let's see if we see see that start menu and lo and behold, we still see Our crosshair, we don't see a start menu at all. Huh? What could be the problem? Well, you may notice that we are creating this BP game mode Start Menu. That's the new game mode we just created. But we're not actually using this yet.

We are in our start menu here and we can actually override what the game mode is for this specific level. Remember, currently our project settings let me just bring that back on. maps and modes tab. Currently, our project settings determines that we are using this first person gain mode blueprints that's why when I click play there, I was seeing the first person have that crosshair appear in the center of the screen. Now I don't want to do that. That's why I created a new game or blueprint Start Menu.

Okay, so with my Start Menu selected here we are in our Start Menu level. You can find your world settings over on the right hand side. And if you don't see this particular tab, you can click it on by coming under window world settings. And if you look in your world settings there is a game mode override that is currently set to none. Because it is set to none, we are using our default game mode determined in the project settings are first person game mode. But here in your world settings, you can override what is going to be the game mode for this specific level.

I'm going to change this on over to my BP game mode Start Menu like so. And down below for my selected game mode. You can see my default pawn class is currently default pawn. My HUD class is currently set to HUD, my Player Controller is currently set to player control And this may be a little different than what you see in your project settings. For example, in your project settings when you have the first person game mode, slotted in your default pawn class is the first person character. Here we are overriding it with our BP game mode, start menu, and that is not the case.

These all got slotted in by default. And you can see if we double click on your BP Start Menu, if I was to go in my class default that is where all the settings come from. These are here by default. These are the exact same framework blueprints that you are seeing over here in your world settings when you slide in your BP game modes Start Menu. Okay, so now let's go ahead and try clicking play. And you will see that we now see our start menu which is all well and good but I click on level one and nothing is happening.

Now the reason nothing is happening yet is because we have not yet hooked up any functionality. So I'll just hit Escape to jump out of here. So now Where do I need to go to actually hook up our button for level one? When I click on that, how do I actually make it so I go into our level? Well, let's jump on over to our UI folder down here. And let's double click on our bps w BP Start Menu.

And up until this point, we've only worked in the Designer tab. Now let's work over in the Graph tab to hook up some functionality for this screen. Jumping on over to the Graph tab. We want to do something when we click on our level old one button. Over in the left hand side in the My Blueprint section, you can see you've got an A level one button and if you select that, down in the Details panel, there are several events that you can add to your graph. associated with that button.

We want to do something when we click on that button. So let's add an event for on click right here. that'll add that event to your Event Graph. And this is going to be a real simple script, simply drag on a wire and type in open level, there's a function to open a level. And it's gonna say what level name Well, if I jump back into our levels folder, our level name that we want to jump into is level underscore oh one, make sure you put it in exactly like that. In fact, I recommend clicking on it, doing f2 Ctrl C to copy that.

Then jump back to your web p Start menu. Select right here and then do Ctrl V to paste that so you don't make any mistakes. Make sure you Compile and Save. And now if you jump in and play You see your start menu here. And if you click on level one, you will be transported to level number one where you can begin playing. And now you see we've got our crosshair back on the screen because we are in a different level that is using a different game mode blueprints.

Okay, so that is all well and good. So we have a separate game mode in our start menu, then we do in level one, which is pretty cool, because in our start menu, our BP game mode Start Menu does not use the HUD class of First Person HUD. We don't want to see that crosshair. We don't want to be controlling a character at all either. We only want to be interacting with that screen. Now one more thing I want to point out here to you all and this is also in the project settings.

So hop back on over there. Here in your maps and modes section. You will see Right below all your framework blueprints right here, an option called default maps editor start up map and it says if set this map will be loaded when the editor starts up, and currently I've got it set to level one. Now, if you were to close out this project, this entire Unreal Engine, close it all out and then bring it back up, you would start on level one, well, let's change this on back to start menu, like so. And what this will do is, after we close out our Unreal Engine, the next time we open Unreal Engine backup, this will be the level that will be loaded up by default. So just know about that.

With that, I'm just going to do Ctrl Shift n S to save everything that I have just done. Guys, that is going to do it all for this one. We now have a functioning Start Menu. We'll see you guys in the next Video

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.