Area2D sends _on_Area2D_body_entered() signal when body enters another area2d

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nonken

So i use an area2d to check if the player is close enough to a chest. If the player is close enough then a speech bubble will appear with “open chest” printed on it. But the problem is that whenever the player enters an area2d the signal gets sent and the speech bubble appears. I have made sure that the chests signal gets sent to itself and that no other area2ds signal gets sent to the chest.

Edit: solved it.

Not possible. Show the code, everything about signal :slight_smile:

Inces | 2022-09-04 18:39

Heres the project if you feel like looking through it: GitHub - N0nken/Godot-project-debugging: For godot q&a help because its gotten pretty big now.

Nonken | 2022-09-04 20:05

Don’t be lazy, format and post parts of code with signal introduction, emission and reception

Inces | 2022-09-04 21:06

No theres just so much and im not the best at godot (so i might accidentally changed some settings which caused it) so im afraid i might miss the part thats actually causing it.

Nonken | 2022-09-04 21:18

If You post the code related to this one particular signal I will be able to tell, if the problem lies in signal handling or in some miscellanous stuff.
I need the code of script where signal is connected and method on signal receive.
If I won’t find any flaws, then I might dig into your project more

Inces | 2022-09-05 14:35

Which “other” area2D do you believe is triggering the chest area2D code?

Unless you have accidentally linked the wrong script this shouldn’t happen.

petermoyle | 2022-09-06 11:27

alright i’ll put the code in the post.

Nonken | 2022-09-06 18:54

Wait nvm I solved it. Thanks for trying to help though.

Nonken | 2022-09-06 19:03