How to save/load Objects with Unique Values

  • WhiskyTest
  • WhiskyTest's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
2 months 1 week ago #8134 by WhiskyTest
What I am trying to do is: save a players objects with different values than the default, and have them load in with those new values at their next login.

The scenario is I'm making ranged weapons which store the amount of ammunition they are loaded with. Eg: a gun with a clip of 9 bullets.

Saving the values is working fine.
Loading the values *seems* to be working when it loads the objects from the file..
However upon entering the game, the values have been reset to either 0 or the default value of the object. (As I write this I realize that would be worth confirming)

Can anyone help point me in the right direction for loading objects with values that have changed in game?..

Please Log in or Create an account to join the conversation.

  • WhiskyTest
  • WhiskyTest's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
2 months 5 days ago #8142 by WhiskyTest
Replied by WhiskyTest on topic How to save/load Objects with Unique Values
I was loading the data from disk to the wrong object!...
All working as intended :)
The following user(s) said Thank You: thomas

Please Log in or Create an account to join the conversation.

Time to create page: 1.095 seconds