And I sincerely didn't understand a word of the last phrases of the load_func in the documentation. Could anyone explain how do I make these codes fits when I have to save just numbers and values?
# Load the file line by line and process that dictionary to restore
# the object it represents.
save_game.open("user://savegame.save", File.READ)
while save_game.get_position() < save_game.get_len():
# Get the saved dictionary from the next line in the save file
var node_data = parse_json(save_game.get_line())
# Firstly, we need to create the object and add it to the tree and set its position.
var new_object = load(node_data["filename"]).instance()
get_node(node_data["parent"]).add_child(new_object)
new_object.position = Vector2(node_data["pos_x"], node_data["pos_y"])
# Now we set the remaining variables.
for i in node_data.keys():
if i == "filename" or i == "parent" or i == "pos_x" or i == "pos_y":
continue
new_object.set(i, node_data[i])