Execute_SpawnGameObject
Description
Spawns a GameObject at a safe location near the BaseObject character within the specified range. Finds a safe space on the same floor and spawns the object there. If the object is a CarriableObject, also updates the site's pathfinding grid information. Optionally applies a state after spawning.
Parameters
| Parameter | Description |
|---|---|
| BaseObject | The character used as the origin for finding a safe spawn location |
| S1 | ObjectId of the game object to spawn |
| S2 | Optional "StateGroupId,StateId" (comma-separated) to apply after spawning |
| F1 | Minimum spawn range in cm from BaseObject |
| F2 | Maximum spawn range in cm from BaseObject |
Examples
| Description | BaseObject | Command | S1 | S2 | F1 | F2 |
|---|---|---|---|---|---|---|
| Spawn KitchenRange01 within 500-1000cm range | Self | SpawnGameObject | KitchenRange01 | Broken,Broken | 500 | 1000 |
| Spawn KitchenRange01 within 100cm range | Self | SpawnGameObject | KitchenRange01 | 0 | 100 |
Back to Command FinderSearch and filter all 399 Script Execution documents