August 2019
Intermediate to advanced
380 pages
9h 17m
English
You will recall that in previous chapters, we linked the meters that are displayed on our Heads-Up Display (HUD) to variables contained within FirstPersonCharacter. In order to show the health meter decreasing in response to taking damage, we must decrease the player health variable each time damage is received. We also want to ensure that the player's health can never go below 0 to avoid potential bugs that an unexpected negative health value might cause. The end result will look like this:

Begin by adding the Event AnyDamage Event node to empty graph space. Drag the Player Health variable onto the graph and use ...
Read now
Unlock full access