+1 vote

I'm struggling with reloadcurrentscene() function. I use it when my player collide with a bullet from my enemy to restart the level at the beginning. However when I test the game the scene did not restart, it freezes at a random position and I can no longer control anything, as my player disappeard. How can I fix this problem?
Note: I created seperate scenes such as player scene and enemy scene and then drag them to my level scene during the desigining level step

in Engine by (13 points)

I doubt anyone will be able to help you from that description alone. Can you provide your code or an example project? Are you getting any errors or warnings in the debugger? Also note that relaod_current_scene returns an Error - did you check if its value is something else than OK? If so, what is it?

1 Answer

0 votes

i think the code for reloading the scene is gettree().reloadcurrent_scene()

get _ tree() reload _current _ scene()

by (14 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.