How to Make a Simple Game Over Menu in Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys welcome to new Unreal engineer 5 tutorial today I'm going to show you how to make a simple game over widget it's gonna be a very easy build to follow so let's get started alright so the first thing I'm going to do is do the widget UI itself so let's go into the content browser just right click go into user interface and create a new widget blueprint it's going to be a normal user widget now we can name this something like WB underscore um game over as simple as that now let's go ahead and open this up so the first thing I'm going to do is add a canvas panel into our power key so we can start basically placing things in our screen the first thing we're going to do is basically just add a background with the red is tint so we know that we're kind of dead so let's go ahead and just write the image here and let's go in anchors and just fill up the whole screen and now it's going to the offset in the left and put this in zero and same with the top right and butter basically this will just fill up the whole screen now we can go into the brush in appearance or in the color in opacity you can change the tint on the color opacity doesn't really matter but for example you're just going to color in a past okay it will change both ways let's put like a reddish thing and then we're going to do is change the alpha to be like 0.3 so it will be a bit transparent so we still can see our background now let's go and get our text you know in here and basically it will be just in the middle of the screen so I can go into position X and Y and put this in zero zero and then we can go into the text and just put it here in all caps for example game over of course you can put whatever you want now let me change the size to be bigger maybe 50 actually maybe a bit bigger let's do 70. and now let's go and increase the size of X and size y so it correctly fills our UI let's go also in the justification and just put it to be centered in the middle so it's nice and visible you know what I mean let's go quickly into outline settings and let's go into the outline color and put it to be like a reddish tint also and then also just go into the outline settings and put a bit let's do like for example two on three yeah three is a bit better yes something like that doesn't need to be perfect okay now what I'm going to do is now go up here into the alignment and put this on 0.5 and 0.5 this will perfectly Center it so now I can go into the position Y and start to decrease this so it will go upwards so we can put it more in between here so now we have it there perfect so now we're going to do is find in the palette a basically component which is the vertical box let's drag it to the scene and also anchor it in the center of the screen and then put the position X and Y to be zero zero and then the alignment to be 0.5 and 0.5 now we can start changing the size X and Y to make it a bit bigger this is where our buttons will be in this case let's do something okay nothing crazy from there well we're gonna have literally two buttons so now we can do is get the position y drop it a bit so now I'll be more kind of there great so now let's go into our button and just drag it inside of our vertical box you'll see that it will be inside as a child and it will be basically aligned in position which is what we want now we can go ahead and put this into fill and as we will have two buttons and then we'll basically share the same kind of size usually what I mean second place we just rename this button to be like um respawn button and that would be great and then also let's get a text inside the button so I'll be inside a button and we can change this to be let me Spawn and now what we can do is get this duplicate this and change the name to be let's say that main menu button now we can go inside and also change the text to the main menu and now with that we can go to the vertical box and maybe decrease a bit the size of Y it's a little bit thinner and that's a bit better and I can go into the main menu uh button and in top I can add some padding for example 30. you know maybe that's too much a 20 that's enough yeah so now they will have a bit of separation and inside the better we can even go and increase a bit the vertical box over here yeah you can play around with the design of the UI I'm not gonna go crazy something simple but functional for you to learn so now with that we can start to basically appear our game over panel so let's go into third person character and here is third person blueprint third person cat blueprints now in my case I'm not gonna be making a Whole Health System I already have a tutorial on that so I'll be linking it in the description just in case you want to watch it in this case what I'm going to do is just when I press the key I will basically just apply damage to myself and instantly spawn the panel just to Showcase how it works okay you want to integrate it into your health system but like I mentioned I have to turn on that so I'll be a link in the description anyway so I'm going to do is call this event any damage uh note basically when our character will receive damage this will be cold so here we want to do is just press create widget and now we can select our W underscore uh how was the game over which it is with that we can just go and get the return value and add it into the viewport and then to enable this what I can do is for example when I press the I don't know the Yi key I can go ahead and apply damage to myself so as yourself I suppose like for example a hundred of damage the damage doesn't really matter like I said I don't have a health system but you get the idea so now if I now go and press play you can see the lows that we go I think it's normal but when I press G the game over panel stops but we have two problems and that we cannot go ahead and um basically press the buttons because we're still playing the game so let's go back into a third person get to blueprint and when we base crucid damage spawn the UI and so on what you do is get the player if I right click there we go get the player um controller and then do set show mouse cursor so we want to show our mouse cursor so let's go ahead and take this and also let's change the input mode to be um UI only yes let's do UI only so we will only be able to control our UI and we can actually specialize which UI we want to control in Focus so we can just put our handle that we created in there and with that you will see I can press play I can press G to die and now I can move with my character but I can go ahead and touch the buttons which is what I want so now one of the last things will be to add the functionality to the buttons so let's go to the WB game over we can go to the graph and we can see our variables if you don't see them just make sure that the two buttons have is available in here but also doesn't matter we can book us go for example with some respond button let's go down into the events and just press the on clicked event so let's delete all the junk and now we only are interested on this so we're gonna do in here is respawn our player now I have many tutorials on how to do this and if you have your own web doing it great but I'm gonna make it simple just basically reload the level okay as simple as that and in this case is the third person map so just go ahead and do so and in main menu on clicked I'll do the same but load the main menu which in my case I don't know if I have one in this level but it's bright but it will work if I you have one gold main menu but of course the letters has to be exactly the same so now for word to press play and I'll die I can just go and press respawn and the level will open again but you can see that my input has not changed and it's like the same so we'll have to do just make sure to copy this last notes that we did just copy and go I have a lot of junk here I know too much young there we go go into the beginning play what is all this let me do it there we go uh I just connect it into here okay I will do the opposite so instead of showing the mouse cursor we want to hide it and here instead of setting the input mode to UI only we want to put it back to uh game only and with that that will be resolved and actually Let's do an extra quick thing which is basically just ragdolling our character so let's get our mesh and then set to simulate physics and this will basically write the right character now I had to have some things in mind go into the mesh go down and make sure that it's set into physics actor in The Collision presets and then in the capsule component is set into ignore only Pawn in the Collision presets now that we're good to go we can now compile save and just press play you'll see that if I put myself in the full screen there we go I'm playing the game like normal but when I press E I died rack though and I can respawn or go to my main menu if you also have that possibility so that's it guys I found out helpful a real estate like video And subscribe to my channel engine 5.0 so go ahead and check them out now yes people have said bye bye laughs
Info
Channel: Gorka Games
Views: 26,269
Rating: undefined out of 5
Keywords: games, videojuegos, unreal engine, unreal engine 5, ue5 game over, tutorial, quixel, megascans, unreal engine make game over, game over tutorial ue5, ue5 game over menu simple tutorial, ue5 game over screen tutorial, how to make a game over panel in unreal, unreal engine 5 how to create a game over panel, game over screen, game over tutorial in ue5
Id: ZpQmL_TzSPo
Channel Id: undefined
Length: 9min 55sec (595 seconds)
Published: Mon Jun 05 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.