I have not used encrypted files in Godot myself, but looking at the API, loading the file should be almost exactly the same as saving, just with File.READ
instead of File.WRITE
and get_var
instead of store_var
. For example:
save_file.open_encrypted_with_pass(SAVE_LOC, File.READ, "password")
var loaded_variable = save_file.get_var()
save_file.close()
print ("Variable loaded from file:")
print (loaded_variable)
print ("\n")
Hopefully this helps!
(Side note: Welcome to the forums!)