Topic was automatically imported from the old Question2Answer platform.
Asked By
Tamarindo94
I have a turn manager that alternates turns between the player and his opponent; the player connects the signal to a button when his turns begins, and disconnects it when his turn ends. The problem is that the button doesn’t fire after being reconnected.
So I’m wondering if it’s normal that a signal cannot be reconnected after having been disconnected, or if I’m doing something wrong
First, the normal signal name is pressed. Yet, you do not reconnect the button with this code, you just disconnect it. A signal can be connected after it has been disconnected. After button.disconnect("pressed", self, "_on_button_pressed") you must do button.connect("pressed", self, "_on_button_pressed") but that has no sense.
Thanks, I forgot to mention that the turn manager calls player.start_turn() to reconnect the button, yet pressing the button doesn’t trigger the callback if it’s pressed after being reconnected