0 votes

I have a variable in "BulletChild" called "explosionSound" and I want to use it in "BulletParent". I define a variable in parent that says, "onready var Sound = get_node("BulletChild") And later I say, "if (Sound.explosionSound == 1):" But it doesn't work. How do I use a variable from my child node?

in Engine by (14 points)

Your question in unanswerable. Please specify the error given, show us some code of the Sound, BulletParent and BulletChild. There should be no problem with the way your are going, I presume some base mistake in your code structure.

Please log in or register to answer this question.

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.