Struggling with a specific Lua table problem, extracting values from a smaller table to set on/off switches for a longer table.
I have an iterator:
for i = 0,11 do
some things
end
Inside the iterator with length 12 I wish to extract values from a table that might look like this (always <= iterator length):
t = {0,2,4,6,8,10}
and generate a new table with the iterator so that if index i = t value insert 1 else insert 0. That is, the new table would look like this:
newTable = {1,0,1,0,1,0,1,0,1,0,1,0}
Help?