0 votes

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?

Godot version 3.3.3
in Engine by (12 points)

1 Answer

0 votes

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

by (3,707 points)

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

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.