Status Effect Manager
Last updated
Was this helpful?
Last updated
Was this helpful?
The Status Effect Manager (AC_StatusEffectManager) is a lightweight yet essential component responsible for managing status effects in the project, for both player and AI. It provides functionality to add, track, and manage the buildup and decay of status effects, ensuring seamless integration with gameplay mechanics.
It is added to the Base Character class by default (B_Base_Character).
Adding Status Effects:
Status effects can be added dynamically via multiple methods:
TryAddStatusEffect
StartBuildup
AddOneShotBuildup
When added, the manager checks if the effect is already active:
If Active: Won't re-instantiate the effect.
If New: Will insantiate the relevant UObject for the status effect and start tracking it.
Tracking Active Effects:
Keeps a map of active status effects for quick lookup.
Buildup and Decay:
Buildup mechanics allow effects to accumulate gradually over time (e.g., poison buildup from multiple hits).
Once the buildup threshold is reached, the effect activates fully.
Effects automatically decay or are removed based on their duration or external triggers.
B_StatusEffectArea & B_StatusEffectOneShot are great example actors that demonstrate how the Status Effect Manager component can be utilized.
Both of these functions will call TryAddStatusEffect
if the target Status Effect is not active. So it almost never has to be called manually.