Hey everyone. I followed this tutorial here and made a checkpoint system. I wanted to have it track the map so that it could load the correct map you were last on when continue is pressed. I then added a CurrentCheckpoint variable and made each checkpoint have a name so that when reloading the game from continue it would set the correct tasks, visibilities, etc. based on the checkpoint name.
The issue that I’m facing you’ll see in the last 15 seconds of the attached clip. I’m printing the CurrentCheckpoint every tick, and when loading in there are 2 ticks where the checkpoint is set to None instead of C1 or C2.
This is a significant problem as you can see at 0:32. I’m getting the CurrentCheckpoint from the GameInstance and switching on it. Since the first tick has the checkpoint set to None, both texts are hidden. If anyone could shine some light on what I’m doing wrong that would be so appreciated!
I’ve heard that Async loading could possibly remedy this, but I have no clue how to implement it. To me, what seems like is happening is that the CurrentCheckpoint isn’t carrying into the save, and when it loads it teleports me to where I hit the checkpoint (inside the collider) with CurrentCheckpoint as None, then sets the checkpoint once it detects the collision. I have no clue why it wouldn’t keep the checkpoint name though.
It seems like it’s doing this with both the CurrentCheckpoint and the LevelName. When I print the level name I get None for the first two ticks as well. So frustrating!
yes they are two separate issues. was just noting it.
so you still cant Set the player transform right after loadlevel (its probably working now because you’re in editor and its already loaded)
that function executes instantly but the level wont be loaded and we dont know when it will be loaded (there are callback but you get the idea)
the playerpawn should load itself on beginplay so we know it exists. then get GI->checkforsavegame->load
the tick is kind of irrelevant, its just telling you the checkpoint isnt set yet, why we dont know exactly (its an order of operations thing) but if you load on pawnbegin play it should be ready, if not we can work through that then