I’ve read the manual, but I don’t understand how to use signals… I would appreciate your guidance.
As a practice, I’m trying a simple process where I place a button on the UI layer of Scene 1, and when the button is pressed, a signal is sent to a game object. A visual script attached to that game object then ends the scene, and a scene transition moves to Scene 2. However, I’m not succeeding.
In this case, to receive it via Visual Scripting, the function must have two arguments.
Since elements like buttons only have one argument, they cannot be properly received in Visual Scripting… Therefore, the solution is to have two arguments. The following methods are available:
Receive the Button signal in a separate GDScript attached to another node.
Connect that node and GameObject manually as described in the documentation, and send the signal in the format signal(signal_name, value).
Additionally, Baz has created a plugin related to this, so it might be beneficial to install the following plugin: