How to Build a Sedan Race Track in Fortnite
Tutorial beginner compiles

How to Build a Sedan Race Track in Fortnite

Updated beginner Code verified

How to Build a Sedan Race Track in Fortnite

Welcome, young game creators! Are you ready to build something fast and fun? Today, we are going to make a racing game. You will place a car on your island. Then, players can hop in and drive. It is like magic, but it is actually code! We will use a special tool called the Sedan Spawner. Let's get started.

What You'll Learn

  • How to find the Sedan Spawner device.
  • How to make a car appear on your island.
  • How to let players drive the car.
  • How to name your devices for easy finding.

How It Works

Imagine you are building a toy race track. You need cars to race. In Fortnite Creative, you do not just throw a car on the ground. You use a Device. A device is like a magic box. It does a specific job.

The Sedan Spawner is one of these magic boxes. Its job is simple. It creates a sedan car. A sedan is a regular car with four doors. It looks like a real car you might see in the city.

When you place this device, it knows where to put the car. It puts the car right where the device is. It also makes the car face the right way. This is called orientation. Orientation is just a fancy word for which way the front of the car is pointing.

You can also add Vehicle Mod Boxes. These are like magic shops. Players can drive to them. They can change the car's look or speed. This makes your race even cooler.

Here is a secret tip. If you have many devices, it can get confusing. Give them good names! Call one "Start Car." Call another "Finish Car." This helps you find them later. It is like labeling your toy boxes.

Let's Build It

Now, let's build our race track. We will place a spawner. Then we will make sure the player can get in.

First, open your Creative Island. Press the Tab key. This opens your inventory. Look for the Devices tab. Click it. Now, find the Vehicles section. Look for Sedan Spawner. Click it to pick it up.

Place it on the ground. This is your starting line. Next, we want the player to drive it. We use a Trigger. A trigger is like a pressure plate. When a player steps on it, something happens.

Set the trigger to Spawn Player in Vehicle. This is the best part! When a player walks over the trigger, they will pop right into the driver's seat. They can start driving immediately.

Here is a simple Verse script. It shows how the device works in code. Don't worry if it looks scary. We will explain it line by line.

# This is a comment. It helps us remember what the code does.

using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Simulation }

# We define a class that holds our Sedan Spawner device.
# In UEFN, devices are wired in the editor, not created in code.
# Think of this as naming the toy car box we already placed.
race_manager := class(creative_device):

    # my-car-spawner is a variable that refers to the
    # Sedan Spawner device we placed on the island.
    # Wire this device in the UEFN editor Details panel.
    @editable
    my_car_spawner : vehicle_spawner_sedan_device = vehicle_spawner_sedan_device{}

    # OnBegin runs automatically when the game starts.
    # This is like pressing the "Go" button on your race track.
    OnBegin<override>()<suspends> : void =

        # We tell the spawner to activate and create the car.
        # Enable() wakes up the device so it is ready to spawn.
        # This is like saying "The car box is now open and ready."
        my_car_spawner.Enable()

        # SpawnVehicle() makes the car appear at the device's
        # location and facing direction (orientation).
        # The device's position and rotation are set in the
        # editor, so the car faces the track automatically.
        # This is the magic moment — the car pops into existence!
        my_car_spawner.RespawnVehicle()```

Let's look at what each part does.

The first line starts with a hash `#`. This is a **comment**. Comments are notes for you. The computer ignores them. They help you remember your plan.

The next line creates the spawner. We call it `my-car-spawner`. This is a **variable**. A variable is a name for a thing that can change. Here, it holds the car spawner tool.

Then we set the location. We use `Enable()`. This wakes up the device at the spot where you placed it in the editor. It is like saying "Right here."

We also set the orientation. Because we placed the device in the editor and rotated it to face the track, the car will face the right way automatically. There is no extra code needed for that.

The last line makes the car appear. It calls `SpawnVehicle()`. This is the magic moment! The car pops into existence.

## Try It Yourself

You did great! Now it is your turn to create. Try this challenge:

**Challenge:** Place two Sedan Spawners on your island. Place one at the start. Place one at the finish line. Add a Trigger to both. Make the player start in the first car. Then, make them switch to the second car at the finish.

**Hint:** You can use a **Switch Device**. A switch lets you change settings. You can set the trigger to "Spawn Player in Vehicle." Try changing the vehicle ID to match your second car.

Remember to name your devices! Call the first one "Start_Spawner." Call the second one "Finish_Spawner." This will help you stay organized. Have fun racing!

## Recap

You learned how to use the Sedan Spawner. It places a car on your island. You can set its location and direction. You can also use triggers to let players drive. Naming your devices helps you find them. Now you can build awesome race tracks. Keep coding and creating!

## References

- https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-sedan-spawner-devices-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/fortnite/using-sedan-spawner-devices-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-devices-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/fortnite/using-vehicle-mod-box-spawner-devices-in-fortnite-creative
- https://dev.epicgames.com/documentation/en-us/fortnite/using-suv-spawner-devices-in-fortnite-creative

Verse source files

Turn this into a guided course

Add using-sedan-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