I am quite new in LUA therefore I looking for someone who would give me a hint what will be the best way to start and how it would be achievable. Also I am trying to develop a game in which a number of images are displayed and together they make a word - the letters cannot be displayed randomly but the whole word which consist of the images .. At the moment I know how to display single key value but I don’t know how to shuffle data and display a number of images on the screen .
This is my example and it is not working as it should, however I hope it will disclose my general idea.
local puzzles = {}
local puzzleImages = {}
puzzleImages[1] = {“blockY.png”, “blockE.png”, “blockS.png”} – word YES
puzzleImages[2] = {“blockN.png”, “blockO.png”} – word NO
for i = 1, #puzzleImages do
puzzles[i] = display.newImage(puzzleImages[#puzzleImages][i])
puzzles[i].x = math.random( 115, display.contentWidth - 115 )
puzzles[i].y = math.random( 115, display.contentHeight - 115 )
end
Any idea , suggestion?