Skip to content

UCrowdControlEffectComponent

Inherits UActorComponent

A self-contained Crowd Control effect. Add one per effect to any actor (or make a Blueprint subclass per effect), fill in the metadata, and override OnEffectTriggered. The component registers itself on BeginPlay and automatically sends the response based on your return value. See the Effect Components tutorial for a walkthrough.

Properties

PropertyDescription
EffectIDUnique effect ID (lowercase, no spaces) - must match the effect pack.
DisplayNameName shown to viewers.
DescriptionDescription shown to viewers.
PriceDefault price in coins (min 1).
CategoriesMenu categories.
DurationSeconds; 0 = instant effect, > 0 = timed effect.
bAutoRegisterRegister with the subsystem on BeginPlay (default true).

Trigger Handling

MemberDescription
OnEffectTriggered(RequestID, Quantity, Parameters, ViewerName)Override in Blueprint or C++. ViewerName is the display name of the viewer who bought the effect. Return an ECrowdControlEffectResult: Success, FailTemporary, FailPermanent, or Pending.
CompleteSuccess()Finish a Pending trigger with success.
CompleteFailTemporary(Message)Finish a Pending trigger with a temporary failure.
CompleteFailPermanent(Message)Finish a Pending trigger with a permanent failure.

Timed Effects

MemberDescription
OnEffectPaused() / OnEffectResumed() / OnEffectStopped()Overridable lifecycle events. OnEffectStopped fires when the duration expires or the effect is stopped early - undo the effect's gameplay state there.
Pause() / Resume()Pause/resume the countdown and notify Crowd Control.
Stop()End the running effect early.
IsRunning() / IsPaused() / GetTimeRemaining()Current timed-effect state.

While a timed effect is running, additional triggers of the same effect are automatically answered with a temporary failure.

Registration & Menu State

MemberDescription
Register() / Unregister()Manual registration (when bAutoRegister is off).
SetVisibility(bVisible)Show/hide this effect in the menu.
SetAvailability(bAvailable)Mark this effect purchasable or not. Independent from visibility.