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: Tables, Math, Variables: I got confused. Help?

Previous Thread :: Next Thread 
CTServant001 is not online. CTServant001
Joined: 01 Feb 2013
Total Posts: 211
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
CTServant001 is not online. CTServant001
Joined: 01 Feb 2013
Total Posts: 211
08 Dec 2014 06:21 PM
bump
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