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
| Property | Description |
|---|---|
EffectID | Unique effect ID (lowercase, no spaces) - must match the effect pack. |
DisplayName | Name shown to viewers. |
Description | Description shown to viewers. |
Price | Default price in coins (min 1). |
Categories | Menu categories. |
Duration | Seconds; 0 = instant effect, > 0 = timed effect. |
bAutoRegister | Register with the subsystem on BeginPlay (default true). |
Trigger Handling
| Member | Description |
|---|---|
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
| Member | Description |
|---|---|
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
| Member | Description |
|---|---|
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. |
