Enjoyed the art style and sillyness. I was unable to play because my laptop screen wasn't big enough to see the playing area even in full-screen mode.
Deadly-Cicada
Creator of
Recent community posts
First time making a game. First time using Godot. I've read and re-read the godot docs, watched videos and asked ChatGPT to help explain it. I feel like I'm missing something super simple.
Here's where I'm stuck:
I've got a red button that the player interacts with. The intended function is: The player can press the button multiple times to make a different character (Scientist) explode each time the button is pressed.
The nodes are connected via the signal red_press. With ONE instance of the scientist scene it works fine. With two or more the first scientist will explode then the signal stops sending. I'm hoping to have lots of scientists in each scene.
If I print "pressed" via the button script it will print each time the character jumps on the button and even count up.
If I print "pressed" via the scientist script (receiving the signal) it will print pressed 1 time for the scientist that explodes but not for the rest of the scientists.
I've read about signal busses but can't seem to find anything that specifically teaches me how to set one up and I've attempted to make the signal global and it works the one time then stops.
I'm seeing in the Godot docs 4.3 under Methods:
Connects this signal to the specified <span class="pre">callable</span>
. Optional <span class="pre">flags</span>
can be also added to configure the connection's behavior (see ConnectFlags constants). You can provide additional arguments to the connected <span class="pre">callable</span>
by using Callable.bind.
A signal can only be connected once to the same Callable. If the signal is already connected, returns @GlobalScope.ERR_INVALID_PARAMETER and pushes an error message, unless the signal is connected with Object.CONNECT_REFERENCE_COUNTED. To prevent this, use is_connected first to check for existing connections.
I think this is what's causing the issue. I'm pulling my hair out trying to get my central game mechanic working. Any help is appreciated. I'll post this on a godot forum as well and hope I can figure it out in time to have a functioning game by tonight :) Thanks all
Red_Button.gd
signal red_press var press_count = 0 func _on_body_entered(body): if body is CharacterBody2D: red_press.emit(press_count) print("button press count: ", press_count) sprite.play("pressed") sound.play()
Scientist.gd
func _on_red_button_red_pressed(press_rcv): press_rcv += 1 print("red button signal received") check_number(press_rcv) func check_number(press_rcv): if press_rcv == scientist_index + 1: explode() say_random_phrase()