Extends Node2D
var indices = {"brock": 0, "jayson": 0, "steven": 0, "jodi": 0, "gabe":0, "town": 0, "jaysondoor": 0, "world": 0, "position": global_position}
func increment_index(idx):
indices[idx] += 1
func _ready():
pass
func do_save():
var file: File = File.new()
file.open("user://saved_game", File.WRITE)
file.store_var(indices)
file.close()
func do_load():
var file : File = File.new()
if file.file_exists("user://saved_game"):
file.open("user://saved_game", File.READ)
indices = file.get_var()
file.close()
func _input(event):
if event.is_action_pressed("save_key"):
do_save()
Doesn't seem to be saving...