The "Don't Touch My Loot" Protocol: Building a Guard Spawner
Tutorial beginner

The "Don't Touch My Loot" Protocol: Building a Guard Spawner

Updated beginner

The "Don't Touch My Loot" Protocol: Building a Guard Spawner

So, you’ve built a fancy loot vault. It has gold walls, a laser grid, and a sign that says "Do Not Enter." But let’s be honest: if you just leave it open, players will walk in, grab your stuff, and laugh at you. You need bouncers. You need guards.

In UEFN, the Guard Spawner is your ticket to creating AI enemies that actually think they’re protecting something. Unlike static turrets that just shoot anything that moves, guards have a detection system. They patrol, they spot you, and if you’re not careful, they call their friends.

In this tutorial, we’re going to set up a High-Stakes Heist Vault. We’ll place a Guard Spawner, configure it to spawn a sniper-wielding sentinel, and set it so it only spawns once (so you don’t accidentally create an army of angry ninjas that never dies). By the end, you’ll have a mini-boss encounter that feels like a real Fortnite match, not just a shooting gallery.

What You'll Learn

  • The Guard Spawner Device: What it is and how it differs from a regular enemy spawner.
  • User Options: Configuring spawn counts, items (weapons), and team affiliations.
  • The "One-and-Done" Setup: How to prevent infinite spawns so your island doesn’t lag or become impossible.
  • Scene Graph Basics: Where the Guard Spawner lives in your island’s hierarchy and how it interacts with the world.

How It Works

Before we touch any code or devices, let’s look at the mechanics. Think of a Guard Spawner like a vending machine for enemies.

  1. The Machine (The Device): This is the physical object in your level editor. It sits in the world, waiting for a trigger (or just sitting there, ready to go).
  2. The Vending Stock (Item List): You decide what comes out of the machine. Do you want a basic soldier? A sniper with a Rail Gun? A heavy hitter with a shotgun? You pick the "Item Definition" (the weapon) they spawn with.
  3. The Capacity (Spawn Count): How many guards come out at once? If you set this to 1, one guard pops out. If you set it to 5, five guards pop out.
  4. The Refill Button (Allow Infinite Spawn): This is the most important setting for beginners. If this is True, the machine keeps refilling forever. If a guard dies, another one pops out. If it’s False, the machine empties out. Once the last guard is eliminated, the job is done. For a vault defense, you usually want False.
  5. The Team (Team Index): In Fortnite, teams are numbers. Players are usually Team 1. Guards need to be on a different team (like Team 2) so they know who to shoot. If they’re on the same team, they’ll stand next to you and awkwardly watch you loot the vault.

The Scene Graph: Where Does It Live?

In Unreal Engine 6 (and Verse), everything is part of the Scene Graph. Think of the Scene Graph as the family tree of your island.

  • The Root: Your entire island.
  • Parents: The island contains rooms. Rooms contain props and devices.
  • The Guard Spawner: This is a Component attached to an Entity (the physical device in your level).

When you place a Guard Spawner, you are adding a new node to this tree. It doesn’t just "exist"; it is owned by the level. This matters because Verse code will later reach into this tree, find the Guard Spawner, and tell it, "Hey, wake up."

Let's Build It

We aren’t writing complex Verse code yet. We are configuring the User Options in the Editor. This is the "hardware" setup before we write the "software."

Step 1: Place the Device

  1. Open your Island in UEFN.
  2. Go to the Devices tab.
  3. Search for Guard Spawner.
  4. Place it inside your vault, behind the loot, or in a corner where it has a clear line of sight to the entrance.

Step 2: Configure the Guard (The "Vending Stock")

Select the Guard Spawner you just placed. Look at the User Options panel on the right side of the screen.

  • Spawn Count: Set this to 1. We want one elite guard, not a swarm.
  • Item List:
    1. Click Add Element.
    2. In the Item Definition row, select Rail Gun. (Snipers are scary; snipers are fun).
    3. Ensure Index 0 is set to that Rail Gun.
  • Allow Infinite Spawn: Set this to False.
    • Why? If you leave this True, players will farm your vault for infinite XP. If you set it to False, the guard spawns, tries to kill you, and if they fail, the threat is gone. It’s a one-time challenge.
  • Team Index: Set this to 2.
    • Why? Players are Team 1. Guards are Team 2. This ensures they are hostile. If you leave this on "Default" or "1," they might not attack.
  • Visibility Range: Set this to 20M (or higher if you want them to spot you from far away).
  • Spawn on Timer: Set this to Off.
    • Why? We want the guard to be there when the match starts, not spawn 10 minutes later.

Step 3: Test It

Press Play. Walk up to your vault. The guard should spawn immediately (since Spawn on Timer is Off). They should have a Rail Gun. They should shoot at you. If you kill them, they stay dead.

Success! You’ve built a basic AI threat.

Step 4: The Verse Connection (Why We’re Here)

You might be thinking, "I just clicked some buttons. Where’s the Verse?"

Great question. The Guard Spawner works fine with just clicks. But what if you want to:

  1. Make the guard spawn only when the player opens the vault door?
  2. Change the guard’s weapon from a Rail Gun to a Shotgun if they survive the first 30 seconds?
  3. Give the player a notification: "Guard Eliminated! +500 XP"?

That’s where Verse comes in. Verse allows you to write code that talks to the Guard Spawner. In the next tutorials, we’ll use Verse to control when the spawner fires, but for now, you’ve mastered the physical setup.

Try It Yourself

Challenge: Create a "Reinforcement Station."

  1. Place a Guard Spawner outside your vault.
  2. Set Spawn Count to 2.
  3. Set Item List to Shotgun.
  4. Set Allow Infinite Spawn to True.
  5. Place a Trigger Volume (a zone that detects when players enter) near the entrance.
  6. Goal: Configure the devices so that when a player enters the Trigger Volume, the Guard Spawner activates. (Hint: You’ll need to link the Trigger’s "On Begin Overlap" event to the Guard Spawner’s "Spawn" input in the Device Graph).

Hint: Look at the Trigger Volume device. It has an output called On Begin Overlap. The Guard Spawner has an input called Spawn. Connect them!

Recap

  • The Guard Spawner is a device that creates AI enemies with detection and teamwork abilities.
  • User Options let you customize the guard’s weapon (Item List), how many spawn (Spawn Count), and if they respawn forever (Allow Infinite Spawn).
  • Team Index ensures guards are hostile to players (Team 2 vs. Team 1).
  • The Guard Spawner is part of the Scene Graph, meaning it’s a structured part of your island’s hierarchy that Verse can later control.

You now have a guarded vault. Try not to get sniped.

References

  • https://dev.epicgames.com/documentation/en-us/uefn/verse-stronghold-template-4-add-devices-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite/guard-spawner-device
  • https://dev.epicgames.com/documentation/en-us/fortnite/stronghold-02-add-devices-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/build-patchwork-x-yacht-heist-2-guard-alert-system-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/using-guard-spawner-devices-in-fortnite-creative

Turn this into a guided course

Add Guard Spawner Device 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