action [Play ("sound", "0 - sound_hoveritem.mp3"), Show("test_%s"% (k))]
And now it's working and the code is jumping on my other screen without difficulties :
Code: Select all
screen test_MY_ACHIEV_1:
add "gui/jess_carac_window.png" xpos 620 ypos 250
screen test_MY_ACHIEV_2:
add "gui/jess_carac_window.png" xpos 620 ypos 250Now I am trying to solve the condition probleme because this is really strange, whatever I do, all the achievement are still in display. Even if I don't add them in the persistent dict persistent.achievement .
So for now I have no idea where my mistake come from.
If you want to take a look don't hesitate :
Code: Select all
############ IN PROGRESS ##################
$ achievement_description = {}
$ achievement_description = {"MY_ACHIEV_1": "My_achiev-description_1", "MY_ACHIEV_2": "My_achiev-description_2"}
$ achievement_description["MY_ACHIEV_3"] = "My_achiev-description_4"
$ achievement_description["MY_ACHIEV_4"] = "My_achiev-description_4"
$ achievement_description["MY_ACHIEV_5"] = "My_achiev-description_5"
$ achievement_image = {}
$ achievement_image["MY_ACHIEV_5"] = "gui/AwardLock.png"
$ achievement_image["MY_ACHIEV_4"] = "gui/AwardLock - Save.png"
$ achievement_image["MY_ACHIEV_3"] = "gui/AwardLock.png"
$ achievement_image["MY_ACHIEV_2"] = "gui/AwardLock - Save.png"
$ achievement_image["MY_ACHIEV_1"] = "gui/AwardLock.png"
define persistent.achievement = {}
$ persistent.achievement["MY_ACHIEV_1"] = True
#############################################
screen innerTestScreen(viewId):
side "c r":
viewport id viewId:
has vbox
text " "
add "gui/Award_Title.png"
for k, v in achievement_image.items():
if k in persistent.achievement:
text " "
text "Achievement Name : [k]":
font "GoodDog.otf"
color "#66cc00"
imagebutton:
idle "%s" % (v)
hover "%s" % (v)
action [Play ("sound", "0 - sound_hoveritem.mp3"), Show("test_%s"% (k))]
vbar:
value YScrollValue(viewId)