Skip to main content

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

ParameterDescription
BaseObjectThe character used as the origin for finding a safe spawn location
S1ObjectId of the game object to spawn
S2Optional "StateGroupId,StateId" (comma-separated) to apply after spawning
F1Minimum spawn range in cm from BaseObject
F2Maximum spawn range in cm from BaseObject

Examples

DescriptionBaseObjectCommandS1S2F1F2
Spawn KitchenRange01 within 500-1000cm rangeSelfSpawnGameObjectKitchenRange01Broken,Broken5001000
Spawn KitchenRange01 within 100cm rangeSelfSpawnGameObjectKitchenRange010100