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
| Parameter | Description |
|---|---|
| BaseObject | The game object whose slot will receive the spawned object |
| S1 | ObjectId of the game object to spawn into a slot |
| S2 | Optional SlotId (ObjectSlotTableRow.Id). If None, an empty slot is found based on ObjectCategory |
Examples
| Description | BaseObject | Command | S1 | S2 |
|---|---|---|---|---|
| Spawn a plate into the first available slot on Target | Target | SpawnGameObjectToSlot | Plate_Ceramic_01 | |
| Spawn a book into a specific slot on Target shelf | Target | SpawnGameObjectToSlot | Book_Novel_001 | SlotId01 |
| Spawn a food item into Self object's available slot | Self | SpawnGameObjectToSlot | Food_Apple_01 |
Back to Command FinderSearch and filter all 399 Script Execution documents