Trying to do this my own way. Floundering… Any tips would be greatly appreciated. My approach might be laughable since I don’t really grasp tables well… YET 
btw, I’m seeding the random number at the start of my code. and I’m simplifying this a little for the sake of learning, that’s why I only have it handling 10 total.
[code]
local currentShapes = {}
local allShapes = {}
allShapes[1]= “circle”
allShapes[2]= “diamond”
allShapes[3]= “heart”
allShapes[4]= “hex”
allShapes[5]= “oct”
allShapes[6]= “oval”
allShapes[7]= “rectangle”
allShapes[8]= “square”
allShapes[9]= “star”
allShapes[10]= “triangle”
local shapesChosen ={}
local function shapeChooser()
local function getShapeNumbers()
for i=1,numThisRound do
shapesChosen[i]=math.random(10) – random number between 1 and 10
print("i = "…shapesChosen[i])
end
end
getShapeNumbers()
for i,v in ipairs(shapesChosen) do print(i,v) end
end
local function spawnRoundShapes()
for i,v in ipairs(shapesChosen) do
currentShapes[i]= allShapes[v]
display.newImageRect(“b_”…currentShapes[i]…".png", 50, 50)
physics.addBody(currentShapes[i], “dynamic”, {density = 0, friction = 0, bounce = 0, radius = 20})
wrapShape(currentShapes[i])
shapeMovement(currentShapes[i])
for i,v in ipairs(currentShapes) do print(i,v) end
end
end
[/code] [import]uid: 10361 topic_id: 4048 reply_id: 28860[/import]