> Using local storage is the easiest way and should work something like this:
>
> local storage set Item key = "PlayerCoins" value = (the name of your GlobalVariable)
>
> on start of layout - local storage get Item "Playercoins"
>
> on item get "Playercoins" - set GlobalVariable = int(localstorage.itemvalue)
>
I got this working but still not getting two points .....
As why are we using key to store the same value as in global variable & what is itemvalue used for ?
You must imagine the LocalStorage as a Table. The key is the ID and the value is the value of your saved variable.
LocalStorage
So you can save each variable individually or you can save all variables in an array and then the array via asJSON into the localstorage.
In order to load the saved item at a certain key you need to run 'Check item exists (your key)' -> If key exists -> Get Item (your key). Then the value of the fetched key can be set to the variable by 'LocalStorage.ItemValue'.