Hey guys, I just started working in Godot few months ago and now I have reached a problem.

I am creating an android game in which the enemies have a VisibilityNotifier2D and they drop from the top of the screen and when they reach the end, the signal from VisibilityNotifier (screen_exited) is triggered and I lower the player hp and do my queue_free there.

The problem that I have is that I want to implement a power up in my game which will remove all the enemies currently on the screen. When I press the button I call queue_free on the enemies and somehow it triggers the screen_exited signal on my VisibilityNotifier which is obviously something I do not want.

Does anyone have any clue how I could fix the problem?

Maybe implement a check to use before queue_free to determine if the to-be-freed node was within the game area. Might have to create an area to make this check if you don't already have one. This is just one idea off of the top of my head though.

@Megalomaniak said: Maybe implement a check to use before queue_free to determine if the to-be-freed node was within the game area. Might have to create an area to make this check if you don't already have one. This is just one idea off of the top of my head though.

Not a bad idea for a start, thank you!

Apparently I am just stupid as hell and all that I needed to do was just disconnect the signal from my VisibilityNotifier2D and then queue_free the obstacle.

3 years later