Skip to main content

Execute_SpawnServedFoodToSlotByFamily

Description

Same as SpawnServedFoodToSlot, but overrides the serving count with the number of household members currently located at the same site as the NonBaseObject character (minimum 1), instead of using 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).
  • Serving count = number of household members located at the character's site (falls back to 1 if the count cannot be determined).

Examples

DescriptionBaseObjectCommandS1S2
Serve food onto Target sized for the family present at the siteTargetSpawnServedFoodToSlotByFamily