Godot Version
4.4
Question
I’m currently reworking my level save system so it is more streamlined and works better with my game. It all save always on a level_save.tres and in that it stores all the info I need, there’s only one issue I’m stuck as to how to get the player level information. For my scene manager I need the Level the player is on and the door tag to spawn the player next to it. That info is in the level_save.tres, but after reading the docs for a while I have not figured out how to get that info off the file.
This is the current save file: (I need that level_id and scene_file_path. )
da[gd_resource type="Resource" script_class="LevelSaveData" load_steps=2 format=3]
[ext_resource type="Script" path="res://Scripts/Level_save_data.gd" id="1_ce52g"]
[resource]
script = ExtResource("1_ce52g")
data = {
NodePath("CharacterBody2D/SaverNode"): {
"health_for_save": 2,
"inventory_for_save": {
"Key1": "22",
"Key2": "33",
"Officekey": "42",
"TempKey1": null
},
"xeno_for_save": {
"Xeno-coin 1": true,
"Xeno-coin2": true
}
},
NodePath("SaverNode"): {
"level_id": 5,
"scene_file_path": "res://Levels/level_4.tscn"
}
}