Preeeetty sure signals are supposed to have an emit function, lol.

I tried to connect a temporary timer to a signal to be emitted on timeout. Godot does not approve:

I circumvented it by using a lambda function, this works fine:

Seems weird that you can't connect the emit() function though, is this is a bug or just not a supported feature, or am i doing it wrong somehow?

  • xyz and kuligs2 replied to this.
  • Okay so basically, not a supported feature for signals. Got it.

    Squiddy connect() expects a Callable as an argument. A Callable is, according to documentation, defined as either a method of an object derived from the base class Object or a standalone lambda. Since Signal is a built in Variant that does not inherit Object, its methods are not valid callables.

    Okay so basically, not a supported feature for signals. Got it.

    Squiddy i just create a method (mymeth) that call the .emit on the signal, and connect that method to the .connect(mymeth), dont see where is the problem? Few more lines of code for sure but why not?