extends Node var isUsingTouch = false var hasChosenNotToMakeChoices = false var hasChosenToMakeChoices = false var hasCompletedBobDialogue = false var playerIsDeaf = false var current_scene = "outside" var player_positions = Vector2(-171, -253) func save(): var ret = {} var thisScript: GDScript = get_script() for propertyInfo in thisScript.get_script_property_list(): var propertyName: String = propertyInfo.name var propertyValue = get(propertyName) ret[propertyName] = JSON.stringify(propertyValue) return ret func load_save(data:Dictionary): isUsingTouch = data.isUsingTouch == "true" hasChosenNotToMakeChoices = data.hasChosenNotToMakeChoices == "true" hasChosenToMakeChoices = data.hasChosenToMakeChoices == "true" hasCompletedBobDialogue = data.hasCompletedBobDialogue == "true" playerIsDeaf = data.playerIsDeaf == "true" current_scene = data.current_scene var strplps = (data.player_positions as String).replace("\"(", "").replace(")\"", "") var parts = strplps.split(", ") player_positions = Vector2(float(parts[0]), float(parts[1])) print(player_positions)