Calling a node's class method with a signal - without using a script file

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By blurymind
:warning: Old Version Published before Godot 3 was released.

I recall someone making a video on signals and showing a way to use a signal to trigger another node’s builtin class set method without having any script file on the target node.

Is that possible in godot editor, and if so - how do you do it?
Can signals trigger events on other nodes that have no script attached to them?

:bust_in_silhouette: Reply From: quijipixel

I don’t understand your question… so I’m just guessing here.

As far as I know you cannot implement a signal callback withou writting code (and that means attaching a script somewhere). What you can do on the editor is assign a node’s signal to another node (inside its script). Inside the callback function, you can access any class method of any node’s class.

If you can elaborate your question more, we can find the proper answer.

Hi, I found it on my own.
It is possible to access another node’s built in methods via the signal connection editor - and whats cool about it is yes - you dont need to attach a script file to trigger a method!

Very cool stuff

blurymind | 2017-08-16 08:19

Unfortunatelly we can not pass parameters though:
Add "node" to signal's Add Extra Call Argument in GUI! · Issue #8557 · godotengine/godot · GitHub


blurymind | 2017-08-16 08:41

I didn’t know you could access those methods through the editor! Well, in the end we’ll have to stick to making that by code. I prefer that way, you have full control!

quijipixel | 2017-08-16 11:56