Hello I have a weird problem. I my case I have the main game and a defeat scene.
My problem is that when I click in the button that reloads the scene:
func _on_again_pressed():
Global.dinero = 0
Global.spawned = 0
Global.dead = 0
if get_tree():
Global.paused = false
get_tree().paused = false
emit_signal("reload")
it emits a signal (I did it that way bc I already test get_tree().reload_current_scene()
) that the main game receives in ready:
lose_scene.connect("reload", reloadGame)
so when it receives the signal "reloadGame" is executed:
func reloadGame():
print("Reload")
get_tree().reload_current_scene()
it prints "Reload" so it works but all the entities still there so I assume it didnt reaload
If you need more code or dont understand something, tell me know
Edit:
I thought in a "dirty" way that is replace the scene with a loading screen and when it "finish" to load, replace it with the game again