Player taking damage

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

I’am new at coding and i’am trying to make when the player take damage, he turns invensible for short time and is pushed away. I already put the life and damage taken, but not the hard-frame.

:bust_in_silhouette: Reply From: Lopy

You can use a Timer for that. Whenever the invulnerability time should start, (re)start the Timer. Then, when the player is hit, check if the invulnerability is over with the Timer’s time_left property.