UMageItCombatTextWidget
Base Class: UUserWidget
Overview
Section titled “Overview”UMageItCombatTextWidget is the visual counterpart to the UMG renderer. It is a customized UMG
widget designed to be pooled and reused by UMageItCombatTextRendererUMG: rather than spawning
a new widget for every hit, repeated damage on the same target updates the same widget instance, accumulating the
displayed value.
When creating custom combat text visuals in the Unreal Engine editor, your Blueprint widgets should inherit from this class to gain access to the built-in accumulation/fade-out logic and lifecycle events.
Blueprint Events (Blueprint Native Events)
Section titled “Blueprint Events (Blueprint Native Events)”FadeIn(EventData: FMageItCombatTextEvent)Fired when the widget is first assigned to a target (no prior active widget existed for it). The default implementation setsDamage = EventData.DamageAmountand starts the fade-out timer.UpdateDamage(EventData: FMageItCombatTextEvent)Fired when a new hit lands on a target that already owns this widget. The default implementation addsEventData.DamageAmounttoDamageand restarts the fade-out timer — this is what makes rapid hits accumulate into one growing number instead of spawning duplicate widgets.FadeOutFired when the fade-out timer elapses with no further hits. The default implementation resetsDamageto0, sets visibility toCollapsed, and callsRenderer->ReturnWidgetToPool(this).
Properties
Section titled “Properties”Read-Only (Blueprint)
Section titled “Read-Only (Blueprint)”Damage(Float,BlueprintReadOnly): The current accumulated damage value. Bind aText Blockto this to display the number.TargetActor(WeakObjectPtr<AActor>,BlueprintReadOnly): The actor this widget currently represents.Renderer(WeakObjectPtr<UMageItCombatTextRendererUMG>,BlueprintReadOnly): The owning renderer instance, used to return the widget to its pool.
Configuration
Section titled “Configuration”FadeOutDelay(Float,EditDefaultsOnly,BlueprintReadOnly): Seconds of inactivity after the last hit beforeFadeOutfires. Default0.5.
Internal Behavior
Section titled “Internal Behavior”Both FadeIn and UpdateDamage call a shared internal helper that sets the widget’s visibility to Visible and
(re)starts a timer for FadeOutDelay seconds targeting OnAccumulationFinished, which calls FadeOut. Because
every new hit restarts this timer, a target being damaged continuously keeps its number visible and growing for as
long as hits keep landing, and only fades once damage stops for FadeOutDelay seconds.