0 votes

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.

Godot version 3.5
in Engine by (17 points)

1 Answer

0 votes

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.

by (3,144 points)
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 Frequently asked questions and 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 [email protected] with your username.