How do I reset current level?

Hey there! I am currently making a game where i have many small levels and the win condition is based around having a set of things at the very end. If you missed any of these things you cannot complete the map and have to restart and try again.

How can I make a restart level button in blueprint? I already have the content example for a menu implemented with a game pause, a resume button, exit button and chapters button. I would like the restart level to be on the same page

Hello,

You could use an Open Level node and re-open the map, should load everything back to default.

-W

1 Like

What we really need is a Get Level node and a Get Current Level node. We have a Get Streaming Level…

That is true, though that would require me to make a reload map blueprint for every map that loads it’s own map. This is why I want a blueprint that reloads the Current level. Can this be done?

Just saw this on the forums:
https://forums.unrealengine.com/attachment.php?attachmentid=4768&d=1402244274

I will attempt this and get back to the topic within a few hours.

Ok so this did not work out. In fact the game crash every time. But your suggestion earlier, elaborate on that? Get current level and Load Current level should not be that hard to set up by one keypress?

EDIT: I saw the Swing Ninja Template has a Next level and a Retry level button that worked but I don’t understand how it’s set up.

I searched this in case there was an actual node to restart the level. In case anyone is wondering, you just have to connect a “Get Current LevelName” to “Open Level” and it will always restart the current map.

1 Like

This blog has screenshots and also how to do it in C++

http://www.unrealidiot.com/how-to-reload-current-level-in-unreal-engine-4/

I recommend you do your “reload level” in your game mode blueprint since that’s where your winning conditions should be. Unless each level has different conditions then you should put it under each level blueprint.

You can also use an ‘Execute Console Command’.
The command: RestartLevel

1 Like