Overview
The item_spawner_device places a physical pickup on your island — a weapon, consumable, or key item — that a player can run over or interact with to collect. It's the device you reach for whenever the game problem is "give the player a thing they can grab."
Unlike an item granter (which forces an item directly into inventory), the item spawner drops loot in the world. That makes it perfect for a sunny dock scene: a glinting weapon sitting on a crate at the end of the pier, a med-kit that respawns every few seconds in the lagoon shallows, or a treasure key that only appears once the player triggers a switch on the pirate ship.
In Verse you can:
- SpawnItem() — force the current item to appear right now.
- CycleToNextItem() — rotate through the configured Item List (great for random-feeling loot).
- SetEnableRespawnTimer(logic) / SetTimeBetweenSpawns(float) — turn the spawner into a repeating loot fountain.
- Enable() / Disable() — gate the loot behind game state.
- Subscribe to ItemPickedUpEvent to react the moment a player grabs it (award score, open a door, play a cinematic).
We'll pair it with a trigger_device so a player stepping on a shore pressure plate cycles and spawns the next reward.
API Reference
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. |
vector3
3-dimensional vector with
floatcomponents.
Full public surface, resolved verbatim from the live Epic digest (Verse.digest.verse).
vector3<native><public> := struct<concrete><computes><persistable><uht_comparable>:
trigger_device
Used to relay events to other linked devices.
Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse). Inherited members are merged from trigger_base_device.
trigger_device<public> := class<concrete><final>(trigger_base_device):
Events (subscribe a handler to react):
| Event | Signature | Description |
|---|---|---|
TriggeredEvent |
TriggeredEvent<public>:listenable(?agent) |
Signaled when an agent triggers this device. Sends the agent that used this device. Returns false if no agent triggered the action (ex: it was triggered through code). |
Methods (call these to make the device act):
| Method | Signature | Description |
|---|---|---|
Trigger |
Trigger<public>(Agent:agent):void |
Triggers this device with Agent being passed as the agent that triggered the action. Use an agent reference when this device is setup to require one (for instance, you want to trigger the device only with a particular agent. |
Trigger |
Trigger<public>():void |
Triggers this device, causing it to activate its TriggeredEvent event. |
Enable |
Enable<public>():void |
Enables this device. |
Disable |
Disable<public>():void |
Disables this device. |
SetMaxTriggerCount |
SetMaxTriggerCount<public>(MaxCount:int):void |
Sets the maximum amount of times this device can trigger. * 0 can be used to indicate no limit on trigger count. * MaxCount is clamped between [0,20]. |
GetMaxTriggerCount |
GetMaxTriggerCount<public>()<transacts>:int |
Gets the maximum amount of times this device can trigger. * 0 indicates no limit on trigger count. |
GetTriggerCountRemaining |
GetTriggerCountRemaining<public>()<transacts>:int |
Returns the number of times that this device can still be triggered before hitting GetMaxTriggerCount. Returns 0 if GetMaxTriggerCount is unlimited. |
SetResetDelay |
SetResetDelay<public>(Time:float):void |
Sets the time (in seconds) after triggering, before the device can be triggered again (if MaxTrigger count allows). |
GetResetDelay |
GetResetDelay<public>()<transacts>:float |
Gets the time (in seconds) before the device can be triggered again (if MaxTrigger count allows). |
SetTransmitDelay |
SetTransmitDelay<public>(Time:float):void |
Sets the time (in seconds) which must pass after triggering, before this device informs other external devices that it has been triggered. |
GetTransmitDelay |
GetTransmitDelay<public>()<transacts>:float |
Gets the time (in seconds) which must pass after triggering, before this device informs other external devices that it has been triggered. |
Walkthrough
The scene: a 2D cel-shaded cove. A wooden supply crate sits at the end of the dock with an item spawner on top. A pressure-plate trigger is buried in the sand at the shoreline. When a player steps on the plate, we cycle the spawner to its next configured item and spawn it on the crate. When any player picks the item up, we award a point and re-arm the crate on a respawn timer.
Place an Item Spawner device (set its Item List to a few weapons/consumables, and Enabled at Game Start = No so Verse controls it) and a Trigger device (the sand plate). Then create a Verse device and wire both into the editable fields.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Playspaces }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/UI }
# Loot crate on the sunny dock: step the plate -> cycle + spawn loot.
dock_loot_crate := class(creative_device):
# The item spawner sitting on the crate at the end of the dock.
@editable
LootSpawner : item_spawner_device = item_spawner_device{}
# The pressure plate buried in the shoreline sand.
@editable
ShorePlate : trigger_device = trigger_device{}
# How long before loot re-appears after being grabbed.
@editable
RespawnSeconds : float = 6.0
OnBegin<override>()<suspends>:void =
# Turn the crate on: it starts disabled so no loot appears too early.
LootSpawner.Enable()
# Configure the respawn behaviour up front.
LootSpawner.SetEnableRespawnTimer(true)
LootSpawner.SetTimeBetweenSpawns(RespawnSeconds)
# React when a player steps on the sand plate.
ShorePlate.TriggeredEvent.Subscribe(OnPlateStepped)
# React the instant loot is collected.
LootSpawner.ItemPickedUpEvent.Subscribe(OnLootGrabbed)
# Runs whenever the shore plate is triggered by a player.
OnPlateStepped(Agent : ?agent) : void =
# Rotate to the next item in the spawner's Item List, then drop it.
LootSpawner.CycleToNextItem()
LootSpawner.SpawnItem()
# Runs when an agent picks up the spawned loot.
OnLootGrabbed(Agent : agent) : void =
# The respawn timer (set above) will bring the next drop back.
# Log the current wait so we can confirm config in the Output Log.
Wait := LootSpawner.GetTimeBetweenSpawns()
Print("Loot grabbed! Next drop in {Wait} seconds")
Line by line:
- The two
@editabledevice fields let you link the placed Item Spawner and Trigger in the Details panel — without these fields, calling their methods would fail with Unknown identifier. RespawnSecondsis an editablefloatso you can tune the loot cadence without touching code.- In
OnBegin,LootSpawner.Enable()powers up the crate. We callSetEnableRespawnTimer(true)andSetTimeBetweenSpawns(RespawnSeconds)so once loot is collected it will automatically reappear. ShorePlate.TriggeredEvent.Subscribe(OnPlateStepped)connects the sand plate to our handler. BecauseTriggeredEventis alistenable(?agent), the handler receivesAgent : ?agent.LootSpawner.ItemPickedUpEvent.Subscribe(OnLootGrabbed)fires the moment a player collects the item; its handler receives a plainagent.OnPlateSteppedcallsCycleToNextItem()(advance the Item List) thenSpawnItem()(materialize it on the crate) — a two-line "give me the next random-feeling reward."OnLootGrabbedreads back the configured timer withGetTimeBetweenSpawns()to confirm the setup; the real re-spawn is handled automatically because we enabled the respawn timer.
Common patterns
Pattern 1 — A lagoon med-kit fountain (respawn timer only, no trigger). Loot that keeps coming back on its own, perfect for a healing station in the shallows.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
lagoon_medkit_station := class(creative_device):
@editable
MedSpawner : item_spawner_device = item_spawner_device{}
OnBegin<override>()<suspends>:void =
MedSpawner.Enable()
# Turn on automatic respawn and set a 10-second cadence.
MedSpawner.SetEnableRespawnTimer(true)
MedSpawner.SetTimeBetweenSpawns(10.0)
# Drop the first med-kit right away so the station isn't empty.
MedSpawner.SpawnItem()
Pattern 2 — A one-time treasure key on the pirate ship (respawn OFF). Toggle the respawn timer off so the key only appears once, and disable the spawner after it's grabbed so it can never re-arm.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
treasure_key_spawner := class(creative_device):
@editable
KeySpawner : item_spawner_device = item_spawner_device{}
OnBegin<override>()<suspends>:void =
KeySpawner.Enable()
# This key must exist exactly once.
KeySpawner.SetEnableRespawnTimer(false)
KeySpawner.SpawnItem()
KeySpawner.ItemPickedUpEvent.Subscribe(OnKeyTaken)
OnKeyTaken(Agent : agent) : void =
# Shut the spawner down for good once the key is claimed.
KeySpawner.Disable()
Pattern 3 — A limited-use clifftop reward plate. Use the trigger's SetMaxTriggerCount so the loot plate only pays out a fixed number of times, and use the plain-argument Trigger() overload to fire it from code.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
clifftop_reward_plate := class(creative_device):
@editable
RewardSpawner : item_spawner_device = item_spawner_device{}
@editable
RewardPlate : trigger_device = trigger_device{}
OnBegin<override>()<suspends>:void =
RewardSpawner.Enable()
# This clifftop chest can only pay out 3 times.
RewardPlate.SetMaxTriggerCount(3)
RewardPlate.SetResetDelay(2.0)
RewardPlate.TriggeredEvent.Subscribe(OnPlate)
OnPlate(Agent : ?agent) : void =
Remaining := RewardPlate.GetTriggerCountRemaining()
if (Remaining > 0):
RewardSpawner.CycleToNextItem()
RewardSpawner.SpawnItem()
Gotchas
- You must have a device field. Calling
item_spawner_device{}.SpawnItem()on a bare literal does nothing useful — declare an@editablefield and link the placed device in the Details panel, or the method targets a phantom instance. - SetEnableRespawnTimer takes a
logic, not a bool literal you invented. Passtrueorfalse(Verse'slogicvalues).SetTimeBetweenSpawnsonly matters when the respawn timer is enabled. TriggeredEventhands you?agent,ItemPickedUpEventhands youagent. They are different! Unwrap the trigger's optional withif (A := Agent?):before using it; the pickup event'sagentis already ready to use.- No int↔float auto-conversion.
SetTimeBetweenSpawnswants afloat— write6.0, not6. SpawnItemwon't stack loot forever. If an item is already sitting on the base and hasn't been collected, spawning again generally replaces the current one rather than piling copies — design your trigger cadence around collection, not spam.Enabled at Game Startin the Details panel. Set it to No if Verse controls the crate; otherwise the device may spawn loot before yourOnBeginlogic runs.GetTimeBetweenSpawns/GetEnableRespawnTimerare<transacts>getters — safe to read anytime, but they reflect whatever you last set (or the panel default), so set your config inOnBeginbefore relying on it.