Overview
The drum_player_device lives inside the Patchwork audio system — Fortnite's node-based music toolkit. In the editor you configure which drum samples it plays and how it receives note triggers from other Patchwork devices (like a drum_sequencer_device). From Verse you get two runtime controls:
Enable()— activates the device so it responds to incoming note signals and produces audio.Disable()— silences the device and stops it from responding to note signals.
Reach for drum_player_device whenever you want dynamic music that reacts to game state: a tension-building drum loop that stops when a player opens a vault, percussion that kicks in only during a boss fight, or a rhythm puzzle where beats turn on and off as players hit pressure plates.
API Reference
drum_player_device
Turn Patchwork note inputs into audio using drum samples.
Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse). Inherited members are merged from patchwork_device.
drum_player_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: The Boss Arena Drum Loop
You have a boss arena. When the round starts the drum track is silent. The moment a player steps on a trigger plate inside the arena, the drums kick in. When the boss is eliminated (a second trigger fires), the drums cut out to signal victory.
Place these devices on your island and wire them to the Verse device:
- One
drum_player_device(configured in Patchwork with your drum samples) - One
trigger_devicenamedArenaTrigger(player steps on it to start the fight) - One
trigger_devicenamedBossTrigger(fires when the boss is defeated — wire it to an eliminator device)
using { /Fortnite.com/Devices }
using { /Fortnite.com/Devices/Patchwork }
using { /Verse.org/Simulation }
# boss_arena_drum_controller manages the drum loop for a boss encounter.
# Wire ArenaTrigger to the arena entry plate and BossTrigger to the
# boss eliminator device in the UEFN Details panel.
boss_arena_drum_controller := class(creative_device):
# The Patchwork drum player — configure its samples in the editor.
@editable
DrumPlayer : drum_player_device = drum_player_device{}
# Fires when a player enters the boss arena.
@editable
ArenaTrigger : trigger_device = trigger_device{}
# Fires when the boss is eliminated.
@editable
BossTrigger : trigger_device = trigger_device{}
# Called when the game session starts.
OnBegin<override>()<suspends> : void =
# Drums are silent at the start of the round.
DrumPlayer.Disable()
# Subscribe to both triggers.
ArenaTrigger.TriggeredEvent.Subscribe(OnArenaEntered)
BossTrigger.TriggeredEvent.Subscribe(OnBossDefeated)
# Handler: player stepped into the arena — start the drums.
OnArenaEntered(Agent : ?agent) : void =
DrumPlayer.Enable()
# Handler: boss was eliminated — silence the drums.
OnBossDefeated(Agent : ?agent) : void =
DrumPlayer.Disable()
Line-by-line explanation:
| Lines | What's happening |
|---|---|
@editable DrumPlayer |
Exposes the drum_player_device reference in the UEFN Details panel so you can point it at your placed device. |
@editable ArenaTrigger / BossTrigger |
Same pattern for both trigger devices. |
DrumPlayer.Disable() in OnBegin |
Ensures drums are off at round start regardless of editor defaults. |
ArenaTrigger.TriggeredEvent.Subscribe(OnArenaEntered) |
Registers the handler method — called every time the trigger fires. |
OnArenaEntered(Agent : ?agent) |
TriggeredEvent delivers an optional agent; we accept it but don't need to unwrap it here. |
DrumPlayer.Enable() |
Tells the drum player to start responding to Patchwork note signals → drums play. |
DrumPlayer.Disable() |
Cuts the drum audio when the boss dies. |
Common patterns
Pattern 1 — Toggle drums on a button press (Enable)
A button in a music room lets players turn the drum track on interactively.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Devices/Patchwork }
using { /Verse.org/Simulation }
drum_button_enabler := class(creative_device):
@editable
DrumPlayer : drum_player_device = drum_player_device{}
@editable
StartButton : button_device = button_device{}
OnBegin<override>()<suspends> : void =
# Drums off until a player presses the button.
DrumPlayer.Disable()
StartButton.InteractedWithEvent.Subscribe(OnButtonPressed)
OnButtonPressed(Agent : agent) : void =
# Enable the drum player so it responds to Patchwork note inputs.
DrumPlayer.Enable()
Pattern 2 — Disable drums when a countdown ends (Disable)
A timer device counts down a round. When time expires the drum loop stops to signal the end of the phase.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Devices/Patchwork }
using { /Verse.org/Simulation }
drum_round_timer := class(creative_device):
@editable
DrumPlayer : drum_player_device = drum_player_device{}
# A timer_device configured to count down the round length.
@editable
RoundTimer : timer_device = timer_device{}
OnBegin<override>()<suspends> : void =
# Drums play from the moment the round starts.
DrumPlayer.Enable()
# When the timer hits zero, cut the drums.
RoundTimer.SuccessEvent.Subscribe(OnRoundEnd)
OnRoundEnd(Agent : ?agent) : void =
DrumPlayer.Disable()
Pattern 3 — Alternate Enable/Disable with a pressure plate loop
Two pressure plates act as a toggle: one enables the drums, the other disables them. Players can stomp them repeatedly to create a live performance feel.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Devices/Patchwork }
using { /Verse.org/Simulation }
drum_toggle_plates := class(creative_device):
@editable
DrumPlayer : drum_player_device = drum_player_device{}
# Pressure plate that turns drums ON.
@editable
OnPlate : trigger_device = trigger_device{}
# Pressure plate that turns drums OFF.
@editable
OffPlate : trigger_device = trigger_device{}
OnBegin<override>()<suspends> : void =
DrumPlayer.Disable()
OnPlate.TriggeredEvent.Subscribe(OnDrumsOn)
OffPlate.TriggeredEvent.Subscribe(OnDrumsOff)
OnDrumsOn(Agent : ?agent) : void =
DrumPlayer.Enable()
OnDrumsOff(Agent : ?agent) : void =
DrumPlayer.Disable()
Gotchas
1. drum_player_device is a patchwork_device, not a creative_device_base
The class inherits from patchwork_device. You still declare it with @editable inside your class(creative_device) exactly as shown — but be aware it won't have events like TriggeredEvent. It only exposes Enable and Disable from Verse.
2. Enable/Disable control responsiveness, not playback directly
Enable() does not start audio immediately — it makes the device ready to respond to Patchwork note signals coming from upstream devices (like a drum_sequencer_device). If no sequencer is sending notes, you'll hear nothing even after calling Enable(). Make sure your Patchwork graph is wired correctly in the editor.
3. Always set initial state in OnBegin
The editor's device settings control the default enabled/disabled state, but relying on that for runtime logic is fragile. Always call DrumPlayer.Enable() or DrumPlayer.Disable() explicitly in OnBegin so your code is the single source of truth.
4. @editable field is mandatory
You cannot write drum_player_device{}.Enable() as a standalone call — Verse will report Unknown identifier. The device must be declared as an @editable field and linked to a placed instance in the UEFN Details panel.
5. TriggeredEvent delivers ?agent (optional)
When you subscribe to a trigger_device's TriggeredEvent, the handler receives (Agent : ?agent). If you need to act on the specific player who triggered it, unwrap with if (A := Agent?): before using A. In the drum examples above we don't need the agent, so we accept but ignore it.
6. No events on drum_player_device
Unlike many Creative devices, drum_player_device exposes no events from Verse. You can only command it (Enable/Disable); you cannot listen to it. Use other devices (trigger, timer, button) as your event sources.