As I mentioned below:
but still it is not working i don’t know what to do
Its probably working, can you open with the debugger and check the global variables?
This works for me.
You might need to delete the storage. It could have invalid data stored in it from the previous code.
Try this at the very beginning and then remove or disable it.
Storage can be tricky. Once you save it, it will override any of the variables default values the next time you load it. If you later add to the structure in the setup scene, you’ll have to delete the storage or update the variable after it’s loaded from storage or it will ignore the change and just keep loading and saving the old value.
Still not working i tried that too
i even checked the debugger and it shows the global variable having the values but doesn’t shows in the next scene
Can you take a screenshot of how are you trying to access the childs of the structure? It should be this format: StructureName.ChildName OR StructureName[“ChildName”]
you mean in debugger?
No, a screenshot of the expressions that you use to try to access the childs in the next scene. Maybe you are doing it the wrong way causing it to acess a unexistent variable.
Can you explain how do you know that the variable is not being loaded?
before adding
so i added the values and even after changing scenes it is still showing same
What do you mean by this? It is a global variable, of course even after changing scenes its value will be kept.
so then i am not able to load it i mean that is what i think
[Edited as per request [Solved] Can someone edit my post cause i cant]
[2nd edit as per request [SOLVED] Please update my post]
[3rd edit - improved solution can be found in Save / Load your game (Quick + In Depth Tutorial works on all devices including browsers)]
This is old but gold
Saving
Loading
And here how to check at beginning of the scene if save exist
And give some values to some variables if it does not and perform a save
And if it does just load it
Be advised
If you have event above this load event where you play sound at beginning of the scene
Then you will hear sound for one frame at beginning of the game
Solution is to either move play sound event below this load event
Or play your audio with inverted at beginning of the scene and trigger once like here
Save/Load with old variable system
This is old but gold
Saving
image11031134×62 473 6.7 18 KB
Loading
i am using the same method but what i am facing is weird
so the data is getting saved but not showing the text when i am using external events but when i am using a text modifier in that scene it is showing
so the loading part is not working properly
If so then you should make new topic with title “External events problem”
Since it is not save/load related cause save/load works as you mentioned
And i can’t see any screenshot of how you are loading external events here
Like i said new topic
I never used external events
IDK exactly how they work i just have some knowledge
Any1 here to even try to help you with external events would need to see how looks events for what is not working
So anyway bottom line does your problem narrow down to the fact that saving/loading works but do not print to text object or what? Cuase i still don’t get it?
I am still trying to figure it out by the way do you know if you can copy layers from one scene to another