0 votes

is there any way to make the player persistent between 2 scenes (like in GameMakerStudio) or I have to make a player nod for each scene when I change my level? (any tutorial link would be helpful. thank you)

in Engine by (256 points)

2 Answers

+1 vote
Best answer

What you could do is have a singleton node and you would remove your player from the current scene and then attach it to that singleton node.

Create a new scene, call it maybe: "GLOBAL.tscn"

Go to Project > Project Settings > AutoLoad
Select the scene and enable "singleton"

You can also use the singleton node to store global variables.

by (337 points)
selected by
0 votes

Hi,

Here is the link to Sigletons and it's usage.

Singletons Dokumentation

Xad

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 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 webmaster@godotengine.org with your username.