How to Build a "Launch & Loot" Trap: D-Launchers and Item Granters in Verse
Tutorial beginner

How to Build a "Launch & Loot" Trap: D-Launchers and Item Granters in Verse

Updated beginner

How to Build a "Launch & Loot" Trap: D-Launchers and Item Granters in Verse

Forget boring death traps where players just stand there and get shot. We’re building something with actual oomph. In this tutorial, we’re combining the D-Launcher (your personal battle bus) with the Item Granter (the loot goblin) to create a chaotic gameplay loop: players get launched into the air, and if they survive the fall, they get a weapon. If they don’t? Well, that’s what respawns are for.

We’ll use Verse to script this so the launcher doesn’t just launch forever—it resets, it rewards, and it keeps the match moving. No more infinite launch loops that break the game balance.

What You'll Learn

  • Variables: How to track if a player was launched (like a cooldown timer).
  • Events: Reacting to when a player touches a launcher (like a trigger zone).
  • D-Launchers: Using them for traversal or punishment.
  • Item Granters: Giving players loot automatically.
  • Scene Graph Basics: Understanding how devices talk to each other.

How It Works

Imagine you’re playing a game where you get launched into the sky. Usually, that’s fun for three seconds, then you fall and die. Boring. Let’s make it a system.

The D-Launcher (The Battle Bus)

A D-Launcher is a device that pushes entities (players, bots, props) in a specific direction. Think of it like the Battle Bus, but instead of dropping you off, it punts you. You can set the angle, the speed, and even add a "low gravity" effect so players can shoot while they’re flying through the air.

The Item Granter (The Loot Goblin)

This device gives players items. It’s like a vending machine that only works if you’re standing on it. We’ll use it to give players a weapon after they’ve been launched and landed.

The Problem with Default Devices

By default, if you place a D-Launcher and an Item Granter, they don’t know about each other. The launcher launches, the granter waits. We need to connect them. This is where Verse comes in.

Verse: The Director

Think of Verse as the game director. It watches what happens in your island. When a player touches the launcher, Verse says, "Hey, launch them!" Then, when they land, Verse says, "Hey, give them a gun!"

We’ll use a Variable to keep track of who was launched. A Variable is like a sticky note you write on during the game. It changes. If we didn’t have variables, the launcher wouldn’t know who to reward.

The Scene Graph: The Family Tree

In Unreal Engine, everything is part of a Scene Graph. This is just a fancy way of saying "everything has a parent and children." Your launcher is a parent. The visual effect (the explosion when you launch) is a child. When you move the launcher, the effect moves with it. Understanding this hierarchy helps you know where to look for devices in your code.

Let's Build It

We’re going to build a "Launch Pad of Justice."

  1. Place a D-Launcher on the ground.
  2. Place an Item Granter a few meters away (where the player will land).
  3. Write Verse code to link them.

The Code

Here is the complete Verse script. Copy this into a new Verse file in your project.

using /Fortnite.com/Devices
using /Engine/Systems
using /Fortnite.com/Devices/DLauncher
using /Fortnite.com/Devices/ItemGranter

# This is our main script. It's like the brain of our trap.
LaunchPadTrap = script:
    # VARIABLES: These are our sticky notes.
    # 'launched_player' is a variable that holds a reference to a player.
    # We start with 'None' because no one has been launched yet.
    launched_player := None

    # This function runs when the game starts.
    OnBegin<override>()<suspends>: void =
        print("Launch Pad is ready!")

    # This function is called when a player touches the D-Launcher.
    # 'player' is the person who touched it.
    OnPlayerEntered<override>(player: Player)<suspends>: void =
        # Check if a player is already being launched.
        # If 'launched_player' is not None, someone is already in the air.
        if (launched_player != None):
            print("Someone is already in the air! Wait for them to land.")
            return

        # Set the sticky note: This player is now 'launched_player'.
        launched_player = player

        # Find the D-Launcher device in our scene.
        # We assume the launcher is named "MyDLauncher" in the editor.
        launcher := GetDevice("MyDLauncher") as DLauncherDevice
        if (launcher != None):
            # Launch the player!
            # 'Launch' is a function that takes the player and pushes them.
            launcher.Launch(player)
            print("Player launched!")

    # This function runs when the player lands (or stops moving).
    # We use a timer to check when they land.
    OnTimer<override>(timer: Timer)<suspends>: void =
        # If we have a player stored in our variable...
        if (launched_player != None):
            # Check if the player is still in the air (simplified check)
            # In a real game, you'd check velocity or height.
            # For now, let's assume they land after 3 seconds.
            Wait(3.0) # Wait 3 seconds

            # Now, give them loot!
            # Find the Item Granter device named "MyItemGranter"
            granter := GetDevice("MyItemGranter") as ItemGranterDevice
            if (granter != None):
                # Grant a weapon (e.g., an Assault Rifle)
                granter.Grant(launched_player, "AssaultRifle")
                print("Player got a gun!")

            # Reset the sticky note so we can launch someone else.
            launched_player = None

    # This function sets up the timer loop.
    OnBegin<override>()<suspends>: void =
        # Create a timer that checks every 0.5 seconds.
        timer := CreateTimer(0.5)
        # Start the loop.
        while (true):
            Wait(0.5)
            # We could add more logic here, like checking if the player is grounded.
            # For simplicity, we rely on the OnPlayerEntered logic above.

Walkthrough: What’s Happening?

  1. launched_player := None: This is our Variable. It starts empty. Think of it like an empty slot in your inventory.
  2. OnPlayerEntered: This is an Event. It’s like a tripwire. When a player steps on the launcher, this function runs.
  3. launcher.Launch(player): This is a Function. It’s a command. We’re telling the launcher device to do its job: launch the player.
  4. Wait(3.0): This pauses the script for 3 seconds. It’s like a cooldown timer.
  5. granter.Grant(...): This is another function. We’re telling the Item Granter to give the player an Assault Rifle.
  6. launched_player = None: We reset our variable. The slot is empty again. Ready for the next player.

Try It Yourself

Challenge: Make the launcher only launch players from Team 1. Players from Team 2 should just get a message saying "Nope."

Hint: You can check a player’s team using player.GetTeam(). Compare it to 1 (for Team 1). If it’s not 1, print a message and don’t launch them.

Recap

You just built a system that launches players and gives them loot. You learned:

  • Variables are like sticky notes that change during the game.
  • Events (like OnPlayerEntered) react to player actions.
  • Functions (like Launch and Grant) are commands you send to devices.
  • The Scene Graph helps you find devices by name.

Now go make some chaos. Launch your friends into the sky and watch them scramble for loot.

References

  • https://dev.epicgames.com/documentation/en-us/fortnite/using-dlauncher-devices-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/dlauncher-device-design-examples-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/using-item-granter-devices-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-item-granter-devices-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/escape-room-09-inside-cabin-in-unreal-editor-for-fortnite

Get the complete code — free

You've read the full walkthrough. The complete, copy-paste-ready Verse solution is free for members — sign in to unlock it.

Free with your BrainDead.TV / BrainDeadGuild Discord account. The walkthrough above is always free.

Verse source files

Turn this into a guided course

Add using-dlauncher-devices-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