For my grid/tile game, I set up a 'spikes' obstacle/tile that the player can walk onto.
The player-sprite gets damaged if it moves on that square, receives a short period of 'invulnerable frames', then takes damage again, repeating until dead or it moves off the spikes. Similar to how spikes work in Binding of Isaac.
The problem is that my 'invulnerability frame' code doesn't prevent damage while the character is flashing, and the spikes only do damage once, making them 'safe' afterwards (until you walk on and off of them). How do I get it to 'repeat' damage whilst colliding/overlapping, without insta-killing the sprite?