so, basically I would want to make mountains which generates at certain locations, but I am beyond unsure on how I would do it, I did structure generation and terrain generation but not for mountains.
Here is the entire code:
local seed = math.random(1,1)
local mapSize = 100
local coveredBlocks = {}
for xAxis = 1, mapSize do
for zAxis = 1, mapSize do
local noise = math.noise(seed, xAxis/60, zAxis/60)*8
local block = script.Parent.Block:Clone()
local yPos = noise
if yPos == 2 then
block.BrickColor = BrickColor.new("Dark grey")
end
block.Position = Vector3.new(xAxis*4, math.floor(noise)*4, zAxis*4)
block.Parent = workspace.RandomGeneratedMap
--Structure generation
if math.random(1, 5000) == 1 then
if xAxis <= 1 or zAxis <= 1 or xAxis >= mapSize-1 or zAxis >= mapSize-1 then continue end
noise = math.floor(noise)
local flat = true
for x = -1, 1 do
if coveredBlocks[(xAxis+x)] == nil then coveredBlocks[(xAxis+x)] = {} end
for z = -1, 1 do
if coveredBlocks[(xAxis+x)][(zAxis+z)] or noise ~= math.floor(math.noise(seed, (xAxis+x)/60, (zAxis+z)/60)*8) then
flat = false
break
end
end
end
if flat then
local structure = script.Parent["Life Shrine"]:Clone()
structure.Parent = workspace.RandomGeneratedMap.Structures
structure:MoveTo(block.Position)
for x = -1, 1 do
if coveredBlocks[(xAxis+x)] == nil then coveredBlocks[(xAxis+x)] = {} end
for z = -1, 1 do
coveredBlocks[(xAxis+x)][(zAxis+z)] = true
end
end
end
end
end
end
increasing the noise would not be an option as the blocks would need to be bigger.
yes, it is a dumb topic for support considering I did all this, though I did get help from someone for structure generation.