Self Study 4 - A Bloody Mess (The pun, not the dilemma)


Building on the navigation tutorial earlier,  this self study involved adding a bit more functionality to a base game - enemies that hurt, health that depletes and replenishes, and healthpacks that pack health!

Insert Better Font Here

Keeping it basic - I just added a canvas to the screen to display some text when and where appropriate - the top left displays the player/agent's current health, and the big obnoxious message in the middle appears when your health is zero and your character is destroyed. Red because it's the best color.

Here's a little GIF of the shiny health balls in action:

Wakka Wakka

Just like our favorite pixelated yellow circle - this guy just cannot get enough of random pills.

The healthpacks are just simple colored spheres with a particle system attached to make them look shiny and helpful, the color is similar to the player so they know to collect them (:
Basically, whenever the player's collider collides with a healthpack, the healthpack accesses the script on the player object that handles the health, and says "Hey, add 5 to that number" and it does.

Here's the whole game in action, our enemies are now complete with a really gross blood particle system I made, and damage our player through the power of err.. blood?

Send help!

So basically the enemies do the opposite of the healthpacks - when their colliders register that they've hit the player, they instantiate some blood at the same time as they disappear and reduce the player's health. 

The player also explodes with blood beause.. I only wanted to make one blood prefab :)

Thanks! See ya soon! x

Leave a comment

Log in with itch.io to leave a comment.