Thank you! I used it in the game scene, so it can be restarted by pressing R. I wanted to make The player death to trigger it too, but I had some problems connecting The death inside player no de to trigger The reload on The game node. Can I somehow use get_tree().reload_current_scene() inside The player node to restart The game or this is gonna Just reload The player scene?
Comments
Log in with itch.io to leave a comment.
We have combat! Try putting some input to reset the game. the command:
get_tree().reload_current_scene()
will reset it.
Thank you! I used it in the game scene, so it can be restarted by pressing R. I wanted to make The player death to trigger it too, but I had some problems connecting The death inside player no de to trigger The reload on The game node. Can I somehow use get_tree().reload_current_scene() inside The player node to restart The game or this is gonna Just reload The player scene?
Just call it! If the player is inside the scene that is currently playing, he is basically just a node. So reloading the scene will reload everything