0 votes

Hi! I'm trying to make a card game. I currently have a Game scene and a Card scene (the cards are TextureButtons), and the Game scene instantiates some Cards. Now I want the cards to do something when pressed. A tutorial I followed uses func _pressed() and I put this in the Card's script. When I use this to print something in the console and I click a card, it works. But when I try to use signals, it doesn't print anything. When I try to configure the signal, it connects it to the script connected to the Card itself. So basically I have the following functions in the Card's script:

func pressed():
func _on

with the second function connected to a signal, but only '1' gets printed out. What might be the problem here?

Godot version 3.4
in Engine by (12 points)

1 Answer

0 votes

Have you tried running them one at a time? It could be the first function is consuming the event.

by (195 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.