|
| 08 Dec 2014 05:36 PM |
local List = data:getChildren() local TabList = {} -- 112 Lines filled this in another part of the script local Box = {1,57,58,8} -- 4 lines = 1 box (49 boxes total) *these numbers are correct -- problem starts here for i=1,8 do -- 8by8 grid of dots with 7by7 lines that form 7by7 boxes if ((data:FindFirstChild(("Line"..(Box[1]..i)), true)).Value == true) and ((data:FindFirstChild(("Line"..(Box[2]..i)), true)).Value == true) and ((data:FindFirstChild(("Line"..(Box[3]..i)), true)).Value == true) and ((data:FindFirstChild(("Line"..(Box[4]..i)), true)).Value == true) then -- The if statements work its just the wrong conjugated number if (data:FindFirstChild(("Box"..i),true) ~= nil) and (data:FindFirstChild(("Box"..i),true).Value == nil) then print("Box"..i) end end end
----- What I am trying to do here is use 4 (of 112) lines to form a box (Some Boxes share lines from other boxes). There are 49 boxes total. I am trying to detect when the lines form a box. How do I match up (correspond?) the 4 lines in the Box table with that of the TabList?
|
|
|
| Report Abuse |
|
| |