**Residential Building: The Genesis - Part 5 [1st Floor Exterior Walls Build]**

Now that we have a nice floor to walk on, lets add a first floor exterior structure with a light yellow color and add a few windows with blue trim and an exterior doorway with black trim. Letâ€™s add to our original graph and add some lines and indicate a W for a window and D for a door. This will help when modding the script and if you decide to make your own house from the examples.

The script is a little involved however I took time to document each item so you can easily mod.

Letâ€™s save the following script as â€śmake1stexteriorwalls.jsâ€ť and save it to your desktop.

```
// The Genesis
// ***********
// Created by Kevin M. Thomas
// kevintown.net
//
// Voxel 1st exterior walls builder utilizing JavaScript. Compatible with the High Fidelity virtual platform. Collaborative source code freely available.
// Function to make 1st floor exterior walls on your plot.
function make1stExteriorWalls()
{
// Create left wall, section 1, down the X axis.
var x = 30;
var y = 191;
var z = 1;
while (y <= 194)
{
do
{
Voxels.setVoxel(x, y, z, 1.0, 219, 240, 84);
x++;
}
while (x <= 50);
x = 30;
y++;
}
// Erase wall voxels, section 1, to create a window.
Voxels.eraseVoxel(37, 193, 1, 1);
Voxels.eraseVoxel(38, 193, 1, 1);
Voxels.eraseVoxel(39, 193, 1, 1);
Voxels.eraseVoxel(40, 193, 1, 1);
Voxels.eraseVoxel(41, 193, 1, 1);
Voxels.eraseVoxel(42, 193, 1, 1);
Voxels.eraseVoxel(43, 193, 1, 1);
// Create exterior window frame, section 1, part 1, down the X axis.
var x = 36.75;
var y = 194;
var z = .75;
while (x <= 44)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
x = x + .25;
}
// Create exterior window frame, section 1, part 2, up the Y axis.
var x = 44;
var y = 192.75;
var z = .75;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create exterior window frame, section 1, part 3, down the X axis.
var x = 36.75;
var y = 192.75;
var z = .75;
while (x <= 44)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
x = x + .25;
}
// Create exterior window frame, section 1, part 4, up the Y axis.
var x = 36.75;
var y = 192.75;
var z = .75;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create interior window frame, section 1, part 1, down the X axis.
var x = 36.75;
var y = 194;
var z = 2;
while (x <= 44)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
x = x + .25;
}
// Create interior window frame, section 1, part 2, up the Y axis.
var x = 44;
var y = 192.75;
var z = 2;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create interior window frame, section 1, part 3, down the X axis.
var x = 36.75;
var y = 192.75;
var z = 2;
while (x <= 44)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
x = x + .25;
}
// Create interior window frame, section 1, part 4, up the Y axis.
var x = 36.75;
var y = 192.75;
var z = 2;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create rear wall, section 2, across the Z axis.
var x = 50;
var y = 191;
var z = 1;
while (y <= 194)
{
do
{
Voxels.setVoxel(x, y, z, 1.0, 219, 240, 84);
z++;
}
while (z <= 30);
z = 1;
y++;
}
// Erase wall voxels, section 2, to create a window.
Voxels.eraseVoxel(50, 193, 7, 1);
Voxels.eraseVoxel(50, 193, 8, 1);
Voxels.eraseVoxel(50, 193, 9, 1);
Voxels.eraseVoxel(50, 193, 10, 1);
Voxels.eraseVoxel(50, 193, 11, 1);
Voxels.eraseVoxel(50, 193, 12, 1);
Voxels.eraseVoxel(50, 193, 13, 1);
Voxels.eraseVoxel(50, 193, 14, 1);
Voxels.eraseVoxel(50, 193, 15, 1);
Voxels.eraseVoxel(50, 193, 16, 1);
Voxels.eraseVoxel(50, 193, 17, 1);
Voxels.eraseVoxel(50, 193, 18, 1);
Voxels.eraseVoxel(50, 193, 19, 1);
Voxels.eraseVoxel(50, 193, 20, 1);
Voxels.eraseVoxel(50, 193, 21, 1);
Voxels.eraseVoxel(50, 193, 22, 1);
Voxels.eraseVoxel(50, 193, 23, 1);
Voxels.eraseVoxel(50, 193, 24, 1);
// Create exterior window frame, section 2, part 1, across the Z axis.
var x = 51;
var y = 194;
var z = 6.75;
while (z <= 25)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
z = z + .25;
}
// Create exterior window frame, section 2, part 2, up the Y axis.
var x = 51;
var y = 192.75;
var z = 6.75;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create exterior window frame, section 2, part 3, across the Z axis.
var x = 51;
var y = 192.75;
var z = 6.75;
while (z <= 25)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
z = z + .25;
}
// Create exterior window frame, section 2, part 4, up the Y axis.
var x = 51;
var y = 192.75;
var z = 25;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create interior window frame, section 2, part 1, across the Z axis.
var x = 49.75;
var y = 194;
var z = 6.75;
while (z <= 25)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
z = z + .25;
}
// Create interior window frame, section 2, part 2, up the Y axis.
var x = 49.75;
var y = 192.75;
var z = 6.75;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create interior window frame, section 2, part 3, across the Z axis.
var x = 49.75;
var y = 192.75;
var z = 6.75;
while (z <= 25)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
z = z + .25;
}
// Create interior window frame, section 2, part 4, up the Y axis.
var x = 49.75;
var y = 192.75;
var z = 25;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create right wall, section 3, down the X axis.
var x = 30;
var y = 191;
var z = 30;
while (y <= 194)
{
do
{
Voxels.setVoxel(x, y, z, 1.0, 219, 240, 84);
x++;
}
while (x <= 50);
x = 30;
y++;
}
// Erase wall voxels, section 3, to create a window.
Voxels.eraseVoxel(37, 193, 30, 1);
Voxels.eraseVoxel(38, 193, 30, 1);
Voxels.eraseVoxel(39, 193, 30, 1);
Voxels.eraseVoxel(40, 193, 30, 1);
Voxels.eraseVoxel(41, 193, 30, 1);
Voxels.eraseVoxel(42, 193, 30, 1);
Voxels.eraseVoxel(43, 193, 30, 1);
// Create exterior window frame, section 3, part 1, down the X axis.
var x = 36.75;
var y = 194;
var z = 31;
while (x <= 44)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
x = x + .25;
}
// Create exterior window frame, section 3, part 2, up the Y axis.
var x = 44;
var y = 192.75;
var z = 31;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create exterior window frame, section 3, part 3, down the X axis.
var x = 36.75;
var y = 192.75;
var z = 31;
while (x <= 44)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
x = x + .25;
}
// Create exterior window frame, section 3, part 4, up the Y axis.
var x = 36.75;
var y = 192.75;
var z = 31;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create interior window frame, section 3, part 1, down the X axis.
var x = 36.75;
var y = 194;
var z = 29.75;
while (x <= 44)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
x = x + .25;
}
// Create interior window frame, section 3, part 2, up the Y axis.
var x = 44;
var y = 192.75;
var z = 29.75;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create interior window frame, section 3, part 3, down the X axis.
var x = 36.75;
var y = 192.75;
var z = 29.75;
while (x <= 44)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
x = x + .25;
}
// Create interior window frame, section 3, part 4, up the Y axis.
var x = 36.75;
var y = 192.75;
var z = 29.75;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create front wall, section 4, across the Z axis.
var x = 30;
var y = 191;
var z = 1;
while (y <= 194)
{
do
{
Voxels.setVoxel(x, y, z, 1.0, 219, 240, 84);
z++;
}
while (z <= 30);
z = 1;
y++;
}
// Erase wall voxels, section 4, to create a left window.
Voxels.eraseVoxel(30, 193, 6, 1);
Voxels.eraseVoxel(30, 193, 7, 1);
Voxels.eraseVoxel(30, 193, 8, 1);
Voxels.eraseVoxel(30, 193, 9, 1);
// Create exterior left window frame, section 4, part 1, across the Z axis.
var x = 29.75;
var y = 194;
var z = 5.75;
while (z <= 10)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
z = z + .25;
}
// Create exterior left window frame, section 4, part 2, up the Y axis.
var x = 29.75;
var y = 192.75;
var z = 5.75;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create exterior left window frame, section 4, part 3, across the Z axis.
var x = 29.75;
var y = 192.75;
var z = 5.75;
while (z <= 10)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
z = z + .25;
}
// Create exterior left window frame, section 4, part 4, up the Y axis.
var x = 29.75;
var y = 192.75;
var z = 10;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create interior left window frame, section 4, part 1, across the Z axis.
var x = 31;
var y = 194;
var z = 5.75;
while (z <= 10)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
z = z + .25;
}
// Create interior left window frame, section 4, part 2, up the Y axis.
var x = 31;
var y = 192.75;
var z = 5.75;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create interior left window frame, section 4, part 3, across the Z axis.
var x = 31;
var y = 192.75;
var z = 5.75;
while (z <= 10)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
z = z + .25;
}
// Create interior left window frame, section 4, part 4, up the Y axis.
var x = 31;
var y = 192.75;
var z = 10;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Erase wall voxels, section 4, to create an exterior door opening.
Voxels.eraseVoxel(30, 192, 14, 1);
Voxels.eraseVoxel(30, 192, 15, 1);
Voxels.eraseVoxel(30, 192, 16, 1);
Voxels.eraseVoxel(30, 193, 14, 1);
Voxels.eraseVoxel(30, 193, 15, 1);
Voxels.eraseVoxel(30, 193, 16, 1);
// Create exterior door frame, section 4, part 1, across the Z axis.
var x = 29.75;
var y = 194;
var z = 13.75;
while (z <= 17)
{
Voxels.setVoxel(x, y, z, .25, 1, 1, 1);
z = z + .25;
}
// Create exterior door frame, section 4, part 2, up the Y axis.
var x = 29.75;
var y = 192;
var z = 17;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 1, 1, 1);
y = y + .25;
}
// Create exterior door frame, section 4, part 3, up the Y axis.
var x = 29.75;
var y = 192;
var z = 13.75;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 1, 1, 1);
y = y + .25;
}
// Create interior door frame, section 4, part 1, across the Z axis.
var x = 31;
var y = 194;
var z = 13.75;
while (z <= 17)
{
Voxels.setVoxel(x, y, z, .25, 1, 1, 1);
z = z + .25;
}
// Create interior door frame, section 4, part 2, up the Y axis.
var x = 31;
var y = 192;
var z = 17;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 1, 1, 1);
y = y + .25;
}
// Create interior door frame, section 4, part 3, up the Y axis.
var x = 31;
var y = 192;
var z = 13.75;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 1, 1, 1);
y = y + .25;
}
// Erase wall voxels, section 4, to create a right window.
Voxels.eraseVoxel(30, 193, 21, 1);
Voxels.eraseVoxel(30, 193, 22, 1);
Voxels.eraseVoxel(30, 193, 23, 1);
Voxels.eraseVoxel(30, 193, 24, 1);
// Create exterior right window frame, section 4, part 1, across the Z axis.
var x = 29.75;
var y = 194;
var z = 20.75;
while (z <= 25)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
z = z + .25;
}
// Create exterior right window frame, section 4, part 2, up the Y axis.
var x = 29.75;
var y = 192.75;
var z = 20.75;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create exterior right window frame, section 4, part 3, across the Z axis.
var x = 29.75;
var y = 192.75;
var z = 20.75;
while (z <= 25)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
z = z + .25;
}
// Create exterior right window frame, section 4, part 4, up the Y axis.
var x = 29.75;
var y = 192.75;
var z = 25;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create interior right window frame, section 4, part 1, across the Z axis.
var x = 31;
var y = 194;
var z = 20.75;
while (z <= 25)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
z = z + .25;
}
// Create interior right window frame, section 4, part 2, up the Y axis.
var x = 31;
var y = 192.75;
var z = 20.75;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Create interior right window frame, section 4, part 3, across the Z axis.
var x = 31;
var y = 192.75;
var z = 20.75;
while (z <= 25)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
z = z + .25;
}
// Create interior right window frame, section 4, part 4, up the Y axis.
var x = 31;
var y = 192.75;
var z = 25;
while (y <= 194)
{
Voxels.setVoxel(x, y, z, .25, 22, 42, 102);
y = y + .25;
}
// Stop script.
Script.stop();
}
Script.update.connect(make1stExteriorWalls);
```