"get_tree().reload_current_scene()" never gets executed

  • What about hiding the player immediately, and deferring the queue_free() until after the "await"?

Then the problem is that the node needs to exist for a while in order for that code to work. Try moving the queue_free() after the "await".

    DaveTheCoder
    Yes, I understand, but this is to reload the scene after the player is destroyed. putting queue_free() after await no longer makes sense

    What about hiding the player immediately, and deferring the queue_free() until after the "await"?

      a year later

      @icomputo Is this from Heartbeast's 1-Bit Godot course? looks just like it and just so happens to be the exact thing I was working on when I encountered the issue. 🙂

      Thanks for the suggested solution @DaveTheCoder . Once I realized that's what was happening, I created a workaround by moving the 'await timer' and 'reload scene' code into a function in the level's script, then simply called that function using get_parent(). Works like a charm now.