No problem, happy to help!
To answer the question regarding syncing:
If the buttons between scenes both use the clickable script, then as long as they have the exact same _save_data_instance_category
and _save_data_instance_id
set in the Godot editor, they should save/load the synced values between scenes.
You can also access the dictionary containing the values directly by access game_instance_save_data
, and then passing in the instance category and ID you want to use. For example, for if you want to access the number of clicks in box 1, and you know the category is Boxes
and the ID is 1
, then you could use code like this (untested):
# make sure it exists in the dictionary
if (number.game_instance_save_data.has("Boxes")):
if (number.game_instance_save_data["Boxes"].has("1")):
var box_one_clicks = number.game_instance_save_data["Boxes"]["1"]["click_num"]
print (box_one_clicks)
Hopefully this helps explain. I'll keep an eye out for a explanation/tutorial on how to use singletons to share data across scenes in Godot, as it can be confusing.
Slight aside:
You should be able to use the same data across scenes without needing another autoload script, as long as you know roughly what data you are looking for. You can use multiple autoload scripts if you want, but it might be a tad more difficult to sync the values.