Skip to main content

FB2Action_SpawnVehicle

Overview

  • SpawnVehicle action. Override the OnPlay/OnFinish/OnPaused/OnCanceled/OnTick timing hooks in Lua.

Metadata

FieldValue
Kindaction
EnvironmentB2 - Simulation
Categoryactions
ExtendsFB2Action_Base
Requirerequire('Actions.B2Action_SpawnVehicle')

Properties (4)

NameTypeDescription
NavPathRetryCountintegerB2PathFindSystem::AsyncQueryPath has no retry-count parameter at all, and this class's path-find failure handler calls TryFinish immediately with no retry loop (checked sibling B2Action_SpawnVehicleAtGarage.h too - also unused there)
SpawnLocationFVectorWorld location resolved for spawning the vehicle (via NavMesh search or city graph point)
SpawnRotationFRotatorWorld rotation resolved for spawning the vehicle (via NavMesh search or city graph point)
bAllowSpawnOnNavMeshbooleanWhether to spawn the vehicle near the character via a NavMesh-based search instead of a city graph road point query

Functions (5)

FunctionParametersReturnsDescription
OnCanceled--Callback invoked on Canceled.
OnFinish--Callback invoked on Finish.
OnPaused--Callback invoked on Paused.
OnPlay--Callback invoked on Play.
OnTickDeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number-Callback invoked on Tick.

Override points (5)

Implement these in Lua as FB2Action_SpawnVehicle.Override_Name = function(...) end.

FunctionParametersReturnsDescription
Override_OnCanceled--Timing hook called when the action is canceled.
Override_OnFinish--Timing hook called when the action finishes.
Override_OnPaused--Timing hook called when the action is paused.
Override_OnPlay--Timing hook called when the action starts (play). Override in Lua to replace the start behavior.
Override_OnTickDeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number-Timing hook called every tick while the action runs. (performance-sensitive)