Download

Level restart only works once after player death

Hi - I’m trying to restart the game if the player falls off the level.
The attached blueprint works…but only works once…if you die twice it doesn’t re-start.
Any ideas ?!

Ehm, why don’t you put the GetCurrentLevelName node between OnDestroyed and OpenLevel?
The thing you do should probably be saved in a variable.

Thanks for the feedback

Did that even help? xD

Sorry I was away from my desktop earlier - just tried it and no it doesn’t work unfortunately!

So, when the player falls down, you destroy the Actor. Then the “OnDestroyed” is called and it should restart the level, right?

Could you place a “PrintString” node directly behind the OnDestroyed, to check if it is even called correctly on the second attempt?

You might want to think about a solution where you just check the Overlap in your Zone that destroy the character and restart the
game from there. In the end, it would be the same result. Just an idea, if we can’t solve this very problem.

Hi - to save time I triggered destroy by the number 4 on the keyboard.
It destroys the actor once and then refreshes the screen for a split second and restarts the level.
I added in a print string which works the first time I press 4 but not after the level restarts…after the level restarts and I press 4 nothing happens at all.
Could it be that the level blueprint is wiped after “open level” ?

Hm, no. If it is the same level you load, then not. Can you actually control your character after respawning?