Player death was at first a simple thing to implement. I then had to make the character's death animation play before the failure screen. That's when the issues started to become a problem. The failure screen popped up as soon as the death animation was started. So I had to find a way for the character's death animation to play before the failure screen appeared on the screen.
I thought of a pretty basic way to check if the player was dead or alive. In the character class, I added a bool called isAlive. In the character class, I added a secondary death function to play the animation before the player's death was triggered. After I added the secondary function and all the checks that were necessary to tell if the player was alive or not, I got the death animation to play before the failure screen showed up.
Taylor Addington
Top comments (0)