Reference Devices compiles

stat_powerup_device: Buff and Debuff Players on Demand

The `stat_powerup_device` lets you instantly boost or reduce a player's stats — score, eliminations, custom stats, and more — either by placing a pickup in the world or granting it directly from Verse. Whether you're building a wave-survival game that rewards survivors with a score multiplier, or a capture-point mode that penalizes the losing team, this device gives you precise, scriptable control over stat changes with configurable magnitude and duration.

Updated Examples verified on the live UEFN compiler
Watch the Knotstat_powerup_device in ~90 seconds.

Overview

The stat_powerup_device is a subclass of powerup_device that applies a configurable stat change (positive or negative) to any agent who picks it up or receives it via Verse. It solves the problem of needing dynamic, timed stat modifications without hard-coding values in the UEFN editor — you can call SetMagnitude and SetDuration at runtime to tune the buff on the fly.

Reach for this device when you need to:

  • Grant a score/elimination bonus to players who complete an objective
  • Apply a temporary stat penalty to the losing team
  • Spawn a collectible buff pickup at a world location that players race to grab
  • Check whether a player currently has a stat effect active before applying another

The device exposes SetMagnitude / GetMagnitude (the stat delta), SetDuration / GetDuration (how long the effect lasts), Spawn / Despawn (world presence), Pickup (grant directly), HasEffect / GetRemainingTime (query state), and ItemPickedUpEvent (react when grabbed).

API Reference

stat_powerup_device

Used to increase or decrease a stat for an agent.

Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse). Inherited members are merged from powerup_device.

stat_powerup_device<public> := class<concrete><final>(powerup_device):

Events (subscribe a handler to react):

Event Signature Description
ItemPickedUpEvent ItemPickedUpEvent<public>:listenable(agent) Signaled when the powerup is picked up by an agent. Sends the agent that picked up the powerup.

Methods (call these to make the device act):

Method Signature Description
SetMagnitude SetMagnitude<public>(Magnitude:float):void Sets the Magnitude for this powerup, clamped to the Min and Max defined in the device. Will not apply to any currently applied effects. For the Stat Powerup, this is the value of the stat that the powerup will add or remove to a player th
GetMagnitude GetMagnitude<public>()<transacts>:float Returns the current Magnitude for the powerup. For the Stat Powerup, this is the value of the stat that the powerup will add or remove to a player that picks up the powerup.
Spawn Spawn<public>():void Spawns the powerup into the experience so users can interact with it.
Despawn Despawn<public>():void Despawns this powerup from the experience.
SetDuration SetDuration<public>(Time:float):void Updates the Duration for this powerup, clamped to the Min and Max defined in the device. Will not apply to any currently applied effects.
GetDuration GetDuration<public>()<transacts>:float Returns the Duration that this powerup will be active for on any player it is applied to.
GetRemainingTime GetRemainingTime<public>(Agent:agent)<transacts>:float If the Agent has the effect applied to them, this will return the remaining time the effect has. Returns -1.0 if the effect has an infinite duration. Returns 0.0 if the Agent does not have the effect applied.
HasEffect HasEffect<public>(Agent:agent)<transacts><decides>:void Returns the Agent has the powerup's effect (or another of the same type) applied to them.
IsSpawned IsSpawned<public>()<transacts><decides>:void Succeeds if the powerup is currently spawned.
Pickup Pickup<public>(Agent:agent):void Grants this powerup to Agent.
Pickup Pickup<public>():void Grants this powerup without an agent reference. Requires Apply To set to All Players.

powerup_device

Base class for various powerup devices offering common events like ItemPickedUpEvent.

Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse).

powerup_device<public> := class<abstract><epic_internal>(creative_device_base):

Events (subscribe a handler to react):

Event Signature Description
ItemPickedUpEvent ItemPickedUpEvent<public>:listenable(agent) Signaled when the powerup is picked up by an agent. Sends the agent that picked up the powerup.

Methods (call these to make the device act):

Method Signature Description
Spawn Spawn<public>():void Spawns the powerup into the experience so users can interact with it.
Despawn Despawn<public>():void Despawns this powerup from the experience.
SetDuration SetDuration<public>(Time:float):void Updates the Duration for this powerup, clamped to the Min and Max defined in the device. Will not apply to any currently applied effects.
GetDuration GetDuration<public>()<transacts>:float Returns the Duration that this powerup will be active for on any player it is applied to.
GetRemainingTime GetRemainingTime<public>(Agent:agent)<transacts>:float If the Agent has the effect applied to them, this will return the remaining time the effect has. Returns -1.0 if the effect has an infinite duration. Returns 0.0 if the Agent does not have the effect applied.
HasEffect HasEffect<public>(Agent:agent)<transacts><decides>:void Returns the Agent has the powerup's effect (or another of the same type) applied to them.
IsSpawned IsSpawned<public>()<transacts><decides>:void Succeeds if the powerup is currently spawned.
Pickup Pickup<public>(Agent:agent):void Grants this powerup to Agent.
Pickup Pickup<public>():void Grants this powerup without an agent reference. Requires Apply To set to All Players.

Walkthrough

Scenario: A capture-point arena. When Team A captures the point, a score-buff powerup spawns in the center of the map. The first player to grab it gets a +50 score boost for 20 seconds. When picked up, the pickup despawns so no one else can grab it, and a console message logs who has the effect and how long remains.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

# Attach this Verse device to a creative_device actor in UEFN.
# Wire CapturePointBuff to a stat_powerup_device placed in the level.
capture_point_buff_manager := class(creative_device):

    # The stat powerup placed in the level — wire this in the Details panel.
    @editable
    CapturePointBuff : stat_powerup_device = stat_powerup_device{}

    # A trigger_device that fires when Team A captures the point.
    @editable
    CapturePointTrigger : trigger_device = trigger_device{}

    # Localized helper so we can pass message params.
    BuffPickedUpMsg<localizes>(Name : string) : message = "Score buff grabbed by {Name}!"
    RemainingMsg<localizes>(Secs : string) : message = "Effect time remaining: {Secs}s"

    OnBegin<override>()<suspends> : void =
        # Configure the powerup at runtime before anyone can grab it.
        # +50 stat points, active for 20 seconds.
        CapturePointBuff.SetMagnitude(50.0)
        CapturePointBuff.SetDuration(20.0)

        # Start despawned — only appears after the point is captured.
        CapturePointBuff.Despawn()

        # React when Team A captures the point.
        CapturePointTrigger.TriggeredEvent.Subscribe(OnPointCaptured)

        # React when any player picks up the buff.
        CapturePointBuff.ItemPickedUpEvent.Subscribe(OnBuffPickedUp)

    # Called when the capture trigger fires (agent param is ?agent from trigger).
    OnPointCaptured(Agent : ?agent) : void =
        # Only spawn the pickup if it isn't already in the world.
        if (not CapturePointBuff.IsSpawned[]):
            CapturePointBuff.Spawn()

    # Called when a player grabs the pickup. ItemPickedUpEvent sends agent (not ?agent).
    OnBuffPickedUp(Agent : agent) : void =
        # Despawn immediately so no second player can grab it.
        CapturePointBuff.Despawn()

        # Query how long the effect will last on this agent.
        Remaining := CapturePointBuff.GetRemainingTime(Agent)

        # Log remaining time (convert float to string via interpolation).
        Print("Buff applied! Duration configured: {CapturePointBuff.GetDuration()}")
        Print("Remaining on agent: {Remaining}")

Line-by-line explanation:

Lines What's happening
@editable CapturePointBuff Wires the placed stat_powerup_device into Verse — mandatory for calling its methods.
SetMagnitude(50.0) Sets the stat delta to +50 at runtime, overriding whatever was set in the editor.
SetDuration(20.0) The effect will last 20 seconds on whoever picks it up.
CapturePointBuff.Despawn() Hides the pickup at game start; it only appears on capture.
CapturePointTrigger.TriggeredEvent.Subscribe(OnPointCaptured) Listens for the capture event.
CapturePointBuff.ItemPickedUpEvent.Subscribe(OnBuffPickedUp) Listens for the grab event; handler receives agent (not ?agent).
not CapturePointBuff.IsSpawned[] IsSpawned is a <decides> expression — use [] call syntax inside if.
CapturePointBuff.Despawn() inside handler Removes the pickup so only one player benefits.
GetRemainingTime(Agent) Returns seconds left; useful for UI or follow-up logic.

Common patterns

Pattern 1 — Grant the buff directly (no world pickup needed)

Sometimes you want to apply the stat buff to a specific player programmatically — for example, rewarding the MVP at round end — without requiring them to walk over a pickup.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

# Wire MvpBuff to a stat_powerup_device. Set "Apply To" = "Triggering Player" in the editor.
mvp_reward_device := class(creative_device):

    @editable
    MvpBuff : stat_powerup_device = stat_powerup_device{}

    # A trigger the game manager fires when it determines the MVP.
    @editable
    MvpTrigger : trigger_device = trigger_device{}

    OnBegin<override>()<suspends> : void =
        MvpBuff.SetMagnitude(100.0)
        MvpBuff.SetDuration(30.0)
        MvpTrigger.TriggeredEvent.Subscribe(OnMvpDetermined)

    OnMvpDetermined(Agent : ?agent) : void =
        # Unwrap the optional agent before calling Pickup.
        if (A := Agent?):
            # Grant the buff directly — no world pickup required.
            MvpBuff.Pickup(A)

Key call: Pickup(Agent:agent) — grants the powerup effect to a specific agent without them needing to touch a world item.


Pattern 2 — Check for active effect before stacking

Prevent double-buffing: only grant the powerup if the player doesn't already have the effect.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

# Wire ScoreBuff to a stat_powerup_device placed in the level.
no_stack_buff_device := class(creative_device):

    @editable
    ScoreBuff : stat_powerup_device = stat_powerup_device{}

    @editable
    GrantTrigger : trigger_device = trigger_device{}

    OnBegin<override>()<suspends> : void =
        ScoreBuff.SetMagnitude(25.0)
        ScoreBuff.SetDuration(15.0)
        GrantTrigger.TriggeredEvent.Subscribe(OnGrantRequested)

    OnGrantRequested(Agent : ?agent) : void =
        if (A := Agent?):
            # HasEffect is <decides> — use [] syntax; succeeds if effect is already on the agent.
            if (ScoreBuff.HasEffect[A]):
                # Agent already buffed — show remaining time instead of re-granting.
                Remaining := ScoreBuff.GetRemainingTime(A)
                Print("Already buffed! {Remaining}s remaining.")
            else:
                ScoreBuff.Pickup(A)
                Print("Buff granted!")

Key calls: HasEffect[Agent] (decides expression) + GetRemainingTime(Agent) — together they let you build stacking rules and display timers.


Pattern 3 — Dynamic magnitude scaling (wave survival)

Each wave, increase the magnitude of a score powerup so late-game pickups are worth more.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

# Wire WaveScorePowerup to a stat_powerup_device.
wave_scaling_powerup_device := class(creative_device):

    @editable
    WaveScorePowerup : stat_powerup_device = stat_powerup_device{}

    @editable
    WaveEndTrigger : trigger_device = trigger_device{}

    var CurrentWave : int = 0
    BaseMagnitude : float = 10.0
    MagnitudePerWave : float = 5.0

    OnBegin<override>()<suspends> : void =
        WaveScorePowerup.SetMagnitude(BaseMagnitude)
        WaveScorePowerup.SetDuration(10.0)
        WaveScorePowerup.Spawn()
        WaveEndTrigger.TriggeredEvent.Subscribe(OnWaveEnded)

    OnWaveEnded(Agent : ?agent) : void =
        set CurrentWave = CurrentWave + 1
        # Scale magnitude with each wave.
        NewMagnitude := BaseMagnitude + (MagnitudePerWave * CurrentWave)
        WaveScorePowerup.SetMagnitude(NewMagnitude)
        # Respawn the pickup for the new wave.
        if (not WaveScorePowerup.IsSpawned[]):
            WaveScorePowerup.Spawn()
        Print("Wave {CurrentWave}: powerup magnitude now {WaveScorePowerup.GetMagnitude()}")

Key calls: SetMagnitude + GetMagnitude + Spawn — demonstrates reading back the current value after writing it, and re-spawning the pickup each wave.

Gotchas

1. SetMagnitude and SetDuration don't affect active effects

Both methods explicitly state they will not apply to effects already running on players. Call them before the pickup is granted or before Spawn() to ensure the new values take effect on the next pickup.

2. IsSpawned and HasEffect are <decides> — use [] not ()

These are failable expressions. Call them with bracket syntax inside an if:

if (MyPowerup.IsSpawned[]):
    # safe to despawn

Using () syntax will produce a compile error.

3. ItemPickedUpEvent sends agent, not ?agent

Unlike many trigger events that send ?agent, ItemPickedUpEvent : listenable(agent) hands your handler a concrete agent — no unwrapping needed. Your handler signature must be (Agent : agent) : void.

4. Pickup() (no-arg) requires "Apply To = All Players" in the editor

The zero-argument overload broadcasts the effect to every player, but only works when the device's Apply To property is set to All Players in the UEFN Details panel. Using it with any other setting silently does nothing.

5. GetRemainingTime returns special sentinels

  • Returns -1.0 for an infinite duration effect.
  • Returns 0.0 if the agent does not have the effect at all. Always check HasEffect[Agent] first if you need to distinguish "no effect" from a nearly-expired one.

6. Magnitude is clamped to editor-defined Min/Max

SetMagnitude clamps to the Min and Max values configured on the device in the UEFN Details panel. If your runtime value seems wrong, check those bounds — a SetMagnitude(999.0) call will be silently clamped to the editor maximum.

Build your own lesson with stat_powerup_device

Generate a personalized, step-by-step lesson plan built around this object — grounded in this exact reference and our compile-verified knowledge base.

Build a lesson →