How to make a invincible delay

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By thoma

Hi, I make something when the player got damage I disabled her collision shape 2D but it also desactivate is collision whit the I can code something to tell to the player
to keep collision whit the tilemap and disabled collision whit player?
Thank for helping me!!!(人 •͈ᴗ•͈)

Sorry if it is not clear write it really fast

:bust_in_silhouette: Reply From: bborncr

You need to use the Collision Layers and Masks to do exactly what you need.

:bust_in_silhouette: Reply From: LordViperion

Make a boolean variable and set to true if you want to make invincible your character.
You need to checking the player what is colliding. And the collider is enemycollider and boolean is true then no make damaging.