Any way to reset the streamed level to it's initial state?
So i have a persistent level which only acts as a main menu, and the game it self is on a different sub level.
Now when i load the sub-level with "Open level" node everything works as expected, but the problem is that this node makes the opened level as the new persistent and i lose my video cache (which is loaded in the persistent level to show video ads later on).
If i use the node called "Load stream level" everything works fine for the first run. the problem occurs when trying to reset the game after the player dies. (the reset game simply calls "Open level" or "Load stream level" again)
The streamed level is loaded at the state where the player died and the game doesn't reset.
is there anyway of resetting the streamed level to it's initial state each time it's called?
asked Sep 16 '17 at 01:56 PM in Blueprint Scripting
Streamed level will always return to initial state when reloaded.
In my project I use similar setup. I have one persistent level which loading on startup, and contains only main player start, checkpoint actors, and few very specific triggers for tutorial events. Also all other levels are streaming and added to this one.
In my checkpoint actors I have player location, and array of streaming levels names, that must be loaded with this checkpoint.
So, if player quit game, and enter again, it loading levels associated with last saved checkpoint and teleports player to checkpoint location.
If player dies, game gets last saved checkpoint data, read associated levels names, unload them, and load again, to make them in initial state, and teleports respawned player to checkpoint location.
answered Sep 16 '17 at 06:01 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here