I’m looking on a simple way of how to create a buffer or a couple of frames where my playable character can’t be damaged after being hit. So it would look like this,
Player Hit
Wait x Seconds
then it would repeat .
I don’t want to use a four loop to constantly check this but a simple method where I can have it wait seconds before the collision is detected again.
You could isolate the collision to its own script, set up a timer and bool, tick the timer down (and set it from going below 0) and disable the script while the bool is true. If you’re using triggers you can just disable the player’s “hurtbox” (an extra trigger collider) while a timer is active.