UCrowdControlEffectComponent
Inherits UActorComponent
A self-contained Crowd Control effect. Add one component per effect to an actor, or create a Blueprint subclass for each effect. The component can register itself on BeginPlay, route matching requests to OnEffectTriggered, send the returned response, and manage the lifecycle of timed effects.
See the Effect Components tutorial for a walkthrough.
Public Member Functions
ECrowdControlEffectResult
Override in Blueprint or C++ to apply the effect. Return Pending when the request will be completed later with a Complete function. ViewerName may be empty for test effects.
void
Override to react when a timed effect is paused.
void
Override to react when a timed effect resumes.
void
Override to remove a timed effect's gameplay state when its duration expires or it is stopped early.
void
Registers menu metadata and routes matching requests to this component. Called automatically on BeginPlay when bAutoRegister is true.
void
Removes this component from request routing.
void
Completes the request that returned Pending with success.
void
Completes the request that returned Pending with a temporary failure.
void
Completes the request that returned Pending with a permanent failure.
bool
Returns whether this timed effect is currently running.
bool
Returns whether this timed effect is paused.
float
Returns the remaining local duration in seconds.
void
Pauses the local countdown, invokes OnEffectPaused, and notifies Crowd Control.
void
Resumes the local countdown, invokes OnEffectResumed, and notifies Crowd Control.
void
Ends the timed effect early and invokes OnEffectStopped.
bool
Shows or hides this effect in the menu.
bool
Enables or disables purchases for this effect without changing its visibility.
void
C++ only. Called by the subsystem to route a matching request into this component.
void
Registers the component when bAutoRegister is true and enables ticking only while needed.
void
Unregisters the component and cleans up an active timed effect.
void
Advances the local countdown for a running timed effect.
Public Attributes
FString
EffectID
Unique effect ID. It must be lowercase, contain no spaces, and match the effect pack.
FString
DisplayName
The effect name shown to viewers.
FString
Description
The effect description shown to viewers.
int32
Price
The default price in coins. The editor clamps this to at least 1.
TArray
Categories
Menu categories assigned to the effect.
float
Duration
Duration in seconds. Zero creates an instant effect; a positive value creates a timed effect. The editor range is 0 to 600 seconds.
bool
bAutoRegister
Whether to register the effect automatically during BeginPlay. Defaults to true.
