Every time I quit the preview and start another one, the values don’t change.
I used the debugger to check variables but they don’t load and I’m not sure if they save either.
Any help would be appreciated greatly.
Do some checks, first check the variables you’re saving are the same type if they are number must be saved/loaded as numbers and if they are strings the same process.
The load storage added in your game that way is not correct because is calling Load storage “inventory” in memory every frame, try moving it to add a trigger once and every time you need to load the storage do it with Read instead.
Tip: What I do for save/load is to create a separated Events called Storage so then manage all related data.
Something like this
Other thing I notice is you read the data from a scene variable and pass to an object variable I don’t know way, there will be more than one instance of player?
If the answer is not, then way that conversion just use the scene variables to store the values.
Using the inventory extension, I cannot load a certain amount, say 10 stone from a previous save into the inventory. I can only add one item at a time.
So my player had 6 stone from the previous save, but when I want to load that into the inventory it only asks for inventory name and Item name, and not the amount of that item.
So I guess that it wont work using the inventory extension
I read from storage “inventory” and store value in Stone.
Then I add a repeat and repeat it Variable(Stone) amount of times and inside of it I have “add “Stone” to inventory"items”"
So basically Im adding the amount of stone, 1 at a time, to the amount of stone that was saved.
Sure one at a time but in case you need more just do
Repeat x times and inside the repeat event
Add to inventory item “name”
Where x is the number of items you collect or buy
Look deeply the inventory system of the official example
So my player had 6 stone from the previous save, but when I want to load that into the inventory it only asks for inventory name and Item name, and not the amount of that item.
So I guess that it wont work using the inventory extension
Let me an hour and I’ll prepare a tutorial of this, using Object variables and Storage.