← Back to path Download .md

Creative Devices 101

beginner 2 lessons ยท ~45 min ยท Generated 2026-06-21

Welcome to Verse Device Communication! In this learning path, you'll discover how to make Fortnite Creative devices talk to each other using Verse code. You'll learn to listen for player actions like button presses, run code when events happen, and chain devices together to build amazing game logicโ€”all the skills you need to create interactive islands that respond to what players do.

Learning Outcomes

Lesson 1: Subscribing to Device Events in Verse

Objectives

๐ŸŽฎ What Is an Event?

Imagine you set a tripwire trap in your bedroom. The second someone walks through it โ€” ZAP! โ€” a buzzer goes off. The "someone walks through the wire" moment is called an event. An event is something that happens during the game that your code can listen for and react to.

In Fortnite Creative, devices already have built-in events. For example:


๐Ÿ“ป What Is Subscribing?

Think of a podcast subscription. Once you subscribe, every new episode shows up automatically. You don't have to check manually!

Subscribing to an event works the same way. You tell Verse: "Hey, whenever this button is pressed, automatically call MY function." After that, your code runs itself every single time the event fires โ€” no manual checking needed.

The word for doing this in Verse is Subscribe().


๐Ÿคš What Is a Handler?

The function you connect to an event is called a handler. Think of a handler like a catcher's mitt in baseball. The event throws the ball (signals that something happened), and your handler catches it and decides what to do next.

In Verse, a handler is just a regular function โ€” but it must follow one rule: it must accept the right inputs. For a button_device's InteractedWithEvent, the handler must accept one input called an agent. An agent is Verse's word for the player who triggered the event.


๐Ÿ—๏ธ How Do You Set It All Up?

Here are the four steps you follow every time:

  1. Place your devices โ€” Drop a Button device and a Verse Device onto your island in UEFN.
  2. Add an @editable property โ€” This is a special tag that lets you drag and drop your Button device into your Verse script from the UEFN editor panel. Think of it like a slot on a LEGO brick where you plug another brick in.
  3. Subscribe in OnBegin โ€” OnBegin is the function that runs the instant your island starts. It's the perfect place to set up your subscriptions, so they're ready before any player touches anything.
  4. Write your handler function โ€” This is the code that actually runs when the button is pressed.

๐Ÿ”Œ Quick Vocab Cheat Sheet

Word Plain Meaning
Event Something that happens in the game (button pressed, player arrives, timer ends)
Subscribe Sign up to be notified when an event happens
Handler Your function that runs when the event fires
agent The player who caused the event
@editable A tag that lets you link a device to your script in the UEFN editor

Worked Example

๐Ÿ› ๏ธ Worked Example: Glow-Up Button

The Scenario: A player walks up to a glowing button on your island and presses it. Your Verse code detects it and prints a celebration message. (Once you have the basics working, you can swap the Print for any cool game action!)

Before you code:

  1. Open UEFN and create a new island.
  2. From the Content Browser, drag a Button Device onto the island.
  3. Drag a Verse Device onto the island too.
  4. Open your Verse file (created when you added the Verse Device).

Here's the complete code:

# These two lines import the tools we need.
# Think of them like opening your toolbox before building.
using { /Fortnite.com/Devices }   # gives us button_device and other devices
using { /Verse.org/Simulation }    # gives us OnBegin and basic Verse tools

# This is our Verse device โ€” the "brain" we placed on the island.
button_celebration_device := class(creative_device):

    # @editable means this slot shows up in the UEFN editor panel.
    # Drag your Button Device from the scene into this slot!
    @editable
    MyButton : button_device = button_device{}

    # OnBegin runs ONCE when the island starts โ€” perfect for setup.
    OnBegin<override>()<suspends> : void =
        # Subscribe = "hey, call OnButtonPressed whenever MyButton is pressed"
        # OnButtonPressed is the name of our handler function below.
        MyButton.InteractedWithEvent.Subscribe(OnButtonPressed)

    # This is our HANDLER โ€” the catcher's mitt.
    # It runs automatically every time the button is pressed.
    # InAgent is the player who pressed the button.
    OnButtonPressed(InAgent : agent) : void =
        Print("๐ŸŽ‰ A player pressed the button! Amazing!")

Walkthrough โ€” line by line:

To test it:

  1. In the UEFN editor, click your Verse Device in the scene.
  2. In the Details panel, find the MyButton slot and drag your Button Device into it.
  3. Click Launch Session and walk up to the button. Press it โ€” check the output log! ๐ŸŽ‰

Try It Yourself

๐Ÿ‹๏ธ Your Turn: Double-Button Detector

You're going to build an island with two Button devices. When a player presses Button A, print one message. When they press Button B, print a different message.

Steps to follow:

  1. Place two Button devices on your island. Name them something helpful in UEFN (like "ButtonA" and "ButtonB").
  2. In your Verse device class, add two @editable properties โ€” one for each button.
  3. In OnBegin, call Subscribe() on both buttons, each pointing to its own handler function.
  4. Write two handler functions with different Print messages.

Hint ๐Ÿ”: Your OnBegin should have two Subscribe lines that look like this:

MyButtonA.InteractedWithEvent.Subscribe(OnButtonAPressed)
MyButtonB.InteractedWithEvent.Subscribe(OnButtonBPressed)

Each handler still needs to accept (InAgent : agent) as its input โ€” don't forget that part!

Bonus Challenge โญ: Can you change the printed message to say something different depending on WHICH button was pressed? (Hint: you already are โ€” one handler per button!)

Check yourself: Launch your session, press Button A, then Button B. Do you see two different messages in the output log? If yes โ€” you did it! ๐Ÿฅณ

Quiz

  1. In Verse, what does 'subscribing to an event' mean?
    • A. Deleting a device from the island
    • B. Signing up so your function runs automatically when the event fires
    • C. Downloading a new Fortnite update
    • D. Creating a new player character
  2. What is the name of the event on a button_device that fires when a player presses it?
    • A. PressedEvent
    • B. ButtonClickedEvent
    • C. InteractedWithEvent
    • D. OnBeginEvent
  3. What does the @editable tag do in a Verse class?
    • A. Makes the device invisible during gameplay
    • B. Causes the function to run at game start
    • C. Creates a slot in the UEFN editor so you can drag a real device into your script
    • D. Prints a message to the output log
  4. A handler function for button_device's InteractedWithEvent must accept which type of input?
    • A. An int (a whole number)
    • B. A string (some text)
    • C. A float (a decimal number)
    • D. An agent (the player who triggered the event)
Answer key
  1. B โ€” Subscribing means you register your handler function with an event. From that point on, every time the event fires (like a button being pressed), your function runs automatically โ€” just like getting a podcast episode delivered to you!
  2. C โ€” The button_device uses InteractedWithEvent. It fires when a player successfully interacts with (presses) the button. PressedEvent belongs to the input_trigger_device, which is a different device!
  3. C โ€” @editable is like adding a port on the back of your gaming console. It creates a visible slot in the UEFN Details panel so you can plug in (drag and drop) the real device from your island into your Verse code.
  4. D โ€” The InteractedWithEvent sends along the agent โ€” meaning the player who pressed the button. Your handler must accept (InAgent : agent) as its parameter, or Verse won't let you subscribe to it. Think of agent as Verse's word for 'a player in the game.'

Recap

๐ŸŒŸ Great Work โ€” Here's What You Learned!

An event is something that happens in the game โ€” like a player pressing a button. Subscribing means telling Verse: "Run my function every time that event fires." The function you connect is called a handler, and for a button_device, it must accept an agent (the player who caused the event). You set up subscriptions in OnBegin, and you use @editable to link real devices from your island into your Verse code. Now your island can truly react to players! ๐ŸŽฎ

Sources

Lesson 2: Triggering Devices and Building Game Logic with Channels

Objectives

๐ŸŽฎ What Are We Building?

Imagine a locked treasure room. A player walks up, presses a glowing button, and โ€” boom โ€” a weapon appears AND a door swings open! That's what you'll make today. You'll write Verse code that listens for a button press and then kicks off a whole chain of cool things.


๐Ÿ“ฃ What Is an Event?

An event is like a doorbell. When someone rings it, it tells your house "hey, something happened!" In Fortnite devices, events fire automatically when something occurs in the game โ€” like a player pressing a button or stepping on a trigger pad.

Your Verse code can listen for those doorbells. When one rings, your code wakes up and does something.


๐Ÿ”” What Is Subscribing?

Subscribing means telling the game: "Hey, whenever THAT doorbell rings, call MY function."

Think of it like signing up for a pizza delivery notification. When the pizza arrives (the event), you get a text (your function runs).

The function you attach is called a handler. It's the code that "handles" what happens when the event fires.

Subscribe(YourHandlerFunction)

๐Ÿงฉ The Button Device: button_device

A Button device is a physical glowing button you place on your island. Players walk up and press E to interact with it.

In Verse, the button has a built-in event called InteractedWithEvent. It fires every time a player presses the button.

Here's how you hook your code to it:

MyButton.InteractedWithEvent.Subscribe(OnButtonPressed)

That one line says: "When the button is pressed, run my function called OnButtonPressed."


๐Ÿ“ก What Is a Channel Device?

A channel device (channel_device) is like a walkie-talkie for your devices. One device talks (transmits a signal), and any other device that's listening hears it and reacts.

You can chain devices together like dominoes! Button press โ†’ channel transmits โ†’ door opens. ๐ŸŽ‰


๐Ÿ—๏ธ How to Set Up Your Devices in UEFN

Before writing code, you need to place these devices on your island:

  1. ๐ŸŸก Button device โ€” the thing the player presses.
  2. ๐Ÿ“ฆ Item Spawner device โ€” drops a weapon or item when told to.
  3. ๐Ÿ“ก Channel device โ€” the relay that sends signals to other devices.
  4. ๐Ÿ”ฒ Mutator Zone or Timer device (optional, for extra challenge) โ€” can react to the channel signal.

Tip: Use @editable in your Verse code so you can drag-and-drop the real devices into the slots in the UEFN editor. This connects your code to the actual devices on the island!


๐Ÿ”‘ Key Words Cheat Sheet

Word Plain Meaning
Event A doorbell โ€” something that happened in the game
Subscribe Sign up to be notified when an event fires
Handler The function that runs when the event fires
channel_device A walkie-talkie relay that forwards signals
Transmit() Sending a signal through the walkie-talkie
@editable Lets you plug a real device into your code slot in the editor

Worked Example

๐Ÿ† Worked Example: Button Press โ†’ Spawn Item โ†’ Signal the Channel

The goal: A player presses a button. An item spawns. Then a channel signal fires so other devices (like a door or timer) can react too!

In UEFN, place these devices on your island:

Then create a Verse device file called treasure_room_device and write this code:

# These lines "import" the tools we need. Think of them as opening your toolbox.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

# This is our custom Verse device. It's like creating a new remote control.
treasure_room_device := class(creative_device):

    # @editable means we can drag a real Button device into this slot in UEFN.
    @editable
    MyButton : button_device = button_device{}

    # Drag your Item Spawner device into this slot in UEFN.
    @editable
    MyItemSpawner : item_spawner_device = item_spawner_device{}

    # Drag your Channel device into this slot in UEFN.
    @editable
    MyChannel : channel_device = channel_device{}

    # OnBegin runs automatically when the game starts. It's like the START button.
    OnBegin<override>()<suspends> : void =
        # Subscribe means: "Hey button, when someone presses you, call OnButtonPressed!"
        MyButton.InteractedWithEvent.Subscribe(OnButtonPressed)

    # This is the handler โ€” the code that runs when the button is pressed.
    # InAgent is the player who pressed the button.
    OnButtonPressed(InAgent : agent) : void =
        # Tell the Item Spawner to drop its item right now!
        MyItemSpawner.SpawnItem()

        # Send a signal through the Channel device โ€” like pressing the walkie-talkie button!
        # This lets OTHER devices react to the same button press.
        MyChannel.Transmit(option{InAgent})

        Print("Button pressed! Item spawned and channel signal sent! ๐ŸŽ‰")```

---

### ๐Ÿšถ Walkthrough โ€” What Happens Step by Step

1. **Game starts** โ†’ `OnBegin` runs. The button is now "listening" for a press.
2. **Player walks up to the button and presses E** โ†’ `InteractedWithEvent` fires (the doorbell rings!).
3. **`OnButtonPressed` runs** โ€” this is our handler.
4. **`MyItemSpawner.SpawnItem()`** tells the Item Spawner to drop the weapon immediately.
5. **`MyChannel.Transmit(InAgent)`** sends a signal through the channel device. Any other device wired to this channel (like a door or a timer) will now react too!
6. The `Print` message shows up in the log so you know it worked. โœ…

---

### ๐Ÿ”Œ Wiring It in UEFN

After you write the code:
1. Go to **Verse > Build Verse Code** in the menu bar.
2. Drag your `treasure_room_device` from the Content Browser into your level.
3. Click your Verse device in the level, and in the **Details panel**, drag the real Button, Item Spawner, and Channel devices into the matching `@editable` slots.
4. Hit **Launch Session** and test it! Press the button and watch the magic. ๐Ÿช„

Try It Yourself

๐Ÿ› ๏ธ Your Turn: Build a Two-Button Combo Lock!

The challenge: Create an island where the player must press two separate buttons to unlock a reward. Each button fires its own handler. When a player presses both buttons (in any order), an Item Spawner drops a legendary weapon!

Here's how to think about it:

Devices to place on your island:

Hint โ€” tracking state with variables:

# A var variable can change during the game. false means "not pressed yet."
var Button1Pressed : logic = false
var Button2Pressed : logic = false

Inside your handler for Button 1, you can set it like this:

set Button1Pressed = true

Then check both with an if:

if (Button1Pressed? and Button2Pressed?):
    MyItemSpawner.SpawnItem()

๐Ÿ’ก Remember: Use Subscribe in OnBegin for BOTH buttons! Each button needs its own handler function.

Bonus challenge ๐ŸŒŸ: After the item spawns, use MyChannel.Transmit(InAgent) to send a signal so a door or barrier device also opens!

Quiz

  1. What does calling Subscribe() on a device event do?
    • A. It destroys the device when the game starts.
    • B. It tells your code to run a specific function whenever that event fires.
    • C. It makes the device invisible to players.
    • D. It creates a new button on the island automatically.
  2. In the worked example, what is the role of MyChannel.Transmit(InAgent)?
    • A. It prints a message to the game log.
    • B. It stops the button from being pressed again.
    • C. It sends a signal through the channel device so other devices can react.
    • D. It spawns an item directly from the channel device.
  3. What does the @editable tag do in your Verse code?
    • A. It makes the variable change every second during the game.
    • B. It lets you plug a real placed device into your code slot using the UEFN editor.
    • C. It makes the device glow in the dark on the island.
    • D. It automatically subscribes the device to all events.
  4. What is a handler function?
    • A. A function that runs at the very end of the game.
    • B. The code that decides where to place devices on your island.
    • C. The function that runs automatically when a subscribed event fires.
    • D. A special button that only the game host can press.
Answer key
  1. B โ€” Subscribe() is like signing up for a notification. It says: 'When this event fires (like a button press), run MY handler function.' The other options don't describe what Subscribe does at all!
  2. C โ€” Transmit() is the 'talk' button on a walkie-talkie. It sends a signal out through the channel_device so any other device listening on that channel can react โ€” like a door opening or a timer starting!
  3. B โ€” @editable creates a slot you can see in the UEFN Details panel. You drag your real placed device (like a Button) into that slot, and your code can then talk to it. Without @editable, your code wouldn't know which device on the island to use!
  4. C โ€” A handler is the function you 'attach' to an event using Subscribe(). When the event fires (like a player pressing a button), the handler is what gets called and runs your game logic. Think of it as the code that 'handles' what happens next!

Recap

๐ŸŽ‰ Great Work โ€” Here's What You Learned!

Today you learned that events are like doorbells โ€” they fire when something happens in the game. You used Subscribe() to connect a handler function to a button press, so your code runs automatically when a player interacts. You also discovered that a channel_device acts like a walkie-talkie relay, letting one event trigger a whole chain of devices using Transmit(). Put it all together, and you can build real game logic flows โ€” buttons, item spawners, and signals โ€” all working as a team! ๐Ÿ†

Sources

Generated by Verse Island on 2026-06-21.