Player won't move after re-opening level

Hi,

My app opens with a main menu, there you can start the game.
Everything runs smoothly, I use the “Open Level” node.

But when i go back to the main menu, and the load the level again, the player won’t move.

Any ideas what the issue could be?

Thanks!

Can you screenshot graphs where you spawn/possess player, open level and etc? Its hard to spot a bug when there is nothing to look at.

how do you possess the controlled character, do you do that from PlayerStart or some other manual way?

Try this: call “set input mode game only” in your Huset level blueprint Event Begin Play and call “set input mode UI only” in MainMenu’s level blueprint Event Begin Play. I have had problems before where some nodes would not execute after Open Level node, mostly because Open Level would cause objects that these nodes where called from to disappear. The fact that you character is not moving may be due to the fact that Input mode does not get called.

1 Like

None of these should influence player control. The reason we should be after is why it works the first time but doesn’t work the second time after you go back to menu. Is there anything you might be doing in BeginPlay of levels, Game Instance or PlayerController that decides what you are possessing or unpossessing. For example if you are saving number of lives or HP in game instance and you set it to 0 the first time you play it might break something the next time you try to open the level because you didnt reset number of lives or hp. Any logic like that?

Try this: call “set input mode game only” in your Huset level blueprint Event Begin Play and call “set input mode UI only” in MainMenu’s level blueprint Event Begin Play. I have had problems before where some nodes would not execute after Open Level node, mostly because Open Level would cause objects that these nodes where called from to disappear. The fact that you character is not moving may be due to the fact that Input mode does not get called.

3 Likes

moved my comment to answer, please accept if it helped, thanks

Of course! Sorry about that.

Loading my level on buttonpress from my main menu widget:

Loading my menu-level on buttonpress from my pause menu widget

the second image is how i get back to the main menu. Yes i use player start, and set the HUD class and default pawn class in world setting for each level.

Unfortunately it didn’t work - neither did “Set Input Mode Game And UI”.

Could i be that I have these commands in my levels blueprint? I guess it gets loaded each time i open the level:

It DID work! I misunderstood you, I had to put “set input”-node before i open the level…

Thank you for help. It is greatly appreciated!

This works !! Thank you !

Hi Guys

I am having the same issue, but with no luck… Still can’t move in game play.
See my node graph below. Cant anyone see an issue with this? I notice my set node is different to the ones above. as it doesn’t have a target input for the get player controller. Does anyone know how to make this?

Cheers

Ben