The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

I am making 2 worlds for a game. I could either use scene instancing to instance the player in the two scenes but that would be complicated because the two worlds have different variables so I would have to use a different script to the edit the player. I could also just make the player in each screen and just change the player easily. Which one should I do?

in Engine by (455 points)

1 Answer

0 votes
Best answer

You should definitely have a separate scene for the player, which is instanced in each level/world. It isn't unreasonable for each world to have its own script, which should be used to initialize values for your player and other nodes/scenes.

You want to have all of your player code in one place, so that if you want to change something related to the player that should be changed in all worlds, you only have to do it in one place.

by (1,663 points)
selected by

I tried this and it worked very well. Thank you.

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 Frequently asked questions and 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 [email protected] with your username.