Reference Devices compiles

vehicle_spawner_device: Drivable Vehicles on Demand

The `vehicle_spawner_device` is the base class behind every drivable vehicle in UEFN — from sedans and tanks to UFOs and sportbikes. Drop any concrete spawner variant onto your island, wire it to Verse, and you can spawn vehicles on cue, assign drivers automatically, react when players hop in or out, and destroy or respawn vehicles as your game demands. Whether you're building a racing map, a heist escape sequence, or a wave-based combat arena, this device is your key to putting players behind t

Updated Examples verified on the live UEFN compiler
Watch the Knotvehicle_spawner_device in ~90 seconds.

Overview

The vehicle_spawner_device is an abstract base class — you never place it directly. Instead, you place one of its many concrete variants in the UEFN editor:

Concrete Device Vehicle
vehicle_spawner_sedan_device Prevalent sedan
vehicle_spawner_sports_car_device Whiplash sports car
vehicle_spawner_tank_device Tank
vehicle_spawner_sportbike_device Sportbike
vehicle_spawner_ufo_device UFO
vehicle_spawner_helicopter_device Helicopter
vehicle_spawner_octane_device Octane rocket car
vehicle_spawner_big_rig_device Mudflap semi truck
vehicle_spawner_armored_battle_bus_device Armored Battle Bus
vehicle_spawner_valet_suv_device Valet SUV
vehicle_spawner_quadcrasher_device Quadcrasher
vehicle_spawner_siege_cannon_device Siege Cannon
(and many more…)

All of them share the same Verse API surface defined on vehicle_spawner_device, so everything you learn here applies to every variant.

When to reach for it:

  • You want a vehicle to appear at a specific moment (e.g., after a countdown, or when a team captures a point).
  • You need to auto-assign a player as the driver (e.g., a getaway car cinematic).
  • You want to track when players enter or exit a vehicle to award score, trigger events, or change game state.
  • You need to destroy and respawn vehicles on a timer or after they take damage.

API Reference

vehicle_spawner_device

Base class for various specialized vehicle spawners which allow specific vehicle types to be spawned and configured with specialized options.

Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse).

vehicle_spawner_device<public> := class<abstract><epic_internal>(creative_device_base):

Events (subscribe a handler to react):

Event Signature Description
AgentEntersVehicleEvent AgentEntersVehicleEvent<public>:listenable(agent) Signaled when an agent enters the vehicle. Sends the agent that entered the vehicle.
AgentExitsVehicleEvent AgentExitsVehicleEvent<public>:listenable(agent) Signaled when an agent exits the vehicle. Sends the agent that exited the vehicle.
SpawnedEvent SpawnedEvent<public>:listenable(fort_vehicle) Signaled when a vehicle is spawned or respawned by this device. Sends the fort_vehicle who was spawned.
VehicleSpawnedEvent VehicleSpawnedEvent<public>:listenable(tuple()) Signaled when a vehicle is spawned or respawned by this device. Deprecated, use SpawnedEvent instead.
VehicleDestroyedEvent VehicleDestroyedEvent<public>:listenable(tuple()) Signaled when a vehicle is destroyed. Deprecated, use DestroyedEvent instead.
DestroyedEvent DestroyedEvent<public>:listenable(tuple()) Signaled when a vehicle is destroyed.

Methods (call these to make the device act):

Method Signature Description
Enable Enable<public>():void Enables this device.
Disable Disable<public>():void Disables this device.
AssignDriver AssignDriver<public>(Agent:agent):void Sets agent as the vehicle's driver.
DestroyVehicle DestroyVehicle<public>():void Destroys the vehicle if it exists.
RespawnVehicle RespawnVehicle<public>():void Spawns a new vehicle. The previous vehicle will be destroyed before a new vehicle spawns.

Walkthrough

Scenario: A heist map. When the round starts, a getaway SUV spawns at the extraction point. The first player to reach a trigger plate is automatically assigned as the driver. When that player exits the vehicle, a "Vehicle Abandoned!" message fires and the vehicle is destroyed and respawned fresh for the next attempt.

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

# Place a vehicle_spawner_valet_suv_device and a trigger_device in the editor,
# then assign them to these fields in the Details panel.
heist_getaway_manager := class(creative_device):

    # The SUV spawner placed at the extraction point
    @editable
    GetawayCar : vehicle_spawner_valet_suv_device = vehicle_spawner_valet_suv_device{}

    # A trigger plate near the vehicle — first player to step on it becomes the driver
    @editable
    DriverPlate : trigger_device = trigger_device{}

    OnBegin<override>()<suspends> : void =
        # Subscribe to the plate so we know who steps on it first
        DriverPlate.TriggeredEvent.Subscribe(OnDriverPlateTriggered)

        # React when any agent exits the vehicle
        GetawayCar.AgentExitsVehicleEvent.Subscribe(OnDriverExited)

        # React when the vehicle is destroyed (e.g., blown up by enemies)
        GetawayCar.DestroyedEvent.Subscribe(OnVehicleDestroyed)

        # React when a new vehicle spawns so we can log the fort_vehicle reference
        GetawayCar.SpawnedEvent.Subscribe(OnVehicleSpawned)

        # Enable the spawner — vehicle appears at round start
        GetawayCar.Enable()

    # Called when a player steps on the driver plate
    OnDriverPlateTriggered(Agent : ?agent) : void =
        if (A := Agent?):
            # Assign this agent as the driver — they are teleported into the driver seat
            GetawayCar.AssignDriver(A)
            # Disable the plate so only the first player gets assigned
            DriverPlate.Disable()

    # Called when any agent exits the vehicle
    OnDriverExited(Agent : agent) : void =
        Print("Vehicle abandoned! Resetting getaway car...")
        # Destroy the current vehicle immediately
        GetawayCar.DestroyVehicle()
        # Respawn a fresh one after a short delay
        spawn { RespawnAfterDelay() }

    # Called when the vehicle is destroyed for any reason
    OnVehicleDestroyed(Empty : tuple()) : void =
        Print("Getaway vehicle destroyed.")

    # Called when the spawner produces a new fort_vehicle
    OnVehicleSpawned(Vehicle : fort_vehicle) : void =
        Print("New getaway vehicle is ready!")
        # Re-enable the driver plate for the next attempt
        DriverPlate.Enable()

    # Waits 3 seconds then respawns the vehicle
    RespawnAfterDelay()<suspends> : void =
        Sleep(3.0)
        GetawayCar.RespawnVehicle()```

**Line-by-line breakdown:**

- **`@editable` fields**  Both devices are declared as editable fields on the class. This is mandatory; you cannot reference a placed device any other way.
- **`GetawayCar.Enable()`**  Activates the spawner so the vehicle appears in the world at game start.
- **`DriverPlate.TriggeredEvent.Subscribe(OnDriverPlateTriggered)`**  The trigger device sends an `agent` directly (not `?agent`), so no unwrapping is needed here.
- **`GetawayCar.AssignDriver(Agent)`**  Teleports the agent into the driver seat immediately.
- **`GetawayCar.AgentExitsVehicleEvent.Subscribe(OnDriverExited)`**  `AgentExitsVehicleEvent` is a `listenable(agent)`, so the handler receives an `agent` directly.
- **`GetawayCar.DestroyVehicle()`**  Destroys the current vehicle instance. Safe to call even if the vehicle is already gone.
- **`spawn { RespawnAfterDelay() }`**  Fires the delay coroutine without blocking the event handler.
- **`GetawayCar.RespawnVehicle()`**  Destroys any existing vehicle and spawns a fresh one. This fires `SpawnedEvent` when complete.
- **`SpawnedEvent` handler receives `fort_vehicle`**  Unlike the deprecated `VehicleSpawnedEvent` which sends `tuple()`, `SpawnedEvent` gives you the actual `fort_vehicle` object.
- **`DestroyedEvent` handler receives `tuple()`**  This event carries no payload, so the parameter is typed `tuple()`.

## Common patterns

### Pattern 1 — Track score when a player enters a vehicle

Award a point the moment any player climbs into the vehicle. Uses `AgentEntersVehicleEvent` and a `score_manager_device`.

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

vehicle_score_tracker := class(creative_device):

    @editable
    RaceCar : vehicle_spawner_sports_car_device = vehicle_spawner_sports_car_device{}

    @editable
    ScoreManager : score_manager_device = score_manager_device{}

    OnBegin<override>()<suspends> : void =
        # AgentEntersVehicleEvent sends the agent who entered
        RaceCar.AgentEntersVehicleEvent.Subscribe(OnAgentEntered)

    OnAgentEntered(Agent : agent) : void =
        # Award 1 point to the player who entered the vehicle
        ScoreManager.Activate(Agent)

Pattern 2 — Disable and re-enable the spawner based on game phase

In a two-phase game, vehicles are only available during the "escape" phase. A timer_device signals the phase change.

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

vehicle_phase_controller := class(creative_device):

    @editable
    EscapeVehicle : vehicle_spawner_sedan_device = vehicle_spawner_sedan_device{}

    # A timer device configured to end Phase 1 after 60 seconds
    @editable
    PhaseTimer : timer_device = timer_device{}

    OnBegin<override>()<suspends> : void =
        # Vehicles are locked during Phase 1
        EscapeVehicle.Disable()

        # When the timer ends, Phase 2 begins — unlock the vehicle
        PhaseTimer.SuccessEvent.Subscribe(OnPhaseTimerEnd)

    OnPhaseTimerEnd(Agent : ?agent) : void =
        # Enable the spawner — vehicle appears in the world
        EscapeVehicle.Enable()
        # Also respawn to ensure a fresh vehicle regardless of prior state
        EscapeVehicle.RespawnVehicle()

Pattern 3 — Auto-respawn a vehicle on a loop using SpawnedEvent

For an arena mode, a tank respawns 5 seconds after it is destroyed, forever.

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

arena_tank_manager := class(creative_device):

    @editable
    ArenaTank : vehicle_spawner_tank_device = vehicle_spawner_tank_device{}

    OnBegin<override>()<suspends> : void =
        ArenaTank.Enable()
        # Subscribe to destruction — triggers the respawn loop
        ArenaTank.DestroyedEvent.Subscribe(OnTankDestroyed)

    OnTankDestroyed(Empty : tuple()) : void =
        # Fire a coroutine to wait and then respawn
        spawn { DelayedRespawn() }

    DelayedRespawn()<suspends> : void =
        Sleep(5.0)
        # RespawnVehicle will fire SpawnedEvent when the new tank is ready
        ArenaTank.RespawnVehicle()

Gotchas

1. You must use a concrete subclass as the @editable field type

vehicle_spawner_device is <abstract> — you cannot declare @editable MyVehicle : vehicle_spawner_device. You must use the specific type that matches the device you placed, e.g. vehicle_spawner_sedan_device, vehicle_spawner_tank_device, etc. Mismatching the type in the Details panel will cause a binding error at publish time.

2. AgentEntersVehicleEvent and AgentExitsVehicleEvent send agent directly — no unwrap needed

These events are typed listenable(agent), so your handler signature is (Agent : agent) : void. Do not write (Agent : ?agent) — that will not compile. Contrast this with some other devices where events send ?agent.

3. DestroyedEvent and VehicleDestroyedEvent send tuple() — not agent

These events carry no meaningful payload. Your handler must be (Empty : tuple()) : void. You cannot get the agent who destroyed the vehicle from this event alone.

4. Prefer SpawnedEvent over VehicleSpawnedEvent

VehicleSpawnedEvent is deprecated and sends tuple(). SpawnedEvent sends the actual fort_vehicle object, giving you a typed reference to the spawned vehicle. Always use SpawnedEvent in new code.

5. RespawnVehicle destroys the old vehicle first

Calling RespawnVehicle() when a vehicle already exists will destroy it (firing DestroyedEvent) before spawning the new one. If you have logic in OnTankDestroyed that calls RespawnVehicle, be careful not to create an infinite loop — gate the respawn behind a Sleep or a flag.

6. AssignDriver requires the vehicle to already exist

If you call AssignDriver before the vehicle has spawned (e.g., before Enable() or before SpawnedEvent fires), nothing will happen. Subscribe to SpawnedEvent and assign the driver from within that handler if you need guaranteed timing.

7. Disable() does not destroy the vehicle

Calling Disable() prevents the spawner from producing new vehicles but leaves any existing vehicle in the world. Call DestroyVehicle() explicitly if you also want the current vehicle removed.

Guides & scripts that use vehicle_spawner_device

Step-by-step tutorials that put this object to work.

Build your own lesson with vehicle_spawner_device

Generate a personalized, step-by-step lesson plan built around this object — grounded in this exact reference and our compile-verified knowledge base.

Build a lesson →