Button Not Firing

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

I’ve been working on a method to allow the player to pick which level they want to enter. Each level is represented by a button that holds a packed scene. On click the scene is loaded fine and the whole menu is freed. My issues arises after gameplay has completed and the player is redirected to the menu. This time, even though the whole level selection menu has been created the same way as before the buttons respond to hovering over it but there is no firing of the click signal. I tried just toggling the visibility rather then recreating the menu but the same effect occurs.

More information about your scenes sctructures, how you add/remove them and add the signals to the buttons, could be good.

And check the status of your scenes with the remote inspector to see if is the tree is the same when going back.

eons | 2017-01-07 16:34

The menu scene is added the usual way, loading the path, instancing and then parenting it. As for my scene structures: the game is the first image (with LevelSelector being the menu in question) and the second is of the composition of the selector. As asked, the buttons are connected via the editor, not through code.

In addition looking at the remote inspector seems to reveal that the scenes are set up correctly, nothing is out of place as it is shown.

jelly | 2017-01-07 22:42

While the game is running, check out the Debugger for Errors (Debugger tab at the bottom of Godot, Error tab on Debugger). There’s a decent chance that some non-fatal error is being reported and will give you a hint as to the cause of the unexpected behavior.

Hammer Bro. | 2017-01-08 05:21

I have been getting non-fatal but for a timer in a inherited node. I have a base map node that the levels get most of their functionality from which prompts a “signal ‘timeout’ already connected to given method…”

jelly | 2017-01-08 06:32

:bust_in_silhouette: Reply From: jelly

I figured it out. The problem was moderately unrelated. I had paused the game in one place and had forgotten to unpause it in another. While paused the buttons don’t return their pressed signal but do respond visually to mouse over events. That threw me pretty hard.

Thanks for posting when you figured it out, had the same problem.

dwemthy | 2018-10-07 22:32