Main menu not starting with event begin play

I’m not sure i follow, if you mean that when i start the game i have controls and can play then yes.
if you didn’t notice it’s a pinball game so you can only control the flippers and plunger.
if i replace the create main menu function with spawn ball function(which spawns the ball that i play with) the game starts normally and i play until i lose 3 times then the main menu function is called and works normally.

Hello, i’m new to UE and i’m following a tutorial and everything was great until that main menu problem not showing up when i start the game for some reason.
i made the create main menu function in the game mode and it works fine when its called later in the game but not when i start it. pls help.

Does your player exist in the world when you create the widget? Your player might not exist if you use delayed start in game mode class.

Also you don’t need to cast to a specific controller.

Things happen in order in UE4. It might be that you are creating a widget before the player has spawned even if it happens in the same frame. You could create the widget in your player character blueprint it should definitely work then. Check in the game mode settings if you’re using delayed start or start as spectator. You can and should always debug with a print string. Right before you create your widget do a Get Player Character → is valid and print the return value to screen to see if the player exists.

As far as I know it is not possible to not have a character/pawn. Your character doesn’t have to have arms and legs to be a character. The pinball machine probably is the character. Check in the World Settings what is your default pawn class. If you don’t have world settings tab go to Window->World Settings.

You can check the Delayed start setting in the Pinball Game mode blueprint. Open it and click on Class Defaults at the top of the window in the toolbar. Then in the details panel under Game Mode you will find it.

Some screenshots or a video would help me more to understand what you mean by “developer ball”

When you press play get mouse control with Shift+F1 and click on Eject, then select that sphere. Check in the World Outliner what is it. it probably is the Default Pawn. And it spawns there because it’s set to spawn at the camera location. You should create your own character, with no movement input and with no visual representation.

You don’t have delayed start option in your game mode because the parent class of it is Game Mode Base. To have this option you can re-parent your current game mode to Game Mode but I am not sure if it would make a difference,

Okay first thing i don’t how to check if the game mode has delayed starting or start as spectator, would appreciate it if you tell me.
Second thing i don’t have a character blueprint so when i check if its valid it prints “no” but i do have a player controller blueprint and i tried to make the main menu widget in the event begin play there and it finally worked.
but still i don’t know why this happens, i mean i understand what your saying that it’s created before the character is spawned, but in my case i guess its before the player controller is made?

also while were at it, when i start the game and start using CTRL and Space to play i can still see the developer ball( I don’t know what it’s called) that you use when navigating through the map when your not playing, also i can control it with CTRL and Space to make it ascend or descend and move it with AWSD, why does that happen?

okay but this is after i made the main menu work from the player controller.
also the default game mode and spectator was made in the project settings not in the level world settings, i don’t know if it makes any difference since i only have one level. and i still didn’t find the delay start setting.
Here is the video:

open subtitles

Right that solved the problem.
Thanks a lot for all of your help.

Hey Did you get the anwer???..I am facing the same problem and i am stuck at it for a long time