How to Make a Game Start Countdown in Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys welcome to Unreal Engine 5 tutorial today I am going to show you on how to create a game start countdown so we go three two one and the game will begin it's gonna be a very easy view to follow so let's get started but first check out the link in the description to learn how to make an FPS shooter in a real Engine 5 with all the mechanics you need in only one week and if you use the coupon code worker games in all caps you get 20 off so check it out through the link in the description all right so the first thing I'm going to do is create the widget so let's go into content browser just right click go into user interface widget blueprint just click on user widget now let's name this WB underscore and we can use you know name it countdown something like that and let's go ahead and open this widget up so the first thing that we have to do is go and search for the canvas panel and just add it into the hierarchy so now we can place things into our screen then I'm gonna get our text you to drag it in and let's just put a three as a template okay of course this number will change but it's just to guide us then I'm going to go ahead and Center this at the middle and increase the fonts maybe 50 will work a bit better even maybe 80 for just the sake of the tutorial let's go ahead and just make this bit bigger so I guess that 120 120 will work then I'm going to get the anchors and just select this top Center one and now we can split the position X and Y to be at zero zero with an alignment of 0.5 and 0.5 so now we'll be perfectly in the middle and now we just get the position y means increase this so that more there great so that looks great I am going to quickly use you know put a bit of outline maybe like this is eight and it will look pretty cool and that's it so now I'm gonna just go ahead and rename this text to be the count I know how to type down text and then very important this has to be detect uh as is breakable so now compile save and close we don't need anything else so let's do all of the logic in the game mode because it makes sense the game mode is the one in charge of our game mainly installed let's go into the wallet settings we're gonna go into the game mode override as you can see here in my case I'm just using the default third person template game mode but I can use whatever you want there's this double click on this game mode and if you see this is click on open full Bluetooth editor and now let's right click and just add a begin play in the bank graph so when the game starts we'll go ahead and just create a new widget and in this case it will be our countdown widget and then we want to do is right click and promote this to a variable so we're saving this new widget in a variable so later on we can use it in this case it's going to be the count down widget and then after that I want to add this into the viewport so it'll be at the screen so now if I compile and save and press play as you can see we have the number three over here really cool okay so now let's make a small timer that will you know get rid of the time each second let's right click and you say set timer buy event and this will go ahead and create a new timer and we'll call a specific event every so often so let's plug that in the begin Place let's take looping and the time will be one so every second it will be you know so now from this we want to create a custom event and this will be take a countdown you know simple and easy okay so basically this time we'll just call this custom event every second in a loop great so with that said we will need a new variable that will be the we could say count uh just count okay which will be the count number and this will be an integer so at the beginning let's compile and let's set it by default to be A3 because it will start right free now if you wanted to put a bit uh the beginning to be five you can do so okay that's a real matter but then what I want to do is get count I'm going to say minus minus so it will decrease it by one and automatically save it to a variable so it will decrease one to count and also update the variable okay and then with that what I want to do is of course update the widget so in my case I am going to get the countdown widget and then you say get 10 text which is going to be the get countdown text that we marked as variable later on so before and then we want to call the set text node and now with this we can go ahead and just plug in the count variable great so with that said we just put whatever it needs and then with that we also want to check if count is less or equal than zero if so of course we will want to stop but for now we're just going to go ahead and just leave it like this so now you can see that when I press play well three two one and boom and it goes to zero but then of course it begins again uh you know two negatives which we don't want that so what I want to do is get this timer and just do a um it was so we got in utilities and we got time a little bit clear and invalidate timer by handle okay uh so clear yeah exactly so this will go ahead and let's make sure to disconnect it from here and just connect it from the true and this will basically is clear and stop the timer and it was just exactly how you imagine will you stop the timer okay and then with that said I just want to remove the widget so I'm going to get the countdown widget and say remove from parent that's how we remove a widget and now it will be deleted so now when I press play go three two one and then boom disappears which is great cool so let's also go ahead and just play a little sound every time so let's go ahead and just put a little bit to the right and right after we update our text we can use a play sound to D and this can be the most simple sound in the world for example camera shutter will work for me as you can see start which is great now let's make one last thing which is to you know enable our player to have input or not so when the game starts I am going to guess the player controller and then set and use this disable input okay here we go so now in theory I should not be able to okay I can move indeed so I'm gonna put the player controller and this will be get player character alright so now we press play and you can see that now yes I cannot move okay and I'm gonna go ahead and just copy this two nodes paste it here and this will be enable input okay so now we'll be able to go ahead and move so with that said now press play three two one I cannot move my camera like that oh when the game starts I can move the camera so that's it guys if you found it so helpful or really you could like the video and subscribe to my channel remember that the 48 files will be available in my page and I need the membership server for minimal Solutions and now yes with what I said bye bye foreign [Music]
Info
Channel: Gorka Games
Views: 5,378
Rating: undefined out of 5
Keywords: games, videojuegos, unreal engine, unreal engine 5, ue5 game start countdown, tutorial, quixel, megascans, unreal engine game start countdown tutorial ue5, ue5 match start countdown tutorial, ue5 match countdown tutorial, how to game start countdown in unreal, unreal engine 5 how to create game start countdown, countdown match game start ue5
Id: Qaf-vmTdQHc
Channel Id: undefined
Length: 7min 49sec (469 seconds)
Published: Tue Sep 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.