Code: Select all
init python :
cg_lists = [0,0]
gallery_cg_items = [
["images/cg/mina1.png"], ["images/cg/mina2.png"]
]
gallery_unlock_items = [
["images/cg/small_mina1.png"], ["images/cg/small_mina2.png"]
]
gal_rows = 2
gal_cols = 3
thumbnail_x = 420
thumbnail_y = 250
cg_page = 0
cg_idx = 0
gal_cells = gal_rows * gal_cols
g_cg = Gallery()
g_cg.locked_button = "images/cg/black.png"
g_cg.always_unlocked = False
while cg_idx < len(cg_lists) :
g_cg.button("cg_list" + str(cg_idx))
g_cg.image(gallery_cg_items[cg_idx])
g_cg.condition("cg_lists[cg_idx] == 1")
cg_idx += 1
cg_idx = 0
g_cg.transition = dissolve
giving condition to each images.
Code: Select all
while cg_idx < len(cg_lists) :
g_cg.button("cg_list" + str(cg_idx))
g_cg.image(gallery_cg_items[cg_idx])
g_cg.condition("cg_lists[cg_idx] == 1")
cg_idx += 1
but what happened iscg_idx == 0
↓
if cg_lists[0] == 1 then g_cg.condition(True), unlock the first image
↓
cg_idx += 1
↓
if cg_lists[1] == 0 then g_cg.condition(False), leave the second image locked
↓
...
cg_idx == 0
↓
cg_lists[0] == 1 so it is "True"
↓
cg_idx += 1
↓
cg_lists[1] == 0 so it is "False"
↓
g_cg.condition(True and False) so that both image locked
Idk why Renpy considers all conditions in the while loop as a "one condition merged by an AND gate".
I tried for loop but has the same result...
Using g_cg.unlock or g_cg.unlock_image is not what I want,
because I want to make player be able to unlock CGs even if he/she "didn't see that CG" ex) Hidden CG etc.
Could you help me?
Appreciate.