I've got a pretty generic gallery set up showing nine "locked" images and when the condition is met in the game the gallery will show an "unlocked" image that can then be clicked on to show another image. But instead of showing the new image, I want the player to be able to click on the unlocked image and be taken to the bonus scene.
I'm trying to somehow attach a "call" action to the unlocked images, but I can't figure out how to do it. Can anyone help? Am I wrong to be using this gallery structure in the first place?
Code: Select all
init python:
dreams = Gallery()
dreams.button("bonus1")
dreams.condition("persistent.unlock_1")
dreams.image("bonus1") # this is the line I want to replace with code that calls the bonus scene
dreams.button("bonus2")
dreams.condition("persistent.unlock_2")
dreams.unlock_image("bonus2")
dreams.button("bonus3")
dreams.condition("persistent.unlock_3")
dreams.unlock_image("bonus3")
dreams.button("bonus4")
dreams.condition("persistent.unlock_4")
dreams.unlock_image("bonus4")
dreams.button("bonus5")
dreams.condition("persistent.unlock_5")
dreams.unlock_image("bonus5")
dreams.button("bonus6")
dreams.condition("persistent.unlock_6")
dreams.unlock_image("bonus6")
dreams.button("bonus7")
dreams.condition("persistent.unlock_7")
dreams.unlock_image("bonus7")
dreams.button("bonus8")
dreams.condition("persistent.unlock_8")
dreams.unlock_image("bonus8")
dreams.button("bonus9")
dreams.condition("persistent.unlock_9")
dreams.unlock_image("bonus9")
screen dreams:
tag menu
add gui.game_menu_background
hbox:
xalign 0.5
yalign 0.5
spacing 30
grid 3 3:
add dreams.make_button("bonus1",unlocked="unlocked1", locked="lock1")
add dreams.make_button("bonus2",unlocked="unlocked2", locked="lock2")
add dreams.make_button("bonus3",unlocked="unlocked3", locked="lock3")
add dreams.make_button("bonus4",unlocked="unlocked4", locked="lock4")
add dreams.make_button("bonus5",unlocked="unlocked5", locked="lock5")
add dreams.make_button("bonus6",unlocked="unlocked6", locked="lock6")
add dreams.make_button("bonus7",unlocked="unlocked7", locked="lock7")
add dreams.make_button("bonus8",unlocked="unlocked8", locked="lock8")
add dreams.make_button("bonus9",unlocked="unlocked9", locked="lock9")
spacing 15
textbutton "Return" action Return()