Just in case though, I do use tables to store the width, height, and health values of different sized asteroids:
local asteroidImageSizeTableX = {133, 140, 131, 195, 201, 207, 77, 81, 84, 195, 195, 134, 144, 84, 87} local asteroidImageSizeTableY = {114, 113, 110, 157, 170, 170, 63, 67, 63, 157, 156, 113, 116, 63, 63} local asteroidHealthTable = {350, 325, 280, 550, 610, 615, 180, 200, 190, 550, 550, 350, 335, 190, 195} --fragment of newAsteroid function newAsteroid = function(group, x, y, object) local random = mRand(1,15) width = asteroidImageSizeTableX[random] height = asteroidImageSizeTableY[random] local asteroid = display.newImageRect(group, "sprite/rock/asteroid".. random ..".png", width, height) asteroid.health = asteroidHealthTable[random] end