How can i make a health system and bar in the fps blueprint

Many roads lead to Rome. This is one of them:

Create an enumerator that defines the different pickup types:
Enum.JPG

Now create a structure that holds the player values, being Health, Armor and Shield
Struct.JPG

Create a BP based on actor that holds a reference to a mesh and provides a collision box.
Also add a variable to hold the amount the pickup will give.

d5f93c903a2a6b7e435cac3d5cb70f7272dc69e5.jpeg

This is now a function that will adjust the player stats display.

This function calculates the new stat values.

e1c74506ab1959f097854e6f65d64dd160f83b68.jpeg

In the event graph add a BeginOverlap event handler to the Collision box to take care of pickup removal after pickup.

c243d8c53d398bde6765702e5b90ea9cd79313ca.jpeg
717ff82bf3304155e8a74cfddd1abe329057ebc0.jpeg

Now place some in the level. Set meshes for it. Tweak the amount values per instance, if you like. The pickup is done…

Now lets modfify the player BP. Add a Stats variable and create a UI on begin play…

a8983838a5a5c9a9976115d1a01468d0ede8bfdb.jpeg

The player is done. So lets finally create the UI

Create an UMG interface and add text fields/variables to it. Those are the ones the updatestatsdisplay function from above sets…
7e4fc38250e34d9c027320cbaf22ce4b2a3919f1.jpeg

In the final game it looks like this:
060f93b1ace831208a7de531dd0eead672153679.jpeg
e45c79d9c4c58bb6473c7ea173a60fc92b061006.jpeg
8ee1de3823d8eaba79616c48f1b5421fee17ed6b.jpeg

Hope that helps :slight_smile: