I have a save system in place currently. And I’ve got a Boolean that checks if I’m saving from a checkpoint (saves player transform, etc.) or if I’m not saving from a checkpoint. In my level transition I check “Check point used” to false, so that it don’t save my transform and I’m able to load at the player start for the level instead. the problem I’m having, is it only seems to carry my inventory to the next level. if I set the “check point used” bool to true. I have no idea why I can’t save my inventory if the bool is set to false. The bool is not anywhere inside the inventory, or the saving. Other than two functions. Ill attach pictures. Find references and using the binoculars icon confirms there is no stray “Checkpoint used” Boolean that could be causing this. I have no idea why it only saves if i use a checkpoint, BUT if the checkpoint is not used, my XP and health and everything will all still travel over, just not my inventory?? I can supply any more information, screenshots as I can. Like I said the checkpoint saving works as intended, it saves everything as it should. It’s only when I set the “checkpoint used” bool to false, that the inventory stops saving. Again, even though the bool is nowhere connected to it?? I’m so confused xD
You are leaving out some missing information here. Can you show where the Checkpoint bool is used and how it changes between what happens in true / false.
You show in your post how it is saved and how the player spawns but you aren’t using your Checkpoint bool in any of your code logically you are only setting it.
Hey yeah sorry! So for example (I hope this is what your asking?) I have a pause menu, I can save/load my game. Which uses the checkpoint bool.
If i set this checkpoint bool to false, The items will save. But they just won’t load.
When i hit load, This prints to false…
Is something wrong this this code circled??
Appreciate you even taking the time to respond.
I don’t use the “Checkpoint used” bool anywhere, besides when i save/load. And i check if its true/false here, to save player location/transform
So thats why I need to be able to transition levels without setting the checkpoint bool to true, That way i can also start on the player start, and wont try to spawn on the next map with the last maps saved player location…
I just cant understand why the bool being set to false, prevents the inventory save data from loading. I literally dont use that bool anywhere other than these locations, even find refrences confirms its only used to check if my player location should be saved
Add some breakpoints to it to see what its telling you when it running like shown here:
The result should show you what is being compared it could be something as simple as a typo or it could be something isn’t getting loaded the best way to find out is to use breakpoints and analyze it while it is running
Idk how to use that though or what to do with the breakpoint? When i try to play with it there it crashes
It wont let me add a breakpoint on to that node you highlighted though, there is no option
Thats not it crashing that is it breaking the flow so you can review it. When you see that use your mouse and hover over the nodes and its should give you the results of that the node is supposed to do. So you should be able to hover over the comparison node connected to that branch and see what is actually being compared.
how did you get it to show that big red arrow on the previous screenshot. If you can get it to that point you should be able to over when the breakpoint is active
So i add the breakpoint to that branch, and I hit play, I then pick up an item, save my inventory through my pause menu, and then hit load game (After I save) as soon as i hit load game, It pops up and shows me that red arrow over the breakpoint, and then my engine crashes.
I have to be missing something that has to do with this part, right? Becuase if i set the checkpoint bool to true, and save my player location. It will load my inventory upon saving/loading. But if i dont save my player location, it will not load the inventory…
So did i do something wrong here i wonder? That its only allowing be to load the inventory if player location is saved?
When i completely unplug that branch it loads the inventory even without the checkpoint… hmmm
I still am not seeing where you are using the Checkpoint bool to determine what to do next.
everything you have shown seems to be in order.
where is your branch that is associated with the Checkpoint bool?
That’s why im confused, because I don’t use the checkpoint bool to determine anything related to saving/loading. Besides the player transform. so it dont make sense that turning the bool on/off stops the saving. I’m pretty sure it has to do with the way i set up the tag check in the picture above. Because if i change it to just “Component owner” and has tag, and change it to player. it works
Where is SetTransformandCamera used?
and what comes at the end of that function?
From what I can tell if it is false then that function ends. and if something after that is getting called that does the inventory portion or affects the inventory portion then it would never get ran and therefore would be getting saved to the save file
can you post your BP in here and share the link to it?
yeah everything looks fine in those you might need to dig through your Tag stuff a little more and see if you can find what might be causing the issue there because everything I can see from this side looks fine
Alright yeah I’ll do that, it has to be something with my tags T_T Thanks bud i really appreciate you taking the time to reply to me and help me out
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.