Skip to main content

FB2Action_WalkToHome

Overview

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

Metadata

FieldValue
Kindaction
EnvironmentB2 - Simulation
Categoryactions
ExtendsFB2Action_WalkTo
Requirerequire('Actions.B2Action_WalkToHome')

Properties (11)

NameTypeDescription
DespawnSpawnerEntityIdFB1EntityIdDespawn spawner to walk/teleport to when going home via a spawner (invalid when the destination is a residence site)
GetOutOriginSiteEntityIdFB1EntityIdSite the walker was being evicted from when this action started
GetOutResolvedDestinationFVectorLast destination successfully resolved by WalkToHome for the eviction move
HomeSiteEntityIdFB1EntityId
PendingAccommodationRoomIdstringCheck-in room purpose to walk to inside the accommodation site during stage-2
PendingAccommodationSiteIdFB1EntityIdAccommodation site id to arrive at before resuming the pending stage-2 accommodation room move
PreviousLocationFVectorWalker's location on the previous tick, used to detect arrival at the despawn spawner
bArrivedSiteNeedAccommodationRoomMovebooleanTrue while arrival at the accommodation is done and a stage-2 accommodation room move is still pending
bDidGetOutFallbackTeleportbooleanWhether the eviction fallback teleport has already been performed
bHasGetOutResolvedDestinationbooleanWhether an eviction destination was successfully resolved
bUseGetOutFallbackbooleanWhether this WalkToHome action should use the eviction cancellation fallback

Functions (4)

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

Override points (4)

Implement these in Lua as FB2Action_WalkToHome.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_OnTickDeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number-Timing hook called every tick while the action runs. (performance-sensitive)