this is the code i have.
what it does is when the enemy collides with the player attack he goes into a "takingDamage" state.
when he enters the "takingDamage" state, i run once a tint on the enemy and after 1 second untint him and then exit the taking damage state by setting "takingDamage" to false.
as soon as "takingDamage" is false he goes back to walking, being idle, etc.
the problem is that if he gets hit again right as he is getting out of the "takingDamage" state (a specific moment between events maybe? where code hasnt been completed yet?)
he sets the "takingDamage" to true again, but just stays stuck there, without running anything inside the "is takingDamage".
since he doesnt run anything inside this condition he will be stuck there forever. (never setting "takingDamage" to false again)