generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: I hate to be that guy...

Previous Thread :: Next Thread 
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
14 Jul 2016 03:57 PM
Who posts his whole script, but here is quite a chunk of my map gen script (please don't roast me about it since i just made it today)

local vertex = Instance.new("Part")
vertex.Size = Vector3.new(1, 1, 1)
vertex.Anchored = true

local verticies = {}

local width,height,length = 10,10,10

function generateTerrain()
for i = 0, width do
for ii = 0, length - 1 do
local y = math.random(10)
vertex:Clone().Parent = game.Workspace.Verticies
vertex.Position = Vector3.new(i*10, y, ii*10)
vertex.Name = i .. ii
if i == width then
vertex.Name = "z" .. i .. ii
end
end
end
verticies = game.Workspace.Verticies:GetChildren()
game.Workspace.Verticies.Part:Destroy()
for i, v in pairs (verticies) do
if not string.match(verticies[i].Name, "9") or not string.match(verticies[i].Name, "0") then
drawTriangle(v.Position, verticies[i+1].Position,verticies[i+11].Position, game.Workspace)
drawTriangle(verticies[i+1].Position, verticies[i+11].Position,verticies[i+12].Position, game.Workspace)
end
end
end


It works fine but on the ends of rows ( block 09, 19, 29, 39 etc) it tries to attatch it to the next row which creates a stretched triangle and looks dodgy. I've tried to remove this affect but it just doesn't go away :( Please help.
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
14 Jul 2016 04:01 PM
A gold star to whoever can help
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
14 Jul 2016 04:11 PM
Please looking for some guidance i have absolutely no idea why these big triangles appear, i have tried so hard.
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
14 Jul 2016 04:22 PM
b
Report Abuse
Ryuzoji is not online. Ryuzoji
Joined: 21 Dec 2015
Total Posts: 937
14 Jul 2016 04:22 PM
script:Parent.remove[]
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image