Reference Devices compiles

hive_stash_device: Organic Traps, Rescues, and Spawner Links

The `hive_stash_device` is a strange organic pod that can hold loot, a trapped NPC, or nothing at all. In Verse you can open it programmatically, teleport any agent inside it for a dramatic rescue animation, link it to a guard or NPC spawner so a creature bursts out when it opens, and subscribe to three events that let your game react at every stage of the sequence. If you want a boss encounter that starts with a hive stash cracking open, or a rescue mission where players free a captured ally, t

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

Overview

The hive_stash_device represents a living, breakable pod placed in your island. It can be in one of two states — closed or open — and it exposes a rich API for controlling that state from Verse:

  • Open it on demand with Open(), optionally triggering a linked spawner to release a creature.
  • Rescue any agent with RescueAgent(Agent), which teleports that agent to the stash and plays a rescue animation.
  • Link a spawner (guard or NPC) with SetLinkedSpawner or SetLinkedSpawnerFromAgent so the stash knows what to release when opened.
  • React to eventsOpenEvent, RescueEvent, and RescueAnimationEndEvent — to chain game logic (award score, start a timer, play a cinematic) at the right moment.

Reach for hive_stash_device when you want:

  • A boss encounter that starts with a creature bursting out of a pod.
  • A rescue mission where a captured ally is freed by players.
  • A destructible organic chest that triggers downstream game logic when broken.

API Reference

hive_stash_device

A strange organic object that may have something or someone inside of it.

Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse).

hive_stash_device<public> := class<concrete><final>(creative_device_base, enableable, healthful):

Events (subscribe a handler to react):

Event Signature Description
OpenEvent OpenEvent<public>:listenable(?agent) Triggers whenever the hive stash is opened, returning the instigating agent if applicable.
RescueEvent RescueEvent<public>:listenable(agent) Triggers whenever an agent is rescued, either by the hive stash opening with a linked spawner, or by calling RescueAgent while the hive stash is closed. * Returns the rescued agent.
RescueAnimationEndEvent RescueAnimationEndEvent<public>:listenable(agent) Triggers when the rescue animation ends. * Returns the rescued agent.

Methods (call these to make the device act):

Method Signature Description
SetLinkedSpawnerFromAgent SetLinkedSpawnerFromAgent<public>(Agent:agent)<transacts><decides>:void If Agent was spawned by a guard_spawner_device or npc_spawner_device, link the hive stash to that spawner. This overrides the hive stash's existing link if one exists. * Fails if Agent is not from a guard_spawner_device or `npc_sp
SetLinkedSpawner SetLinkedSpawner<public>(GuardSpawner:guard_spawner_device):void Link the hive stash to GuardSpawner. This overrides the hive stash's existing link if one exists. * If the hive stash opens with a linked spawner, trigger the spawner and rescue the resulting agent from the hive stash. * The rescued `ag
SetLinkedSpawner SetLinkedSpawner<public>(NPCSpawner:npc_spawner_device):void Link the hive stash to NPCSpawner. This overrides the hive stash's existing link if one exists. * If the hive stash opens with a linked spawner, trigger the spawner and rescue the resulting agent from the hive stash. * The rescued `agen
ClearSpawnerLink ClearSpawnerLink<public>():void Clear the link between the hive stash and a spawner device.
HasLinkedSpawner HasLinkedSpawner<public>()<transacts><decides>:void Succeeds if the device currently has a linked spawner, fails otherwise.
Open Open<public>():void Open the hive stash. If a spawner is linked, trigger it and rescue the resulting agent from the hive stash. * When the agent is rescued, if ShouldPlayRescuedAnimation is true, they will play a short animation to get off the hive sta
IsOpen IsOpen<public>()<transacts><decides>:void Succeeds if the hive stash is currently open, fails otherwise.
RescueAgent RescueAgent<public>(Agent:agent):void Teleport Agent to the hive stash. If ShouldPlayRescuedAnimation is true, they will play a short animation to get off the hive stash. * If the hive stash is closed, it will burst open first, ignoring a linked spawner. This will not cle

Walkthrough

Scenario: The Rescue Mission

A captured NPC ally is locked inside a hive stash. When a player steps on a pressure plate, the stash cracks open and the ally is rescued. The game awards the rescuing player a point and waits for the rescue animation to finish before starting the next wave.

Place in your island:

  • One hive_stash_device (set Hive Stash Style to Trapped in the Details panel)
  • One npc_spawner_device (the ally NPC)
  • One button_device (the trigger plate)
  • One score_manager_device
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Native }

# rescue_mission_device — opens a hive stash when a player presses a button,
# links an NPC spawner so the ally bursts out, awards a point on rescue,
# and logs when the animation finishes.
rescue_mission_device := class(creative_device):

    # Wire these up in the UEFN Details panel
    @editable
    HiveStash : hive_stash_device = hive_stash_device{}

    @editable
    AllySpawner : npc_spawner_device = npc_spawner_device{}

    @editable
    ActivationButton : button_device = button_device{}

    @editable
    ScoreManager : score_manager_device = score_manager_device{}

    # Called when the button is pressed — opens the stash
    OnButtonPressed(Agent : agent) : void =
        # Only act if the stash is still closed
        if (not HiveStash.IsOpen[]):
            HiveStash.Open()

    # Called when the stash opens — log the instigating agent (may be none)
    OnStashOpened(MaybeAgent : ?agent) : void =
        if (Instigator := MaybeAgent?):
            Print("Hive stash opened by a player.")
        else:
            Print("Hive stash opened (no instigator).")

    # Called when the NPC is rescued from the stash
    OnAgentRescued(RescuedAgent : agent) : void =
        # Award a point to the rescued agent's team / the agent themselves
        ScoreManager.Activate(RescuedAgent)
        Print("Agent rescued from hive stash — point awarded!")

    # Called when the rescue animation finishes — safe to start next wave
    OnRescueAnimationEnd(RescuedAgent : agent) : void =
        Print("Rescue animation complete — next wave can begin.")

    OnBegin<override>()<suspends> : void =
        # Link the NPC spawner so the ally bursts out when the stash opens
        HiveStash.SetLinkedSpawner(AllySpawner)

        # Subscribe to all three events
        HiveStash.OpenEvent.Subscribe(OnStashOpened)
        HiveStash.RescueEvent.Subscribe(OnAgentRescued)
        HiveStash.RescueAnimationEndEvent.Subscribe(OnRescueAnimationEnd)

        # Subscribe to the button
        ActivationButton.InteractedWithEvent.Subscribe(OnButtonPressed)

Line-by-line explanation

Lines What's happening
@editable fields Expose the four devices to the UEFN Details panel so you can wire them without hard-coding.
HiveStash.SetLinkedSpawner(AllySpawner) Links the NPC spawner. When Open() is called, the spawner fires and the resulting NPC is rescued from the stash automatically.
HiveStash.OpenEvent.Subscribe(OnStashOpened) OpenEvent carries ?agent (nullable) — the handler signature must match (MaybeAgent : ?agent).
HiveStash.RescueEvent.Subscribe(OnAgentRescued) RescueEvent carries a non-optional agent — the rescued NPC.
HiveStash.RescueAnimationEndEvent.Subscribe(OnRescueAnimationEnd) Fires after the short "getting up" animation, safe to trigger follow-up logic here.
if (not HiveStash.IsOpen[]) IsOpen is a <decides> method — call it inside an if (using [] failable-call syntax) to guard against double-opening.
HiveStash.Open() Opens the stash; because a spawner is linked, the NPC spawns and is rescued automatically.

Common patterns

Sometimes you don't know which spawner to link at design time. If you already have a reference to a guard agent (e.g. from a guard_spawner_device's spawn event), you can link the stash to that agent's spawner at runtime.

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

# dynamic_link_device — links a hive stash to whichever guard spawned most recently.
dynamic_link_device := class(creative_device):

    @editable
    HiveStash : hive_stash_device = hive_stash_device{}

    @editable
    GuardSpawner : guard_spawner_device = guard_spawner_device{}

    # When a guard spawns, link the stash to its spawner via the agent reference
    OnGuardSpawned(SpawnedAgent : agent) : void =
        # SetLinkedSpawnerFromAgent is <transacts><decides> — use if[] to handle failure
        if (HiveStash.SetLinkedSpawnerFromAgent[SpawnedAgent]):
            Print("Hive stash linked to guard's spawner.")
        else:
            Print("Could not link — agent may not be from a valid spawner.")

    OnBegin<override>()<suspends> : void =
        GuardSpawner.SpawnedEvent.Subscribe(OnGuardSpawned)

Key point: SetLinkedSpawnerFromAgent is <transacts><decides> — it can fail (e.g. the agent was already eliminated or wasn't spawned by a compatible spawner). Always call it inside an if with [] failable syntax.


For a dramatic "player gets captured" moment: teleport a player into the stash with RescueAgent, then clear the spawner link so no NPC pops out when it opens later.

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

# capture_player_device — teleports a player into the hive stash on trigger.
capture_player_device := class(creative_device):

    @editable
    HiveStash : hive_stash_device = hive_stash_device{}

    @editable
    CaptureButton : button_device = button_device{}

    # Teleport the interacting player into the stash
    OnCapturePressed(Agent : agent) : void =
        # Clear any spawner link so no NPC bursts out on open
        HiveStash.ClearSpawnerLink()

        # RescueAgent teleports Agent to the stash; if stash is closed it bursts open first
        HiveStash.RescueAgent(Agent)
        Print("Player captured inside hive stash!")

    # React when the player emerges (rescue animation ends)
    OnPlayerEmerged(EmergedAgent : agent) : void =
        Print("Player has emerged from the stash.")

    OnBegin<override>()<suspends> : void =
        CaptureButton.InteractedWithEvent.Subscribe(OnCapturePressed)
        HiveStash.RescueAnimationEndEvent.Subscribe(OnPlayerEmerged)

Key point: RescueAgent works whether the stash is open or closed. If it's closed, the stash bursts open first — this does not clear the spawner link, so call ClearSpawnerLink() beforehand if you don't want an NPC to also pop out.


Sometimes you want different behaviour depending on whether the stash has a linked spawner (creature encounter) or not (loot drop). Use HasLinkedSpawner to branch.

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

# conditional_open_device — opens the stash differently based on spawner link.
conditional_open_device := class(creative_device):

    @editable
    HiveStash : hive_stash_device = hive_stash_device{}

    @editable
    TriggerPlate : trigger_device = trigger_device{}

    OnPlateTriggered(MaybeAgent : ?agent) : void =
        if (HiveStash.IsOpen[]):
            # Already open, nothing to do
            return

        if (HiveStash.HasLinkedSpawner[]):
            # Creature encounter — open normally, NPC will burst out
            Print("Creature encounter starting!")
            HiveStash.Open()
        else:
            # No spawner — just a loot drop, open immediately
            Print("Loot stash opening!")
            HiveStash.Open()

    OnBegin<override>()<suspends> : void =
        TriggerPlate.TriggeredEvent.Subscribe(OnPlateTriggered)

Key point: Both IsOpen and HasLinkedSpawner are <transacts><decides> — always call them inside an if using [] failable syntax, never as standalone statements.


Gotchas

1. OpenEvent carries ?agent, not agent

OpenEvent is typed listenable(?agent). Your handler must accept (MaybeAgent : ?agent) and unwrap with if (A := MaybeAgent?) before using the agent. Declaring the handler as (Agent : agent) will cause a type mismatch compile error.

2. <decides> methods need [] or if — not bare calls

IsOpen, HasLinkedSpawner, and SetLinkedSpawnerFromAgent are all <decides>. You cannot call them as plain statements:

# WRONG — compile error
HiveStash.IsOpen()

# CORRECT
if (HiveStash.IsOpen[]):
    ...

Calling RescueAgent on a closed stash bursts it open but leaves the spawner link intact. If you want to rescue a player without also spawning an NPC, call ClearSpawnerLink() first.

4. SetLinkedSpawnerFromAgent fails on eliminated agents

If the agent passed to SetLinkedSpawnerFromAgent has already been eliminated, the call fails. Always wrap it in if (HiveStash.SetLinkedSpawnerFromAgent[Agent]) and handle the failure branch.

5. The stash won't reset mid-animation

Calling Reset() while the rescue animation is playing has no effect — the stash ignores the reset until the animation completes. If you need to reset immediately after a rescue, wait for RescueAnimationEndEvent first.

6. InteractTextOverride is a message, not a string

If you set InteractTextOverride at runtime, you must pass a localized message value. Declare a helper:

MyText<localizes>(S : string) : message = "{S}"
# then:
HiveStash.InteractTextOverride = MyText("Break Free!")

There is no StringToMessage function in Verse.

7. All @editable devices must be wired in UEFN

Every @editable field defaults to an empty device instance. If you forget to assign the real placed device in the Details panel, your code runs against a dummy and nothing happens in-game — no error, just silence.

Device Settings & Options

The hive_stash_device User Options panel in the UEFN editor — every setting you can tune.

Hive Stash Device settings and options panel in the UEFN editor — Enabled at Game Start, Drop Items, Hive Stash Style, Character Cosmetic, Start Open
Hive Stash Device — User Options in the UEFN editor: Enabled at Game Start, Drop Items, Hive Stash Style, Character Cosmetic, Start Open
⚙️ Settings on this device (5)

Setting names read from the panel above — may be partial; the screenshots are the source of truth.

Enabled at Game Start
Drop Items
Hive Stash Style
Character Cosmetic
Start Open

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