How do I restart level on player death?

Ok so I have asked this before. But was directed to a link that had a killz. Killz is great. But like in UDK you had a death node that when player dies it resets level. I need game to realize when player dies to reset level. Yes I do understand with an open. But am not sure what to create and attach it to Open

Any ideas?

This is an amazing question and I have exact same question as you. I have no idea why no one has answered this yet.

Hey Panzer,

There is a node called Event Destroyed. When Blueprint this node belongs to is destroyed, whether by a KillZ volume or any other method, linked nodes fire. You can attach your Open Level node to that, like so:

10358-eventdestroyed.jpg

Hope that helps!

That does make sense now. But what if player isn’t in same map all time. So setting up an open level like that wouldn’t that just load up same level? Basically if I have it set to Prison 1 and am in prison 3 it would load up prison 1 is that correct? If so how do we get it to present itself in present level.

Do you get that? It works but only for one level doesn’t matter if your in level 15 if that is loaded for level 4

You will have to switch level anyway. So you can store new levelname in a variable and use it like that.

Each time you switch level you can simply set new name like that and use same function.

If you don’t specify a level, it will default to current level. Otherwise, you can pass it a specific level name and it will load new level.

can you give an example here? Sorry I just want to make sure I understand this. So I just add Destroy to an open level and leave open level blank? Is that correct?

Is this set up correct? I believe it is. My next question is you said and correct me if I am wrong it remembers where you are. So with this set up if I die does that mean it restarts level? If so am not sure how to do at this point. I created this blueprint as an actor I hope that is correct. What do I do from this point?

Thanks

Also I have dropped that blueprint in a level however it takes me back to main menu and keeps going back to main menu,

Missed you put Variable levels and you have to have worlds created

You just have to put names of levels

10425-levelname.png

andd need a save game variable levels and when you die and start in world where quedastes

names of maps in array?

you’d have to explain how it is that you want pass level if opening a door or what?

and need to do what you explain at all levels

if you die in level you need to do to have value to levels that level also making a save game after you die

Ok awesome. Now though when I start level in editor it just keeps resetting level. meaning I cannot play in level right now because it keeps resetting. What am I missing? Also really appreciate this!

How would I go about and add that? Sorry am a Noob when it comes to blueprints.

when you die before I die put this

I’m sorry, I was not correct about that. If you leave field blank in Open Level node, it will open game’s default level. You will need to pass it a level name.

I believe general method described by rjvm below will work, but I think it can be done simpler.

In your character Blueprint, create a new Name variable. Attach it to your Open Level node.

10530-eventdestroyedopenlevel_character.jpg

In your Level Blueprint for each level, place an Event Begin Play node in EventGraph. Right click and type Get Player Character. Drag off Return Value and type Cast To, then select your character Blueprint. Attach Event Begin Play node to Cast To node. Drag off As [character Blueprint] and search for name of Name variable you created earlier. Type in name of level.

Do this in Level Blueprint for each level, and make sure to type in exact name of level. Now when a level is loaded, it will pass name of level to your character, and if character dies while in that level, it will reload correct level.

Hope that helps!