Monday, 23 April 2018

Week 29

This week I worked on sorting out the health bar for the character. I followed this YouTube video here 

I will screenshot the below steps to give a more visual view of how I did it. I started off by creating the health bar widget, this basically is where the position of the health bar will be on screen.
The next thing I had to do was set up the Variables needed to get all of the health bar working and displaying the correct health, here is a screenshot of all the different variables I have used, bare in mind although I have a "regen" variable I have not added any health regen in as I wanted to make this game hard.
The next thing I added to add in was the function to make the health bar update in real time. and also to display the graphic in the health bar widget.
And finally this is the code that connects the health bar to the First Person Player.
The white line connecting to the "create health bar widget" section is the Event BeginPlay tab which is what happens when the game starts.



No comments:

Post a Comment