Week 18:
HND Project
This week, I have decided to improve upon the “Health System” by incorporating a “Health Bar” in the HUD to better show how much damage that the Player takes from the Zombie AI. To begin with, I had to create a new “Float” variable in the “Graph Event” that I named “MaxHP” and set its value to “100”. I then I went into the HUD that I created a few weeks ago and added a “Progress” bar.
Once I placed where I wanted it and filled in my desired colours, I then dragged a “Text” box onto the screen and left it blank. I then bind both the “Progress Bar” and the “Text” box. In the “Graph”, I created the following codes for the “Progress Bar” and the “Text” box. Below is how they appear.
After this, I went back into the “FirstPersonCharacter” graph and proceeded to remove the “Print Strings” in the “Health System” setup I had created earlier. I then quickly tested to see whether the results or not. To my satisfaction they had worked after a bit of configuration.
After this, I noticed that the values still appear even after the Player dies and the continues values go down into minuses. As a result, I then decided to add a “Clamp” function to the piece of coding. This then stopped the “minus values” from happening and I also shortened the delay.























