• 2D
  • Trying to reset level

Hey, so I'm trying to set up my game so that after the player dies you hit a button to go back to the main menu and then hit start to try again. I've got it working for the most part, The problem is that when ever I hit start for the second time all of my enemy's still act as though I'm dead. I've tried using get_tree().reload_current_scene() and I cant get that to work. Is that the right line to use or should I be trying something else?

Thanks!

Do you have any singletons or something that could have persistent data? Also, something you could try is using get_tree().change_scene(“res://path_to_current_scene_here”) and see if that works.

Are singletons the same as a global script? I do have a global script.

Fixed! I actually just set it so that when ever I hit the start button it resets the global var PlayerAlive back to ture.