Hello!
I’m brand new to the Lua language and pretty much programming in general, been getting along great but have hit a roadblock unfortunately.
I’m trying to create 100 physics bodies, all the same shape, colour etc. (basically clones of one archetype), but each with a different value or tag that I can reference towards, however without having to put for instance 100 chunks containing :
local newCard = display.newRoundedRect(80, 50, 150, 400, 3)
newCard.strokeWidth = 3
newCard:setFillColor(154, 80, 44)
newCard:setStrokeColor(0, 0, 0)
physics.addBody(newCard, “dynamic”, { filter=newCardCollisionFilter} )
newCard:addEventListener(“touch”, gameUI.dragBody )
into my code. Help on finding a way around this would be absolutely fantastic and greatly appreciated.
Thanks very much,
Ryan [import]uid: 67571 topic_id: 11514 reply_id: 311514[/import]