Reference Devices compiles

value_setter_device: Flip a Patchwork Setting Mid-Game

The `value_setter_device` is a Patchwork device that modifies a setting on another Patchwork device the moment it is triggered. Think of it as a runtime dial you can flip from Verse — perfect for toggling difficulty modifiers, switching game-mode parameters, or gating a mechanic behind a player action. With just two API calls (`Enable` and `Disable`) you get clean, authoritative control over when the setter is active.

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

Overview

The value_setter_device lives in the Patchwork system — Epic's data-driven layer that lets Creative devices expose numeric and boolean settings to one another. When the device is enabled it is allowed to fire and push its configured value to its target device; when disabled it is silenced and does nothing even if its in-world trigger fires.

Reach for value_setter_device when you need to:

  • Turn a difficulty multiplier on or off based on a player action (e.g. stepping on a pressure plate).
  • Gate a score-bonus modifier so it only applies during a specific phase of your game.
  • Toggle a linked Patchwork setting in response to a timer expiring.

Because value_setter_device extends patchwork_device, you wire it up in the UEFN editor (point it at its target device and configure the value it should write), then use Verse purely to control when it is active.

API Reference

value_setter_device

Modify a setting on another Patchwork device when triggered.

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

value_setter_device<public> := class<concrete><final>(patchwork_device):

Methods (call these to make the device act):

Method Signature Description
Enable Enable<public>():void Enables this device.
Disable Disable<public>():void Disables this device.

Walkthrough

Scenario: A pressure plate that activates a damage-boost modifier — but only during the "Power Phase"

A player steps on a trigger_device pressure plate. Your Verse device checks whether the game is in the Power Phase; if it is, it calls Enable() on the value_setter_device so the setter can fire and push its boost value to the linked Patchwork target. When the phase ends (a second trigger fires), the device calls Disable() to silence the setter.

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

# Drop this Verse device on your map, then wire up the three
# @editable fields in the Details panel.
power_phase_controller := class(creative_device):

    # The value_setter_device configured in the editor to write
    # the damage-boost value to its Patchwork target.
    @editable
    DamageBoostSetter : value_setter_device = value_setter_device{}

    # Pressure plate the player steps on to activate the boost.
    @editable
    ActivatePlate : trigger_device = trigger_device{}

    # A second trigger (e.g. a timer output) that ends the phase.
    @editable
    DeactivatePlate : trigger_device = trigger_device{}

    # Tracks whether the Power Phase is currently running.
    var PowerPhaseActive : logic = false

    OnBegin<override>()<suspends> : void =
        # Start with the setter disabled — it won't fire until we allow it.
        DamageBoostSetter.Disable()

        # Subscribe to both plates.
        ActivatePlate.TriggeredEvent.Subscribe(OnActivatePlateTriggered)
        DeactivatePlate.TriggeredEvent.Subscribe(OnDeactivatePlateTriggered)

    # Called when a player steps on the activation plate.
    OnActivatePlateTriggered(Agent : ?agent) : void =
        if (not PowerPhaseActive?):
            set PowerPhaseActive = true
            # Enable the setter so it can push its Patchwork value.
            DamageBoostSetter.Enable()

    # Called when the deactivation trigger fires (e.g. phase timer expires).
    OnDeactivatePlateTriggered(Agent : ?agent) : void =
        if (PowerPhaseActive?):
            set PowerPhaseActive = false
            # Silence the setter — no more value pushes until re-enabled.
            DamageBoostSetter.Disable()

Line-by-line breakdown

Lines What's happening
@editable DamageBoostSetter Exposes the value_setter_device to the Details panel so you can point it at the one you placed on the map.
DamageBoostSetter.Disable() in OnBegin Ensures the setter starts silent — the boost cannot fire until the phase begins.
ActivatePlate.TriggeredEvent.Subscribe(...) Wires the pressure-plate event to our handler at class scope.
OnActivatePlateTriggered(Agent : ?agent) The handler signature matches listenable(?agent) — the agent is optional and we don't need to unwrap it here.
DamageBoostSetter.Enable() Allows the Patchwork setter to fire and push its configured value to the target device.
DamageBoostSetter.Disable() Silences it again when the phase ends.

Common patterns

Pattern 1 — Toggle on every other plate step (alternating enable/disable)

Each time the player steps on a single plate, the setter flips between enabled and disabled — great for a toggle-switch mechanic.

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

toggle_setter_device := class(creative_device):

    @editable
    ToggleSetter : value_setter_device = value_setter_device{}

    @editable
    TogglePlate : trigger_device = trigger_device{}

    var SetterEnabled : logic = false

    OnBegin<override>()<suspends> : void =
        ToggleSetter.Disable()
        TogglePlate.TriggeredEvent.Subscribe(OnTogglePlateTriggered)

    OnTogglePlateTriggered(Agent : ?agent) : void =
        if (SetterEnabled?):
            set SetterEnabled = false
            ToggleSetter.Disable()
        else:
            set SetterEnabled = true
            ToggleSetter.Enable()

Pattern 2 — Enable for a fixed duration, then auto-disable

A player collects a power-up item; the setter is enabled for 10 seconds, then automatically disabled. Uses Sleep inside a spawned async task.

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

timed_setter_controller := class(creative_device):

    @editable
    TimedSetter : value_setter_device = value_setter_device{}

    @editable
    PickupTrigger : trigger_device = trigger_device{}

    # How long (in seconds) the setter stays active after pickup.
    @editable
    ActiveDuration : float = 10.0

    OnBegin<override>()<suspends> : void =
        TimedSetter.Disable()
        PickupTrigger.TriggeredEvent.Subscribe(OnPickupTriggered)

    OnPickupTriggered(Agent : ?agent) : void =
        # Fire-and-forget: enable now, disable after the duration.
        spawn { RunTimedEnable() }

    RunTimedEnable()<suspends> : void =
        TimedSetter.Enable()
        Sleep(ActiveDuration)
        TimedSetter.Disable()

Pattern 3 — Gate the setter behind a player-count check

The setter is only enabled when at least two players have stepped on separate plates — a cooperative unlock mechanic.

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

coop_setter_gate := class(creative_device):

    @editable
    CoopSetter : value_setter_device = value_setter_device{}

    @editable
    PlateA : trigger_device = trigger_device{}

    @editable
    PlateB : trigger_device = trigger_device{}

    var PlateAActive : logic = false
    var PlateBActive : logic = false

    OnBegin<override>()<suspends> : void =
        CoopSetter.Disable()
        PlateA.TriggeredEvent.Subscribe(OnPlateATriggered)
        PlateB.TriggeredEvent.Subscribe(OnPlateBTriggered)

    OnPlateATriggered(Agent : ?agent) : void =
        set PlateAActive = true
        MaybeEnableSetter()

    OnPlateBTriggered(Agent : ?agent) : void =
        set PlateBActive = true
        MaybeEnableSetter()

    MaybeEnableSetter() : void =
        if (PlateAActive? and PlateBActive?):
            CoopSetter.Enable()

Gotchas

1. value_setter_device does nothing without editor wiring

Enable() and Disable() control whether the device is allowed to fire — but the target device and value to write must be configured in the UEFN editor's Details panel before any of this matters. Calling Enable() on an un-wired setter is a no-op.

2. Disable() does not undo a value already pushed

If the setter already fired and wrote a value to its Patchwork target, calling Disable() will not revert that value. You need a second value_setter_device configured to write the original/reset value if you want to undo the change.

3. Always Disable() in OnBegin if you want a controlled start

Devices default to enabled in the editor. If you forget to call Disable() at startup, the setter may fire the moment the game begins — before your Verse logic has a chance to gate it.

4. @editable is mandatory for device references

You cannot write value_setter_device{} as a bare local variable and expect it to control a placed device. The @editable attribute is what binds the Verse field to the actual device instance on your map. Without it, you are operating on a dummy default instance that has no effect.

5. spawn async tasks for timed patterns

If you call Sleep() inside an event handler directly, you will block that handler's execution context. Always spawn { RunTimedEnable() } (as shown in Pattern 2) to let the timed logic run concurrently without stalling other events.

Build your own lesson with value_setter_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 →