Godot Version
4.2.2
Question
I’m just trying to know a better way to make the player receive damage because the way I set up this has some problems.
so the way I have this is the enemy emits a signal in the player to let him know that it receives damage, it works fine and if I want the player not to receive damage I just set to true a variable that prevents the damage to be receive, the problem whit this is that even if the player doesn’t receive damage the enemy still collides whit the player and for this to not happen I have to change the collision mask in the enemy which can be achieved by emitting a signal in the enemy when I make the player not receive damage but this doesn’t seem right for me.
so is there a better way to send damage or should I make the player receive the damage when colliding with the enemy?
Screenshots
enemy:
Thanks in advance and sorry if what I want to say is not understandable.