Skip to main content

Execute_SpawnServedFoodToSlot

Description

Takes the FoodObject currently held by the NonBaseObject character and spawns its served form (ServedFood for PreparedFood, or itself if already ServedFood) into an empty or replaceable slot on the BaseObject GameObject. The number of servings spawned matches the food's own NumServings.

Parameters

ParameterDescription
BaseObjectThe GameObject whose slots will receive the spawned served food
S1Optional ObjectSlotId to target; if empty, an empty slot matching the food's ObjectCategory is used
S2Optional State to apply to each spawned food after spawning, e.g. "Saleable_HHB"

Notes

  • The character holding the food is resolved internally via ScriptContext (NonBaseObject).
  • See SpawnServedFoodToSlotInternal for slot selection and occupied-slot replacement rules.

Examples

DescriptionBaseObjectCommandS1S2
Serve held food onto Target's matching empty slotTargetSpawnServedFoodToSlot
Serve held food into a specific slotTargetSpawnServedFoodToSlotSlot_Table_01