Reference Devices

vehicle_spawner_n1_starfighter_device: Scramble the Starfighters

Want a hangar where players hop into an N-1 Starfighter the moment they need to scramble? The vehicle_spawner_n1_starfighter_device gives you Verse-level control over spawning, destroying, and respawning that iconic ship — plus events that fire when pilots climb in or get shot down. This article shows the real API doing a real game thing.

Updated
The code on this reference page is provided as-is and did not pass the latest compile check — treat the examples as a starting point and verify in your project.
Watch the Knotvehicle_spawner_n1_starfighter_device in ~90 seconds.

Overview

The vehicle_spawner_n1_starfighter_device is a specialized vehicle_spawner_device that configures and spawns an N-1 Starfighter. It's the device you reach for when your mode needs a flyable ship that you can control from code: spawn it on a countdown, assign a specific player as the pilot, destroy it when a round ends, or respawn a fresh ship after one is shot down.

Because it inherits every method and event from vehicle_spawner_device, the same patterns apply to tanks, UFOs, sportbikes, and the rest of the family. The key calls are Enable/Disable to gate spawning, RespawnVehicle to put a fresh ship on the pad, DestroyVehicle to clear it, and AssignDriver to drop a chosen player straight into the cockpit. On the listening side you get SpawnedEvent (hands you the fort_vehicle), DestroyedEvent, AgentEntersVehicleEvent, and AgentExitsVehicleEvent.

Reach for this device when you want scripted aerial gameplay: a dogfight arena, a "first to the ship" race, an objective where destroying the enemy starfighter scores points, or a story beat where the hero is teleported into the pilot seat.

API Reference

vehicle_spawner_n1_starfighter_device

Specialized vehicle_spawner_device that allows an N-1 Starfighter to be configured and spawned.

Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse). Inherited members are merged from vehicle_spawner_device.

vehicle_spawner_n1_starfighter_device<public> := class<concrete><final>(vehicle_spawner_device):

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.

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

Let's build a scramble pad. A button starts the launch sequence: we enable the spawner, respawn a fresh starfighter, and assign the player who pressed the button as the pilot. We track when they enter and exit, and when the ship is destroyed we respawn a new one so the pad is never empty.

using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporal }

# Scramble pad: button launches a starfighter and seats the presser as pilot.
scramble_pad := class(creative_device):

    @editable
    StarfighterSpawner : vehicle_spawner_n1_starfighter_device = vehicle_spawner_n1_starfighter_device{}

    @editable
    LaunchButton : button_device = button_device{}

    # message helper: a param typed `message` needs a LOCALIZED value.
    StatusText<localizes>(S : string) : message = "{S}"

    OnBegin<override>()<suspends>:void =
        # React to the button press to start the launch sequence.
        LaunchButton.InteractedWithEvent.Subscribe(OnLaunchPressed)
        # Track who climbs into and out of the cockpit.
        StarfighterSpawner.AgentEntersVehicleEvent.Subscribe(OnPilotEntered)
        StarfighterSpawner.AgentExitsVehicleEvent.Subscribe(OnPilotExited)
        # When the ship is spawned we get the fort_vehicle reference.
        StarfighterSpawner.SpawnedEvent.Subscribe(OnShipSpawned)
        # When destroyed, scramble a fresh one.
        StarfighterSpawner.DestroyedEvent.Subscribe(OnShipDestroyed)
        # Start gated off until someone presses the button.
        StarfighterSpawner.Disable()

    OnLaunchPressed(Agent : agent) : void =
        # Enable the pad, put a fresh ship on it, then seat the pilot.
        StarfighterSpawner.Enable()
        StarfighterSpawner.RespawnVehicle()
        StarfighterSpawner.AssignDriver(Agent)
        Print("Launch sequence started")

    OnShipSpawned(Vehicle : fort_vehicle) : void =
        # SpawnedEvent hands us the spawned fort_vehicle directly.
        Print("A new N-1 Starfighter is on the pad")

    OnPilotEntered(Agent : agent) : void =
        Print("Pilot boarded the starfighter")

    OnPilotExited(Agent : agent) : void =
        Print("Pilot left the starfighter")

    OnShipDestroyed() : void =
        # DestroyedEvent carries no agent (it's listenable(tuple())).
        Print("Starfighter down — scrambling a replacement")
        StarfighterSpawner.RespawnVehicle()

Line by line:

  • The two @editable fields let you drop the placed spawner and a button into the slots in the Details panel. Without declaring the device as an @editable field you cannot call its methods.
  • In OnBegin we Subscribe each handler. Note these are methods of the class — that's why we can pass them by name.
  • StarfighterSpawner.Disable() keeps the pad from auto-spawning until the player commits.
  • OnLaunchPressed receives the pressing agent. We Enable(), RespawnVehicle() to put a fresh ship down, then AssignDriver(Agent) to drop that player into the seat.
  • OnShipSpawned is handed the fort_vehicle by SpawnedEvent — the modern, non-deprecated way to learn a ship exists.
  • OnShipDestroyed takes no parameters because DestroyedEvent is listenable(tuple()). We respawn so the pad stays stocked.

Common patterns

Pattern 1 — A timed clear: destroy the ship when a round timer ends. This uses DestroyVehicle and Disable together.

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

round_cleanup := class(creative_device):

    @editable
    StarfighterSpawner : vehicle_spawner_n1_starfighter_device = vehicle_spawner_n1_starfighter_device{}

    OnBegin<override>()<suspends>:void =
        # Let the ship exist for 30 seconds, then clear the arena.
        StarfighterSpawner.Enable()
        StarfighterSpawner.RespawnVehicle()
        Sleep(30.0)
        StarfighterSpawner.DestroyVehicle()
        StarfighterSpawner.Disable()
        Print("Round over — starfighter removed")

Pattern 2 — Auto-seat the first player who steps in by counting boards. Reacts to AgentEntersVehicleEvent.

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

board_counter := class(creative_device):

    @editable
    StarfighterSpawner : vehicle_spawner_n1_starfighter_device = vehicle_spawner_n1_starfighter_device{}

    var Boards : int = 0

    OnBegin<override>()<suspends>:void =
        StarfighterSpawner.AgentEntersVehicleEvent.Subscribe(OnEnter)

    OnEnter(Agent : agent) : void =
        set Boards += 1
        Print("Starfighter boarded {Boards} time(s) this match")

Pattern 3 — Re-arm the pad on exit so the next player gets a fresh ship. Reacts to AgentExitsVehicleEvent and calls RespawnVehicle.

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

rearm_on_exit := class(creative_device):

    @editable
    StarfighterSpawner : vehicle_spawner_n1_starfighter_device = vehicle_spawner_n1_starfighter_device{}

    OnBegin<override>()<suspends>:void =
        StarfighterSpawner.Enable()
        StarfighterSpawner.AgentExitsVehicleEvent.Subscribe(OnExit)

    OnExit(Agent : agent) : void =
        # Old ship may be abandoned mid-air; put a clean one back on the pad.
        StarfighterSpawner.RespawnVehicle()
        Print("Pad re-armed for the next pilot")

Gotchas

  • DestroyedEvent and VehicleSpawnedEvent/VehicleDestroyedEvent carry no agent. They are listenable(tuple()), so their handlers take no parameter. Only AgentEntersVehicleEvent/AgentExitsVehicleEvent (agent) and SpawnedEvent (fort_vehicle) pass data.
  • Prefer SpawnedEvent/DestroyedEvent over the deprecated VehicleSpawnedEvent/VehicleDestroyedEvent. The new events were added precisely so SpawnedEvent can hand you the spawned fort_vehicle. The deprecated ones still compile but may be removed.
  • AssignDriver only works if a vehicle exists. Call RespawnVehicle first (or be sure one is already spawned), or the assignment has nothing to seat into. In the walkthrough we RespawnVehicle() immediately before AssignDriver(Agent).
  • A disabled spawner won't respawn. If you Disable() the device, RespawnVehicle is a no-op until you Enable() again.
  • You must declare the device as an @editable field inside a class(creative_device) and wire it in the Details panel. Calling vehicle_spawner_n1_starfighter_device{} inline as a value does NOT reference your placed device.
  • Event handlers are methods, subscribed in OnBegin. Don't try to subscribe at field-initialization time; do it inside the OnBegin<override>()<suspends>:void body.
  • message parameters need localized values. If a future call wants a message, build one with a <localizes> helper like StatusText above — there is no StringToMessage.

Build your own lesson with vehicle_spawner_n1_starfighter_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 →