0 votes

If I have two nodes, can I connect the signal of one node to a function of the other? For example, button pressed connected to AnimationPlayer.play, or something like that? I know that I can connect them in a script, but the problem is that I want to avoid using a script. I can do this:

Button.connect("pressed", $AnimationPlayer, "play")

Can't remember whether the above is correct syntax, but I've used this before and it works. problem is I want to do this without a script, but I can't because in the signal connection GUI it doesn't let me select anything because there is no script.
Any tips?

Godot version 3.3.2
in Engine by (251 points)

1 Answer

0 votes
Best answer

I have just found a solution to this, it's a bit unintuitive but leaving it up in case it helps someone else.

if you toggle the advanced switch, it will allow you to select the node and then simply type in the function you want to attach it to. You can also add your arguments, if there are any, in the new dialogue.

by (251 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.