The Loot Goblin’s Guide to Item Spawners
Tutorial beginner compiles

The Loot Goblin’s Guide to Item Spawners

Updated beginner Code verified

The Loot Goblin's Guide to Item Spawners

So, you want to drop loot for your players, but you're tired of manually placing every single medkit, shield potion, and gold brick by hand? That's like trying to build a 16x16 ramp stack with one block at a time—doable, but painful. Enter the Item Spawner. Think of it as your personal, infinitely stocked vending machine. You tell it what to spit out, when to spit it out, and how to spit it out, and then you sit back while it does the heavy lifting.

In this tutorial, we're going to set up a "Boss Key" system. You'll place a locked door, and when a player finds the hidden key, the Item Spawner activates to drop the loot they need to proceed. No coding required yet, just smart device setup.

What You'll Learn

  • The Item Spawner Device: What it is and how it differs from just placing an item on the ground.
  • Configuration: How to set what item drops, whether it respawns, and how it behaves when touched.
  • Triggering: How to link a trigger to the spawner so loot only appears when you want it to.
  • Scene Graph Basics: Understanding how devices sit in the world hierarchy (the "parent-child" relationship of game objects).

How It Works

Before we touch the settings, let's demystify the Item Spawner.

In Fortnite Creative, if you drag a gun or medkit directly from your inventory into the world, it's just a static object. It's sitting there, lonely, waiting to be picked up once. If you pick it up, it's gone forever.

An Item Spawner is a device—a piece of code wrapped in a 3D box—that generates items. It doesn't hold the item; it creates a copy of the item at its location. This is crucial because it allows for:

  1. Control: You decide exactly what spawns.
  2. Timing: You decide when it spawns (immediately, after a delay, or when triggered).
  3. Behavior: You decide if it bounces, glows, or disappears.

The "One-and-Done" vs. The Infinite Vending Machine

The most important setting you'll tweak is Items Respawn.

  • Respawn = On: Like a storm circle that comes back, or a bus that returns. The item reappears after you pick it up. Great for ammo in a deathmatch.
  • Respawn = Off: Like a boss key or a unique quest item. Once picked up, it's gone. The spawner is now empty.

The Scene Graph: Who's Parenting Whom?

In Unreal Engine (the engine behind UEFN), everything in your game world is part of the Scene Graph. Think of the Scene Graph as a family tree or a folder structure on your computer.

  • The World (The Parent): Your entire map is the root folder.
  • Devices (The Children): Every device you place (Spawners, Triggers, Scoreboards) is a "child" of the world.
  • Instances (The Grandchildren): When you place a specific Item Spawner device, it's an instance of the generic "Item Spawner" template.

Why does this matter? Because devices don't just exist in isolation. They talk to each other through Events and Channels. When a Trigger fires, it sends a signal down the line to the Item Spawner. Understanding that these are distinct objects connected by logic (not just physical proximity) is key to building complex islands.

Let's Build It

We are building a Secret Boss Key Drop.

  1. A Perception Trigger (invisible area) detects the player.
  2. It sends a signal to an Item Spawner.
  3. The Spawner drops a Gold Brick (or any item).
  4. The Spawner turns itself off so it doesn't drop infinite bricks.

Step 1: Place the Item Spawner

  1. Open the Devices panel.
  2. Go to Items > Item Spawner.
  3. Drag it into your map. Place it where you want the loot to appear (e.g., inside a chest, under a rug, or just floating in the air).

Step 2: Configure the Spawner

Click on the Item Spawner. Look at the Details panel on the right. Here is your cheat sheet:

Setting What to Set Why?
Item List Click the + to add an item. Select your desired loot (e.g., CP_Ingredient_GoldStud or a specific weapon). This tells the spawner what to create.
Items Respawn Set to Off. We only want one key/loot drop.
Time Between Respawns Set to Never. Redundant if Respawn is Off, but good practice to lock it down.
Enabled At Game Start Set to No. Critical! We don't want the loot there when the game starts. We want it to appear only when triggered.
Enable When Receiving From Set to a Channel (e.g., Channel 1). This is the "ear" of the spawner. It waits for a signal on Channel 1 to turn on.

Step 3: Place the Trigger

  1. Go to Devices > Triggers > Perception Trigger.
  2. Place it right next to your Item Spawner.
  3. In the Details panel, set Enabled At Game Start to Yes.
  4. Set Enable When Receiving From to a different channel if you want, but for now, leave it default. Actually, we need to send a signal.
  5. Wait! Perception Triggers usually send events when someone enters. Let's use a simpler Trigger Volume for clarity, or stick to Perception. Let's use a Trigger Volume.
    • Correction: Let's use a Trigger Volume for simplicity.
    • Place a Trigger Volume over your loot spot.
    • Set Enable When Receiving From to Channel 1 (so it's active from the start).
    • Set Disable When Receiving From to Channel 2 (optional, if you want it to deactivate).
    • Crucial Step: In the Events section of the Trigger Volume, find On Begin Overlap. We need to connect this to the Spawner.

Actually, let's simplify further for a beginner. We will use the Item Spawner's built-in ability to be triggered by a Trigger Volume via Channels.

Revised Plan:

  1. Item Spawner: Enabled At Game Start = No. Enable When Receiving From = Channel 1.
  2. Trigger Volume: Enabled At Game Start = Yes. On Begin Overlap = Send On Channel 1.

Step 4: The Verse Connection (Optional but Powerful)

While you can do this with just devices, Verse allows you to do cool things like randomizing the loot or checking if the player has a specific item. But for now, let's stick to the device setup.

Here is the Verse Code equivalent of what we just did with devices. This helps you understand why the device settings work.

# This is a simplified Verse script showing the logic behind the device settings.
# In UEFN, item_spawner_device and trigger_device are the real device types
# you reference in Verse. You bind them as properties on a creative_device
# subclass and wire them up in the UEFN editor.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

# creative_device is the base class for all placeable Verse devices in UEFN.
loot_goblin_manager := class(creative_device):

    # Drag your Item Spawner device onto this property in the UEFN Details panel.
    # item_spawner_device is the real Verse type for the Item Spawner device.
    @editable
    My_Loot_Spawner : item_spawner_device = item_spawner_device{}

    # Drag your Trigger device onto this property in the UEFN Details panel.
    # trigger_device is the real Verse type for the Trigger Volume device.
    @editable
    My_Trigger : trigger_device = trigger_device{}

    # OnBegin runs automatically when the game session starts.
    # This matches "Enabled At Game Start = No" on the spawner —
    # we disable it here so it doesn't fire immediately.
    OnBegin<override>()<suspends> : void =
        My_Loot_Spawner.Disable()

        # Subscribe to the trigger's overlap event.
        # TriggeredEvent fires when a player enters the Trigger Volume.
        # This is the Verse equivalent of "On Begin Overlap → Send On Channel 1".
        My_Trigger.TriggeredEvent.Subscribe(OnTriggerActivated)

    # This function runs each time the trigger fires.
    # The agent parameter is the player who entered the volume.
    OnTriggerActivated(Agent : ?agent) : void =
        # Wake the spawner up — equivalent to the spawner
        # receiving a signal on Channel 1.
        My_Loot_Spawner.Enable()

        # Spawn one copy of whatever item is configured in the
        # spawner's Item List in the UEFN Details panel.
        My_Loot_Spawner.SpawnItem()

        # Immediately disable the spawner so it acts as a
        # one-time drop (Items Respawn = Off equivalent).
        My_Loot_Spawner.Disable()```

**Walkthrough of the Code:**
1.  **`loot_goblin_manager := class(creative_device)`**: This creates our manager device. In Verse, all placeable game logic inherits from `creative_device`.
2.  **`@editable`**: This decorator exposes the property in the UEFN Details panel so you can drag the real in-world device onto it  that's how Verse knows *which* spawner and trigger to talk to.
3.  **`My_Loot_Spawner.Disable()`** inside `OnBegin`: This matches the "Enabled At Game Start = No" setting. The spawner is dormant until we need it.
4.  **`TriggeredEvent.Subscribe(...)`**: This is an **event subscription**. It tells Verse "whenever this trigger fires, call my function." This is the code-side version of connecting a channel in the device editor.
5.  **`My_Loot_Spawner.SpawnItem()`**: This is the direct API call that tells the spawner to generate its configured item right now.
6.  **`My_Loot_Spawner.Disable()`** at the end of `OnTriggerActivated`: This locks the spawner back down so it can never fire again — matching "Items Respawn = Off."

## Try It Yourself

**Challenge:** Make a "Trap Door" that drops a **Shield Potion** only if the player is holding a **Weapon**.

**Hint:**
1.  Use an **Item Spawner** with the Shield Potion in its list. Set it to **Enabled At Game Start = No**.
2.  Use a **Trigger Volume** under a fake floor tile. Set it to send on **Channel 1**.
3.  You need to check if the player has a weapon. Use a **Player Controller** device or a **Verse Script** to check `Player.Get_Current_Weapon()`.
4.  *Easier Device-Only Approach:* Use a **Switch** device. Set the Switch to "On" only when a player steps on the trigger. Connect the Switch to the Item Spawner. But wait, that doesn't check for a weapon.
5.  *Best Device-Only Approach:* Use a **Perception Trigger** set to detect "Weapon Pickup." When a player picks up a weapon in the area, it triggers the spawner.
    *   Place a **Perception Trigger**.
    *   Set it to detect **Weapon Pickup**.
    *   Set it to **Send On Channel 1** when triggered.
    *   Connect Channel 1 to your **Item Spawner** (which is set to **Enabled At Game Start = No** and **Enable When Receiving From = Channel 1**).

If you can make the potion drop *only* when the player picks up a gun in that specific zone, you've mastered the basics of event-driven spawning!

## Recap

*   **Item Spawners** are devices that generate items, not static objects.
*   **Enabled At Game Start** is your on/off switch for the entire device.
*   **Items Respawn** controls whether the loot is a one-time drop or an infinite supply.
*   **Channels** are the communication lines between devices. A Trigger *sends* on a channel, and a Spawner *listens* on a channel.
*   **Verse** is the underlying language that makes these devices talk, but you can build complex systems using just the device editor and channels.

## References

*   https://dev.epicgames.com/documentation/en-us/fortnite/lego-action-adventure-in-unreal-editor-for-fortnite
*   https://dev.epicgames.com/documentation/en-us/uefn/lego-action-adventure-in-unreal-editor-for-fortnite
*   https://dev.epicgames.com/documentation/en-us/fortnite-creative/mazey-escape-in-fortnite-creative
*   https://dev.epicgames.com/documentation/en-us/fortnite/mazey-escape-in-fortnite-creative
*   https://dev.epicgames.com/documentation/en-us/fortnite-creative/create-a-dungeon-crawler-game-in-fortnite-creative

Verse source files

Turn this into a guided course

Add Add Item Spawner Devices to your free study plan — we'll suggest related pages and stitch the lot into one compile-checked, self-guided lesson with worked examples and quizzes.

Original tutorial generated by Verse Island from the Verse/UEFN knowledge base, with references to the Epic Games sources above. Code is validated against the knowledge base.

Comments

    Sign in to vote, comment, or suggest an edit. Sign in