start structure
Starts a new structure to contain the Builder’s creations.
builder.startStructure()
Whenever the Builder places, fills, or draws a line with a block, the structure will be expanded to include the position where it occurred.
Call ||builder:save structure||
to save the structure and ||builder:load structure||
to paste it into the world.
Example
This example constructs a 3x3x3 cube with random colors of concrete as a structure and then pastes that structure to create an even bigger cube.
player.onChat("cube", function () {
builder.teleportTo(pos(0, 0, 0))
builder.move(FORWARD, 5)
builder.setOrigin()
builder.startStructure()
for (let index = 0; index < 3; index++) {
for (let index = 0; index < 3; index++) {
for (let index = 0; index < 3; index++) {
builder.place([
LIGHT_BLUE_CONCRETE,
LIME_CONCRETE,
PINK_CONCRETE,
ORANGE_CONCRETE
]._pickRandom())
builder.move(FORWARD, 1)
}
builder.move(RIGHT, 1)
builder.move(BACK, 3)
}
builder.move(LEFT, 3)
builder.move(UP, 1)
}
builder.saveStructure("cube")
builder.teleportToOrigin()
builder.move(FORWARD, 10)
builder.move(LEFT, 4)
for (let index = 0; index < 3; index++) {
for (let index = 0; index < 3; index++) {
for (let index = 0; index < 3; index++) {
builder.loadStructure("cube")
builder.move(FORWARD, 4)
}
builder.move(RIGHT, 4)
builder.move(BACK, 12)
}
builder.move(LEFT, 12)
builder.move(UP, 4)
}
})
See Also
||builder:save structure||
||builder:load structure||
Here’s an example project that uses the Builder: Build a house.