Stop Breaking Your Island: A Crash Course in Verse Tech Overview
Tutorial beginner

Stop Breaking Your Island: A Crash Course in Verse Tech Overview

Updated beginner

Stop Breaking Your Island: A Crash Course in Verse Tech Overview

So you’ve dropped into UEFN, dragged a few devices onto the map, and now you’re staring at a blank Verse file. It looks like alien hieroglyphics, and you just want to make a button that spawns a Storm. Before you start guessing which letters go where, you need to understand the "Tech Overview." Think of this as learning how the Battle Bus works: it doesn't matter if you have a shotgun or a rocket launcher; if you don't know how to board the bus, you aren't playing the game.

In this tutorial, we’re going to demystify the backbone of Verse. We’ll cover the Scene Graph (where things live), Variables (what changes), and Events (when things happen). By the end, you won’t just be copying code; you’ll know how to build a system that actually works without crashing your island.

What You'll Learn

  • The Scene Graph: Understanding the hierarchy of your island (like the difference between a Loot Pool and a specific Chest).
  • Variables vs. Constants: How to make props that change color vs. props that stay static.
  • Events & Functions: Triggering actions like a Storm Wall closing or a trap activating.
  • Debugging 101: How to read the error logs so you don’t spend hours wondering why your code is broken.

How It Works

1. The Scene Graph: The Island’s Skeleton

In Fortnite Creative, you place devices and props in the world. In Verse, this structure is called the Scene Graph. Imagine your island is a giant family tree. At the top is the World (the whole island). Branching off are Actors (any object that exists in the world, like a player, a wall, or a device). Branching off those are Components (the stats attached to those actors, like their position, health, or mesh).

Think of it like your loadout:

  • The Actor is the character skin you chose.
  • The Components are the items in your inventory (Shield, Medkit, Shotgun).
  • The Scene Graph is the folder structure in your backpack where you keep everything organized.

If you try to give a shotgun to a wall, the game glitches. In Verse, if you try to access a component that doesn’t exist on an actor, your code breaks. You need to know what you are talking to.

2. Variables and Constants: Stats vs. Loadout

Programming is just managing data. In Verse, data lives in two main containers:

  • Variables (var): These are stats that change during the match. Think of this as your Health Bar or Shield. It starts at 100, but if you get hit, it changes. In Verse, a variable is a named container for a value that can be updated.
    • Game Analogy: Your current ammo count. It starts at 30, but every time you shoot, the number changes.
  • Constants (const): These are set once and never change. Think of this as your Character’s Height or the Storm’s Damage Rate. You pick these in the editor or when the code starts, and they stay locked.
    • Game Analogy: The height of the Battle Bus. It’s always 2000 units high. You can’t change it mid-flight.

3. Events and Functions: Triggers and Abilities

How does your code react to the game?

  • Events: These are moments in time that happen automatically. Think of an Elimination Event or a Storm Timer Tick. You don’t "call" an event; it happens, and your code listens for it.
    • Game Analogy: The "Elimination" banner popping up. You didn’t manually trigger it; the game did because someone died.
  • Functions: These are actions you tell the game to do. Think of this as using a Prop Mover or spawning a Turret. You write a function, and when you call it, it runs a block of code.
    • Game Analogy: Pressing the button on a Trap. You press it (call the function), and the trap activates (the code runs).

Let's Build It

We’re going to build a "Revenge Trap." When a player gets eliminated, a hidden prop will light up red, and a text message will appear on their screen saying "You Died."

This teaches us:

  1. Variables to track if the trap is active.
  2. Events to listen for the elimination.
  3. Functions to change the prop color and show text.

The Setup

  1. Place a Creative Device in your map.
  2. Place a Prop (a simple cube) near the device.
  3. Create a new Verse file in the same folder.

The Code

using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /UnrealEngine.com/Temporary/Diagnostics }

# This is our main class, the "Brain" of our device.
# Think of it as the device itself, but with a brain attached.
class RevengeTrapDevice(creative_device):
    
    # --- VARIABLES (The Stats) ---
    
    # This is a variable. It starts as false (off).
    # Like a light switch that is currently in the 'off' position.
    is_active: bool = false
    
    # This is a reference to the Prop we placed in the editor.
    # Think of this as "pointing" to the specific chest in your loot pool.
    @editable
    target_prop: creative_prop = creative_prop{}
    
    # --- FUNCTIONS (The Abilities) ---
    
    # A function to turn the trap ON.
    # Like pressing the 'Activate' button on a trap.
    ActivateTrap() -> void:
        is_active = true
        # Change the prop's color to red.
        # We are accessing the 'material' component of the prop.
        target_prop.SetMaterialColor(Color{R:1.0, G:0.0, B:0.0})
        PrintToAll("Trap Activated! Watch your back.")

    # A function to turn the trap OFF.
    ResetTrap() -> void:
        is_active = false
        # Change the prop's color back to gray (inactive).
        target_prop.SetMaterialColor(Color{R:0.5, G:0.5, B:0.5})

    # --- EVENTS (The Triggers) ---
    
    # This event runs when the device is first placed in the world.
    # Like when the match starts and the bus drops.
    OnBegin() -> void:
        PrintToAll("Revenge Trap is online.")
        # Start in the 'off' state.
        ResetTrap()

    # This event runs when a player is eliminated.
    # We need to listen for this specific game moment.
    OnPlayerEliminated(eliminated_player: player, killer: player) -> void:
        # If the trap is active, trigger the revenge effect.
        if is_active:
            # Show a message to the eliminated player.
            # Think of this as the "Elimination" banner, but custom.
            eliminated_player.PrintMessage("You were eliminated by the Revenge Trap!")
            
            # Flash the prop to indicate the kill.
            target_prop.SetMaterialColor(Color{R:1.0, G:0.0, B:0.0})
            
            # Turn it back off after 2 seconds (simulating a cooldown).
            # We use a simple timer here to reset the state.
            Timer(2.0, fun(): ResetTrap())

Walkthrough

  1. using statements: These are like importing items from the loot pool. You’re telling Verse, "I need access to Devices, Characters, and Diagnostics (printing text)."
  2. class RevengeTrapDevice: This defines your device. It’s the blueprint.
  3. @editable target_prop: This is crucial. The @editable tag means you can drag and drop a prop from the editor directly into this variable in the device’s properties panel. Without this, Verse wouldn’t know which prop to color.
  4. OnBegin: This is your "Match Start" event. It runs once when the island loads. We use it to initialize the trap to "off."
  5. OnPlayerEliminated: This is the core logic. It listens for any player dying. If is_active is true, it changes the prop’s color and prints a message.
  6. Timer: This is a helper function that waits for a set amount of time before running another function. Here, it resets the trap after 2 seconds.

Try It Yourself

Challenge: Make the Revenge Trap more chaotic. Instead of just turning red, make the prop move when it activates.

Hint:

  1. Look up the creative_prop API for a function that changes position (hint: it’s called SetLocation or similar).
  2. You’ll need to calculate a new position. You can use the prop’s current location and add a random offset.
  3. Remember: You need to import the SpatialMath library to do math on vectors (3D coordinates).

Don’t worry if it glitches at first. Check the Technical Tab in Creator Portal for error messages. They’re your best friend.

Recap

  • Scene Graph: Your island’s hierarchy. Know your Actors (objects) and Components (stats).
  • Variables: Changeable stats (like health). Constants: Fixed stats (like map size).
  • Events: Things that happen (eliminations, match start). Functions: Actions you trigger (change color, spawn items).
  • Debugging: Use the Technical Tab to read error logs. If your code breaks, the log will tell you exactly which line is lying to you.

Now go build something that doesn’t crash when the storm closes. Your island deserves it.

References

  • https://dev.epicgames.com/community/snippets/xve/fortnite-top-down-view-support-device
  • https://dev.epicgames.com/documentation/en-us/uefn/31-00-release-notes-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite/31.00-fortnite-ecosystem-updates-and-release-notes-in-creative-and-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/fortnite/verse-api/unrealenginedotcom/temporary/ui/text_base/getoverflowpolicy
  • https://dev.epicgames.com/documentation/fortnite/verse-api/versedotorg/input/deprojectviewporttoworld

Verse source files

Turn this into a guided course

Add TechOverview 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