This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

My 11-year-old is making her first Godot game, using VisualScript, and I'm trying to help her search for answers. But I haven't been able to find how to access a variable in another scene using VisualScript.

At first she wasn't sure how to change scenes in VisualScript, but through trial and error found she could use the Get Scene Tree node, connect it to the "instance" port in a SceneTree.changesceneto() node, and then connect a Preload node, with "res://theNameOfHerScene.tscn" as the object, to the "packed scene" port in the SceneTree.change object.

I'm guessing it involves using the Get Variable node (not Get Local Variable) and then changing things in the Inspector in some way. But we get errors when we try to do this, including after we made the VisualScript script containing the variable autoload.

Is there perhaps VisualScript documentation covering this and I just haven't found it?

Any pointers much appreciated!

Godot version v3.2.3.stable.official
in Engine by (12 points)

1 Answer

0 votes

I dont know with VisualScript but with the Editor you must use autoload.

by (254 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 [email protected] with your username.