Drive Fast, Fix Fast: Building a Vehicle Arcade
Tutorial beginner compiles

Drive Fast, Fix Fast: Building a Vehicle Arcade

Updated beginner Code verified

Drive Fast, Fix Fast: Building a Vehicle Arcade

Welcome to your first drive! Today, we are building a mini-arcade where players can race cars and fix them up. You will learn how to use special devices that act like magic repair shops. This makes your island feel like a real game world.

What You'll Learn

  • How to place a Vehicle Mod Box Spawner.
  • How to make cars get better mods when players drive over them.
  • How to use the World Settings to control crashes.
  • How to pair these devices with a car spawner.

How It Works

Imagine you are playing a video game. You find a rusty car. It is slow and has flat tires. Then, you drive over a glowing box. Poof! The car gets turbo boosters. Now it is super fast!

In Fortnite Creative, we use a device called a Vehicle Mod Box Spawner. Think of this device as a vending machine for car upgrades.

  1. The Box: The spawner creates a box on the ground.
  2. The Trigger: When a player drives their car over the box, the game detects it.
  3. The Upgrade: The game automatically attaches a random mod to that car. Maybe it gets armor. Maybe it gets nitro.
  4. The Reset: After the game restarts, the box changes its mod. This keeps the game fresh!

We also need to tell the game how cars should crash. We use World Settings. This is like the rulebook for your island. You can decide if cars break things when they hit walls.

Let's Build It

We will build a simple "Mod Race Track." Players will drive a Fang SUV. They will hit boxes to get better parts.

Step 1: Place Your Car

  1. Open your island in the Creative Plugin.
  2. Go to the Devices tab.
  3. Search for Fang Spawner.
  4. Place it on the ground. This is where cars will appear.

Step 2: Add the Magic Boxes

  1. Go to the Devices tab again.
  2. Search for Vehicle Mod Box Spawner.
  3. Place three of these boxes along your race track.
  4. Make sure they are on flat ground.

Step 3: Connect Them (The Verse Code)

Now we write a little bit of code. This code tells the boxes what to do. We use Verse. Verse is the language we use to make devices talk to each other.

Here is the code. Copy it into a new Verse file in your project.

# This is our main script file.
# It connects the Mod Box to the Car.

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

# We create a new device type called ModRacer.
# This is like a blueprint for our game logic.
ModRacer := class(creative_device) {

    # This variable holds the list of boxes.
    # A "variable" is a container that can change.
    # Here, it holds a list of Mod Box devices.
    # note: @editable lets you assign these devices in the UEFN editor UI.
    @editable
    ModBoxes : []vehicle_mod_box_spawner_device = array{}

    # This function runs when the game starts.
    # It sets up our boxes.
    OnBegin<override>()<suspends> : void = {

        # We tell each box to start working.
        for (Box : ModBoxes) {
            # This line enables the box.
            # It makes the box active and ready to give out mods.
            Box.Enable()
        }
    }
}

Walkthrough of the Code

  • ModRacer := class(creative_device): This creates a new device class. A creative_device is the real Verse base type for anything you place and run on your island. It holds the logic.
  • @editable ModBoxes : []vehicle_mod_box_spawner_device: We made a list. A list is like a backpack. We will put our boxes in this backpack. The @editable tag means you can drag and drop your placed boxes into this list right inside the UEFN editor — no searching the whole island at runtime needed.
  • OnBegin: This is an event. An event is something that happens at a specific time. Here, it happens when the game starts.
  • for (Box : ModBoxes): This loops over every box you connected in the editor.
  • Box.Enable(): This tells the box to become active so it can give mods to cars that drive over it.

Step 4: Set the Rules

  1. Click on your World Settings device.
  2. Look for Vehicle Impacts Damage Objects.
  3. Set it to No.
  4. This means cars won't break walls. It is more fun to just drive through!

Try It Yourself

Great job! You have built a working system. Now, try this challenge:

Challenge: Add a second type of car, like a Taxi.

Hint: You just need to place another Fang Spawner or Taxi Spawner device in the Creative Plugin. You do not need to change the code! Simply drag the new car spawner's mod boxes into the ModBoxes list in the editor.

Bonus Hint: Try moving the boxes to different spots. Can you make a loop where players drive around and collect three different mods?

Recap

You learned how to make vehicles interactive.

  1. Use a Vehicle Mod Box Spawner to give players upgrades.
  2. Use Verse to find and activate those boxes.
  3. Use World Settings to control crashes.

Your island now has driving fun! Keep experimenting with different cars and boxes. You are a game creator now!

References

  • 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-creative/world-settings-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-creative/create-a-vehicle-domination-game-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/using-devices-in-fortnite

Verse source files

Turn this into a guided course

Add Working with vehicles on your Fortnite island 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