Restart level but not reset a variable?
So I have a little script that when the player dies the world resets, and spawns the player at a certain location.
I have a checkpoint system which sets this certain location, but when the level restarts it set back to zero.
How do I reset a level but without setting the variable?
asked Apr 20 '15 at 03:58 PM in Blueprint Scripting
You have to store it somewhere else. Game state object? Game mode object? Savegame file? Depends on your specific needs.
answered Apr 20 '15 at 04:56 PM
Put the variables under Game Instance then on your blueprints, cast to Game Instance to update them. Game Instance is the only one that persists through level changes etc, until the game closes, so at some point if the information is important, save it in a save game using the method documented in the wiki.
answered Jul 22 '15 at 05:37 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here