Trouble with 2DArea monitoring

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

Hello, I’m having trouble with the 2DAreas in my game, even when I disable the monitorable option other 2DAreas seem to pick them up, I’ve tried disabling them through the animation player at the start of the defeat animation and on code when calling the animation, but the player keeps detecting the enemies even after disabling them.

I also tried disabling the 2DShpae and it fixed that problem, but then the enemy disappears in the first frame of the defeat animation instead of at the end.

this is my first time asking anything here so sorry if I did something wrong.

:bust_in_silhouette: Reply From: Ertain

So in the Area2D detects the enemy, then an animation plays, yet the enemy is suppose to disappear at the end of the animation? Why not disable the CollisionShape2D of the Area2D, and then have a signal which monitors the “death” animation. Once that’s finished, have the enemy disappear.