Hello. Perhaps I'm going about this all wrong, but before I continue experimenting, I figured I'd see if someone else had a better approach to doing this. I have collectible items in my game. When you collect them, the FSM adds one to a variable "Collectibles" and sets the UI text to that variable. I have quick save set to save the text of the UI score. Upon load, ALMOST always (but not always!), the number is one greater than before. Eg, you re-load with 6 collectibles and it loads to 7. You can keep doing this over and over and it'll go 8, 9, 10, etc. However, there have been some instances in the past where the number has not increased, so it's hard to tell.
Anyway, if anyone has had this happen before (or if I'm just going about it like an idiot) then I'd love to hear your advice! Thanks.
Issue with successfully saving and reloading a "score".
Re: Issue with successfully saving and reloading a "score".
Hi there,
This would indicate that there is somewhere else in your logic incrementing the number alongside it being loaded.
Please could you replicate this in a new project with a very simple scene which isolates it to Easy Save and private message it to me with instructions.
All the best,
Joel
This would indicate that there is somewhere else in your logic incrementing the number alongside it being loaded.
Please could you replicate this in a new project with a very simple scene which isolates it to Easy Save and private message it to me with instructions.
All the best,
Joel
Re: Issue with successfully saving and reloading a "score".
Hello Joel,
Okay, good to know. I will try to replicate the problem in a different project if need be, but if you're confirming that I am doing it correctly and that it is a problem with my logic elsewhere then I am going to start by looking there! I'll see if I can search through everything and see what the problem is. I'll update if I find anything. Thanks for the reply!
Okay, good to know. I will try to replicate the problem in a different project if need be, but if you're confirming that I am doing it correctly and that it is a problem with my logic elsewhere then I am going to start by looking there! I'll see if I can search through everything and see what the problem is. I'll update if I find anything. Thanks for the reply!
Re: Issue with successfully saving and reloading a "score".
Lo and behold, not 30 minutes after I posted the previous message, I figured out the problem. Sorry to waste your time!
For those interested, it's totally my error and kind of embarrassing, but it makes sense now.
I have certain "checkpoints" in my game that it auto-saves at. Also, the collectibles, upon collision, go through a cute little particle-animation before they are deactivated. This leaves a period of about 4 seconds between initially touching the collectible and the collectible object itself eventually becoming deactivated at the end of it's FSM (after playing the animation, etc).
What was happening was I was hitting a collectible (adding to the score), and hitting the auto-save checkpoint within that 4 second buffer period, before the collectible object became "inactive". So, upon reloading, that one collectible in particular was in a limbo-state of having the deactivation FSM in progress, but still active, and would reload as active - thus instantly adding to the score and becoming inactive seconds later.
That felt like a ramble, but I hope it made sense. It's an easy fix as I'll just move that one collectible item further from the save checkpoint. That's the easiest solution.
For those interested, it's totally my error and kind of embarrassing, but it makes sense now.
I have certain "checkpoints" in my game that it auto-saves at. Also, the collectibles, upon collision, go through a cute little particle-animation before they are deactivated. This leaves a period of about 4 seconds between initially touching the collectible and the collectible object itself eventually becoming deactivated at the end of it's FSM (after playing the animation, etc).
What was happening was I was hitting a collectible (adding to the score), and hitting the auto-save checkpoint within that 4 second buffer period, before the collectible object became "inactive". So, upon reloading, that one collectible in particular was in a limbo-state of having the deactivation FSM in progress, but still active, and would reload as active - thus instantly adding to the score and becoming inactive seconds later.
That felt like a ramble, but I hope it made sense. It's an easy fix as I'll just move that one collectible item further from the save checkpoint. That's the easiest solution.
Re: Issue with successfully saving and reloading a "score".
Glad you managed to resolve your issue
All the best,
Joel
All the best,
Joel