I’m trying to create a hit system for my player.
What I did is add an area node and connect the body_entered signal.
In the callback I deal damage to the player and start an invincibility timer.
This works well except for one thing, if i stay inside the boss, I wont take damage more than once because the signal is not called again.
How can I do this better so if I stay inside something that should deal damage it will work?
Try this: when you start the invincibility timer, deactivate the area node in the player. Then, when the timer ends, activate it again and if the player is still in the boss’ area of effect, the signal should trigger again.
If activating/deactivating the area is not an option because you need it to detect other things, then try to toggle the specific bit of the mask that corresponds to the interaction between boss and player