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

  • xyz replied to this.

    Sorry for the delay, I guess you already solved it, but in case of any problem, to delete the current scene, use the following command
    get_tree().current_scene.queue_free()
    NOTE: I DON'T KNOW ENGLISH AND I AM USING A TRANSLATOR (FOR SOME SPELLING MISTAKES)

    I am having the same issue, I have searched for an answer to this issue but found nothing till now