Random terrain: Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
→Mountains
>Sduke524 (You forgot to add a space in the empty line, also why did you change all the code? It was fine.) |
>MrHistory |
||
Line 93: | Line 93: | ||
local a=part:clone() | local a=part:clone() | ||
local random_factor=math.random(-2,2) | local random_factor=math.random(-2,2) | ||
a.Size=Vector3.new( | a.Size=Vector3.new(part.Size.X/Xlength,rand+random_factor,par.Size.Z/Zlength) | ||
if random_factor>0 then | if random_factor>0 then | ||
rand=rand+random_factor | rand=rand+random_factor | ||
end | end | ||
[[Image:Mountain.PNG|center|200px]] | [[Image:Mountain.PNG|center|200px]] | ||
=== Lake === | === Lake === | ||
Now to make a lake, we won't need random_factor or rand. All that will be needed is a little bit of math to add in the weighted factors. Just try | Now to make a lake, we won't need random_factor or rand. All that will be needed is a little bit of math to add in the weighted factors. Just try |