Returning a List of Variables (x, y, z, ...) From a Table
Posted: Fri Nov 06, 2015 8:05 pm
Hello, I am currently trying to make enemy typing in a game I am making. I am using HardonCollider (HC) to construct polygons for enemy shapes, and for some reason it hates it when I try to pass a table as an argument, instead of a list of raw numbers (in the form func(1,2,3,4,5,6,etc.)). Is there a way to write a function that returns all the values of a table in the form of a,b,c,d,e,f,etc. ?
Something like:
function foo(t)
return t[1], t[2], t[3], t[4], t[5], t[6], etc.
end
But without having to write out a million billion table references.
Something like:
function foo(t)
return t[1], t[2], t[3], t[4], t[5], t[6], etc.
end
But without having to write out a million billion table references.