Overview
The vehicle_spawner_sportbike_device is a specialized vehicle_spawner_device that spawns a single sportbike at its placed location. It solves a very common creative problem: give players a vehicle, and react in Verse when they get on it, leave it, or destroy it.
Reach for this device when you want:
- A race start where each rider's bike spawns fresh at the gate.
- An escape mission where boarding the bike triggers a cinematic or opens a gate.
- A stunt arena where a wrecked bike instantly respawns so players keep riding.
Because it inherits everything from vehicle_spawner_device, the bike spawner gives you mount/dismount events (AgentEntersVehicleEvent, AgentExitsVehicleEvent), spawn/destroy events (SpawnedEvent, DestroyedEvent), and control methods (Enable, Disable, AssignDriver, DestroyVehicle, RespawnVehicle). You call those methods from Verse to make the bike actually do things.
API Reference
vehicle_spawner_sportbike_device
Specialized
vehicle_spawner_devicethat allows a sportbike 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_sportbike_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 race-start bike. When a player steps on a trigger plate at the starting line, we respawn a clean bike and auto-seat that player as the driver. When they ride away (exit the vehicle later or wreck it), we log it and re-arm the spawner. This uses RespawnVehicle, AssignDriver, AgentEntersVehicleEvent, AgentExitsVehicleEvent, and DestroyedEvent — all real device APIs.
using { /Fortnite.com }
using { /Verse.org }
using { /UnrealEngine.com }
using { /UnrealEngine.com/Temporary }
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# A race-start bike: step the plate, get a fresh bike, and you're the driver.
race_bike_starter := class(creative_device):
# The sportbike spawner placed in the level.
@editable
BikeSpawner : vehicle_spawner_sportbike_device = vehicle_spawner_sportbike_device{}
# The trigger plate at the starting line.
@editable
StartPlate : trigger_device = trigger_device{}
# Subscription handles to cancel on end.
var StartSub : cancelable = external {}
var BikeEnterSub : cancelable = external {}
var BikeExitSub : cancelable = external {}
var BikeDestroySub : cancelable = external {}
OnBegin<override>()<suspends>:void =
# React to the player stepping on the start plate.
StartSub := StartPlate.TriggeredEvent.Subscribe(OnStartPlate)
# React to mount / dismount on the bike.
BikeEnterSub := BikeSpawner.AgentEntersVehicleEvent.Subscribe(OnRiderMounted)
BikeExitSub := BikeSpawner.AgentExitsVehicleEvent.Subscribe(OnRiderDismounted)
# React to the bike being wrecked so we can re-arm.
BikeDestroySub := BikeSpawner.DestroyedEvent.Subscribe(OnBikeDestroyed)
# trigger_device hands us an ?agent — unwrap it before use.
OnStartPlate(MaybeAgent : ?agent):void =
if (Rider := MaybeAgent?):
# Spawn a fresh bike (destroys the old one first).
BikeSpawner.RespawnVehicle()
# Seat this player as the driver.
BikeSpawner.AssignDriver(Rider)
Print("Fresh bike spawned and rider assigned!")
# AgentEntersVehicleEvent hands the agent directly (non-optional).
OnRiderMounted(Rider : agent):void =
Print("A rider mounted the sportbike.")
OnRiderDismounted(Rider : agent):void =
Print("A rider left the sportbike.")
# DestroyedEvent is a tuple() event — no payload.
OnBikeDestroyed():void =
Print("Bike was destroyed — re-arming the start plate.")
StartPlate.Enable()
OnEnd<override>():void =
StartSub.Cancel()
BikeEnterSub.Cancel()
BikeExitSub.Cancel()
BikeDestroySub.Cancel()```
**Line by line:**
- `@editable BikeSpawner : vehicle_spawner_sportbike_device` — declaring the spawner as an editable field is what lets Verse call its methods. Without this field you'd get an *Unknown identifier* error. After compiling, you bind it to the placed bike spawner in the UEFN details panel.
- `StartPlate.TriggeredEvent.Subscribe(OnStartPlate)` — wires the plate's step event to our handler. We subscribe inside `OnBegin`.
- `BikeSpawner.AgentEntersVehicleEvent.Subscribe(OnRiderMounted)` — the device fires this whenever any agent gets on the bike.
- `OnStartPlate(MaybeAgent : ?agent)` — `TriggeredEvent` is `listenable(?agent)`, so the payload is **optional**. `if (Rider := MaybeAgent?)` unwraps it.
- `BikeSpawner.RespawnVehicle()` — destroys the existing bike (if any) and spawns a clean one. Great for a fair race start.
- `BikeSpawner.AssignDriver(Rider)` — seats the stepping player straight onto the bike. No walking up to it required.
- `OnRiderMounted(Rider : agent)` — note `AgentEntersVehicleEvent` is `listenable(agent)` (NOT optional), so the agent arrives unwrapped.
- `OnBikeDestroyed()` — `DestroyedEvent` is `listenable(tuple())`, so the handler takes **no parameters**.
## Common patterns
### Enable / Disable the spawner with a round timer
Keep the bike unavailable until the round actually begins, then disable it when the round ends so stragglers can't grab one.
```verse
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
round_bike_gate := class(creative_device):
@editable
BikeSpawner : vehicle_spawner_sportbike_device = vehicle_spawner_sportbike_device{}
@editable
RoundStartButton : button_device = button_device{}
@editable
RoundEndButton : button_device = button_device{}
OnBegin<override>()<suspends>:void =
# Bike is off until the round starts.
BikeSpawner.Disable()
RoundStartButton.InteractedWithEvent.Subscribe(OnRoundStart)
RoundEndButton.InteractedWithEvent.Subscribe(OnRoundEnd)
OnRoundStart(Agent : agent):void =
BikeSpawner.Enable()
BikeSpawner.RespawnVehicle()
Print("Round started — bike is live!")
OnRoundEnd(Agent : agent):void =
BikeSpawner.DestroyVehicle()
BikeSpawner.Disable()
Print("Round over — bike removed.")
React to a fresh spawn with the typed SpawnedEvent
SpawnedEvent is listenable(fort_vehicle) — it hands you the actual vehicle that spawned, which you can hold onto for later logic.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Vehicles }
using { /Verse.org/Simulation }
bike_spawn_tracker := class(creative_device):
@editable
BikeSpawner : vehicle_spawner_sportbike_device = vehicle_spawner_sportbike_device{}
OnBegin<override>()<suspends>:void =
BikeSpawner.SpawnedEvent.Subscribe(OnBikeSpawned)
# Kick off the first spawn.
BikeSpawner.RespawnVehicle()
# SpawnedEvent sends the fort_vehicle that was spawned.
OnBikeSpawned(Bike : fort_vehicle):void =
Print("A new sportbike entered the world.")
Auto-recycle a wrecked stunt bike
In a stunt arena you want the bike back the instant it's destroyed. Subscribe to DestroyedEvent and call RespawnVehicle.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
stunt_bike_loop := class(creative_device):
@editable
BikeSpawner : vehicle_spawner_sportbike_device = vehicle_spawner_sportbike_device{}
OnBegin<override>()<suspends>:void =
BikeSpawner.DestroyedEvent.Subscribe(OnDestroyed)
BikeSpawner.RespawnVehicle()
OnDestroyed():void =
Print("Bike wrecked — spawning a replacement.")
BikeSpawner.RespawnVehicle()
Gotchas
- You must declare the device as an
@editablefield. Callingvehicle_spawner_sportbike_device.RespawnVehicle()on a bare type name fails with Unknown identifier. Declare the field, bind it in the details panel. - Mount events are non-optional, trigger events are optional.
AgentEntersVehicleEvent/AgentExitsVehicleEventarelistenable(agent)— the handler signature is(Agent : agent). But atrigger_device.TriggeredEventislistenable(?agent), so you must unwrap withif (A := MaybeAgent?):. Mixing these up is a common compile error. tuple()events take no parameter.DestroyedEvent,VehicleSpawnedEvent, andVehicleDestroyedEventarelistenable(tuple()). Their handlers are declared with no parameters:OnDestroyed():void =.- Prefer
SpawnedEvent/DestroyedEventover the deprecated ones.VehicleSpawnedEventandVehicleDestroyedEventstill exist but are deprecated as of the 25.00 release.SpawnedEventis strictly better — it hands you thefort_vehicle. RespawnVehicledestroys the old bike first. If a player is riding when you call it, their bike vanishes out from under them. Use it at safe moments (round start, after dismount), not mid-ride unless that's the effect you want.AssignDriveronly works if a vehicle exists. CallRespawnVehicle()(or ensure the spawner has spawned one) beforeAssignDriver, otherwise there's no seat to put the agent in.- A
message-typed field needs localized text, not a raw string. If you add billboard or HUD text, declareMyText<localizes>(S:string):message = "{S}"and passMyText("..."). There is noStringToMessage.