0 votes

I am relatively new to godot and programming in general, so excuse my lack of knowledge.

Straight to the point:
I have a signal "mouseoverchild" with arguments name (string) and state (bool).
The signal is emitted from a child node whenever the mouse enters or leaves said child node.

In the root node's script, I have created a class button with variables deployed (bool) and mouse_over (bool).

In the root node, I have a function onmouseoverchild(name, state) connected to the signal from the children of the root node. What it is supposed to do is take the object of the class button, whose name is the same as the argument "name," and change its "deployed" to the argument "state."

How do I do that without having to do case by case scenarios? Is there even a way?

I tried to look it up in the documentation, but didn't find anything, because I didn't know what to look for.

Please ask for details if you need any - though I can't assure you I'll be able to provide them

Thank you for taking your time to read this question of mine.

in Engine by (91 points)

I'm a little confused. What do you mean by "take the object of the class button"? In general, I think most of us would need a better list of code in order to try to figure out how you want to do what you're trying, plus more clarity around the desired functionality - we might have a different way to handle it altogether.

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 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.