Skip to main content

How to Personalize the DNA Listener Component

Overview

The DNA Listener Component is responsible for registering and updating the visual effects, and dynamically controls Niagara System parameters based on gameplay tags.

You need one on your character to use the Gameplay Tag overrides of the DNA Anim Notify and DNA Anim Notify State.

You can directly use the default one, but you can also create a child Blueprint class that extends from NiagaraDynamicParametersListenerComponent (DNA Listener Component) to customize its behavior.

This can be useful to handle game-specific logic tag addition/removal, or to combine it with GAS (Gameplay Ability System) tag management.

Creating a Child Blueprint Class for game-specific logic

Step 1: Create the Blueprint

  1. Right-click in the Content Browser → Blueprint Class
  2. Search for "DNA Listener" or "NiagaraDynamicParametersListenerComponent"
  3. Select DNA - Listener Component as parent
  4. Name it (e.g., BP_CharacterDNAListener)
Create child blueprint

Step 2: Configure Default Settings

Customize these key properties in your Blueprint:

  • bEnabled - Master enable/disable
  • bAutoCleanupInactiveEffects - Automatic cleanup (recommended: true)
  • CleanupInterval - How often to cleanup inactive effects (seconds)
  • bLogParameterChanges - Enable for debugging
Configure default settings

Example: Health-Based Character Listener

This example shows how to create dynamic visual effects based on character health:

Custom Properties

Add these variables to your Character Blueprint:

  • Health (float)
  • MaxHealth (float)
Add health to the character

Custom Function: UpdateHealthEffects

The UpdateHealthTag function:

  • reads the health from the character
  • cleans up the previous health tag (note the usage of "With Descendants" removal mode)
  • gets the correct tag to apply based on the current health/max health ratio
  • adds the gameplay tag found
Custom Begin Play

GetTagFromHealthPercentage is a quick implementation of getting a tag based on the health percentage.

Custom Begin Play

Implementation

Override BeginPlay to bind to health changes:

Event BeginPlay
├── Get Owner, verify it's my Character blueprint (just in case)
├── Bind to Character's OnHealthChanged event
└── Call: Update Health Tag function
Custom Begin Play

Common Customizations

  • Character Status: Health, stamina, combat state
  • Movement Effects: Speed-based particle intensity
  • Environmental: Weather, time of day, location-based effects
  • Weapon Systems: Ammo count, weapon type, condition

By creating child Blueprint classes, you can easily integrate the DNA system with your specific gameplay mechanics while keeping the core functionality intact.