Skip to main content

Execute_SpawnGameObjectToSlot

Description

Spawns the specified object and places it into a slot of the BaseObject. If S2 is None, an empty slot is found automatically based on the object's ObjectCategory. If S2 specifies a SlotId, the object is placed in the matching slot.

Parameters

ParameterDescription
BaseObjectThe game object whose slot will receive the spawned object
S1ObjectId of the game object to spawn into a slot
S2Optional SlotId (ObjectSlotTableRow.Id). If None, an empty slot is found based on ObjectCategory

Examples

DescriptionBaseObjectCommandS1S2
Spawn a plate into the first available slot on TargetTargetSpawnGameObjectToSlotPlate_Ceramic_01
Spawn a book into a specific slot on Target shelfTargetSpawnGameObjectToSlotBook_Novel_001SlotId01
Spawn a food item into Self object's available slotSelfSpawnGameObjectToSlotFood_Apple_01