Overview
The vehicle_spawner_big_rig_device is a specialized vehicle_spawner_device that spawns a Mudflap semi truck (the big rig). You place one in your level, point a Verse @editable field at it, and from code you can Enable/Disable the spawner, RespawnVehicle to drop a fresh truck (destroying any previous one), AssignDriver to seat a specific agent behind the wheel, and DestroyVehicle to blow it up.
Reach for this device when you want dynamic vehicle gameplay: a heist rig that only appears once a vault opens, a demolition-derby target that respawns each round, or a delivery truck whose driver is chosen by your match logic. Because it inherits everything from vehicle_spawner_device, the same API (and these same examples) work for the sedan, quadcrasher, taxi, and other vehicle spawners — just swap the field type.
The device also raises events: SpawnedEvent (hands you the spawned fort_vehicle), DestroyedEvent, and AgentEntersVehicleEvent / AgentExitsVehicleEvent (hand you the agent). These let you score players for stealing the rig, lock objectives behind "truck is alive", or trigger cinematics.
API Reference
vehicle_spawner_big_rig_device
Specialized
vehicle_spawner_devicethat allows a Mudflap semi truck 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_big_rig_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 "Big Rig Heist" scenario. The spawner starts disabled. When the round begins we enable it and spawn the truck. We track how many players board it, announce arrivals and departures, and if the truck is destroyed we respawn a fresh one after a short delay so the heist can continue.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Vehicles }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
big_rig_heist := class(creative_device):
# Drag your Vehicle Spawner (Big Rig) device here in the Details panel.
@editable
RigSpawner : vehicle_spawner_big_rig_device = vehicle_spawner_big_rig_device{}
# Localized text helper — message params need a localized value, not a raw string.
HeistText<localizes>(S:string):message = "{S}"
OnBegin<override>()<suspends>:void =
# React to the truck appearing.
RigSpawner.SpawnedEvent.Subscribe(OnRigSpawned)
# React to the truck being destroyed.
RigSpawner.DestroyedEvent.Subscribe(OnRigDestroyed)
# React to players getting in and out.
RigSpawner.AgentEntersVehicleEvent.Subscribe(OnAgentEnters)
RigSpawner.AgentExitsVehicleEvent.Subscribe(OnAgentExits)
# Turn the spawner on and drop the first truck.
RigSpawner.Enable()
RigSpawner.RespawnVehicle()
# SpawnedEvent hands us the actual fort_vehicle that appeared.
OnRigSpawned(Vehicle:fort_vehicle):void =
Print("Big rig has arrived on the map!")
# DestroyedEvent has no payload — respawn a fresh rig after a beat.
OnRigDestroyed():void =
Print("Big rig destroyed — sending a replacement.")
spawn { RespawnAfterDelay() }
RespawnAfterDelay()<suspends>:void =
Sleep(5.0)
RigSpawner.RespawnVehicle()
# AgentEntersVehicleEvent hands us the agent who boarded.
OnAgentEnters(Agent:agent):void =
if (Player := player[Agent]):
Print("A player boarded the big rig!")
OnAgentExits(Agent:agent):void =
Print("A player left the big rig.")
Line by line:
@editable RigSpawner : vehicle_spawner_big_rig_device— a placed device MUST be an@editablefield; a bareRigSpawner.RespawnVehicle()on an undeclared name fails with Unknown identifier. After compiling, drag your real spawner onto this field in the Details panel.HeistText<localizes>(...)— the pattern for turning astringinto amessageif you later feed text to a UI/HUD device. There is noStringToMessage.- In
OnBegin, weSubscribeeach event to a handler method declared at class scope. Handlers can't be local functions. Enable()makes sure the device is active, thenRespawnVehicle()spawns the first truck (it also clears any previous one).OnRigSpawned(Vehicle:fort_vehicle)—SpawnedEventis alistenable(fort_vehicle), so the handler receives the spawned vehicle directly (no unwrap needed).OnRigDestroyed()—DestroyedEventis alistenable(tuple()), so its handler takes no parameter. Wespawna suspends function so the 5-secondSleepdoesn't block.OnAgentEnters(Agent:agent)— the enter/exit events deliver anagent. We narrow it to aplayerwithif (Player := player[Agent])before treating it as a player.
Common patterns
Assign a specific driver when a player triggers a button
Use AssignDriver to seat the interacting player in the rig automatically — handy for a "valet" or forced-getaway moment.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
rig_valet := class(creative_device):
@editable
RigSpawner : vehicle_spawner_big_rig_device = vehicle_spawner_big_rig_device{}
@editable
CallButton : button_device = button_device{}
OnBegin<override>()<suspends>:void =
RigSpawner.Enable()
RigSpawner.RespawnVehicle()
CallButton.InteractedWithEvent.Subscribe(OnButtonPressed)
OnButtonPressed(Agent:agent):void =
# Put whoever pressed the button straight into the driver's seat.
RigSpawner.AssignDriver(Agent)
Destroy the rig when an objective is reached
Call DestroyVehicle to remove the truck — e.g. a self-destruct objective or to deny escape.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
rig_demolition := class(creative_device):
@editable
RigSpawner : vehicle_spawner_big_rig_device = vehicle_spawner_big_rig_device{}
@editable
DemolitionTrigger : trigger_device = trigger_device{}
OnBegin<override>()<suspends>:void =
RigSpawner.Enable()
RigSpawner.RespawnVehicle()
DemolitionTrigger.TriggeredEvent.Subscribe(OnTriggered)
OnTriggered(MaybeAgent:?agent):void =
# Blow up the current rig.
RigSpawner.DestroyVehicle()
Disable the spawner after the round and stop respawns
Call Disable so the device stops producing/responding — useful at end-of-round cleanup.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
rig_round_control := class(creative_device):
@editable
RigSpawner : vehicle_spawner_big_rig_device = vehicle_spawner_big_rig_device{}
@editable
EndRoundTrigger : trigger_device = trigger_device{}
OnBegin<override>()<suspends>:void =
RigSpawner.Enable()
RigSpawner.RespawnVehicle()
EndRoundTrigger.TriggeredEvent.Subscribe(OnRoundEnd)
OnRoundEnd(MaybeAgent:?agent):void =
# Remove the rig and stop the spawner from doing anything else.
RigSpawner.DestroyVehicle()
RigSpawner.Disable()
Gotchas
DestroyedEvent/VehicleDestroyedEvent/VehicleSpawnedEventarelistenable(tuple()). Their handlers take no parameter — writeOnRigDestroyed():void, notOnRigDestroyed(X:tuple()):voidmistakes. OnlySpawnedEvent(afort_vehicle) and the enter/exit events (anagent) carry a payload.VehicleSpawnedEventandVehicleDestroyedEventare deprecated. UseSpawnedEventandDestroyedEventinstead —SpawnedEventeven hands you the spawnedfort_vehicle.- Placed devices must be
@editablefields. A barevehicle_spawner_big_rig_device{}.RespawnVehicle()won't reference the real placed truck. Declare the field, then assign it in the Details panel. AssignDrivertakes a plainagent, not a player. If you have aplayer, it already is anagent. If you have a?agentfrom a trigger, unwrap it first withif (A := MaybeAgent?): RigSpawner.AssignDriver(A).RespawnVehicledestroys the previous truck first. Don't callDestroyVehiclethenRespawnVehicleexpecting two separate steps —RespawnVehiclealready clears the old one.Sleepand other<suspends>calls can't run directly in a non-suspends event handler. Wrap them inspawn { ... }calling a<suspends>helper, as the walkthrough's respawn-delay does.- Enter/exit events deliver an
agent, not necessarily a player. Narrow withif (Player := player[Agent]):before using player-only APIs.