Round Start! How to Use Timers in Fortnite Verse
Tutorial beginner

Round Start! How to Use Timers in Fortnite Verse

Updated beginner

Round Start! How to Use Timers in Fortnite Verse

Have you ever wanted your Fortnite island to feel like a real game show? You know, with a countdown before the action starts? We will build a "Round Start" system. It will count down from 10 seconds. Then, it will open the gates for the players.

What You'll Learn

  • How to place a Timer Device in your island.
  • What a Variable is (a box that holds changing numbers).
  • How to write Verse code to watch the timer.
  • How to make something happen when the time is up.

How It Works

Imagine you are playing a video game. You are stuck in a room. You cannot leave until the teacher says "Go!" The teacher looks at their watch. They count: "10, 9, 8..." When they hit zero, they yell "Go!"

In Fortnite, we use a Timer Device. This is a special tool. It counts down silently. It does not show up on screen by default.

We also need a Variable. A variable is like a backpack. You can put things in it. Today, we will put the Timer Device in our variable. This lets our code "talk" to the timer.

Finally, we write Verse code. This is the instruction manual. The code says: "Watch the timer. When it hits zero, send a signal to the barriers."

Think of it like a recipe.

  1. Get your ingredients (the Timer Device).
  2. Read the steps (the Verse code).
  3. Cook the meal (start the round!).

Let's Build It

First, open UEFN. Go to the Devices menu. Search for Timer. Drag it onto your island. Place it in the basement. It is invisible, so you will not see it.

Next, add a Barrier device. Set it to "Open" when it receives a signal.

Now, let's write the code. We need to connect the Timer to the Barrier.

# This is our Verse script.
# It lives on a device in your island.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Verse }

# Step 1: Create a Class
# A class is like a blueprint for a new device.
# It holds all our settings and code.
RoundController := class(creative_device):

    # Step 2: Define Variables
    # A variable is a box that holds data.
    # Here, we hold the Timer Device.
    @editable
    RoundTimer : timer_device = timer_device{}

    # Step 3: The Start Function
    # This runs when the game begins.
    OnBegin<override>()<suspends> : void =
        # Start the timer counting down.
        RoundTimer.Start()

        # Wait here until the timer is done.
        # The game pauses here for the countdown.
        RoundTimer.SuccessEvent.Await()

        # Step 4: Do something when time is up!
        # Send a signal to open the barriers.
        # This is the "Go!" signal.
        # note: Pulse() fires the on-success pulse channel that
        # barrier devices can listen to via their Receive Signal
        # settings wired in the UEFN editor.
        RoundTimer.SuccessEvent.Signal()```

### Walkthrough

1.  **`class(creative_device)`**: This tells Verse we are making a new device type. It is the foundation.
2.  **`@editable RoundTimer`**: The `@editable` part is magic. It makes this variable appear in the device settings in UEFN. You can drag a Timer Device into this slot in the editor.
3.  **`OnBegin`**: This function runs automatically when the round starts. It is the starting gun.
4.  **`RoundTimer.Start()`**: This tells the timer to begin counting down.
5.  **`RoundTimer.SuccessEvent.Await()`**: This is the most important line. It pauses the code. It waits. It does nothing else until the timer hits zero. This creates the suspense!
6.  **`Signal()`**: Once the wait is over, this sends a signal. If your barriers are set to listen for this signal, they will open.

## Try It Yourself

You have built the countdown! Now, make it your own.

**Challenge:**
Change the time of the timer. Make it count down for only 5 seconds instead of the default time.

**Hint:**
Go to the Timer Device in your island. Look at its **User Options**. Change the **Duration** number to `5.0`. Then, play your island to see if it counts down faster!

## Recap

You just built a round start system. You used a **Timer Device** to count down. You used a **Variable** to hold the timer. You wrote **Verse** code to wait for the end. Now your island feels like a real game. Great job!

## References

*   https://dev.epicgames.com/documentation/en-us/uefn/box-fight-3-add-devices-in-unreal-editor-for-fortnite
*   https://dev.epicgames.com/documentation/en-us/fortnite/box-fight-3-add-devices-in-unreal-editor-for-fortnite
*   https://dev.epicgames.com/documentation/en-us/uefn/verse-parkour-template-in-unreal-editor-for-fortnite
*   https://dev.epicgames.com/documentation/en-us/fortnite/prop-hunt-06-adding-the-full-script-in-unreal-editor-for-fortnite
*   https://dev.epicgames.com/documentation/en-us/fortnite-creative/design-a-1v1-box-fight-in-fortnite-creative

Verse source files

Turn this into a guided course

Add Using the timer device to count down and create rounds 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