Hello everybody! I’ve added all of my “default” textures and graphics into one display group that the player has unlocked immediately, but now i am trying to make it so if someones score exceeds for exaomple 50 they unlock a new texture “pack” (changes how the entire game would look) so that that gets displayed instead of the default. They also have to be able to switch whenever they wish. I’ve been trying to figure this out for the past couple of days with a lot of frustration so now I look for outside help. (already tried apis, libraries, google)
Bump, just in case someone who can help me sees this.
Put different texture packs in different folders, and use a variable to store the folder name to use currently.
[lua]
local folder = “default/”
if score > 50 then
folder = “pack1/”
end
local bg = display.newImageRect(folder…“bg.jpg”, 320, 480)
local button = display.newImageRect(folder…“button.png”, 50,50)
[/lua]
Really sorry i forgot to reply! Thanks a lot for helping me with this, it seems so simple yet i couldn’t think of it. Thanks again!
Bump, just in case someone who can help me sees this.
Put different texture packs in different folders, and use a variable to store the folder name to use currently.
[lua]
local folder = “default/”
if score > 50 then
folder = “pack1/”
end
local bg = display.newImageRect(folder…“bg.jpg”, 320, 480)
local button = display.newImageRect(folder…“button.png”, 50,50)
[/lua]
Really sorry i forgot to reply! Thanks a lot for helping me with this, it seems so simple yet i couldn’t think of it. Thanks again!