How to store object value?

So, i managed to store the value of “Xp” and it loads as it should… BUT… When i get back to the game (pressing “load” button") it doesnt register new value when xp should be added. Any ideas?

When you write the XP values, I believe to need to use a for each object

Still not working :frowning:

Are you changing the value of load? It looks like it’s reloading the value on every frame. If it is then it always reloads the value before you can save the new values.

Here’s something I made as a test. 4 buttons and 4 progress bars. The stagger button is just a way to set values which can be saved and reloaded. Each function is on a button. I added an or so it would load on start with the same events.

Try me:

Im using the “health” extansion and when an object is healed it adds 1 point to the xp bar…


Just noticed that it doesnt matter if i click “save”… When i change to the scene with the “load” button and click it, it loads the values of “coins” and “xp” as they were before switching scenes…