Overview
The explosive_device is a placeable UEFN hazard that deals damage to everything in a radius when it detonates. Out of the box you can wire it to buttons or timers in the Creative UI, but Verse unlocks three extra superpowers:
Explode(Agent)— detonate the barrel/bomb programmatically and nominate an instigator.Show()/Hide()— make the device appear or disappear at runtime (great for spawning a "hidden" bomb mid-round).ExplodedEvent— alistenable(agent)that fires the moment the device explodes, letting you chain score updates, spawn effects, end rounds, or unlock doors.
When to reach for it: bomb-defusal modes, scripted destruction cutscenes, trap corridors that arm after a player crosses a trigger, or any moment you need a timed or conditional explosion driven by game state rather than a static device chain.
API Reference
explosive_device
Hazard which deals damage in a radius around it when destroyed or triggered.
Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse).
explosive_device<public> := class<concrete><final>(creative_device_base):
Events (subscribe a handler to react):
| Event | Signature | Description |
|---|---|---|
ExplodedEvent |
ExplodedEvent<public>:listenable(agent) |
Signaled when this device explodes. Sends the agent that caused the explosion. |
Methods (call these to make the device act):
| Method | Signature | Description |
|---|---|---|
Show |
Show<public>():void |
Shows this device in the world. |
Hide |
Hide<public>():void |
Hides this device from the world. |
Explode |
Explode<public>(Agent:agent):void |
Triggers this device to explode. Passes Agent as the instigator of the resulting ExplodedEvent. |
Walkthrough
Scenario: Bomb-Site Trap Room
A player steps on a trigger_device pressure plate. After a 3-second countdown the barrel explodes, and when the ExplodedEvent fires we log the instigator and hide the now-spent device so the room resets cleanly.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# Place this Verse device on the map, then wire the @editable fields
# to a trigger_device (pressure plate) and an explosive_device (barrel).
trap_room_manager := class(creative_device):
# The pressure plate the player walks over
@editable
PressurePlate : trigger_device = trigger_device{}
# The explosive barrel sitting in the trap room
@editable
Barrel : explosive_device = explosive_device{}
# Localized helper so we can pass a message to the logger
BarrelBoomText<localizes>(S : string) : message = "{S}"
# Called once when the experience starts
OnBegin<override>()<suspends> : void =
# The barrel starts hidden — it will reveal itself when armed
Barrel.Hide()
# Subscribe to the pressure plate
PressurePlate.TriggeredEvent.Subscribe(OnPlateTriggered)
# Subscribe to the explosion so we can react after the blast
Barrel.ExplodedEvent.Subscribe(OnBarrelExploded)
# Fires when a player steps on the plate
# trigger_device sends ?agent, so we unwrap it before use
OnPlateTriggered(MaybeAgent : ?agent) : void =
if (Instigator := MaybeAgent?):
# Reveal the barrel — the player can now see it arming
Barrel.Show()
# Arm and detonate after a 3-second fuse
spawn:
ArmAndDetonate(Instigator)
# Suspending helper that waits then detonates
ArmAndDetonate(Instigator : agent)<suspends> : void =
Sleep(3.0)
# Detonate — Instigator becomes the agent sent by ExplodedEvent
Barrel.Explode(Instigator)
# Fires when the barrel actually explodes
# ExplodedEvent is listenable(agent) — handler receives agent directly
OnBarrelExploded(Instigator : agent) : void =
# Hide the spent device so the room looks reset
Barrel.Hide()
Line-by-line breakdown:
| Lines | What's happening |
|---|---|
@editable PressurePlate / Barrel |
Declares the two devices so UEFN can wire them in the Details panel. |
Barrel.Hide() in OnBegin |
The barrel is invisible at round start — players won't see it until the trap arms. |
PressurePlate.TriggeredEvent.Subscribe(OnPlateTriggered) |
Hooks the pressure-plate event. trigger_device sends ?agent, so the handler receives MaybeAgent : ?agent. |
if (Instigator := MaybeAgent?) |
Safe unwrap — we only proceed if a real player triggered the plate. |
Barrel.Show() |
Reveals the barrel the moment the trap arms — a visual cue for the player. |
spawn: ArmAndDetonate(Instigator) |
Launches the fuse countdown on a separate coroutine so OnPlateTriggered returns immediately. |
Sleep(3.0) |
The 3-second fuse. |
Barrel.Explode(Instigator) |
Detonates the barrel and marks the stepping player as the instigator. |
Barrel.ExplodedEvent.Subscribe(OnBarrelExploded) |
Reacts to the actual explosion — ExplodedEvent sends agent (not ?agent). |
Barrel.Hide() in OnBarrelExploded |
Cleans up the spent device. |
Common patterns
Pattern 1 — Scripted Cinematic Explosion (calling Explode directly from a button)
A button press triggers an immediate scripted explosion — no fuse, no plate. Useful for cutscene moments or boss-room reveals.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
# Wire DetonatorButton to a button_device and SceneBomb to an explosive_device.
cinematic_detonator := class(creative_device):
@editable
DetonatorButton : button_device = button_device{}
@editable
SceneBomb : explosive_device = explosive_device{}
OnBegin<override>()<suspends> : void =
DetonatorButton.InteractedWithEvent.Subscribe(OnButtonPressed)
# button_device sends ?agent
OnButtonPressed(MaybeAgent : ?agent) : void =
if (Presser := MaybeAgent?):
# Immediately detonate — Presser is the instigator
SceneBomb.Explode(Presser)
Pattern 2 — Scoring on Explosion (reacting to ExplodedEvent)
Every time any barrel in an array explodes, award the instigating player a score update via a score_manager_device.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
# Wire up to 4 explosive_device barrels and one score_manager_device.
barrel_score_tracker := class(creative_device):
@editable
Barrels : []explosive_device = array{}
@editable
ScoreManager : score_manager_device = score_manager_device{}
OnBegin<override>()<suspends> : void =
# Subscribe to every barrel's explosion event
for (Barrel : Barrels):
Barrel.ExplodedEvent.Subscribe(OnAnyBarrelExploded)
# ExplodedEvent sends agent (not ?agent) — no unwrap needed
OnAnyBarrelExploded(Instigator : agent) : void =
# Award the player who caused the explosion
ScoreManager.Activate(Instigator)
Pattern 3 — Hide / Show cycling (toggling barrel visibility per round)
At the start of each round, randomly reveal one of several hidden barrels so players never know which zone is dangerous.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Random }
# Wire several explosive_device barrels and a round_settings_device.
random_barrel_revealer := class(creative_device):
@editable
Barrels : []explosive_device = array{}
@editable
RoundSettings : round_settings_device = round_settings_device{}
OnBegin<override>()<suspends> : void =
# Hide all barrels at start
for (Barrel : Barrels):
Barrel.Hide()
RoundSettings.RoundBeganEvent.Subscribe(OnRoundBegan)
OnRoundBegan(RoundIndex : int) : void =
# First hide everything again (reset from last round)
for (Barrel : Barrels):
Barrel.Hide()
# Pick one barrel at random and reveal it
if (Barrels.Length > 0):
ChosenIndex := GetRandomInt(0, Barrels.Length - 1)
if (Chosen := Barrels[ChosenIndex]):
Chosen.Show()
Gotchas
1. ExplodedEvent sends agent, not ?agent
explosive_device.ExplodedEvent is typed listenable(agent) — the handler signature is (Instigator : agent), not (MaybeAgent : ?agent). Don't add a ? unwrap here or the code won't compile. Contrast this with trigger_device.TriggeredEvent which does send ?agent.
2. Explode requires a real agent — you can't pass false or none
Unlike some events that accept an optional agent, Explode(Agent : agent) demands a concrete agent. Always unwrap your ?agent before calling it, or hold a reference to a known player.
3. @editable is mandatory — you cannot construct devices in Verse
You must declare @editable Barrel : explosive_device = explosive_device{} as a class field and wire it in the UEFN Details panel. Writing explosive_device{}.Explode(...) inline will fail at runtime because the default instance isn't a real placed device.
4. Explode inside a suspending context needs spawn
If you want a fuse delay (Sleep(N)), you must call the whole sequence from a spawn block or a <suspends> method. Calling Sleep directly inside a non-suspending event handler (like a Subscribe callback) is a compile error.
5. Hide does not disarm the device
Calling Hide() makes the barrel invisible but it can still deal damage and its ExplodedEvent will still fire. If you want to prevent damage, configure Can Be Damaged = False in the device's Details panel, or avoid calling Explode on hidden devices.
6. Show/Hide are not a toggle — call the one you mean
There is no SetVisible(bool) or Toggle(). You must track visibility state yourself if you need to flip back and forth, and explicitly call Show() or Hide() as appropriate.