You want health on the enemy, on the breakable crate, and on the fortress tower. Copying the same health logic into three Blueprints works, but every change to the damage calculation means editing three places.
That is where a custom Blueprint Component helps. Build the health calculation once as a part you plug in, then add it to whichever Actors need it. You get the same capability without forcing the enemy and the crate onto a shared dedicated parent class.
Here we attach the same part to an enemy stand-in with 100 health and a crate with 30. We add an operation that removes 25 at a time and, watching the remaining HP and the reaction when it runs out, sort out what to share and what to leave to each Actor.
What You'll Learn
- How to think about adding the same capability to Actors and reusing it
- The difference between ActorComponent and SceneComponent
- How to build a function that reduces health and a Dispatcher that announces the change
- Hands-on using the same calculation on an enemy and a crate with different reactions
Blueprint Component: a part that adds capability to an Actor
Just as a Static Mesh Component handles appearance and a Projectile Movement Component handles a bullet's movement, a Component is a part for adding capability to an Actor. Beyond visuals, you can build parts in Blueprint that manage health or inventory (→ Actor and Component basics).
In other engines: this is essentially the same idea as Unity's Component. In Godot, adding a child Node per capability is the closest equivalent.

Add one BP_HealthComponent each to an enemy and a crate, for instance, and the health calculation is shared while the current HP is held separately. Damaging the crate does not reduce the enemy's HP.
The Actor a Component is attached to is called its Owner. The Owner of the part on the enemy is the enemy; the Owner of the part on the crate is the crate. A Component is not placed in a level on its own the way an Actor is.
| Comparison | Actor | Component |
|---|---|---|
| Its role here | The enemy or crate body | The part that manages health |
| Where you start using it | Placed in the level | Added to an Actor's Components |
| Scope of what is shared | The whole body's design | A bundle of the capability you need, like health |
A part with a position, or one without
When making your own Component, you first choose the parent class. Transform here means location, rotation, and scale bundled together.
| Parent class | The part's own Transform | Suitable examples |
|---|---|---|
| ActorComponent | None | Health, inventory, state management |
| SceneComponent | Has one | A muzzle position, an effect spawn point |
Health calculation does not need the part's own position, so we use ActorComponent. Wherever the enemy moves, the job of "subtract 25 from HP" is unchanged.
A SceneComponent is a part that can hold a location and orientation relative to its parent. But a SceneComponent itself has no visual or collision. Use derived Components with those capabilities: Static Mesh for rendering, Box Collision for box-shaped collision.

Hands-On: attaching the health part to an enemy and a crate
First, F deals 25 damage to the enemy stand-in and G deals 25 to the crate. Before building bullets or an HP bar, we confirm with Print String that the calculation and notification we delegated to the part work.
The destination is the enemy going 100 → 75 → 50 → 25 → 0 and the crate going 30 → 5 → 0, with each Actor deciding its own reaction when it runs out.

1. Create the health Component
Create a "Blueprint Class" in the Content Browser with parent class ActorComponent, named BP_HealthComponent. If the parent is not in the list, search "All Classes" for ActorComponent.
Create these two under Variables and set their defaults after Compile.
| Variable | Type | Default | Setting / purpose |
|---|---|---|---|
MaxHealth | Float | 100.0 | Instance Editable on. Change the max HP per attachment target |
CurrentHealth | Float | 0.0 | The current HP. Updated inside the Component |
Instance Editable is the setting that lets the same part hold different values per instance it is attached to. Here we set MaxHealth to 100 or 30, using a value greater than 0.
In the Component's Event Graph, connect Event BeginPlay → Set CurrentHealth and feed Get MaxHealth into the value. That fills it to that instance's max HP at startup.
2. Create the outputs that announce changes
From the "+" on Event Dispatchers in My Blueprint, create the following.
| Dispatcher name | Value added to Inputs in Details | What it announces |
|---|---|---|
OnHealthChanged | NewHealth: Float | That HP was updated, and the new value |
OnDied | None | That HP reached 0 |
An Event Dispatcher is a mechanism for telling listeners that signed up about an occurrence. The Component announces "HP hit 0," and the enemy or crate decides "what happens next."
Sending the notification is Call; registering an event to receive it is Bind. Creating the name alone produces neither a notification nor a reaction, so we build the sending side and the receiving side in turn.
3. Create the function that accepts damage
Create ApplyHealthDamage under Functions with Pure off, and add a Float DamageAmount to Inputs. This is our own function. It is separate from UE's standard Apply Damage node, so keep the names distinct.
First, check "current HP is greater than 0" and "damage is greater than 0."
- Compare CurrentHealth with 0.0 using a Float
>. - Compare DamageAmount with 0.0 using another
>. - Feed both results into
AND Booleanand connect its result to a Branch's Condition. - Connect a white exec line from the function entry to the Branch and advance only the True side. The False side just ends.
AND is true only when both conditions hold. That way we skip calls after HP is exhausted, and zero or negative damage.

The Get DamageAmount in the diagram is a node reading the input passed into this function. Place it from the right-click search inside the function, or use the DamageAmount output on the entry. There is no need to create a new Class variable of the same name.
Put Set CurrentHealth on the True side. Compute the value in this order.
| Node / input | Value to pass |
|---|---|
A on the Float subtract - | Get CurrentHealth |
| B on the subtract | The function input DamageAmount |
| Value on Clamp (Float) | The subtraction result |
| Clamp's Min / Max | 0.0 / Get MaxHealth |
| Set CurrentHealth's value | The Clamp result |
Clamp is a node that keeps a value within a specified range. When the crate is at 5 HP and takes 25 damage, it becomes 0 rather than -20. Do not connect white exec lines to the subtraction and Clamp; use only value connections.

From Set CurrentHealth's white output, connect in this order.
Call OnHealthChanged. Pass the updated CurrentHealth to NewHealth.- A Branch whose Condition is
CurrentHealth <= 0.0. Call OnDiedfrom the True side. The False side just ends.
Drag each Dispatcher from My Blueprint into the graph and choose "Call." Target is self, this Component. For the value handed to the display, use CurrentHealth after the Set rather than recomputing the subtraction.

The part's job is now "check whether to accept it → update HP → announce the change." The enemy's appearance and the crate's breaking effect are not written here.
4. Attach it to the enemy and the crate
A level to test in can come from a Third Person Blueprint project. Use None if there is a Variant option. Create BP_Enemy and BP_Crate separately with Actor as parent and add these visuals.
| Actor | Example Static Mesh | BP_HealthComponent MaxHealth |
|---|---|---|
| BP_Enemy | The engine's Cylinder | 100.0 |
| BP_Crate | The engine's Cube | 30.0 |
Enemy AI and crate materials are not needed here. We confirm that two differently shaped bodies can use the same part. If you cannot find the meshes, enable Show Engine Content in the asset picker and choose from Engine's BasicShapes.
Under each Actor's Components, add one BP_HealthComponent from "Add." Select the added part, set MaxHealth to the table's value in the Details, then Compile and save. Place the two Actors side by side on a floor visible from the Play start position.
5. Receive HP notifications on the Actor side
Open BP_Enemy's Event Graph first. Drag the health part you added from Components to place a reference, and from that pin create Bind Event to OnHealthChanged.
Connect Event BeginPlay to Bind's white exec input. Drag from Bind's red Event pin to create a Custom Event named HandleHealthChanged. It gains a Float NewHealth input matching the Dispatcher.
Place a Print String after this Custom Event. Set Append's A to Enemy HP: and B to the String conversion of NewHealth, then pass the result to Print String's In String. Set Duration to 10 seconds.
Do the same on the crate with the label Crate HP: . Connect the Bind registration from BeginPlay and the reacting Print from the Custom Event. Putting the Print right after Bind does not make it a reaction to HP changing.

This diagram omits the NewHealth String conversion and Append to show the registration wiring. For the HP display, follow the steps above and connect the string built from NewHealth to In String.
6. Split the reactions when health runs out
From the same health part reference, create Bind Event to OnDied and continue from the previous Bind's white output. Create a Custom Event from the red Event pin and name it HandleDied.
From each Actor's HandleDied, run the following.
| Actor | What happens when health runs out |
|---|---|
| BP_Enemy | Print String "The enemy fell" → Set Actor Hidden In Game (true) → Set Actor Enable Collision (false) |
| BP_Crate | Print String "The crate broke" → Destroy Actor |
Target is self on both. The enemy is hidden with collision disabled; the crate destroys the Actor itself. On a real enemy you would swap in a death animation, and on a crate a debris effect.
The HP calculation is shared, and what happens after HP hits 0 is decided by each Actor. That division is what makes this part reusable.
7. Pass damage from the keys into the part
Instead of checking "is this the enemy Class or the crate Class," the attacking side checks whether the target has a health Component. Here we designate the two Actors from the Level Blueprint (→ Level Blueprints and references to placed Actors).
Open the Level Blueprint and create DamageTarget under Functions. Pure off, and add TargetActor to Inputs as an Actor Object Reference. Object Reference is a value pointing at the instance being acted on.
Wire the function in this order.
- From the entry, connect to an
Is Validwith white exec pins. Input Object is TargetActor. - From TargetActor, create
Get Component by Classwith Component Class set to BP_HealthComponent. - From the first Is Valid's "Is Valid" side, connect to a second Is Valid whose Input Object is Get Component by Class's Return Value.
- From the second "Is Valid" side, call the part's
ApplyHealthDamage. Target is the same Return Value and DamageAmount is 25.0.
Is Valid checks whether the referenced target exists and is still usable. The first check is "has the crate already broken," and the second is "does it have a health part." Both Is Not Valid sides do nothing.
Get Component by Class is a node that returns a value, so no white exec line runs through it. Setting Component Class to BP_HealthComponent first lets you call that part's ApplyHealthDamage from the Return Value.

Get TargetActor is also a node reading a function input. The next diagram is the second half of the same DamageTarget, passing the retrieved part into both the second Is Valid and ApplyHealthDamage.

Compile, return to the Event Graph, and create F and G key events. Call DamageTarget from each Pressed.
| Input | DamageTarget's TargetActor |
|---|---|
| F Pressed | A reference to the BP_Enemy in the level |
| G Pressed | A reference to the BP_Crate in the level |
Place references by selecting the object in the Outliner and using "Create a reference to [name]" from the Level Blueprint's right-click menu. Choose the instance placed in the level, not the plan.
8. Confirm the HP drop and a shared change
Compile and save the Component, both Actors, and the Level Blueprint, then Play. Click the game view, then repeat pressing and releasing the keys.
| Action | Expected result |
|---|---|
| Press F once at a time, four times | Enemy HP goes 75 → 50 → 25 → 0. On the fourth, "The enemy fell" appears and it vanishes |
| Press G once at a time, twice | Crate HP goes 5 → 0. On the second, "The crate broke" appears and the crate vanishes |
| Press the same key again afterwards | No new death message appears and no reference errors either |
On that last check, the enemy is stopped by the Component's HP check and the crate by the Actor's Is Valid. Distinguish the on-screen messages by the Enemy/Crate label, not by their position.
If nothing happens, confirm input with a Print right after F and G, then check TargetActor, the added Component, and Bind's exec line and Event connection. If the HP display changes but nothing vanishes, inspect the OnDied Bind and HandleDied.
Next, stop Play and change the DamageAmount fed into BP_HealthComponent's subtraction to DamageAmount × 0.9. That is a 10% reduction on 25 damage, so the amount actually subtracted is 22.5.
Play again and the first F gives 77.5 and the first G gives 7.5. The enemy now takes five hits and the crate two to reach 0. Confirm that a change in one place on the part took effect without editing either Actor's logic, then restore the original DamageAmount.
Separating the Component's role from the Owner's
The health Component here does not distinguish whether the Owner is an enemy or a crate. It computes HP and announces changes to registered listeners.
| Direction | The exchange here |
|---|---|
| Into the Component | ApplyHealthDamage passes the amount to subtract |
| Out of the Component | OnHealthChanged / OnDied announce what happened |
| The Owner's own reaction | Display, hide, destroy |
If you wrote Get Owner → Cast To BP_Enemy → enemy death logic inside the Component, that logic would require a BP_Enemy. Attach it to the crate and the same Cast will not succeed.
Cast itself is not forbidden. There are designs that fix the usable Owner, such as a movement part meant for a specific Character. What matters is that a part used on both an enemy and a crate does not make enemy-only logic mandatory.

A notification is not a broadcast reaching every Actor in the game unconditionally. Only listeners Bound to that Component's Dispatcher receive it. Notification targets are per part, so changing the enemy's HP does not call the crate's HandleDied.
Bonus: Good to Know Up Front
Connecting bullets, HP bars, and debris
Run the same check as DamageTarget on whatever a bullet hits and you can pass damage to targets that have the health part. For input and bullet setup, continue to Spawn Actor and Projectile Movement.
To use the standard Apply Damage, one approach is passing the amount received in the Actor's Event AnyDamage into your ApplyHealthDamage. Adding the Component does not wire that up automatically (→ Health and damage).
Update the HP bar from the value received in OnHealthChanged, and add debris and light to the Owner's HandleDied. You can build those with UMG and Niagara respectively.
What if I attach the same Component twice?
Get Component by Class returns the first part matching the specified Class. Add exactly one BP_HealthComponent per Actor here. To give body parts separate health, you also need to distinguish which part is being attacked.
Per-frame work only when you need it
The health calculation here runs only when the damage function is called. Check Start with Tick Enabled in the Component's Class Defaults and turn it off if unnecessary. Judge by whether there is work to do rather than relying on Tick's default (→ Choosing between Tick and events).
When the notification's recipient changes
The Owner here Binds at BeginPlay to the Component attached to itself. In a UI that watches another Actor's part, Unbind the old connection when you switch display targets before Binding to the new one.
Deciding "whose notifications do I want, and until when" also shows you where to unbind. Detailed binding and unbinding is covered in Event Dispatcher.
Look for a standard part before building your own
There are standard Components too, such as Rotating Movement for rotation and Projectile Movement for bullet motion. The coin-collecting game uses Rotating Movement on spinning coins.
Summary
We gathered the health calculation into BP_HealthComponent and added one to the enemy stand-in and one to the crate. The calculation's definition is shared while HP and notification targets belong to each instance, and the reaction after health runs out is left to the Owner.
When you find yourself writing similar logic in several Actors, think about what to make a shared capability and what to leave as the body's own job. As coordination between parts grows, three ways Actors communicate also helps you decide.