Player Defeated

Hey guys,

So, I added health to the player, and when the player is “hit” by the enemy, they will get knocked back. It’s similar to what you’d find in many action/platformer games. The knockback has its own animation, including the kneeling recovery when you land from the knockback.

Also common to the genre, there is a short grace period of invincibility after you get hit.

Finally, there is a dramatic “death” sequence, with the fade-out of everything else, and the centering of the player in the screen. To make this work, all the game objects are “paused” (disabled), except the player (but only disable the physics). There is also added a custom message that will be unique for each condition that you died. (Every enemy will have a different message.)

- C. out.

4 Likes

Privacy & Terms