0 votes

Hello, i have two scenes, a character selection and a character creator scene, i want to save the character made from the creator into a slot on the the selection page, my final goal with this is to have it networked as it's a mmorpg but for the moment something local should be cool for me to understand how it works.

thanks in advance

https://imgur.com/a/lffxPNA

https://imgur.com/rgWogfg

Godot version 3.3.3
in Engine by (16 points)

1 Answer

+1 vote

If You want any variable to become global, there must always be superior structure for holding data throughout whole project. So either your creation and selection scene have to be child of one menager node, or You should use singleton ( Autoload ) which will collect data from whole scene.

Whatever You will choose, generally You will have to create some dictionary with characters stats and features while in creator scene, and when it is done You will pass this dictionary higher (to parent or autoload), close creation scene, and on character selection screens ready() dictionary will be fetched from above again and visually recreated.

by (2,434 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.