Condition_CanSpawnCraftingObject
Description
Checks whether the BaseObject desk can spawn a crafting object at the slot(s) identified by S1.
S1 is first resolved as a SlotName (single-slot path); if no slot matches, it is reinterpreted as an ObjectSlotId and every slot with that id is considered (N-slot path for auto-generated HandCraftSlot groups on multi-seat dining tables — BL-49864).
Each candidate slot is validated by B2CraftingHelper::CanSpawnObjectAtDeskSlot, which requires the connected chair to be occupied and the surrounding box to be free of other object slots. CompareType Equal passes when at least one candidate slot can spawn; NotEqual passes when none of them can.
Parameters
| Parameter | Description |
|---|---|
| BaseObject | The desk game object that owns the slot(s) to check (Self or Target) |
| CompareType | Equal: pass when any candidate can spawn; NotEqual: pass when none can spawn |
| S1 | SlotName for a specific slot, or ObjectSlotId to match every slot of that class |
Examples
| Description | BaseObject | Command | CompareType | S1 |
|---|---|---|---|---|
| Can we spawn a crafting object at the desk slot? | Target | CanSpawnCraftingObject | Equal | Workbench_Slot |
| Is the desk slot blocked (cannot spawn)? | Target | CanSpawnCraftingObject | NotEqual | Workbench_Slot |
| Any seat on this dining table able to host a craft? | Target | CanSpawnCraftingObject | Equal | HandCraftSlot |
Back to Command FinderSearch and filter all 491 Script Condition documents