Respawn/ Limited number of resurrections

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

I would like to learn how to correctly implement the player’s resurrection system so that he regularly returns to the game in a couple of seconds.

And I’m also interested in the same system, but only a system with only limited amounts of resurrection

Thanks for the answer)

:bust_in_silhouette: Reply From: gamedevshirious

Create a variable called lives, which you can initially set to (say 3).
Each time player dies, reduce lives by 1.