Hi i have this problem when enemy entered my area2d at the same time they both deal damage and my player area2d detect both i have disable collision upon entered but did not fix the prob iw want to detect one damage at a time even they entered at the same time. Thanks in advance
Create a variable like var vulnerable = true
and attach a timer node when you got hit by enemy make vulnerable = false
and then start timer when timer is out attack a signal and in signal make the player vulnerable again
By this way you can achieve what you want. Try and let me know.
idk how to implement this if both bodies entered at the same time or im in the middle of their collision i will only detect 1 damage or take 1 collision and ignore the other 1
you can check how many body entered in player or colide by player at instance of time and by this if they are more than one than you only run the hit function by once.