How To Create A Pause Menu - Unreal Engine 4 Tutorial

Поделиться
HTML-код
  • Опубликовано: 18 сен 2020
  • Hey guys, in today's video, I'm going to be showing you how to create a functional pause menu in Ue4. This allows you to pause the game and resume or quit from this menu, all on a simple button press.
    ___________________________________________________________________________
    Unreal Engine 4 Tutorials Playlist: • Unreal Engine 4 Tutorials
    Blender Tutorials Playlist: • Blender Tutorials
    ___________________________________________________________________________
    If you enjoy make sure to subscribe: / @mattaspland
    Join My Discord Server: / discord
    Follow Me On Instagram: / matt_aspland_
    ___________________________________________________________________________
    If you want to support me, you can PayPal me at "matt.aspland.1@gmail.com". This is by no means expected or required. It is just a nice support :)
    Link to PayPal: www.paypal.com/
    You can also support me on Ko-Fi following this link: ko-fi.com/mattaspland
    Thank you :) ___________________________________________________________________________
    ♫Music By♫
    ●Kronicle - Chill Noons
    ●Soundcloud - / the-chemist-10

Комментарии • 170

  • @TheMentalPsycho
    @TheMentalPsycho Год назад

    I randomly stumbled upon 2 of your videos within the same day and both of them were absolutely perfect. Helped me a lot in my project

  • @makaronichef2506
    @makaronichef2506 3 года назад +7

    I just found your account and 3 of your vid already helped me a lot damn! U got my sub and keep doing it, your viewers must love you

    • @MattAspland
      @MattAspland  3 года назад +1

      Thank you so much man, I'm so happy you enjoy and find it all helpful! I wish you all the best of luck with your future games, thanks for sticking around :)

  • @bigangryskygames5281
    @bigangryskygames5281 3 года назад +8

    Much easier than I thought it would be, great stuff!

    • @MattAspland
      @MattAspland  3 года назад

      Thank you, I’m glad you found it helpful and easy! :D

  • @DOAmaster
    @DOAmaster 2 года назад

    Great straightforward tutorial, keep up the good work!

  • @Zeo_Kana
    @Zeo_Kana 3 года назад

    Excellent tutorial. short, simple and clear! really helped :) Thanks!

  • @ShadowAimai
    @ShadowAimai 3 года назад +11

    Short, useful and to the point.
    Also, thank you for not playing some music on the background.

    • @MattAspland
      @MattAspland  3 года назад +3

      Thanks you, glad you enjoyed it :) and no problem, I feel the same way you do about that lol

  • @KOKI-or2gx
    @KOKI-or2gx 2 года назад

    Tnx bro, I was trying to create this like a weeks. You are a king.

  • @brendangray6401
    @brendangray6401 2 года назад

    your tutorials are so helpful - Thank you!!!!!!!

  • @michaeltorruella188
    @michaeltorruella188 2 года назад

    Saved me on my assignment. Good video bro

  • @RationalAxis
    @RationalAxis 3 года назад

    Thanks for this, very helpful.

  • @muhammetsalihalbayrak4352
    @muhammetsalihalbayrak4352 Год назад

    much easier and fast. Thanks bro

  • @ruslandad365
    @ruslandad365 Год назад

    Amazing Tutorial
    Thanks!!!

  • @AdamnationYT
    @AdamnationYT 3 года назад +1

    thank u for this tutorial its making helpful with it and i think i had for my game

  • @WorstDaysRPG
    @WorstDaysRPG Год назад

    Very helpful! Thanks!

  • @xlgabriel
    @xlgabriel 2 года назад

    U are awesome, you saved my videogame!

  • @Axis4x15
    @Axis4x15 3 года назад

    thx for the tutorial man! im making my own game and this really helped

    • @MattAspland
      @MattAspland  3 года назад

      No problem man, so happy to help! Good luck with your game :)

  • @AZ-ie9kz
    @AZ-ie9kz 3 года назад

    i just added a pause menu and multiplayer to my game in ue4 as a begginner in less then 1 hour vs me using unity for 2 years and couldnt. thankyou epic games, you are truelly EPIC

    • @MattAspland
      @MattAspland  3 года назад

      That's great news! Well done mate! :)

  • @muhammetsalihalbayrak4352
    @muhammetsalihalbayrak4352 Год назад

    helped me solve a problem I've had for three hours

  • @karlchurch1137
    @karlchurch1137 Год назад

    Matt is the man

  • @CryptMhg
    @CryptMhg 3 года назад

    i rlly needed that lol thx m8 u da best

    • @MattAspland
      @MattAspland  3 года назад

      No problem, happy to help! And thank you so much! :)

  • @strikermi9
    @strikermi9 2 года назад

    Thx dude for the Video

  • @kriskata7653
    @kriskata7653 3 года назад +1

    Gj my friend ! This will be useful for my horror game xd :)

    • @MattAspland
      @MattAspland  3 года назад

      Thank you! Glad you found it helpful and I'm sure your game is going to be great! :)

  • @RaxeCAT
    @RaxeCAT 2 года назад

    Good tutorial!

  • @stephenfredy3362
    @stephenfredy3362 Год назад

    your videos are so helpful. could you please make an inventory system, a Gun swap, and a third-person shooter with a reticle?

  • @chickishot8172
    @chickishot8172 3 года назад +1

    How would I do this with a game pad controller instead of getting the mouse? Thanks again for the tutorials! 🙂

  • @BieAnimation
    @BieAnimation 3 года назад

    Thanks!

  • @dagiberish8105
    @dagiberish8105 3 года назад +1

    yo this guy is sick

    • @MattAspland
      @MattAspland  3 года назад

      Ha thank you man! I appreciate it :)

  • @eclecticgamer5144
    @eclecticgamer5144 3 года назад +17

    Several problems:
    A: Pressing ESC a 2nd time does not close the menu, while paused.
    B: After clicking resume, I have to press Escape twice to pull pause menu back up.
    C: After clicking resume, the cursor won't hide itself, requiring a click.
    D: The first time I hit escape, the controls "lose focus" on the game, requiring a click to focus my controls on the game, and a second click on the button for the button to be clicked.
    I'm running the playtest in "standalone" mode, just like you. I've double and triple checked everything to ensure everything is set up exactly the same.
    I had similar issues with main menu not hiding the cursor after picking a level.
    Version: 4.26.1

    • @eclecticgamer5144
      @eclecticgamer5144 3 года назад +5

      Found one problem.
      SetGamePaused is disabling all input from the keyboard. Removing that from the blueprint and the rest works fine.

    • @eclecticgamer5144
      @eclecticgamer5144 3 года назад +4

      Followed your newest tutorial that had several additional steps that fixed all the issues, including the mainmenu cursor thing:
      Additional steps:
      Set input buttons in project settings
      Set pause button to "execute while paused"
      Set game input mode to game only when moving from menu to gameplay.
      ruclips.net/video/Bck480UHKq8/видео.html

    • @MattAspland
      @MattAspland  3 года назад +5

      Thanks for leaving the fixes and link here for other people. Glad you got them all solved, I'd realised a lot of these issues were present, hence why I made an updated one. Nice work :)
      All the best!

    • @nekimeow2004
      @nekimeow2004 Год назад +1

      @@MattAspland wish i had known this, the first thing u mentioned in the updated tutorial was that there are no known issues with this old tutorial but apparently there is :c

    • @Arlo_Rose08
      @Arlo_Rose08 Год назад +1

      d

  • @mail2padthu
    @mail2padthu 3 года назад

    i like your videos ...
    your videos are true .
    i am watching your videos daily ....
    make a 1 hour tutorial ...
    but one thing i am making my projects with your tutorial ...
    and last thing i think you to make a server browser project ...
    because many people playing online games .
    so i request to make a online game in 1 hour video :)

  • @drakouzdrowiciel9237
    @drakouzdrowiciel9237 3 года назад

    Good job ;)

  • @Maxim_Naumov
    @Maxim_Naumov 3 года назад

    Very good and useful! One question, how to disable the pause menu in specific maps? It's just that my main menu gets glitchy when I click ESC

    • @MattAspland
      @MattAspland  3 года назад +2

      Thanks man, and what you could do is either have this code in the level blueprint instead of the character blueprint, or after you press your pause button, get "Get current level name" and out of this get an == going into a branch. Inside of the == we want to write our main menu level name. Off of the true of the branch, do nothing, and false will go into our pause code. Hope this makes sense and helps out :)

  • @NeroForte_
    @NeroForte_ 2 года назад

    HELLO, Thanks a lot. what about for mobile touch input where there is no ESCAPE KEY?

  • @Sheldinator
    @Sheldinator 2 года назад

    hi, everything works. but when i am selecting another level and try to use my pause menu it instantly takes me to the mainmenu and doesnt alow me to hover of the main menu anymore. should the mainmenu widget nodes take effect to all levels?

  • @rttsh1616
    @rttsh1616 3 года назад +1

    So everything worked but from the main menu video I wanted options in the pause video any help on how to so here’s what I’ve done I copied and pasted the options widget in pause menu folder and on the back button script on create widget I put the class as Pause menu widget and it doesn’t work it just sends me to the main menu any help how to fix it also I could remove it and it still work but I really want it in there

  • @officialmrraviya
    @officialmrraviya 2 года назад

    Can u get video Level Select Tutorial in main menu

  • @Luke-bs3qz
    @Luke-bs3qz 3 года назад

    Thankyou Matt

  • @Trav2d3dArt
    @Trav2d3dArt 2 года назад

    I’m pretty new and have been following along adding this menu to my game and I keep getting an error that says “the widget MainScreenM does not support focus. If this is a UserWidget, you should set bIsfocusable to true. MainScreenM in my scene is equivalent to the playermenuUI in this video. Any help would be appreciated!

  • @Thehughesgaming
    @Thehughesgaming 2 года назад

    Do you know if there’s an “easy” way to adapt this for a controller?

  • @QTupe
    @QTupe 7 месяцев назад

    I have created my pause menu and everything is working fine, but if the song or the audio was playing. and then I paused the game, the audio will still play, is there a way to stop everything including audio sounds while pausing the game?

  • @JoelDiab
    @JoelDiab 3 года назад

    I added this to a car game and everything is fine other then the fact that my car still moves🤔 Would you or anyone know how to fix that? Love the channel, couldn't do it without you!

  • @anonimbai
    @anonimbai 3 года назад

    thanks dude

  • @emilyterral747
    @emilyterral747 2 года назад

    what about using a game pad instead of a mouse???

  • @ratiavaliani8515
    @ratiavaliani8515 2 года назад +1

    For anyone who is having problems, use "Branch" instead of Flip Flop. Flip flop does not store input data and that is why you need to press 2 times to actually get an input since it only outputs A value it does not consider B at all.

  • @JenkTank64
    @JenkTank64 2 года назад

    I did this on a character that crouches, but for some reason when I play it as a standalone game, moving while crouching shows slow walk animation instead of crouching while moving, any idea why this is? Otherwise, great tutorial

  • @unomisseh
    @unomisseh 3 года назад +2

    Thanks for the tutorial!! I have one issue which is that I need to click the pause screen once before the cursor allows me to select over the icons. Same issue with the main menu. Any idea what may cause that so it auto recognizes without needing to click?

    • @MattAspland
      @MattAspland  3 года назад +1

      No problem, and if are you making sure to set "Show Mouse Cursor" to false. if so, then I believe there is a node called "Set Focus" in which you can set which widget it should focus on, if any. Focusing is where your mouse goes. This should fix the issue I think.

    • @pubtech2085
      @pubtech2085 3 года назад +1

      @@MattAspland hey i’m having the same issue and i can’t find where this setting is

    • @christianhoffmann8252
      @christianhoffmann8252 3 года назад

      Use the "Set Inpute Mode UI only" node. And don't forget to switch the inpute mode back when you close your menu.

  • @RxUC31obcrrqj3oX7jRZIqtNjw
    @RxUC31obcrrqj3oX7jRZIqtNjw 2 года назад

    What if I play on standalone game and I can't move and my gpu is way way up?
    I tested making a new level with only a box and light and a playerstart and It was the same

  • @GuiiWolff666
    @GuiiWolff666 3 года назад

    Awesome as ever man! But i'm having two problems: I have to click on the screen to activate the widget AND if i'm on the main menu level and press ESC, the pause menu shows up! There's a way to deactivate this when i'm in certain level?

    • @MattAspland
      @MattAspland  3 года назад +1

      Hey man, what you could do is "SetFocus", meaning that it will set the player's focus to automatically be on the widget, so you don't have to click on it. You'd want to fire this off when you open up the pause menu and have the new focus as the new widget. I'll link the documentation for it as well :)
      docs.unrealengine.com/en-US/BlueprintAPI/AI/SetFocus/index.html
      Also, what you could do is when you press ESC, you get the current level name, and get an (==) writing in the name of your main menu level. Then put this into a branch with false going into your code and true doing nothing. This should mean if you are in the main menu level, it won't open the pause menu.
      Hope these help, let me know if you need an extra hand :)

    • @GuiiWolff666
      @GuiiWolff666 3 года назад +1

      @@MattAspland thanks man! The esc in the pause menu I did what you do, and also we can do the pause menu blueprint on the level blueprint. So it will only work when entering the level. But the setfocus still not working here :/ hahahahahaha

    • @MattAspland
      @MattAspland  3 года назад

      ​@@GuiiWolff666 Great, and yeah absolutely, if you only do the code in that level that will work perfectly for you.
      Also, that's a shame, what were the inputs you put into the set focus?

  • @petarsimovski3086
    @petarsimovski3086 2 года назад

    how do u type in a command in standalone game?

  • @DarthKickapoo
    @DarthKickapoo 3 года назад

    My game does not unpause when pressing Esc despite connecting the right nodes and there seems to be a bit of lag when pausing,

  • @osiris5449
    @osiris5449 2 года назад

    bit of a bug buddy, when you got a spammy user and they keep pressing the esc key it gets stuck paused without a UI unless i missed something from the BP.

  • @KilerMansters
    @KilerMansters 2 года назад

    ow yes thanks

  • @luquedev
    @luquedev 3 года назад +1

    nice

  • @onlybazhar
    @onlybazhar 2 года назад +1

    For everyone watching this from July 26th < You do NOT click Edit ThirdPerson Character to set the key for pause menu, you Select Blueprints, then Open Level Blueprint for the map you are on, Sorry if this is a little confusing

  • @chrischandras3390
    @chrischandras3390 2 года назад +2

    So everything worked except! When I hit escape to pause, the hover color of the buttons doesn't appear when my cursor is over them unless I click somewhere in the screen first. Similarly, after hitting "Resume" the escape button will not bring back up the pause menu unless I press it twice. So its like I have to click twice to use my pause menu and hit escape twice to access it. Any tips?

  • @pubtech2085
    @pubtech2085 3 года назад

    Hey is there any possible way i can make buttons do certain commands?

    • @MattAspland
      @MattAspland  3 года назад

      Hey, absolutely yeah. Off of the "On Clicked Event" you can get the node "Execute Console Command" and put in the command you want. Or you could create a custom event and call it there too, the custom event would allow you to create your own command essentially.

  • @irempsl9132
    @irempsl9132 2 года назад

    Hey, I did the tutorial but when I tried it the screen freezes• How can I solve it?

  • @eclecticgamer5144
    @eclecticgamer5144 3 года назад

    Dramatically faster way to Full Screen: Alt+Enter. (It also flip-flops.)

  • @StickyCerealStudios
    @StickyCerealStudios Год назад

    Whenever I press resume in my FP game the mouse cursor still shows after

  • @thoukkol
    @thoukkol 3 года назад

    Whenever I press the pause button the mouse doesn't show up, any solutions?

  • @NaturalBornCamper
    @NaturalBornCamper 2 года назад

    None of the buttons are clickable for me, Been on this for 5 hours now..
    They're all enabled, I even tried SetInputModeGameAndUI, tried deleting the buttons and trying again.. nothing
    Seems like the widget window is just a static window. Camera even kept moving while I moved the mouse so I also tried using SetIgnoreLookInput, but it still doesn't work
    And when clicking on the Window, it's like the main game loses focus and I have to click once after closing the window with ESC so the mouse works again.

  • @clebo99
    @clebo99 3 года назад +2

    Does anyone else's mouse button still stay unless I click it after the pause?

  • @TolisPiperas82
    @TolisPiperas82 3 года назад +1

    i press escape and the widget not appear

  • @LilYet
    @LilYet 3 года назад +1

    when i press the pause key while my menu is open it doesn't resume the game I actually have to click the resume button

    • @caelinhobbs7647
      @caelinhobbs7647 3 года назад

      In your blueprint click on the command, you are using to pause the game e.g. the escape button then set the variable execute when paused to true

  • @Bentley0312.
    @Bentley0312. 3 года назад

    4:07 I don’t have edit character

  • @pranavraj7806
    @pranavraj7806 3 года назад

    I ran into a bit of an issue, when I resume from the pause menu, my other characters with AI controller as well as one character with a standalone blueprint stop moving. Any help will be greatly appreciated
    Edit: Changing to a new NavMesh seem to have solved the issue for now

    • @MattAspland
      @MattAspland  3 года назад

      Okay great, glad you've solved it. If it breaks again, maybe try having a variable based on if the game is paused or not, and if it isn't paused then they can move. This might help to just update the AI again to move. :)

    • @pranavraj7806
      @pranavraj7806 3 года назад

      @@MattAspland Yes I'll implement that, thank you for your response :)

    • @MattAspland
      @MattAspland  3 года назад

      No problem, hope it helps :D

  • @minhhieungo896
    @minhhieungo896 2 года назад

    short and clear video. But it doesnt work. When i press Esc key, pause menu show up. When i press again, pause doesnt go away. and i have to click on screen 2 times to active my mouse. I try set focus node and all things. It doesnt work. I get many people have the same issue

  • @1Monty509
    @1Monty509 3 года назад +1

    why do I get into the pause menu and have to click once to get the menu to work at all, any thoughts? Good tutorial though :) Thank you

    • @MattAspland
      @MattAspland  3 года назад

      Hi, I get it too. To be able to not have this you'd have to use a different game mode I believe, like it is in the Main Menu. I believe you could change it in runtime using "Set Game Mode Override". But I'm not 100% sure. From my knowledge and rough testing just now, this should work. Hope this helps :)

    • @1Monty509
      @1Monty509 3 года назад +1

      @@MattAspland Ah, awesome thank you for the response! Make's sense, still the only tutorial I think I have ever gotten something UI related to work, lol.

    • @MattAspland
      @MattAspland  3 года назад

      No problem! Haha thank you, I'm glad you got it working :D

    • @zhyrakhgames
      @zhyrakhgames 3 года назад

      I could fix this by calling "Set Input Mode UI only" when opening and "Set Input Mode Game only" when closing the menu

  • @codevaporReal
    @codevaporReal 3 года назад

    hey so im trying to make like a 3d pong game mostly for practice but how would i turn a block(cube shape) into a character I could edit

    • @codevaporReal
      @codevaporReal 3 года назад +1

      and now when ever i start the game it wont let me even look around as well as esc doesn't work any ideas

    • @MattAspland
      @MattAspland  3 года назад

      Hey, so escape may not be working if you are in the Play In Editor mode, or do you mean it doesn't let you exit the game when in PIE mode (play in editor - the default play mode)? Also, from testing, I can still look around, it may be the camera isn't parented correctly or you have changed a setting on it?
      And to set your character as a cube, you can get a cube Skeletal Mesh and set this as your character's mesh, what do you mean by edit though?
      Hope this helps :)

    • @codevaporReal
      @codevaporReal 3 года назад +1

      @@MattAspland so for the testing part im in a stand alone game but i think the problem might be what character i was using because i was using a testing character thing instead of an actual thing like you.
      and for the second part i ment so i can edit the characters code like you did because i didn't have a character with a blueprint so i made a new blueprint as a stand alone thing like it wasn't attached to anything just so i could learn the code

    • @MattAspland
      @MattAspland  3 года назад

      Oh okay yeah, that character might be it, this is for the second part as well, you would need to create a Pawn for the character blueprint, an easy way is to just duplicate the third person character blueprint if you still have it. Otherwise, right click>blueprint class>pawn. And this should hopefully solve your problems! :)

    • @codevaporReal
      @codevaporReal 3 года назад

      @@MattAspland ill give that a go thanks alot for your help by the way and i've already learned a bunch in just a few days

  • @mcscoding1126
    @mcscoding1126 3 года назад +2

    I JUST STARTED USING UNREAL ENGINE BEFORE I USED UNTY NOW UNREAL ENGINE I DON'T KNOW HOW ADD BLOCK CAN YOU HELP🙁🙂

    • @mcscoding1126
      @mcscoding1126 3 года назад +1

      +1 subscriber🙂

    • @MattAspland
      @MattAspland  3 года назад

      Thank you much man, glad I can help! Welcome to Unreal! :)

    • @MattAspland
      @MattAspland  3 года назад

      Hi, sorry I just re-read this comment, what do you mean by add block? If you mean the nodes I am using, you would right click and search for them in the Blueprint you are working in.
      Hope this helps and sorry for any confusion :)

  • @DOLi0N
    @DOLi0N 2 года назад

    my game wont unpause

  • @kevril4143
    @kevril4143 3 года назад

    When I press the pause button the pause menu does not show up and the game does not pause. Any suggestions?

    • @MattAspland
      @MattAspland  3 года назад

      That would mean that when you press your button it isn't actually firing off, are you using this button more than once in your code, and are you using the correct button too?

    • @kevril4143
      @kevril4143 3 года назад +1

      @@MattAspland I wasn't using it anywhere else and did try using an action mapping instead of just the button in the blueprints. I was actually able to figure this out by moving the code to call the pause menu widgets into each individual level.

    • @MattAspland
      @MattAspland  3 года назад

      Oh okay great then, glad you got it solved in the end at least then :)

  • @TheMcGoris
    @TheMcGoris 3 года назад

    I have a problem. I need to click 2 times esc or resume ;/

    • @MattAspland
      @MattAspland  3 года назад

      Hey mate, you could use a node called "Set input mode UI" with the widget in focus to be the pause menu. This would be where the code is for pausing the game. Then when you unpause the game, get "Set input mode game only" I go over it in more detail in this updated video :)
      ruclips.net/video/Bck480UHKq8/видео.html

    • @TheMcGoris
      @TheMcGoris 3 года назад +1

      @@MattAspland Thank you, you are great!

    • @MattAspland
      @MattAspland  3 года назад

      @@TheMcGoris No problem mate!

  • @AileronsAscended
    @AileronsAscended 3 года назад

    how to add this in first person?

    • @MattAspland
      @MattAspland  3 года назад

      Hey, this should still work the exact same way in first person. Let me know if you need a hand :)

    • @AileronsAscended
      @AileronsAscended 3 года назад +1

      @@MattAspland 4:07 (third Person character) i cant find that option in first person game :(

    • @MattAspland
      @MattAspland  3 года назад

      @@AileronsAscended Hey, you can use FirstPersonCharacter instead :)

    • @AileronsAscended
      @AileronsAscended 3 года назад +1

      @@MattAspland i cant find FirstPersonCharacter :(

    • @MattAspland
      @MattAspland  3 года назад

      @@AileronsAscended Oh strange, it should just be the name of your character you play as. Make sure the spelling is correct, and maybe untick "Context Sensitive" in the top right corner of the search box

  • @aristokratplace
    @aristokratplace 3 года назад

    Долго говоришь про не нужное , у меня ограничено время создания меню паузы и ещё ты со своим лайком

    • @MattAspland
      @MattAspland  3 года назад

      Привет, извини за это. Однако я считаю, что это необходимо, поскольку я объясняюсь, чтобы вы могли учиться, а не просто копировать, это должно помочь вам учиться на будущее.