๐ซ Builder Commands
The builder commands let you lay a scene out visually and capture it. They are a build-time tool.
The commands are disabled by default. Enable them only on a development server: set
Config.Commands = true in configs/sh.config.lua and restart the resource. Turn them back off
before going live.
Once captured, a scene is placed at runtime from your own resource with the exports โ no commands required.
Exports/createzone
Lua
/createzone <uid>- Description: Creates a ground zone with the given unique id. The four corner coordinates and
the
moveStep/maxHeightare read from thegridConfigdefined inside the/createzonecommand inconfigs/c.commands.luaโ edit those to your own location before running it. - Example:
/createzone warehouse1
/createvehiclezone
Lua
/createvehiclezone <uid>- Description: Creates a zone attached to the vehicle you are currently sitting in, so its props move and rotate with the vehicle. You must be in a vehicle to run it.
- Example:
/createvehiclezone van1
/spawnpropgrid
Lua
/spawnpropgrid <model> <uid>- Description: Enters the placement editor for
<model>in zone<uid>. The model must be registered ingridProps(orgridPropsVehiclefor vehicle zones). Position the prop with the controls below and pressEnterto place it. Run it again for each prop you want to add. - Example:
/spawnpropgrid ex_prop_adv_case_sm warehouse1
Placement editor controls
| Key | Action |
|---|---|
| Arrow keys | Move the prop across the grid |
Page Up / Page Down | Raise / lower the prop |
H | Rotate the prop 90ยฐ |
N | Snap next to the nearest placed prop |
B | Cycle the move-step size |
G | Toggle the grid overlay |
Enter | Place the prop |
ESC | Cancel and exit |
/removepropgrid
Lua
/removepropgrid <uid>- Description: Enters removal mode for the zone. Press
Eto cycle through the removable props,Enterto remove the highlighted one,Gto toggle the grid, andESCto exit. - Example:
/removepropgrid warehouse1
/dumpzoneprops
Lua
/dumpzoneprops <uid>- Description: Prints a copy-pasteable Lua block of every prop currently placed in the zone โ
model, zone-local position, and rotation, with a
data = nilslot on each line to fill in. Paste the block into your own resource and replay it withPlaceGridProps. - Example:
/dumpzoneprops warehouse1
Demo commands
configs/c.commands.lua also ships three commands that exercise the placement exports end to end.
They are labelled as test/demo helpers โ remove them before production.
Lua
/testgridproduction <uid> -- creates a 4x4m zone at your feet and drops a batch of props via the exports
/testgridplace <uid> -- places a single prop via the export
/deletegridzone <uid> -- deletes a zone and all its props- Description: A quick way to verify the exports work anywhere without laying out a scene by
hand.
<uid>is optional and defaults totestscene.