Signal Help, Says it's connected but doesn't run function

Godot Version V4.2.1

Hi I am currently struggling with Signals. I have a hoop that I want to detect when the player passes through it. It appears to be connected, I have confirmation that it is indeed connected correctly through the get_connection_list function.
Any help would be greatly appreciated

Blockquote
func _ready():
var CurrentHoop: Node3D = get_node(Hoops[0])
var HoopDetection: Area3D = CurrentHoop.get_node(“%HoopArea”)
HoopDetection.body_entered.connect(_test)
print(HoopDetection.get_signal_connection_list(“body_entered”))

I think you;re missing a colon a the end of the body_entered.

HoopDetection.body_entered.connect(_test):
print(HoopDetection.get_signal_connection_list(“body_entered”))

From my work:

func _on_area_2d_body_entered(body):
	# !reset all scoring!
	if body.name == "player" :
		global.score = 0
		global.coins = 22
		global.jump_boots = 0
		print ("Moving Alien Death")
		self.queue_free()
		get_tree().change_scene_to_file("res://scenes/level_3.tscn")

Double check the signature of the connected function.
It must have the parameter (body).
func _test(body)->void:

PS: pdhales72…
HoopDetection.body_entered.connect(_test):
Putting a colon at the end of this line will cause an error, “expected end of statement”

2 Likes

Thanks so much. I now see where it shows the parameter in the signal list. Thanks Again!