save data of global script

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Themaker482
:warning: Old Version Published before Godot 3 was released.

Hi, I have a doubt, I want a way to save the variables in a global script because when I close the apk this values are being restarted the vairables include:
-last character used
-level progress

  • items collected
    anyone knows how to do this?
:bust_in_silhouette: Reply From: volzhs

It’s because those values are on memory while running.
When close app, it’s gone.

You need to save it to file and load it back when start app.
see this tutorial.