Health And Damage Framework+ Documentation Portal
  • Welcome
  • Getting Started
    • Getting Setup
    • Important Notes
  • Walkthroughs
    • How Each Node Works
  • Feedback
    • Feedback Requests
Powered by GitBook
On this page
  • Finding the nodes:
  • Get Damage Amount:
  • Increment Health:
  • Decrement Health:
  • Float to Integer:
  • Animate Progress Bar:
  1. Walkthroughs

How Each Node Works

PreviousImportant NotesNextFeedback Requests

Last updated 2 days ago

This page covers how to use the features of Health and damage framework in Blueprints. The logic in C++ should be the same.

Finding the nodes:

  1. Right click anywhere in the blueprint context menu and search for Damage Simplifier.

  1. Click the node you want to create it. I will go over each below.

Get Damage Amount:

  1. This node calculates damage to apply based on real world easy-to-understand numbers.

  1. In this example, 50 points of damage will be dealt, out of a total of 2000 health points. Typically, this is calculated as a decimal like 0.025, which can be complex when applying damage in lots of places.

  2. Alternatively, you can use this when the event receives damage

Increment Health:

  1. This function increments your health using real numbers, similar to what Apex Legends or Fortnite might use. It takes your current health, updates it, and sets it to the new value.

  1. Optionally, you can cap it so it doesnt go above 1, as health should normally be ranged between 0.0-1.0 for UI integration.

Decrement Health:

  1. This function is the exact opposite of increment, it works the same way. I recommend using this whenever you need to lower health.

Float to Integer:

  1. This node converts damage values from floats to integers. This conversion is often used in games like Fortnite or Borderlands for displaying damage in UI.

  2. If a float is 0.1, it will return 10. If it's 0.25, it will return 25. The pattern is to multiply the float by 100 to retrieve the equivalent whole number since damage is done in decimals.

Animate Progress Bar:

This lets you smoothly interpolate the values of any progress bar automatically, no timelines or interfaces needed.

  1. Make a widget with a progress bar, if you already have one you can skip this step.

  1. Create a binding for the progress bar.

  1. in the binding, promote the return value to a variable and name it "progress bar value" or whatever you would like.

  1. the binding should look like this.

  1. Open your widget's event graph and locate the event tick. This function is optimized, so there's no need to worry

  2. First, get the health value from its storage location. This could be in the player character, game instance, or player state, depending on the game. Use "Construct" to cast and cache it

  1. Now on event tick call the Animate Progress Bar function. It should look like this when finished.

  1. Now add the progress bar to your screen. It will animate automatically when health changes. You can use it for other progress bars too.

  2. Thats it, you are all set up for animated progress bars in your game.