Overview
The vehicle_spawner_driftboard_device is a specialized vehicle_spawner_device that configures and spawns a Driftboard — Fortnite's hoverboard-style movement vehicle. You place one in your level, point a Verse @editable field at it, and then you can drive the whole lifecycle from code.
Reach for it when you want a Driftboard tied to game logic rather than just sitting in the world:
- A stunt course where stepping on a starting pad spawns a board and auto-mounts the player.
- A race arena that destroys the old board and respawns a clean one each round.
- A score system that awards points when a player mounts the board and pauses when they bail.
Because it inherits everything from vehicle_spawner_device, the same API (Enable, Disable, AssignDriver, DestroyVehicle, RespawnVehicle, plus the enter/exit/spawn/destroy events) applies to all the other vehicle spawners too — sedans, quadcrashers, surfboards, and so on. Learn it here, reuse it everywhere.
API Reference
vehicle_spawner_driftboard_device
Specialized
vehicle_spawner_devicethat allows a Driftboard 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_driftboard_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 Driftboard stunt-start. When a player steps on a trigger pad:
- The spawner respawns a fresh Driftboard (destroying any old one).
- The same player is automatically assigned as the driver.
We also react to the board being destroyed (player wiped out) by spawning a replacement, and we track when riders enter and exit.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# Place this Verse device in your level, then in its Details panel
# wire StartPad to a Trigger device and Spawner to a Driftboard spawner.
driftboard_stunt_start := class(creative_device):
@editable
StartPad : trigger_device = trigger_device{}
@editable
Spawner : vehicle_spawner_driftboard_device = vehicle_spawner_driftboard_device{}
# Remember who triggered, so we can make them the driver of the new board.
var PendingDriver : ?agent = false
OnBegin<override>()<suspends>:void =
# Make sure the spawner is live.
Spawner.Enable()
# When a player steps on the pad, prepare a fresh board for them.
StartPad.TriggeredEvent.Subscribe(OnPadStepped)
# React to the lifecycle of the board itself.
Spawner.SpawnedEvent.Subscribe(OnBoardSpawned)
Spawner.DestroyedEvent.Subscribe(OnBoardDestroyed)
Spawner.AgentEntersVehicleEvent.Subscribe(OnRiderEnters)
Spawner.AgentExitsVehicleEvent.Subscribe(OnRiderExits)
# TriggeredEvent hands us a ?agent — unwrap it before use.
OnPadStepped(Agent : ?agent):void =
if (Player := Agent?):
# Stash the player so OnBoardSpawned can mount them.
set PendingDriver = option{Player}
# Destroy the old board (if any) and spawn a brand-new one.
Spawner.RespawnVehicle()
# SpawnedEvent sends the fort_vehicle that appeared.
OnBoardSpawned(Vehicle : fort_vehicle):void =
Print("A fresh Driftboard spawned")
# If someone is waiting to ride, put them on it.
if (Driver := PendingDriver?):
Spawner.AssignDriver(Driver)
set PendingDriver = false
# DestroyedEvent takes no payload (tuple()).
OnBoardDestroyed():void =
Print("Driftboard destroyed — sending out a replacement")
Spawner.RespawnVehicle()
OnRiderEnters(Agent : agent):void =
Print("A player mounted the Driftboard")
OnRiderExits(Agent : agent):void =
Print("A player left the Driftboard")
Line by line:
@editable StartPad/@editable Spawner— these fields let you point at the placed Trigger and Driftboard spawner in the Details panel. A device you never declared as an@editablefield cannot be called.var PendingDriver : ?agent = false— an optional that holds the player we want to mount.falseis the empty option.Spawner.Enable()inOnBeginguarantees the device is active before anyone interacts.StartPad.TriggeredEvent.Subscribe(OnPadStepped)— subscribe handler methods insideOnBegin. The handlers themselves are methods at class scope.OnPadStepped(Agent : ?agent)— alistenable(?agent)event delivers a?agent;if (Player := Agent?)unwraps it. We save the player, then callRespawnVehicle()which destroys the previous board and spawns a new one.OnBoardSpawned(Vehicle : fort_vehicle)—SpawnedEventcarries the actualfort_vehicle. Once the new board exists,AssignDriver(Driver)snaps the waiting player onto it.OnBoardDestroyed()—DestroyedEventislistenable(tuple()), so the handler takes no parameters. We respawn a replacement.
Common patterns
Enable/Disable a board station during downtime
Keep the Driftboard station turned off between rounds, then switch it on when the match begins.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
driftboard_station := class(creative_device):
@editable
Spawner : vehicle_spawner_driftboard_device = vehicle_spawner_driftboard_device{}
@editable
OpenButton : button_device = button_device{}
@editable
CloseButton : button_device = button_device{}
OnBegin<override>()<suspends>:void =
# Start closed.
Spawner.Disable()
OpenButton.InteractedWithEvent.Subscribe(OnOpen)
CloseButton.InteractedWithEvent.Subscribe(OnClose)
OnOpen(Agent : agent):void =
Spawner.Enable()
# Make sure a board is ready the moment we open.
Spawner.RespawnVehicle()
OnClose(Agent : agent):void =
# Clear the board and shut the station down.
Spawner.DestroyVehicle()
Spawner.Disable()
Score riders using the enter/exit events
Use AgentEntersVehicleEvent and AgentExitsVehicleEvent to detect who is riding.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
driftboard_scorer := class(creative_device):
@editable
Spawner : vehicle_spawner_driftboard_device = vehicle_spawner_driftboard_device{}
@editable
PointsTracker : score_manager_device = score_manager_device{}
OnBegin<override>()<suspends>:void =
Spawner.Enable()
Spawner.AgentEntersVehicleEvent.Subscribe(OnEnter)
Spawner.AgentExitsVehicleEvent.Subscribe(OnExit)
# These events deliver a plain agent (already unwrapped).
OnEnter(Agent : agent):void =
PointsTracker.Activate(Agent)
OnExit(Agent : agent):void =
Print("Rider dismounted; stopping their stunt timer")
Force-clear and respawn on a timer
Reset the board every few seconds so abandoned boards don't pile up.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
driftboard_resetter := class(creative_device):
@editable
Spawner : vehicle_spawner_driftboard_device = vehicle_spawner_driftboard_device{}
OnBegin<override>()<suspends>:void =
Spawner.Enable()
loop:
Sleep(30.0)
# Tidy up: destroy whatever is there, then spawn anew.
Spawner.DestroyVehicle()
Sleep(1.0)
Spawner.RespawnVehicle()
Gotchas
DestroyedEventandVehicleDestroyedEventtake NO parameters. They arelistenable(tuple()), so the handler signature isOnX():void— notOnX(Agent:agent). Same forVehicleSpawnedEvent.- Prefer
SpawnedEvent/DestroyedEventover the deprecatedVehicleSpawnedEvent/VehicleDestroyedEvent. OnlySpawnedEventhands you the actualfort_vehicle; the deprecated ones give you nothing. - Enter/exit events deliver a plain
agent, not?agent.AgentEntersVehicleEventislistenable(agent), so noAgent?unwrap is needed in those handlers. The Trigger device'sTriggeredEvent, by contrast, islistenable(?agent)and must be unwrapped withif (P := Agent?):. AssignDriveronly works if a vehicle exists. If you call it before a board has spawned, there's nothing to mount. Drive it fromSpawnedEvent(as in the walkthrough) or after aRespawnVehicle()has produced a board.RespawnVehicle()destroys the previous vehicle first. Don't callDestroyVehicle()immediately followed byRespawnVehicle()if you only wanted one board —RespawnVehicle()already handles the cleanup.- You must declare the spawner as an
@editablefield inside yourcreative_deviceclass and wire it in the Details panel. A bare reference to the device type won't resolve to your placed device.