0 votes

how/can i create a variable in another scene?

var a = scene.instance()
a.object =  value
in Engine by (195 points)

Do you want to create another variable or just update the value of an existing variable? Can you provide a case scenario? What are you trying to achieve?

as the title, i trying to create a variable in a instanced scene from code.

i making a project that contains many characters used by api:s, creating variables from the api makes the work so much easier.

1 Answer

+1 vote
Best answer

I think u cant create a varible like this, but u can change the value of the variable of another object using this method.

by (171 points)
selected by
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.