Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Quackki |
I’m trying to make a load screen that in a nutshell has a 5-second cooldown, at the end of the cooldown changes the scene.
# Remove the current level
var level = get_node("res://game.tscn")
root.remove_child(level)
root.level.call_deferred("free")
# Add the next level
var next_level_resource = load("res://game.tscn")
var next_level = next_level_resource.instance()
root.add_child(next_level)
This got me on another post, but it doesn’t work, tells:
“The identifier “root” isn’t declared in the current scope.”
I don’t know if it matters that I’m making 2D game.
PS: are the first days I use Godot