#Button press signal is called despite never pressing the button

1 messages · Page 1 of 1 (latest)

void zealot
#

I have a button which is given a pressed signal in gdscript.

However the pressed signal is ran when the signal is added instead of when the button is actually pressed.
Upon actually pressing the button in question it doesn't run the function, but pressing it a 2nd time runs a completely unrelated function.

The function the button is suppose to run shouldn't be affecting the button or it's signals in the slightest so I can't imagine the function itself being at play.
I've tried to see exactly what's happening with the signals themselves but I couldn't find a way to view them in the remote view.

Is there some way to view what signals a node has connected in remote view?

quartz wolf
#

can you show some code?

void zealot
# quartz wolf can you show some code?

It's for a ui with a lot of code involved, if you want more then just ask but this is the function itself that gives the button the signal which is triggering early.

button.pressed.connect(utilities.get("items_menu_use_item").bind(button.name))

The items_menu_use_item function & the functions it triggers doesn't affect the button's data itself in any way nor is it called anywhere else in the code

quartz wolf
#

I see. You could add a print_stack() in the function to try to check where the signal is coming from.

void zealot
finite nest
void zealot
#

Ahh, thankyou !