RoboCatz.com
About FLL | Navigation | Playbook | Strategy | Models | Techniques | RobotC | Programming | Robot News |

-- Script for making a castle

--Workspace.startingScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local s = require(ReplicatedStorage.genericShapes)


--========================================================--
--  COURTYARD PARAMETERS
--========================================================--

local wallHeight = 6
local wallThickness = 1
local archWidth = 10
local archHeight = 8

local material = Enum.Material.Brick
local wallColor = Color3.fromRGB(210, 200, 190)

--========================================================--
--  NORTH WALL  (top)
--  From (-20,20) to (20,20)
--========================================================--

s.wall({
	x1 = -20, y1 = 0, z1 = 20,
	x2 =  20, y2 = wallHeight, z2 = 20,
	thickness = wallThickness,
	material = material,
	color = wallColor
})

--========================================================--
--  WEST WALL  (left)
--  From (-20,-20) to (-20,20)
--========================================================--

s.wall({
	x1 = -20, y1 = 0, z1 = -20,
	x2 = -20, y2 = wallHeight, z2 =  20,
	thickness = wallThickness,
	material = material,
	color = wallColor
})

--========================================================--
--  EAST WALL  (right)
--  From (20,-20) to (20,20)
--========================================================--

s.wall({
	x1 = 20, y1 = 0, z1 = -20,
	x2 = 20, y2 = wallHeight, z2 =  20,
	thickness = wallThickness,
	material = material,
	color = wallColor
})

--========================================================--
--  SOUTH WALL WITH ARCHWAY
--  Full wall would be from (-20,-20) to (20,-20)
--  Archway is centered, width = 10
--========================================================--

local halfArch = archWidth / 2

-- Left wall segment
s.wall({
	x1 = -20, y1 = 0, z1 = -20,
	x2 = -halfArch, y2 = wallHeight, z2 = -20,
	thickness = wallThickness,
	material = material,
	color = wallColor
})

-- Right wall segment
s.wall({
	x1 = halfArch, y1 = 0, z1 = -20,
	x2 = 20, y2 = wallHeight, z2 = -20,
	thickness = wallThickness,
	material = material,
	color = wallColor
})

--========================================================--
--  ARCHWAY (centered on south wall)
--========================================================--

s.archway({
	x = 0,
	z = -20,
	y = archHeight/2,
	width = archWidth,
	height = archHeight,
	thickness = wallThickness,
	material = material,
	color = wallColor,
	orientation = Vector3.new(0, 0, 0)  -- faces outward
})