I’m having the same issue as this thread https://answers.unrealengine.com/questions/214804/restart-level-but-not-reset-a-variable.html but I’ve been unable to solve it. After reading the comments I moved the variable into a custom Game State. Essentially, to test this, what I’m doing is a quick sequence.
- On begin Play, casting to the game state, then running through a Branch comparing an INT that’s defaulted to zero, and then printing a string if it’s zero.
- I’m adding 1 to the INT.
On Exec Command: RestartLevel - the printed string will trigger every time. It won’t go up to 2, 3, or 4 - it’ll just print the string and add 1 to the Int, then default back to 0 to do it all again.
Essentially, I want to be able to dive back into the gameplay without playing my starting UMG sequence again, but… i’m probably going to want to keep track of variables for the long haul - like total times played, etc. Am I going about this the wrong way?
Some threads said there was a bug that was addressed in 4.8, but this seems more like a logic mistake than some sort of bug. I’ve also tried moving the variable into the Game Mode and still not luck.