1
votes

I'm beginner in game development using corona, can you please help me guys how to get every character in a word then add background image to it and make it clickable like in 4 Pics and 1 Word Game. Can you please suggest some ideas or tutorial link. Thanks. So far I don't have enough reputation to put image here but here is the Screenshot Link

2
So, your question is: write the code for you? - Yu Hao
even just the idea sir or if you know some tutorial link for that - Andrian Gungon

2 Answers

3
votes

Here are some pieces that may help you 1. Iterate over each character

local str="Something"
for i = 1, str:len() do
    print(str:sub(i,i));
end
  1. load image

    local img = display.newImage("images/" . letter . "1.jpg");

if you need anything specific ask here

0
votes

To iterate over each character, try also this:

local str="Something"
for c in str:gmatch(".") do
    print(c)
end

(Actually, this iterates over each byte in the string, which may not be what you want if the string contains Unicode characters.)