Godot Version
4.2.2
Question
Hello, I am trying to make a Godot FPS game with a save and load system akin to what you would find in most shooters. E.X: Doom and Quake.
I am using resources and I am trying to create a system that will load the scene the player saved on. Note: I am already saving the player attributes, enemies, etc separately. I am not interested in saving the state of the scene, just which file it is.
I wanted to use the filename to add in this functionality, but this has not worked:
saveData.level = get_tree().current_scene().filename
Results in: āInvalid get index āfilenameā (on base: āNode3D (level.gd)ā).ā
Butā¦
saveData.level = get_tree().current_scene()
Results in: āInvalid get index āfilenameā (on base: āNode3D (level.gd)ā).ā
Does anyone know how I can properly save a reference to which scene is currently being run?
Thank you in advance!