ethan3300
|
  |
| Joined: 10 Nov 2009 |
| Total Posts: 5222 |
|
|
| 26 Aug 2011 05:57 PM |
for i = 1, 200 do local part = Instance.new("Part", workspace) part.Anchored = true part.Size = Vector3.new(math.random(1, 20), math.random(1, 20), math.random(1, 20)) part.CFrame = CFrame.new(math.random(-100, 100), part.Size.Y/2, math.random(-100, 100)) end -- for the for loop local size = Vector3.new(10,10,10) local base = script.Parent local tilePart = Instance.new("Part") tilePart.Anchored = true tilePart.formFactor = "Custom" tilePart.Size = base.Size / size for x = 1, size.x do for z = 1, size.z do local y = math.random(size.y) local tile = tilePart:clone()
local position = Vector3.new(x-1, 0, z-1) * tile.Size tile.Size = tile.Size * Vector3.new(1, y, 1) tile.CFrame = CFrame.new(tile.Size/2) tile.CFrame = tile.CFrame - base.Size / 2 tile.CFrame = tile.CFrame + position tile.CFrame = base.CFrame * tile.CFrame tile.Parent = workspace end end local colors = {BrickColor.Red(), BrickColor.Black(), BrickColor.White()} function color(part) part.BrickColor = colors[math.random(#colors)] end color(a) end if part.Size.Y > 7 then part.BrickColor = colors[3] elseif part.Size.Y > 3 then part.BrickColor = colors[2] else part.BrickColor = colors[1] end end
It just doesnt have the colors show up and it won't form into a mountain I followed the intsructions and it won't work so what do? |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2011 05:58 PM |
'I followed the intsructions'
Make it yourself and stop using free models? |
|
|
| Report Abuse |
|
|
ethan3300
|
  |
| Joined: 10 Nov 2009 |
| Total Posts: 5222 |
|
|
| 26 Aug 2011 05:59 PM |
| I was reading from the wiki -_- |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 26 Aug 2011 06:00 PM |
Yay you read my article! :D
Anyways, you have to run the color function inside the for loops, also are you trying to run two at once?
And you seem to have the color functions mixed up?
|
|
|
| Report Abuse |
|
|
|
| 26 Aug 2011 06:03 PM |
WAIT! Since when is there a wiki article on terrain generators? Bleh, I wouldn't know, I don't read the wiki tutorials most of the time :o I mainly use it as a object browser.
-Reads through wiki tutorials-
Holy crap, you wiki people have CHANGED it. o.o There are a bunch more tutorials. Interesting....:o |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 26 Aug 2011 06:04 PM |
| @dark you're alil late, I wrote that months ago. Along with the coroutine and camera manipulation ones. |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2011 06:06 PM |
| Wuh...RAGEEE. >.> I haven't been coding as often because of no studio. ._. Sigh...Well, I'm make sure to check the wiki more often then. -Makes mental note- Did you add some stuff on FindPartInRegion3? I never understood that, and there wasn't really a example or anything to tell me how to use it..I found one a raycasting(Which I've been needing) though. I already know coroutine but I'll check out the camera manipulation one. |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 26 Aug 2011 06:08 PM |
| Somebody asked me to do that awhile ago, however there's enough there to be able to figure it out, I'll add an example I guess. |
|
|
| Report Abuse |
|
|
| |
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 26 Aug 2011 06:17 PM |
http://wiki.roblox.com/index.php/Region3
Anaminus already had some good examples there, I just added some to it. |
|
|
| Report Abuse |
|
|