How to Build a Surfboard Racing Island
Tutorial beginner compiles

How to Build a Surfboard Racing Island

Updated beginner Code verified

How to Build a Surfboard Racing Island

Do you love speed? Do you like gliding over water? Let's make a mini-race game. You will place a special device. This device creates a magic surfboard. Players can hop on it. They can zoom across your island. It is easy and fun. You will be a game maker in no time.

What You'll Learn

  • What a Surfboard Spawner is.
  • How to place it in your world.
  • How to let players ride the board.
  • How to start a race with checkpoints.

How It Works

Imagine you have a toy box. Inside is a cool skateboard. Now imagine you have a magic button. When you press it, the skateboard appears. That is what a Surfboard Spawner does. It is a device in Fortnite Creative. It puts a surfboard into the game world.

The surfboard is special. It floats on water. It also works on land. It feels like a hoverboard. Players can ride it fast. You can use it for a race. You can also use it for a free ride.

Here is the secret trick. You need two things. First, you need the Surfboard Spawner. Second, you need a Trigger. A Trigger is like an invisible sensor. When a player walks into it, something happens. You can set the Trigger to spawn the board. Then, the player can hop on.

Think of it like a pizza shop. The spawner is the oven. The trigger is the door. When the door opens, the pizza (surfboard) is ready to eat (ride).

Let's Build It

We will build a simple start line. A player walks up. A surfboard appears. The player rides it away.

Here is the code logic. We use Verse. Verse is the language for Fortnite islands. It tells the devices what to do.

# This is a simple script for a Surfboard Race Start
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

# We declare our device class.
# In UEFN, devices are placed in the editor and
# referenced as editable properties — they cannot
# be created with a .Create() call at runtime.
surfboard_race_manager := class(creative_device):

    # 1. We define the "Trigger".
    # A trigger is an invisible box.
    # When a player enters it, it fires.
    # Drag a trigger_device onto this property in the UEFN editor.
    @editable
    MyStartTrigger : trigger_device = trigger_device{}

    # 2. We define the "Spawner".
    # This device creates the surfboard.
    # Drag a item_spawner_device onto this property in the UEFN editor.
    # note: UEFN exposes surfboard spawning through item_spawner_device;
    # set its Item property to the Surfboard item in the editor.
    @editable
    MySurfboardSpawner : item_spawner_device = item_spawner_device{}

    # OnBegin runs automatically when the island starts.
    OnBegin<override>()<suspends> : void =

        # 3. We connect them.
        # When the trigger fires, spawn the board.
        # This uses an "Event". An event is a signal.
        # Note: TriggeredEvent passes an optional agent (?agent), so the handler must accept ?agent.
        MyStartTrigger.TriggeredEvent.Subscribe(OnPlayerEnterTrigger)

    # This function runs every time a player enters the trigger.
    # Note: The parameter type must match the event's payload, which is ?agent.
    OnPlayerEnterTrigger(Agent : ?agent) : void =
        # Spawn the board at the spawner's spot
        # item_spawner_device uses SpawnItem(), not Spawn()
        MySurfboardSpawner.SpawnItem()

        # Optional: Tell the player "Go!"
        Print("A surfboard has appeared! Ride it!")```

### Walkthrough of the Code

Let's look at the parts.

**The Trigger**
The first block makes a trigger. Think of it as a pressure plate. You do not see it. But if a player steps on it, it wakes up. We give it a name. We give it a location.

**The Spawner**
The second block makes the spawner. This is the heart of our game. It knows how to make a surfboard. We tell it where to put the board. The board will face the right way. This is called "orientation."

**The Connection**
The third block is the magic. It links the trigger to the spawner. When the trigger feels a player, it sends a signal. The signal says "Spawn!" The spawner hears it. It creates the board. Now the player can ride.

## Try It Yourself

You have the basics. Now, let's make it a real race.

**Your Challenge:**
Add a **Racing Checkpoint** device to your island. Place it far away from the start. Make the surfboard spawner reset after the player passes the checkpoint.

**Hint:**
You can use a **Timer** device. Set it to wait a few seconds. Then, tell the spawner to spawn a new board. This lets the next player race too!

## Recap

You learned how to use a Surfboard Spawner. It creates a rideable board. You used a Trigger to start the action. You can now make a race track. Have fun playing your new game!

## References

*   https://dev.epicgames.com/documentation/en-us/fortnite/using-surfboard-spawner-devices-in-fortnite-creative
*   https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-surfboard-spawner-devices-in-fortnite-creative
*   https://dev.epicgames.com/documentation/en-us/fortnite/fortnite-glossary
*   https://dev.epicgames.com/documentation/en-us/fortnite/using-devices-in-fortnite
*   https://dev.epicgames.com/documentation/en-us/fortnite/trigger-device-design-examples

Verse source files

Turn this into a guided course

Add using-surfboard-spawner-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