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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Game Design
Home Search
 

Re: how to make the middle 8x8 tiles flat?

Previous Thread :: Next Thread 
BladeXE is not online. 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
BlazeingFire88 is not online. BlazeingFire88
Joined: 11 Dec 2014
Total Posts: 137
11 Jan 2015 12:07 PM
Just Postion them

~ This post is Blazeing..
Report Abuse
BladeXE is not online. 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
BlazeingFire88 is not online. BlazeingFire88
Joined: 11 Dec 2014
Total Posts: 137
16 Jan 2015 03:32 PM
tile.Position = SET IT

~This post is Blazeing.
Report Abuse
BladeXE is not online. 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 is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
18 Jan 2015 11:12 PM
[b]
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
19 Jan 2015 12:12 AM
[b2]
Report Abuse
Fakecake777 is not online. Fakecake777
Joined: 19 Nov 2012
Total Posts: 441
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 is not online. 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
endlessfun is online. endlessfun
Joined: 18 Jul 2011
Total Posts: 203
19 Jan 2015 08:52 PM
Uhhhh use my build kit dude it has tons of lil flat blocks x3 derrrrr
Report Abuse
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
19 Jan 2015 08:57 PM
^not sure if troll......
Report Abuse
endlessfun is online. endlessfun
Joined: 18 Jul 2011
Total Posts: 203
19 Jan 2015 09:04 PM
mpt sure if troll detective is troll detective or just troll.....?
Report Abuse
Fakecake777 is not online. Fakecake777
Joined: 19 Nov 2012
Total Posts: 441
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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