|
| 27 Dec 2013 10:06 AM |
In case anyone wants it: loop = true ids = {0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17} while loop == true do wait(.0001) for i = 1, 1000 do workspace.Terrain:SetCell(math.random(-50, 50), math.random(0, 40), math.random(-50, 50), ids[math.random(1, #ids)], "Solid", "X") end if workspace.Terrain:CountCells() > 50000 then break end end |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 10:28 AM |
| Nobody *wants* this script. Instead, let's discuss about it.. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 10:29 AM |
| Meh I don't like Roblox's terrain very much. Which is a pity because I would prefer the terrain to normal blocks for my project, but it doesn't look very nice, and the stuff you can do with it is very limiting when it comes to detail. |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 27 Dec 2013 10:30 AM |
That is ugly code.
Plus, it isn't *random*, it's pseudo random.
If you want proper terrain, you're better off looking for a perlin/simplex noise implementation. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 10:32 AM |
| Or you can stick to a simple and repeating pattern. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 10:33 AM |
| I don't care if it is "ugly" it works, and I wanted to just make random terrain blocks around the map. This wasn't to simulate the built in plugin. And, the "math.random" works fine. And by the way, the id table is to make it so there is more empty space. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 10:34 AM |
| The environment is not supposed to be realistic. By the way, I just learned how to use terrain 5 minutes before I posted this, so I don't know all the fancy methods you use. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 10:37 AM |
What's the point in the loop variable? This code looks like it would just create some random mess of blocks, with no actual ground terrain. In some cases it would probably look like a cube with random holes in it.
|
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 11:20 AM |
What is this:
loop = true while loop == true do
use while true do please |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Dec 2013 11:26 AM |
ugh inefficient code...
im dying... |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 11:33 AM |
@Fluff
The loop eventually breaks when the terrain's CountCells returns 50001. I think while true do is better. 100x40x100 is 40000, which leaves 10000 unchanged cells. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 11:45 AM |
This is better:
http://www.roblox.com/Basic-Hills-Terrain-Generation-place?id=12401166
However, it doesn't use Roblox terrain... |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 11:47 AM |
@thenickmaster
I love waves. Nice. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 12:12 PM |
@Visual I originally had incorperated the loop part to break the loop but I realized I could use "break" and was too lazy to remove it. |
|
|
| Report Abuse |
|
|
PhokiusV3
|
  |
| Joined: 07 May 2013 |
| Total Posts: 805 |
|
|
| 27 Dec 2013 06:38 PM |
| Look in my Models section for a Map Generator I made for inspiration. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 06:56 PM |
"100x40x100 is 40000," no it's not 100 * 40 = 4000 4000 * 100 = 400000 |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 06:57 PM |
| My mistake. Don't ever put me in charge of a life-threatening situation involving multiplying numbers. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 07:11 PM |
ya i dont like multiplying either its (mostly) easy but i always lose track of the numbers (in my head that is, which i assume you did) |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2013 07:55 PM |
@Coolio
Hmmm? The generation makes a tons of spheres and then adds them all together and normalizes the height. |
|
|
| Report Abuse |
|
|