More information at http://buildism.net/wiki/w/index.php?tit...cts#Coding
[lua]
Int = {} --Yes, its a table
function Int:new(one, two, three) --here I set the properties.
newTB = {x, y, z}
newTB.x = one
newTB.y = two
newTB.z = three
return newTB
end
a = Int.new(5, 8, 1) --Here we are using Int the same as Vec2D.
print(a.x) --5
print(a.y) --8
print(a.z) -- 1
[/lua]
Look over it. Simple. I'm gussing this is the same way (for you ROBLOXians) Instance.new works.
[lua]
Int = {} --Yes, its a table
function Int:new(one, two, three) --here I set the properties.
newTB = {x, y, z}
newTB.x = one
newTB.y = two
newTB.z = three
return newTB
end
a = Int.new(5, 8, 1) --Here we are using Int the same as Vec2D.
print(a.x) --5
print(a.y) --8
print(a.z) -- 1
[/lua]
Look over it. Simple. I'm gussing this is the same way (for you ROBLOXians) Instance.new works.