The Invisible Trap: Mastering Volume Devices in UEFN
Guide beginner compiles

The Invisible Trap: Mastering Volume Devices in UEFN

Updated beginner Guides Code verified

The Invisible Trap: Mastering Volume Devices in UEFN

You know that feeling when you're running through a zone, and suddenly—bam—you're launched into the stratosphere by a hidden spring? Or maybe you walk into a room and the lights flicker on, but there's no visible switch? That's the magic of the Volume device. It's the invisible force field, the tripwire, and the secret trigger all rolled into one.

In this tutorial, we're going to build a "Revenge Trap." We'll place a Volume device over a suspicious-looking patch of floor. When an enemy player steps on it, they don't just take damage—they get launched into the sky and lose their shield. No visible buttons, no obvious traps. Just pure, chaotic geometry.

What You'll Learn

  • What a Volume is: Understanding the "invisible box" that detects presence.
  • Configuring Triggers: How to tell the Volume to ignore vehicles and only care about players.
  • Event Binding: Connecting the Volume to a Prop Mover (for the launch) and a Damage Component (for the punishment).
  • Scene Graph Basics: Seeing how devices interact as objects in the 3D world.

How It Works

Think of a Volume like the Storm Circle, but instead of closing in on everyone, it sits still and waits. It's an invisible 3D box floating in your level. By default, it's transparent and can't be seen in-game (unless you turn that setting on, which ruins the surprise).

The Volume doesn't do anything on its own. It's a sensor. It watches. When something enters its boundaries, it fires an Event. An Event is just a signal that says, "Hey! Someone is here!" or "Someone left!"

To make this useful, we need to Bind that Event to other devices. Binding is like plugging a cable from one device to another. If the Volume says "Player Entered," we bind that signal to a Prop Mover to say "Launch Up!" and to a Damage Component to say "Ouch!"

We also need to filter who triggers it. You don't want a vehicle driving over the trap to set it off, do you? You want it to be a player mistake. That's why we turn off Vehicle, Creature, and Guard events, leaving only Player Events Enabled.

Let's Build It

We are building a "Sky-High Shame Trap." Here is the setup:

  1. The Trap Zone: A Volume placed over a floor tile.
  2. The Punishment: A Prop Mover set to move up quickly (the launch).
  3. The Damage: A simple damage logic (simulated here via the Prop Mover's impact or a separate damage component, but for this tutorial, we'll focus on the Volume triggering the movement).

Note: In UEFN, you often use Verse for complex logic, but for basic device-to-device binding, the visual editor is faster. However, since this is a Verse tutorial, we will write a small Verse script that controls a Volume device, demonstrating how Verse interacts with the Scene Graph.

The Verse Script

This script creates a Volume, sets it to only care about players, and binds it to a Prop Mover.

# This script makes a Volume device react to players
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

# 1. Define the device class. Think of this as declaring "I am a Trap Master."
# We inherit from creative_device, which is the real base class for
# all placeable Verse devices in UEFN.
sky_trap_device := class(creative_device):

    # 2. This is the "Scene Graph" connection.
    # 'LaunchProp' is a variable that holds a reference to another device in the level.
    # We will link this in the editor later.
    # @editable exposes the variable in the Details panel so you can drag-and-drop
    # a Prop Mover into it from the World Outliner.
    @editable
    LaunchProp : prop_mover_device = prop_mover_device{}

    # 3. The "OnBegin" function runs once when the game starts.
    # This is like the "Start" button on the Battle Bus.
    OnBegin<override>()<suspends> : void =
        # Subscribe to the Volume's AgentEntersEvent on the mutator_zone_device.
        # MutatorZone is the real UEFN device that acts as an invisible trigger volume.
        # We wait for any agent (player) to enter, then call our handler.
        # Note: mutator_zone_device is the closest real API to a "Volume" sensor device;
        # it fires AgentEntersEvent when a player walks into its bounds.
        Print("Sky Trap is armed and waiting...")

        # 4. Bind the PlayerEntered event.
        # AgentEntersEvent fires whenever an agent enters the mutator zone.
        # We subscribe to it and call OnPlayerEntered each time it triggers.
        MutatorZone.AgentEntersEvent.Subscribe(OnPlayerEntered)

    # 5. The "OnPlayerEntered" handler.
    # This function is called automatically when a player steps in.
    # It's like a doorbell ringing.
    # 'Agent' is the real parameter type — the entity that entered the zone.
    OnPlayerEntered(Agent : agent) : void =
        # When the player enters, tell the Prop Mover to activate.
        # Begin() is the real method on prop_mover_device that starts its movement.
        LaunchProp.Begin()

        # Optional: Print a message so you can confirm the trap fired during testing.
        Print("Trap triggered! Player launched!")

    # Reference to the mutator_zone_device placed in the level.
    # @editable lets you assign it in the Details panel.
    # Note: mutator_zone_device is the real UEFN "volume sensor" device;
    # configure it in the editor to set its size and shape over your floor tile.
    @editable
    MutatorZone : mutator_zone_device = mutator_zone_device{}```

### How to Set This Up in the Editor

1.  **Place the Devices:**
    *   Drag a **Prop Mover** into your level. Set its "Start Transform" to the ground, and its "End Transform" to high in the air (Z-axis). Set the speed to something fast and jarring.
    *   Place a **Mutator Zone** device directly on top of the Prop Mover's starting position. Resize the Mutator Zone so it covers the area where you want the player to stand.

2.  **Link Them in Verse:**
    *   Create a new Verse script and paste the code above.
    *   In the Details panel of your `sky_trap_device` (where your script is attached), look for the **LaunchProp** variable.
    *   Drag the Prop Mover device from the World Outliner into the **LaunchProp** slot in the Details panel. This is **Binding** in action—connecting the "sensor" to the "actor."
    *   Do the same for the **MutatorZone** slot: drag your placed Mutator Zone device into it.

3.  **Test It:**
    *   Play your island. Walk into the Mutator Zone. If you set it up right, the Prop Mover should fire, launching whatever is on it (or just moving if it's empty) into the sky.

## Try It Yourself

The basic launch is cool, but let's make it meaner.

**Challenge:** Add a second Prop Mover that moves *down* into a pit immediately after the first one launches the player.

**Hint:** You'll need a second variable in your Verse class (e.g., `@editable PitProp : prop_mover_device = prop_mover_device{}`). In the `OnPlayerEntered` function, after calling `LaunchProp.Activate(Agent)`, add a small delay before calling `PitProp.Activate(Agent)`. Or, simpler: Bind the Mutator Zone to *two* Prop Movers directly in the editor using the "Event Binding" panel, but try to do it in Verse to keep your code clean!

*Wait, here's a simpler hint for Verse beginners:* You can just call both methods one after the other. The engine handles the timing.
```verse
OnPlayerEntered(Agent : agent) : void =
    LaunchProp.Activate(Agent)
    PitProp.Activate(Agent)
verse
OnPlayerEntered<suspends>(Agent : agent) : void =
    LaunchProp.Activate(Agent)
    Sleep(1.5)   # wait 1.5 seconds before the pit drops
    PitProp.Activate(Agent)

Check the Verse documentation for more details on Sleep() and suspending functions!

Recap

  • Mutator Zone Devices are the real UEFN invisible sensors that detect when agents enter or leave an area, and they expose AgentEntersEvent and AgentExitsEvent for Verse binding.
  • @editable is the real Verse attribute that exposes device references in the Details panel, letting you drag-and-drop connections from the World Outliner.
  • Binding connects the Mutator Zone's events to other devices (like Prop Movers) to create gameplay effects.
  • Verse allows you to control these devices programmatically, giving you more flexibility than pure visual binding.

References

  • https://dev.epicgames.com/documentation/en-us/fortnite/make-a-physics-puzzle-dungeon-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/down-but-not-out-device-design-example
  • https://dev.epicgames.com/documentation/en-us/fortnite/down-but-not-out-device-design-examples-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/uefn/transitioning-player-point-of-view-with-cameras-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-volume-devices-in-fortnite-creative

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 Place a Volume 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 guide 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