Signal does connect, but doesn't call. While 2 other signals do

Godot Version


The following function is called when the button is pressed:

func return_card_to_hand(card: TextureButton) -> void:
    var new_card = card.duplicate()
    new_card.visible = true

func dumb():

The log says:


But “dumb” is not printed when the button is pressed.

It’s probably something, well, dumb.

But the problem is both _on_cards_mouse_entered() and _on_cards_mouse_exited() are connected and working properly.

And they seem to me identical…?

It’s driving me insane.

//Thanks for any help in advance.

Is dumb part of new_card or self?

I think dumb is self from the code you have provided.

It’s a part of the new_card - yes.
But I already found the problem while this post was approved.

It did indeed was something dumb.
I thought return_card_to_hand() was the signaled function - judging by the name. I mean, that is what was happening when I pressed the button.

But it turns out it was only a part of the higher branching function, that was handling several types of inputs and redistributing it down from a singleton.
I just tunnel-visioned on this one script.

And there was the problem - higher up.
(It was deleting and storing all of the ‘pressed’ connections from the buttons on the screen. I just had to move the function call 1 line down - after it was done.)

The moral of the story: “Never tunnel vision.”
…I guess.

//Now I just need to find how to close this topic…

1 Like