Skip to content

Your First Damage Event

In the Getting Started guide, we fired a test event from a key press. Now, it’s time to wire combat text into an actual gameplay flow!

In this tutorial, we will hook up a simple “Take Damage” event on an enemy Actor so it spawns an accumulating damage number using the UMG renderer.


⚔️ Step 1: Add a Damage Entry Point to Your Actor

Section titled “⚔️ Step 1: Add a Damage Entry Point to Your Actor”
  1. Open (or create) an Actor Blueprint that represents something the player can damage, e.g. BP_EnemyBot.
  2. In the Event Graph, add the built-in Event AnyDamage node (or your own custom “Take Damage” function — any place in your gameplay code where you already know the damage amount and the hit location works).
  3. From Event AnyDamage, you’ll have access to Damage (float) and DamagedActor (self).

  1. Right-click in the Event Graph and add Get MageItCombatTextSubsystem.
  2. Drag off its return value and add Add Damage Event.
  3. Build the FMageItCombatTextEvent payload:
    • Location: Get Actor Location on self, plus a Z offset (e.g. + 100) so the number spawns above the enemy’s head instead of at its feet.
    • DamageAmount: The Damage pin from Event AnyDamage.
    • DamageTag: A tag describing this damage, e.g. Damage.Melee.
    • TargetActor: self. This is what lets the UMG renderer track the actor and accumulate repeated hits into a single growing number instead of spawning a new widget every time.
  4. Connect Add Damage Event after Event AnyDamage.

Make sure Damage.Melee resolves to a renderer:

  1. Go to Edit > Project Settings > Plugins > Combat Text.
  2. Under Renderer Registry, either add a specific entry for Damage.Melee, or rely on the broader Damage entry you registered in Getting Started — the subsystem will walk up the tag hierarchy from Damage.Melee to Damage automatically. See GetRenderer for the exact lookup order.

If you’re using the UMG renderer, you can create your own widget instead of the example. The plugin ships a ready-made WBP_MCT_AccumulatedDamage widget (parent class UMageItCombatTextWidget) that already wires up a bound text block to Damage, outline/shadow styling, and a Fade Out Delay — the fastest path is usually to duplicate it rather than starting from the bare C++ class:

  1. In your Content Browser, duplicate WBP_MCT_AccumulatedDamage (under Examples/UI) and rename it, e.g. WBP_MyDamageNumber. Alternatively, right-click User Interface > Widget Blueprint, expand All Classes, and search for MageItCombatTextWidget to start from scratch.

  2. Open it and adjust Text Color, Text Font, and Outline Settings to match your game’s style, and tune Fade Out Delay under the Combat Text category (default 0.5–0.7s) to taste.

    Widget Blueprint Details panel for a damage-number widget, showing Text Color, Text Font, Outline Settings, and a Fade Out Delay of 0.7 under the Combat Text category
  3. Override Fade In and Fade Out (see UMageItCombatTextWidget) if you want custom show/hide animations instead of relying on the default visibility toggle.

  4. Assign WBP_MyDamageNumber as the Widget Class on your UMG renderer instance (BP_MCT_ExampleUMGRenderer, or your own child Blueprint of UMageItCombatTextRendererUMG).


  1. Hit Play.
  2. Deal damage to your enemy multiple times in quick succession.
  3. You should see a single damage number appear above the enemy and grow with each hit, instead of stacking multiple separate numbers. This is the built-in accumulation behavior of UMageItCombatTextWidget::UpdateDamage — each new hit resets the fade-out timer and adds to the running total.
  4. Stop dealing damage. After FadeOutDelay seconds (default 0.5), the number should fade out and the widget returns to the pool.

You’ve wired a real gameplay event into a fully pooled, accumulating combat text system.

Next Steps: