Overview
The vehicle_spawner_ufo_device is a specialized creative device that spawns and manages a UFO vehicle on your island. It solves a common creative problem: you want a vehicle that reacts to game state — appearing only after an objective is complete, auto-piloted to a specific player, or respawned on a timer after it's destroyed.
Reach for this device when you need to:
- Gate vehicle access — enable or disable the spawner based on round state.
- Auto-assign a driver — teleport a player directly into the pilot seat via Verse.
- React to boarding/exiting — trigger score changes, UI, or traps when someone hops in or out.
- Manage vehicle lifecycle — destroy and respawn the UFO programmatically without manual button presses.
vehicle_spawner_ufo_device inherits all its methods and events from vehicle_spawner_device, so the patterns here transfer directly to helicopters, tanks, sportbikes, and every other vehicle spawner variant.
API Reference
vehicle_spawner_ufo_device
Specialized
vehicle_spawner_devicethat allows a UFO 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_ufo_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
Scenario: A capture-the-UFO mini-game. The UFO spawner starts disabled. When a player steps on a pressure plate, the UFO spawns and that player is automatically assigned as the driver. If the UFO is destroyed, it respawns after a short delay. When any player exits the UFO, a message is logged and the spawner is disabled until the next round.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# Place this Verse device in your level, then wire up the @editable fields
# in the Details panel to your placed devices.
ufo_capture_manager := class(creative_device):
# The UFO Vehicle Spawner placed in the level
@editable
UfoSpawner : vehicle_spawner_ufo_device = vehicle_spawner_ufo_device{}
# A pressure plate that activates the UFO
@editable
ActivationPlate : trigger_device = trigger_device{}
# How many seconds to wait before respawning a destroyed UFO
RespawnDelaySecs : float = 5.0
OnBegin<override>()<suspends> : void =
# Start with the spawner disabled — no UFO on the island yet
UfoSpawner.Disable()
# Subscribe to the pressure plate: when stepped on, activate the UFO
ActivationPlate.TriggeredEvent.Subscribe(OnPlateTriggered)
# Subscribe to vehicle lifecycle events
UfoSpawner.SpawnedEvent.Subscribe(OnUfoSpawned)
UfoSpawner.DestroyedEvent.Subscribe(OnUfoDestroyed)
UfoSpawner.AgentExitsVehicleEvent.Subscribe(OnAgentExits)
# Called when the pressure plate is triggered
OnPlateTriggered(TriggeringAgent : ?agent) : void =
# Enable the spawner so it can produce a vehicle
UfoSpawner.Enable()
# Respawn (spawn fresh) the UFO — any previous vehicle is cleared first
UfoSpawner.RespawnVehicle()
# If a real agent stepped on the plate, assign them as driver
if (A := TriggeringAgent?):
UfoSpawner.AssignDriver(A)
# Called when the UFO is spawned or respawned — receives the fort_vehicle
OnUfoSpawned(Vehicle : fort_vehicle) : void =
# You could store the vehicle reference here for further manipulation
# For now we just note it arrived
Print("UFO has entered the arena!")
# Called when the UFO is destroyed — no payload, just a signal
OnUfoDestroyed(Payload : tuple()) : void =
Print("UFO destroyed — respawning soon...")
# Kick off an async respawn after a delay
spawn { RespawnAfterDelay() }
# Async helper: wait, then respawn the UFO
RespawnAfterDelay()<suspends> : void =
Sleep(RespawnDelaySecs)
UfoSpawner.RespawnVehicle()
# Called when any agent exits the UFO
OnAgentExits(Agent : agent) : void =
Print("A pilot has left the UFO.")
# Lock the spawner until the next activation
UfoSpawner.Disable()
Line-by-line explanation
| Lines | What's happening |
|---|---|
@editable UfoSpawner |
Declares the UFO spawner as an editable field so you can drag-assign the placed device in the Details panel. Without @editable, the device reference is just a default stub and does nothing. |
UfoSpawner.Disable() |
Prevents the UFO from appearing at round start — players must earn access. |
ActivationPlate.TriggeredEvent.Subscribe(OnPlateTriggered) |
Wires the plate to our handler. The plate's event sends ?agent, so our handler signature accepts ?agent. |
UfoSpawner.SpawnedEvent.Subscribe(OnUfoSpawned) |
SpawnedEvent is typed listenable(fort_vehicle) — the handler receives the actual vehicle object. |
UfoSpawner.DestroyedEvent.Subscribe(OnUfoDestroyed) |
DestroyedEvent sends tuple() — an empty payload. The handler must accept (Payload : tuple()). |
UfoSpawner.AgentExitsVehicleEvent.Subscribe(OnAgentExits) |
AgentExitsVehicleEvent is typed listenable(agent) — the handler receives the agent directly (no option unwrap needed). |
if (A := TriggeringAgent?): |
Unwraps the ?agent option before calling AssignDriver, which requires a concrete agent. |
UfoSpawner.Enable() then RespawnVehicle() |
Enable must come before RespawnVehicle — a disabled spawner ignores respawn calls. |
spawn { RespawnAfterDelay() } |
Launches the async delay without blocking the event handler (event handlers are not <suspends>). |
Common patterns
Pattern 1 — Instantly assign a specific player as UFO driver on round start
Useful for a boss-mode map where one player always starts in the UFO.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Verse.org/Simulation }
ufo_boss_start := class(creative_device):
@editable
UfoSpawner : vehicle_spawner_ufo_device = vehicle_spawner_ufo_device{}
@editable
GameManager : game_manager_device = game_manager_device{}
OnBegin<override>()<suspends> : void =
# Wait for the game to start so players are fully loaded
GameManager.RoundBeginEvent.Await()
# Spawn the UFO fresh
UfoSpawner.Enable()
UfoSpawner.RespawnVehicle()
# Grab all players and assign the first one as the UFO boss
AllPlayers := GetPlayspace().GetPlayers()
if (BossPlayer := AllPlayers[0]):
UfoSpawner.AssignDriver(BossPlayer)
Pattern 2 — Track boarding to award points when a player enters the UFO
Covers AgentEntersVehicleEvent and a score manager.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
ufo_boarding_scorer := class(creative_device):
@editable
UfoSpawner : vehicle_spawner_ufo_device = vehicle_spawner_ufo_device{}
@editable
ScoreManager : score_manager_device = score_manager_device{}
OnBegin<override>()<suspends> : void =
# Subscribe to the enter event — handler receives agent directly
UfoSpawner.AgentEntersVehicleEvent.Subscribe(OnAgentEnters)
# Award points every time someone boards the UFO
OnAgentEnters(Agent : agent) : void =
# agent is already unwrapped — AgentEntersVehicleEvent sends agent, not ?agent
ScoreManager.Activate(Agent)
Pattern 3 — Destroy the UFO when a button is pressed, then disable the spawner
Covers DestroyVehicle and Disable together — handy for a timed UFO window.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
ufo_timed_window := class(creative_device):
@editable
UfoSpawner : vehicle_spawner_ufo_device = vehicle_spawner_ufo_device{}
@editable
EndButton : button_device = button_device{}
# Window duration in seconds
WindowSecs : float = 30.0
OnBegin<override>()<suspends> : void =
UfoSpawner.Enable()
UfoSpawner.RespawnVehicle()
# Also allow manual early termination via button
EndButton.InteractedWithEvent.Subscribe(OnEndPressed)
# Auto-close after the window expires
spawn { AutoClose() }
OnEndPressed(Agent : agent) : void =
CloseWindow()
AutoClose()<suspends> : void =
Sleep(WindowSecs)
CloseWindow()
CloseWindow() : void =
# Destroy the current UFO immediately
UfoSpawner.DestroyVehicle()
# Prevent it from being respawned until re-enabled
UfoSpawner.Disable()
Gotchas
1. Enable() must come before RespawnVehicle()
Calling RespawnVehicle() on a disabled spawner is silently ignored. Always call Enable() first if the spawner was previously disabled.
2. DestroyedEvent sends tuple(), not agent
DestroyedEvent and the deprecated VehicleDestroyedEvent both fire with an empty tuple payload. Your handler signature must be (Payload : tuple()). Trying to receive an agent here will fail to compile. Contrast this with AgentEntersVehicleEvent and AgentExitsVehicleEvent, which send a concrete agent (no option unwrap needed).
3. SpawnedEvent sends fort_vehicle, not agent
SpawnedEvent gives you the fort_vehicle object that was just spawned. This is the modern replacement for the deprecated VehicleSpawnedEvent (which sends tuple()). Use SpawnedEvent for any new code.
4. AgentEntersVehicleEvent / AgentExitsVehicleEvent send agent, not ?agent
Unlike many trigger-style events that send ?agent, these two vehicle events deliver a concrete agent. Do not try to unwrap with if (A := Agent?): — the type is already agent, not ?agent.
5. Event handlers cannot be <suspends> — use spawn{}
Event handler methods are plain (non-suspending) functions. If you need to Sleep() or Await() inside a handler (e.g., to delay a respawn), launch an async helper with spawn { MyAsyncHelper() }. The spawned function must be declared <suspends>.
6. Always declare the device as @editable
A bare vehicle_spawner_ufo_device{} default in a field is just a stub — it has no connection to the placed device in your level. You must mark the field @editable and assign it in the UEFN Details panel, otherwise all method calls silently target a disconnected object.
7. RespawnVehicle() destroys the existing vehicle first
If a player is currently piloting the UFO when RespawnVehicle() is called, the vehicle is destroyed immediately and the player is ejected. Plan your respawn logic to avoid surprising pilots mid-flight.