BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 11 Jan 2015 12:02 PM |
Here is the script I have.
local size = Vector3.new(20,10,20) local base=script.Parent local tilePart = Instance.new("Part") tilePart.formFactor = "Custom" tilePart.Size = base.Size / size local colors = {BrickColor.new("Bright green"), BrickColor.new("Camo"), BrickColor.new("Dark green")} function color(part) part.BrickColor = colors[math.random(#colors)] end 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.Anchored=true 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 color(tile) tile.Material = "Grass" end end workspace.BasePlate:destroy()
Thi s script works completely fine. But I want the 8x8 tiles in the middle to be flat(flush) with eachother. How would I do this? |
|
|
| Report Abuse |
|
|
|
| 11 Jan 2015 12:07 PM |
Just Postion them
~ This post is Blazeing.. |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 11 Jan 2015 12:39 PM |
| Well I know that I have to do that, but I'm not sure how to do it. |
|
|
| Report Abuse |
|
|
|
| 16 Jan 2015 03:32 PM |
tile.Position = SET IT
~This post is Blazeing. |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 17 Jan 2015 01:01 PM |
| Yes, but I don't know how to find out which are the 8x8 in the middle. |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
| |
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
| |
|
|
| 19 Jan 2015 09:11 AM |
The outer tiles all have something in common. Examine a 4x4 example grid. 1 2 3 4 1 o o o o 2 o u u o 3 o u u o 4 o o o o
Where 'o' means outer and 'u' means inner tile.
If the x value == 1, then it's definitely an o. If the x value == the highest value x can have, it's also an o. If the z value == 1, the it's an o. If the z value == the highest value z can have, it's an o. Else it's 'u'
No problem |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 19 Jan 2015 07:59 PM |
| Yes, but it's 64x64, I and I want the middle 8x8, would I just make a whole lot of other tables? |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2015 08:52 PM |
| Uhhhh use my build kit dude it has tons of lil flat blocks x3 derrrrr |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Jan 2015 09:04 PM |
| mpt sure if troll detective is troll detective or just troll.....? |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2015 07:13 AM |
Alright, here's another sample grid. The tiles you want to be flat are 'u'. Notice that only the middle 2x2 are considered 'inner'.
123456 1 o o o o o o 2 o o o o o o 3 o o u u o o 4 o o u u o o 5 o o o o o o 6 o o o o o o
If the x value <= 2, then it's definitely an o. Else if the x value >= 5, it's also an o. Else If the z value <= 2, the it's an o. Else If the z value >= 5, it's an o. Else it's 'u'
Apply the same logic to your 64x64 grid. |
|
|
| Report Abuse |
|
|