Connected Signals not being called

Hello,

I have a scene Level1 with a script level.gd. I contains a series of Scenes that have a few signals connected.

exit.body_entered.connect(_on_exit_body_entered)
death_zone.body_entered.connect(_on_deathzone_body_entered)

I also have two more scenes (Level2, and Level3) that share the level.gd script.

I fail to understand why two connected signals work on the first scene (Level1), but not on the other scenes (Level2, and Level3) even though they share the same script, and they have the same scenes loaded. I have been debugging and the functions “_on_exit_body_entered” and “_on_deathzone_body_entered” are only called on Level1

Thanks!

can i have a look at the scene tree for level 2 please?

or, if you want to zip your project folder up and pop it online so i can have a look at it please, see if we can get you back on track

Thank you for your reply.

After spending hours understanding what was the problem, I realised it was a matter of properly set up the Collision Layers. :roll_eyes:

So, for future references, always make sure that the Collision Layers are set properly → https://docs.godotengine.org/en/stable/tutorials/physics/physics_introduction.html#collision-layers-and-masks

1 Like

nice one, glad you found the solution and its one you will no doubt be checking in the future if you get a similar scenario…

i dont mind, save you sitting for too long a time, if you get errors in the future, please feel free to tag me in a post.

its awesome that you want to fix it yourself and work through it, but, I dont want you getting discouraged by something thats not working right and possibly give up

1 Like

Awesome, thank you! I will do

:robot:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms