Ui, health system and game over


Since the ai navigation was completed, I moved onto implementing the UI and a health system to allow the player to be damaged and be able to lose the game. I started with adding a crosshair to the centre of the screen, then added the healthbar, making use of a slider that translates the current health onto the Ui.

Once this was done, I made a script to allow the player to be damaged to test out the transition to the game over screen. This initially worked out as once the health was reduced to zero, the game over screen appeared. Therefore, I started to implement the damage system when the enemy collides with the player. However, when this was added and I tested, the player wasn’t taking any damage even though the enemy is clearly colliding with the player. I was having a lot of trouble trying to fix the issue, but I had to sort it out later on.

Get The Mines Of Morrenhall

Leave a comment

Log in with itch.io to leave a comment.