Skip to content

End-To-End Runtime Trace

This chapter ties the current vertical slice together as a runtime story.

Spawn

The level contains BP_SalvageSpawnPoint.

At BeginPlay:

AAndromedaSalvageSpawnPoint::BeginPlay
-> SpawnSalvageItem
-> SpawnActor<AAndromedaSalvageItem>

The spawn point uses its location and rotation, but explicitly spawns at unit scale:

SpawnParameters.TransformScaleMethod = ESpawnActorScaleMethod::OverrideRootScale;
FTransform SpawnTransform(Rotation, Location, FVector::OneVector);

This avoids accidentally inheriting scale from the spawn point or from the spawned Blueprint root.

Pick Up

The player looks at the spawned salvage item.

Tick
-> UpdateFocusedInteractable
-> line trace hits BP_DamagedReactorCoil
-> ResolveInteractableFromHit returns the item actor
-> CanInteract succeeds
-> prompt displays "Pick up Damaged Reactor Coil"

Player presses E:

InteractInput
-> Execute_Interact on salvage item
-> AAndromedaSalvageItem::Interact_Implementation
-> CarryComponent->PickUpItem(this)
-> item attaches to CarryHoldPoint

The item collision is disabled while carried and the character trace ignores it.

Drop

If the player looks at empty space and presses E:

FocusedInteractableObject is null
-> CarryComponent->DropHeldItem
-> ReleaseHeldItemAtTransform
-> item detaches in front of player
-> collision restored

This is contextual drop. There is no separate drop input.

Place On Scanner

The player picks the item back up, looks at BP_Scanner, and presses E.

line trace focuses scanner
-> scanner CanInteract calls station base logic
-> player is carrying acceptable item
-> prompt displays "Place item on scanner"
-> E calls scanner Interact
-> AAndromedaItemStation::PlaceItemFromCharacter
-> CarryComponent->PlaceHeldItem(PlacementPoint)
-> station PlacedItem = item
-> item CurrentStation = scanner

The scanner now owns a placed item.

Run Scanner

The player looks at the scanner again and presses E.

scanner has PlacedItem
-> CanUsePlacedItem succeeds
-> scanner UsePlacedItem
-> ScanCurrentItem
-> PlacedItem->ScanItem
-> cached scan result stored on item
-> WBP_ScanResult created

The scanner UI opens in UI-only input mode. The player closes it with CloseButton.

Move To Tagging Bench

The player looks at the placed item and presses E.

salvage item CanInteract succeeds
-> CarryComponent->PickUpItem
-> item has CurrentStation
-> scanner ClearPlacedItem
-> item attaches to carry hold point

The player carries it to BP_TaggingBench.

tagging bench CanAcceptItem
-> base station accepts item
-> item HasBeenScanned is true
-> place item

The player presses E again on the occupied tagging bench:

CanUsePlacedItem
-> item scanned
-> item not package assigned
-> AssignRequiredPackage
-> bPackageAssigned = true

For now, the result is shown as an on-screen debug message.

Move To Warehouse Zone

The player picks up the packaged item.

The warehouse zone accepts only packaged items:

Super::CanAcceptItem
and CandidateItem->IsPackageAssigned()

The player places the item in either:

BP_SellWarehouseZone
BP_QuarantineWarehouseZone

Placement triggers final processing:

HandleItemPlaced
-> Item->ProcessSalvage(ProcessingAction)
-> Data Asset processing rule determines result
-> processing state changes
-> item interaction disabled
-> WBP_ShiftResult opens

That is the current complete loop.

Current Slice Summary

The current slice is no longer:

scan item
-> click Sell/Quarantine in scanner UI

It is:

spawn item in cargo hangar
-> pick up
-> optionally drop
-> place on scanner
-> scan evidence
-> carry to tagging bench
-> assign package
-> carry to warehouse zone
-> finalize sell/quarantine consequence

This better matches the design principle:

Every object is evidence.