Overview
The item_spawner_device (and its abstract base base_item_spawner_device) is the UEFN device that places a pickupable item in the world. Out of the box you configure it in the Details panel, but Verse gives you full runtime control:
- Enable / Disable — turn the spawner on or off mid-game (great for locked areas or timed events).
- SpawnItem — force an immediate spawn without waiting for the respawn timer.
- CycleToNextItem — rotate through a list of configured items, perfect for a rotating loot pool.
- SetEnableRespawnTimer / SetTimeBetweenSpawns — dynamically tune how quickly the item comes back after pickup.
- ItemPickedUpEvent — react the instant an agent grabs the item (award score, trigger a cinematic, open a door).
Reach for item_spawner_device whenever you need items that are more than static props — loot that unlocks a vault, a key item that starts a boss fight, or a weapon that cycles every 30 seconds.
API Reference
base_item_spawner_device
Base class for devices that spawn items.
Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse).
base_item_spawner_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 an agent picks up the spawned item. Sends the agent that picked up the item. |
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. |
item_spawner_device
Used to configuration and spawn items that players can pick up and use.
Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse). Inherited members are merged from base_item_spawner_device.
item_spawner_device<public> := class<concrete><final>(base_item_spawner_device):
Events (subscribe a handler to react):
| Event | Signature | Description |
|---|---|---|
ItemPickedUpEvent |
ItemPickedUpEvent<public>:listenable(agent) |
Signaled when an agent picks up the spawned item. Sends the agent that picked up the item. |
Methods (call these to make the device act):
| Method | Signature | Description |
|---|---|---|
CycleToNextItem |
CycleToNextItem<public>():void |
Cycles device to next configured item. |
SpawnItem |
SpawnItem<public>():void |
Spawns the current item. |
SetEnableRespawnTimer |
SetEnableRespawnTimer<public>((local:)Respawn:logic):void |
Sets device Respawn Item on Timer option (see SetTimeBetweenSpawns) |
GetEnableRespawnTimer |
GetEnableRespawnTimer<public>()<transacts>:logic |
Returns device Respawn Item on Timer option (see SetTimeBetweenSpawns) |
SetTimeBetweenSpawns |
SetTimeBetweenSpawns<public>(Time:float):void |
Sets the Time Between Spawns (in seconds) after an item is collected before the next is spawned, if this device has Respawn Item on Timer enabled (see SetEnableRespawnTimer) |
GetTimeBetweenSpawns |
GetTimeBetweenSpawns<public>()<transacts>:float |
Returns the Time Between Spawns (in seconds) after an item is collected before the next is spawned, if this device has Respawn Item on Timer enabled (see SetEnableRespawnTimer) |
Enable |
Enable<public>():void |
Enables this device. |
Disable |
Disable<public>():void |
Disables this device. |
Walkthrough
Scenario: A locked vault room. A special keycard spawner sits on a pedestal. The spawner starts disabled. When the round begins, the keycard appears. The first player to grab it gets a score bonus, the spawner disables itself so no second keycard can appear, and a cinematic plays to reveal the vault door opening.
# vault_keycard_manager.verse
# Place this Verse device in your level, then wire up the @editable fields
# in the Details panel.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# Localized helper for score-manager messages (not used here, but
# shown as the correct pattern if you ever pass `message` params).
VaultMessage<localizes>(S : string) : message = "{S}"
vault_keycard_manager := class(creative_device):
# The Item Spawner that holds the keycard item.
@editable
KeycardSpawner : item_spawner_device = item_spawner_device{}
# A Score Manager device to reward the player who grabs the keycard.
@editable
ScoreManager : score_manager_device = score_manager_device{}
# A Cinematic Sequence device that plays the vault-door-opening animation.
@editable
VaultCinematic : cinematic_sequence_device = cinematic_sequence_device{}
# Tracks whether the keycard has already been picked up this round.
var KeycardClaimed : logic = false
OnBegin<override>()<suspends> : void =
# 1. Start disabled — the keycard is hidden until the round begins.
KeycardSpawner.Disable()
# 2. Wait 5 seconds (simulating a round-start countdown), then
# enable the spawner and force an immediate spawn so the
# keycard appears right away rather than waiting for the
# device's own respawn timer.
Sleep(5.0)
KeycardSpawner.Enable()
KeycardSpawner.SpawnItem()
# 3. Subscribe to the pickup event so we know the moment
# a player grabs the keycard.
KeycardSpawner.ItemPickedUpEvent.Subscribe(OnKeycardPickedUp)
# Called by the runtime whenever an agent picks up the spawned item.
# ItemPickedUpEvent is a listenable(agent), so the handler receives
# a plain `agent` (not ?agent).
OnKeycardPickedUp(Picker : agent) : void =
# Guard: only the first pickup counts.
if (not KeycardClaimed?):
set KeycardClaimed = true
# Award score to the agent who grabbed the keycard.
ScoreManager.Activate(Picker)
# Disable the spawner so no second keycard can appear.
KeycardSpawner.Disable()
# Play the vault-door cinematic for everyone.
VaultCinematic.Play()
Line-by-line explanation
| Lines | What's happening |
|---|---|
@editable fields |
Declare every device reference as an editable field so UEFN can wire the placed device to this script. A bare item_spawner_device{} is just a default — the Details panel replaces it with your actual placed device. |
KeycardSpawner.Disable() |
Hides the spawner at game start so the keycard isn't grabbable yet. |
Sleep(5.0) |
Suspends execution for 5 seconds inside OnBegin (which is <suspends>). |
KeycardSpawner.Enable() then SpawnItem() |
Re-activates the spawner and immediately forces the item into the world rather than waiting for the device's built-in respawn delay. |
.ItemPickedUpEvent.Subscribe(OnKeycardPickedUp) |
Registers our handler at class scope. The event fires with the agent who grabbed the item. |
if (not KeycardClaimed?) |
Guards against duplicate pickups (e.g. if two players grab simultaneously). |
ScoreManager.Activate(Picker) |
Awards points to the specific agent who grabbed the keycard. |
VaultCinematic.Play() |
Triggers the vault-door animation for all players. |
Common patterns
Pattern 1 — Dynamic respawn timer (slow it down as the game progresses)
Start with a fast 10-second respawn, then after 60 seconds of game time slow it to 30 seconds to make loot scarcer in the late game.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
dynamic_respawn_manager := class(creative_device):
@editable
AmmoSpawner : item_spawner_device = item_spawner_device{}
OnBegin<override>()<suspends> : void =
# Enable auto-respawn and set a fast 10-second interval.
AmmoSpawner.SetEnableRespawnTimer(true)
AmmoSpawner.SetTimeBetweenSpawns(10.0)
AmmoSpawner.Enable()
AmmoSpawner.SpawnItem()
# After 60 seconds, slow the respawn to 30 seconds.
Sleep(60.0)
AmmoSpawner.SetTimeBetweenSpawns(30.0)
# Confirm the new value (useful for debugging).
CurrentInterval := AmmoSpawner.GetTimeBetweenSpawns()
# CurrentInterval is now 30.0
_ = CurrentInterval # suppress unused-variable warning
Pattern 2 — Cycling weapon pool on pickup
Every time a player grabs the current weapon, cycle to the next configured item so the next spawn offers a different gun. This creates a rotating loot pool without any additional devices.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
weapon_cycle_manager := class(creative_device):
@editable
WeaponSpawner : item_spawner_device = item_spawner_device{}
OnBegin<override>()<suspends> : void =
# Start with respawn timer on so the next item appears automatically.
WeaponSpawner.SetEnableRespawnTimer(true)
WeaponSpawner.SetTimeBetweenSpawns(15.0)
WeaponSpawner.Enable()
WeaponSpawner.SpawnItem()
WeaponSpawner.ItemPickedUpEvent.Subscribe(OnWeaponPickedUp)
OnWeaponPickedUp(Picker : agent) : void =
# Advance the spawner to the next item in its configured list.
# The next auto-respawn (15 s from now) will spawn that new item.
WeaponSpawner.CycleToNextItem()
Pattern 3 — Enable/Disable a spawner based on zone capture
A capture-area device controls whether the item spawner is active. When the zone is captured the spawner turns on; when it's lost it turns off. (Wire CaptureArea in the Details panel.)
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
zone_loot_controller := class(creative_device):
@editable
PowerUpSpawner : item_spawner_device = item_spawner_device{}
# A capture_area_device whose events drive the spawner.
@editable
CaptureArea : capture_area_device = capture_area_device{}
OnBegin<override>()<suspends> : void =
# Spawner starts off — no loot until the zone is held.
PowerUpSpawner.Disable()
CaptureArea.TeamCapturesEvent.Subscribe(OnZoneCaptured)
CaptureArea.TeamLosesEvent.Subscribe(OnZoneLost)
OnZoneCaptured(CapturingAgent : agent) : void =
PowerUpSpawner.Enable()
PowerUpSpawner.SpawnItem() # Immediately reward the capturing team.
OnZoneLost(LosingAgent : agent) : void =
PowerUpSpawner.Disable()
Note:
capture_area_deviceevents (TeamCapturesEvent,TeamLosesEvent) sendagent— no unwrapping needed.
Gotchas
1. @editable is mandatory — default constructors do nothing
Writing WeaponSpawner : item_spawner_device = item_spawner_device{} without @editable gives you a blank default object, not your placed device. Every device reference must be @editable and wired in the Details panel.
2. ItemPickedUpEvent sends agent, not ?agent
base_item_spawner_device.ItemPickedUpEvent is typed listenable(agent) — the handler receives a concrete agent, not an optional. Do not write if (A := Agent?) — just use Agent directly.
3. SpawnItem() vs. the built-in respawn timer
Calling SpawnItem() forces an immediate spawn regardless of the respawn timer state. If you also have SetEnableRespawnTimer(true), the timer still runs after the item is picked up — SpawnItem() only bypasses the current wait, not future ones.
4. SetTimeBetweenSpawns requires SetEnableRespawnTimer(true) first
Setting a time interval has no effect unless the respawn timer is enabled. Always call SetEnableRespawnTimer(true) before SetTimeBetweenSpawns.
5. GetTimeBetweenSpawns and GetEnableRespawnTimer are <transacts>
These getters carry the <transacts> effect, meaning they can fail (roll back) in a transaction context. In normal game logic you can call them freely, but be aware if you use them inside a <decides> or <transacts> block.
6. message parameters need a localizes function
If you ever pass text to a device that accepts a message type, you cannot pass a raw string. Declare a helper:
MyLabel<localizes>(S : string) : message = "{S}"
Then pass MyLabel("Keycard Grabbed"). There is no StringToMessage function in Verse.
7. Disable() does not despawn an already-spawned item
Calling Disable() prevents future spawns but does not remove an item that is already sitting in the world. If you need to remove the current item, you'll need a separate mechanism (e.g. a prop mover or barrier device).