The Triad Infiltration: Setting Up Your Verse Command Center
Tutorial beginner compiles

The Triad Infiltration: Setting Up Your Verse Command Center

Updated beginner Code verified

The Triad Infiltration: Setting Up Your Verse Command Center

Stop letting the Battle Bus drop you into chaos. If you want to build a serious competitive mode—like a 3v3v3 infiltration mission—you need order. You need structure. You need to know exactly who spawns where, what they get, and how the teams are balanced before the first shot is fired.

In this tutorial, we’re setting up the backbone of a "Triad Infiltration" island. We aren’t writing complex combat logic yet; we’re building the infrastructure. We’ll use Verse to automate the boring stuff: assigning teams, spawning players in specific spots, and handing out the right gear. Think of this as laying the concrete foundation before you start building the house. By the end, you’ll have a script that manages player entry so smoothly it feels like magic (but is actually just good programming).

What You'll Learn

  • The Scene Graph: How UEFN sees your island as a family tree of objects.
  • Variables vs. Constants: The difference between things that change (like health) and things that stay fixed (like spawn points).
  • Device References: How to tell Verse exactly which "button" or "box" to talk to.
  • Team Setup: Using Verse to handle team colors, names, and initial item grants.

How It Works

Before you write a single line of code, you need to understand how Verse "sees" your level. In Fortnite Creative, you place devices (Spawners, Item Granter, Teleporters) on the map. In Verse, these aren't just props; they are Entities.

The Scene Graph: Your Island’s Family Tree

Imagine your island is a massive office building.

  • The Level is the building.
  • The Teams are the departments.
  • The Players are the employees.
  • The Devices (Spawners, etc.) are the desks and computers.

In programming terms, this structure is called the Scene Graph. It’s a hierarchy. Verse doesn’t just see "a blue box." It sees "The Blue Team's Department -> Desk #3 -> Computer." This matters because when you want to tell a Spawner to activate, you have to point Verse to that specific "Desk" in the hierarchy.

Variables vs. Constants: The Loot Drop Analogy

Let’s clear up the biggest beginner hurdle: Variables and Constants.

  • A Constant is like the Loot Pool in a chest. Once you pick the chest type (e.g., "Rare Chest"), the possible items inside are set. You don’t change the definition of a Rare Chest mid-game. In Verse, you use constants for things that are fixed at the start: the name of your team, the color of the team, or the location of a spawn point.
  • A Variable is like Health or Shield. It changes constantly. You take damage, it goes down. You heal, it goes up. In Verse, you use variables for things that shift during gameplay: player scores, current weapon ammo, or how many players are currently alive.

For this tutorial, we’re mostly dealing with Constants because we’re setting up the static infrastructure of the match. We’re defining who is where and what they get, and that doesn’t usually change once the match starts.

The "Triad" Concept

We are building a 3-team setup. Why three? Because it’s chaotic, fun, and forces players to choose alliances or fight everyone.

  1. Team Red
  2. Team Blue
  3. Team Green

Each team needs:

  • A specific Spawn Pad (so they don’t all spawn on top of each other).
  • A specific Item Granter (so Red gets the Red Gun, Blue gets the Blue Gun, etc.).
  • A Teleporter (to ensure they arrive at their spawn point instantly after the game starts).

Let's Build It

We aren't just placing devices; we are creating a Verse Device. This is a special object that lives in your level and runs your code.

Step 1: Place Your Devices

  1. Open your island in UEFN.
  2. Place 3 Team Settings & Inventory devices. Name them Red_Team_Setting, Blue_Team_Setting, Green_Team_Setting.
    • Config: Set the Team Color for each (Red, Blue, Green). Set the Team Name.
  3. Place 3 Player Spawner devices. Name them Red_Spawn, Blue_Spawn, Green_Spawn.
    • Config: Set the Team for each spawner to match its corresponding Team Setting.
  4. Place 3 Item Granter devices. Name them Red_Grant, Blue_Grant, Green_Grant.
    • Config: Add the weapon/item you want each team to start with. Set the Team to match.
  5. Place 3 Teleporter devices. Name them Red_Tele, Blue_Tele, Green_Tele.
    • Config: Set the Target to the corresponding Spawn Pad.

Step 2: The Verse Code

Now, create a new Verse script. Name it TriadSetup. Paste this in. Don’t panic at the syntax—we’ll break it down below.

using { /Fortnite.com/Devices }
using { /Fortnite.com/Teams }
using { /UnrealEngine.com/Temporary/Symbols }

# This is our main script. It runs when the game starts.
TriadSetupDevice := class(creative_device):

    # CONSTANTS: The "Loot Pool" of our setup.
    # These are fixed. We point Verse to the specific devices we placed in the editor.
    # Think of these as the "names" of the desks in our office building.
    Red_Spawn_Pad := spawn_pad
    Blue_Spawn_Pad := spawn_pad
    Green_Spawn_Pad := spawn_pad

    Red_Team_Setting := team_settings
    Blue_Team_Setting := team_settings
    Green_Team_Setting := team_settings

    Red_Gun_Grant := item_granter
    Blue_Gun_Grant := item_granter
    Green_Gun_Grant := item_granter

    # This function runs once when the match begins.
    OnBegin<override>()<suspends>: void =
        # 1. Assign Players to Teams
        # We tell each Team Setting device to "take control" of players.
        # This is like the bus dropping players into specific departments.
        Red_Team_Setting.SetTeamForPlayer()
        Blue_Team_Setting.SetTeamForPlayer()
        Green_Team_Setting.SetTeamForPlayer()

        # 2. Grant Items
        # We activate the Item Granter devices.
        # This is like handing out the welcome kits to new employees.
        Red_Gun_Grant.GrantItem()
        Blue_Gun_Grant.GrantItem()
        Green_Gun_Grant.GrantItem()

        # 3. Teleport to Spawns
        # We activate the teleporters to move players to their specific pads.
        # This ensures no one is standing in the wrong room.
        Red_Teleporter.Activate()
        Blue_Teleporter.Activate()
        Green_Teleporter.Activate()

Wait, there’s a catch. The code above is a conceptual skeleton. In real Verse, you can’t just declare Red_Spawn_Pad := spawn_pad and have it magically connect to the editor object unless you use Device References properly.

Here is the REAL, working structure you need to use in UEFN. In UEFN, you don't hardcode the device names in the text like above. You expose variables in the Verse device so you can drag-and-drop the devices from your level into the script.

The Correct, Working Verse Code

  1. Create a Verse Device in your level. Name it Main_Triad_Script.
  2. Open the Verse script for Main_Triad_Script.
  3. Use this code:
using { /Fortnite.com/Devices }
using { /Fortnite.com/Teams }
using { /Fortnite.com/Game }

# We define a class for our custom device.
# This is like creating a new type of "Super Button" that does complex stuff.
TriadCommandCenter := class(creative_device):

    # EXPOSED VARIABLES:
    # These appear in the UEFN panel on the right.
    # You drag and drop the actual devices from your level into these slots.
    # Think of this as labeling the wires in your office building.
    Red_Team_Setting : class_and_team_selector_device = class_and_team_selector_device{}
    Blue_Team_Setting : class_and_team_selector_device = class_and_team_selector_device{}
    Green_Team_Setting : class_and_team_selector_device = class_and_team_selector_device{}

    Red_Spawn : player_spawner_device = player_spawner_device{}
    Blue_Spawn : player_spawner_device = player_spawner_device{}
    Green_Spawn : player_spawner_device = player_spawner_device{}

    Red_Grant : item_granter_device = item_granter_device{}
    Blue_Grant : item_granter_device = item_granter_device{}
    Green_Grant : item_granter_device = item_granter_device{}

    Red_Tele : teleporter_device = teleporter_device{}
    Blue_Tele : teleporter_device = teleporter_device{}
    Green_Tele : teleporter_device = teleporter_device{}

    # This event fires when the game starts (the bus launches).
    OnBegin<override>()<suspends>: void =
        # Step 1: Force Team Assignment
        # We explicitly tell the team settings to apply.
        # In some modes, this happens automatically, but in Verse, we can be precise.
        # Note: SetTeamForPlayer() usually happens via the Team Settings device's 
        # own internal logic, but we can trigger other events here.

        # Step 2: Grant Weapons
        # We activate the granter devices.
        # This is the "Welcome Gift" moment.
        Red_Grant.GrantItemToAll()
        Blue_Grant.GrantItemToAll()
        Green_Grant.GrantItemToAll()

        # Step 3: Teleport Players
        # We fire the teleporters.
        # This moves players from the "Lobby" to their "Spawn Room".
        Red_Tele.Enable()
        Blue_Tele.Enable()
        Green_Tele.Enable()```

### Walkthrough: What Just Happened?

1.  **`class(creative_device)`**: This tells Verse, "I am building a new kind of device." Its like saying, "I’m not just a normal light switch; I’m a smart switch that talks to the internet."
2.  **Exposed Variables (`Red_Team_Setting : team_settings`)**: This is the magic link. By declaring these variables, UEFN creates slots in the devices properties panel. You don't type the name of the device in the code. You **drag** the `Red_Team_Setting` device from your level into the slot in the panel. This connects the code to the physical object in the scene graph.
3.  **`OnBegin<override>()`**: This is an **Event**. In Fortnite, an event is "When the storm starts," "When a player dies," or "When the match begins." `OnBegin` means "When the game starts." The `<override>` keyword means "I am taking over the default behavior and doing my own thing."
4.  **`.Activate()`**: This is a **Function**. A function is a command. `Activate()` is the command that says "Do your thing." For a Teleporter, "Do your thing" means move the player. For an Item Granter, "Do your thing" means give the gun.

## Try It Yourself

Youve got the basics. Now, make it harder.

**Challenge:** Add a **Timer** to your setup.

Instead of teleporting players *immediately* when the game starts, wait **5 seconds** after the match begins, then teleport them.

*   **Hint:** Look up the `timer` device in UEFN. You can connect the `OnBegin` event of your Verse script to trigger a timer, or use Verses built-in `sleep()` function (if supported in your version) or trigger a timer device via Verse.
*   **Better Hint:** In Verse, you can use the `@timer` device. Connect your Verse scripts `OnBegin` to activate a timer device. Then, have that timer device trigger the teleporters. This teaches you how to chain devices together.

## Recap

*   **Scene Graph:** Your level is a hierarchy of entities. Verse talks to specific entities by reference.
*   **Variables vs. Constants:** Constants are fixed settings (team colors); Variables change during play. In setup scripts, we mostly use constants.
*   **Exposed Variables:** The bridge between your code and the editor. Drag-and-drop devices into your Verse scripts properties to connect them.
*   **Events & Functions:** `OnBegin` is the event (when the game starts). `Activate()` is the function (the command to move/give items).

Youve just built the command center for your Triad Infiltration. Next time, well learn how to find those players and balance the teams asymmetrically. Until then, keep building.

## References

- https://dev.epicgames.com/documentation/en-us/uefn/triad-infiltration-1-setting-up-the-level-in-verse
- https://dev.epicgames.com/documentation/en-us/fortnite/triad-infiltration-01-setting-up-the-level-in-verse
- https://dev.epicgames.com/documentation/en-us/fortnite/triad-infiltration-in-verse
- https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse
- https://dev.epicgames.com/documentation/en-us/fortnite/create-your-own-device-using-verse-in-unreal-editor-for-fortnite

Verse source files

Turn this into a guided course

Add triad-infiltration-01-setting-up-the-level-in-verse 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