Main menu problems

Hello! I’m new in UE4 and I want to learn making games. I made a main menu widget with working buttons but there are few problems:
When I press on “Start” button my game resets. I moved the widget a little bit up. I can see how my character is moving, but the game resets when I press on “Start” and the main menu widget is still on.

Is your main menu being created in the same exact level that your normal game is in?

Try making an entirely new level and put your main menu in it. Then when you press start, set it to open the level that your gameplay is in.

EDIT: It occurs to me that you may be trying to make a pause-type menu? When you say “main menu” do you mean the kind of menu players use before they begin a game or the kind that players can freely access during play?

No, they are in different blueprints. No, not a pause menu, the starting menu.

Is the main menu being created in the same level though?

I’m in danger of getting a bit too basic here (sorry if so), but I’m just going to step-by-step this thing:

Go to file and select New Level.

Then, in the level blueprint of the new level, create your menu widget and add it to the viewport.

Then, make sure that the Open Level node attached to your start button has the exact name of the level with your game in it.

The name is the same and I can see the map when I move the mian menu widget.
I made a new level and a new widget, still the same thing, “start” button restarts my game.

I’m a bit unclear here. Isn’t the “start” button supposed to start a new game?

In the new level with the main menu widget, when you select start game, does it not teleport you to your other level with your game in it and then start the game?

EDIT: You can also take the old “main menu” widget out of your gameplaying level. It seems like you might still have it in there.

The start button is for “open new level” . Well the widged is over the screen, and under it I can see the game beaucase i moved the widget.

As you can see here, the game is under the main menu. The only button that works is “Quit”.

Okay, except that you can make it so that there isn’t a widget here in this level at all. :slight_smile:

Somewhere in your blueprints you have a “create widget” node that created this instance of your main menu widget. If you find that node and delete it, then it won’t be in your gameplay level anymore.

If you created the widget in the player character, then try creating it in the level blueprint of the new level instead.

I may have missed a few steps from before. I will try again:

Step 1: Unplug any nodes that may be in your character blueprint or player controller blueprint related to creating a widget or putting it on the screen. You will not be using those.

Step 2: File → Create new level (it should be 100% blank and just see blackness). Name it whatever you want.

Step 3: Create a new blueprint and select Game Mode Base. Leave it 100% default. Name it whatever you want.

Step 4: Go to the world settings of the new level you just created (should be the tab next to where the details panels usually are). If you do not have world settings available, go to the “window” toolbar and select it.

Step 5: In the world settings, there is a section called Game Mode. In this section, select the dropdown for “game mode override” and select your newly created game mode.

Step 6: Go to the toolbar above the main viewport and select the “blueprints” dropdown. Select “open level blueprint.”

Step 7: In the level blueprint, create the node begin play if it isn’t already in there. Off of begin play, make a create widget node and select your main menu widget. Then drag off from that and make an “add to viewport node.”

Step 8: Go into the blueprint for your main menu widget. Drag off from the button that you want to start the game and make an Open Level node. In the open level node, type the name of the other level you have, the one with your game in it.

Further replying because the chat won’t let me write more:

Also, you can go to your project settings “maps and modes” and set it to default open on your main menu level if you want (it might make it easier to chain test).

So, in the end you should have this experience: You hit play while in the main menu level. Your main menu should show and only blackness should be behind it. You should be able to select your start button and then it should teleport you to your other level with your game in it. This other level with your game in it should not have any menu whatsoever inside it.

I hope this helps. Once you do this a lot you will have it down very soon though. Learning Unreal Engine is sometimes time consuming, but it is fun to make games! :slight_smile:

Replying again because I missed some other things:
Back in the level blueprint of the main menu level: Set game mode UI only with set game mode node and also show mouse cursor node. Do these after the show in viewport.

And, also, in your widget, attach the set game mode game only and show mouse cursor node to the start button too. Make sure they are in front of the Open Level node though, or they won’t fire.

And, another also, if you have been creating the main menu widget in the level blueprint of your gameplay level, you can delete that. I just thought maybe you were making it on your character from the way you were describing. There should be no menu widgets available from anywhere in the gameplay level.

Thanks for help, but I will tey tomorrow beaucase it’s too late and I was too busy. Can you leave a yt video in case I’m too dumb to make it right? I’ll delete this and I will take it to 0, I just want to see main menu done and “Start” button working. Thanks guys!

You know what? A youtube video is a wonderful idea. There are probably a whole bunch of menu widget tutorials on youtube. I found this one and it seems reasonable: How To Create A Main Menu - Unreal Engine 4 Tutorial - YouTube

Also, you are not dumb; you are learning! Choosing to learn something makes you smart. :slight_smile:

It worked, thanks! I wanna learn to work in UE4 so I can make a carrier in game developing, I made a game in Unity but it is 2D and not that good. But for a 17 years old begginer is something good to begin.
Again, thanks for your help!