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?

asked Jul 27 in Projects by jujumumu (123 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.

answered Jul 28 by Eric Ellingson (578 points)
selected Jul 29 by jujumumu

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 How to use this Q&A? before posting your first questions.