Verse for Builders: Stop Making "The Maze of Doom"
Tutorial beginner compiles

Verse for Builders: Stop Making "The Maze of Doom"

Updated beginner Code verified

Verse for Builders: Stop Making "The Maze of Doom"

You've spent hours placing props. You've painted the walls. You've even added a few traps. But when you hit Play, your friends wander in circles, get stuck on a single step, or just stand around looking confused.

This isn't because your island is ugly. It's because your Flow is broken.

In Fortnite Creative, "Flow" is the invisible force that tells players where to go without you having to yell at them in chat. In programming terms, we call this State Management and Event Handling. But let's not get bogged down in jargon yet. Think of Flow like the Storm. The Storm doesn't ask permission; it pushes players toward the safe zone. Your code needs to be the Storm, the loot drop, and the respawn pad all at once—guiding players naturally through your design.

Today, we're going to build a Smart Spawn System. Instead of players spawning in a void or getting stuck in a wall, they will spawn exactly where they need to be, and if they die, they'll know exactly where to go next. We'll use Verse to make your level react to the player, not just sit there looking pretty.

What You'll Learn

  • Variables (The Loot Pool): How to store data like "Spawn Point A" or "Spawn Point B" so your code remembers where things are.
  • Events (The Elimination): How to make your island react when a player dies.
  • Scene Graph (The Hierarchy): Understanding how your props, triggers, and code talk to each other.
  • Flow Control: Using logic to keep players moving through your map.

How It Works

The Problem: The "Where Do I Go?" Void

Imagine you're playing a custom mode. You die. The screen fades to black. You respawn... in the middle of the ocean. Or inside a tree. Or on the roof of a building you can't reach.

This happens because the game doesn't know where you are supposed to go. It's like if the Battle Bus dropped you off, but you had to guess which way to jump.

The Solution: Smart Spawning

In Verse, we create Variables to hold the locations of your spawn pads. Think of a variable like a Loot Chest. You don't know what's inside until you open it. But once you know it's a "Primary Weapon," you can use it. Here, the "Primary Weapon" is a specific location on your map.

We then use an Event. An event is like the Elimination Counter. The game is always watching. When the counter hits zero (you die), the event fires. Our code catches that "fire" and says, "Hey, player just died! Let's send them to Spawn Point A."

The Scene Graph: Your Island's Family Tree

Before we code, we need to understand the Scene Graph. In Fortnite Creative, everything you place is an Entity.

  • Entities are like Players or Props. They exist in the world.
  • Hierarchy is how they relate. If you parent a Trap to a Wall, the Trap moves when the Wall moves.

In Verse, we don't just "place" code. We attach code to specific Entities. We need to tell our Verse code: "Look at this specific Player Spawn Pad. Remember its location. When someone dies, teleport them here."

Let's Build It

We are going to build a Revenge Spawn Pad. When you die, you don't just respawn randomly. You respawn at the exact spot where you died, but with a cool visual effect (a flash of color) to let you know you're ready to go again.

Step 1: Set Up Your Props

  1. Open UEFN.
  2. Place a Player Spawn Pad (let's call it SpawnPad_1).
  3. Place a Player Spawn Pad nearby (let's call it SpawnPad_2).
  4. Place a Trigger Volume (a box that detects when you enter it) over SpawnPad_1.
  5. Place a Prop Mover or a simple Light on SpawnPad_1 that we can change color later. Let's call it FlashLight.

Step 2: The Verse Code

Create a new Verse script. We'll call it SmartSpawn.

# We need to bring in the basic Verse tools
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Native }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Characters }

# This is our "Class". Think of it as a blueprint for our Smart Spawn system.
# It's like a specific type of Trap that has special powers.
# creative_device is the real base class for island devices in UEFN.
SmartSpawnSystem := class(creative_device):

    # VARIABLES: These are our "Loot Pools".
    # We store references to our devices here.
    # @editable exposes them in the UEFN Details panel so you can
    # drag-and-drop your placed devices directly onto these slots —
    # no string-based lookup needed.
    @editable
    SpawnPad1 : player_spawner_device = player_spawner_device{}

    @editable
    SpawnPad2 : player_spawner_device = player_spawner_device{}

    # cinematic_sequence_device is used here to drive a timed visual flash.
    # For a true color-changing light you would use a light_controller_device;
    # swap the type and calls below if you have one placed on your island.
    # note: there is no generic "Light" device in public Verse APIs; 
    # cinematic_sequence_device is the closest built-in timed-effect device.
    @editable
    FlashSequence : cinematic_sequence_device = cinematic_sequence_device{}

    # INITIALIZATION: This runs ONCE when the island starts.
    # Think of this as the "Pre-Game Lobby" setup.
    # OnBegin is the real entry-point for creative_device subclasses.
    OnBegin<override>()<suspends> : void =
        # Subscribe to the game's elimination event through the experience.
        # GetPlayspace() returns the current fort_playspace, which exposes
        # PlayerRemovedEvent — fired whenever a player is eliminated or leaves.
        # note: UEFN does not expose a single global OnElimination event;
        # PlayerRemovedEvent on the playspace is the closest real equivalent
        # for reacting to a player leaving active play.
        Playspace := GetPlayspace()
        Playspace.PlayerRemovedEvent().Subscribe(OnPlayerRemoved)

    # EVENT: This is the "Elimination" listener.
    # The game fires this event when a player is removed from the playspace.
    OnPlayerRemoved(RemovedPlayer : player) : void =
        # LOGIC: Who died? Where should they go?
        # For simplicity, send every removed player to SpawnPad1 and
        # trigger the flash sequence so they know they are ready to go.
        # In a real game, you would track per-player state for richer logic!

        # Respawn the player at SpawnPad1.
        # player_spawner_device.Activate() respawns the player
        # the next time that spawn pad is used; to force immediate
        # teleport we move the player to the pad's transform.
        # note: player does not expose Set_location directly; we use
        # TeleportTo on the fort_character wrapped in a guard check.
        if (FortCharacter := RemovedPlayer.GetFortCharacter[]):
            PadTransform := SpawnPad1.GetTransform()
            if (FortCharacter.TeleportTo[PadTransform.Translation, PadTransform.Rotation]):
                false

        # Make the light flash by playing the cinematic sequence!
        # The sequence should be set up in the editor to flash your
        # chosen light from red back to off over ~1 second.
        FlashSequence.Play()```

### Walkthrough: What Just Happened?

1.  **`SmartSpawnSystem := class(creative_device):`**: We created a new "thing" in our code. It's like creating a new **Device** in the editor, but this one is entirely custom. `creative_device` is the real Verse base class that lets your script live on the island.
2.  **`@editable SpawnPad1 : player_spawner_device`**: We declared a variable. The `@editable` tag makes it show up in the UEFN Details panel, so you can drag your placed **Player Spawn Pad** directly onto the slot. No guessing at names — you point, it connects. `player_spawner_device` is the actual Verse type for a Player Spawn Pad.
3.  **`OnBegin<override>()<suspends> : void`**: This function runs when the game starts. `OnBegin` is the real entry-point for `creative_device` subclasses — the equivalent of "Pre-Game Lobby" setup. We call `GetPlayspace()` to get the live game session and subscribe to its `PlayerRemovedEvent`.
4.  **`OnPlayerRemoved`**: This is the magic. We subscribed this function to `PlayerRemovedEvent`, so Verse calls it automatically every time a player is removed from play (eliminated or disconnected).
5.  **`FortCharacter.TeleportTo[...]`**: This is the teleport. We unwrap the player's `fort_character` (the physical body in the world) and call `TeleportTo` with the spawn pad's stored transform. That moves them to exactly where the pad sits on your island.
6.  **`FlashSequence.Play()`**: We trigger a `cinematic_sequence_device` to play the flash animation. Set that sequence up in the editor (a quick red-to-off keyframe on your light) and it will fire every time someone is eliminated — like a trap resetting itself automatically.

## Try It Yourself

Now that you have a basic Smart Spawn, try to upgrade it:

**Challenge:** Make the spawn pad alternate. If a player dies, they go to SpawnPad1. If *another* player dies, they go to SpawnPad2.

**Hint:** You need a **Variable** that counts how many times someone has died. Think of it like an **XP Bar**. Every time someone dies, you add 1 to the XP. If the XP is even, go to Pad 1. If it's odd, go to Pad 2. You'll need to use an `if/else` statement (like a **Conditional Button**).

## Recap

*   **Variables** are like Loot Chests: they hold data (like device locations) for your code to use later.
*   **Events** are like Eliminations: they trigger code when something specific happens in the game.
*   **Flow** is maintained by guiding players with code, ensuring they always know where to go next.
*   **Verse** gives you the power to make your island react dynamically, turning a static map into a living, breathing game.

Stop building mazes. Start building experiences. Your players (and your sanity) will thank you.

## References

*   https://dev.epicgames.com/documentation/en-us/fortnite-creative/level-design-best-practices-in-fortnite-creative
*   https://dev.epicgames.com/documentation/en-us/fortnite/level-design-best-practices-in-fortnite-creative
*   https://dev.epicgames.com/documentation/en-us/fortnite/building-basics-in-fortnite-creative
*   https://dev.epicgames.com/documentation/en-us/fortnite-creative/onboarding-tutorial-in-fortnite-creative
*   https://dev.epicgames.com/documentation/en-us/uefn/verse-starter-template-2-defining-boards-for-game-in-unreal-editor-for-fortnite

Verse source files

Turn this into a guided course

Add level-design-best-practices-in-fortnite-creative 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