How can I detect an area changing its monitorabe state inside another?

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

I have an enemy with an area2d i use to both detect the player and use it as a hitbox (area where, if the player is within when it is active, shuld signal to it to take damage).

I’m trying to have it not monitorable while it is not actively dealing damage, and change the monitorable field when i want to deal damage. However, the player scene does not detect the change in monitorable if it was already within the area when it changes.

How can I fix this?

:bust_in_silhouette: Reply From: timothybrentwood

Use two separate Area2Ds. One for the hitbox one for the detection.

But how do I make the player hurtbox detect an area when it becomes monitorable when already inside it?

franss22 | 2021-12-13 15:40